gnu: python-pytz: Update to 2018.9.
[jackhill/guix/guix.git] / gnu / packages / python-xyz.scm
CommitLineData
44d10b1f
RW
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
2d040763 3;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
fa8ffaa0 4;;; Copyright © 2013, 2014, 2015, 2016, 2019 Andreas Enge <andreas@enge.fr>
44d10b1f
RW
5;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
6;;; Copyright © 2014, 2017 Eric Bavier <bavier@member.fsf.org>
7;;; Copyright © 2014, 2015 Federico Beffa <beffa@fbengineering.ch>
8;;; Copyright © 2015 Omar Radwan <toxemicsquire4@gmail.com>
9;;; Copyright © 2015 Pierre-Antoine Rault <par@rigelk.eu>
10;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
11;;; Copyright © 2015, 2016 Christopher Allan Webber <cwebber@dustycloud.org>
12;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
13;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
b742c006 14;;; Copyright © 2015, 2016, 2017, 2019 Leo Famulari <leo@famulari.name>
44d10b1f
RW
15;;; Copyright © 2015, 2017 Ben Woodcroft <donttrustben@gmail.com>
16;;; Copyright © 2015, 2016 Erik Edrosa <erik.edrosa@gmail.com>
17;;; Copyright © 2015, 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
18;;; Copyright © 2015, 2017 Kyle Meyer <kyle@kyleam.com>
19;;; Copyright © 2015, 2016 Chris Marusich <cmmarusich@gmail.com>
20;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
21;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
22;;; Copyright © 2016, 2018 Hartmut Goebel <h.goebel@crazy-compilers.com>
23;;; Copyright © 2016 Daniel Pimentel <d4n1@d4n1.org>
24;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
25;;; Copyright © 2016, 2017 Troy Sankey <sankeytms@gmail.com>
26;;; Copyright © 2016, 2017 Nils Gillmann <ng0@n0.is>
27;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
28;;; Copyright © 2016 David Craven <david@craven.ch>
47f66348 29;;; Copyright © 2016, 2017, 2018, 2019 Marius Bakke <mbakke@fastmail.com>
44d10b1f
RW
30;;; Copyright © 2016, 2017 Stefan Reichör <stefan@xsteve.at>
31;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
32;;; Copyright © 2016, 2017 Alex Vong <alexvong1995@gmail.com>
33;;; Copyright © 2016, 2017, 2018 Arun Isaac <arunisaac@systemreboot.net>
34;;; Copyright © 2016, 2017, 2018 Julien Lepiller <julien@lepiller.eu>
217ea1a1 35;;; Copyright © 2016, 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
44d10b1f
RW
36;;; Copyright © 2016, 2017 Thomas Danckaert <post@thomasdanckaert.be>
37;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
38;;; Copyright © 2017 Frederick M. Muriithi <fredmanglis@gmail.com>
39;;; Copyright © 2017, 2018 Adriano Peluso <catonano@gmail.com>
40;;; Copyright © 2017 Ben Sturmfels <ben@sturm.com.au>
41;;; Copyright © 2017, 2018 Mathieu Othacehe <m.othacehe@gmail.com>
42;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.org>
43;;; Copyright © 2017 Roel Janssen <roel@gnu.org>
44;;; Copyright © 2017, 2018 Kei Kebreau <kkebreau@posteo.net>
45;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
46;;; Copyright © 2017 Muriithi Frederick Muriuki <fredmanglis@gmail.com>
47;;; Copyright © 2017 Brendan Tildesley <brendan.tildesley@openmailbox.org>
48;;; Copyright © 2018 Ethan R. Jones <ethanrjones97@gmail.com
49;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
50;;; Copyright © 2018 Vijayalakshmi Vedantham <vijimay12@gmail.com>
51;;; Copyright © 2018 Mathieu Lirzin <mthl@gnu.org>
52;;; Copyright © 2018 Adam Massmann <massmannak@gmail.com>
53;;; Copyright © 2016, 2018 Tomáš Čech <sleep_walker@gnu.org>
54;;; Copyright © 2018 Nicolas Goaziou <mail@nicolasgoaziou.fr>
55;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
56;;; Copyright © 2018 Clément Lassieur <clement@lassieur.org>
57;;; Copyright © 2018 Maxim Cournoyer <maxim.cournoyer@gmail.com>
58;;; Copyright © 2018 Luther Thompson <lutheroto@gmail.com>
59;;; Copyright © 2018 Vagrant Cascadian <vagrant@debian.org>
a9ba0a31 60;;; Copyright © 2019 Brett Gilio <brettg@posteo.net>
44d10b1f
RW
61;;;
62;;; This file is part of GNU Guix.
63;;;
64;;; GNU Guix is free software; you can redistribute it and/or modify it
65;;; under the terms of the GNU General Public License as published by
66;;; the Free Software Foundation; either version 3 of the License, or (at
67;;; your option) any later version.
68;;;
69;;; GNU Guix is distributed in the hope that it will be useful, but
70;;; WITHOUT ANY WARRANTY; without even the implied warranty of
71;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
72;;; GNU General Public License for more details.
73;;;
74;;; You should have received a copy of the GNU General Public License
75;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
76
77(define-module (gnu packages python-xyz)
78 #:use-module ((guix licenses) #:prefix license:)
79 #:use-module (gnu packages)
80 #:use-module (gnu packages algebra)
81 #:use-module (gnu packages adns)
82 #:use-module (gnu packages attr)
83 #:use-module (gnu packages backup)
84 #:use-module (gnu packages bash)
85 #:use-module (gnu packages check)
86 #:use-module (gnu packages compression)
87 #:use-module (gnu packages crypto)
88 #:use-module (gnu packages databases)
89 #:use-module (gnu packages file)
90 #:use-module (gnu packages fontutils)
91 #:use-module (gnu packages gcc)
92 #:use-module (gnu packages geo)
93 #:use-module (gnu packages ghostscript)
94 #:use-module (gnu packages gl)
95 #:use-module (gnu packages glib)
96 #:use-module (gnu packages graphviz)
97 #:use-module (gnu packages graphics)
98 #:use-module (gnu packages gstreamer)
99 #:use-module (gnu packages gtk)
100 #:use-module (gnu packages icu4c)
101 #:use-module (gnu packages image)
102 #:use-module (gnu packages imagemagick)
103 #:use-module (gnu packages libevent)
104 #:use-module (gnu packages libffi)
105 #:use-module (gnu packages linux)
106 #:use-module (gnu packages llvm)
107 #:use-module (gnu packages man)
108 #:use-module (gnu packages maths)
42f0b0c2 109 #:use-module (gnu packages monitoring)
44d10b1f
RW
110 #:use-module (gnu packages multiprecision)
111 #:use-module (gnu packages networking)
112 #:use-module (gnu packages ncurses)
113 #:use-module (gnu packages openstack)
114 #:use-module (gnu packages pcre)
115 #:use-module (gnu packages perl)
116 #:use-module (gnu packages pkg-config)
117 #:use-module (gnu packages python)
d362b11d 118 #:use-module (gnu packages python-check)
44d10b1f
RW
119 #:use-module (gnu packages python-crypto)
120 #:use-module (gnu packages python-web)
121 #:use-module (gnu packages qt)
122 #:use-module (gnu packages readline)
123 #:use-module (gnu packages sdl)
124 #:use-module (gnu packages search)
125 #:use-module (gnu packages shells)
126 #:use-module (gnu packages ssh)
127 #:use-module (gnu packages terminals)
128 #:use-module (gnu packages tex)
129 #:use-module (gnu packages texinfo)
130 #:use-module (gnu packages time)
131 #:use-module (gnu packages tls)
132 #:use-module (gnu packages version-control)
133 #:use-module (gnu packages video)
134 #:use-module (gnu packages web)
135 #:use-module (gnu packages base)
136 #:use-module (gnu packages xml)
137 #:use-module (gnu packages xorg)
138 #:use-module (gnu packages xdisorg)
139 #:use-module (gnu packages tcl)
140 #:use-module (gnu packages bdw-gc)
f98232a3 141 #:use-module (gnu packages serialization)
44d10b1f
RW
142 #:use-module (guix packages)
143 #:use-module (guix download)
144 #:use-module (guix git-download)
145 #:use-module (guix utils)
146 #:use-module (guix build-system gnu)
147 #:use-module (guix build-system cmake)
148 #:use-module (guix build-system python)
149 #:use-module (guix build-system trivial)
150 #:use-module (srfi srfi-1)
151 #:use-module (srfi srfi-26))
152
153(define-public python-psutil
154 (package
155 (name "python-psutil")
156 (version "5.4.3")
157 (source
158 (origin
159 (method url-fetch)
160 (uri (pypi-uri "psutil" version))
161 (sha256
162 (base32
163 "063v69x7spyclyaxrd3gmzj3p16q5ayg97xqhwb1kyn22a9pwip2"))))
164 (build-system python-build-system)
165 (arguments
166 ;; FIXME: some tests does not return and times out.
167 '(#:tests? #f))
168 (home-page "https://www.github.com/giampaolo/psutil")
169 (synopsis "Library for retrieving information on running processes")
170 (description
171 "psutil (Python system and process utilities) is a library for retrieving
172information on running processes and system utilization (CPU, memory, disks,
173network) in Python. It is useful mainly for system monitoring, profiling and
174limiting process resources and management of running processes. It implements
175many functionalities offered by command line tools such as: ps, top, lsof,
176netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
177pidof, tty, taskset, pmap.")
178 (properties `((python2-variant . ,(delay python2-psutil))))
179 (license license:bsd-3)))
180
181(define-public python2-psutil
182 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
183 (package
184 (inherit base)
185 (propagated-inputs
186 `(("python2-enum34" ,python2-enum34) ;optional
187 ,@(package-propagated-inputs base))))))
188
189(define-public python-shapely
190 (package
191 (name "python-shapely")
192 (version "1.6.3")
193 (source
194 (origin
195 (method url-fetch)
196 (uri (pypi-uri "Shapely" version))
197 (sha256
198 (base32
199 "0svc58dzcw9gj92b4sgq35sdxkf85z0qwlzxarkzq4bp3h8jy58l"))))
200 (build-system python-build-system)
201 (native-inputs
202 `(("python-cython" ,python-cython)
203 ("python-matplotlib" ,python-matplotlib)
204 ("python-pytest" ,python-pytest)
205 ("python-pytest-cov" ,python-pytest-cov)))
206 (inputs
207 `(("geos" ,geos)))
208 (propagated-inputs
209 `(("python-numpy" ,python-numpy)))
210 (arguments
211 `(#:phases
212 (modify-phases %standard-phases
213 (add-after 'unpack 'patch-geos-path
214 (lambda* (#:key inputs #:allow-other-keys)
215 (let ((geos (assoc-ref inputs "geos"))
216 (glibc (assoc-ref inputs ,(if (%current-target-system)
217 "cross-libc" "libc"))))
218 (substitute* "shapely/geos.py"
219 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
220 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
221 geos "/lib/libgeos_c.so'])"))
222 (("free = load_dll\\('c'\\)\\.free")
223 (string-append "free = load_dll('c', fallbacks=['"
224 glibc "/lib/libc.so.6']).free"))))
225 #t)))))
226 (home-page "https://github.com/Toblerity/Shapely")
227 (synopsis "Library for the manipulation and analysis of geometric objects")
228 (description "Shapely is a Python package for manipulation and analysis of
229planar geometric objects. It is based on the @code{GEOS} library.")
230 (license license:bsd-3)))
231
232(define-public python-logwrap
233 (package
234 (name "python-logwrap")
235 (version "3.2.1")
236 (source
237 (origin
238 (method url-fetch)
239 (uri (pypi-uri "logwrap" version ".zip"))
240 (sha256
241 (base32
242 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
243 (build-system python-build-system)
244 (propagated-inputs
245 `(("python-six" ,python-six)
246 ("python-typing" ,python-typing)))
247 (native-inputs
248 `(("unzip" ,unzip)
249 ("python-cython" ,python-cython)
250 ("python-pytest" ,python-pytest)
251 ("python-pytest-cov" ,python-pytest-cov)
252 ("python-pytest-runner" ,python-pytest-runner)))
253 (home-page "https://github.com/penguinolog/logwrap")
254 (synopsis "Decorator for logging function arguments")
255 (description "This package provides a decorator to log function arguments
256and function call return values in a human-readable way.")
257 (license license:asl2.0)))
258
259(define-public python2-shapely
260 (package-with-python2 python-shapely))
261
262(define-public python-clyent
263 (package
264 (name "python-clyent")
265 (version "1.2.1")
266 (source
267 (origin
268 (method url-fetch)
269 (uri (pypi-uri "clyent" version))
270 (sha256
271 (base32
272 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
273 (build-system python-build-system)
274 (native-inputs
275 `(("python-mock" ,python-mock)))
276 (home-page "https://github.com/binstar/clyent")
277 (synopsis "Command line client library")
278 (description "Clyent is a Python command line utiliy library. It is used
279by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
280 (license license:bsd-3)))
281
282(define-public python2-clyent
283 (package-with-python2 python-clyent))
284
285(define-public python-babel
286 (package
287 (name "python-babel")
288 (version "2.6.0")
289 (source
290 (origin
291 (method url-fetch)
292 (uri (pypi-uri "Babel" version))
293 (sha256
294 (base32
295 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))
296 (build-system python-build-system)
297 (native-inputs
298 `(("python-freezegun" ,python-freezegun)
299 ("python-pytest" ,python-pytest)))
300 (propagated-inputs
301 `(("python-pytz" ,python-pytz)))
302 (arguments
303 `(#:phases (modify-phases %standard-phases
304 (replace 'check
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")
b3ca2b45 617 (version "40.8.0")
44d10b1f
RW
618 (source
619 (origin
620 (method url-fetch)
621 (uri (pypi-uri "setuptools" version ".zip"))
622 (sha256
623 (base32
b3ca2b45 624 "0k9hifpgahnw2a26w3cr346iy733k6d3nwh3f7g9m13y6f8fqkkf"))
44d10b1f
RW
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")
6c58a06e 875 (version "1.12.0")
44d10b1f
RW
876 (source
877 (origin
878 (method url-fetch)
879 (uri (pypi-uri "six" version))
880 (sha256
881 (base32
6c58a06e 882 "0wxs1q74v07ssjywbbm7x6h5v9qx209ld2yfsif4060sxi0h2sni"))))
44d10b1f
RW
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")
ad34338d 1358 (version "3.0.3")
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
ad34338d 1367 "1xizkjgrvydkjhpv7i5rx0mdkp3618sis7jsckjh57nxcynlk5dc"))))
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)"))
1379 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
1380 (chdir "build/scons")
1381 #t)))))
44d10b1f
RW
1382 (home-page "http://scons.org/")
1383 (synopsis "Software construction tool written in Python")
1384 (description
1385 "SCons is a software construction tool. Think of SCons as an improved,
1386cross-platform substitute for the classic Make utility with integrated
1387functionality similar to autoconf/automake and compiler caches such as ccache.
1388In short, SCons is an easier, more reliable and faster way to build
1389software.")
1390 (license license:x11)))
1391
1392(define-public scons-python2
1393 (package
1394 (inherit (package-with-python2 scons))
1395 (name "scons-python2")))
1396
1397(define-public python-extras
1398 (package
1399 (name "python-extras")
1400 (version "1.0.0")
1401 (source
1402 (origin
1403 (method url-fetch)
1404 (uri (pypi-uri "extras" version))
1405 (sha256
1406 (base32
1407 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1408 (build-system python-build-system)
1409 (arguments
1410 ;; FIXME: Circular dependency on testtools.
1411 '(#:tests? #f))
1412 (home-page "https://github.com/testing-cabal/extras")
1413 (synopsis "Useful extensions to the Python standard library")
1414 (description
1415 "Extras is a set of extensions to the Python standard library.")
1416 (license license:expat)))
1417
1418(define-public python2-extras
1419 (package-with-python2 python-extras))
1420
1421(define-public python-mimeparse
1422 (package
1423 (name "python-mimeparse")
1424 (version "1.6.0")
1425 (source
1426 (origin
1427 (method url-fetch)
89bf667c 1428 (uri (pypi-uri "python-mimeparse" version))
44d10b1f
RW
1429 (sha256
1430 (base32
1431 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
1432 (build-system python-build-system)
1433 (arguments
1434 '(#:phases
1435 (modify-phases %standard-phases
1436 (replace 'check
1437 (lambda _
1438 (invoke "./mimeparse_test.py"))))))
1439 (home-page
1440 "https://github.com/dbtsai/python-mimeparse")
1441 (synopsis "Python library for parsing MIME types")
1442 (description
1443 "Mimeparse provides basic functions for parsing MIME type names and
1444matching them against a list of media-ranges.")
1445 (license license:expat)))
1446
1447(define-public python2-mimeparse
1448 (package-with-python2 python-mimeparse))
1449
1450(define-public python-miniboa
1451 (package
1452 (name "python-miniboa")
1453 (version "1.0.7")
1454 (source
1455 (origin
1456 (method url-fetch)
1457 (uri (pypi-uri "miniboa" version))
1458 (sha256
1459 (base32
1460 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
1461 (build-system python-build-system)
1462 (home-page "https://github.com/shmup/miniboa")
1463 (synopsis "Simple, single-threaded Telnet server")
1464 (description
1465 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
1466server.")
1467 (license license:asl2.0)))
1468
1469(define-public python2-miniboa
1470 (package-with-python2 python-miniboa))
1471
1472(define-public python-pafy
1473 (package
1474 (name "python-pafy")
1475 (version "0.5.3.1")
1476 (source
1477 (origin
1478 (method url-fetch)
1479 (uri (pypi-uri "pafy" version))
1480 (sha256
1481 (base32
1482 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1483 (build-system python-build-system)
1484 (arguments
1485 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1486 (propagated-inputs
1487 ;; Youtube-dl is a python package which is imported in the file
1488 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1489 `(("youtube-dl" ,youtube-dl)))
1490 (home-page "https://np1.github.io/pafy/")
1491 (synopsis "Retrieve YouTube content and metadata")
1492 (description
1493 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1494 (license license:lgpl3+)))
1495
1496(define-public python2-funcsigs
1497 (package
1498 (name "python2-funcsigs")
1499 (version "1.0.2")
1500 (source (origin
1501 (method url-fetch)
1502 (uri (pypi-uri "funcsigs" version))
1503 (sha256
1504 (base32
1505 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1506 (build-system python-build-system)
1507 (arguments
1508 `(#:python ,python-2))
1509 (native-inputs
1510 `(("python2-unittest2" ,python2-unittest2)))
1511 (home-page "http://funcsigs.readthedocs.org")
1512 (synopsis "Python function signatures from PEP362")
1513 (description
1514 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1515 (license license:asl2.0)))
1516
1517(define-public python2-funcsigs-bootstrap
1518 (package
1519 (inherit python2-funcsigs)
1520 (name "python2-funcsigs-bootstrap")
1521 (native-inputs `())
1522 (arguments
1523 `(#:tests? #f
1524 ,@(package-arguments python2-funcsigs)))))
1525
1526(define-public python-py
1527 (package
1528 (name "python-py")
08eba545 1529 (version "1.8.0")
44d10b1f
RW
1530 (source
1531 (origin
1532 (method url-fetch)
1533 (uri (pypi-uri "py" version))
1534 (sha256
1535 (base32
08eba545 1536 "0lsy1gajva083pzc7csj1cvbmminb7b4l6a0prdzyb3fd829nqyw"))))
44d10b1f
RW
1537 (build-system python-build-system)
1538 (arguments
1539 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1540 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1541 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1542 ;; Is this module globally installed?"
1543 '(#:tests? #f))
1544 (native-inputs
1545 `(("python-setuptools-scm" ,python-setuptools-scm)))
1546 (home-page "https://github.com/pytest-dev/py")
1547 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1548 (description
1549 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1550code introspection, and logging.")
1551 (license license:expat)))
1552
1553(define-public python2-py
1554 (package-with-python2 python-py))
1555
1556;; Recent versions of python-fixtures and python-testrepository need
1557;; python-pbr for packaging, which itself needs these two packages for
1558;; testing.
1559;; To fix this circular dependency, we use a build of python-pbr, based on the
1560;; same source, just without any test dependencies and with tests disabled.
1561;; python-pbr-minmal is then used to package python-fixtures and
1562;; python-testrepository.
1563;; Strictly speaking we currently could remove the test-requirements from the
1564;; normal python-pbr package (and save this package) since test are disabled
1565;; there anyway. But this may change in future.
1566(define-public python-pbr-minimal
1567 (package
1568 (name "python-pbr-minimal")
1569 (version "3.0.1")
1570 (source
1571 (origin
1572 (method url-fetch)
1573 (uri (pypi-uri "pbr" version))
1574 (sha256
1575 (base32
1576 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
1577 (build-system python-build-system)
1578 (arguments
1579 `(#:tests? #f))
1580 (home-page "http://docs.openstack.org/developer/pbr/")
1581 (synopsis "Minimal build of python-pbr used for bootstrapping")
1582 (description
1583 "Used only for bootstrapping python2-pbr, you should not need this.")
1584 (license license:asl2.0)))
1585
1586(define-public python2-pbr-minimal
1587 (package-with-python2 python-pbr-minimal))
1588
1589(define-public python-pbr
1590 (package
1591 (inherit python-pbr-minimal)
1592 (name "python-pbr")
1593 (arguments
1594 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1595 (propagated-inputs
1596 `(("git" ,git))) ;; pbr actually uses the "git" binary.
1597 (native-inputs
1598 `(("python-fixtures" ,python-fixtures-bootstrap)
1599 ;; discover, coverage, hacking, subunit
1600 ("python-mock" ,python-mock)
1601 ("python-six" ,python-six)
1602 ("python-sphinx" ,python-sphinx)
1603 ("python-testrepository" ,python-testrepository-bootstrap)
1604 ("python-testresources" ,python-testresources-bootstrap)
1605 ("python-testscenarios" ,python-testscenarios-bootstrap)
1606 ("python-testtools" ,python-testtools-bootstrap)
1607 ("python-virtualenv" ,python-virtualenv)))
1608 (synopsis "Enhance the default behavior of Python’s setuptools")
1609 (description
1610 "Python Build Reasonableness (PBR) is a library that injects some useful
1611and sensible default behaviors into your setuptools run. It will set
1612versions, process requirements files and generate AUTHORS and ChangeLog file
1613from git information.
1614")))
1615
1616(define-public python2-pbr
1617 (package-with-python2 python-pbr))
1618
1619(define-public python-exif-read
1620 (package
1621 (name "python-exif-read")
1622 (version "2.1.2")
1623 (source (origin
1624 (method url-fetch)
1625 (uri (pypi-uri "ExifRead" version))
1626 (sha256
1627 (base32
1628 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
1629 (build-system python-build-system)
1630 (arguments `(#:tests? #f)) ; no tests
1631 (home-page "https://github.com/ianare/exif-py")
1632 (synopsis "Python library to extract EXIF data from image files")
1633 (description
1634 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1635files.")
1636 (license license:bsd-3)))
1637
1638(define-public python2-exif-read
1639 (package-with-python2 python-exif-read))
1640
1641(define-public python-pyld
1642 (package
1643 (name "python-pyld")
1644 (version "1.0.3")
1645 (source (origin
1646 (method url-fetch)
1647 (uri (pypi-uri "PyLD" version))
1648 (sha256
1649 (base32
1650 "12i2g6xdj30k7xxcibg3sc5y76snwq8l6n8fy9lyi577kgy0h2pm"))))
1651 (build-system python-build-system)
1652 (home-page "https://github.com/digitalbazaar/pyld")
1653 (synopsis "Python implementation of the JSON-LD specification")
1654 (description
1655 "PyLD is an implementation of the JSON-LD specification.")
1656 (license license:bsd-3)))
1657
1658(define-public python2-pyld
1659 (package-with-python2 python-pyld))
1660
1661(define-public python-click
1662 (package
1663 (name "python-click")
61984855 1664 (version "7.0")
44d10b1f
RW
1665 (source
1666 (origin
1667 (method url-fetch)
1668 (uri (pypi-uri "click" version))
1669 (sha256
1670 (base32
61984855 1671 "1mzjixd4vjbjvzb6vylki9w1556a9qmdh35kzmq6cign46av952v"))))
44d10b1f
RW
1672 (build-system python-build-system)
1673 (arguments
8d7e7ca6 1674 `(#:phases
44d10b1f
RW
1675 (modify-phases %standard-phases
1676 (add-after 'unpack 'fix-paths
1677 (lambda* (#:key inputs #:allow-other-keys)
1678 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
1679 "cross-libc" "libc"))))
1680 (substitute* "click/_unicodefun.py"
1681 (("'locale'")
1682 (string-append "'" glibc "/bin/locale'"))))
8d7e7ca6
EF
1683 #t))
1684 (replace 'check
1685 (lambda _
1686 (invoke "python" "-m" "pytest"))))))
44d10b1f
RW
1687 (native-inputs
1688 `(("python-pytest" ,python-pytest)))
61984855 1689 (home-page "https://palletsprojects.com/p/click/")
44d10b1f
RW
1690 (synopsis "Command line library for Python")
1691 (description
1692 "Click is a Python package for creating command line interfaces in a
1693composable way with as little code as necessary. Its name stands for
1694\"Command Line Interface Creation Kit\". It's highly configurable but comes
1695with sensible defaults out of the box.")
1696 (license license:bsd-3)))
1697
1698(define-public python2-click
1699 (package-with-python2 python-click))
1700
1701(define-public python-wheel
1702 (package
1703 (name "python-wheel")
746c074b 1704 (version "0.32.3")
44d10b1f
RW
1705 (source
1706 (origin
1707 (method url-fetch)
1708 (uri (pypi-uri "wheel" version))
1709 (sha256
1710 (base32
746c074b 1711 "1dhxl1bf18bx9szmqcnxbg6204hp3im8089q3hkwh5jfa6zh75q2"))))
44d10b1f
RW
1712 (build-system python-build-system)
1713 (native-inputs
1714 `(("python-jsonschema" ,python-jsonschema)
1715 ("python-pytest-cov" ,python-pytest-cov)))
1716 (home-page "https://bitbucket.org/pypa/wheel/")
1717 (synopsis "Format for built Python packages")
1718 (description
1719 "A wheel is a ZIP-format archive with a specially formatted filename and
1720the @code{.whl} extension. It is designed to contain all the files for a PEP
1721376 compatible install in a way that is very close to the on-disk format. Many
1722packages will be properly installed with only the @code{Unpack} step and the
1723unpacked archive preserves enough information to @code{Spread} (copy data and
1724scripts to their final locations) at any later time. Wheel files can be
1725installed with a newer @code{pip} or with wheel's own command line utility.")
1726 (license license:expat)
1727 (properties `((python2-variant . ,(delay python2-wheel))))))
1728
1729(define-public python2-wheel
1730 (let ((wheel (package-with-python2
1731 (strip-python2-variant python-wheel))))
1732 (package (inherit wheel)
1733 (native-inputs `(("python2-functools32" ,python2-functools32)
1734 ,@(package-native-inputs wheel))))))
1735
1736(define-public python-vcversioner
1737 (package
1738 (name "python-vcversioner")
1739 (version "2.16.0.0")
1740 (source
1741 (origin
1742 (method url-fetch)
1743 (uri (pypi-uri "vcversioner" version))
1744 (sha256
1745 (base32
1746 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
1747 (build-system python-build-system)
1748 (synopsis "Python library for version number discovery")
1749 (description "Vcversioner is a Python library that inspects tagging
1750information in a variety of version control systems in order to discover
1751version numbers.")
1752 (home-page "https://github.com/habnabit/vcversioner")
1753 (license license:isc)))
1754
1755(define-public python2-vcversioner
1756 (package-with-python2 python-vcversioner))
1757
1758(define-public python-jsonschema
1759 (package
1760 (name "python-jsonschema")
1761 (version "2.6.0")
1762 (source (origin
1763 (method url-fetch)
786ccb87 1764 (uri (pypi-uri "jsonschema" version))
44d10b1f
RW
1765 (sha256
1766 (base32
1767 "00kf3zmpp9ya4sydffpifn0j0mzm342a2vzh82p6r0vh10cg7xbg"))))
1768 (build-system python-build-system)
1769 (arguments
1770 '(#:phases
1771 (modify-phases %standard-phases
8d466799 1772 (replace 'check (lambda _ (invoke "nosetests"))))))
44d10b1f
RW
1773 (native-inputs
1774 `(("python-nose" ,python-nose)
1775 ("python-vcversioner" ,python-vcversioner)))
1776 (home-page "https://github.com/Julian/jsonschema")
1777 (synopsis "Implementation of JSON Schema for Python")
1778 (description
1779 "Jsonschema is an implementation of JSON Schema for Python.")
1780 (license license:expat)
1781 (properties `((python2-variant . ,(delay python2-jsonschema))))))
1782
1783(define-public python2-jsonschema
1784 (let ((jsonschema (package-with-python2
1785 (strip-python2-variant python-jsonschema))))
1786 (package (inherit jsonschema)
1787 (native-inputs
1788 `(("python2-mock" ,python2-mock)
1789 ,@(package-native-inputs jsonschema)))
1790 (propagated-inputs
1791 `(("python2-functools32" ,python2-functools32))))))
1792
1793(define-public python-schema
1794 (package
1795 (name "python-schema")
1796 (version "0.6.6")
1797 (source
1798 (origin
1799 (method url-fetch)
1800 (uri (pypi-uri "schema" version))
1801 (sha256
1802 (base32
1803 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
1804 (build-system python-build-system)
1805 (native-inputs
1806 `(("python-pytest" ,python-pytest)))
1807 (home-page "https://github.com/keleshev/schema")
1808 (synopsis "Simple data validation library")
1809 (description
1810 "@code{python-schema} is a library for validating Python data
1811structures, such as those obtained from config-files, forms, external
1812services or command-line parsing, converted from JSON/YAML (or
1813something else) to Python data-types.")
1814 (license license:psfl)))
1815
1816(define-public python2-schema
1817 (package-with-python2 python-schema))
1818
1819(define-public python-schema-0.5
1820 (package (inherit python-schema)
1821 (version "0.5.0")
1822 (source
1823 (origin
1824 (method url-fetch)
1825 (uri (pypi-uri "schema" version))
1826 (sha256
1827 (base32
1828 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
1829
1830(define-public python2-schema-0.5
1831 (package-with-python2 python-schema-0.5))
1832
1833(define-public python-kitchen
1834 (package
1835 (name "python-kitchen")
1836 (version "1.2.5")
1837 (source
1838 (origin
1839 (method url-fetch)
1840 (uri (pypi-uri "kitchen" version))
1841 (sha256
1842 (base32
1843 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
1844 (build-system python-build-system)
1845 (propagated-inputs
1846 `(("python-chardet" ,python-chardet)))
1847 (home-page "https://github.com/fedora-infra/kitchen")
1848 (synopsis "Python API for snippets")
1849 (description "@code{kitchen} module provides a python API for all sorts of
1850little useful snippets of code that everybody ends up writing for their projects
1851but never seem big enough to build an independent release. Use kitchen and stop
1852cutting and pasting that code over and over.")
1853 (license (list license:lgpl2.1+
1854 ;; subprocess.py, test_subprocess.py,
1855 ;; kitchen/pycompat25/defaultdict.py:
1856 license:psfl))))
1857
1858(define-public python2-kitchen
1859 (package-with-python2 python-kitchen))
1860
1861(define-public python-unidecode
1862 (package
1863 (name "python-unidecode")
1864 (version "1.0.23")
1865 (source (origin
1866 (method url-fetch)
1867 (uri (pypi-uri "Unidecode" version))
1868 (sha256
1869 (base32
1870 "1ysjbr3nqfqj97h8zyj3v9pya413vkv7a1mzml80w37xx15kb1cb"))))
1871 (build-system python-build-system)
1872 (home-page "https://pypi.python.org/pypi/Unidecode")
1873 (synopsis "ASCII transliterations of Unicode text")
1874 (description
1875 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
1876useful when integrating with legacy code that doesn't support Unicode, or for
1877ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
1878machine identifiers from human-readable Unicode strings that should still be
1879somewhat intelligible.")
1880 (license license:gpl2+)))
1881
1882(define-public python2-unidecode
1883 (package-with-python2 python-unidecode))
1884
1885(define-public python-pyjwt
1886 (package
1887 (name "python-pyjwt")
1888 (version "1.5.3")
1889 (source
1890 (origin
1891 (method url-fetch)
1892 (uri (pypi-uri "PyJWT" version))
1893 (sha256
1894 (base32
1895 "1rxsg14i33vm2i6lz0my628108c81k43v10n4h3p0gx62xdyf2sh"))
1896 (modules '((guix build utils)))
1897 (snippet
1898 '(begin
1899 (for-each delete-file-recursively
1900 (find-files "." "\\.pyc$"))
1901 #t))))
1902 (build-system python-build-system)
1903 (native-inputs
1904 `(("python-pytest" ,python-pytest)
1905 ("python-pytest-cov" ,python-pytest-cov)
1906 ("python-pytest-runner" ,python-pytest-runner)))
1907 (home-page "https://github.com/progrium/pyjwt")
1908 (synopsis "JSON Web Token implementation in Python")
1909 (description
1910 "PyJWT is a JSON Web Token implementation written in Python.")
1911 (license license:expat)))
1912
1913(define-public python2-pyjwt
1914 (package-with-python2 python-pyjwt))
1915
1916(define-public python-pykka
1917 (package
1918 (name "python-pykka")
1919 (version "1.2.1")
1920 (source
1921 (origin
1922 (method url-fetch)
1923 (uri (pypi-uri "Pykka" version))
1924 (sha256
1925 (base32
1926 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
1927 (build-system python-build-system)
1928 (native-inputs
1929 `(("python-mock" ,python-mock)
1930 ("python-nose" ,python-nose)
1931 ("python-gevent" ,python-gevent)
1932 ("python-eventlet" ,python-eventlet)))
1933 (home-page "https://www.pykka.org/")
1934 (synopsis "Pykka is a Python implementation of the actor model")
1935 (description
1936 "Pykka is a Python implementation of the actor model.
1937The actor model introduces some simple rules to control the sharing
1938of state and cooperation between execution units, which makes it
1939easier to build concurrent applications.")
1940 (license license:asl2.0)))
1941
1942(define-public python2-pykka
1943 (package-with-python2 python-pykka))
1944
8d22f7e3
VC
1945(define-public python-pymsgbox
1946 (package
1947 (name "python-pymsgbox")
1948 (version "1.0.6")
1949 (source
1950 (origin
1951 (method git-fetch)
1952 (uri (git-reference
1953 ;; LICENSE.txt is not present on pypi
1954 (url "https://github.com/asweigart/PyMsgBox")
1955 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
1956 (file-name (git-file-name name version))
1957 (sha256
1958 (base32
1959 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
1960 (arguments
1961 ;; Circular dependency to run tests:
1962 ;; Tests need pyautogui, which depends on pymsgbox.
1963 '(#:tests? #f))
1964 (build-system python-build-system)
1965 (home-page "https://github.com/asweigart/PyMsgBox")
1966 (synopsis "Python module for JavaScript-like message boxes")
1967 (description
1968 "PyMsgBox is a simple, cross-platform, pure Python module for
1969JavaScript-like message boxes. Types of dialog boxes include:
1970@enumerate
1971@item alert
1972@item confirm
1973@item prompt
1974@item password
1975@end enumerate
1976")
1977 (license license:bsd-3)))
1978
44d10b1f
RW
1979(define-public python-pympler
1980 (package
1981 (name "python-pympler")
1982 (home-page "https://pythonhosted.org/Pympler/")
ce1706b1 1983 (version "0.6")
44d10b1f
RW
1984 (source (origin
1985 (method url-fetch)
1986 (uri (pypi-uri "Pympler" version))
1987 (sha256
1988 (base32
ce1706b1 1989 "19qkpaw5icwhb4c0f6ijqfmhwhj34k2k6s4m4fsvhrxc9p5cwqn2"))))
44d10b1f
RW
1990 (build-system python-build-system)
1991 (arguments
1992 `(#:phases (modify-phases %standard-phases
1993 (delete 'check)
1994 (add-after 'install 'check
1995 (lambda* (#:key inputs outputs #:allow-other-keys)
1996 (add-installed-pythonpath inputs outputs)
1997 (invoke "python" "setup.py" "test"))))))
1998 (synopsis "Measure, monitor and analyze memory behavior")
1999 (description
2000 "Pympler is a development tool to measure, monitor and analyze
2001the memory behavior of Python objects in a running Python application.
2002
2003By pympling a Python application, detailed insight in the size and the
2004lifetime of Python objects can be obtained. Undesirable or unexpected
2005runtime behavior like memory bloat and other @samp{pymples} can easily
2006be identified.
2007
2008A web profiling frontend exposes process statistics, garbage
2009visualisation and class tracker statistics.")
2010 (license license:asl2.0)))
2011
2012(define-public python2-pympler
2013 (package-with-python2 python-pympler))
2014
2015(define-public python-itsdangerous
2016 (package
2017 (name "python-itsdangerous")
acfcf2ed 2018 (version "1.1.0")
44d10b1f
RW
2019 (source
2020 (origin
2021 (method url-fetch)
acfcf2ed 2022 (uri (pypi-uri "itsdangerous" version))
44d10b1f
RW
2023 (sha256
2024 (base32
acfcf2ed 2025 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
44d10b1f 2026 (build-system python-build-system)
acfcf2ed 2027 (home-page "https://palletsprojects.com/p/itsdangerous/")
44d10b1f
RW
2028 (synopsis "Python library for passing data to/from untrusted environments")
2029 (description
2030 "Itsdangerous provides various helpers to pass trusted data to untrusted
2031environments and back.")
2032 (license license:bsd-3)))
2033
2034(define-public python2-itsdangerous
2035 (package-with-python2 python-itsdangerous))
2036
2037(define-public python-pyyaml
2038 (package
2039 (name "python-pyyaml")
2040 (version "3.13")
2041 (source
2042 (origin
2043 (method url-fetch)
2044 (uri (pypi-uri "PyYAML" version))
2045 (sha256
2046 (base32
2047 "1gx603g484z46cb74j9rzr6sjlh2vndxayicvlyhxdz98lhhkwry"))))
2048 (build-system python-build-system)
2049 (inputs
2050 `(("libyaml" ,libyaml)))
2051 (home-page "http://pyyaml.org/wiki/PyYAML")
2052 (synopsis "YAML parser and emitter for Python")
2053 (description
2054 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2055complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2056API, and sensible error messages. PyYAML supports standard YAML tags and
2057provides Python-specific tags that allow to represent an arbitrary Python
2058object.")
2059 (license license:expat)))
2060
2061(define-public python2-pyyaml
2062 (package-with-python2 python-pyyaml))
2063
2064(define-public python-vine
2065 (package
2066 (name "python-vine")
2067 (version "1.1.4")
2068 (source
2069 (origin
2070 (method url-fetch)
2071 (uri (pypi-uri "vine" version))
2072 (sha256
2073 (base32
2074 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
2075 (build-system python-build-system)
2076 (native-inputs
2077 `(("python-pytest" ,python-pytest)
2078 ("python-case" ,python-case)))
2079 (home-page "https://github.com/celery/vine")
2080 (synopsis "Promises for Python")
2081 (description
2082 "@code{vine} provides a special implementation of promises in that it can
2083be used both for \"promise of a value\" and lazy evaluation. The biggest
2084upside for this is that everything in a promise can also be a promise,
2085e.g. filters, callbacks and errbacks can all be promises.")
2086 (license license:bsd-3)))
2087
2088(define-public python-virtualenv
2089 (package
2090 (name "python-virtualenv")
2782bd51 2091 (version "16.1.0")
44d10b1f
RW
2092 (source
2093 (origin
2094 (method url-fetch)
2095 (uri (pypi-uri "virtualenv" version))
2096 (sha256
2097 (base32
2782bd51 2098 "0242cg3hdq3qdvx5flyrki8lpwlgwf5k45c21ks5049fv7ygm6gq"))))
44d10b1f
RW
2099 (build-system python-build-system)
2100 (arguments
2101 `(#:phases
2102 (modify-phases %standard-phases
2782bd51 2103 (add-before 'check 'disable-failing-test
44d10b1f
RW
2104 (lambda _
2105 ;; Disable failing test. See upstream bug report
2106 ;; https://github.com/pypa/virtualenv/issues/957
2107 (substitute* "tests/test_virtualenv.py"
2108 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2782bd51 2109 #t)))))
44d10b1f
RW
2110 (native-inputs
2111 `(("python-mock" ,python-mock)
2112 ("python-pytest" ,python-pytest)))
2113 (home-page "https://virtualenv.pypa.io/")
2114 (synopsis "Virtual Python environment builder")
2115 (description
2116 "Virtualenv is a tool to create isolated Python environments.")
2117 (license license:expat)))
2118
2119(define-public python2-virtualenv
2120 (package-with-python2 python-virtualenv))
2121
2122(define-public python-markupsafe
2123 (package
2124 (name "python-markupsafe")
2125 (version "1.0")
2126 (source
2127 (origin
2128 (method url-fetch)
5182927c 2129 (uri (pypi-uri "MarkupSafe" version))
44d10b1f
RW
2130 (sha256
2131 (base32
2132 "0rdn1s8x9ni7ss8rfiacj7x1085lx8mh2zdwqslnw8xc3l4nkgm6"))))
2133 (build-system python-build-system)
2134 (home-page "https://github.com/mitsuhiko/markupsafe")
2135 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2136 (description
2137 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2138for Python.")
2139 (license license:bsd-3)))
2140
2141(define-public python2-markupsafe
2142 (package-with-python2 python-markupsafe))
2143
2144(define-public python-jinja2
2145 (package
2146 (name "python-jinja2")
2147 (version "2.10")
2148 (source
2149 (origin
2150 (method url-fetch)
2151 (uri (pypi-uri "Jinja2" version))
2152 (sha256
2153 (base32
2154 "190l36hfw3wb2n3n68yacjabxyb1pnxwn7vjx96cmjj002xy2jzq"))))
2155 (build-system python-build-system)
2156 (propagated-inputs
2157 `(("python-markupsafe" ,python-markupsafe)))
2158 (home-page "http://jinja.pocoo.org/")
2159 (synopsis "Python template engine")
2160 (description
2161 "Jinja2 is a small but fast and easy to use stand-alone template engine
2162written in pure Python.")
2163 (license license:bsd-3)))
2164
2165(define-public python2-jinja2
2166 (package-with-python2 python-jinja2))
2167
2168(define-public python-pystache
2169 (package
2170 (name "python-pystache")
2171 (version "0.5.4")
2172 (source (origin
2173 (method url-fetch)
2174 (uri (pypi-uri "pystache" version))
2175 (sha256
2176 (base32
2177 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2178 (build-system python-build-system)
2179 (arguments
2180 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2181 (home-page "http://defunkt.io/pystache/")
2182 (synopsis "Python logic-less template engine")
2183 (description
2184 "Pystache is a Python implementation of the framework agnostic,
2185logic-free templating system Mustache.")
2186 (license license:expat)
2187 (properties `((python2-variant . ,(delay python2-pystache))))))
2188
2189(define-public python2-pystache
2190 (package (inherit (package-with-python2
2191 (strip-python2-variant python-pystache)))
2192 (arguments
2193 `(#:python ,python-2
2194 #:phases
2195 (modify-phases %standard-phases
2196 (replace 'check
2197 (lambda _
dfafc29b 2198 (invoke "python" "test_pystache.py"))))))))
44d10b1f
RW
2199
2200(define-public python-joblib
2201 (package
2202 (name "python-joblib")
2203 (version "0.13.0")
2204 (source (origin
2205 (method url-fetch)
2206 (uri (pypi-uri "joblib" version))
2207 (sha256
2208 (base32
2209 "0612nazad8dxmn3xghfrmjax6456l4xy6hn9cngs7vydi14ds7v5"))))
2210 (build-system python-build-system)
2211 (arguments
2212 `(#:phases
2213 (modify-phases %standard-phases
2214 (replace 'check
2215 (lambda _ (invoke "pytest" "-v" "joblib"))))))
2216 (native-inputs
2217 `(("python-pytest" ,python-pytest)))
2218 (home-page "https://joblib.readthedocs.io/")
2219 (synopsis "Using Python functions as pipeline jobs")
2220 (description
2221 "Joblib is a set of tools to provide lightweight pipelining in Python.
2222In particular, joblib offers: transparent disk-caching of the output values
2223and lazy re-evaluation (memoize pattern), easy simple parallel computing
2224logging and tracing of the execution.")
2225 (license license:bsd-3)))
2226
2227(define-public python2-joblib
2228 (package-with-python2 python-joblib))
2229
a3363341
VC
2230(define-public python-daemon
2231 (package
2232 (name "python-daemon")
2233 (version "2.2.3")
2234 (source
2235 (origin
2236 (method url-fetch)
2237 (uri (pypi-uri "python-daemon" version))
2238 (sha256
2239 (base32
2240 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
2241 (build-system python-build-system)
2242 (arguments
2243 `(#:phases
2244 (modify-phases %standard-phases
2245 (add-before 'check 'disable-tests
2246 (lambda _
2247 ;; FIXME: Determine why test fails
2248 (substitute* "test/test_daemon.py"
2249 (("test_detaches_process_context")
2250 "skip_test_detaches_process_context"))
2251 #t)))))
2252 (propagated-inputs
2253 `(("python-lockfile" ,python-lockfile)))
2254 (native-inputs
2255 `(("python-unittest2" ,python-unittest2)
2256 ("python-testtools" ,python-testtools)
2257 ("python-testscenarios" ,python-testscenarios)
2258 ("python-mock" ,python-mock)
2259 ("python-docutils" ,python-docutils)))
2260 (home-page "https://pagure.io/python-daemon/")
2261 (synopsis "Python library for making a Unix daemon process")
2262 (description "Python-daemon is a library that assists a Python program to
2263turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
2264
2265This library provides a @code{DaemonContext} class that manages the following
2266important tasks for becoming a daemon process:
2267@enumerate
2268@item Detach the process into its own process group.
2269@item Set process environment appropriate for running inside a chroot.
2270@item Renounce suid and sgid privileges.
2271@item Close all open file descriptors.
2272@item Change the working directory, uid, gid, and umask.
2273@item Set appropriate signal handlers.
2274@item Open new file descriptors for stdin, stdout, and stderr.
2275@item Manage a specified PID lock file.
2276@item Register cleanup functions for at-exit processing.
2277@end enumerate")
2278 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
2279 (license (list license:asl2.0 license:gpl3+))))
2280
44d10b1f
RW
2281(define-public python-docutils
2282 (package
2283 (name "python-docutils")
2284 (version "0.14")
2285 (source
2286 (origin
2287 (method url-fetch)
2288 (uri (pypi-uri "docutils" version))
2289 (sha256
2290 (base32
2291 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
2292 (build-system python-build-system)
2293 (arguments
2294 '(#:tests? #f)) ; no setup.py test command
2295 (home-page "http://docutils.sourceforge.net/")
2296 (synopsis "Python Documentation Utilities")
2297 (description
2298 "Docutils is a modular system for processing documentation into useful
2299formats, such as HTML, XML, and LaTeX. For input Docutils supports
2300reStructuredText.")
2301 ;; Most of the source code is public domain, but some source files are
2302 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2303 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2304
2305(define-public python2-docutils
2306 (package-with-python2 python-docutils))
2307
2308(define-public python-pygments
2309 (package
2310 (name "python-pygments")
2311 (version "2.2.0")
2312 (source
2313 (origin
2314 (method url-fetch)
2315 (uri (pypi-uri "Pygments" version))
2316 (sha256
2317 (base32
2318 "1k78qdvir1yb1c634nkv6rbga8wv4289xarghmsbbvzhvr311bnv"))))
2319 (build-system python-build-system)
2320 (arguments
2321 ;; FIXME: Tests require sphinx, which depends on this.
2322 '(#:tests? #f))
2323 (home-page "http://pygments.org/")
2324 (synopsis "Syntax highlighting")
2325 (description
2326 "Pygments is a syntax highlighting package written in Python.")
2327 (license license:bsd-2)))
2328
2329(define-public python2-pygments
2330 (package-with-python2 python-pygments))
2331
2332(define-public python-sphinxcontrib-websupport
2333 (package
2334 (name "python-sphinxcontrib-websupport")
2335 (version "1.1.0")
2336 (source (origin
2337 (method url-fetch)
2338 (uri (pypi-uri "sphinxcontrib-websupport" version))
2339 (sha256
2340 (base32
2341 "1ff3ix76xi1y6m99qxhaq5161ix9swwzydilvdya07mgbcvpzr4x"))))
2342 (build-system python-build-system)
2343 (arguments
2344 ;; FIXME: Tests depend on Sphinx, which depends on this.
2345 `(#:tests? #f))
2346 (home-page "http://sphinx-doc.org/")
2347 (synopsis "Sphinx API for web applications")
2348 (description "This package provides a Python API to easily integrate
2349Sphinx documentation into your web application. It provides tools to
2350integrate Sphinx documents in web templates and to handle searches.")
2351 (license license:bsd-3)))
2352
2353(define-public python2-sphinxcontrib-websupport
2354 (package-with-python2 python-sphinxcontrib-websupport))
2355
2356(define-public python-sphinx
2357 (package
2358 (name "python-sphinx")
2359 (version "1.7.7")
2360 (source
2361 (origin
2362 (method url-fetch)
2363 (uri (pypi-uri "Sphinx" version))
2364 (sha256
2365 (base32
2366 "0pkkbfj7cl157q550gcs45am5y78ps0h7q6455d64s1zmw01jlvi"))))
2367 (build-system python-build-system)
2368 (arguments
2369 `(#:phases
2370 (modify-phases %standard-phases
2371 (replace 'check
2372 (lambda _
2373 ;; Requires Internet access.
2374 (delete-file "tests/test_build_linkcheck.py")
2375 (substitute* "tests/test_build_latex.py"
2376 (("@pytest.mark.sphinx\\('latex', testroot='images'\\)")
2377 "@pytest.mark.skip()"))
2378 (when (which "python")
2379 ;; XXX: These tests are broken when using Python2:
2380 ;; <https://github.com/sphinx-doc/sphinx/issues/4710>.
2381 (delete-file "tests/test_api_translator.py")
2382 (delete-file "tests/test_setup_command.py"))
2383 (invoke "make" "test"))))))
2384 (propagated-inputs
2385 `(("python-imagesize" ,python-imagesize)
2386 ("python-sphinx-alabaster-theme"
2387 ,python-sphinx-alabaster-theme)
2388 ("python-babel" ,python-babel)
2389 ("python-snowballstemmer" ,python-snowballstemmer)
2390 ("python-docutils" ,python-docutils)
2391 ("python-jinja2" ,python-jinja2)
2392 ("python-packaging" ,python-packaging)
2393 ("python-pygments" ,python-pygments)
2394 ("python-requests" ,python-requests)
2395 ("python-six" ,python-six)
2396 ("python-sphinxcontrib-websupport" ,python-sphinxcontrib-websupport)))
2397 (native-inputs
2398 `(("graphviz" ,graphviz)
2399 ("imagemagick" ,imagemagick) ;for "convert"
2400 ("python-html5lib" ,python-html5lib)
2401 ("python-mock" ,python-mock)
2402 ("python-nose" ,python-nose)
2403 ("python-pytest" ,python-pytest)))
2404 (home-page "http://sphinx-doc.org/")
2405 (synopsis "Python documentation generator")
2406 (description "Sphinx is a tool that makes it easy to create documentation
2407for Python projects or other documents consisting of multiple reStructuredText
2408sources.")
2409 (license license:bsd-3)
2410 (properties `((python2-variant . ,(delay python2-sphinx))))))
2411
2412(define-public python2-sphinx
2413 (let ((base (package-with-python2 (strip-python2-variant python-sphinx))))
2414 (package
2415 (inherit base)
2416 (native-inputs `(("python2-mock" ,python2-mock)
2417 ("python2-enum34" ,python2-enum34)
2418 ,@(package-native-inputs base)))
2419 (propagated-inputs `(("python2-pytz" ,python2-pytz)
2420 ("python2-typing" ,python2-typing)
2421 ,@(package-propagated-inputs base))))))
2422
2423(define-public python-sphinx-gallery
2424 (package
2425 (name "python-sphinx-gallery")
2426 (version "0.1.13")
2427 (source (origin
2428 (method url-fetch)
2429 (uri (string-append "https://github.com/sphinx-gallery/sphinx-gallery"
2430 "/archive/v" version ".tar.gz"))
2431 (file-name (string-append name "-" version ".tar.gz"))
2432 (sha256
2433 (base32
2434 "03fs99mcb1r7qp0xixqv07vcz98sk21yq19ffdysi0infdcpzfkd"))))
2435 (build-system python-build-system)
2436 (arguments
2437 ;; FIXME: Tests attempt to download <https://docs.python.org/3/objects.inv>,
2438 ;; <https://docs.scipy.org/doc/numpy/objects.inv>, and
2439 ;; <https://matplotlib.org/objects.inv>.
2440 `(#:tests? #f))
2441 (native-inputs
2442 `(("python-pytest-runner" ,python-pytest-runner)))
2443 (home-page "https://sphinx-gallery.github.io/")
2444 (synopsis "Generate an examples gallery automatically")
2445 (description
2446 "@code{sphinx_gallery} is a Sphinx extension that builds an HTML version
2447from any set of Python scripts and puts it into an examples gallery.")
2448 (license license:bsd-3)))
2449
2450(define-public python2-sphinx-gallery
2451 (package-with-python2 python-sphinx-gallery))
2452
2453(define-public python-sphinx-rtd-theme
2454 (package
2455 (name "python-sphinx-rtd-theme")
2456 (version "0.2.4")
2457 (source
2458 (origin
2459 (method url-fetch)
2460 (uri (pypi-uri "sphinx_rtd_theme" version))
2461 (sha256
2462 (base32
2463 "05rlhjzdyapr2w74jjs7mrm8hi69qskcr5vya9f9drpsys7lpxrd"))))
2464 (build-system python-build-system)
2465 (arguments '(#:tests? #f)) ; No tests.
2466 (propagated-inputs
2467 `(("python-sphinx" ,python-sphinx)))
2468 (home-page "https://github.com/snide/sphinx_rtd_theme/")
2469 (synopsis "ReadTheDocs.org theme for Sphinx")
2470 (description "A theme for Sphinx used by ReadTheDocs.org.")
2471 (license license:expat)))
2472
2473(define-public python2-sphinx-rtd-theme
2474 (package-with-python2 python-sphinx-rtd-theme))
2475
2476(define-public python-guzzle-sphinx-theme
2477 (package
2478 (name "python-guzzle-sphinx-theme")
2479 (version "0.7.11")
2480 (source
2481 (origin
2482 (method url-fetch)
2483 (uri (pypi-uri "guzzle_sphinx_theme" version))
2484 (sha256
2485 (base32
2486 "1rnkzrrsbnifn3vsb4pfaia3nlvgvw6ndpxp7lzjrh23qcwid34v"))))
2487 (build-system python-build-system)
2488 (propagated-inputs
2489 `(("python-sphinx" ,python-sphinx)))
2490 (home-page "https://github.com/guzzle/guzzle_sphinx_theme")
2491 (synopsis "Sphinx theme used by Guzzle")
2492 (description "This package provides guzzle_sphinx_theme, a theme for the
2493Sphinx documentation system, used by @uref{http://docs.guzzlephp.org, Guzzle}
2494and several other projects.")
2495 (license license:expat)))
2496
2497(define-public python2-guzzle-sphinx-theme
2498 (package-with-python2 python-guzzle-sphinx-theme))
2499
2500(define-public python-rst.linker
2501 (package
2502 (name "python-rst.linker")
2503 (version "1.10")
2504 (source
2505 (origin
2506 (method url-fetch)
2507 (uri (pypi-uri "rst.linker" version))
2508 (sha256
2509 (base32
2510 "0iqaacp7pj1s8avs4kc0qg0r7dscywaq37y6l9j14glqdikk0wdj"))))
2511 (build-system python-build-system)
2512 (propagated-inputs
2513 `(("python-dateutil" ,python-dateutil)
2514 ("python-six" ,python-six)))
2515 (native-inputs
2516 `(("python-setuptools-scm" ,python-setuptools-scm)))
2517 ;; Test would require path.py, which would introduce a cyclic dependence.
2518 (arguments `(#:tests? #f))
2519 ;; Note: As of version 1.7 the documentation is not worth building.
2520 (home-page "https://github.com/jaraco/rst.linker")
2521 (synopsis "Sphinx plugin to add links and timestamps")
2522 (description "rst.linker allows to automatically replace text by a
2523reStructuredText external reference or timestamps. It's primary purpose is to
2524augment the changelog, but it can be used for other documents, too.")
2525 (license license:expat)))
2526
2527(define-public python2-rst.linker
2528 (package-with-python2 python-rst.linker))
2529
2530(define-public python-feedgenerator
2531 (package
2532 (name "python-feedgenerator")
2533 (version "1.9")
2534 (source
2535 (origin
2536 (method url-fetch)
2537 (uri (pypi-uri "feedgenerator" version))
2538 (sha256
2539 (base32
2540 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
2541 (modules '((guix build utils)))
2542 (snippet
2543 '(begin
2544 ;; Remove pre-compiled .pyc files from source.
2545 (for-each delete-file-recursively
2546 (find-files "." "__pycache__" #:directories? #t))
2547 (for-each delete-file (find-files "." "\\.pyc$"))
2548 #t))))
2549 (build-system python-build-system)
2550 (propagated-inputs
2551 `(("python-pytz" ,python-pytz)
2552 ("python-six" ,python-six)))
2553 (home-page "https://github.com/getpelican/feedgenerator")
2554 (synopsis
2555 "Standalone version of Django's Atom/RSS feed generator")
2556 (description
2557 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2558which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
2559 (license license:bsd-3)))
2560
2561(define-public python2-feedgenerator
2562 (package-with-python2 python-feedgenerator))
2563
2564(define-public python-toml
2565 (package
2566 (name "python-toml")
2567 (version "0.9.4")
2568 (source
2569 (origin
2570 (method url-fetch)
2571 (uri (pypi-uri "toml" version))
2572 (sha256
2573 (base32
2574 "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf"))))
2575 (build-system python-build-system)
2576 (arguments
2577 `(#:tests? #f)) ;no tests suite in release
2578 (home-page "https://github.com/uiri/toml")
2579 (synopsis "Library for TOML")
2580 (description
2581 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
2582Language (TOML) configuration files.")
2583 (license license:expat)))
2584
346c8752
BG
2585(define-public python-jsonrpc-server
2586 (package
2587 (name "python-jsonrpc-server")
2588 (version "0.1.2")
2589 (source
2590 (origin
2591 (method url-fetch)
2592 (uri (pypi-uri "python-jsonrpc-server" version))
2593 (sha256
2594 (base32
2595 "0m4ykpcdy52x37n1ikysp07j7p8ialcdvvvsrjp3545sn7iiid09"))))
2596 (build-system python-build-system)
2597 (propagated-inputs
2598 `(("python-future" ,python-future)
2599 ("python-mock" ,python-mock)
2600 ("python-pytest" ,python-pytest)))
2601 (home-page
2602 "https://github.com/palantir/python-jsonrpc-server")
2603 (synopsis "JSON RPC 2.0 server library")
2604 (description
2605 "This packages provides a JSON RPC 2.0 server library for Python.")
2606 (license license:expat)))
2607
56f4ad47
BG
2608(define-public python-pydocstyle
2609 (package
2610 (name "python-pydocstyle")
2611 (version "3.0.0")
2612 (source
2613 (origin
2614 (method url-fetch)
2615 (uri (pypi-uri "pydocstyle" version))
2616 (sha256
2617 (base32
2618 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
2619 (build-system python-build-system)
2620 (propagated-inputs
2621 `(("python-six" ,python-six)
2622 ("python-snowballstemmer" ,python-snowballstemmer)))
2623 (home-page
2624 "https://github.com/PyCQA/pydocstyle/")
2625 (synopsis "Python docstring style checker")
2626 (description
2627 "This package provides a style checker for the Python Language
2628Server (PLS).")
2629 (license license:expat)))
2630
be4d840c
BG
2631(define-public python-language-server
2632 (package
2633 (name "python-language-server")
298d878d 2634 (version "0.23.2")
be4d840c
BG
2635 (source
2636 (origin
2637 (method url-fetch)
2638 (uri (pypi-uri "python-language-server" version))
2639 (sha256
2640 (base32
298d878d 2641 "1h83x5widj9p630ha9yv39cpp3djxppll3iww9nc8i3hdmyrbnnh"))))
be4d840c
BG
2642 (build-system python-build-system)
2643 (propagated-inputs
2644 `(("python-pluggy" ,python-pluggy)
2645 ("python-jsonrpc-server" ,python-jsonrpc-server)
2646 ("python-jedi" ,python-jedi)
2647 ("python-yapf" ,python-yapf)
2648 ("python-pyflakes" ,python-pyflakes)
2649 ("python-pydocstyle" ,python-pydocstyle)
2650 ("python-pycodestyle" ,python-pycodestyle)
2651 ("python-mccabe" ,python-mccabe)
2652 ("python-rope" ,python-rope)
2653 ("python-autopep8" ,python-autopep8)))
2654 (home-page "https://github.com/palantir/python-language-server")
2655 (synopsis "Python implementation of the Language Server Protocol")
2656 (description
2657 "The Python Language Server (pyls) is an implementation of the Python 3
2658language specification for the Language Server Protocol (LSP). This tool is
2659used in text editing environments to provide a complete and integrated
2660feature-set for programming Python effectively.")
2661 (license license:expat)))
2662
44d10b1f
RW
2663(define-public python-black
2664 (package
2665 (name "python-black")
2666 (version "18.6b4")
2667 (source
2668 (origin
2669 (method url-fetch)
2670 (uri (pypi-uri "black" version))
2671 (sha256
2672 (base32
2673 "0i4sfqgz6w15vd50kbhi7g7rifgqlf8yfr8y78rypd56q64qn592"))))
2674 (build-system python-build-system)
2675 (arguments
2676 `(#:phases
2677 (modify-phases %standard-phases
2678 (add-after 'patch-source-shebangs 'patch-extra-shebangs
2679 (lambda _
2680 (let ((python3 (which "python3")))
2681 (substitute* '("tests/data/fmtonoff.py"
2682 "tests/data/string_prefixes.py"
2683 "tests/data/function.py")
2684 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
2685 (string-append "#!" python3 (if (string? minor-version)
2686 minor-version
2687 ""))))))))))
2688 (propagated-inputs
2689 `(("python-click" ,python-click)
2690 ("python-attrs" ,python-attrs)
2691 ("python-appdirs" ,python-appdirs)
2692 ("python-toml" ,python-toml)))
2693 (home-page "https://github.com/ambv/black")
2694 (synopsis "The uncompromising code formatter")
2695 (description "Black is the uncompromising Python code formatter.")
2696 (license license:expat)))
2697
2698(define-public python-blinker
2699 (package
2700 (name "python-blinker")
2701 (version "1.4")
2702 (source
2703 (origin
2704 (method url-fetch)
2705 (uri (pypi-uri "blinker" version))
2706 (sha256
2707 (base32
2708 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
2709 (build-system python-build-system)
2710 (home-page "http://pythonhosted.org/blinker/")
2711 (synopsis "Fast, simple object-to-object and broadcast signaling")
2712 (description
2713 "Blinker provides a fast dispatching system that allows any number of
2714interested parties to subscribe to events, or \"signals\".")
2715 (license license:expat)))
2716
2717(define-public python2-blinker
2718 (package-with-python2 python-blinker))
2719
2720(define-public pelican
2721 (package
2722 (name "pelican")
aa71b690 2723 (version "4.0.1")
44d10b1f
RW
2724 (source
2725 (origin
2726 (method url-fetch)
2727 (uri (pypi-uri "pelican" version))
2728 (sha256
2729 (base32
aa71b690 2730 "05yda7n6r0ll18fpdjzkzyr0ls8hbb86fnjyb33k9jvv5avah2lr"))))
44d10b1f
RW
2731 (build-system python-build-system)
2732 (propagated-inputs
2733 `(("python-feedgenerator" ,python-feedgenerator)
2734 ("python-jinja2" ,python-jinja2)
2735 ("python-pygments" ,python-pygments)
2736 ("python-docutils" ,python-docutils)
2737 ("python-pytz" ,python-pytz)
2738 ("python-blinker" ,python-blinker)
2739 ("python-unidecode" ,python-unidecode)
2740 ("python-six" ,python-six)
2741 ("python-dateutil" ,python-dateutil)
2742 ("python-markdown" ,python-markdown)))
2743 (home-page "https://getpelican.com/")
2744 (arguments
2745 `(;; XXX Requires a lot more packages to do unit tests :P
2746 #:tests? #f
2747 #:phases (modify-phases %standard-phases
2748 (add-before
2749 'install 'adjust-requires
2750 ;; Since feedgenerator is installed from git, it doesn't
2751 ;; conform to the version requirements.
2752 ;;
2753 ;; We *do have* "feedgenerator >= 1.6", but strip off the
2754 ;; version requirement so setuptools doesn't get confused.
2755 (lambda _
2756 (substitute* "setup.py"
2757 (("['\"]feedgenerator.*?['\"]")
2758 "'feedgenerator'")))))))
2759 (synopsis "Python-based static site publishing system")
2760 (description
2761 "Pelican is a tool to generate a static blog from reStructuredText,
2762Markdown input files, and more. Pelican uses Jinja2 for templating
2763and is very extensible.")
2764 (license license:agpl3+)))
2765
2766(define-public python-scikit-image
2767 (package
2768 (name "python-scikit-image")
9ff04084 2769 (version "0.14.2")
44d10b1f
RW
2770 (source
2771 (origin
2772 (method url-fetch)
2773 (uri (pypi-uri "scikit-image" version))
2774 (sha256
9ff04084 2775 (base32 "07qchljkyxvg5nrm12fvszi7pmjk4m01qp0w0z8syxzxxs20pz8s"))))
44d10b1f
RW
2776 (build-system python-build-system)
2777 (arguments
2778 ;; TODO: Some tests require running X11 server. Disable them?
2779 '(#:tests? #f))
2780 ;; See DEPENDS.txt for the list of build and run time requiremnts
2781 (propagated-inputs
2782 `(("python-cloudpickle" ,python-cloudpickle)
2783 ("python-dask" ,python-dask)
2784 ("python-matplotlib" ,python-matplotlib)
2785 ("python-networkx" ,python-networkx)
2786 ("python-numpy" ,python-numpy)
2787 ("python-pillow" ,python-pillow)
2788 ("python-pywavelets" ,python-pywavelets)
2789 ("python-scipy" ,python-scipy)
2790 ("python-six" ,python-six)))
2791 (native-inputs
2792 `(("python-cython" ,python-cython)))
2793 (home-page "http://scikit-image.org/")
2794 (synopsis "Image processing in Python")
2795 (description
2796 "Scikit-image is a collection of algorithms for image processing.")
2797 (license license:bsd-3)))
2798
2799(define-public python2-scikit-image
2800 (package-with-python2 python-scikit-image))
2801
2802(define-public python-cython
2803 (package
2804 (name "python-cython")
fa8ffaa0 2805 (version "0.29.5")
44d10b1f
RW
2806 (source
2807 (origin
2808 (method url-fetch)
2809 (uri (pypi-uri "Cython" version))
2810 (sha256
2811 (base32
fa8ffaa0 2812 "1wfb68g115gmf3mv23w0hh972b0ll85gpb92ci28x6h997br0llx"))))
44d10b1f
RW
2813 (build-system python-build-system)
2814 ;; we need the full python package and not just the python-wrapper
2815 ;; because we need libpython3.3m.so
2816 (inputs
2817 `(("python" ,python)))
2818 (arguments
2819 `(#:phases
2820 (modify-phases %standard-phases
2821 (add-before 'check 'set-HOME
2822 ;; some tests require access to "$HOME/.cython"
2823 (lambda _ (setenv "HOME" "/tmp") #t))
2824
2825 ;; FIXME: These tests started failing on armhf after the 0.28 update
2826 ;; (commit c69d11c5930), both with an error such as this:
2827 ;; compiling (cpp) and running dictcomp ...
2828 ;; === C/C++ compiler error output: ===
2829 ;; ‘
2830 ;; dictcomp.cpp:5221: confused by earlier errors, bailing out
2831 ;; See <https://hydra.gnu.org/build/2948724> for logs.
2832 ,@(if (target-arm32?)
2833 `((add-before 'check 'disable-failing-tests
2834 (lambda _
2835 (let ((disabled-tests (open-file "tests/bugs.txt" "a")))
2836 (for-each (lambda (test)
2837 (format disabled-tests "~a\n" test))
2838 '("memslice" "dictcomp"))
2839 (close-port disabled-tests)))))
2840 '())
2841
2842 (replace 'check
2843 (lambda _
2844 ;; The "with_outer_raising" test fails with Python 3.7. See
2845 ;; https://github.com/cython/cython/issues/2454
2846 (delete-file "tests/run/generators_py.py")
2847 (invoke "python" "runtests.py" "-vv"))))))
2848 (home-page "http://cython.org/")
2849 (synopsis "C extensions for Python")
2850 (description "Cython is an optimising static compiler for both the Python
2851programming language and the extended Cython programming language. It makes
2852writing C extensions for Python as easy as Python itself.")
2853 (license license:asl2.0)
2854 (properties `((python2-variant . ,(delay python2-cython))))))
2855
2856(define-public python2-cython
2857 (package (inherit (package-with-python2
2858 (strip-python2-variant python-cython)))
2859 (name "python2-cython")
2860 (inputs
2861 `(("python-2" ,python-2))))) ; this is not automatically changed
2862
2863;; The RPython toolchain currently does not support Python 3.
2864(define-public python2-rpython
2865 (package
2866 (name "python2-rpython")
2867 (version "0.2.1")
2868 (source
2869 (origin
2870 (method url-fetch)
2871 (uri (pypi-uri "rpython" version))
2872 (sha256
2873 (base32
2874 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
2875 (build-system python-build-system)
2876 (arguments `(#:python ,python-2))
2877 (native-inputs
2878 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
2879 (home-page "https://rpython.readthedocs.org")
2880 (synopsis "Framework for implementing interpreters and virtual machines")
2881 (description "RPython is a translation and support framework for
2882producing implementations of dynamic languages, emphasizing a clean separation
2883between language specification and implementation aspects.")
2884 (license license:expat)))
2885
2886;; NOTE: when upgrading numpy please make sure that python-pandas and
2887;; python-scipy still build, as these three packages are often used together.
2888(define-public python-numpy
2889 (package
2890 (name "python-numpy")
2891 (version "1.15.4")
2892 (source
2893 (origin
2894 (method url-fetch)
2895 (uri (string-append
2896 "https://github.com/numpy/numpy/releases/download/v"
2897 version "/numpy-" version ".tar.gz"))
2898 (sha256
2899 (base32
2900 "102vcl2qq4pjbm7a3d67vkkvn4466ngia1d8wi5avqwqh8j0jvkn"))))
2901 (build-system python-build-system)
2902 (inputs
2903 `(("openblas" ,openblas)
2904 ("lapack" ,lapack)))
2905 (native-inputs
2906 `(("python-cython" ,python-cython)
2907 ("python-pytest" ,python-pytest)
2908 ("gfortran" ,gfortran)))
2909 (arguments
2910 `(#:phases
2911 (modify-phases %standard-phases
2912 (add-before 'build 'configure-blas-lapack
2913 (lambda* (#:key inputs #:allow-other-keys)
2914 (call-with-output-file "site.cfg"
2915 (lambda (port)
2916 (format port
2917 "[openblas]
2918libraries = openblas
2919library_dirs = ~a/lib
2920include_dirs = ~a/include
2921
2922# backslash-n to make emacs happy
2923\n[lapack]
2924lapack_libs = lapack
2925library_dirs = ~a/lib
2926include_dirs = ~a/include
2927"
2928 (assoc-ref inputs "openblas")
2929 (assoc-ref inputs "openblas")
2930 (assoc-ref inputs "lapack")
2931 (assoc-ref inputs "lapack"))))
2932 #t))
2933 (add-before 'build 'fix-executable-paths
2934 (lambda* (#:key inputs #:allow-other-keys)
2935 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
2936 ;; instead of /bin/sh.
2937 (substitute* "numpy/distutils/exec_command.py"
2938 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
2939 (string-append match-start (assoc-ref inputs "bash") match-end)))
2940 ;; Use "gcc" executable, not "cc".
2941 (substitute* "numpy/distutils/system_info.py"
2942 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
2943 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
2944 #t))
2945 ;; Tests can only be run after the library has been installed and not
2946 ;; within the source directory.
2947 (delete 'check)
2948 (add-after 'install 'check
2949 (lambda* (#:key outputs inputs #:allow-other-keys)
2950 ;; Make installed package available for running the tests
2951 (add-installed-pythonpath inputs outputs)
2952 ;; Make sure "f2py" etc is found.
2953 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
2954 ":" (getenv "PATH")))
2955 (with-directory-excursion "/tmp"
2956 (invoke "python" "-c"
2957 "import numpy; numpy.test(verbose=2)")))))))
2958 (home-page "http://www.numpy.org/")
2959 (synopsis "Fundamental package for scientific computing with Python")
2960 (description "NumPy is the fundamental package for scientific computing
2961with Python. It contains among other things: a powerful N-dimensional array
2962object, sophisticated (broadcasting) functions, tools for integrating C/C++
2963and Fortran code, useful linear algebra, Fourier transform, and random number
2964capabilities.")
2965 (license license:bsd-3)))
2966
2967(define-public python2-numpy
2968 (package-with-python2 python-numpy))
2969
2970;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
2971;; interest only for legacy code going back to NumPy's predecessor
2972;; Numeric.
2973(define-public python2-numpy-1.8
2974 (package (inherit python2-numpy)
2975 (version "1.8.2")
2976 (source
2977 (origin
2978 (method url-fetch)
2979 (uri (string-append
2980 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
2981 (file-name (string-append "python2-numpy-" version ".tar.gz"))
2982 (sha256
2983 (base32
2984 "0sc20gz1b17xnyrkp5frca3ql5qfalpv916hfg2kqxpwr6jg0f1g"))))
2985 (arguments
2986 (substitute-keyword-arguments (package-arguments python2-numpy)
2987 ((#:phases phases)
2988 `(modify-phases ,phases
2989 (replace 'configure-blas-lapack
2990 (lambda* (#:key inputs #:allow-other-keys)
2991 (call-with-output-file "site.cfg"
2992 (lambda (port)
2993 (format port
2994 "[openblas]
2995libraries = openblas,lapack
2996library_dirs = ~a/lib:~a/lib
2997include_dirs = ~a/include:~a/include
2998"
2999 (assoc-ref inputs "openblas")
3000 (assoc-ref inputs "lapack")
3001 (assoc-ref inputs "openblas")
3002 (assoc-ref inputs "lapack"))))
3003 #t))))))
3004 (native-inputs
3005 `(("python2-nose" ,python2-nose)))
3006 (description "NumPy is the fundamental package for scientific computing
3007with Python. It contains among other things: a powerful N-dimensional array
3008object, sophisticated (broadcasting) functions, tools for integrating C/C++
3009and Fortran code, useful linear algebra, Fourier transform, and random number
3010capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
3011that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
3012Numeric.")
3013 (license license:bsd-3)))
3014
3015(define-public python-munch
3016 (package
3017 (name "python-munch")
3018 (version "2.0.4")
3019 (source
3020 (origin
3021 (method url-fetch)
3022 (uri (pypi-uri "munch" version))
3023 (sha256
3024 (base32
3025 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3026 (build-system python-build-system)
3027 (home-page "https://github.com/Infinidat/munch")
3028 (synopsis "Dot-accessible dictionary")
3029 (description "Munch is a dot-accessible dictionary similar to JavaScript
3030objects.")
3031 (license license:expat)))
3032
3033(define-public python2-munch
3034 (package-with-python2 python-munch))
3035
3036(define-public python-colormath
3037 (package
3038 (name "python-colormath")
3039 (version "3.0.0")
3040 (source
3041 (origin
3042 (method url-fetch)
3043 (uri (pypi-uri "colormath" version))
3044 (sha256
3045 (base32
3046 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
3047 (build-system python-build-system)
3048 (propagated-inputs
3049 `(("python-networkx" ,python-networkx)
3050 ("python-numpy" ,python-numpy)))
3051 (home-page "https://github.com/gtaylor/python-colormath")
3052 (synopsis "Color math and conversion library")
3053 (description
3054 "This is a Python library for color math and conversions.")
3055 (license license:bsd-3)))
3056
3057(define-public python2-colormath
3058 (package-with-python2 python-colormath))
3059
3060(define-public python-spectra
3061 (package
3062 (name "python-spectra")
3063 (version "0.0.11")
3064 (source
3065 (origin
3066 (method url-fetch)
3067 (uri (pypi-uri "spectra" version))
3068 (sha256
3069 (base32
3070 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
3071 (build-system python-build-system)
3072 (arguments
3073 `(#:phases
3074 (modify-phases %standard-phases
3075 (replace 'check
38ec0f6a 3076 (lambda _ (invoke "nosetests" "-v"))))))
44d10b1f
RW
3077 (propagated-inputs
3078 `(("python-colormath" ,python-colormath)))
3079 (native-inputs
3080 `(("python-nose" ,python-nose)))
3081 (home-page "https://github.com/jsvine/spectra")
3082 (synopsis "Color scales and color conversion")
3083 (description
3084 "This package provides a Python library intended to make color math,
3085color scales, and color space conversion easy. It has support for:
3086
3087@enumerate
3088@item Color scales
3089@item Color ranges
3090@item Color blending
3091@item Brightening/darkening colors
3092@item Saturating/desaturating colors
3093@item Conversion to/from multiple color spaces.
3094@end enumerate\n")
3095 (license license:expat)))
3096
3097(define-public python2-spectra
3098 (package-with-python2 python-spectra))
3099
3100(define-public python-numpy-documentation
3101 (package
3102 (name "python-numpy-documentation")
3103 (version (package-version python-numpy))
3104 (source (package-source python-numpy))
3105 (build-system python-build-system)
3106 (native-inputs
3107 `(("python-matplotlib" ,python-matplotlib)
3108 ("python-numpy" ,python-numpy)
3109 ("pkg-config" ,pkg-config)
3110 ("python-sphinx" ,python-sphinx)
3111 ("python-numpydoc" ,python-numpydoc)
3112 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
3113 texlive-fonts-cm-super
3114 texlive-fonts-ec
3115 texlive-generic-ifxetex
3116 texlive-generic-pdftex
3117 texlive-latex-amsfonts
3118 texlive-latex-capt-of
3119 texlive-latex-cmap
3120 texlive-latex-environ
3121 texlive-latex-eqparbox
3122 texlive-latex-etoolbox
3123 texlive-latex-expdlist
3124 texlive-latex-fancyhdr
3125 texlive-latex-fancyvrb
3126 texlive-latex-fncychap
3127 texlive-latex-float
3128 texlive-latex-framed
3129 texlive-latex-geometry
3130 texlive-latex-graphics
3131 texlive-latex-hyperref
3132 texlive-latex-mdwtools
3133 texlive-latex-multirow
3134 texlive-latex-needspace
3135 texlive-latex-oberdiek
3136 texlive-latex-parskip
3137 texlive-latex-preview
3138 texlive-latex-tabulary
3139 texlive-latex-threeparttable
3140 texlive-latex-titlesec
3141 texlive-latex-trimspaces
3142 texlive-latex-ucs
3143 texlive-latex-upquote
3144 texlive-latex-url
3145 texlive-latex-varwidth
3146 texlive-latex-wrapfig)))
3147 ("texinfo" ,texinfo)
3148 ("perl" ,perl)
3149 ("scipy-sphinx-theme"
3150 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3151 (method git-fetch)
3152 (uri (git-reference
3153 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3154 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3155 (sha256
3156 (base32
3157 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3158 ,@(package-native-inputs python-numpy)))
3159 (arguments
3160 `(#:tests? #f ; we're only generating the documentation
3161 #:phases
3162 (modify-phases %standard-phases
3163 (delete 'build)
3164 (replace 'install
3165 (lambda* (#:key inputs outputs #:allow-other-keys)
3166 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3167 (doc (string-append
3168 data "/doc/" ,name "-"
3169 ,(package-version python-numpy)))
3170 (info-reader (string-append data "/info"))
3171 (html (string-append doc "/html"))
3172 (scipy-sphinx-theme "scipy-sphinx-theme")
3173 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3174 (pyver ,(string-append "PYVER=")))
3175
3176 ;; FIXME: this is needed to for texlive-union to generate
3177 ;; fonts, which are not found.
3178 (setenv "HOME" "/tmp")
3179
3180 (with-directory-excursion "doc"
3181 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3182 (mkdir-p html)
4fc898da
RW
3183 (invoke "make" "html" pyver)
3184 (invoke "make" "latex" "PAPER=a4" pyver)
3185 (invoke "make" "-C" "build/latex"
44d10b1f
RW
3186 "all-pdf" "PAPER=a4" pyver)
3187 ;; FIXME: Generation of the info file fails.
4fc898da 3188 ;; (invoke "make" "info" pyver)
44d10b1f
RW
3189 ;; (mkdir-p info)
3190 ;; (copy-file "build/texinfo/numpy.info"
3191 ;; (string-append info "/numpy.info"))
3192 (for-each (lambda (file)
3193 (copy-file (string-append "build/latex" file)
3194 (string-append doc file)))
3195 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3196 (with-directory-excursion "build/html"
3197 (for-each (lambda (file)
3198 (let* ((dir (dirname file))
3199 (tgt-dir (string-append html "/" dir)))
3200 (unless (equal? "." dir)
3201 (mkdir-p tgt-dir))
3202 (install-file file html)))
3203 (find-files "." ".*")))))
3204 #t)))))
3205 (home-page (package-home-page python-numpy))
3206 (synopsis "Documentation for the python-numpy package")
3207 (description (package-description python-numpy))
3208 (license (package-license python-numpy))))
3209
3210(define-public python2-numpy-documentation
3211 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3212 (package
3213 (inherit numpy-documentation)
3214 (native-inputs `(("python2-functools32" ,python2-functools32)
3215 ,@(package-native-inputs numpy-documentation))))))
3216
3217(define-public python-pygit2
3218 (package
3219 (name "python-pygit2")
3220 (version "0.27.3")
3221 (source
3222 (origin
3223 (method url-fetch)
3224 (uri (pypi-uri "pygit2" version))
3225 (sha256
3226 (base32
3227 "046ahvsb7a20sgvscqfm3cb32sp3sii4gim9vz7zzrkf7yz16xlv"))))
3228 (build-system python-build-system)
3229 (arguments
3230 '(#:phases
3231 (modify-phases %standard-phases
3232 ;; Remove after the next update. See:
3233 ;; https://github.com/libgit2/pygit2/pull/851
3234 (add-after 'unpack 'compile-with-cffi
3235 (lambda _
3236 (substitute* "setup.py"
3237 (("install_requires")
3238 "setup_requires=['cffi'],\n install_requires"))
3239 #t))
3240 (add-after 'unpack 'fix-dependency-versioning
3241 (lambda _
3242 (substitute* "setup.py"
3243 (("<") "<="))
3244 #t)))))
3245 (propagated-inputs
3246 `(("python-six" ,python-six)
3247 ("python-cffi" ,python-cffi)
3248 ("libgit2" ,libgit2)
3249 ("python-tox" ,python-tox)))
3250 (native-inputs
3251 `(("python-pytest" ,python-pytest)))
3252 (home-page "https://github.com/libgit2/pygit2")
3253 (synopsis "Python bindings for libgit2")
3254 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3255library, libgit2 implements Git plumbing.")
3256 ;; GPL2.0 only, with linking exception.
3257 (license license:gpl2)))
3258
3259(define-public python2-pygit2
3260 (package-with-python2 python-pygit2))
3261
3262(define-public python-pyparsing
3263 (package
3264 (name "python-pyparsing")
3265 (version "2.2.1")
3266 (source
3267 (origin
3268 (method url-fetch)
3269 (uri (pypi-uri "pyparsing" version))
3270 (sha256
3271 (base32 "06dgd0iilvf8m0ssmfpcbh8l6jf0zkp8adbb84llksg17crfx4zl"))))
3272 (build-system python-build-system)
3273 (outputs '("out" "doc"))
3274 (arguments
3275 `(#:tests? #f ; no test target
3276 #:phases
3277 (modify-phases %standard-phases
3278 (add-after 'install 'install-doc
3279 (lambda* (#:key outputs #:allow-other-keys)
3280 (let* ((doc (string-append (assoc-ref outputs "doc")
3281 "/share/doc/" ,name "-" ,version))
3282 (html-doc (string-append doc "/html"))
3283 (examples (string-append doc "/examples")))
3284 (mkdir-p html-doc)
3285 (mkdir-p examples)
3286 (for-each
3287 (lambda (dir tgt)
3288 (map (lambda (file)
3289 (install-file file tgt))
3290 (find-files dir ".*")))
3291 (list "docs" "htmldoc" "examples")
3292 (list doc html-doc examples))
3293 #t))))))
3294 (home-page "https://github.com/pyparsing/pyparsing")
3295 (synopsis "Python parsing class library")
3296 (description
3297 "The pyparsing module is an alternative approach to creating and
3298executing simple grammars, vs. the traditional lex/yacc approach, or the use
3299of regular expressions. The pyparsing module provides a library of classes
3300that client code uses to construct the grammar directly in Python code.")
3301 (license license:expat)))
3302
3303(define-public python2-pyparsing
3304 (package-with-python2 python-pyparsing))
3305
3306(define-public python-numpydoc
3307 (package
3308 (name "python-numpydoc")
3309 (version "0.8.0")
3310 (source
3311 (origin
3312 (method url-fetch)
3313 (uri (pypi-uri "numpydoc" version))
3314 (sha256
3315 (base32
3316 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
3317 (build-system python-build-system)
3318 (propagated-inputs
3319 `(("python-sphinx" ,python-sphinx)))
3320 (native-inputs
3321 `(("python-nose" ,python-nose)))
3322 (home-page "https://pypi.python.org/pypi/numpydoc")
3323 (synopsis
3324 "Numpy's Sphinx extensions")
3325 (description
3326 "Sphinx extension to support docstrings in Numpy format.")
3327 (license license:bsd-2)))
3328
3329(define-public python2-numpydoc
3330 (package-with-python2 python-numpydoc))
3331
3332(define-public python-numexpr
3333 (package
3334 (name "python-numexpr")
3335 (version "2.6.5")
3336 (source
3337 (origin
3338 (method url-fetch)
3339 (uri (pypi-uri "numexpr" version))
3340 (sha256
3341 (base32
3342 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3343 (build-system python-build-system)
3344 (arguments `(#:tests? #f)) ; no tests included
3345 (propagated-inputs
3346 `(("python-numpy" ,python-numpy)))
3347 (home-page "https://github.com/pydata/numexpr")
3348 (synopsis "Fast numerical expression evaluator for NumPy")
3349 (description
3350 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3351expressions that operate on arrays are accelerated and use less memory than
3352doing the same calculation in Python. In addition, its multi-threaded
3353capabilities can make use of all your cores, which may accelerate
3354computations, most specially if they are not memory-bounded (e.g. those using
3355transcendental functions).")
3356 (license license:expat)))
3357
3358(define-public python2-numexpr
3359 (package-with-python2 python-numexpr))
3360
3361(define-public python-cycler
3362 (package
3363 (name "python-cycler")
3364 (version "0.10.0")
3365 (source (origin
3366 (method url-fetch)
3367 (uri (pypi-uri "cycler" version))
3368 (sha256
3369 (base32
3370 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3371 (build-system python-build-system)
3372 (arguments
3373 ;; XXX: The current version requires 'coveralls' which we don't have.
3374 ;; Enable this for the next release which uses 'python-pytest'.
3375 '(#:tests? #f))
3376 (propagated-inputs
3377 `(("python-six" ,python-six)))
3378 (home-page "http://matplotlib.org/cycler/")
3379 (synopsis "Composable keyword argument iterator")
3380 (description
3381 "When using @code{matplotlib} and plotting more than one line, it is
3382common to want to be able to want to be able to cycle over one or more artist
3383styles; but the plotting logic can quickly become involved.
3384To address this and enable easy cycling over arbitrary @code{kwargs}, the
3385@code{Cycler} class was developed.")
3386 (license license:bsd-3)))
3387
3388(define-public python2-cycler
3389 (package-with-python2 python-cycler))
3390
3391(define-public python-colorspacious
3392 (package
3393 (name "python-colorspacious")
3394 (version "1.1.0")
3395 (source
3396 (origin
3397 (method url-fetch)
3398 (uri (string-append "https://github.com/njsmith/colorspacious/archive/v"
3399 version ".tar.gz"))
3400 (file-name (string-append name "-" version))
3401 (sha256
3402 (base32 "1vflh5jm32qb0skza2i8pjacv09w6gq84fqpp2nj77s0rbmzgr4k"))))
3403 (build-system python-build-system)
3404 (propagated-inputs
3405 `(("python-numpy" ,python-numpy)))
3406 (native-inputs
3407 `(("python-nose" ,python-nose)))
3408 (arguments
3409 `(#:phases
3410 (modify-phases %standard-phases
3411 (replace 'check
3412 (lambda _
c988afda 3413 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
44d10b1f
RW
3414 (home-page "https://github.com/njsmith/colorspacious")
3415 (synopsis "Python library for colorspace conversions")
3416 (description "@code{colorspacious} is a Python library that lets you
3417convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3418 (license license:expat)))
3419
3420(define-public python2-colorspacious
3421 (package-with-python2 python-colorspacious))
3422
3423(define-public python-matplotlib
3424 (package
3425 (name "python-matplotlib")
3426 (version "2.2.3")
3427 (source
3428 (origin
3429 (method url-fetch)
3430 (uri (pypi-uri "matplotlib" version))
3431 (sha256
3432 (base32
3433 "1rcc7x9ig3hpchkc4cwdvym3y451w74275fxr455zkfagrsvymbk"))))
3434 (build-system python-build-system)
3435 (propagated-inputs ; the following packages are all needed at run time
3436 `(("python-cycler" ,python-cycler)
3437 ("python-kiwisolver" ,python-kiwisolver)
3438 ("python-pyparsing" ,python-pyparsing)
3439 ("python-pygobject" ,python-pygobject)
3440 ("gobject-introspection" ,gobject-introspection)
3441 ("python-tkinter" ,python "tk")
3442 ("python-dateutil" ,python-dateutil)
3443 ("python-numpy" ,python-numpy)
3444 ("python-pillow" ,python-pillow)
3445 ("python-pytz" ,python-pytz)
3446 ("python-six" ,python-six)
3447 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3448 ;; from 'gtk+') provides the required 'typelib' files used by
3449 ;; 'gobject-introspection'. The location of these files is set with the
3450 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3451 ;; is done automatically by a 'native-search-path' procedure. However,
3452 ;; at run-time the user must set this variable as follows:
3453 ;;
3454 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
3455 ("gtk+" ,gtk+)
3456 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3457 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3458 ;; object. For this reason we need to import both libraries.
3459 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3460 ("python-pycairo" ,python-pycairo)
3461 ;; XXX: qtwebkit cannot be built reliably.
3462 ("python-pyqt" ,python-pyqt-without-qtwebkit)
3463 ("python-cairocffi" ,python-cairocffi)))
3464 (inputs
3465 `(("libpng" ,libpng)
3466 ("imagemagick" ,imagemagick)
3467 ("freetype" ,freetype)
3468 ("cairo" ,cairo)
3469 ("glib" ,glib)
3470 ;; FIXME: Add backends when available.
3471 ;("python-wxpython" ,python-wxpython)
3472 ("tcl" ,tcl)
3473 ("tk" ,tk)))
3474 (native-inputs
3475 `(("pkg-config" ,pkg-config)
3476 ("python-nose" ,python-nose)
3477 ("python-mock" ,python-mock)))
3478 (arguments
3479 `(#:phases
3480 (modify-phases %standard-phases
3481 (add-before 'build 'configure-environment
3482 (lambda* (#:key outputs inputs #:allow-other-keys)
3483 (let ((cairo (assoc-ref inputs "cairo"))
3484 (gtk+ (assoc-ref inputs "gtk+")))
3485 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3486 ;; has not effect.
3487 (setenv "LD_LIBRARY_PATH"
3488 (string-append cairo "/lib:" gtk+ "/lib"))
3489 (setenv "HOME" (getcwd))
3490 (call-with-output-file "setup.cfg"
3491 (lambda (port)
3492 (format port "[directories]~%
3493basedirlist = ~a,~a~%
3494 [rc_options]~%
3495backend = TkAgg~%"
3496 (assoc-ref inputs "tcl")
3497 (assoc-ref inputs "tk")))))
3498 #t)))))
3499 (home-page "http://matplotlib.org")
3500 (synopsis "2D plotting library for Python")
3501 (description
3502 "Matplotlib is a Python 2D plotting library which produces publication
3503quality figures in a variety of hardcopy formats and interactive environments
3504across platforms. Matplotlib can be used in Python scripts, the python and
3505ipython shell, web application servers, and six graphical user interface
3506toolkits.")
3507 (license license:psfl)
3508 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3509
3510(define-public python2-matplotlib
3511 (let ((matplotlib (package-with-python2
3512 (strip-python2-variant python-matplotlib))))
3513 (package (inherit matplotlib)
3514 ;; Make sure to use special packages for Python 2 instead
3515 ;; of those automatically rewritten by package-with-python2.
3516 (propagated-inputs
3517 `(("python2-pycairo" ,python2-pycairo)
3518 ("python2-backports-functools-lru-cache"
3519 ,python2-backports-functools-lru-cache)
3520 ("python2-functools32" ,python2-functools32)
3521 ("python2-pygobject-2" ,python2-pygobject-2)
3522 ("python2-subprocess32" ,python2-subprocess32)
3523 ("python2-tkinter" ,python-2 "tk")
3524 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3525 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
3526
3527(define-public python-matplotlib-documentation
3528 (package
3529 (name "python-matplotlib-documentation")
3530 (version (package-version python-matplotlib))
3531 (source (package-source python-matplotlib))
3532 (build-system python-build-system)
3533 (native-inputs
3534 `(("python-matplotlib" ,python-matplotlib)
3535 ("python-colorspacious" ,python-colorspacious)
3536 ("python-sphinx" ,python-sphinx)
3537 ("python-sphinx-gallery" ,python-sphinx-gallery)
3538 ("python-numpydoc" ,python-numpydoc)
3539 ("python-ipython" ,python-ipython)
3540 ("python-mock" ,python-mock)
3541 ("graphviz" ,graphviz)
3542 ("texlive" ,texlive)
3543 ("texinfo" ,texinfo)
3544 ,@(package-native-inputs python-matplotlib)))
3545 (arguments
3546 `(#:tests? #f ; we're only generating documentation
3547 #:phases
3548 (modify-phases %standard-phases
3549 (replace 'build
3550 (lambda _
3551 (chdir "doc")
3552 ;; Produce pdf in 'A4' format.
3553 (substitute* "conf.py"
3554 (("latex_paper_size = 'letter'") "")
3555 ;; latex_paper_size is deprecated -> set paper size using
3556 ;; latex_elements
3557 (("latex_elements\\['pointsize'\\] = '11pt'" match)
3558 ;; insert at a point where latex_elements{} is defined:
3559 (string-append match "\nlatex_elements['papersize'] = 'a4paper'")))
3560 (invoke "make" "SPHINXBUILD=sphinx-build" "html" "latex" "texinfo")))
3561 (replace 'install
3562 (lambda* (#:key inputs outputs #:allow-other-keys)
3563 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3564 (doc (string-append data "/doc/python-matplotlib-" ,version))
3565 (info (string-append data "/info"))
3566 (html (string-append doc "/html")))
3567 (mkdir-p html)
3568 (mkdir-p info)
3569 (copy-recursively "build/html" html)
3570 (symlink (string-append html "/_images")
3571 (string-append info "/matplotlib-figures"))
3572 (with-directory-excursion "build/texinfo"
3573 (substitute* "matplotlib.texi"
3574 (("@image\\{([^,]*)" all file)
3575 (string-append "@image{matplotlib-figures/" file)))
3576 (symlink (string-append html "/_images")
3577 "./matplotlib-figures")
3578 (system* "makeinfo" "--no-split"
3579 "-o" "matplotlib.info" "matplotlib.texi"))
3580 (copy-file "build/texinfo/matplotlib.info"
3581 (string-append info "/matplotlib.info"))
3582 (copy-file "build/latex/Matplotlib.pdf"
3583 (string-append doc "/Matplotlib.pdf")))
3584 #t)))))
3585 (home-page (package-home-page python-matplotlib))
3586 (synopsis "Documentation for the python-matplotlib package")
3587 (description (package-description python-matplotlib))
3588 (license (package-license python-matplotlib))))
3589
3590(define-public python2-matplotlib-documentation
3591 (package-with-python2 python-matplotlib-documentation))
3592
3593(define-public python2-pysnptools
3594 (package
3595 (name "python2-pysnptools")
5d1ade85 3596 (version "0.3.13")
44d10b1f
RW
3597 (source
3598 (origin
3599 (method url-fetch)
5d1ade85 3600 (uri (pypi-uri "pysnptools" version))
44d10b1f
RW
3601 (sha256
3602 (base32
5d1ade85 3603 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
44d10b1f
RW
3604 (build-system python-build-system)
3605 (arguments
5d1ade85
RW
3606 `(#:python ,python-2 ; only Python 2.7 is supported
3607 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
44d10b1f
RW
3608 (propagated-inputs
3609 `(("python2-numpy" ,python2-numpy)
3610 ("python2-scipy" ,python2-scipy)
3611 ("python2-pandas" ,python2-pandas)))
44d10b1f 3612 (native-inputs
5d1ade85 3613 `(("python2-cython" ,python2-cython)))
1b66989b 3614 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
44d10b1f
RW
3615 (synopsis "Library for reading and manipulating genetic data")
3616 (description
3617 "PySnpTools is a library for reading and manipulating genetic data. It
3618can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
3619those files. It can also efficiently manipulate ranges of integers using set
3620operators such as union, intersection, and difference.")
3621 (license license:asl2.0)))
3622
3623(define-public python-scipy
3624 (package
3625 (name "python-scipy")
3626 (version "1.1.0")
3627 (source
3628 (origin
3629 (method url-fetch)
3630 (uri (pypi-uri "scipy" version))
3631 (sha256
3632 (base32
3633 "1lfg686w6vv2m2dfs8v9d0bf2i18z7wz5vgzjnkgmpr4hi0550w7"))))
3634 (build-system python-build-system)
3635 (propagated-inputs
3636 `(("python-numpy" ,python-numpy)
3637 ("python-matplotlib" ,python-matplotlib)
3638 ("python-pyparsing" ,python-pyparsing)))
3639 (inputs
3640 `(("lapack" ,lapack)
3641 ("openblas" ,openblas)))
3642 (native-inputs
3643 `(("python-cython" ,python-cython)
3644 ("python-pytest" ,python-pytest)
3645 ("python-sphinx" ,python-sphinx)
3646 ("python-numpydoc" ,python-numpydoc)
3647 ("gfortran" ,gfortran)
3648 ("perl" ,perl)
3649 ("which" ,which)))
3650 (outputs '("out" "doc"))
3651 (arguments
3652 `(#:phases
3653 (modify-phases %standard-phases
3654 (add-after 'unpack 'disable-broken-tests
3655 (lambda _
3656 (substitute* "scipy/sparse/linalg/dsolve/tests/test_linsolve.py"
3657 (("^( +)def test_threads_parallel\\(self\\):" m indent)
3658 (string-append indent
3659 "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
3660 m)))
3661 (substitute* "scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py"
3662 (("^def test_parallel_threads\\(\\):" m)
3663 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
3664 m)))
3665 #t))
3666 (add-before 'build 'configure-openblas
3667 (lambda* (#:key inputs #:allow-other-keys)
3668 (call-with-output-file "site.cfg"
3669 (lambda (port)
3670 (format port
3671 "[blas]
3672libraries = openblas
3673library_dirs = ~a/lib
3674include_dirs = ~a/include
3675
3676# backslash-n to make emacs happy
3677\n[atlas]
3678library_dirs = ~a/lib
3679atlas_libs = openblas
3680"
3681 (assoc-ref inputs "openblas")
3682 (assoc-ref inputs "openblas")
3683 (assoc-ref inputs "openblas"))))
3684 #t))
3685 (add-after 'install 'install-doc
3686 (lambda* (#:key inputs outputs #:allow-other-keys)
3687 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3688 (doc (string-append data "/doc/" ,name "-" ,version))
3689 (html (string-append doc "/html"))
3690 (pyver ,(string-append "PYVER=" (version-major+minor
3691 (package-version python))))
3692 ;; By default it tries to run sphinx-build through the Python
3693 ;; interpreter which won't work with our shell wrapper.
3694 (sphinxbuild "SPHINXBUILD=LANG=C sphinx-build"))
3695 ;; Make installed package available for building the
3696 ;; documentation
3697 (add-installed-pythonpath inputs outputs)
3698 (with-directory-excursion "doc"
3699 ;; Fix generation of images for mathematical expressions.
3700 (substitute* (find-files "source" "conf\\.py")
3701 (("pngmath_use_preview = True")
3702 "pngmath_use_preview = False"))
3703 (mkdir-p html)
3704 (invoke "make" "html" pyver sphinxbuild)
3705 (with-directory-excursion "build/html"
3706 (for-each (lambda (file)
3707 (let* ((dir (dirname file))
3708 (tgt-dir (string-append html "/" dir)))
3709 (install-file file html)))
3710 (find-files "." ".*")))))
3711 #t))
3712 ;; Tests can only be run after the library has been installed and not
3713 ;; within the source directory.
3714 (delete 'check)
3715 (add-after 'install 'check
3716 (lambda* (#:key inputs outputs #:allow-other-keys)
3717 (add-installed-pythonpath inputs outputs)
3718 (with-directory-excursion "/tmp"
3719 (invoke "python" "-c"
3720 "import scipy; scipy.test(verbose=2)")))))))
3721 (home-page "https://www.scipy.org/")
3722 (synopsis "The Scipy library provides efficient numerical routines")
3723 (description "The SciPy library is one of the core packages that make up
3724the SciPy stack. It provides many user-friendly and efficient numerical
3725routines such as routines for numerical integration and optimization.")
3726 (properties `((python2-variant . ,(delay python2-scipy))))
3727 (license license:bsd-3)))
3728
3729(define-public python2-scipy
3730 (package-with-python2
3731 (strip-python2-variant python-scipy)))
3732
3733(define-public python-socksipy-branch
3734 (package
3735 (name "python-socksipy-branch")
3736 (version "1.01")
3737 (source
3738 (origin
3739 (method url-fetch)
3740 (uri (pypi-uri "SocksiPy-branch" version))
3741 (sha256
3742 (base32
3743 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
3744 (build-system python-build-system)
3745 (arguments
3746 `(#:tests? #f)) ; There are no tests
3747 (home-page "https://code.google.com/archive/p/socksipy-branch/")
3748 (synopsis "Python SOCKS module")
3749 (description
3750 "SocksiPy - A Python SOCKS client module. It provides a
3751socket-like interface that supports connections to any TCP
3752service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
3753The original version was developed by Dan Haim, this is a
3754branch created by Mario Vilas to address some open issues,
3755as the original project seems to have been abandoned circa 2007.")
3756 (license license:bsd-3)))
3757
3758(define-public python2-socksipy-branch
3759 (package-with-python2 python-socksipy-branch))
3760
3761(define-public python-pycodestyle
3762 (package
3763 (name "python-pycodestyle")
d16ef28b 3764 (version "2.5.0")
44d10b1f 3765 (source
ba88eea2
RW
3766 (origin
3767 (method url-fetch)
3768 (uri (pypi-uri "pycodestyle" version))
3769 (sha256
3770 (base32
d16ef28b 3771 "0v4prb05n21bm8650v0a01k1nyqjdmkrsm3zycfxh2j5k9n962p4"))))
44d10b1f
RW
3772 (build-system python-build-system)
3773 (home-page "https://pycodestyle.readthedocs.io/")
3774 (synopsis "Python style guide checker")
3775 (description "@code{pycodestyle} (formerly pep8) is a tool to check
3776Python code against some of the style conventions in
3777@url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
3778 (license license:expat)))
3779
3780(define-public python2-pycodestyle
3781 (package-with-python2 python-pycodestyle))
3782
3783(define-public python-multidict
3784 (package
3785 (name "python-multidict")
3786 (version "4.2.0")
3787 (source
3788 (origin
3789 (method url-fetch)
3790 (uri (pypi-uri "multidict" version))
3791 (sha256
3792 (base32
3793 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
3794 (build-system python-build-system)
3795 (native-inputs
3796 `(("python-pytest" ,python-pytest)
3797 ("python-pytest-runner" ,python-pytest-runner)))
3798 (home-page "https://github.com/aio-libs/multidict/")
3799 (synopsis "Multidict implementation")
3800 (description "Multidict is dict-like collection of key-value pairs
3801where key might be occurred more than once in the container.")
3802 (license license:asl2.0)))
3803
3804(define-public python-orderedmultidict
3805 (package
3806 (name "python-orderedmultidict")
3807 (version "0.7.11")
3808 (source
3809 (origin
3810 (method url-fetch)
3811 (uri (pypi-uri "orderedmultidict" version))
3812 (sha256
3813 (base32
3814 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
3815 (build-system python-build-system)
3816 (arguments
3817 `(#:phases
3818 (modify-phases %standard-phases
3819 (add-after 'unpack 'fix-tests
3820 (lambda _
3821 ;; The package uses nosetest for running the tests.
3822 ;; Adding this initfile allows to run the test suite
3823 ;; without requiring nosetest.
d1c4f329
RW
3824 (with-output-to-file "tests/__init__.py" newline)
3825 #t)))))
44d10b1f
RW
3826 (propagated-inputs
3827 `(("python-six" ,python-six)))
3828 (native-inputs
3829 `(("python-pycodestyle" ,python-pycodestyle)))
3830 (home-page "https://github.com/gruns/orderedmultidict")
3831 (synopsis "Python Ordered Multivalue Dictionary - omdict")
3832 (description "This package contains a library for ordered multivalue
3833dictionaries. A multivalue dictionary is a dictionary that can store
3834multiple values for the same key. An ordered multivalue dictionary is a
3835multivalue dictionary that retains the order of insertions and deletions.")
3836 (license license:unlicense)))
3837
3838(define-public python2-orderedmultidict
3839 (package-with-python2 python-orderedmultidict))
3840
3841(define-public python-autopep8
3842 (package
3843 (name "python-autopep8")
3844 (version "1.3.5")
3845 (source
3846 (origin
3847 (method url-fetch)
3848 (uri (pypi-uri "autopep8" version))
3849 (sha256
3850 (base32
3851 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
3852 (build-system python-build-system)
3853 (propagated-inputs
3854 `(("python-pycodestyle" ,python-pycodestyle)))
3855 (home-page "https://github.com/hhatto/autopep8")
3856 (synopsis "Format Python code according to the PEP 8 style guide")
3857 (description
3858 "@code{autopep8} automatically formats Python code to conform to
3859the PEP 8 style guide. It uses the pycodestyle utility to determine
3860what parts of the code needs to be formatted. @code{autopep8} is
3861capable of fixing most of the formatting issues that can be reported
3862by pycodestyle.")
3863 (license (license:non-copyleft
3864 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
3865
3866(define-public python2-autopep8
3867 (package-with-python2 python-autopep8))
3868
3869(define-public python-distutils-extra
3870 (package
3871 (name "python-distutils-extra")
3872 (version "2.38")
3873 (source
3874 (origin
3875 (method url-fetch)
3876 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
3877 version "/+download/python-distutils-extra-"
3878 version ".tar.gz"))
3879 (sha256
3880 (base32
3881 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
3882 (build-system python-build-system)
3883 (home-page "https://launchpad.net/python-distutils-extra/")
3884 (synopsis "Enhancements to Python's distutils")
3885 (description
3886 "The python-distutils-extra module enables you to easily integrate
3887gettext support, themed icons, and scrollkeeper-based documentation into
3888Python's distutils.")
3889 (license license:gpl2)))
3890
3891(define-public python2-distutils-extra
3892 (package-with-python2 python-distutils-extra))
3893
3894(define-public python2-elib.intl
3895 (package
3896 (name "python2-elib.intl")
3897 (version "0.0.3")
3898 (source
3899 (origin
3900 ;; This project doesn't tag releases or publish tarballs, so we take
3901 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
3902 (method git-fetch)
3903 (uri (git-reference
3904 (url "https://github.com/dieterv/elib.intl.git")
3905 (commit "d09997cfef")))
3906 (file-name (string-append name "-" version "-checkout"))
3907 (sha256
3908 (base32
3909 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
3910 (build-system python-build-system)
3911 (arguments
3912 ;; incompatible with Python 3 (exception syntax)
3913 `(#:python ,python-2
3914 #:tests? #f))
3915 (home-page "https://github.com/dieterv/elib.intl")
3916 (synopsis "Enhanced internationalization for Python")
3917 (description
3918 "The elib.intl module provides enhanced internationalization (I18N)
3919services for your Python modules and applications.")
3920 (license license:lgpl3+)))
3921
3922(define-public python-olefile
3923 (package
3924 (name "python-olefile")
3925 (version "0.45.1")
3926 (source
3927 (origin
3928 (method url-fetch)
3929 (uri (string-append "https://github.com/decalage2/olefile/archive/v"
3930 version ".tar.gz"))
3931 (file-name (string-append name "-" version ".tar.gz"))
3932 (sha256
3933 (base32
3934 "18ai19zwagm6nli14k8bii31ipbab2rp7plrvsm6gmfql551a8ai"))))
3935 (build-system python-build-system)
3936 (home-page
3937 "https://www.decalage.info/python/olefileio")
3938 (synopsis "Read and write Microsoft OLE2 files.")
3939 (description
3940 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
3941Storage or Compound Document, Microsoft Office). It is an improved version of
3942the OleFileIO module from PIL, the Python Image Library.")
3943 (license license:bsd-3)))
3944
3945(define-public python2-olefile
3946 (package-with-python2 python-olefile))
3947
3948(define-public python-pillow
3949 (package
3950 (name "python-pillow")
3951 (version "5.4.1")
3952 (source
3953 (origin
3954 (method url-fetch)
3955 (uri (pypi-uri "Pillow" version))
3956 (sha256
3957 (base32
3958 "17waygkhhzjd75kajlfw9v57mbb41lcpg6cvkdijqd7smm76ccsj"))))
3959 (build-system python-build-system)
3960 (native-inputs
3961 `(("python-pytest" ,python-pytest)))
3962 (inputs
3963 `(("freetype" ,freetype)
3964 ("lcms" ,lcms)
3965 ("zlib" ,zlib)
3966 ("libjpeg" ,libjpeg)
3967 ("openjpeg" ,openjpeg)
3968 ("libtiff" ,libtiff)
3969 ("libwebp" ,libwebp)))
3970 (propagated-inputs
3971 `(("python-olefile" ,python-olefile)))
3972 (arguments
3973 `(#:phases
3974 (modify-phases %standard-phases
3975 (add-after 'unpack 'patch-ldconfig
3976 (lambda _
3977 (substitute* "setup.py"
3978 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
3979 (delete 'check) ; We must run checks after python-pillow is installed.
3980 (add-after 'install 'check-installed
3981 (lambda* (#:key outputs inputs #:allow-other-keys)
3982 (begin
3983 (setenv "HOME" (getcwd))
3984 ;; Make installed package available for running the tests.
3985 (add-installed-pythonpath inputs outputs)
3986 (invoke "python" "selftest.py" "--installed")
3987 (invoke "python" "-m" "pytest" "-vv")))))))
3988 (home-page "https://python-pillow.org")
3989 (synopsis "Fork of the Python Imaging Library")
3990 (description
3991 "The Python Imaging Library adds image processing capabilities to your
3992Python interpreter. This library provides extensive file format support, an
3993efficient internal representation, and fairly powerful image processing
3994capabilities. The core image library is designed for fast access to data
3995stored in a few basic pixel formats. It should provide a solid foundation for
3996a general image processing tool.")
3997 (license (license:x11-style
3998 "http://www.pythonware.com/products/pil/license.htm"
3999 "The PIL Software License"))))
4000
4001(define-public python2-pillow
4002 (package-with-python2 python-pillow))
4003
4004(define-public python-pycparser
4005 (package
4006 (name "python-pycparser")
4007 (version "2.18")
4008 (source
4009 (origin
4010 (method url-fetch)
4011 (uri (pypi-uri "pycparser" version))
4012 (sha256
4013 (base32
4014 "09mjyw82ibqzl449g7swy8bfxnfpmas0815d2rkdjlcqw81wma4r"))))
4015 (outputs '("out" "doc"))
4016 (build-system python-build-system)
4017 (native-inputs
4018 `(("pkg-config" ,pkg-config)))
4019 (arguments
4020 `(#:phases
4021 (modify-phases %standard-phases
4022 (replace 'check
4023 (lambda _
4024 (with-directory-excursion "tests"
acb75c03
RW
4025 (invoke "python" "all_tests.py"))
4026 #t))
44d10b1f
RW
4027 (add-after 'install 'install-doc
4028 (lambda* (#:key outputs #:allow-other-keys)
4029 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4030 (doc (string-append data "/doc/" ,name "-" ,version))
4031 (examples (string-append doc "/examples")))
4032 (mkdir-p examples)
4033 (for-each (lambda (file)
4034 (copy-file (string-append "." file)
4035 (string-append doc file)))
4036 '("/README.rst" "/CHANGES" "/LICENSE"))
4037 (copy-recursively "examples" examples)))))))
4038 (home-page "https://github.com/eliben/pycparser")
4039 (synopsis "C parser in Python")
4040 (description
4041 "Pycparser is a complete parser of the C language, written in pure Python
4042using the PLY parsing library. It parses C code into an AST and can serve as
4043a front-end for C compilers or analysis tools.")
4044 (license license:bsd-3)))
4045
4046(define-public python2-pycparser
4047 (package-with-python2 python-pycparser))
4048
4049(define-public python-pywavelets
4050 (package
4051 (name "python-pywavelets")
4052 (version "1.0.1")
4053 (home-page "https://github.com/PyWavelets/pywt")
4054 (source (origin
4055 (method url-fetch)
4056 (uri (pypi-uri "PyWavelets" version))
4057 (sha256
4058 (base32
4059 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
4060 (build-system python-build-system)
4061 (arguments
4062 '(#:modules ((ice-9 ftw)
4063 (srfi srfi-1)
4064 (srfi srfi-26)
4065 (guix build utils)
4066 (guix build python-build-system))
4067 #:phases (modify-phases %standard-phases
4068 (replace 'check
4069 (lambda _
4070 (let ((cwd (getcwd))
4071 (libdir (find (cut string-prefix? "lib." <>)
4072 (scandir "build"))))
4073 (with-directory-excursion (string-append cwd "/build/" libdir)
4074 (invoke "nosetests" "-v" "."))))))))
4075 (native-inputs
4076 `(("python-matplotlib" ,python-matplotlib) ;for tests
4077 ("python-nose" ,python-nose)))
4078 (propagated-inputs
4079 `(("python-numpy" ,python-numpy)))
4080 (synopsis "Wavelet transforms in Python")
4081 (description
4082 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
4083mathematical basis functions that are localized in both time and frequency.
4084Wavelet transforms are time-frequency transforms employing wavelets. They are
4085similar to Fourier transforms, the difference being that Fourier transforms are
4086localized only in frequency instead of in time and frequency.")
4087 (license license:expat)))
4088
4089(define-public python2-pywavelets
4090 (package-with-python2 python-pywavelets))
4091
4092(define-public python-xcffib
4093 (package
4094 (name "python-xcffib")
4095 (version "0.6.0")
4096 (source
4097 (origin
4098 (method url-fetch)
4099 (uri (pypi-uri "xcffib" version))
4100 (sha256
4101 (base32
4102 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
4103 (build-system python-build-system)
4104 (inputs
4105 `(("libxcb" ,libxcb)))
4106 (propagated-inputs
4107 `(("python-cffi" ,python-cffi) ; used at run time
4108 ("python-six" ,python-six)))
4109 (arguments
4110 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4111 #:tests? #f
4112 #:phases
4113 (modify-phases %standard-phases
4114 (add-after 'unpack 'fix-libxcb-path
4115 (lambda* (#:key inputs #:allow-other-keys)
4116 (let ((libxcb (assoc-ref inputs "libxcb")))
4117 (substitute* '("xcffib/__init__.py")
4118 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4119 #t)))
4120 (add-after 'install 'install-doc
4121 (lambda* (#:key outputs #:allow-other-keys)
4122 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4123 "/doc/" ,name "-" ,version)))
4124 (mkdir-p doc)
4125 (copy-file "README.md"
4126 (string-append doc "/README.md"))
4127 #t))))))
4128 (home-page "https://github.com/tych0/xcffib")
4129 (synopsis "XCB Python bindings")
4130 (description
4131 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4132support for Python 3 and PyPy. It is based on cffi.")
4133 (license license:expat)))
4134
4135(define-public python2-xcffib
4136 (package-with-python2 python-xcffib))
4137
4138(define-public python-cairocffi
4139 (package
4140 (name "python-cairocffi")
4141 (version "0.9.0")
4142 (source
4143 (origin
4144 (method url-fetch)
4145 (uri (pypi-uri "cairocffi" version))
4146 (sha256
4147 (base32
4148 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
4149 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
4150 (build-system python-build-system)
4151 (outputs '("out" "doc"))
4152 (inputs
4153 `(("glib" ,glib)
4154 ("gtk+" ,gtk+)
4155 ("gdk-pixbuf" ,gdk-pixbuf)
4156 ("cairo" ,cairo)
4157 ("pango" ,pango)))
4158 (native-inputs
4159 `(("pkg-config" ,pkg-config)
4160 ("python-pytest" ,python-pytest)
4161 ("python-pytest-cov" ,python-pytest-cov)
4162 ("python-pytest-runner" ,python-pytest-runner)
4163 ("python-sphinx" ,python-sphinx)
4164 ("python-docutils" ,python-docutils)))
4165 (propagated-inputs
4166 `(("python-xcffib" ,python-xcffib))) ; used at run time
4167 (arguments
4168 `(#:phases
4169 (modify-phases %standard-phases
4170 (add-after 'unpack 'patch-paths
4171 (lambda* (#:key inputs outputs #:allow-other-keys)
4172 (substitute* (find-files "." "\\.py$")
4173 (("dlopen\\(ffi, 'cairo'")
4174 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
4175 "/lib/libcairo.so.2'"))
4176 (("dlopen\\(ffi, 'gdk-3'")
4177 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
4178 "/lib/libgtk-3.so.0'"))
4179 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
4180 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
4181 "/lib/libgdk_pixbuf-2.0.so.0'"))
4182 (("dlopen\\(ffi, 'glib-2.0'")
4183 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4184 "/lib/libglib-2.0.so.0'"))
4185 (("dlopen\\(ffi, 'gobject-2.0'")
4186 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4187 "/lib/libgobject-2.0.so.0'"))
4188 (("dlopen\\(ffi, 'pangocairo-1.0'")
4189 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4190 "/lib/libpangocairo-1.0.so.0'"))
4191 (("dlopen\\(ffi, 'pango-1.0'")
4192 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4193 "/lib/libpango-1.0.so.0'")))
4194 #t))
4195 (add-after 'install 'install-doc
4196 (lambda* (#:key inputs outputs #:allow-other-keys)
4197 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4198 (doc (string-append data "/doc/" ,name "-" ,version))
4199 (html (string-append doc "/html")))
4200 (setenv "LD_LIBRARY_PATH"
4201 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4202 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4203 (setenv "LANG" "en_US.UTF-8")
4204 (mkdir-p html)
4205 (for-each (lambda (file)
4206 (copy-file (string-append "." file)
4207 (string-append doc file)))
4208 '("/README.rst" "/CHANGES" "/LICENSE"))
4209 (system* "python" "setup.py" "build_sphinx")
4210 (copy-recursively "docs/_build/html" html)
4211 #t))))))
4212 (home-page "https://github.com/Kozea/cairocffi")
4213 (synopsis "Python bindings and object-oriented API for Cairo")
4214 (description
4215 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4216Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4217graphics library with support for multiple backends including image buffers,
4218PNG, PostScript, PDF, and SVG file output.")
4219 (license license:bsd-3)))
4220
4221(define-public python2-cairocffi
4222 (package-with-python2 python-cairocffi))
4223
4224(define-public python-decorator
4225 (package
4226 (name "python-decorator")
4227 (version "4.3.0")
4228 (source
4229 (origin
4230 (method url-fetch)
4231 (uri (pypi-uri "decorator" version))
4232 (sha256
4233 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
4234 (build-system python-build-system)
4235 (home-page "https://pypi.python.org/pypi/decorator/")
4236 (synopsis "Python module to simplify usage of decorators")
4237 (description
4238 "The aim of the decorator module is to simplify the usage of decorators
4239for the average programmer, and to popularize decorators usage giving examples
4240of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4241etc. The core of this module is a decorator factory.")
4242 (license license:expat)))
4243
4244(define-public python2-decorator
4245 (package-with-python2 python-decorator))
4246
4247(define-public python-drmaa
4248 (package
4249 (name "python-drmaa")
4250 (version "0.7.7")
4251 (source
4252 (origin
4253 (method url-fetch)
4254 (uri (pypi-uri "drmaa" version))
4255 (sha256
4256 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4257 (build-system python-build-system)
4258 ;; The test suite requires libdrmaa which is provided by the cluster
4259 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4260 ;; should be set to the path of the libdrmaa library.
4261 (arguments '(#:tests? #f))
4262 (native-inputs
4263 `(("python-nose" ,python-nose)))
4264 (home-page "https://pypi.python.org/pypi/drmaa")
4265 (synopsis "Python bindings for the DRMAA library")
4266 (description
4267 "A Python package for Distributed Resource Management (DRM) job
4268submission and control. This package is an implementation of the DRMAA 1.0
4269Python language binding specification.")
4270 (license license:bsd-3)))
4271
4272(define-public python2-drmaa
4273 (package-with-python2 python-drmaa))
4274
4275(define-public python-grako
4276 (package
4277 (name "python-grako")
4278 (version "3.99.9")
4279 (source
4280 (origin
4281 (method url-fetch)
4282 (uri
4283 (pypi-uri "grako" version ".zip"))
4284 (sha256
4285 (base32
4286 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4287 (build-system python-build-system)
4288 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4289 (native-inputs
4290 `(("unzip" ,unzip)
4291 ("python-pytest" ,python-pytest)
4292 ("python-pytest-runner" ,python-pytest-runner)))
4293 (home-page "https://bitbucket.org/neogeny/grako")
4294 (synopsis "EBNF parser generator")
4295 (description
4296 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4297memoizing PEG/Packrat parser in Python.")
4298 (license license:bsd-3)))
4299
4300(define-public python2-grako
4301 (package-with-python2 python-grako))
4302
4303(define-public python-gridmap
4304 (package
4305 (name "python-gridmap")
4306 (version "0.13.0")
4307 (source
4308 (origin
4309 (method url-fetch)
4310 (uri (string-append
4311 "https://github.com/pygridtools/gridmap/archive/v"
4312 version ".tar.gz"))
4313 (file-name (string-append name "-" version ".tar.gz"))
4314 (sha256
4315 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
4316 (build-system python-build-system)
4317 (arguments
4318 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4319 (propagated-inputs
4320 `(("python-psutil" ,python-psutil)
4321 ("python-drmaa" ,python-drmaa)
4322 ("python-pyzmq" ,python-pyzmq)))
4323 (home-page "https://github.com/pygridtools/gridmap")
4324 (synopsis "Create jobs on a cluster directly from Python")
4325 (description
4326 "Gridmap is a Python package to allow you to easily create jobs on the
4327cluster directly from Python. You can directly map Python functions onto the
4328cluster without needing to write any wrapper code yourself.")
4329 (license license:gpl3+)))
4330
4331(define-public python2-gridmap
4332 (package-with-python2 python-gridmap))
4333
4334(define-public python-honcho
4335 (package
4336 (name "python-honcho")
4337 (version "1.0.1")
4338 (source
4339 (origin
4340 (method url-fetch)
4341 (uri (string-append
4342 "https://github.com/nickstenning/honcho/archive/v"
4343 version ".tar.gz"))
4344 (file-name (string-append name "-" version ".tar.gz"))
4345 (sha256
4346 (base32 "0zizn61n5z5hq421hkypk9pw8s6fpxw30f4hsg7k4ivwzy3gjw9j"))))
4347 (build-system python-build-system)
4348 (native-inputs
4349 `(("python-pytest" ,python-pytest)
4350 ("python-mock" ,python-mock)
4351 ("python-tox" ,python-tox)
4352 ("which" ,which))) ;for tests
4353 (propagated-inputs
4354 `(("python-jinja2" ,python-jinja2)))
4355 (arguments
4356 `(#:phases
4357 (modify-phases %standard-phases
4358 (delete 'check)
4359 (add-after 'install 'check
4360 (lambda* (#:key outputs inputs #:allow-other-keys)
4361 ;; fix honcho path in testsuite
4362 (substitute* "tests/conftest.py"
4363 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
4364 "/bin/honcho" "'")))
4365 ;; It's easier to run tests after install.
4366 ;; Make installed package available for running the tests
4367 (add-installed-pythonpath inputs outputs)
95b707fb 4368 (invoke "py.test" "-v"))))))
44d10b1f
RW
4369 (home-page "https://github.com/nickstenning/honcho")
4370 (synopsis "Manage Procfile-based applications")
4371 (description
4372 "A Procfile is a file which describes how to run an application
4373consisting of serveral processes. honcho starts all listed processes.
4374The output of all running processes is collected by honcho and
4375displayed.")
4376 (license license:expat)))
4377
4378(define-public python2-honcho
4379 (package-with-python2 python-honcho))
4380
4381(define-public python-pexpect
4382 (package
4383 (name "python-pexpect")
4384 (version "4.6.0")
4385 (source
4386 (origin
4387 (method url-fetch)
4388 (uri (pypi-uri "pexpect" version))
4389 (sha256
4390 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
4391 (build-system python-build-system)
4392 (arguments
4393 `(#:phases
4394 (modify-phases %standard-phases
4395 (add-before 'check 'prepare-tests
4396 (lambda _
4397 (substitute* (find-files "tests")
4398 (("/bin/ls") (which "ls"))
4399 (("/bin/echo") (which "echo"))
4400 (("/bin/which") (which "which"))
4401 ;; Many tests try to use the /bin directory which
4402 ;; is not present in the build environment.
4403 ;; Use one that's non-empty and unlikely to change.
4404 (("/bin'") "/dev'"))
4405 ;; XXX: Socket connection test gets "Connection reset by peer".
4406 ;; Why does it not work? Delete for now.
4407 (delete-file "tests/test_socket.py")
4408 #t))
4409 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
4410 (native-inputs
4411 `(("python-nose" ,python-nose)
4412 ("python-pytest" ,python-pytest)
4413 ("man-db" ,man-db)
4414 ("which" ,which)
4415 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
4416 (propagated-inputs
4417 `(("python-ptyprocess" ,python-ptyprocess)))
4418 (home-page "http://pexpect.readthedocs.org/")
4419 (synopsis "Controlling interactive console applications")
4420 (description
4421 "Pexpect is a pure Python module for spawning child applications;
4422controlling them; and responding to expected patterns in their output.
4423Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4424child application and control it as if a human were typing commands.")
4425 (license license:isc)))
4426
4427(define-public python2-pexpect
4428 (package-with-python2 python-pexpect))
4429
4430(define-public python-setuptools-scm
4431 (package
4432 (name "python-setuptools-scm")
85092643 4433 (version "3.2.0")
44d10b1f
RW
4434 (source (origin
4435 (method url-fetch)
4436 (uri (pypi-uri "setuptools_scm" version))
4437 (sha256
4438 (base32
85092643 4439 "0n3knn3p1sqlx31k2lahn7z9bacvlv8nhlfidj77vz50bxqlgasj"))))
44d10b1f
RW
4440 (build-system python-build-system)
4441 (home-page "https://github.com/pypa/setuptools_scm/")
4442 (synopsis "Manage Python package versions in SCM metadata")
4443 (description
4444 "Setuptools_scm handles managing your Python package versions in
4445@dfn{software configuration management} (SCM) metadata instead of declaring
4446them as the version argument or in a SCM managed file.")
4447 (license license:expat)))
4448
4449(define-public python2-setuptools-scm
4450 (package-with-python2 python-setuptools-scm))
4451
4452(define-public python-pathpy
4453 (package
4454 (name "python-pathpy")
4455 (version "11.0.1")
4456 (source
4457 (origin
4458 (method url-fetch)
4459 (uri (pypi-uri "path.py" version))
4460 (sha256
4461 (base32 "07x15v8c7ry9bvycw294c9yq6ky9v2b0dalvgi6rn38ilh69vsz7"))))
4462 ;; (outputs '("out" "doc"))
4463 (build-system python-build-system)
4464 (propagated-inputs
4465 `(("python-appdirs" ,python-appdirs)))
4466 (native-inputs
4467 `(("python-setuptools-scm" ,python-setuptools-scm)
4468 ("python-sphinx" ,python-sphinx)
4469 ("python-rst.linker" ,python-rst.linker)
4470 ("python-pytest" ,python-pytest)
4471 ("python-pytest-runner" ,python-pytest-runner)))
4472 (arguments
4473 ;; FIXME: Documentation and tests require "jaraco.packaging".
4474 `(#:tests? #f))
4475 ;; #:phases
4476 ;; (modify-phases %standard-phases
4477 ;; (add-after 'build 'build-doc
4478 ;; (lambda _
4479 ;; (setenv "LANG" "en_US.UTF-8")
4480 ;; (zero? (system* "python" "setup.py" "build_sphinx"))))
4481 ;; (add-after 'install 'install-doc
4482 ;; (lambda* (#:key outputs #:allow-other-keys)
4483 ;; (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4484 ;; (doc (string-append data "/doc/" ,name "-" ,version))
4485 ;; (html (string-append doc "/html")))
4486 ;; (mkdir-p html)
4487 ;; (for-each (lambda (file)
4488 ;; (copy-file file (string-append doc "/" file)))
4489 ;; '("README.rst" "CHANGES.rst"))
4490 ;; (copy-recursively "build/sphinx/html" html)))))))
4491 (home-page "https://github.com/jaraco/path.py")
4492 (synopsis "Python module wrapper for built-in os.path")
4493 (description
4494 "@code{path.py} implements path objects as first-class entities, allowing
4495common operations on files to be invoked on those path objects directly.")
4496 (license license:expat)))
4497
4498(define-public python2-pathpy
4499 (package-with-python2 python-pathpy))
4500
4501(define-public python-simplegeneric
4502 (package
4503 (name "python-simplegeneric")
4504 (version "0.8.1")
4505 (source
4506 (origin
4507 (method url-fetch)
6c8c3980 4508 (uri (pypi-uri "simplegeneric" version ".zip"))
44d10b1f
RW
4509 (sha256
4510 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
4511 (build-system python-build-system)
4512 (native-inputs
4513 `(("unzip" ,unzip)))
4514 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
4515 (synopsis "Python module for simple generic functions")
4516 (description
4517 "The simplegeneric module lets you define simple single-dispatch generic
4518functions, akin to Python’s built-in generic functions like @code{len()},
4519@code{iter()} and so on. However, instead of using specially-named methods,
4520these generic functions use simple lookup tables, akin to those used by
4521e.g. @code{pickle.dump()} and other generic functions found in the Python
4522standard library.")
4523 (license license:zpl2.1)))
4524
4525(define-public python2-simplegeneric
4526 (package-with-python2 python-simplegeneric))
4527
4528(define-public python-ipython-genutils
4529 ;; TODO: This package is retired, check if can be removed, see description.
4530 (package
4531 (name "python-ipython-genutils")
4532 (version "0.1.0")
4533 (source
4534 (origin
4535 (method url-fetch)
c9671d4b 4536 (uri (pypi-uri "ipython_genutils" version))
44d10b1f
RW
4537 (sha256
4538 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
4539 (build-system python-build-system)
4540 (arguments `(#:tests? #f)) ; no tests
4541 (home-page "https://ipython.org")
4542 (synopsis "Vestigial utilities from IPython")
4543 (description
4544 "This package provides retired utilities from IPython. No packages
4545outside IPython/Jupyter should depend on it.
4546
4547This package shouldn't exist. It contains some common utilities shared by
4548Jupyter and IPython projects during The Big Split. As soon as possible, those
4549packages will remove their dependency on this, and this package will go
4550away.")
4551 (license license:bsd-3)))
4552
4553(define-public python2-ipython-genutils
4554 (package-with-python2 python-ipython-genutils))
4555
4556(define-public python-traitlets
4557 (package
4558 (name "python-traitlets")
4559 (version "4.3.2")
4560 (source
4561 (origin
4562 (method url-fetch)
4563 (uri (pypi-uri "traitlets" version))
4564 (sha256
4565 (base32
4566 "0dbq7sx26xqz5ixs711k5nc88p8a0nqyz6162pwks5dpcz9d4jww"))))
4567 (build-system python-build-system)
4568 (arguments
4569 `(#:phases
4570 (modify-phases %standard-phases
4571 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
4572 (propagated-inputs
4573 `(("python-ipython-genutils" ,python-ipython-genutils)
4574 ("python-decorator" ,python-decorator))) ;not needed for >4.3.2
4575 (native-inputs
4576 `(("python-pytest" ,python-pytest)))
4577 (properties `((python2-variant . ,(delay python2-traitlets))))
4578 (home-page "https://ipython.org")
4579 (synopsis "Configuration system for Python applications")
4580 (description
4581 "Traitlets is a framework that lets Python classes have attributes with
4582type checking, dynamically calculated default values, and ‘on change’
4583callbacks. The package also includes a mechanism to use traitlets for
4584configuration, loading values from files or from command line arguments. This
4585is a distinct layer on top of traitlets, so you can use traitlets in your code
4586without using the configuration machinery.")
4587 (license license:bsd-3)))
4588
4589(define-public python2-traitlets
4590 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
4591 (package
4592 (inherit traitlets)
4593 (propagated-inputs
4594 `(("python2-enum34" ,python2-enum34)
4595 ,@(package-propagated-inputs traitlets))))))
4596
4597(define-public python-jupyter-core
4598 (package
4599 (name "python-jupyter-core")
4600 (version "4.4.0")
4601 (source
4602 (origin
4603 (method url-fetch)
4604 (uri (string-append (pypi-uri "jupyter_core" version)))
4605 (sha256
4606 (base32
4607 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
4608 (build-system python-build-system)
4609 ;; FIXME: not sure how to run the tests
4610 (arguments `(#:tests? #f))
4611 (propagated-inputs
4612 `(("python-traitlets" ,python-traitlets)))
4613 (home-page "http://jupyter.org/")
4614 (synopsis "Jupyter base package")
4615 (description
4616 "Jupyter core is the base package on which Jupyter projects rely.")
4617 (license license:bsd-3)))
4618
4619(define-public python2-jupyter-core
4620 (package-with-python2 python-jupyter-core))
4621
4622(define-public python-jupyter-client
4623 (package
4624 (name "python-jupyter-client")
4625 (version "5.2.4")
4626 (source
4627 (origin
4628 (method url-fetch)
4629 (uri (pypi-uri "jupyter_client" version))
4630 (sha256
4631 (base32
4632 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
4633 (build-system python-build-system)
4634 ;; Tests fail because of missing native python kernel which I assume is
4635 ;; provided by the ipython package, which we cannot use because it would
4636 ;; cause a dependency cycle.
4637 (arguments `(#:tests? #f))
4638 (propagated-inputs
4639 `(("python-pyzmq" ,python-pyzmq)
4640 ("python-traitlets" ,python-traitlets)
4641 ("python-jupyter-core" ,python-jupyter-core)))
4642 (home-page "http://jupyter.org/")
4643 (synopsis "Jupyter protocol implementation and client libraries")
4644 (description
4645 "The @code{jupyter_client} package contains the reference implementation
4646of the Jupyter protocol. It also provides client and kernel management APIs
4647for working with kernels, and the @code{jupyter kernelspec} entrypoint for
4648installing @code{kernelspec}s for use with Jupyter frontends.")
4649 (license license:bsd-3)))
4650
4651(define-public python2-jupyter-client
4652 (package-with-python2 python-jupyter-client))
4653
4654(define-public python-ipykernel
4655 (package
4656 (name "python-ipykernel")
4657 (version "5.1.0")
4658 (source
4659 (origin
4660 (method url-fetch)
4661 (uri (pypi-uri "ipykernel" version))
4662 (sha256
4663 (base32 "0br95qhrd5k65g10djngiy27hs0642301hlf2q142i8djabvzh0g"))))
4664 (build-system python-build-system)
4665 (arguments
4666 `(#:phases
4667 (modify-phases %standard-phases
4668 (replace 'check
4669 (lambda _
4670 (setenv "HOME" "/tmp")
4671 (invoke "pytest" "-v")
4672 #t)))))
4673 (propagated-inputs
4674 `(("python-ipython" ,python-ipython)
4675 ;; imported at runtime during connect
4676 ("python-jupyter-client" ,python-jupyter-client)))
4677 (native-inputs
4678 `(("python-pytest" ,python-pytest)
4679 ("python-nose" ,python-nose)))
4680 (home-page "https://ipython.org")
4681 (synopsis "IPython Kernel for Jupyter")
4682 (description
4683 "This package provides the IPython kernel for Jupyter.")
4684 (license license:bsd-3)))
4685
4686(define-public python2-ipykernel
4687 (package-with-python2 python-ipykernel))
4688
966aa714
AE
4689(define-public python-pari-jupyter
4690 (package
4691 (name "python-pari-jupyter")
4692 (version "1.3.2")
4693 (source
4694 (origin
4695 (method url-fetch)
4696 (uri (pypi-uri "pari_jupyter" version))
4697 (sha256
4698 (base32
4699 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
4700 (build-system python-build-system)
4701 (propagated-inputs
4702 `(("python-ipykernel" ,python-ipykernel)))
4703 (inputs
4704 `(("pari-gp" ,pari-gp)
4705 ("readline" ,readline)))
4706 (arguments
4707 `(#:tests? #f)) ; no test suite
4708 (home-page
4709 "https://github.com/jdemeyer/pari_jupyter")
4710 (synopsis "A Jupyter kernel for PARI/GP")
4711 (description "The package provides a PARI/GP kernel for Jupyter.")
4712 (license license:gpl3+)))
4713
44d10b1f
RW
4714;; This is the latest release of the LTS version of ipython with support for
4715;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
4716;; dropped support for Python 2.7. We may want to rename this package.
4717(define-public python-ipython
4718 (package
4719 (name "python-ipython")
4720 (version "5.8.0")
4721 (source
4722 (origin
4723 (method url-fetch)
4724 (uri (pypi-uri "ipython" version ".tar.gz"))
4725 (sha256
4726 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
4727 (build-system python-build-system)
4728 (outputs '("out" "doc"))
4729 (propagated-inputs
4730 `(("python-pyzmq" ,python-pyzmq)
4731 ("python-prompt-toolkit" ,python-prompt-toolkit-1)
4732 ("python-terminado" ,python-terminado)
4733 ("python-matplotlib" ,python-matplotlib)
4734 ("python-numpy" ,python-numpy)
4735 ("python-numpydoc" ,python-numpydoc)
4736 ("python-jinja2" ,python-jinja2)
4737 ("python-mistune" ,python-mistune)
4738 ("python-pexpect" ,python-pexpect)
4739 ("python-pickleshare" ,python-pickleshare)
4740 ("python-simplegeneric" ,python-simplegeneric)
4741 ("python-jsonschema" ,python-jsonschema)
4742 ("python-traitlets" ,python-traitlets)
4743 ("python-nbformat" ,python-nbformat)
4744 ("python-pygments" ,python-pygments)))
4745 (inputs
4746 `(("readline" ,readline)
4747 ("which" ,which)))
4748 (native-inputs
4749 `(("graphviz" ,graphviz)
4750 ("pkg-config" ,pkg-config)
4751 ("python-requests" ,python-requests) ;; for tests
4752 ("python-testpath" ,python-testpath)
4753 ("python-nose" ,python-nose)
4754 ("python-sphinx" ,python-sphinx)
4755 ("python-shpinx-rtd-theme" ,python-sphinx-rtd-theme)
4756 ;; FIXME: It's possible that a smaller union would work just as well.
4757 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
4758 texlive-fonts-ec
4759 texlive-generic-ifxetex
4760 texlive-generic-pdftex
4761 texlive-latex-amsfonts
4762 texlive-latex-capt-of
4763 texlive-latex-cmap
4764 texlive-latex-environ
4765 texlive-latex-eqparbox
4766 texlive-latex-etoolbox
4767 texlive-latex-expdlist
4768 texlive-latex-fancyhdr
4769 texlive-latex-fancyvrb
4770 texlive-latex-fncychap
4771 texlive-latex-float
4772 texlive-latex-framed
4773 texlive-latex-geometry
4774 texlive-latex-graphics
4775 texlive-latex-hyperref
4776 texlive-latex-mdwtools
4777 texlive-latex-multirow
4778 texlive-latex-oberdiek
4779 texlive-latex-parskip
4780 texlive-latex-preview
4781 texlive-latex-tabulary
4782 texlive-latex-threeparttable
4783 texlive-latex-titlesec
4784 texlive-latex-trimspaces
4785 texlive-latex-ucs
4786 texlive-latex-upquote
4787 texlive-latex-url
4788 texlive-latex-varwidth
4789 texlive-latex-wrapfig)))
4790 ("texinfo" ,texinfo)))
4791 (arguments
4792 `(#:phases
4793 (modify-phases %standard-phases
4794 (add-after 'install 'install-doc
4795 (lambda* (#:key inputs outputs #:allow-other-keys)
4796 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4797 (doc (string-append data "/doc/" ,name "-" ,version))
4798 (html (string-append doc "/html"))
4799 (man1 (string-append data "/man/man1"))
4800 (info (string-append data "/info"))
4801 (examples (string-append doc "/examples"))
4802 (python-arg (string-append "PYTHON=" (which "python"))))
4803 (setenv "LANG" "en_US.utf8")
4804 ;; Make installed package available for running the tests
4805 (add-installed-pythonpath inputs outputs)
4806 (with-directory-excursion "docs"
4807 ;; FIXME: pdf fails to build
4808 ;;(system* "make" "pdf" "PAPER=a4")
4809 (system* "make" python-arg "html")
4810 (system* "make" python-arg "info"))
4811 (copy-recursively "docs/man" man1)
4812 (copy-recursively "examples" examples)
4813 (copy-recursively "docs/build/html" html)
4814 ;; (copy-file "docs/build/latex/ipython.pdf"
4815 ;; (string-append doc "/ipython.pdf"))
4816 (mkdir-p info)
4817 (copy-file "docs/build/texinfo/ipython.info"
4818 (string-append info "/ipython.info"))
4819 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
4820 #t))
4821 ;; Tests can only be run after the library has been installed and not
4822 ;; within the source directory.
4823 (delete 'check)
4824 (add-after 'install 'check
4825 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
4826 (if tests?
4827 (begin
4828 ;; Make installed package available for running the tests
4829 (add-installed-pythonpath inputs outputs)
4830 (setenv "HOME" "/tmp/") ;; required by a test
4831 ;; We only test the core because one of the other tests
4832 ;; tries to import ipykernel.
4833 (invoke "python" "IPython/testing/iptest.py"
4834 "-v" "IPython/core/tests"))
4835 #t)))
4836 (add-before 'check 'fix-tests
4837 (lambda* (#:key inputs #:allow-other-keys)
4838 (substitute* "./IPython/utils/_process_posix.py"
4839 (("/usr/bin/env', 'which") (which "which")))
4840 (substitute* "./IPython/core/tests/test_inputtransformer.py"
4841 (("#!/usr/bin/env python")
4842 (string-append "#!" (which "python"))))
4843 ;; Disable 1 failing test
4844 (substitute* "./IPython/core/tests/test_magic.py"
4845 (("def test_dirops\\(\\):" all)
4846 (string-append "@dec.skipif(True)\n" all)))
4847 ;; This test introduces a circular dependency on ipykernel
4848 ;; (which depends on ipython).
4849 (delete-file "IPython/core/tests/test_display.py")
4850 ;; These tests throw errors for unknown reasons.
4851 (delete-file "IPython/extensions/tests/test_storemagic.py")
4852 (delete-file "IPython/core/tests/test_displayhook.py")
4853 (delete-file "IPython/core/tests/test_interactiveshell.py")
4854 (delete-file "IPython/core/tests/test_pylabtools.py")
4855 (delete-file "IPython/core/tests/test_paths.py")
4856 #t)))))
4857 (home-page "https://ipython.org")
4858 (synopsis "IPython is a tool for interactive computing in Python")
4859 (description
4860 "IPython provides a rich architecture for interactive computing with:
4861Powerful interactive shells, a browser-based notebook, support for interactive
4862data visualization, embeddable interpreters and tools for parallel
4863computing.")
4864 (license license:bsd-3)
4865 (properties `((python2-variant . ,(delay python2-ipython))))))
4866
4867(define-public python2-ipython
4868 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
4869 (package
4870 (inherit ipython)
4871 ;; FIXME: add pyreadline once available.
4872 (propagated-inputs
4873 `(("python2-backports-shutil-get-terminal-size"
4874 ,python2-backports-shutil-get-terminal-size)
4875 ("python2-pathlib2" ,python2-pathlib2)
4876 ,@(package-propagated-inputs ipython)))
4877 (native-inputs
4878 `(("python2-mock" ,python2-mock)
4879 ,@(package-native-inputs ipython))))))
4880
4881(define-public python-urwid
4882 (package
4883 (name "python-urwid")
4884 (version "2.0.1")
4885 (source
4886 (origin
4887 (method url-fetch)
4888 (uri (pypi-uri "urwid" version))
4889 (sha256
4890 (base32
4891 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
4892 (build-system python-build-system)
4893 (home-page "http://urwid.org")
4894 (synopsis "Console user interface library for Python")
4895 (description
4896 "Urwid is a curses-based UI/widget library for Python. It includes many
4897features useful for text console applications.")
4898 (license license:lgpl2.1+)))
4899
4900(define-public python2-urwid
4901 (package-with-python2 python-urwid))
4902
4903(define-public python-urwidtrees
4904 (package
4905 (name "python-urwidtrees")
4906 (version "1.0.2")
4907 (source
4908 (origin
4909 (method url-fetch)
4910 ;; package author intends on distributing via github rather than pypi:
4911 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
4912 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
4913 version ".tar.gz"))
4914 (file-name (string-append name "-" version ".tar.gz"))
4915 (sha256
4916 (base32
4917 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
4918 (build-system python-build-system)
4919 (arguments
4920 '(#:tests? #f)) ; no tests
4921 (propagated-inputs `(("python-urwid" ,python-urwid)))
4922 (home-page "https://github.com/pazz/urwidtrees")
4923 (synopsis "Tree widgets for urwid")
4924 (description "Urwidtrees is a Widget Container API for the @code{urwid}
4925toolkit. Use it to build trees of widgets.")
4926 (license license:gpl3+)))
4927
4928(define-public python2-urwidtrees
4929 (package-with-python2 python-urwidtrees))
4930
4931(define-public python-ua-parser
4932 (package
4933 (name "python-ua-parser")
4934 (version "0.8.0")
4935 (source
4936 (origin
4937 (method url-fetch)
4938 (uri (pypi-uri "ua-parser" version))
4939 (sha256
4940 (base32
4941 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
4942 (build-system python-build-system)
4943 (arguments
4944 `(#:tests? #f)) ;no test suite in release
4945 (native-inputs
4946 `(("python-pyyaml" ,python-pyyaml)))
4947 (home-page "https://github.com/ua-parser/uap-python")
4948 (synopsis "User agent parser")
4949 (description
4950 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
4951 (license license:asl2.0)))
4952
4953(define-public python2-ua-parser
4954 (package-with-python2 python-ua-parser))
4955
4956(define-public python-user-agents
4957 (package
4958 (name "python-user-agents")
4959 (version "1.1.0")
4960 (source
4961 (origin
4962 (method url-fetch)
4963 (uri (pypi-uri "user-agents" version))
4964 (sha256
4965 (base32
4966 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
4967 (build-system python-build-system)
4968 (arguments
4969 `(#:tests? #f)) ;missing devices.json test file in release
4970 (propagated-inputs
4971 `(("python-ua-parser" ,python-ua-parser)))
4972 (home-page "https://github.com/selwin/python-user-agents")
4973 (synopsis "User Agent strings parsing library")
4974 (description
4975 "A library to identify devices (phones, tablets) and their capabilities by
4976parsing (browser/HTTP) user agent strings.")
4977 (license license:expat)))
4978
4979(define-public python2-user-agents
4980 (package-with-python2 python-user-agents))
4981
4982(define-public python-dbus
4983 (package
4984 (name "python-dbus")
4985 (version "1.2.8")
4986 (source
4987 (origin
4988 (method url-fetch)
4989 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
4990 "dbus-python-" version ".tar.gz"))
4991 (sha256
4992 (base32
4993 "0vvvjmiwnc9cjlks3gcdk43ap7llhlpz7cm1wbw0nc2yfsxjpwdb"))))
4994 (build-system gnu-build-system)
4995 (arguments
4996 '(#:phases
4997 (modify-phases %standard-phases
4998 (add-before
4999 'check 'pre-check
5000 (lambda _
5001 ;; XXX: For the missing '/etc/machine-id'.
5002 (substitute* "test/run-test.sh"
5003 (("DBUS_FATAL_WARNINGS=1")
5004 "DBUS_FATAL_WARNINGS=0"))
5005 #t)))))
5006 (native-inputs
5007 `(("pkg-config" ,pkg-config)))
5008 (inputs
5009 `(("python" ,python-wrapper)
5010 ("dbus-glib" ,dbus-glib)))
5011 (synopsis "Python bindings for D-bus")
5012 (description "python-dbus provides bindings for libdbus, the reference
5013implementation of D-Bus.")
5014 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
5015 (license license:expat)))
5016
5017(define-public python2-dbus
5018 (package (inherit python-dbus)
5019 (name "python2-dbus")
5020 (inputs `(("python" ,python-2)
5021 ,@(alist-delete "python"
5022 (package-inputs python-dbus)
5023 equal?)))
5024 ;; FIXME: on Python 2, the test_utf8 fails with:
5025 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5026 (arguments `(#:tests? #f))))
5027
5028(define-public python-lxml
5029 (package
5030 (name "python-lxml")
5031 (version "4.2.5")
5032 (source
5033 (origin
5034 (method url-fetch)
5035 (uri (pypi-uri "lxml" version))
5036 (sha256
5037 (base32
5038 "0zw0y9hs0nflxhl9cs6ipwwh53szi3w2x06wl0k9cylyqac0cwin"))))
5039 (build-system python-build-system)
5040 (inputs
5041 `(("libxml2" ,libxml2)
5042 ("libxslt" ,libxslt)))
5043 (home-page "http://lxml.de/")
5044 (synopsis
5045 "Python XML processing library")
5046 (description
5047 "The lxml XML toolkit is a Pythonic binding for the C libraries
5048libxml2 and libxslt.")
5049 (license license:bsd-3))) ; and a few more, see LICENSES.txt
5050
5051(define-public python2-lxml
5052 (package-with-python2 python-lxml))
5053
5054;; beautifulsoup4 has a totally different namespace than 3.x,
5055;; and pypi seems to put it under its own name, so I guess we should too
5056(define-public python-beautifulsoup4
5057 (package
5058 (name "python-beautifulsoup4")
5059 (version "4.6.3")
5060 (source
5061 (origin
5062 (method url-fetch)
5063 (uri (pypi-uri "beautifulsoup4" version))
5064 (sha256
5065 (base32
5066 "041dhalzjciw6qyzzq7a2k4h1yvyk76xigp35hv5ibnn448ydy4h"))))
5067 (build-system python-build-system)
5068 (arguments
5069 `(#:phases
5070 (modify-phases %standard-phases
5071 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5072 ;; must use this conversion script when building with Python 3. The
5073 ;; conversion script also runs the tests.
5074 ;; For more information, see the file 'convert-py3k' in the source
5075 ;; distribution.
5076 (replace 'check
dff0197e 5077 (lambda _ (invoke "./convert-py3k"))))))
44d10b1f
RW
5078 (home-page
5079 "https://www.crummy.com/software/BeautifulSoup/bs4/")
5080 (synopsis
5081 "Python screen-scraping library")
5082 (description
5083 "Beautiful Soup is a Python library designed for rapidly setting up
5084screen-scraping projects. It offers Pythonic idioms for navigating,
5085searching, and modifying a parse tree, providing a toolkit for
5086dissecting a document and extracting what you need. It automatically
5087converts incoming documents to Unicode and outgoing documents to UTF-8.")
5088 (license license:expat)
5089 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5090
5091(define-public python2-beautifulsoup4
5092 (package
5093 (inherit (package-with-python2
5094 (strip-python2-variant python-beautifulsoup4)))
5095 (arguments `(#:python ,python-2))))
5096
5097(define-public python-netifaces
5098 (package
5099 (name "python-netifaces")
5100 (version "0.10.7")
5101 (source
5102 (origin
5103 (method url-fetch)
5104 (uri (pypi-uri "netifaces" version))
5105 (sha256
5106 (base32
5107 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
5108 (build-system python-build-system)
5109 (home-page "https://github.com/al45tair/netifaces")
5110 (synopsis
5111 "Python module for portable network interface information")
5112 (description
5113 "Netifaces is a Python module providing information on network
5114interfaces in an easy and portable manner.")
5115 (license license:expat)))
5116
5117(define-public python2-netifaces
5118 (package-with-python2 python-netifaces))
5119
5120(define-public python-networkx
5121 (package
5122 (name "python-networkx")
5123 (version "2.2")
5124 (source
5125 (origin
5126 (method url-fetch)
5127 (uri (pypi-uri "networkx" version ".zip"))
5128 (sha256
5129 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
5130 (build-system python-build-system)
5131 ;; python-decorator is needed at runtime.
5132 (propagated-inputs
5133 `(("python-decorator" ,python-decorator)))
5134 (native-inputs
5135 `(("python-nose" ,python-nose)
5136 ("unzip" ,unzip)))
5137 (home-page "https://networkx.github.io/")
5138 (synopsis "Python module for creating and manipulating graphs and networks")
5139 (description
5140 "NetworkX is a Python package for the creation, manipulation, and study
5141of the structure, dynamics, and functions of complex networks.")
5142 (license license:bsd-3)))
5143
5144(define-public python2-networkx
5145 (package-with-python2 python-networkx))
5146
5147(define-public python-datrie
5148 (package
5149 (name "python-datrie")
5150 (version "0.7.1")
5151 (source
5152 (origin
5153 (method url-fetch)
5154 (uri (pypi-uri "datrie" version))
5155 (sha256
5156 (base32
5157 "08r0if7dry2q7p34gf7ffyrlnf4bdvnprxgydlfxgfnvq8f3f4bs"))))
5158 (build-system python-build-system)
5159 (arguments
5160 `(#:phases (modify-phases %standard-phases
5161 (add-before 'build 'cythonize
5162 (lambda _
5163 ;; Regenerate Cython classes to solve ABI issues with Python
5164 ;; 3.7.0. See <https://github.com/pytries/datrie/issues/52>.
5165 (invoke "cython" "src/datrie.pyx" "src/cdatrie.pxd"
5166 "src/stdio_ext.pxd" "-a"))))))
5167 (native-inputs
5168 `(("python-cython" ,python-cython)
5169 ("python-hypothesis" ,python-hypothesis)
5170 ("python-pytest" ,python-pytest)
5171 ("python-pytest-runner" ,python-pytest-runner)))
5172 (home-page "https://github.com/kmike/datrie")
5173 (synopsis "Fast, efficiently stored trie for Python")
5174 (description
5175 "This package provides a fast, efficiently stored trie implementation for
5176Python.")
5177 (license license:lgpl2.1+)))
5178
5179(define-public snakemake
5180 (package
5181 (name "snakemake")
5182 (version "5.2.4")
5183 (source
5184 (origin
5185 (method url-fetch)
5186 (uri (pypi-uri "snakemake" version))
5187 (sha256
5188 (base32 "0gj0xxgiq3mp9qyyrbfzldiaq1giliqw0in64nqiz7vx49myqj7z"))))
5189 (build-system python-build-system)
5190 (arguments
5191 ;; TODO: Package missing test dependencies.
5192 '(#:tests? #f
5193 #:phases
5194 (modify-phases %standard-phases
5195 ;; For cluster execution Snakemake will call Python. Since there is
5196 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
5197 ;; this by calling the snakemake wrapper instead.
5198 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
5199 (lambda* (#:key outputs #:allow-other-keys)
5200 (substitute* "snakemake/executors.py"
5201 (("\\{sys.executable\\} -m snakemake")
5202 (string-append (assoc-ref outputs "out")
5203 "/bin/snakemake")))
5204 #t)))))
5205 (propagated-inputs
5206 `(("python-gitpython" ,python-gitpython)
5207 ("python-wrapt" ,python-wrapt)
5208 ("python-requests" ,python-requests)
5209 ("python-appdirs" ,python-appdirs)
5210 ("python-configargparse" ,python-configargparse)
5211 ("python-datrie" ,python-datrie)
5212 ("python-docutils" ,python-docutils)
5213 ("python-jinja2" ,python-jinja2)
5214 ("python-jsonschema" ,python-jsonschema)
5215 ("python-networkx" ,python-networkx)
5216 ("python-pyyaml" ,python-pyyaml)
5217 ("python-ratelimiter" ,python-ratelimiter)))
5218 (home-page "https://snakemake.readthedocs.io")
5219 (synopsis "Python-based execution environment for make-like workflows")
5220 (description
5221 "Snakemake aims to reduce the complexity of creating workflows by
5222providing a clean and modern domain specific specification language (DSL) in
5223Python style, together with a fast and comfortable execution environment.")
5224 (license license:expat)))
5225
5226;; This is currently needed for the pigx-* packages.
5227(define-public snakemake-4
5228 (package (inherit snakemake)
5229 (version "4.4.0")
5230 (source
5231 (origin
5232 (method url-fetch)
5233 (uri (pypi-uri "snakemake" version))
5234 (sha256
5235 (base32 "0g0paia4z7w3srnqdmavq3hrb2x7qnpf81jx50njl0p7y4y0j8jv"))))
5236 (propagated-inputs
5237 `(("python-wrapt" ,python-wrapt)
5238 ("python-requests" ,python-requests)
5239 ("python-appdirs" ,python-appdirs)
5240 ("python-configargparse" ,python-configargparse)
5241 ("python-pyyaml" ,python-pyyaml)
5242 ("python-ratelimiter" ,python-ratelimiter)))))
5243
5244(define-public python-pyqrcode
5245 (package
5246 (name "python-pyqrcode")
5247 (version "1.2.1")
5248 (source
5249 (origin
5250 (method url-fetch)
5251 (uri (pypi-uri "PyQRCode" version))
5252 (sha256
5253 (base32
5254 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
5255 (build-system python-build-system)
5256 (home-page
5257 "https://github.com/mnooner256/pyqrcode")
5258 (synopsis "QR code generator")
5259 (description
5260 "Pyqrcode is a QR code generator written purely in Python with
5261SVG, EPS, PNG and terminal output.")
5262 (license license:bsd-3)))
5263
5264(define-public python-seaborn
5265 (package
5266 (name "python-seaborn")
5267 (version "0.9.0")
5268 (source
5269 (origin
5270 (method url-fetch)
5271 (uri (pypi-uri "seaborn" version))
5272 (sha256
5273 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))))
5274 (build-system python-build-system)
5275 (arguments
5276 `(#:phases
5277 (modify-phases %standard-phases
5278 (add-before 'check 'start-xserver
5279 (lambda* (#:key inputs #:allow-other-keys)
5280 (let ((xorg-server (assoc-ref inputs "xorg-server")))
5281 ;; There must be a running X server and make check doesn't
5282 ;; start one. Therefore we must do it.
5283 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
5284 (setenv "DISPLAY" ":1")
5285 #t)))
5286 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
5287 (propagated-inputs
5288 `(("python-pandas" ,python-pandas)
5289 ("python-matplotlib" ,python-matplotlib)
5290 ("python-numpy" ,python-numpy)
5291 ("python-scipy" ,python-scipy)))
5292 (native-inputs
5293 `(("python-pytest" ,python-pytest)
5294 ("xorg-server" ,xorg-server)))
5295 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5296 (synopsis "Statistical data visualization")
5297 (description
5298 "Seaborn is a library for making attractive and informative statistical
5299graphics in Python. It is built on top of matplotlib and tightly integrated
5300with the PyData stack, including support for numpy and pandas data structures
5301and statistical routines from scipy and statsmodels.")
5302 (license license:bsd-3)))
5303
5304(define-public python2-seaborn
5305 (package-with-python2 python-seaborn))
5306
5307(define-public python-mpmath
5308 (package
5309 (name "python-mpmath")
5310 (version "0.19")
5311 (source (origin
5312 (method url-fetch)
5313 (uri (string-append "http://mpmath.org/files/mpmath-"
5314 version ".tar.gz"))
5315 (sha256
5316 (base32
5317 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
5318 (build-system python-build-system)
5319 (arguments
5320 '(#:phases
5321 (modify-phases %standard-phases
5322 (replace 'check
5323 (lambda _
5d7a6f1c 5324 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
44d10b1f
RW
5325 (home-page "http://mpmath.org")
5326 (synopsis "Arbitrary-precision floating-point arithmetic in python")
5327 (description
5328 "@code{mpmath} can be used as an arbitrary-precision substitute for
5329Python's float/complex types and math/cmath modules, but also does much
5330more advanced mathematics.")
5331 (license license:bsd-3)))
5332
5333(define-public python2-mpmath
5334 (package-with-python2 python-mpmath))
5335
5336(define-public python-bigfloat
5337 (package
5338 (name "python-bigfloat")
5339 (version "0.3.0")
5340 (source
5341 (origin
5342 (method url-fetch)
5343 (uri (pypi-uri "bigfloat" version))
5344 (sha256
5345 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
5346 (build-system python-build-system)
5347 (inputs
5348 `(("mpfr" ,mpfr)))
5349 (home-page "https://github.com/mdickinson/bigfloat")
5350 (synopsis "Arbitrary precision floating-point arithmetic for Python")
5351 (description
5352 "This packages provides a Python interface to the MPFR library for
5353multiprecision arithmetic.")
5354 (license license:lgpl3+)))
5355
5356(define-public python2-bigfloat
5357 (package-with-python2 python-bigfloat))
5358
5359(define-public python-sympy
5360 (package
5361 (name "python-sympy")
5362 (version "1.1.1")
5363 (source
5364 (origin
5365 (method url-fetch)
5366 (uri (string-append
5367 "https://github.com/sympy/sympy/releases/download/sympy-"
5368 version "/sympy-" version ".tar.gz"))
5369 (sha256
5370 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
5371 (build-system python-build-system)
5372 (arguments
5373 `(#:phases
5374 (modify-phases %standard-phases
5375 ;; Run the core tests after installation. By default it would run
5376 ;; *all* tests, which take a very long time to complete and are known
5377 ;; to be flaky.
5378 (delete 'check)
5379 (add-after 'install 'check
5380 (lambda* (#:key outputs #:allow-other-keys)
5381 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
5382 #t)))))
5383 (propagated-inputs
5384 `(("python-mpmath" ,python-mpmath)))
5385 (home-page "http://www.sympy.org/")
5386 (synopsis "Python library for symbolic mathematics")
5387 (description
5388 "SymPy is a Python library for symbolic mathematics. It aims to become a
5389full-featured computer algebra system (CAS) while keeping the code as simple
5390as possible in order to be comprehensible and easily extensible.")
5391 (license license:bsd-3)))
5392
5393(define-public python2-sympy
5394 (package
5395 (inherit (package-with-python2 python-sympy))
5396 (arguments
5397 `(#:phases
5398 (modify-phases %standard-phases
5399 ;; Run the core tests after installation. By default it would run
5400 ;; *all* tests, which take a very long time to complete and are known
5401 ;; to be flaky.
5402 (delete 'check)
5403 (add-after 'install 'check
5404 (lambda* (#:key outputs #:allow-other-keys)
5405 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
5406 #t)))))))
5407
5408(define-public python-q
5409 (package
5410 (name "python-q")
5411 (version "2.6")
5412 (source
5413 (origin
5414 (method url-fetch)
5415 (uri (pypi-uri "q" version))
5416 (sha256
5417 (base32
5418 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
5419 (build-system python-build-system)
5420 (home-page "https://github.com/zestyping/q")
5421 (synopsis "Quick-and-dirty debugging output for tired programmers")
5422 (description
5423 "q is a Python module for \"print\" style of debugging Python code. It
5424provides convenient short API for print out of values, tracebacks, and
5425falling into the Python interpreter.")
5426 (license license:asl2.0)))
5427
5428(define-public python2-q
5429 (package-with-python2 python-q))
5430
5431(define-public python2-xlib
5432 (package
5433 (name "python2-xlib")
5434 (version "0.14")
5435 (source (origin
5436 (method url-fetch)
5437 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
5438 "/" version "/"
5439 "python-xlib-" version ".tar.gz"))
5440 (sha256
5441 (base32
5442 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
5443 (build-system python-build-system)
5444 (arguments
5445 `(#:python ,python-2 ;Python 2 only
5446 #:tests? #f)) ;no tests
5447 (home-page "http://python-xlib.sourceforge.net/")
5448 (synopsis "Python X11 client library")
5449 (description
5450 "The Python X Library is intended to be a fully functional X client
5451library for Python programs. It is useful to implement low-level X clients.
5452It is written entirely in Python.")
5453 (license license:gpl2+)))
5454
5455(define-public python-singledispatch
5456 (package
5457 (name "python-singledispatch")
5458 (version "3.4.0.3")
5459 (source
5460 (origin
5461 (method url-fetch)
5462 (uri (pypi-uri "singledispatch" version))
5463 (sha256
5464 (base32
5465 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
5466 (build-system python-build-system)
5467 (native-inputs
5468 `(("python-six" ,python-six))) ; required for conversion, not at run-time
5469 (home-page
5470 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
5471 (synopsis "Backport of singledispatch feature from Python 3.4")
5472 (description
5473 "This library brings functools.singledispatch from Python 3.4 to Python
54742.6-3.3.")
5475 (license license:expat)))
5476
5477(define-public python2-singledispatch
5478 (package-with-python2 python-singledispatch))
5479
5480;; the python- version can be removed with python-3.5
5481(define-public python-backports-abc
5482 (package
5483 (name "python-backports-abc")
5484 (version "0.5")
5485 (source
5486 (origin
5487 (method url-fetch)
5488 (uri (pypi-uri "backports_abc" version))
5489 (sha256
5490 (base32
5491 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
5492 (build-system python-build-system)
5493 (home-page "https://github.com/cython/backports_abc")
5494 (synopsis "Backport of additions to the 'collections.abc' module")
5495 (description
5496 "Python-backports-abc provides a backport of additions to the
5497'collections.abc' module in Python-3.5.")
5498 (license license:psfl)))
5499
5500(define-public python2-backports-abc
5501 (package-with-python2 python-backports-abc))
5502
5503(define-public python-backports-csv
5504 (package
5505 (name "python-backports-csv")
5506 (version "1.0.5")
5507 (source
5508 (origin
5509 (method url-fetch)
5510 (uri (pypi-uri "backports.csv" version))
5511 (sha256
5512 (base32
5513 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
5514 (build-system python-build-system)
5515 (home-page "https://github.com/ryanhiebert/backports.csv")
5516 (synopsis "Backport of Python 3's csv module for Python 2")
5517 (description
5518 "Provides a backport of Python 3's @code{csv} module for parsing
5519comma separated values. The API of the @code{csv} module in Python 2
5520is drastically different from the @code{csv} module in Python 3.
5521This is due, for the most part, to the difference between str in
5522Python 2 and Python 3.")
5523 (license license:psfl)))
5524
5525(define-public python2-backports-csv
5526 (package-with-python2 python-backports-csv))
5527
5528(define-public python2-backports-shutil-get-terminal-size
5529 (package
5530 (name "python2-backports-shutil-get-terminal-size")
5531 (version "1.0.0")
5532 (source
5533 (origin
5534 (method url-fetch)
5535 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
5536 (sha256
5537 (base32
5538 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
5539 (build-system python-build-system)
5540 (arguments
5541 `(#:python ,python-2
5542 #:phases
5543 (modify-phases %standard-phases
5544 (replace 'check
5545 (lambda _
4a4a7d9a 5546 (invoke "py.test" "-v"))))))
44d10b1f
RW
5547 (native-inputs
5548 `(("python2-pytest" ,python2-pytest)))
5549 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
5550 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
5551 (description
5552 "This package provides a backport of the @code{get_terminal_size
5553function} from Python 3.3's @code{shutil}.
5554Unlike the original version it is written in pure Python rather than C,
5555so it might be a tiny bit slower.")
5556 (license license:expat)))
5557
5558(define-public python-waf
5559 (package
5560 (name "python-waf")
5561 (version "2.0.11")
5562 (source (origin
5563 (method url-fetch)
5564 (uri (string-append "https://waf.io/"
5565 "waf-" version ".tar.bz2"))
5566 (sha256
5567 (base32
5568 "13zrniwkmfqgsgzi9v5m1367fppp9yzrz6z2ny6hy8dmpb8mj4z4"))))
5569 (build-system python-build-system)
5570 (arguments
5571 '(#:phases
5572 (modify-phases %standard-phases
5573 (replace 'build
5574 (lambda _
5575 (invoke "python" "waf-light" "configure" "build")))
5576 (replace 'check
5577 (lambda _
5578 (invoke "python" "waf" "--version")))
5579 (replace 'install
5580 (lambda* (#:key outputs #:allow-other-keys)
5581 (let ((out (assoc-ref outputs "out")))
5582 (install-file "waf" (string-append out "/bin")))
5583 #t))
5584 ;; waf breaks when it is wrapped.
5585 (delete 'wrap))))
5586 (home-page "https://waf.io/")
5587 (synopsis "Python-based build system")
5588 (description
5589 "Waf is a Python-based framework for configuring, compiling and installing
5590applications.")
5591 (license license:bsd-3)))
5592
5593(define-public python2-waf
5594 (package-with-python2 python-waf))
5595
5596(define-public python-pyzmq
5597 (package
5598 (name "python-pyzmq")
5599 (version "17.1.2")
5600 (source
5601 (origin
5602 (method url-fetch)
5603 (uri (pypi-uri "pyzmq" version))
5604 (sha256
5605 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
5606 (build-system python-build-system)
5607 (arguments
5608 `(#:configure-flags
5609 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
5610 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
5611 ;; --inplace' for 'python setup.py test' to work.
5612 #:tests? #f))
5613 (inputs
5614 `(("zeromq" ,zeromq)))
5615 (native-inputs
5616 `(("pkg-config" ,pkg-config)
5617 ("python-nose" ,python-nose)))
5618 (home-page "https://github.com/zeromq/pyzmq")
5619 (synopsis "Python bindings for 0MQ")
5620 (description
5621 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
5622 (license license:bsd-4)))
5623
5624(define-public python2-pyzmq
5625 (package-with-python2 python-pyzmq))
5626
5627(define-public python-pep8
5628 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
5629 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
5630 ;; some dependents' test suites, and nothing more.
5631 (package
5632 (name "python-pep8")
5633 (version "1.7.0")
5634 (source
5635 (origin
5636 (method url-fetch)
5637 (uri (pypi-uri "pep8" version))
5638 (sha256
5639 (base32
5640 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
5641 (build-system python-build-system)
5642 (home-page "https://pep8.readthedocs.org/")
5643 (synopsis "Python style guide checker")
5644 (description
5645 "This tools checks Python code against some of the style conventions in
5646PEP 8.")
5647 (license license:expat)))
5648
5649(define-public python2-pep8
5650 (package-with-python2 python-pep8))
5651
5652(define-public python-pyflakes
5653 (package
5654 (name "python-pyflakes")
d0cba11b 5655 (version "2.1.1")
44d10b1f
RW
5656 (source
5657 (origin
5658 (method url-fetch)
5659 (uri (pypi-uri "pyflakes" version))
5660 (sha256
5661 (base32
d0cba11b 5662 "18pq95a1xj2dgdd0m85gyfsn40jajj4xc3lp8wfv7igqhrc86xnr"))))
44d10b1f
RW
5663 (build-system python-build-system)
5664 (home-page
5665 "https://github.com/pyflakes/pyflakes")
5666 (synopsis "Passive checker of Python programs")
5667 (description
5668 "Pyflakes statically checks Python source code for common errors.")
5669 (license license:expat)))
5670
5671(define-public python2-pyflakes
5672 (package-with-python2 python-pyflakes))
5673
5674(define-public python-mccabe
5675 (package
5676 (name "python-mccabe")
5677 (version "0.6.1")
5678 (source
5679 (origin
5680 (method url-fetch)
5681 (uri (pypi-uri "mccabe" version))
5682 (sha256
5683 (base32
5684 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
5685 (build-system python-build-system)
5686 (native-inputs
5687 `(("python-pytest" ,python-pytest-bootstrap)
5688 ("python-pytest-runner" ,python-pytest-runner)))
5689 (home-page "https://github.com/flintwork/mccabe")
5690 (synopsis "McCabe checker, plugin for flake8")
5691 (description
5692 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
5693complexity of Python source code.")
5694 (license license:expat)))
5695
5696(define-public python2-mccabe
5697 (package-with-python2 python-mccabe))
5698
5699(define-public python-mccabe-0.2.1
5700 (package (inherit python-mccabe)
5701 (version "0.2.1")
5702 (source
5703 (origin
5704 (method url-fetch)
5705 (uri (pypi-uri "mccabe" version))
5706 (sha256
5707 (base32
5708 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
5709
5710(define-public python2-mccabe-0.2.1
5711 (package-with-python2 python-mccabe-0.2.1))
5712
5713;; Flake8 2.4.1 requires an older version of pep8.
5714;; This should be removed ASAP.
5715(define-public python-pep8-1.5.7
5716 (package (inherit python-pep8)
5717 (version "1.5.7")
5718 (source
f3576970
RW
5719 (origin
5720 (method url-fetch)
5721 (uri (pypi-uri "pep8" version))
5722 (sha256
5723 (base32
5724 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
44d10b1f
RW
5725 (arguments
5726 ;; XXX Tests not compatible with Python 3.5.
5727 '(#:tests? #f))))
5728
5729(define-public python2-pep8-1.5.7
5730 (package-with-python2 python-pep8-1.5.7))
5731
5732;; Flake8 2.4.1 requires an older version of pyflakes.
5733;; This should be removed ASAP.
5734(define-public python-pyflakes-0.8.1
5735 (package (inherit python-pyflakes)
5736 (version "0.8.1")
5737 (source
8c4dffb5
RW
5738 (origin
5739 (method url-fetch)
5740 (uri (pypi-uri "pyflakes" version))
5741 (sha256
5742 (base32
5743 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
44d10b1f
RW
5744 (arguments
5745 ;; XXX Tests not compatible with Python 3.5.
5746 '(#:tests? #f))))
5747
5748(define-public python2-pyflakes-0.8.1
5749 (package-with-python2 python-pyflakes-0.8.1))
5750
ac63cf0a 5751(define-public python-flake8
44d10b1f
RW
5752 (package
5753 (name "python-flake8")
beaff4a8 5754 (version "3.7.7")
ac63cf0a
MB
5755 (source (origin
5756 (method url-fetch)
5757 (uri (pypi-uri "flake8" version))
5758 (sha256
5759 (base32
beaff4a8 5760 "0qg6zggqigrd4k3gv88shd1a27d0cwgfql8vfiq2c7rl7w3rd6c5"))))
44d10b1f
RW
5761 (build-system python-build-system)
5762 (arguments
5763 `(#:phases
5764 (modify-phases %standard-phases
44d10b1f
RW
5765 (delete 'check)
5766 (add-after 'install 'check
5767 (lambda* (#:key inputs outputs #:allow-other-keys)
5768 (add-installed-pythonpath inputs outputs)
5769 (invoke "pytest" "-v")
5770 #t)))))
5771 (propagated-inputs
5772 `(("python-pycodestyle" ,python-pycodestyle)
beaff4a8 5773 ("python-entrypoints" ,python-entrypoints)
44d10b1f
RW
5774 ("python-pyflakes" ,python-pyflakes)
5775 ("python-mccabe" ,python-mccabe)))
5776 (native-inputs
5777 `(("python-mock" ,python-mock)
5778 ("python-pytest" ,python-pytest-bootstrap)
5779 ("python-pytest-runner" ,python-pytest-runner)))
5780 (home-page "https://gitlab.com/pycqa/flake8")
5781 (synopsis
5782 "The modular source code checker: pep8, pyflakes and co")
5783 (description
5784 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
ac63cf0a 5785 (properties `((python2-variant . ,(delay python2-flake8))))
44d10b1f
RW
5786 (license license:expat)))
5787
ac63cf0a
MB
5788(define-public python2-flake8
5789 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
44d10b1f
RW
5790 (package (inherit base)
5791 (propagated-inputs
5792 `(("python2-configparser" ,python2-configparser)
5793 ("python2-enum34" ,python2-enum34)
beaff4a8 5794 ("python2-typing" ,python2-typing)
44d10b1f
RW
5795 ,@(package-propagated-inputs base))))))
5796
44d10b1f
RW
5797;; python-hacking requires flake8 <2.6.0.
5798(define-public python-flake8-2.5
5799 (package
5800 (inherit python-flake8)
5801 (version "2.5.5")
5802 (source (origin
5803 (method url-fetch)
5804 (uri (pypi-uri "flake8" version))
5805 (sha256
5806 (base32
5807 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
5808 (propagated-inputs
5809 `(("python-pep8" ,python-pep8)
5810 ,@(package-propagated-inputs python-flake8)))
5811 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
5812
5813(define-public python2-flake8-2.5
5814 (package
5815 (inherit python2-flake8)
5816 (version (package-version python-flake8-2.5))
5817 (source (origin
5818 (inherit (package-source python-flake8-2.5))))
5819 (propagated-inputs
5820 `(("python2-pep8" ,python2-pep8)
5821 ,@(package-propagated-inputs python2-flake8)))))
5822
5823(define-public python-flake8-polyfill
5824 (package
5825 (name "python-flake8-polyfill")
5826 (version "1.0.2")
5827 (source
5828 (origin
5829 (method url-fetch)
5830 (uri (pypi-uri "flake8-polyfill" version))
5831 (sha256
5832 (base32
5833 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
5834 (build-system python-build-system)
5835 (arguments
5836 '(#:phases
5837 (modify-phases %standard-phases
5838 (replace 'check
5839 (lambda _
5840 (setenv "PYTHONPATH"
5841 (string-append (getcwd) "/build/lib:"
5842 (getenv "PYTHONPATH")))
4f0a0894 5843 (invoke "py.test" "-v"))))))
44d10b1f
RW
5844 (native-inputs
5845 `(("python-flake8" ,python-flake8)
5846 ("python-mock" ,python-mock)
5847 ("python-pep8" ,python-pep8)
5848 ("python-pycodestyle" ,python-pycodestyle)
5849 ("python-pytest" ,python-pytest)))
5850 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
5851 (synopsis "Polyfill package for Flake8 plugins")
5852 (description
5853 "This package that provides some compatibility helpers for Flake8
5854plugins that intend to support Flake8 2.x and 3.x simultaneously.")
5855 (license license:expat)))
5856
5857(define-public python2-flake8-polyfill
5858 (package-with-python2 python-flake8-polyfill))
5859
5860(define-public python-mistune
5861 (package
5862 (name "python-mistune")
5863 (version "0.8.4")
5864 (source
5865 (origin
5866 (method url-fetch)
5867 (uri (pypi-uri "mistune" version))
5868 (sha256
5869 (base32
5870 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
5871 (build-system python-build-system)
5872 (native-inputs
5873 `(("python-nose" ,python-nose)
5874 ("python-cython" ,python-cython)))
5875 (home-page "https://github.com/lepture/mistune")
5876 (synopsis "Markdown parser in pure Python")
5877 (description "This package provides a fast markdown parser in pure
5878Python.")
5879 (license license:bsd-3)))
5880
5881(define-public python2-mistune
5882 (package-with-python2 python-mistune))
5883
5884(define-public python-markdown
5885 (package
5886 (name "python-markdown")
5887 (version "3.0.1")
5888 (source
5889 (origin
5890 (method url-fetch)
5891 (uri (pypi-uri "Markdown" version))
5892 (sha256
5893 (base32
5894 "0z6v8649sr434d5r5zmrhydka7v7f9yas4bwcgkcs0650jdhybnh"))))
5895 (build-system python-build-system)
5896 (native-inputs
5897 `(("python-nose" ,python-nose)
5898 ("python-pyyaml" ,python-pyyaml)))
5899 (home-page "https://python-markdown.github.io/")
5900 (synopsis "Python implementation of Markdown")
5901 (description
5902 "This package provides a Python implementation of John Gruber's
5903Markdown. The library features international input, various Markdown
5904extensions, and several HTML output formats. A command line wrapper
5905markdown_py is also provided to convert Markdown files to HTML.")
5906 (license license:bsd-3)))
5907
5908(define-public python2-markdown
5909 (package-with-python2 python-markdown))
5910
5911(define-public python-ptyprocess
5912 (package
5913 (name "python-ptyprocess")
5914 (version "0.5.2")
5915 (source
5916 (origin
5917 (method url-fetch)
5918 (uri (pypi-uri "ptyprocess" version))
5919 (sha256
5920 (base32
5921 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
5922 (build-system python-build-system)
5923 (native-inputs
5924 `(("python-nose" ,python-nose)))
5925 (arguments
5926 `(#:phases
5927 (modify-phases %standard-phases
5928 (replace 'check
7904d6fa 5929 (lambda _ (invoke "nosetests"))))))
44d10b1f
RW
5930 (home-page "https://github.com/pexpect/ptyprocess")
5931 (synopsis "Run a subprocess in a pseudo terminal")
5932 (description
5933 "This package provides a Python library used to launch a subprocess in a
5934pseudo terminal (pty), and interact with both the process and its pty.")
5935 (license license:isc)))
5936
5937(define-public python2-ptyprocess
5938 (package-with-python2 python-ptyprocess))
5939
5940(define-public python-cram
5941 (package
5942 (name "python-cram")
5943 (version "0.7")
5944 (home-page "https://bitheap.org/cram/")
5945 (source (origin
5946 (method url-fetch)
5947 (uri (list (string-append home-page "cram-"
5948 version ".tar.gz")
5949 (pypi-uri "cram" version)))
5950 (sha256
5951 (base32
5952 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
5953 (arguments
5954 '(#:phases
5955 (modify-phases %standard-phases
5956 (add-after 'unpack 'patch-source
5957 (lambda _
5958 (substitute* (find-files "cram" ".*\\.py$")
5959 ;; Replace default shell path.
5960 (("/bin/sh") (which "sh")))
5961 (substitute* (find-files "tests" ".*\\.t$")
5962 (("md5") "md5sum")
5963 (("/bin/bash") (which "bash"))
5964 (("/bin/sh") (which "sh")))
5965 (substitute* "cram/_test.py"
5966 ;; This hack works around a bug triggered by substituting
5967 ;; the /bin/sh paths. "tests/usage.t" compares the output of
5968 ;; "cram -h", which breaks the output at 80 characters. This
5969 ;; causes the line showing the default shell to break into two
5970 ;; lines, but the test expects a single line...
5971 (("env\\['COLUMNS'\\] = '80'")
5972 "env['COLUMNS'] = '160'"))
5973 #t))
5974 (delete 'check)
5975 (add-after 'install 'check
5976 ;; The test phase uses the built library and executable.
5977 ;; It's easier to run it after install since the build
5978 ;; directory contains version-specific PATH.
5979 (lambda* (#:key inputs outputs #:allow-other-keys)
5980 (add-installed-pythonpath inputs outputs)
5981 (setenv "PATH" (string-append (getenv "PATH") ":"
5982 (assoc-ref outputs "out") "/bin"))
2d7db192 5983 (invoke "make" "test"))))))
44d10b1f
RW
5984 (build-system python-build-system)
5985 (native-inputs
5986 `(("python-coverage" ,python-coverage)
5987 ("which" ,which)))
5988 (synopsis "Simple testing framework for command line applications")
5989 (description
5990 "Cram is a functional testing framework for command line applications.
5991Cram tests look like snippets of interactive shell sessions. Cram runs each
5992command and compares the command output in the test with the command’s actual
5993output.")
5994 (license license:gpl2+)))
5995
5996(define-public python2-cram
5997 (package-with-python2 python-cram))
5998
5999(define-public python-straight-plugin
6000 (package
6001 (name "python-straight-plugin")
6002 (version "1.4.1")
6003 (source
6004 (origin
6005 (method url-fetch)
6006 (uri (pypi-uri "straight.plugin" version))
6007 (sha256
6008 (base32
6009 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6010 (build-system python-build-system)
6011 (home-page "https://github.com/ironfroggy/straight.plugin")
6012 (synopsis "Simple namespaced plugin facility")
6013 (description "Straight Plugin provides a type of plugin you can create from
6014almost any existing Python modules, and an easy way for outside developers to
6015add functionality and customization to your projects with their own plugins.")
6016 (license license:expat)))
6017
6018(define-public python2-straight-plugin
6019 (package-with-python2 python-straight-plugin))
6020
6021(define-public python-fonttools
6022 (package
6023 (name "python-fonttools")
59bd5a4a 6024 (version "3.37.3")
44d10b1f
RW
6025 (source (origin
6026 (method url-fetch)
6027 (uri (pypi-uri "fonttools" version ".zip"))
6028 (sha256
6029 (base32
59bd5a4a 6030 "0k90g0q1h4var3kq6xn6zs3j1ghff97hwyn1gdqfdywsldas9668"))))
44d10b1f
RW
6031 (build-system python-build-system)
6032 (native-inputs
6033 `(("unzip" ,unzip)
6034 ("python-pytest" ,python-pytest)
6035 ("python-pytest-runner" ,python-pytest-runner)))
6036 (home-page "https://github.com/behdad/fonttools")
6037 (synopsis "Tools to manipulate font files")
6038 (description
6039 "FontTools/TTX is a library to manipulate font files from Python. It
6040supports reading and writing of TrueType/OpenType fonts, reading and writing
6041of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6042also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6043from an XML-based format.")
6044 (license license:expat)))
6045
6046(define-public python2-fonttools
6047 (package-with-python2 python-fonttools))
6048
6049(define-public python-ly
6050 (package
6051 (name "python-ly")
6052 (version "0.9.5")
6053 (source
6054 (origin
6055 (method url-fetch)
6056 (uri (pypi-uri name version))
6057 (sha256
6058 (base32
6059 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
6060 (build-system python-build-system)
6061 (arguments
6062 ;; FIXME: Some tests need network access.
6063 '(#:tests? #f))
6064 (synopsis "Tool and library for manipulating LilyPond files")
6065 (description "This package provides a Python library to parse, manipulate
6066or create documents in LilyPond format. A command line program ly is also
6067provided that can be used to do various manipulations with LilyPond files.")
6068 (home-page "https://pypi.python.org/pypi/python-ly")
6069 (license license:gpl2+)))
6070
6071(define-public python-appdirs
6072 (package
6073 (name "python-appdirs")
6074 (version "1.4.3")
6075 (source
6076 (origin
6077 (method url-fetch)
6078 (uri (pypi-uri "appdirs" version))
6079 (sha256
6080 (base32
6081 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
6082 (build-system python-build-system)
6083 (home-page "https://github.com/ActiveState/appdirs")
6084 (synopsis
6085 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6086 (description
6087 "This module provides a portable way of finding out where user data
6088should be stored on various operating systems.")
6089 (license license:expat)))
6090
6091(define-public python2-appdirs
6092 (package-with-python2 python-appdirs))
6093
6094(define-public python-llfuse
6095 (package
6096 (name "python-llfuse")
6097 (version "1.3.5")
6098 (source (origin
6099 (method url-fetch)
6100 (uri (pypi-uri "llfuse" version ".tar.bz2"))
6101 (sha256
6102 (base32
6103 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
6104 (build-system python-build-system)
6105 (inputs
6106 `(("fuse" ,fuse)
6107 ("attr" ,attr)))
6108 (native-inputs
6109 `(("pkg-config" ,pkg-config)))
6110 (synopsis "Python bindings for FUSE")
6111 (description
6112 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6113 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
6114 (license license:lgpl2.0+)
6115 (properties `((python2-variant . ,(delay python2-llfuse))))))
6116
6117(define-public python2-llfuse
6118 (package (inherit (package-with-python2
6119 (strip-python2-variant python-llfuse)))
6120 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6121
6122;; For attic-0.16
6123(define-public python-llfuse-0.41
6124 (package (inherit python-llfuse)
6125 (version "0.41.1")
6126 (source (origin
6127 (method url-fetch)
6128 (uri (string-append
6129 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6130 "llfuse-" version ".tar.bz2"))
6131 (sha256
6132 (base32
6133 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
6134 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6135 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
6136 (license (list license:expat license:lgpl2.0+))))
6137
6138(define-public python-msgpack
6139 (package
6140 (name "python-msgpack")
6141 (version "0.5.6")
6142 (source (origin
6143 (method url-fetch)
6144 (uri (pypi-uri "msgpack" version))
6145 (sha256
6146 (base32
6147 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
6148 (build-system python-build-system)
6149 (arguments
6150 `(#:modules ((guix build utils)
6151 (guix build python-build-system)
6152 (ice-9 ftw)
6153 (srfi srfi-1)
6154 (srfi srfi-26))
6155 #:phases
6156 (modify-phases %standard-phases
6157 (replace 'check
6158 (lambda _
6159 (let ((cwd (getcwd)))
6160 (setenv "PYTHONPATH"
6161 (string-append cwd "/build/"
6162 (find (cut string-prefix? "lib" <>)
6163 (scandir (string-append cwd "/build")))
6164 ":"
6165 (getenv "PYTHONPATH")))
6166 (invoke "pytest" "-v" "test")))))))
6167 (native-inputs
6168 `(("python-pytest" ,python-pytest)))
6169 (synopsis "MessagePack (de)serializer")
6170 (description "MessagePack is a fast, compact binary serialization format,
6171suitable for similar data to JSON. This package provides CPython bindings for
6172reading and writing MessagePack data.")
6173 (home-page "https://pypi.python.org/pypi/msgpack/")
6174 (license license:asl2.0)))
6175
6176;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
6177;; release 0.5. Some packages like borg still call it by the old name for now.
6178;; <https://bugs.gnu.org/30662>
6179(define-public python-msgpack-transitional
6180 (package
6181 (inherit python-msgpack)
6182 (name "python-msgpack-transitional")
6183 (arguments
6184 (substitute-keyword-arguments (package-arguments python-msgpack)
6185 ((#:phases phases)
6186 `(modify-phases ,phases
6187 (add-after 'unpack 'configure-transitional
6188 (lambda _
6189 ;; Keep using the old name.
6190 (substitute* "setup.py"
6191 (("TRANSITIONAL = False")
6192 "TRANSITIONAL = 1"))
6193 #t))))))))
6194
6195(define-public python2-msgpack
6196 (package-with-python2 python-msgpack))
6197
6198(define-public python-netaddr
6199 (package
6200 (name "python-netaddr")
6201 (version "0.7.19")
6202 (source
6203 (origin
6204 (method url-fetch)
6205 (uri (pypi-uri "netaddr" version))
6206 (sha256
6207 (base32
6208 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
6209 (build-system python-build-system)
6210 (arguments `(#:tests? #f)) ;; No tests.
6211 (home-page "https://github.com/drkjam/netaddr/")
6212 (synopsis "Pythonic manipulation of network addresses")
6213 (description
6214 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6215and MAC network addresses.")
6216 (license license:bsd-3)))
6217
6218(define-public python2-netaddr
6219 (package-with-python2 python-netaddr))
6220
6221(define-public python-wrapt
6222 (package
6223 (name "python-wrapt")
dddd7a75 6224 (version "1.11.1")
44d10b1f
RW
6225 (source
6226 (origin
6227 (method url-fetch)
6228 (uri (pypi-uri "wrapt" version))
6229 (sha256
6230 (base32
dddd7a75 6231 "0cqmysny1pz01jw26q48q5zasvns6507rwhgm6wcw743f0r01sja"))))
44d10b1f
RW
6232 (build-system python-build-system)
6233 (arguments
6234 ;; Tests are not included in the tarball, they are only available in the
6235 ;; git repository.
6236 `(#:tests? #f))
6237 (home-page "https://github.com/GrahamDumpleton/wrapt")
6238 (synopsis "Module for decorators, wrappers and monkey patching")
6239 (description
6240 "The aim of the wrapt module is to provide a transparent object proxy for
6241 Python, which can be used as the basis for the construction of function
6242 wrappers and decorator functions.")
6243 (license license:bsd-2)))
6244
6245(define-public python2-wrapt
6246 (package-with-python2 python-wrapt))
6247
6248(define-public python-xlrd
6249 (package
6250 (name "python-xlrd")
6251 (version "1.0.0")
6252 (source (origin
6253 (method url-fetch)
6254 (uri (pypi-uri "xlrd" version))
6255 (sha256
6256 (base32
6257 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
6258 (build-system python-build-system)
6259 (arguments
6260 `(#:phases
6261 (modify-phases %standard-phases
6262 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
6263 ;; run tests instead for now.
45fd0081 6264 (replace 'check (lambda _ (invoke "nosetests"))))))
44d10b1f
RW
6265 (native-inputs `(("python-nose" ,python-nose)))
6266 (home-page "http://www.python-excel.org/")
6267 (synopsis "Library for extracting data from Excel files")
6268 (description "This packages provides a library to extract data from
6269spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
6270@samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
6271Unicode-aware. It is not intended as an end-user tool.")
6272 (license license:bsd-3)))
6273
6274(define-public python2-xlrd
6275 (package-with-python2 python-xlrd))
6276
6277(define-public python-prettytable
6278 (package
6279 (name "python-prettytable")
6280 (version "0.7.2")
6281 (source
6282 (origin
6283 (method url-fetch)
337c3a1e 6284 (uri (pypi-uri "prettytable" version ".tar.bz2"))
44d10b1f
RW
6285 (sha256
6286 (base32
6287 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
6288 (build-system python-build-system)
6289 (home-page "http://code.google.com/p/prettytable/")
6290 (synopsis "Display tabular data in an ASCII table format")
6291 (description
6292 "A library designed to represent tabular data in visually appealing ASCII
6293tables. PrettyTable allows for selection of which columns are to be printed,
6294independent alignment of columns (left or right justified or centred) and
6295printing of sub-tables by specifying a row range.")
6296 (license license:bsd-3)))
6297
6298(define-public python2-prettytable
6299 (package-with-python2 python-prettytable))
6300
6301(define-public python-tables
6302 (package
6303 (name "python-tables")
6304 (version "3.4.4")
6305 (source
6306 (origin
6307 (method url-fetch)
6308 (uri (pypi-uri "tables" version))
6309 (sha256
6310 (base32
6311 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
6312 (modules '((guix build utils)))
6313 (snippet
6314 '(begin
6315 ;; Remove pre-compiled .pyc files from source.
6316 (for-each delete-file-recursively
6317 (find-files "." "__pycache__" #:directories? #t))
6318 (for-each delete-file (find-files "." "\\.pyc$"))
6319 #t))))
6320 (build-system python-build-system)
6321 (arguments
6322 `(;; FIXME: python-build-system does not pass configure-flags to "build"
6323 ;; or "check", so we must override the build and check phases.
6324 #:phases
6325 (modify-phases %standard-phases
6326 (add-after 'unpack 'use-gcc
6327 (lambda _
6328 (substitute* "setup.py"
6329 (("compiler = new_compiler\\(\\)" line)
6330 (string-append line
6331 "\ncompiler.set_executables(compiler='gcc',"
6332 "compiler_so='gcc',"
6333 "linker_exe='gcc',"
6334 "linker_so='gcc -shared')")))
6335 #t))
6336 (replace 'build
6337 (lambda* (#:key inputs #:allow-other-keys)
35d79d61
RW
6338 (invoke "python" "setup.py" "build"
6339 (string-append "--hdf5="
6340 (assoc-ref inputs "hdf5")))))
44d10b1f
RW
6341 (replace 'check
6342 (lambda* (#:key inputs #:allow-other-keys)
35d79d61
RW
6343 (invoke "python" "setup.py" "check"
6344 (string-append "--hdf5="
6345 (assoc-ref inputs "hdf5"))))))))
44d10b1f
RW
6346 (propagated-inputs
6347 `(("python-numexpr" ,python-numexpr)
6348 ("python-numpy" ,python-numpy)))
6349 (native-inputs
6350 `(("python-cython" ,python-cython)
6351 ("pkg-config" ,pkg-config)))
6352 (inputs
6353 `(("hdf5" ,hdf5)
6354 ("bzip2" ,bzip2)
6355 ("zlib" ,zlib)))
6356 (home-page "http://www.pytables.org/")
6357 (synopsis "Hierarchical datasets for Python")
6358 (description "PyTables is a package for managing hierarchical datasets and
6359designed to efficiently cope with extremely large amounts of data.")
6360 (license license:bsd-3)))
6361
6362(define-public python2-tables
6363 (package-with-python2 python-tables))
6364
6365(define-public python-pyasn1
6366 (package
6367 (name "python-pyasn1")
6368 (version "0.4.3")
6369 (source
6370 (origin
6371 (method url-fetch)
6372 (uri (pypi-uri "pyasn1" version))
6373 (sha256
6374 (base32
6375 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
6376 (build-system python-build-system)
6377 (home-page "http://pyasn1.sourceforge.net/")
6378 (synopsis "ASN.1 types and codecs")
6379 (description
6380 "This is an implementation of ASN.1 types and codecs in Python. It is
6381suitable for a wide range of protocols based on the ASN.1 specification.")
6382 (license license:bsd-2)))
6383
6384(define-public python2-pyasn1
6385 (package-with-python2 python-pyasn1))
6386
6387(define-public python-pyasn1-modules
6388 (package
6389 (name "python-pyasn1-modules")
6390 (version "0.2.2")
6391 (source
6392 (origin
6393 (method url-fetch)
6394 (uri (pypi-uri "pyasn1-modules" version))
6395 (sha256
6396 (base32
6397 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
6398 (build-system python-build-system)
6399 (propagated-inputs
6400 `(("python-pyasn1" ,python-pyasn1)))
6401 (home-page "https://sourceforge.net/projects/pyasn1/")
6402 (synopsis "ASN.1 codec implementations")
6403 (description
6404 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
6405implementations of ASN.1-based codecs and protocols.")
6406 (license license:bsd-3)))
6407
6408(define-public python2-pyasn1-modules
6409 (package-with-python2 python-pyasn1-modules))
6410
6411(define-public python-ipaddress
6412 (package
6413 (name "python-ipaddress")
6414 (version "1.0.22")
6415 (source (origin
6416 (method url-fetch)
6417 (uri (pypi-uri "ipaddress" version))
6418 (sha256
6419 (base32
6420 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
6421 (build-system python-build-system)
6422 (home-page "https://github.com/phihag/ipaddress")
6423 (synopsis "IP address manipulation library")
6424 (description
6425 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
6426 in Python. This library is used to create, poke at, and manipulate IPv4 and
6427 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
6428 module to older versions of Python.")
6429 (license license:psfl)))
6430
6431(define-public python2-ipaddress
6432 (package-with-python2 python-ipaddress))
6433
6434(define-public python2-ipaddr
6435 (package
6436 (name "python2-ipaddr")
6437 (version "2.1.11")
6438 (source
6439 (origin
6440 (method url-fetch)
6441 (uri (pypi-uri "ipaddr" version))
6442 (sha256
6443 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
6444 (build-system python-build-system)
6445 (arguments
6446 `(#:python ,python-2 ;version 2 only
6447 #:phases
6448 (modify-phases %standard-phases
6449 (replace 'check
40b8c4e3 6450 (lambda _ (invoke "python" "ipaddr_test.py"))))))
44d10b1f
RW
6451 (home-page "https://github.com/google/ipaddr-py")
6452 (synopsis "IP address manipulation library")
6453 (description
6454 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
6455IPv6 addresses and networks.
6456
6457For new implementations you may prefer to use the standard module
6458@code{ipaddress}, which was introduced in Python 3.3 and backported to older
6459versions of Python.")
6460 (license license:asl2.0)))
6461
6462(define-public python-idna
6463 (package
6464 (name "python-idna")
6465 (version "2.7")
6466 (source
6467 (origin
6468 (method url-fetch)
6469 (uri (pypi-uri "idna" version))
6470 (sha256
6471 (base32
6472 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))
6473 (build-system python-build-system)
6474 (home-page "https://github.com/kjd/idna")
6475 (synopsis "Internationalized domain names in applications")
6476 (description
6477 "This is a library to support the Internationalised Domain Names in
6478Applications (IDNA) protocol as specified in RFC 5891. This version of the
6479protocol is often referred to as “IDNA2008” and can produce different results
6480from the earlier standard from 2003. The library is also intended to act as a
6481suitable drop-in replacement for the “encodings.idna” module that comes with
6482the Python standard library but currently only supports the older 2003
6483specification.")
6484 (license license:bsd-4)))
6485
6486(define-public python2-idna
6487 (package-with-python2 python-idna))
6488
6489(define-public python-idna-ssl
6490 (package
6491 (name "python-idna-ssl")
6492 (version "1.0.1")
6493 (source
6494 (origin
6495 (method url-fetch)
6496 (uri (pypi-uri "idna-ssl" version))
6497 (sha256
6498 (base32
6499 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
6500 (build-system python-build-system)
6501 (arguments
6502 `(#:tests? #f)) ;circular dependency with python-aiohttp
6503 (home-page "https://github.com/aio-libs/idna-ssl")
6504 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
6505 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
6506domains support.")
6507 (license license:expat)))
6508
6509(define-public python-pretend
6510 (package
6511 (name "python-pretend")
6512 (version "1.0.9")
6513 (source
6514 (origin
6515 (method url-fetch)
9f1f22ee 6516 (uri (pypi-uri "pretend" version))
44d10b1f
RW
6517 (sha256
6518 (base32
6519 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
6520 (build-system python-build-system)
6521 (home-page "https://github.com/alex/pretend")
6522 (synopsis "Library for stubbing in Python")
6523 (description
6524 "Pretend is a library to make stubbing with Python easier. Stubbing is a
6525technique for writing tests. You may hear the term mixed up with mocks,
6526fakes, or doubles. Basically, a stub is an object that returns pre-canned
6527responses, rather than doing any computation.")
6528 (license license:bsd-3)))
6529
6530(define-public python2-pretend
6531 (package-with-python2 python-pretend))
6532
6533(define-public python-pip
6534 (package
6535 (name "python-pip")
6536 (version "18.1")
6537 (source
6538 (origin
6539 (method url-fetch)
6540 (uri (pypi-uri "pip" version))
6541 (sha256
6542 (base32
6543 "188fclay154s520n43s7cxxlhdaiysvxf19zk8vr1xbyjyyr58n0"))))
6544 (build-system python-build-system)
6545 (arguments
6546 '(#:tests? #f)) ; there are no tests in the pypi archive.
6547 (home-page "https://pip.pypa.io/")
6548 (synopsis "Package manager for Python software")
6549 (description
6550 "Pip is a package manager for Python software, that finds packages on the
6551Python Package Index (PyPI).")
6552 (license license:expat)))
6553
6554(define-public python2-pip
6555 (package-with-python2 python-pip))
6556
6557(define-public python-tlsh
6558 (package
6559 (name "python-tlsh")
6560 (version "3.4.5")
6561 (home-page "https://github.com/trendmicro/tlsh")
6562 (source (origin
6563 (method url-fetch)
6564 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
6565 version ".tar.gz"))
6566 (sha256
6567 (base32
6568 "1x1vahd4zg5kpyr9h9hs3fvh460p25rjy4cclwdnbbw8x3vc30q3"))
6569 (file-name (string-append name "-" version ".tar.gz"))))
6570 (build-system cmake-build-system)
6571 (arguments
6572 '(#:out-of-source? #f
6573 #:phases (modify-phases %standard-phases
6574 (replace
6575 'install
6576 (lambda* (#:key outputs #:allow-other-keys)
6577 ;; Build and install the Python bindings. The underlying
6578 ;; C++ library is apparently not meant to be installed.
6579 (let ((out (assoc-ref outputs "out")))
6580 (with-directory-excursion "py_ext"
6581 (and (system* "python" "setup.py" "build")
6582 (system* "python" "setup.py" "install"
6583 (string-append "--prefix=" out))))))))))
6584 (inputs `(("python" ,python-wrapper))) ;for the bindings
6585 (synopsis "Fuzzy matching library for Python")
6586 (description
6587 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
6588Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
6589value which can be used for similarity comparisons. Similar objects have
6590similar hash values, which allows for the detection of similar objects by
6591comparing their hash values. The byte stream should have a sufficient amount
6592of complexity; for example, a byte stream of identical bytes will not generate
6593a hash value.")
6594 (license license:asl2.0)))
6595
6596(define-public python2-tlsh
6597 (package
6598 (inherit python-tlsh)
6599 (name "python2-tlsh")
6600 (inputs `(("python" ,python-2)))))
6601
6602(define-public python-termcolor
6603 (package
6604 (name "python-termcolor")
6605 (version "1.1.0")
6606 (source
6607 (origin
6608 (method url-fetch)
6609 (uri (pypi-uri "termcolor" version))
6610 (sha256
6611 (base32
6612 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
6613 (build-system python-build-system)
6614 (arguments
6615 ;; There are no tests.
6616 `(#:tests? #f))
6617 (home-page "https://pypi.python.org/pypi/termcolor")
6618 (synopsis "ANSII Color formatting for terminal output")
6619 (description
6620 "This package provides ANSII Color formatting for output in terminals.")
6621 (license license:expat)))
6622
6623(define-public python2-termcolor
6624 (package-with-python2 python-termcolor))
6625
6626(define-public python-libarchive-c
6627 (package
6628 (name "python-libarchive-c")
6629 (version "2.8")
6630 (source (origin
6631 (method url-fetch)
6632 (uri (pypi-uri "libarchive-c" version))
6633 (sha256
6634 (base32
6635 "0qg0v1s9c1xdk9philhnv8k6c6nicvnvfwlc0j9srg90jmdlvm06"))))
6636 (build-system python-build-system)
6637 (arguments
6638 '(#:phases (modify-phases %standard-phases
6639 (add-before
6640 'build 'reference-libarchive
6641 (lambda* (#:key inputs #:allow-other-keys)
6642 ;; Retain the absolute file name of libarchive.so.
6643 (let ((libarchive (assoc-ref inputs "libarchive")))
6644 (substitute* "libarchive/ffi.py"
6645 (("find_library\\('archive'\\)")
6646 (string-append "'" libarchive
6647 "/lib/libarchive.so'"))))))
6648 (replace 'check
6649 (lambda _ (invoke "pytest" "-vv"))))))
6650 (native-inputs
6651 `(("python-mock" ,python-mock)
6652 ("python-pytest" ,python-pytest)))
6653 (inputs
6654 `(("libarchive" ,libarchive)))
6655 (home-page "https://github.com/Changaco/python-libarchive-c")
6656 (synopsis "Python interface to libarchive")
6657 (description
6658 "This package provides Python bindings to libarchive, a C library to
6659access possibly compressed archives in many different formats. It uses
6660Python's @code{ctypes} foreign function interface (FFI).")
6661 (license license:lgpl2.0+)))
6662
6663(define-public python2-libarchive-c
6664 (package-with-python2 python-libarchive-c))
6665
6666(define-public python-file
6667 (package
6668 (inherit file)
6669 (name "python-file")
6670 (build-system python-build-system)
6671 (arguments
6672 '(#:tests? #f ;no tests
6673 #:configure-flags '("--single-version-externally-managed" "--root=/")
6674 #:phases (modify-phases %standard-phases
6675 (add-before 'build 'change-directory
6676 (lambda _
6677 (chdir "python")
6678 #t))
6679 (add-before 'build 'set-library-file-name
6680 (lambda* (#:key inputs #:allow-other-keys)
6681 (let ((file (assoc-ref inputs "file")))
6682 (substitute* "magic.py"
6683 (("find_library\\('magic'\\)")
6684 (string-append "'" file "/lib/libmagic.so'")))
6685 #t))))))
6686 (inputs `(("file" ,file)))
6687 (self-native-input? #f)
6688 (synopsis "Python bindings to the libmagic file type guesser. Note that
6689this module and the python-magic module both provide a \"magic.py\" file;
6690these two modules, which are different and were developed separately, both
6691serve the same purpose: provide Python bindings for libmagic.")))
6692
6693(define-public python2-file
6694 (package-with-python2 python-file))
6695
6696(define-public python-debian
6697 (package
6698 (name "python-debian")
6699 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
6700 (version "0.1.28")
6701 (source
6702 (origin
6703 (method url-fetch)
6704 (uri (pypi-uri name version))
6705 (sha256
6706 (base32
6707 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
6708 (build-system python-build-system)
6709 (propagated-inputs
6710 `(("python-six" ,python-six)))
6711 (synopsis "Debian package related modules")
6712 (description
6713 ;; XXX: Use @enumerate instead of @itemize to work around
6714 ;; <http://bugs.gnu.org/21772>.
6715 "This package provides Python modules that abstract many formats of
6716Debian-related files, such as:
6717
6718@enumerate
6719@item Debtags information;
6720@item @file{debian/changelog} files;
6721@item packages files, pdiffs;
6722@item control files of single or multiple RFC822-style paragraphs---e.g.
6723 @file{debian/control}, @file{.changes}, @file{.dsc};
6724@item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
6725 contained files and meta-information.
6726@end enumerate\n")
6727
6728 ;; Modules are either GPLv2+ or GPLv3+.
6729 (license license:gpl3+)))
6730
6731(define-public python2-debian
6732 (package-with-python2 python-debian))
6733
6734(define-public python-nbformat
6735 (package
6736 (name "python-nbformat")
6737 (version "4.4.0")
6738 (source
6739 (origin
6740 (method url-fetch)
6741 (uri (pypi-uri "nbformat" version))
6742 (sha256
6743 (base32
6744 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
6745 (build-system python-build-system)
6746 (arguments `(#:tests? #f)) ; no test target
6747 (propagated-inputs
6748 `(("python-ipython-genutils" ,python-ipython-genutils)
6749 ("python-jsonschema" ,python-jsonschema)
6750 ("python-jupyter-core" ,python-jupyter-core)
6751 ("python-traitlets" ,python-traitlets)))
6752 (home-page "http://jupyter.org")
6753 (synopsis "Jupyter Notebook format")
6754 (description "This package provides the reference implementation of the
6755Jupyter Notebook format and Python APIs for working with notebooks.")
6756 (license license:bsd-3)))
6757
6758(define-public python2-nbformat
6759 (package-with-python2 python-nbformat))
6760
6761(define-public python-bleach
6762 (package
6763 (name "python-bleach")
6764 (version "1.4.3")
6765 (source
6766 (origin
6767 (method url-fetch)
6768 (uri (pypi-uri "bleach" version))
6769 (sha256
6770 (base32
6771 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
6772 (build-system python-build-system)
6773 (propagated-inputs
6774 `(("python-html5lib" ,python-html5lib-0.9)
6775 ("python-six" ,python-six)))
6776 (native-inputs
6777 `(("python-nose" ,python-nose)))
6778 (home-page "https://github.com/jsocol/bleach")
6779 (synopsis "Whitelist-based HTML-sanitizing tool")
6780 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
6781 (license license:asl2.0)))
6782
6783(define-public python2-bleach
6784 (package-with-python2 python-bleach))
6785
6786(define-public python-entrypoints
6787 (package
6788 (name "python-entrypoints")
a7f1b718 6789 (version "0.3")
44d10b1f
RW
6790 (source
6791 (origin
6792 (method url-fetch)
a7f1b718 6793 (uri (pypi-uri "entrypoints" version))
44d10b1f
RW
6794 (sha256
6795 (base32
a7f1b718 6796 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
44d10b1f
RW
6797 (build-system python-build-system)
6798 ;; The package does not come with a setup.py file, so we have to generate
6799 ;; one ourselves.
6800 (arguments
6801 `(#:tests? #f
6802 #:phases
6803 (modify-phases %standard-phases
6804 (add-after 'unpack 'create-setup.py
6805 (lambda _
6806 (call-with-output-file "setup.py"
6807 (lambda (port)
6808 (format port "\
6809from setuptools import setup
6810setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
6811" ,version))))))))
6812 (home-page "https://github.com/takluyver/entrypoints")
6813 (synopsis "Discover and load entry points from installed Python packages")
6814 (description "Entry points are a way for Python packages to advertise
6815objects with some common interface. The most common examples are
6816@code{console_scripts} entry points, which define shell commands by
6817identifying a Python function to run. The @code{entrypoints} module contains
6818functions to find and load entry points.")
6819 (license license:expat)))
6820
6821(define-public python2-entrypoints
6822 (package-with-python2 python-entrypoints))
6823
6824(define-public python-nbconvert
6825 (package
6826 (name "python-nbconvert")
6827 (version "5.0.0b1")
6828 (source
6829 (origin
6830 (method url-fetch)
6831 (uri (pypi-uri "nbconvert" version))
6832 (sha256
6833 (base32
6834 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
6835 (build-system python-build-system)
6836 (arguments
6837 `(;; The "bdist_egg" target is disabled by default, causing the installation
6838 ;; to fail.
6839 #:configure-flags (list "bdist_egg")
6840 ;; FIXME: 5 failures, 40 errors.
6841 #:tests? #f))
6842 ;; #:phases
6843 ;; (modify-phases %standard-phases
6844 ;; (replace 'check
6845 ;; (lambda _
6846 ;; (zero? (system* "py.test" "-v")))))
6847 (native-inputs
6848 `(("python-pytest" ,python-pytest)))
6849 (propagated-inputs
6850 `(("python-bleach" ,python-bleach)
6851 ("python-entrypoints" ,python-entrypoints)
6852 ("python-jinja2" ,python-jinja2)
6853 ("python-jupyter-core" ,python-jupyter-core)
6854 ("python-mistune" ,python-mistune)
6855 ("python-nbformat" ,python-nbformat)
6856 ("python-pygments" ,python-pygments)
6857 ("python-traitlets" ,python-traitlets)))
6858 (home-page "http://jupyter.org")
6859 (synopsis "Converting Jupyter Notebooks")
6860 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
6861notebooks to various other formats via Jinja templates. It allows you to
6862convert an @code{.ipynb} notebook file into various static formats including:
6863
6864@enumerate
6865@item HTML
6866@item LaTeX
6867@item PDF
6868@item Reveal JS
6869@item Markdown (md)
6870@item ReStructured Text (rst)
6871@item executable script
6872@end enumerate\n")
6873 (license license:bsd-3)))
6874
6875(define-public python2-nbconvert
6876 (package-with-python2 python-nbconvert))
6877
44d10b1f
RW
6878(define-public python-notebook
6879 (package
6880 (name "python-notebook")
6881 (version "5.7.4")
6882 (source (origin
6883 (method url-fetch)
6884 (uri (pypi-uri "notebook" version))
6885 (sha256
6886 (base32
6887 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
6888 (build-system python-build-system)
6889 (arguments
6890 `(#:phases
6891 (modify-phases %standard-phases
6892 (replace 'check
6893 (lambda _
6894 ;; These tests require a browser
6895 (delete-file-recursively "notebook/tests/selenium")
6896 ;; Some tests need HOME
6897 (setenv "HOME" "/tmp")
6898 ;; This file contains "warningfilters", which are not supported
6899 ;; by this version of nose.
6900 (delete-file "setup.cfg")
6901 (with-directory-excursion "/tmp"
6902 (invoke "nosetests" "-v"))
6903 #t)))))
6904 (propagated-inputs
6905 `(("python-jupyter-core" ,python-jupyter-core)
6906 ("python-nbformat" ,python-nbformat)
6907 ("python-nbconvert" ,python-nbconvert)
6908 ("python-prometheus-client" ,python-prometheus-client)
6909 ("python-send2trash" ,python-send2trash)
6910 ("python-terminado" ,python-terminado)))
6911 (native-inputs
6912 `(("python-nose" ,python-nose)
6913 ("python-sphinx" ,python-sphinx)
6914 ("python-requests" ,python-requests)))
6915 (home-page "http://jupyter.org/")
6916 (synopsis "Web-based notebook environment for interactive computing")
6917 (description
6918 "The Jupyter HTML notebook is a web-based notebook environment for
6919interactive computing.")
6920 (properties `((python2-variant . ,(delay python2-notebook))))
6921 (license license:bsd-3)))
6922
6923(define-public python2-notebook
6924 (let ((base (package-with-python2
6925 (strip-python2-variant python-notebook))))
6926 (package (inherit base)
6927 (native-inputs
6928 `(("python2-mock" ,python2-mock)
6929 ,@(package-native-inputs base)))
6930 (arguments
6931 (substitute-keyword-arguments (package-arguments base)
6932 ((#:phases phases)
6933 `(modify-phases ,phases
6934 (add-before 'check 'disable-test-case
6935 ;; The test requires network access to localhost. Curiously it
6936 ;; fails with Python 2 only. Simply make the test-case return
6937 ;; immediately.
6938 (lambda _
6939 (substitute*
6940 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
6941 (("formats = self.nbconvert_api") "return #")))))))))))
6942
6943(define-public python-widgetsnbextension
6944 (package
6945 (name "python-widgetsnbextension")
6946 (version "3.4.2")
6947 (source
6948 (origin
6949 (method url-fetch)
6950 (uri (pypi-uri "widgetsnbextension" version))
6951 (sha256
6952 (base32
6953 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
6954 (build-system python-build-system)
6955 (propagated-inputs
6956 `(("python-ipykernel" ,python-ipykernel)
6957 ("python-notebook" ,python-notebook)))
6958 (native-inputs
6959 `(("python-certifi" ,python-certifi)
6960 ("python-nose" ,python-nose)))
6961 (home-page "https://ipython.org")
6962 (synopsis "IPython HTML widgets for Jupyter")
6963 (description "This package provides interactive HTML widgets for Jupyter
6964notebooks.")
6965 (license license:bsd-3)))
6966
6967(define-public python2-widgetsnbextension
6968 (package-with-python2 python-widgetsnbextension))
6969
6970(define-public python-ipywidgets
6971 (package
6972 (name "python-ipywidgets")
6973 (version "5.2.2")
6974 (source
6975 (origin
6976 (method url-fetch)
6977 (uri (pypi-uri "ipywidgets" version))
6978 (sha256
6979 (base32
6980 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
6981 (build-system python-build-system)
6982 (propagated-inputs
6983 `(("python-ipython" ,python-ipython)
6984 ("python-traitlets" ,python-traitlets)
6985 ("python-widgetsnbextension" ,python-widgetsnbextension)))
6986 (native-inputs
6987 `(("python-nose" ,python-nose)
6988 ("python-pytest" ,python-pytest)))
6989 (home-page "https://ipython.org")
6990 (synopsis "IPython HTML widgets for Jupyter")
6991 (description "Ipywidgets are interactive HTML widgets for Jupyter
6992notebooks and the IPython kernel. Notebooks come alive when interactive
6993widgets are used. Users gain control of their data and can visualize changes
6994in the data.")
6995 (license license:bsd-3)))
6996
6997(define-public python2-ipywidgets
6998 (package-with-python2 python-ipywidgets))
6999
7000(define-public python-jupyter-console
7001 (package
7002 (name "python-jupyter-console")
7003 (version "5.2.0")
7004 (source
7005 (origin
7006 (method url-fetch)
7007 (uri (pypi-uri "jupyter_console" version))
7008 (sha256
7009 (base32
7010 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
7011 (build-system python-build-system)
7012 ;; Tests only run in an TTY.
7013 (arguments `(#:tests? #f))
7014 (propagated-inputs
7015 `(("python-ipykernel" ,python-ipykernel)
7016 ("python-jupyter-client" ,python-jupyter-client)
7017 ("python-prompt-toolkit" ,python-prompt-toolkit-1)
7018 ("python-pygments" ,python-pygments)))
7019 (native-inputs
7020 `(("python-nose" ,python-nose)))
7021 (home-page "https://jupyter.org")
7022 (synopsis "Jupyter terminal console")
7023 (description "This package provides a terminal-based console frontend for
7024Jupyter kernels. It also allows for console-based interaction with non-Python
7025Jupyter kernels such as IJulia and IRKernel.")
7026 (license license:bsd-3)))
7027
7028(define-public python2-jupyter-console
7029 (package-with-python2 python-jupyter-console))
7030
7031;; The python-ipython and python-jupyter-console require each other. To get
7032;; the functionality in both packages working, strip down the
7033;; python-jupyter-console package when using it as an input to python-ipython.
7034(define python-jupyter-console-minimal
7035 (package
7036 (inherit python-jupyter-console)
7037 (name "python-jupyter-console-minimal")
7038 (arguments
7039 (substitute-keyword-arguments
7040 (package-arguments python-jupyter-console)
7041 ((#:phases phases)
7042 `(modify-phases ,phases
7043 (add-after 'install 'delete-bin
7044 (lambda* (#:key outputs #:allow-other-keys)
7045 ;; Delete the bin files, to avoid conflicts in profiles
7046 ;; where python-ipython and python-jupyter-console are
7047 ;; both present.
7048 (delete-file-recursively
7049 (string-append
7050 (assoc-ref outputs "out") "/bin"))))))))
7051 ;; Remove the python-ipython propagated input, to avoid the cycle
7052 (propagated-inputs
7053 (alist-delete
7054 "python-ipython"
7055 (package-propagated-inputs python-jupyter-console)))))
7056
7057(define-public python-qtconsole
7058 (package
7059 (name "python-qtconsole")
7060 (version "4.4.3")
7061 (source
7062 (origin
7063 (method url-fetch)
7064 (uri (pypi-uri "qtconsole" version))
7065 (sha256
7066 (base32
7067 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
7068 (build-system python-build-system)
7069 (arguments
7070 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
7071 ;; but we only have the LTS version 5.x. This means that there might be
7072 ;; runtime errors, but since this is a dependency of the Jupyter package,
7073 ;; and Jupyter can be used without the qtconsole we can overlook this for
7074 ;; now.
7075 `(#:tests? #f
7076 #:phases
7077 (modify-phases %standard-phases
7078 (add-before 'check 'pre-check
7079 (lambda _
7080 (setenv "QT_QPA_PLATFORM" "offscreen")
7081 #t)))))
7082 (propagated-inputs
7083 `(("python-ipykernel" ,python-ipykernel)
7084 ("python-ipython" ,python-ipython)))
7085 (native-inputs
7086 `(("python-pytest" ,python-pytest)))
7087 (home-page "http://jupyter.org")
7088 (synopsis "Jupyter Qt console")
7089 (description "This package provides a Qt-based console for Jupyter with
7090support for rich media output.")
7091 (license license:bsd-3)))
7092
7093(define-public jupyter
7094 (package
7095 (name "jupyter")
7096 (version "1.0.0")
7097 (source
7098 (origin
7099 (method url-fetch)
7100 (uri (pypi-uri "jupyter" version))
7101 (sha256
7102 (base32
7103 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
7104 (build-system python-build-system)
7105 (arguments '(#:tests? #f)) ; there are none.
7106 (propagated-inputs
7107 `(("python-ipykernel" ,python-ipykernel)
7108 ("python-ipywidgets" ,python-ipywidgets)
7109 ("python-jupyter-console" ,python-jupyter-console)
7110 ("python-nbconvert" ,python-nbconvert)
7111 ("python-notebook" ,python-notebook)
7112 ("python-qtconsole" ,python-qtconsole)))
7113 (native-search-paths
7114 (list (search-path-specification
7115 (variable "JUPYTER_PATH")
7116 (files '("share/jupyter")))))
7117 (home-page "https://jupyter.org")
7118 (synopsis "Web application for interactive documents")
7119 (description
7120 "The Jupyter Notebook is a web application that allows you to create and
7121share documents that contain live code, equations, visualizations and
7122explanatory text. Uses include: data cleaning and transformation, numerical
7123simulation, statistical modeling, machine learning and much more.")
7124 (license license:bsd-3)))
7125
7126(define-public python-chardet
7127 (package
7128 (name "python-chardet")
7129 (version "3.0.4")
7130 (source
7131 (origin
7132 (method url-fetch)
7133 (uri (pypi-uri "chardet" version))
7134 (sha256
7135 (base32
7136 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
7137 (native-inputs
7138 `(("python-hypothesis" ,python-hypothesis)
7139 ("python-pytest" ,python-pytest)
7140 ("python-pytest-runner" ,python-pytest-runner)))
7141 (build-system python-build-system)
7142 (home-page "https://github.com/chardet/chardet")
7143 (synopsis "Universal encoding detector for Python 2 and 3")
7144 (description
7145 "This package provides @code{chardet}, a Python module that can
7146automatically detect a wide range of file encodings.")
7147 (license license:lgpl2.1+)))
7148
7149(define-public python2-chardet
7150 (package-with-python2 python-chardet))
7151
7152(define-public python-docopt
7153 (package
7154 (name "python-docopt")
7155 (version "0.6.2")
7156 (source
7157 (origin
7158 (method url-fetch)
7159 ;; The release on PyPI does not include tests.
7160 (uri (string-append
7161 "https://github.com/docopt/docopt/archive/"
7162 version ".tar.gz"))
7163 (file-name (string-append name "-" version ".tar.gz"))
7164 (sha256
7165 (base32
7166 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
7167 (build-system python-build-system)
7168 (native-inputs
7169 `(("python-pytest" ,python-pytest)))
7170 (arguments
7171 `(#:phases
7172 (modify-phases %standard-phases
7173 (replace 'check
7174 (lambda _ (invoke "py.test"))))))
7175 (home-page "http://docopt.org")
7176 (synopsis "Command-line interface description language for Python")
7177 (description "This library allows the user to define a command-line
7178interface from a program's help message rather than specifying it
7179programatically with command-line parsers like @code{getopt} and
7180@code{argparse}.")
7181 (license license:expat)))
7182
7183(define-public python2-docopt
7184 (package-with-python2 python-docopt))
7185
7186(define-public python-pythondialog
7187 (package
7188 (name "python-pythondialog")
7189 (version "3.4.0")
7190 (source
7191 (origin
7192 (method url-fetch)
7193 (uri (pypi-uri "pythondialog" version))
7194 (sha256
7195 (base32
7196 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
7197 (build-system python-build-system)
7198 (arguments
7199 `(#:phases
7200 (modify-phases %standard-phases
7201 (add-after 'unpack 'patch-path
7202 (lambda* (#:key inputs #:allow-other-keys)
7203 (let* ((dialog (assoc-ref inputs "dialog")))
7204 ;; Since this library really wants to grovel the search path, we
7205 ;; must hardcode dialog's store path into it.
7206 (substitute* "dialog.py"
7207 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
7208 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
7209 #t))))
7210 #:tests? #f)) ; no test suite
7211 (propagated-inputs
7212 `(("dialog" ,dialog)))
7213 (home-page "http://pythondialog.sourceforge.net/")
7214 (synopsis "Python interface to the UNIX dialog utility")
7215 (description "A Python wrapper for the dialog utility. Its purpose is to
7216provide an easy to use, pythonic and comprehensive Python interface to dialog.
7217This allows one to make simple text-mode user interfaces on Unix-like systems")
7218 (license license:lgpl2.1)
7219 (properties `((python2-variant . ,(delay python2-pythondialog))))))
7220
7221(define-public python2-pythondialog
7222 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
7223 (package
7224 (inherit base)
7225 (version (package-version python-pythondialog))
7226 (source (origin
7227 (method url-fetch)
7228 (uri (pypi-uri "python2-pythondialog" version))
7229 (sha256
7230 (base32
7231 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
7232
7233(define-public python-configobj
7234 (package
7235 (name "python-configobj")
7236 (version "5.0.6")
7237 (source (origin
7238 (method url-fetch)
b0758fbb 7239 (uri (pypi-uri "configobj" version))
44d10b1f
RW
7240 (sha256
7241 (base32
7242 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
7243 ;; Patch setup.py so it looks for python-setuptools, which is
7244 ;; required to parse the keyword 'install_requires' in setup.py.
7245 (patches (search-patches "python-configobj-setuptools.patch"))))
7246 (build-system python-build-system)
7247 (propagated-inputs
7248 `(("python-six" ,python-six)))
7249 (synopsis "Config file reading, writing and validation")
7250 (description "ConfigObj is a simple but powerful config file reader and
7251writer: an ini file round tripper. Its main feature is that it is very easy to
7252use, with a straightforward programmer’s interface and a simple syntax for
7253config files.")
7254 (home-page "https://github.com/DiffSK/configobj")
7255 (license license:bsd-3)))
7256
7257(define-public python2-configobj
7258 (package-with-python2 python-configobj))
7259
7260(define-public python-configargparse
7261 (package
7262 (name "python-configargparse")
86ae491f 7263 (version "0.14.0")
44d10b1f
RW
7264 (source (origin
7265 (method url-fetch)
7266 (uri (pypi-uri "ConfigArgParse" version))
7267 (sha256
7268 (base32
86ae491f 7269 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
44d10b1f
RW
7270 (build-system python-build-system)
7271 (native-inputs
7272 `(("python-pyyaml" ,python-pyyaml)))
7273 (arguments
7274 `(#:phases
7275 (modify-phases %standard-phases
7276 (replace 'check
7277 (lambda _
7278 ;; Bypass setuptools-shim because one test relies on "setup.py"
7279 ;; being the first argument passed to the python call.
7280 ;;
7281 ;; NOTE: Many tests do not run because they rely on Python's
7282 ;; built-in test.test_argparse, but we remove the unit tests from
7283 ;; our Python installation.
7284 (invoke "python" "setup.py" "test"))))))
7285 (synopsis "Replacement for argparse")
7286 (description "A drop-in replacement for argparse that allows options to also
7287be set via config files and/or environment variables.")
7288 (home-page "https://github.com/bw2/ConfigArgParse")
7289 (license license:expat)))
7290
7291(define-public python2-configargparse
7292 (package-with-python2 python-configargparse))
7293
7294(define-public python-argparse-manpage
7295 (package
7296 (name "python-argparse-manpage")
7297 (version "1.1")
7298 (source
7299 (origin
7300 (method url-fetch)
7301 (uri (pypi-uri "argparse-manpage" version))
7302 (sha256
7303 (base32
7304 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
7305 (build-system python-build-system)
7306 (home-page "https://github.com/praiskup/argparse-manpage")
7307 (synopsis "Build manual page from Python's ArgumentParser object")
7308 (description
7309 "This package provides tools to build manual pages from Python's
7310@code{ArgumentParser} object.")
7311 (license license:asl2.0)))
7312
7313(define-public python2-contextlib2
7314 (package
7315 (name "python2-contextlib2")
7316 (version "0.5.5")
7317 (source
7318 (origin
7319 (method url-fetch)
7320 (uri (pypi-uri "contextlib2" version))
7321 (sha256
7322 (base32
7323 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
7324 (build-system python-build-system)
7325 (arguments
7326 `(#:python ,python-2
7327 #:phases
7328 (modify-phases %standard-phases
7329 (replace 'check
7330 (lambda _ (invoke "python" "test_contextlib2.py" "-v"))))))
7331 (native-inputs
7332 `(("python2-unittest2" ,python2-unittest2)))
7333 (home-page "http://contextlib2.readthedocs.org/")
7334 (synopsis "Tools for decorators and context managers")
7335 (description "This module is primarily a backport of the Python
73363.2 contextlib to earlier Python versions. Like contextlib, it
7337provides utilities for common tasks involving decorators and context
7338managers. It also contains additional features that are not part of
7339the standard library.")
7340 (license license:psfl)))
7341
7342(define-public python-texttable
7343 (package
7344 (name "python-texttable")
7345 (version "0.8.7")
7346 (source
7347 (origin
7348 (method url-fetch)
7349 (uri (pypi-uri "texttable" version))
7350 (sha256
7351 (base32
7352 "1liiiydgkg37i46a418aw19fyf6z3ds51wdwwpyjbs12x0phhf4a"))))
7353 (build-system python-build-system)
7354 (arguments '(#:tests? #f)) ; no tests
7355 (home-page "https://github.com/foutaise/texttable/")
7356 (synopsis "Python module for creating simple ASCII tables")
7357 (description "Texttable is a Python module for creating simple ASCII
7358tables.")
7359 (license license:lgpl2.1+)))
7360
7361(define-public python2-texttable
7362 (package-with-python2 python-texttable))
7363
7364(define-public python-atomicwrites
7365 (package
7366 (name "python-atomicwrites")
14f10479 7367 (version "1.3.0")
44d10b1f
RW
7368 (source (origin
7369 (method url-fetch)
7370 (uri (pypi-uri "atomicwrites" version))
7371 (sha256
7372 (base32
14f10479 7373 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
44d10b1f
RW
7374 (build-system python-build-system)
7375 (synopsis "Atomic file writes in Python")
7376 (description "Library for atomic file writes using platform dependent tools
7377for atomic file system operations.")
7378 (home-page "https://github.com/untitaker/python-atomicwrites")
7379 (license license:expat)))
7380
7381(define-public python2-atomicwrites
7382 (package-with-python2 python-atomicwrites))
7383
7384(define-public python-click-threading
7385 (package
7386 (name "python-click-threading")
7387 (version "0.4.4")
7388 (source (origin
7389 (method url-fetch)
7390 (uri (pypi-uri "click-threading" version))
7391 (sha256
7392 (base32
7393 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
7394 (build-system python-build-system)
7395 (propagated-inputs
7396 `(("python-click" ,python-click)))
7397 (synopsis "Utilities for multithreading in Click")
7398 (description "This package provides utilities for multithreading in Click
7399applications.")
7400 (home-page "https://github.com/click-contrib/click-threading")
7401 (license license:expat)))
7402
7403(define-public python-click-log
7404 (package
7405 (name "python-click-log")
7406 (version "0.3.2")
7407 (source (origin
7408 (method url-fetch)
7409 (uri (pypi-uri "click-log" version))
7410 (sha256
7411 (base32
7412 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
7413 (build-system python-build-system)
7414 (propagated-inputs
7415 `(("python-click" ,python-click)))
7416 (synopsis "Logging for click applications")
7417 (description "This package provides a Python library for logging Click
7418applications.")
7419 (home-page "https://github.com/click-contrib/click-log")
7420 (license license:expat)))
7421
7422(define-public python-apipkg
7423 (package
7424 (name "python-apipkg")
7425 (version "1.4")
7426 (source (origin
7427 (method url-fetch)
7428 (uri (pypi-uri "apipkg" version))
7429 (sha256
7430 (base32
7431 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
7432 (build-system python-build-system)
7433 (native-inputs
7434 `(("python-pytest" ,python-pytest)))
7435 (synopsis "Namespace control and lazy-import mechanism")
7436 (description "With apipkg you can control the exported namespace of a Python
7437package and greatly reduce the number of imports for your users. It is a small
7438pure Python module that works on virtually all Python versions.")
7439 (home-page "https://github.com/pytest-dev/apipkg")
7440 (license license:expat)))
7441
7442(define-public python2-apipkg
7443 (package-with-python2 python-apipkg))
7444
7445(define-public python-execnet
7446 (package
7447 (name "python-execnet")
7448 (version "1.4.1")
7449 (source (origin
7450 (method url-fetch)
7451 (uri (pypi-uri "execnet" version))
7452 (sha256
7453 (base32
7454 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
7455 (build-system python-build-system)
7456 (arguments
7457 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
7458 ;; The two test failures are caused by the lack of an `ssh` executable.
7459 ;; The test suite can be run with pytest after the 'install' phase.
7460 #:tests? #f))
7461 (native-inputs
7462 `(("python-pytest" ,python-pytest)
7463 ("python-setuptools-scm" ,python-setuptools-scm)))
7464 (propagated-inputs
7465 `(("python-apipkg" ,python-apipkg)))
7466 (synopsis "Rapid multi-Python deployment")
7467 (description "Execnet provides a share-nothing model with
7468channel-send/receive communication for distributing execution across many
7469Python interpreters across version, platform and network barriers. It has a
7470minimal and fast API targeting the following uses:
7471@enumerate
7472@item distribute tasks to (many) local or remote CPUs
7473@item write and deploy hybrid multi-process applications
7474@item write scripts to administer multiple environments
7475@end enumerate")
7476 (home-page "http://codespeak.net/execnet/")
7477 (license license:expat)))
7478
7479(define-public python2-execnet
7480 (package-with-python2 python-execnet))
7481
7482(define-public python-icalendar
7483 (package
7484 (name "python-icalendar")
7485 (version "4.0.3")
7486 (source (origin
7487 (method url-fetch)
7488 (uri (pypi-uri "icalendar" version))
7489 (sha256
7490 (base32
7491 "0mk3dk1dxkcm46jy48v27j2w2349iv4sbimqj1yb5js43mx49hh7"))))
7492 (build-system python-build-system)
7493 (propagated-inputs
7494 `(("python-dateutil" ,python-dateutil)
7495 ("python-pytz" ,python-pytz)))
7496 (synopsis "Python library for parsing iCalendar files")
7497 (description "The icalendar package is a parser/generator of iCalendar
7498files for use with Python.")
7499 (home-page "https://github.com/collective/icalendar")
7500 (license license:bsd-2)))
7501
7502(define-public python-sphinxcontrib-newsfeed
7503 (package
7504 (name "python-sphinxcontrib-newsfeed")
7505 (version "0.1.4")
7506 (source (origin
7507 (method url-fetch)
7508 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
7509 (sha256
7510 (base32
7511 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
7512 (arguments '(#:tests? #f)) ; No tests.
7513 (build-system python-build-system)
7514 (propagated-inputs
7515 `(("python-sphinx" ,python-sphinx)))
7516 (synopsis "News Feed extension for Sphinx")
7517 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
7518Blog, News or Announcements section to a Sphinx website.")
7519 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
7520 (license license:bsd-2)))
7521
7522(define-public python-args
7523 (package
7524 (name "python-args")
7525 (version "0.1.0")
7526 (source (origin
7527 (method url-fetch)
7528 (uri (pypi-uri "args" version))
7529 (sha256
7530 (base32
7531 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
7532 (build-system python-build-system)
7533 (home-page "https://github.com/kennethreitz/args")
7534 (synopsis "Command-line argument parser")
7535 (description
7536 "This library provides a Python module to parse command-line arguments.")
7537 (license license:bsd-3)))
7538
7539(define-public python2-args
7540 (package-with-python2 python-args))
7541
7542(define-public python-clint
7543 (package
7544 (name "python-clint")
7545 (version "0.5.1")
7546 (source (origin
7547 (method url-fetch)
7548 (uri (pypi-uri "clint" version))
7549 (sha256
7550 (base32
7551 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
7552 (build-system python-build-system)
7553 (arguments
7554 '(#:phases
7555 (modify-phases %standard-phases
7556 (replace 'check
7557 (lambda _ (invoke "py.test" "-v"))))))
7558 (native-inputs
7559 `(("python-pytest" ,python-pytest)))
7560 (propagated-inputs
7561 `(("python-args" ,python-args)))
7562 (home-page "https://github.com/kennethreitz/clint")
7563 (synopsis "Command-line interface tools")
7564 (description
7565 "Clint is a Python module filled with a set of tools for developing
7566command-line applications, including tools for colored and indented
7567output, progress bar display, and pipes.")
7568 (license license:isc)))
7569
7570(define-public python2-clint
7571 (package-with-python2 python-clint))
7572
44d10b1f
RW
7573(define-public python-rply
7574 (package
7575 (name "python-rply")
7576 (version "0.7.5")
7577 (source (origin
7578 (method url-fetch)
7579 (uri (pypi-uri "rply" version))
7580 (sha256
7581 (base32
7582 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
7583 (build-system python-build-system)
7584 (propagated-inputs
7585 `(("python-appdirs" ,python-appdirs)))
7586 (home-page "https://github.com/alex/rply")
7587 (synopsis "Parser generator for Python")
7588 (description
7589 "This package provides a pure Python based parser generator, that also
7590works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
7591with a new public API, and RPython support.")
7592 (license license:bsd-3)))
7593
7594(define-public python2-rply
7595 (package-with-python2 python-rply))
7596
7597(define-public python-hy
7598 (package
7599 (name "python-hy")
7600 (version "0.13.0")
7601 (source (origin
7602 (method url-fetch)
7603 (uri (pypi-uri "hy" version))
7604 (sha256
7605 (base32
7606 "19sfymaksx9jhksfnb15ahid46mzrhdfzz6yy2craz2qnzvpmky8"))))
7607 (build-system python-build-system)
7608 (arguments
7609 '(#:phases
7610 (modify-phases %standard-phases
7611 (replace 'check
7612 (lambda _
7613 ;; Tests require write access to HOME.
7614 (setenv "HOME" "/tmp")
7615 (invoke "nosetests"))))))
7616 (native-inputs
7617 `(("python-coverage" ,python-coverage)
7618 ("python-nose" ,python-nose)))
7619 (propagated-inputs
7620 `(("python-astor" ,python-astor)
7621 ("python-clint" ,python-clint)
7622 ("python-rply" ,python-rply)))
7623 (home-page "http://hylang.org/")
7624 (synopsis "Lisp frontend to Python")
7625 (description
7626 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
7627its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
7628Python at your fingertips, in Lisp form.")
7629 (license license:expat)))
7630
7631(define-public python2-hy
7632 (package-with-python2 python-hy))
7633
7634(define-public python2-functools32
7635 (package
7636 (name "python2-functools32")
7637 (version "3.2.3-2")
7638 (source
7639 (origin
7640 (method url-fetch)
7641 (uri (pypi-uri "functools32" version))
7642 (sha256
7643 (base32
7644 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
7645 (build-system python-build-system)
7646 (arguments
7647 `(#:python ,python-2
7648 #:tests? #f)) ; no test target
7649 (home-page "https://github.com/MiCHiLU/python-functools32")
7650 (synopsis
7651 "Backport of the functools module from Python 3.2.3")
7652 (description
7653 "This package is a backport of the @code{functools} module from Python
76543.2.3 for use with older versions of Python and PyPy.")
7655 (license license:expat)))
7656
7657(define-public python2-subprocess32
7658 (package
7659 (name "python2-subprocess32")
7660 (version "3.2.7")
7661 (source (origin
7662 (method url-fetch)
7663 (uri (pypi-uri "subprocess32" version))
7664 (sha256
7665 (base32
7666 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
7667 (patches
7668 (search-patches "python2-subprocess32-disable-input-test.patch"))))
7669 (build-system python-build-system)
7670 (arguments
7671 `(#:python ,python-2
7672 ;; The test suite fails with Python > 2.7.13:
7673 ;; import test.support
7674 ;; ImportError: No module named support
7675 #:tests? #f
7676 #:phases
7677 (modify-phases %standard-phases
7678 (add-after 'unpack 'patch-/bin/sh
7679 (lambda _
7680 (substitute* '("subprocess32.py"
7681 "test_subprocess32.py")
7682 (("/bin/sh") (which "sh")))
7683 #t)))))
7684 (home-page "https://github.com/google/python-subprocess32")
7685 (synopsis "Backport of the subprocess module from Python 3.2")
7686 (description
7687 "This is a backport of the @code{subprocess} standard library module
7688from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
7689new features. On POSIX systems it is guaranteed to be reliable when used
7690in threaded applications. It includes timeout support from Python 3.3 but
7691otherwise matches 3.2’s API.")
7692 (license license:psfl)))
7693
7694(define-public python2-futures
7695 (package
7696 (name "python2-futures")
7697 (version "3.2.0")
7698 (source
7699 (origin
7700 (method url-fetch)
7701 (uri (pypi-uri "futures" version))
7702 (sha256
7703 (base32
7704 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
7705 (build-system python-build-system)
ba88eea2
RW
7706 (arguments
7707 `(#:python ,python-2
7708 #:phases
7709 (modify-phases %standard-phases
7710 (replace 'check
7711 (lambda _
7712 (invoke "python" "test_futures.py")
7713 #t)))))
44d10b1f
RW
7714 (home-page "https://github.com/agronholm/pythonfutures")
7715 (synopsis
7716 "Backport of the concurrent.futures package from Python 3.2")
7717 (description
7718 "The concurrent.futures module provides a high-level interface for
7719asynchronously executing callables. This package backports the
7720concurrent.futures package from Python 3.2")
7721 (license license:bsd-3)))
7722
7723(define-public python-promise
7724 (package
7725 (name "python-promise")
7726 (version "0.4.2")
7727 (source
7728 (origin
7729 (method url-fetch)
7730 (uri (pypi-uri "promise" version))
7731 (sha256
7732 (base32
7733 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
7734 (build-system python-build-system)
7735 ;; Tests wants python-futures, which is a python2 only program, and
7736 ;; can't be found by python-promise at test time.
7737 (arguments `(#:tests? #f))
7738 (home-page "https://github.com/syrusakbary/promise")
7739 (synopsis "Promises/A+ implementation for Python")
7740 (description
7741 "Promises/A+ implementation for Python")
7742 (properties `((python2-variant . ,(delay python2-promise))))
7743 (license license:expat)))
7744
7745(define-public python2-promise
7746 (let ((promise (package-with-python2
7747 (strip-python2-variant python-promise))))
7748 (package (inherit promise)
7749 (arguments (substitute-keyword-arguments (package-arguments promise)
7750 ((#:tests? _) #t)))
7751 (native-inputs
7752 `(("python2-futures" ,python2-futures)
7753 ("python2-pytest" ,python2-pytest)
7754 ,@(package-native-inputs promise))))))
7755
7756(define-public python-colorama
7757 (package
7758 (name "python-colorama")
7759 (version "0.3.9")
7760 (source
7761 (origin
7762 (method url-fetch)
7763 (uri (pypi-uri "colorama" version))
7764 (sha256
7765 (base32
7766 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
7767 (build-system python-build-system)
7768 (synopsis "Colored terminal text rendering for Python")
7769 (description "Colorama is a Python library for rendering colored terminal
7770text.")
7771 (home-page "https://pypi.python.org/pypi/colorama")
7772 (license license:bsd-3)))
7773
7774(define-public python2-colorama
7775 (package-with-python2 python-colorama))
7776
7777(define-public python-rsa
7778 (package
7779 (name "python-rsa")
7780 (version "3.4.2")
7781 (source
7782 (origin
7783 (method url-fetch)
7784 (uri (pypi-uri "rsa" version))
7785 (sha256
7786 (base32
7787 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
7788 (build-system python-build-system)
7789 (propagated-inputs
7790 `(("python-pyasn1" ,python-pyasn1)))
7791 (synopsis "Pure-Python RSA implementation")
7792 (description "Python-RSA is a pure-Python RSA implementation. It supports
7793encryption and decryption, signing and verifying signatures, and key
7794generation according to PKCS#1 version 1.5. It can be used as a Python
7795library as well as on the command line.")
7796 (home-page "https://stuvel.eu/rsa")
7797 (license license:asl2.0)))
7798
7799(define-public python2-rsa
7800 (package-with-python2 python-rsa))
7801
7802(define-public python-pluggy
7803 (package
7804 (name "python-pluggy")
b86b7996 7805 (version "0.9.0")
44d10b1f
RW
7806 (source
7807 (origin
7808 (method url-fetch)
7809 (uri (pypi-uri "pluggy" version))
7810 (sha256
7811 (base32
b86b7996 7812 "13yg2q0wgcb4l8lgdvcnzqa8db5lrw3nwn50lxjy1z5jkp7gkv0r"))))
44d10b1f
RW
7813 (build-system python-build-system)
7814 (native-inputs
7815 `(("python-setuptools-scm" ,python-setuptools-scm)))
7816 (synopsis "Plugin and hook calling mechanism for Python")
7817 (description "Pluggy is an extraction of the plugin manager as used by
7818Pytest but stripped of Pytest specific details.")
7819 (home-page "https://pypi.python.org/pypi/pluggy")
7820 (license license:expat)))
7821
7822(define-public python2-pluggy
7823 (package-with-python2 python-pluggy))
7824
7825(define-public python-tox
7826 (package
7827 (name "python-tox")
7828 (version "2.8.1")
7829 (source
7830 (origin
7831 (method url-fetch)
7832 (uri (pypi-uri "tox" version))
7833 (sha256
7834 (base32
7835 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
7836 (build-system python-build-system)
7837 (arguments
7838 ;; FIXME: Tests require pytest-timeout, which itself requires
7839 ;; pytest>=2.8.0 for installation.
7840 '(#:tests? #f))
7841 (propagated-inputs
7842 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
7843 ("python-py" ,python-py)
7844 ("python-virtualenv" ,python-virtualenv)))
7845 (native-inputs
7846 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
7847 ("python-pytest" ,python-pytest) ; >= 2.3.5
7848 ("python-setuptools-scm" ,python-setuptools-scm)))
7849 (home-page "http://tox.testrun.org/")
7850 (synopsis "Virtualenv-based automation of test activities")
7851 (description "Tox is a generic virtualenv management and test command line
7852tool. It can be used to check that a package installs correctly with
7853different Python versions and interpreters, or run tests in each type of
7854supported environment, or act as a frontend to continuous integration
7855servers.")
7856 (license license:expat)))
7857
7858(define-public python2-tox
7859 (package-with-python2 python-tox))
7860
7861(define-public python-jmespath
7862 (package
7863 (name "python-jmespath")
7864 (version "0.9.3")
7865 (source
7866 (origin
7867 (method url-fetch)
7868 (uri (pypi-uri "jmespath" version))
7869 (sha256
7870 (base32
7871 "0r7wc7fsxmlwzxx9j1j7rms06c6xs6d4sysirdhz1jk2mb4x90ba"))))
7872 (build-system python-build-system)
7873 (native-inputs
7874 `(("python-nose" ,python-nose)))
7875 (synopsis "JSON Matching Expressions")
7876 (description "JMESPath (pronounced “james path”) is a Python library that
7877allows one to declaratively specify how to extract elements from a JSON
7878document.")
7879 (home-page "https://github.com/jmespath/jmespath.py")
7880 (license license:expat)))
7881
7882(define-public python2-jmespath
7883 (package-with-python2 python-jmespath))
7884
7885(define-public python-botocore
7886 (package
7887 (name "python-botocore")
7888 (version "1.8.43")
7889 (source
7890 (origin
7891 (method url-fetch)
7892 (uri (pypi-uri "botocore" version))
7893 (sha256
7894 (base32
7895 "12cqpbnz3vfv41mp9admvciw7bc7hz57sjpqs2bxaw9wnfmbw5lg"))))
7896 (build-system python-build-system)
7897 (arguments
7898 ;; FIXME: Many tests are failing.
7899 '(#:tests? #f))
7900 (propagated-inputs
7901 `(("python-dateutil" ,python-dateutil)
7902 ("python-docutils" ,python-docutils)
7903 ("python-jmespath" ,python-jmespath)))
7904 (native-inputs
7905 `(("python-mock" ,python-mock)
7906 ("python-nose" ,python-nose)
7907 ("behave" ,behave)
7908 ("python-tox" ,python-tox)
7909 ("python-wheel" ,python-wheel)))
7910 (home-page "https://github.com/boto/botocore")
7911 (synopsis "Low-level interface to AWS")
7912 (description "Botocore is a Python library that provides a low-level
7913interface to the Amazon Web Services (AWS) API.")
7914 (license license:asl2.0)))
7915
7916(define-public python2-botocore
7917 (package-with-python2 python-botocore))
7918
7919(define-public python-xdo
7920 (package
7921 (name "python-xdo")
7922 (version "0.3")
7923 (source (origin
7924 (method url-fetch)
7925 (uri (string-append
7926 "http://http.debian.net/debian/pool/main/p/python-xdo/"
7927 "python-xdo_" version ".orig.tar.gz"))
7928 (sha256
7929 (base32
7930 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
7931 (build-system python-build-system)
7932 (arguments
7933 '(#:phases
7934 (modify-phases %standard-phases
7935 (add-before 'install 'patch-libxdo-path
7936 ;; Hardcode the path of dynamically loaded libxdo library.
7937 (lambda* (#:key inputs #:allow-other-keys)
7938 (let ((libxdo (string-append
7939 (assoc-ref inputs "xdotool")
7940 "/lib/libxdo.so")))
7941 (substitute* "xdo/_xdo.py"
7942 (("find_library\\(\"xdo\"\\)")
7943 (simple-format #f "\"~a\"" libxdo)))
7944 #t))))
7945 #:tests? #f)) ; no tests provided
7946 (propagated-inputs
7947 `(("python-six" ,python-six)))
7948 (inputs
7949 `(("xdotool" ,xdotool)
7950 ("libX11" ,libx11)))
7951 (home-page "https://tracker.debian.org/pkg/python-xdo")
7952 (synopsis "Python library for simulating X11 keyboard/mouse input")
7953 (description "Provides bindings to libxdo for manipulating X11 via simulated
7954input. (Note that this is mostly a legacy library; you may wish to look at
7955python-xdo for newer bindings.)")
7956 (license license:bsd-3)))
7957
7958(define-public python2-xdo
7959 (package-with-python2 python-xdo))
7960
7961(define-public python-mako
7962 (package
7963 (name "python-mako")
7964 (version "1.0.7")
7965 (source
7966 (origin
7967 (method url-fetch)
7968 (uri (pypi-uri "Mako" version))
7969 (sha256
7970 (base32
7971 "1bi5gnr8r8dva06qpyx4kgjc6spm2k1y908183nbbaylggjzs0jf"))))
7972 (build-system python-build-system)
7973 (propagated-inputs
7974 `(("python-markupsafe" ,python-markupsafe)))
7975 (native-inputs
7976 `(("python-mock" ,python-mock)
7977 ("python-nose" ,python-nose)
7978 ("python-pytest" ,python-pytest)))
7979 (home-page "http://www.makotemplates.org/")
7980 (synopsis "Templating language for Python")
7981 (description "Mako is a templating language for Python that compiles
7982templates into Python modules.")
7983 (license license:expat)))
7984
7985(define-public python2-mako
7986 (package-with-python2 python-mako))
7987
7988(define-public python-waitress
7989 (package
7990 (name "python-waitress")
7991 (version "1.1.0")
7992 (source
7993 (origin
7994 (method url-fetch)
7995 (uri (pypi-uri "waitress" version))
7996 (patches (search-patches "python-waitress-fix-tests.patch"))
7997 (sha256
7998 (base32
7999 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
8000 (build-system python-build-system)
8001 (home-page "https://github.com/Pylons/waitress")
8002 (synopsis "Waitress WSGI server")
8003 (description "Waitress is meant to be a production-quality pure-Python WSGI
8004server with very acceptable performance.")
8005 (license license:zpl2.1)))
8006
8007(define-public python2-waitress
8008 (package-with-python2 python-waitress))
8009
8010(define-public python-pyquery
8011 (package
8012 (name "python-pyquery")
8013 (version "1.2.17")
8014 (source
8015 (origin
8016 (method url-fetch)
8017 (uri (pypi-uri "pyquery" version))
8018 (sha256
8019 (base32
8020 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
8021 (build-system python-build-system)
8022 (native-inputs
8023 `(("python-webob" ,python-webob)
8024 ("python-webtest" ,python-webtest)))
8025 (propagated-inputs
8026 `(("python-lxml" ,python-lxml)
8027 ("python-cssselect" ,python-cssselect)))
8028 (home-page "https://github.com/gawel/pyquery")
8029 (synopsis "Make jQuery-like queries on xml documents")
8030 (description "pyquery allows you to make jQuery queries on xml documents.
8031The API is as much as possible the similar to jQuery. pyquery uses lxml for
8032fast xml and html manipulation.")
8033 (license license:bsd-3)))
8034
44d10b1f
RW
8035(define-public python-anyjson
8036 (package
8037 (name "python-anyjson")
8038 (version "0.3.3")
8039 (source
8040 (origin
8041 (method url-fetch)
8042 (uri (pypi-uri "anyjson" version))
8043 (sha256
8044 (base32
8045 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
8046 (build-system python-build-system)
8047 (arguments
8048 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
8049 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
8050 ;; whatever) so this transformation needs to be done before the tests
8051 ;; can be run. Maybe we could add a build step to transform beforehand
8052 ;; but it could be annoying/difficult.
8053 ;; We can enable tests for the Python 2 version, though, and do below.
8054 #:tests? #f))
8055 (home-page "https://bitbucket.org/runeh/anyjson/")
8056 (synopsis
8057 "Wraps best available JSON implementation in a common interface")
8058 (description
8059 "Anyjson loads whichever is the fastest JSON module installed
8060and provides a uniform API regardless of which JSON implementation is used.")
8061 (license license:bsd-3)
8062 (properties `((python2-variant . ,(delay python2-anyjson))))))
8063
8064(define-public python2-anyjson
8065 (let ((anyjson (package-with-python2
8066 (strip-python2-variant python-anyjson))))
8067 (package
8068 (inherit anyjson)
8069 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
8070 #:tests? #t
8071 ,@(package-arguments anyjson)))
8072 (native-inputs `(("python2-nose" ,python2-nose))))))
8073
8074(define-public python-amqp
8075 (package
8076 (name "python-amqp")
8077 (version "2.3.2")
8078 (source
8079 (origin
8080 (method url-fetch)
8081 (uri (pypi-uri "amqp" version))
8082 (sha256
8083 (base32
8084 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
8085 (build-system python-build-system)
8086 (native-inputs
8087 `(("python-case" ,python-case)
8088 ("python-pytest-sugar" ,python-pytest-sugar)
8089 ("python-mock" ,python-mock)))
8090 (propagated-inputs
8091 `(("python-vine" ,python-vine)))
8092 (home-page "https://github.com/celery/py-amqp")
8093 (synopsis
8094 "Low-level AMQP client for Python (fork of amqplib)")
8095 (description
8096 "This is a fork of amqplib which was originally written by Barry Pederson.
8097It is maintained by the Celery project, and used by kombu as a pure python
8098alternative when librabbitmq is not available.")
8099 (license license:lgpl2.1+)
8100 (properties `((python2-variant . ,(delay python2-amqp))))))
8101
8102(define-public python2-amqp
8103 (let ((amqp (package-with-python2
8104 (strip-python2-variant python-amqp))))
8105 (package
8106 (inherit amqp)
8107 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
8108 ;; unmaintained. Weirdly, does not do this on the python 3
8109 ;; version?
8110 #:tests? #f
8111 ,@(package-arguments amqp))))))
8112
8113(define-public python-txamqp
8114 (package
8115 (name "python-txamqp")
8116 (version "0.8.2")
8117 (source
8118 (origin
8119 (method url-fetch)
8120 (uri (pypi-uri "txAMQP" version))
8121 (sha256
8122 (base32
8123 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
8124 (build-system python-build-system)
8125 (propagated-inputs
8126 `(("python-six" ,python-six)
8127 ("python-twisted" ,python-twisted)))
8128 (home-page "https://github.com/txamqp/txamqp")
8129 (synopsis "Communicate with AMQP peers and brokers using Twisted")
8130 (description
8131 "This package provides a Python library for communicating with AMQP peers
8132and brokers using the asynchronous networking framework Twisted. It contains
8133all the necessary code to connect, send and receive messages to/from an
8134AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
8135also includes support for using Thrift RPC over AMQP in Twisted
8136applications.")
8137 (license license:asl2.0)))
8138
8139(define-public python2-txamqp
8140 (package-with-python2 python-txamqp))
8141
8142(define-public python-kombu
8143 (package
8144 (name "python-kombu")
8145 (version "4.2.2")
8146 (source
8147 (origin
8148 (method url-fetch)
8149 (uri (pypi-uri "kombu" version))
8150 (sha256
8151 (base32
8152 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
8153 (build-system python-build-system)
8154 (native-inputs
8155 `(("python-mock" ,python-mock)
8156 ("python-case" ,python-case)
8157 ("python-pyro4" ,python-pyro4)
8158 ("python-pytest-sugar" ,python-pytest-sugar)
8159 ("python-pytz" ,python-pytz)))
8160 (propagated-inputs
8161 `(("python-anyjson" ,python-anyjson)
8162 ("python-amqp" ,python-amqp)
8163 ("python-redis" ,python-redis)))
8164 (home-page "https://kombu.readthedocs.io")
8165 (synopsis "Message passing library for Python")
8166 (description "The aim of Kombu is to make messaging in Python as easy as
8167possible by providing an idiomatic high-level interface for the AMQ protocol,
8168and also provide proven and tested solutions to common messaging problems.
8169AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
8170message orientation, queuing, routing, reliability and security, for which the
8171RabbitMQ messaging server is the most popular implementation.")
8172 (license license:bsd-3)
8173 (properties `((python2-variant . ,(delay python2-kombu))))))
8174
8175(define-public python2-kombu
8176 (let ((kombu (package-with-python2
8177 (strip-python2-variant python-kombu))))
8178 (package
8179 (inherit kombu)
8180 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
8181 ;; It works fine on the python3 variant.
8182 #:tests? #f
8183 ,@(package-arguments kombu)))
8184 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8185 ,@(package-native-inputs kombu))))))
8186
8187(define-public python-billiard
8188 (package
8189 (name "python-billiard")
8190 (version "3.5.0.5")
8191 (source
8192 (origin
8193 (method url-fetch)
8194 (uri (pypi-uri "billiard" version))
8195 (sha256
8196 (base32
8197 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
8198 (build-system python-build-system)
8199 (native-inputs
8200 `(("python-case" ,python-case)
8201 ("python-pytest" ,python-pytest)))
8202 (home-page "https://github.com/celery/billiard")
8203 (synopsis
8204 "Python multiprocessing fork with improvements and bugfixes")
8205 (description
8206 "Billiard is a fork of the Python 2.7 multiprocessing package. The
8207multiprocessing package itself is a renamed and updated version of R Oudkerk's
8208pyprocessing package. This standalone variant is intended to be compatible with
8209Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
8210 (license license:bsd-3)
8211 (properties `((python2-variant . ,(delay python2-billiard))))))
8212
8213(define-public python2-billiard
8214 (let ((billiard (package-with-python2
8215 (strip-python2-variant python-billiard))))
8216 (package
8217 (inherit billiard)
8218 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8219 ("python2-mock" ,python2-mock)
8220 ,@(package-native-inputs billiard))))))
8221
8222(define-public python-celery
8223 (package
8224 (name "python-celery")
8225 (version "4.2.1")
8226 (source
8227 (origin
8228 (method url-fetch)
8229 (uri (pypi-uri "celery" version))
8230 (sha256
8231 (base32
8232 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
8233 (build-system python-build-system)
8234 (arguments
8235 '(;; TODO The tests fail with Python 3.7
8236 ;; https://github.com/celery/celery/issues/4849
8237 #:tests? #f
8238 #:phases
8239 (modify-phases %standard-phases
8240 (add-after 'unpack 'patch-requirements
8241 (lambda _
8242 (substitute* "requirements/test.txt"
8243 (("pytest>=3\\.0,<3\\.3")
8244 "pytest>=3.0"))
8245 #t)))))
8246 (native-inputs
8247 `(("python-case" ,python-case)
8248 ("python-pytest" ,python-pytest)))
8249 (propagated-inputs
8250 `(("python-pytz" ,python-pytz)
8251 ("python-billiard" ,python-billiard)
8252 ("python-kombu" ,python-kombu)))
8253 (home-page "https://celeryproject.org")
8254 (synopsis "Distributed Task Queue")
8255 (description "Celery is an asynchronous task queue/job queue based on
8256distributed message passing. It is focused on real-time operation, but
8257supports scheduling as well. The execution units, called tasks, are executed
8258concurrently on a single or more worker servers using multiprocessing,
8259Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
8260synchronously (wait until ready).")
8261 (license license:bsd-3)
8262 (properties `((python2-variant . ,(delay python2-celery))))))
8263
8264(define-public python2-celery
8265 (let ((celery (package-with-python2
8266 (strip-python2-variant python-celery))))
8267 (package
8268 (inherit celery)
8269 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8270 ("python2-mock" ,python2-mock)
8271 ,@(package-native-inputs celery))))))
8272
8273(define-public python-translitcodec
8274 (package
8275 (name "python-translitcodec")
8276 (version "0.4.0")
8277 (source
8278 (origin
8279 (method url-fetch)
8280 (uri (pypi-uri "translitcodec" version))
8281 (sha256
8282 (base32
8283 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
8284 (build-system python-build-system)
8285 (arguments
8286 `(#:tests? #f)) ; no tests provided
8287 (home-page
8288 "https://github.com/claudep/translitcodec")
8289 (synopsis
8290 "Unicode to 8-bit charset transliteration codec")
8291 (description
8292 "This package contains codecs for transliterating ISO 10646 texts into
8293best-effort representations using smaller coded character sets (ASCII,
8294ISO 8859, etc.).")
8295 (license license:expat)))
8296
8297(define-public python2-translitcodec
8298 (package-with-python2 python-translitcodec))
8299
8300(define-public python-editor
8301 (package
8302 (name "python-editor")
8303 (version "0.5")
8304 (source
8305 (origin
8306 (method url-fetch)
8307 (uri (pypi-uri "python-editor" version))
8308 (sha256
8309 (base32
8310 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
8311 (build-system python-build-system)
8312 (home-page
8313 "https://github.com/fmoo/python-editor")
8314 (synopsis
8315 "Programmatically open an editor, capture the result")
8316 (description
8317 "python-editor is a library that provides the editor module for
8318programmatically interfacing with your system's $EDITOR.")
8319 (license license:asl2.0)))
8320
8321(define-public python2-editor
8322 (package-with-python2 python-editor))
8323
8324(define-public python-sphinxcontrib-programoutput
8325 (package
8326 (name "python-sphinxcontrib-programoutput")
8327 (version "0.10")
8328 (source (origin
8329 (method url-fetch)
8330 (uri (pypi-uri "sphinxcontrib-programoutput" version))
8331 (sha256
8332 (base32
8333 "153hhnlbx4688zj9wd64819ps5znc2jlyp5crkgzvn5hxgy99vpx"))))
8334 (build-system python-build-system)
8335 (arguments
8336 ;; FIXME: Many tests are failing and the upstream is gone.
8337 '(#:tests? #f))
8338 (propagated-inputs
8339 `(("python-sphinx" ,python-sphinx)))
8340 (synopsis "Sphinx extension to include program output")
8341 (description "A Sphinx extension to literally insert the output of arbitrary
8342commands into documents, helping you to keep your command examples up to date.")
8343 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
8344 (license license:bsd-2)))
8345
8346(define-public python2-sphinxcontrib-programoutput
8347 (package-with-python2 python-sphinxcontrib-programoutput))
8348
8349(define-public python-sphinx-repoze-autointerface
8350 (package
8351 (name "python-sphinx-repoze-autointerface")
8352 (version "0.8")
8353 (source (origin
8354 (method url-fetch)
8355 (uri (pypi-uri "repoze.sphinx.autointerface" version))
8356 (sha256
8357 (base32
8358 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
8359 (build-system python-build-system)
8360 (arguments '(#:tests? #f)) ; No tests.
8361 (propagated-inputs
8362 `(("python-sphinx" ,python-sphinx)
8363 ("python-zope-interface" ,python-zope-interface)))
8364 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
8365 (description "This package defines an extension for the Sphinx documentation
8366system. The extension allows generation of API documentation by
8367introspection of @code{zope.interface} instances in code.")
8368 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
8369 (license license:repoze)))
8370
8371(define-public python2-sphinx-repoze-autointerface
8372 (package-with-python2 python-sphinx-repoze-autointerface))
8373
8374(define-public python-vobject
8375 (package
8376 (name "python-vobject")
8377 (version "0.9.5")
8378 (source (origin
8379 (method url-fetch)
8380 (uri (pypi-uri "vobject" version))
8381 (sha256
8382 (base32
8383 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
8384 (build-system python-build-system)
8385 (arguments
8386 '(;; The test suite relies on some non-portable Windows interfaces.
8387 #:tests? #f))
8388 (propagated-inputs
8389 `(("python-dateutil" ,python-dateutil)
8390 ("python-pyicu" ,python-pyicu)))
8391 (synopsis "Parse and generate vCard and vCalendar files")
8392 (description "Vobject is intended to be a full featured Python package for
8393parsing and generating vCard and vCalendar files. Currently, iCalendar files
8394are supported and well tested. vCard 3.0 files are supported, and all data
8395should be imported, but only a few components are understood in a sophisticated
8396way.")
8397 (home-page "http://eventable.github.io/vobject/")
8398 (license license:asl2.0)))
8399
8400(define-public python2-vobject
8401 (package-with-python2 python-vobject))
8402
8403(define-public python-munkres
8404 (package
8405 (name "python-munkres")
8406 (version "1.0.8")
8407 (source (origin
8408 (method url-fetch)
8409 (uri (pypi-uri "munkres" version))
8410 (sha256
8411 (base32
8412 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
8413 (build-system python-build-system)
8414 (arguments
8415 '(#:tests? #f)) ; no test suite
8416 (home-page "http://software.clapper.org/munkres/")
8417 (synopsis "Implementation of the Munkres algorithm")
8418 (description "The Munkres module provides an implementation of the Munkres
8419algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
8420useful for solving the Assignment Problem.")
8421 (license license:bsd-3)))
8422
8423(define-public python2-munkres
8424 (package-with-python2 python-munkres))
8425
8426(define-public python-whoosh
8427 (package
8428 (name "python-whoosh")
8429 (version "2.7.4")
8430 (source
8431 (origin
8432 (method url-fetch)
8433 (uri (pypi-uri "Whoosh" version))
8434 (sha256
8435 (base32
8436 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
8437 (build-system python-build-system)
8438 (native-inputs
8439 `(("python-pytest" ,python-pytest)))
8440 (home-page "https://bitbucket.org/mchaput/whoosh")
8441 (synopsis "Full text indexing, search, and spell checking library")
8442 (description
8443 "Whoosh is a fast, pure-Python full text indexing, search, and spell
8444checking library.")
8445 (license license:bsd-2)))
8446
8447(define-public python2-whoosh
8448 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
8449 (package (inherit whoosh)
8450 (propagated-inputs
8451 `(("python2-backport-ssl-match-hostname"
8452 ,python2-backport-ssl-match-hostname)
8453 ,@(package-propagated-inputs whoosh))))))
8454
8455(define-public python-pathlib
8456 (package
8457 (name "python-pathlib")
8458 (version "1.0.1")
8459 (source (origin
8460 (method url-fetch)
8461 (uri (pypi-uri "pathlib" version))
8462 (sha256
8463 (base32
8464 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
8465 (build-system python-build-system)
8466 ;; The tests depend on the internal "test" module, which does not provide
8467 ;; a stable interface.
8468 (arguments `(#:tests? #f))
8469 (home-page "https://pathlib.readthedocs.org/")
8470 (synopsis "Object-oriented file system paths")
8471 (description "Pathlib offers a set of classes to handle file system paths.
8472It offers the following advantages over using string objects:
8473
8474@enumerate
8475@item No more cumbersome use of os and os.path functions. Everything can
8476be done easily through operators, attribute accesses, and method calls.
8477@item Embodies the semantics of different path types. For example,
8478comparing Windows paths ignores casing.
8479@item Well-defined semantics, eliminating any inconsistencies or
8480ambiguities (forward vs. backward slashes, etc.).
8481@end enumerate
8482
8483Note: In Python 3.4, pathlib is now part of the standard library. For other
8484Python versions please consider python-pathlib2 instead, which tracks the
8485standard library module. This module (python-pathlib) isn't maintained
8486anymore.")
8487 (license license:expat)))
8488
8489(define-public python2-pathlib
8490 (package-with-python2 python-pathlib))
8491
8492(define-public python2-pathlib2
8493 (package
8494 (name "python2-pathlib2")
54da6f9f 8495 (version "2.3.3")
44d10b1f
RW
8496 (source (origin
8497 (method url-fetch)
8498 (uri (pypi-uri "pathlib2" version))
8499 (sha256
8500 (base32
54da6f9f 8501 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
44d10b1f
RW
8502 (build-system python-build-system)
8503 ;; We only need the the Python 2 variant, since for Python 3 our minimum
8504 ;; version is 3.4 which already includes this package as part of the
8505 ;; standard library.
8506 (arguments
8507 `(#:python ,python-2))
8508 (propagated-inputs
8509 `(("python2-scandir" ,python2-scandir)
8510 ("python2-six" ,python2-six)))
8511 (home-page "https://pypi.python.org/pypi/pathlib2/")
8512 (synopsis "Object-oriented file system paths - backport of standard
8513pathlib module")
8514 (description "The goal of pathlib2 is to provide a backport of standard
8515pathlib module which tracks the standard library module, so all the newest
8516features of the standard pathlib can be used also on older Python versions.
8517
8518Pathlib offers a set of classes to handle file system paths. It offers the
8519following advantages over using string objects:
8520
8521@enumerate
8522@item No more cumbersome use of os and os.path functions. Everything can
8523be done easily through operators, attribute accesses, and method calls.
8524@item Embodies the semantics of different path types. For example,
8525comparing Windows paths ignores casing.
8526@item Well-defined semantics, eliminating any inconsistencies or
8527ambiguities (forward vs. backward slashes, etc.).
8528@end enumerate")
8529 (license license:expat)))
8530
8531(define-public python2-pathlib2-bootstrap
8532 (hidden-package
8533 (package
8534 (inherit python2-pathlib2)
8535 (name "python2-pathlib2-bootstrap")
8536 (propagated-inputs
8537 `(("python2-scandir" ,python2-scandir)
8538 ("python2-six" ,python2-six-bootstrap))))))
8539
8540(define-public python-jellyfish
8541 (package
8542 (name "python-jellyfish")
8543 (version "0.5.6")
8544 (source (origin
8545 (method url-fetch)
8546 (uri (pypi-uri "jellyfish" version))
8547 (sha256
8548 (base32
8549 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
8550 (build-system python-build-system)
8551 (native-inputs
8552 `(("python-pytest" ,python-pytest)))
8553 (home-page "https://github.com/jamesturk/jellyfish")
8554 (synopsis "Approximate and phonetic matching of strings")
8555 (description "Jellyfish uses a variety of string comparison and phonetic
8556encoding algorithms to do fuzzy string matching.")
8557 (license license:bsd-2)
8558 (properties `((python2-variant . ,(delay python2-jellyfish))))))
8559
8560(define-public python2-jellyfish
8561 (let ((jellyfish (package-with-python2
8562 (strip-python2-variant python-jellyfish))))
8563 (package (inherit jellyfish)
8564 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
8565 ,@(package-native-inputs jellyfish))))))
8566
8567(define-public python2-unicodecsv
8568 (package
8569 (name "python2-unicodecsv")
8570 (version "0.14.1")
8571 (source (origin
8572 (method url-fetch)
8573 ;; The test suite is not included in the PyPi release.
8574 ;; https://github.com/jdunck/python-unicodecsv/issues/19
8575 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
8576 "archive/" version ".tar.gz"))
8577 (file-name (string-append name "-" version ".tar.gz"))
8578 (sha256
8579 (base32
8580 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
8581 (build-system python-build-system)
8582 (arguments
8583 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
8584 #:python ,python-2))
8585 (native-inputs
8586 `(("python2-unittest2" ,python2-unittest2)))
8587 (home-page "https://github.com/jdunck/python-unicodecsv")
8588 (synopsis "Unicode CSV module for Python 2")
8589 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
8590module, adding support for Unicode strings.")
8591 (license license:bsd-2)))
8592
8593(define-public python-rarfile
8594 (package
8595 (name "python-rarfile")
8596 (version "2.8")
8597 (source (origin
8598 (method url-fetch)
8599 (uri (pypi-uri "rarfile" version))
8600 (sha256
8601 (base32
8602 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
8603 (build-system python-build-system)
8604 (arguments
8605 '(#:phases
8606 (modify-phases %standard-phases
8607 (replace 'check
8608 ;; Many tests fail, but the installation proceeds.
e59dd341 8609 (lambda _ (invoke "make" "-C" "test" "test"))))))
44d10b1f
RW
8610 (native-inputs
8611 `(("which" ,which))) ; required for tests
8612 (propagated-inputs
8613 `(("libarchive" ,libarchive)))
8614 (home-page "https://github.com/markokr/rarfile")
8615 (synopsis "RAR archive reader for Python")
8616 (description "This is Python module for RAR archive reading. The interface
8617is made as zipfile like as possible.")
8618 (license license:isc)))
8619
8620(define-public python2-rarfile
8621 (package-with-python2 python-rarfile))
8622
8623(define-public python-magic
8624 (package
8625 (name "python-magic")
8626 (version "0.4.15")
8627 (source
8628 (origin
8629 (method url-fetch)
8630 (uri (pypi-uri "python-magic" version))
8631 (sha256
8632 (base32
8633 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
8634 (file-name (string-append name "-" version "-checkout"))))
8635 (build-system python-build-system)
8636 (arguments
8637 ;; The tests are unreliable, so don't run them. The tests fail
8638 ;; under Python3 because they were written for Python2 and
8639 ;; contain import statements that do not work in Python3. One of
8640 ;; the tests fails under Python2 because its assertions are
8641 ;; overly stringent; it relies on comparing output strings which
8642 ;; are brittle and can change depending on the version of
8643 ;; libmagic being used and the system on which the test is
8644 ;; running. In my case, under GuixSD 0.10.0, only one test
8645 ;; failed, and it seems to have failed only because the version
8646 ;; of libmagic that is packaged in Guix outputs a slightly
8647 ;; different (but not wrong) string than the one that the test
8648 ;; expected.
8649 '(#:tests? #f
8650 #:phases (modify-phases %standard-phases
8651 ;; Replace a specific method call with a hard-coded
8652 ;; path to the necessary libmagic.so file in the
8653 ;; store. If we don't do this, then the method call
8654 ;; will fail to find the libmagic.so file, which in
8655 ;; turn will cause any application using
8656 ;; python-magic to fail.
8657 (add-before 'build 'hard-code-path-to-libmagic
8658 (lambda* (#:key inputs #:allow-other-keys)
8659 (let ((file (assoc-ref inputs "file")))
8660 (substitute* "magic.py"
8661 (("ctypes.util.find_library\\('magic'\\)")
8662 (string-append "'" file "/lib/libmagic.so'")))
8663 #t)))
8664 (add-before 'install 'disable-egg-compression
8665 (lambda _
8666 (let ((port (open-file "setup.cfg" "a")))
8667 (display "\n[easy_install]\nzip_ok = 0\n"
8668 port)
8669 (close-port port)
8670 #t))))))
8671 (inputs
8672 ;; python-magic needs to be able to find libmagic.so.
8673 `(("file" ,file)))
8674 (home-page
8675 "https://github.com/ahupp/python-magic")
8676 (synopsis
8677 "File type identification using libmagic")
8678 (description
8679 "This module uses ctypes to access the libmagic file type
8680identification library. It makes use of the local magic database and
8681supports both textual and MIME-type output. Note that this module and
8682the python-file module both provide a \"magic.py\" file; these two
8683modules, which are different and were developed separately, both serve
8684the same purpose: to provide Python bindings for libmagic.")
8685 (license license:expat)))
8686
8687(define-public python2-magic
8688 (package-with-python2 python-magic))
8689
8690(define-public python2-s3cmd
8691 (package
8692 (name "python2-s3cmd")
8693 (version "1.6.1")
8694 (source
8695 (origin
8696 (method url-fetch)
8697 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
8698 "s3cmd-" version ".tar.gz"))
8699 (sha256
8700 (base32
8701 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
8702 (build-system python-build-system)
8703 (arguments
8704 ;; s3cmd is written for python2 only and contains no tests.
8705 `(#:python ,python-2
8706 #:tests? #f))
8707 (propagated-inputs
8708 `(("python2-dateutil" ,python2-dateutil)
8709 ;; The python-file package also provides a magic.py module.
8710 ;; This is an unfortunate state of affairs; however, s3cmd
8711 ;; fails to install if it cannot find specifically the
8712 ;; python-magic package. Thus we include it, instead of using
8713 ;; python-file. Ironically, s3cmd sometimes works better
8714 ;; without libmagic bindings at all:
8715 ;; https://github.com/s3tools/s3cmd/issues/198
8716 ("python2-magic" ,python2-magic)))
8717 (home-page "http://s3tools.org/s3cmd")
8718 (synopsis "Command line tool for S3-compatible storage services")
8719 (description
8720 "S3cmd is a command line tool for uploading, retrieving and managing data
8721in storage services that are compatible with the Amazon Simple Storage
8722Service (S3) protocol, including S3 itself. It supports rsync-like backup,
8723GnuPG encryption, and more. It also supports management of Amazon's
8724CloudFront content delivery network.")
8725 (license license:gpl2+)))
8726
8727(define-public python-pkgconfig
8728 (package
8729 (name "python-pkgconfig")
8730 (version "1.3.1")
8731 (source
8732 (origin
8733 (method url-fetch)
8734 (uri (pypi-uri "pkgconfig" version))
8735 (sha256
8736 (base32
8737 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
8738 (build-system python-build-system)
8739 (native-inputs
8740 `(("python-nose" ,python-nose)))
8741 (inputs
8742 `(("pkg-config" ,pkg-config)))
8743 (arguments
8744 `(#:phases
8745 (modify-phases %standard-phases
8746 (add-before 'build 'patch
8747 ;; Hard-code the path to pkg-config.
8748 (lambda _
8749 (substitute* "pkgconfig/pkgconfig.py"
8750 (("cmd = 'pkg-config")
8751 (string-append "cmd = '" (which "pkg-config"))))
8752 #t))
8753 (replace 'check
8754 (lambda _
8755 (invoke "nosetests" "test.py"))))))
8756 (home-page "https://github.com/matze/pkgconfig")
8757 (synopsis "Python interface for pkg-config")
8758 (description "This module provides a Python interface to pkg-config. It
8759can be used to find all pkg-config packages, check if a package exists,
8760check if a package meets certain version requirements, query CFLAGS and
8761LDFLAGS and parse the output to build extensions with setup.py.")
8762 (license license:expat)))
8763
8764(define-public python2-pkgconfig
8765 (package-with-python2 python-pkgconfig))
8766
8767(define-public python-bz2file
8768 (package
8769 (name "python-bz2file")
8770 (version "0.98")
8771 (source
8772 (origin
8773 (method url-fetch)
8774 (uri (pypi-uri "bz2file" version))
8775 (sha256
8776 (base32
8777 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
8778 (build-system python-build-system)
8779 (arguments
8780 `(#:tests? #f)) ; Tests use deprecated python modules.
8781 (home-page "https://github.com/nvawda/bz2file")
8782 (synopsis "Read and write bzip2-compressed files")
8783 (description
8784 "Bz2file is a Python library for reading and writing bzip2-compressed
8785files. It contains a drop-in replacement for the I/O interface in the
8786standard library's @code{bz2} module, including features from the latest
8787development version of CPython that are not available in older releases.")
8788 (license license:asl2.0)))
8789
8790(define-public python2-bz2file
8791 (package-with-python2 python-bz2file))
8792
8793(define-public python-future
8794 (package
8795 (name "python-future")
8796 (version "0.16.0")
8797 (source
8798 (origin
8799 (method url-fetch)
8800 (uri (pypi-uri "future" version))
8801 (sha256
8802 (base32
8803 "1nzy1k4m9966sikp0qka7lirh8sqrsyainyf8rk97db7nwdfv773"))))
8804 (build-system python-build-system)
8805 ;; Many tests connect to the network or are otherwise flawed.
8806 ;; https://github.com/PythonCharmers/python-future/issues/210
8807 (arguments
8808 `(#:tests? #f))
8809 (home-page "http://python-future.org")
8810 (synopsis "Single-source support for Python 3 and 2")
8811 (description
8812 "@code{python-future} is the missing compatibility layer between Python 2 and
8813Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
8814to support both Python 2 and Python 3 with minimal overhead.")
8815 (license license:expat)))
8816
8817(define-public python2-future
8818 (package-with-python2 python-future))
8819
8820(define-public python-cysignals
8821 (package
8822 (name "python-cysignals")
8e3e51df 8823 (version "1.9.0")
44d10b1f
RW
8824 (source
8825 (origin
8826 (method url-fetch)
8e3e51df 8827 (uri (pypi-uri "cysignals" version))
44d10b1f
RW
8828 (sha256
8829 (base32
8e3e51df 8830 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
44d10b1f
RW
8831 (build-system python-build-system)
8832 (native-inputs
8833 `(("python-cython" ,python-cython)
8834 ("python-sphinx" ,python-sphinx)))
8835 (inputs
8836 `(("pari-gp" ,pari-gp)))
8837 (arguments
8838 `(#:modules ((guix build python-build-system)
8839 ((guix build gnu-build-system) #:prefix gnu:)
8840 (guix build utils))
8841 ;; FIXME: Tests are executed after installation and currently fail
8842 ;; when not installing into standard locations; the author is working
8843 ;; on a fix.
8844 #:tests? #f
8845 #:phases
8846 (modify-phases %standard-phases
8847 (add-before
8848 'build 'configure
8849 (assoc-ref gnu:%standard-phases 'configure)))))
8850 (home-page
8851 "https://github.com/sagemath/cysignals")
8852 (synopsis
8853 "Handling of interrupts and signals for Cython")
8854 (description
8855 "The cysignals package provides mechanisms to handle interrupts (and
8856other signals and errors) in Cython code, using two related approaches,
8857for mixed Cython/Python code or external C libraries and pure Cython code,
8858respectively.")
8859 (license license:lgpl3+)))
8860
8861(define-public python2-cysignals
8862 (package-with-python2 python-cysignals))
8863
8864(define-public python2-shedskin
8865 (package
8866 (name "python2-shedskin")
8867 (version "0.9.4")
8868 (source
8869 (origin
8870 (method url-fetch)
8871 (uri (string-append "https://github.com/shedskin/shedskin/"
8872 "releases/download/v" version
8873 "/shedskin-" version ".tgz"))
8874 (sha256
8875 (base32
8876 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
8877 (build-system python-build-system)
8878 (arguments
8879 `(#:python ,python-2
8880 #:phases (modify-phases %standard-phases
8881 (add-after 'unpack 'fix-resulting-include-libs
8882 (lambda* (#:key inputs #:allow-other-keys)
8883 (let ((libgc (assoc-ref inputs "libgc"))
8884 (pcre (assoc-ref inputs "pcre")))
8885 (substitute* "shedskin/makefile.py"
8886 (("variable == 'CCFLAGS':[ ]*")
8887 (string-append "variable == 'CCFLAGS':\n"
8888 " line += ' -I " pcre "/include"
8889 " -I " libgc "/include'"))
8890 (("variable == 'LFLAGS':[ ]*")
8891 (string-append "variable == 'LFLAGS':\n"
8892 " line += ' -L" pcre "/lib"
8893 " -L " libgc "/lib'")))
8894 #t))))))
8895 (inputs `(("pcre" ,pcre)
8896 ("libgc" ,libgc)))
8897 (home-page "https://shedskin.github.io/")
8898 (synopsis "Experimental Python-2 to C++ Compiler")
8899 (description (string-append "This is an experimental compiler for a subset of
8900Python. It generates C++ code and a Makefile."))
8901 (license (list license:gpl3 license:bsd-3 license:expat))))
8902
8903(define-public python2-rope
8904 (package
8905 (name "python2-rope")
a9ba0a31 8906 (version "0.11.0")
44d10b1f
RW
8907 (source
8908 (origin
8909 (method url-fetch)
8910 (uri (pypi-uri "rope" version))
8911 (sha256
8912 (base32
a9ba0a31 8913 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
44d10b1f 8914 (arguments
afb29715 8915 ;; Rope has only partial python3 support, see `python-rope'
44d10b1f
RW
8916 `(#:python ,python-2))
8917 (build-system python-build-system)
8918 (native-inputs
8919 `(("python2-unittest2" ,python2-unittest2)))
8920 (home-page "https://github.com/python-rope/rope")
8921 (synopsis "Refactoring library for Python")
8922 (description "Rope is a refactoring library for Python. It facilitates
8923the renaming, moving and extracting of attributes, functions, modules, fields
8924and parameters in Python 2 source code. These refactorings can also be applied
8925to occurrences in strings and comments.")
8926 (license license:gpl2)))
8927
2c880ef4
LC
8928(define-public python-rope
8929 (package
8930 (inherit python2-rope)
8931 (name "python-rope")
8932 (arguments `(#:python ,python-wrapper
8933 ;; XXX: Only partial python3 support, results in some failing
8934 ;; tests: <https://github.com/python-rope/rope/issues/247>.
8935 #:tests? #f))
8936 (properties `((python2-variant . ,(delay python2-rope))))))
8937
44d10b1f
RW
8938(define-public python-py3status
8939 (package
8940 (name "python-py3status")
8941 (version "3.7")
8942 (source
8943 (origin
8944 (method url-fetch)
8945 (uri (pypi-uri "py3status" version))
8946 (sha256
8947 (base32
8948 "0shxcfz4wcczj0mhwp4w0dvwd2fdd9bgprq8slim1519iiqzgwhq"))))
8949 (build-system python-build-system)
8950 (inputs
8951 `(("file" ,file)))
8952 (arguments
8953 '(#:phases
8954 (modify-phases %standard-phases
8955 ;; 'file' is used for detection of configuration file encoding
8956 ;; let's make link the dependency to particular input
8957 (add-before 'build 'patch-file-path
8958 (lambda* (#:key inputs #:allow-other-keys)
8959 (let ((file-path (assoc-ref inputs "file")))
8960 (substitute* "py3status/parse_config.py"
8961 (("\\['file', '-b'")
8962 (string-append "['" file-path "/bin/file', '-b'")))
8963 #t))))
8964 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
8965 (home-page "https://github.com/ultrabug/py3status")
8966 (synopsis "Extensible i3status wrapper written in Python")
8967 (description "py3status is an i3status wrapper which extends i3status
8968functionality in a modular way, allowing you to extend your panel with your
8969own code, responding to click events and updating clock every second.")
8970 (license license:bsd-3)))
8971
8972(define-public python-tblib
8973 (package
8974 (name "python-tblib")
8975 (version "1.3.2")
8976 (source (origin
8977 (method url-fetch)
8978 (uri (pypi-uri "tblib" version))
8979 (sha256 (base32
8980 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
8981 (build-system python-build-system)
8982 (arguments
8983 `(#:phases
8984 (modify-phases %standard-phases
8985 (add-before 'check 'adjust-tests
8986 (lambda _
8987 (when (which "python3")
8988 ;; Adjust the example output to match that of Python 3.7:
8989 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
8990 (substitute* "README.rst"
8991 (("Exception\\('fail',") "Exception('fail'"))
8992 #t)))
8993 (replace 'check
8994 (lambda _
8995 ;; Upstream runs tests after installation and the package itself
8996 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
8997 ;; found.
8998 (setenv "PYTHONPATH"
8999 (string-append (getcwd) "/build/lib:"
9000 (getenv "PYTHONPATH")))
9001 (invoke "py.test" "-vv" "tests" "README.rst"))))))
9002 (native-inputs
9003 `(("python-pytest" ,python-pytest)
9004 ("python-six" ,python-six)))
9005 (home-page "https://github.com/ionelmc/python-tblib")
9006 (synopsis "Traceback serialization library")
9007 (description
9008 "Traceback serialization allows you to:
9009
9010@enumerate
9011@item Pickle tracebacks and raise exceptions with pickled tracebacks in
9012different processes. This allows better error handling when running code over
9013multiple processes (imagine multiprocessing, billiard, futures, celery etc).
9014
9015@item Parse traceback strings and raise with the parsed tracebacks.
9016@end enumerate\n")
9017 (license license:bsd-3)))
9018
9019(define-public python2-tblib
9020 (package-with-python2 python-tblib))
9021
9022(define-public python-greenlet
9023 (package
9024 (name "python-greenlet")
9025 (version "0.4.15")
9026 (source (origin
9027 (method url-fetch)
9028 (uri (pypi-uri "greenlet" version))
9029 (sha256
9030 (base32
9031 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
9032 (build-system python-build-system)
9033 (home-page "https://greenlet.readthedocs.io/")
9034 (synopsis "Lightweight in-process concurrent programming")
9035 (description
9036 "Greenlet package is a spin-off of Stackless, a version of CPython
9037that supports micro-threads called \"tasklets\". Tasklets run
9038pseudo-concurrently (typically in a single or a few OS-level threads) and
9039are synchronized with data exchanges on \"channels\".")
9040 (license (list license:psfl license:expat))))
9041
9042(define-public python2-greenlet
9043 (package-with-python2 python-greenlet))
9044
9045(define-public python-objgraph
9046 (package
9047 (name "python-objgraph")
9048 (version "3.4.0")
9049 (source
9050 (origin
9051 (method url-fetch)
9052 (uri (pypi-uri "objgraph" version))
9053 (sha256
9054 (base32
9055 "184m09am5gpbqfaiy7l0hwh476mczbrly1dffs0rw2p1d1i2q32a"))))
9056 (build-system python-build-system)
9057 (propagated-inputs
9058 `(("python-graphviz" ,python-graphviz)))
9059 (native-inputs
9060 `(("python-mock" ,python-mock)
9061 ("graphviz" ,graphviz)))
9062 (home-page "https://mg.pov.lt/objgraph/")
9063 (synopsis "Draw Python object reference graphs with graphviz")
9064 (description
9065 "This package provides tools to draw Python object reference graphs with
9066graphviz.")
9067 (license license:expat)))
9068
9069(define-public python-gevent
9070 (package
9071 (name "python-gevent")
9072 (version "1.3.7")
9073 (source (origin
9074 (method url-fetch)
9075 (uri (pypi-uri "gevent" version))
9076 (sha256
9077 (base32
9078 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
9079 (modules '((guix build utils)))
9080 (snippet
9081 '(begin
9082 ;; unbunding libev and c-ares
9083 (delete-file-recursively "deps")
9084 #t))))
9085 (build-system python-build-system)
9086 (arguments
9087 `(#:modules ((ice-9 ftw)
9088 (ice-9 match)
9089 (srfi srfi-26)
9090 (guix build utils)
9091 (guix build python-build-system))
9092 #:phases (modify-phases %standard-phases
9093 (add-after 'unpack 'unpack-libev
9094 (lambda* (#:key inputs #:allow-other-keys)
9095 (mkdir-p "deps/libev")
9096 ;; FIXME: gevent requires building libev, even though
9097 ;; it only links against the proper one.
9098 (invoke "tar" "-xf" (assoc-ref inputs "libev-source")
9099 "--strip-components=1" "-C" "deps/libev")))
9100 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
9101 (lambda _
9102 (substitute* "src/gevent/subprocess.py"
9103 (("/bin/sh") (which "sh")))
9104 (for-each (lambda (file)
9105 (substitute* file
9106 (("/bin/sh") (which "sh"))
9107 (("/bin/true") (which "true"))))
9108 (find-files "src/greentest" "\\.py$"))
9109 #t))
9110 (add-before 'build 'do-not-use-bundled-sources
9111 (lambda* (#:key inputs #:allow-other-keys)
9112 (setenv "CONFIG_SHELL" (which "bash"))
9113 (setenv "LIBEV_EMBED" "false")
9114 (setenv "CARES_EMBED" "false")
9115 (setenv "EMBED" "false")
9116
9117 (let ((greenlet (string-append
9118 (assoc-ref inputs "python-greenlet")
9119 "/include")))
9120 (match (scandir greenlet
9121 (lambda (item)
9122 (string-prefix? "python" item)))
9123 ((python)
9124 (setenv "CPATH"
9125 (string-append greenlet "/" python)))))
9126 #t))
9127 (add-before 'check 'skip-timer-test
9128 (lambda _
9129 ;; XXX: Skip 'TestTimerResolution', which appears to be
9130 ;; unreliable.
9131 (substitute* "src/greentest/test__core_timer.py"
9132 (("not greentest.RUNNING_ON_CI") "False"))
9133 #t))
9134 (replace 'check
9135 (lambda _
9136 ;; Make sure the build directory is on PYTHONPATH.
9137 (setenv "PYTHONPATH"
9138 (string-append
9139 (getenv "PYTHONPATH") ":"
9140 (getcwd) "/build/"
9141 (car (scandir "build" (cut string-prefix? "lib." <>)))))
9142 (with-directory-excursion "src/greentest"
9143 ;; XXX: Many tests require network access. Instead we only
9144 ;; run known-good tests. Unfortunately we cannot use
9145 ;; recursion here since this directory also contains
9146 ;; Python-version-specific subfolders.
9147 (apply invoke "python" "testrunner.py" "--config"
9148 "known_failures.py"
9149 (scandir "." (cut regexp-exec
9150 (make-regexp "test_+(subprocess|core)")
9151 <>)))))))))
9152 (propagated-inputs
9153 `(("python-greenlet" ,python-greenlet)
9154 ("python-objgraph" ,python-objgraph)))
9155 (native-inputs
9156 `(("libev-source" ,(package-source libev))
9157 ("python-six" ,python-six)))
9158 (inputs
9159 `(("c-ares" ,c-ares)
9160 ("libev" ,libev)))
9161 (home-page "http://www.gevent.org/")
9162 (synopsis "Coroutine-based network library")
9163 (description
9164 "gevent is a coroutine-based Python networking library that uses greenlet
9165to provide a high-level synchronous API on top of the libev event loop.")
9166 (license license:expat)
9167 (properties `((python2-variant . ,(delay python2-gevent))))))
9168
9169(define-public python2-gevent
9170 (let ((base (package-with-python2
9171 (strip-python2-variant python-gevent))))
9172 (package
9173 (inherit base)
9174 (native-inputs `(,@(package-native-inputs python-gevent)
9175 ("python-mock" ,python2-mock))))))
9176
9177(define-public python-fastimport
9178 (package
9179 (name "python-fastimport")
9180 (version "0.9.6")
9181 (source
9182 (origin
9183 (method url-fetch)
9184 (uri (pypi-uri "fastimport" version))
9185 (sha256
9186 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
9187 (build-system python-build-system)
9188 (home-page "https://github.com/jelmer/python-fastimport")
9189 (synopsis "VCS fastimport parser and generator in Python")
9190 (description "This package provides a parser for and generator of the Git
9191@url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
9192format.")
9193 (license license:gpl2+)))
9194
9195(define-public python2-fastimport
9196 (package-with-python2 python-fastimport))
9197
9198(define-public python-twisted
9199 (package
9200 (name "python-twisted")
e5ba2fe3 9201 (version "17.5.0")
44d10b1f
RW
9202 (source (origin
9203 (method url-fetch)
9204 (uri (pypi-uri "Twisted" version ".tar.bz2"))
9205 (sha256
9206 (base32
e5ba2fe3 9207 "1sh2h23nnizcdyrl2rn7zxijglikxwz7z7grqpvq496zy2aa967i"))))
44d10b1f
RW
9208 (build-system python-build-system)
9209 (arguments
9210 '(#:tests? #f)) ; FIXME: Some tests are failing.
9211 ;; #:phases
9212 ;; (modify-phases %standard-phases
9213 ;; (replace 'check
9214 ;; (lambda _
9215 ;; (zero? (system* "./bin/trial" "twisted")))))
9216 (propagated-inputs
9217 `(("python-zope-interface" ,python-zope-interface)
9218 ("python-incremental" ,python-incremental)
e5ba2fe3 9219 ("python-hyperlink" ,python-hyperlink)
44d10b1f
RW
9220 ("python-constantly" ,python-constantly)
9221 ("python-automat" ,python-automat)))
9222 (home-page "https://twistedmatrix.com/")
9223 (synopsis "Asynchronous networking framework written in Python")
9224 (description
9225 "Twisted is an extensible framework for Python programming, with special
9226focus on event-based network programming and multiprotocol integration.")
9227 (license license:expat)))
9228
9229(define-public python2-twisted
9230 (package-with-python2 python-twisted))
9231
9232(define-public python-pika
9233 (package
9234 (name "python-pika")
9235 (version "0.12.0")
9236 (source
9237 (origin
9238 (method url-fetch)
9239 (uri (pypi-uri "pika" version))
9240 (sha256
9241 (base32
9242 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
9243 (build-system python-build-system)
9244 (native-inputs
9245 `(("python-pyev" ,python-pyev)
9246 ("python-tornado" ,python-tornado)
9247 ("python-twisted" ,python-twisted)))
9248 (home-page "https://pika.readthedocs.org")
9249 (synopsis "Pure Python AMQP Client Library")
9250 (description
9251 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
9252Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
9253network support library.")
9254 (license license:bsd-3)))
9255
9256(define-public python2-pika
9257 (package-with-python2 python-pika))
9258
9259(define-public python-ply
9260 (package
9261 (name "python-ply")
9262 (version "3.10")
9263 (source
9264 (origin
9265 (method url-fetch)
9266 (uri (pypi-uri "ply" version))
9267 (sha256
9268 (base32
9269 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
9270 (build-system python-build-system)
9271 (home-page "http://www.dabeaz.com/ply/")
9272 (synopsis "Python Lex & Yacc")
9273 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
9274It uses LR parsing and does extensive error checking.")
9275 (license license:bsd-3)))
9276
9277(define-public python2-ply
9278 (package-with-python2 python-ply))
9279
9280(define-public python-tabulate
9281 (package
9282 (name "python-tabulate")
9283 (version "0.7.7")
9284 (source (origin
9285 (method url-fetch)
9286 (uri (pypi-uri "tabulate" version))
9287 (sha256
9288 (base32
9289 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
9290 (build-system python-build-system)
9291 (arguments
9292 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
9293 ;; and the latest release is not tagged in the upstream repository.
9294 '(#:tests? #f))
9295 (home-page "https://bitbucket.org/astanin/python-tabulate")
9296 (synopsis "Pretty-print tabular data")
9297 (description
9298 "Tabulate is a library and command-line utility to pretty-print tabular
9299data in Python.")
9300 (license license:expat)))
9301
9302(define-public python2-tabulate
9303 (package-with-python2 python-tabulate))
9304
9305(define-public python-kazoo
9306 (package
9307 (name "python-kazoo")
9308 (version "2.4.0")
9309 (source
9310 (origin
9311 (method url-fetch)
9312 (uri (pypi-uri "kazoo" version))
9313 (sha256
9314 (base32
9315 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
9316 (build-system python-build-system)
9317 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
9318 (propagated-inputs
9319 `(("python-six" ,python-six)))
9320 (home-page "https://kazoo.readthedocs.org")
9321 (synopsis "High-level Zookeeper client library")
9322 (description
9323 "Kazoo is a Python client library for the Apache Zookeeper distributed
9324application service. It is designed to be easy to use and to avoid common
9325programming errors.")
9326 (license license:asl2.0)))
9327
9328(define-public python2-kazoo
9329 (package-with-python2 python-kazoo))
9330
9331(define-public python-pykafka
9332 (package
9333 (name "python-pykafka")
9334 (version "2.4.0")
9335 (source (origin
9336 (method url-fetch)
0ca1d040 9337 (uri (pypi-uri "pykafka" version))
44d10b1f
RW
9338 (sha256
9339 (base32
9340 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
9341 (build-system python-build-system)
9342 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
9343 (propagated-inputs
9344 `(("python-gevent" ,python-gevent)
9345 ("python-kazoo" ,python-kazoo)
9346 ("python-tabulate" ,python-tabulate)))
9347 (inputs
9348 `(("librdkafka" ,librdkafka)))
9349 (home-page "https://pykafka.readthedocs.io/")
9350 (synopsis "Apache Kafka client for Python")
9351 (description
9352 "PyKafka is a client for the Apache Kafka distributed messaging system.
9353It includes Python implementations of Kafka producers and consumers, which
9354are optionally backed by a C extension built on librdkafka.")
9355 (license license:asl2.0)))
9356
9357(define-public python2-pykafka
9358 (package-with-python2 python-pykafka))
9359
9360(define-public python-wcwidth
9361 (package
9362 (name "python-wcwidth")
9363 (version "0.1.7")
9364 (source
9365 (origin
9366 (method url-fetch)
9367 (uri (pypi-uri "wcwidth" version))
9368 (sha256
9369 (base32
9370 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
9371 (build-system python-build-system)
9372 (home-page "https://github.com/jquast/wcwidth")
9373 (synopsis "Measure number of terminal column cells of wide-character codes")
9374 (description "Wcwidth measures the number of terminal column cells of
9375wide-character codes. It is useful for those implementing a terminal emulator,
9376or programs that carefully produce output to be interpreted by one. It is a
9377Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
9378specified in POSIX.1-2001 and POSIX.1-2008.")
9379 (license license:expat)))
9380
9381(define-public python2-wcwidth
9382 (package-with-python2 python-wcwidth))
9383
9384(define-public python2-jsonrpclib
9385 (package
9386 (name "python2-jsonrpclib")
9387 (version "0.1.7")
9388 (source (origin
9389 (method url-fetch)
6571bba0 9390 (uri (pypi-uri "jsonrpclib" version))
44d10b1f
RW
9391 (sha256
9392 (base32
9393 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
9394 (build-system python-build-system)
9395 (arguments
9396 `(#:tests? #f
9397 #:python ,python-2))
9398 (home-page "https://github.com/joshmarshall/jsonrpclib/")
9399 (synopsis "Implementation of JSON-RPC specification for Python")
9400 (description
9401 "This library is an implementation of the JSON-RPC specification.
9402It supports both the original 1.0 specification, as well as the
9403new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
9404etc.")
9405 (license license:asl2.0)))
9406
9407(define-public python-chai
9408 (package
9409 (name "python-chai")
9410 (version "1.1.2")
9411 (source (origin
9412 (method url-fetch)
9413 (uri (pypi-uri "chai" version))
9414 (sha256
9415 (base32
9416 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
9417 (build-system python-build-system)
9418 (home-page "https://github.com/agoragames/chai")
9419 (synopsis "Mocking framework for Python")
9420 (description
9421 "Chai provides an api for mocking, stubbing and spying your python
9422objects, patterned after the Mocha library for Ruby.")
9423 (license license:bsd-3)))
9424
9425(define-public python2-chai
9426 (package-with-python2 python-chai))
9427
9428(define-public python-inflection
9429 (package
9430 (name "python-inflection")
9431 (version "0.3.1")
9432 (source
9433 (origin (method url-fetch)
9434 (uri (pypi-uri "inflection" version))
9435 (sha256
9436 (base32
9437 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
9438 (build-system python-build-system)
9439 (native-inputs
9440 `(("python-pytest" ,python-pytest)))
9441 (home-page "https://github.com/jpvanhal/inflection")
9442 (synopsis "Python string transformation library")
9443 (description
9444 "Inflection is a string transformation library. It singularizes
9445and pluralizes English words, and transforms strings from CamelCase to
9446underscored string.")
9447 (license license:expat)))
9448
9449(define-public python2-inflection
9450 (package-with-python2 python-inflection))
9451
9452(define-public python-pylev
9453 (package
9454 (name "python-pylev")
9455 (version "1.3.0")
9456 (source (origin
9457 (method url-fetch)
9458 (uri (pypi-uri "pylev" version))
9459 (sha256
9460 (base32
9461 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
9462 (build-system python-build-system)
9463 (home-page "https://github.com/toastdriven/pylev")
9464 (synopsis "Levenshtein distance implementation in Python")
9465 (description "Pure Python Levenshtein implementation, based off the
9466Wikipedia code samples at
9467@url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
9468 (license license:bsd-3)))
9469
9470(define-public python2-pylev
9471 (package-with-python2 python-pylev))
9472
9473(define-public python-cleo
9474 (package
9475 (name "python-cleo")
9476 (version "0.6.1")
9477 (source (origin
9478 (method url-fetch)
9479 (uri (pypi-uri "cleo" version))
9480 (sha256
9481 (base32
9482 "0q1cf0szr0d54am4pypzwdnm74zpladdsinad94c2fz5i06fdpf7"))))
9483 (build-system python-build-system)
9484 (native-inputs
9485 `(;; For testing
9486 ("python-mock" ,python-mock)
9487 ("python-pytest-mock" ,python-pytest-mock)
9488 ("python-pytest" ,python-pytest)))
9489 (propagated-inputs
9490 `(("python-backpack" ,python-backpack)
9491 ("python-pastel" ,python-pastel)
9492 ("python-pylev" ,python-pylev)))
9493 (home-page "https://github.com/sdispater/cleo")
9494 (synopsis "Command-line arguments library for Python")
9495 (description
9496 "Cleo allows you to create command-line commands with signature in
9497docstring and colored output.")
9498 (license license:expat)))
9499
9500(define-public python2-cleo
9501 (package-with-python2 python-cleo))
9502
9503(define-public python-lazy-object-proxy
9504 (package
9505 (name "python-lazy-object-proxy")
9506 (version "1.3.1")
9507 (source (origin
9508 (method url-fetch)
9509 (uri (pypi-uri "lazy-object-proxy" version))
9510 (sha256
9511 (base32
9512 "0yha7q9bhw857fwaby785d63mffhngl9npwzlk9i0pwlkwvbx4gb"))))
9513 (build-system python-build-system)
9514 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
9515 (synopsis "Lazy object proxy for python")
9516 (description
9517 "Lazy object proxy is an object that wraps a callable but defers the call
9518until the object is actually required, and caches the result of said call.")
9519 (license license:bsd-2)))
9520
9521(define-public python2-lazy-object-proxy
9522 (package-with-python2 python-lazy-object-proxy))
9523
9524(define-public python-dnspython
9525 (package
9526 (name "python-dnspython")
9527 (version "1.15.0")
9528 (source (origin
9529 (method url-fetch)
9530 (uri (string-append "http://www.dnspython.org/kits/"
9531 version "/dnspython-" version ".tar.gz"))
9532 (sha256
9533 (base32
9534 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
9535 (build-system python-build-system)
9536 (arguments '(#:tests? #f)) ; XXX: requires internet access
9537 (home-page "http://www.dnspython.org")
9538 (synopsis "DNS toolkit for Python")
9539 (description
9540 "dnspython is a DNS toolkit for Python. It supports almost all record
9541types. It can be used for queries, zone transfers, and dynamic updates.
9542It supports TSIG authenticated messages and EDNS0.")
9543 (license license:expat)))
9544
9545(define-public python2-dnspython
9546 (package-with-python2 python-dnspython))
9547
9548(define-public python-email-validator
9549 (package
9550 (name "python-email-validator")
9551 (version "1.0.2")
9552 (source
9553 (origin (method url-fetch)
9554 (uri (pypi-uri "email_validator" version))
9555 (sha256
9556 (base32
9557 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
9558 (build-system python-build-system)
9559 (arguments
9560 '(#:phases
9561 (modify-phases %standard-phases
9562 (add-before 'build 'use-dnspython
9563 (lambda _
9564 (substitute* "setup.py"
9565 (("dnspython3") "dnspython"))
9566 #t)))))
9567 (propagated-inputs
9568 `(("python-dnspython" ,python-dnspython)
9569 ("python-idna" ,python-idna)))
9570 (home-page "https://github.com/JoshData/python-email-validator")
9571 (synopsis "Email address validation library for Python")
9572 (description
9573 "This library validates email address syntax and deliverability.")
9574 (license license:cc0)))
9575
9576(define-public python2-email-validator
9577 (package-with-python2 python-email-validator))
9578
9579(define-public python-ukpostcodeparser
9580 (package
9581 (name "python-ukpostcodeparser")
9582 (version "1.0.3")
9583 (source (origin
9584 (method url-fetch)
9585 (uri (pypi-uri "UkPostcodeParser" version))
9586 (sha256
9587 (base32
9588 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
9589 (build-system python-build-system)
9590 (home-page "https://github.com/hamstah/ukpostcodeparser")
9591 (synopsis "UK Postcode parser for Python")
9592 (description
9593 "This library provides the @code{parse_uk_postcode} function for
9594parsing UK postcodes.")
9595 (license license:expat)))
9596
9597(define-public python2-ukpostcodeparser
9598 (package-with-python2 python-ukpostcodeparser))
9599
9600(define-public python-faker
9601 (package
9602 (name "python-faker")
9603 (version "0.7.9")
9604 (source (origin
9605 (method url-fetch)
9606 (uri (pypi-uri "Faker" version))
9607 (sha256
9608 (base32
9609 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
9610 (patches
9611 (search-patches "python-faker-fix-build-32bit.patch"))
9612 (modules '((guix build utils)))
9613 (snippet
9614 '(begin
9615 (for-each delete-file (find-files "." "\\.pyc$"))
9616 #t))))
9617 (build-system python-build-system)
9618 (arguments
9619 '(#:phases
9620 (modify-phases %standard-phases
9621 (replace 'check
49ff8827 9622 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
44d10b1f
RW
9623 (native-inputs
9624 `(;; For testing
9625 ("python-email-validator" ,python-email-validator)
9626 ("python-mock" ,python-mock)
9627 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
9628 (propagated-inputs
9629 `(("python-dateutil" ,python-dateutil)
9630 ("python-six" ,python-six)))
9631 (home-page "https://github.com/joke2k/faker")
9632 (synopsis "Python package that generates fake data")
9633 (description
9634 "Faker is a Python package that generates fake data such as names,
9635addresses, and phone numbers.")
9636 (license license:expat)
9637 (properties `((python2-variant . ,(delay python2-faker))))))
9638
9639(define-public python2-faker
9640 (let ((base (package-with-python2 (strip-python2-variant
9641 python-faker))))
9642 (package
9643 (inherit base)
9644 (propagated-inputs
9645 `(("python2-ipaddress" ,python2-ipaddress)
9646 ,@(package-propagated-inputs base))))))
9647
9648(define-public python-pyaml
9649 (package
9650 (name "python-pyaml")
9651 (version "18.11.0")
9652 (source (origin
9653 (method url-fetch)
9654 (uri (pypi-uri "pyaml" version))
9655 (sha256
9656 (base32
9657 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
9658 (build-system python-build-system)
9659 (native-inputs
9660 `(("python-unidecode" ,python-unidecode)))
9661 (propagated-inputs
9662 `(("python-pyyaml" ,python-pyyaml)))
9663 (home-page "https://github.com/mk-fg/pretty-yaml")
9664 (synopsis "YAML pretty-print library for Python")
9665 (description
9666 "pyaml is a PyYAML based python module to produce pretty and readable
9667YAML-serialized data.")
9668 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
9669
9670(define-public python2-pyaml
9671 (package-with-python2 python-pyaml))
9672
9673(define-public python-backpack
9674 (package
9675 (name "python-backpack")
9676 (version "0.1")
9677 (source
9678 (origin
9679 (method url-fetch)
9680 (uri (pypi-uri "backpack" version))
9681 (sha256
9682 (base32
9683 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
9684 (build-system python-build-system)
9685 (native-inputs
9686 `(("python-pytest" ,python-pytest)
9687 ("python-nose" ,python-nose)))
9688 (propagated-inputs
9689 `(("python-simplejson" ,python-simplejson)))
9690 (home-page "https://github.com/sdispater/backpack")
9691 (synopsis "Utilities for working with Python collections")
9692 (description "Backpack provides some useful utilities for working with
9693collections of data.")
9694 (license license:expat)))
9695
9696(define-public python2-backpack
9697 (package-with-python2 python-backpack))
9698
9699(define-public python-prompt-toolkit
9700 (package
9701 (name "python-prompt-toolkit")
9702 (version "2.0.7")
9703 (source
9704 (origin
9705 (method url-fetch)
9706 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
9707 (sha256
9708 (base32
9709 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
9710 (build-system python-build-system)
9711 (arguments
9712 `(#:phases
9713 (modify-phases %standard-phases
9714 (delete 'check)
9715 (add-after 'install 'post-install-check
9716 (lambda* (#:key inputs outputs #:allow-other-keys)
9717 ;; HOME is needed for the test
9718 ;; "test_pathcompleter_can_expanduser".
9719 (setenv "HOME" "/tmp")
9720 (add-installed-pythonpath inputs outputs)
9721 (invoke "py.test"))))))
9722 (propagated-inputs
9723 `(("python-wcwidth" ,python-wcwidth)
9724 ("python-six" ,python-six)
9725 ("python-pygments" ,python-pygments)))
9726 (native-inputs
9727 `(("python-pytest" ,python-pytest)))
9728 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
9729 (synopsis "Library for building command line interfaces in Python")
9730 (description
9731 "Prompt-Toolkit is a library for building interactive command line
9732interfaces in Python. It's like GNU Readline but it also features syntax
9733highlighting while typing, out-of-the-box multi-line input editing, advanced
9734code completion, incremental search, support for Chinese double-width
9735characters, mouse support, and auto suggestions.")
9736 (license license:bsd-3)))
9737
9738(define-public python2-prompt-toolkit
9739 (package-with-python2 python-prompt-toolkit))
9740
9741(define-public python-prompt-toolkit-1
9742 (package (inherit python-prompt-toolkit)
9743 (version "1.0.15")
9744 (source
9745 (origin
9746 (method url-fetch)
9747 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
9748 (sha256
9749 (base32
9750 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
9751
9752(define-public python2-prompt-toolkit-1
9753 (package-with-python2 python-prompt-toolkit-1))
9754
9755(define-public python-jedi
9756 (package
9757 (name "python-jedi")
40bd0aa3 9758 (version "0.13.2")
44d10b1f
RW
9759 (source
9760 (origin
9761 (method url-fetch)
9762 (uri (pypi-uri "jedi" version))
9763 (sha256
9764 (base32
40bd0aa3 9765 "1za944msp0f8x36qa8l309jhv0kzlsdh7r9nj3z12y8npnsh45sp"))))
44d10b1f
RW
9766 (build-system python-build-system)
9767 (arguments
40bd0aa3 9768 `( ;; Many tests are failing with Python 3.7.x as of version 0.13.2 (see:
44d10b1f
RW
9769 ;; https://github.com/davidhalter/jedi/issues/1263)
9770 #:tests? #f
9771 #:phases
9772 (modify-phases %standard-phases
9773 (replace 'check
9774 (lambda* (#:key tests? #:allow-other-keys)
9775 (when tests?
9776 (invoke "py.test" "-vv")))))))
9777 (native-inputs
9778 `(("python-pytest" ,python-pytest)
9779 ("python-docopt" ,python-docopt)))
9780 (propagated-inputs
9781 `(("python-parso" ,python-parso)))
9782 (home-page "https://github.com/davidhalter/jedi")
9783 (synopsis "Autocompletion and static analysis library for Python")
9784 (description
9785 "Jedi is a static analysis tool for Python that can be used in Integrated
9786Development Environments (@dfn{IDE}s) and text editors. It understands Python
9787on a deeper level than many other static analysis frameworks for Python.
9788
9789Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
9790well.")
9791 (license license:expat)))
9792
9793(define-public python2-jedi
9794 (package-with-python2 python-jedi))
9795
9796(define-public ptpython
9797 (package
9798 (name "ptpython")
9799 (version "0.34")
9800 (source (origin
9801 (method url-fetch)
9802 (uri (pypi-uri "ptpython" version))
9803 (sha256
9804 (base32
9805 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
9806 (build-system python-build-system)
9807 (arguments
9808 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
9809 (propagated-inputs
9810 `(("python-docopt" ,python-docopt)
9811 ("python-jedi" ,python-jedi)
9812 ("python-prompt-toolkit" ,python-prompt-toolkit)
9813 ("python-pygments" ,python-pygments)))
9814 (home-page "https://github.com/jonathanslenders/ptpython")
9815 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
9816 (description
9817 "ptpython is a Python read-eval-print loop with IDE-like features.
9818It supports syntax highlighting, multiline editing, autocompletion, mouse,
9819color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
9820etc.")
9821 (license license:bsd-3)
9822 (properties `((python2-variant . ,(delay ptpython-2))))))
9823
9824(define-public ptpython-2
9825 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
9826 (package
9827 (inherit base)
9828 (name "ptpython2"))))
9829
9830(define-public python-stem
9831 (package
9832 (name "python-stem")
9833 (version "1.7.0")
9834 (source
9835 (origin
9836 (method url-fetch)
9837 (uri (pypi-uri "stem" version))
9838 (sha256
9839 (base32
9840 "1awiglfiajnx2hva9aqpj3fmdvdb4qg7cwnlfyih827m68y3cq8v"))))
9841 (build-system python-build-system)
9842 (arguments
9843 `(#:phases
9844 (modify-phases %standard-phases
9845 (replace 'check
9846 (lambda _
9847 (invoke "./run_tests.py" "--unit")
9848 #t)))))
9849 (native-inputs
9850 `(("python-mock" ,python-mock)
9851 ("python-pycodestyle" ,python-pycodestyle)
9852 ("python-pyflakes" ,python-pyflakes)))
9853 (home-page "https://stem.torproject.org/")
9854 (synopsis
9855 "Python controller library that allows applications to interact with Tor")
9856 (description
9857 "Stem is a Python controller library for Tor. With it you can use Tor's
9858control protocol to script against the Tor process and read descriptor data
9859relays publish about themselves.")
9860 (license license:lgpl3)))
9861
9862(define-public python2-stem
9863 (package-with-python2 python-stem))
9864
9865(define-public python-pyserial
9866 (package
9867 (name "python-pyserial")
9868 (version "3.1.1")
9869 (source
9870 (origin
9871 (method url-fetch)
9872 (uri (pypi-uri "pyserial" version))
9873 (sha256
9874 (base32
9875 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
9876 (build-system python-build-system)
9877 (arguments
9878 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
9879 ;; #:phases
9880 ;; (modify-phases %standard-phases
9881 ;; (replace 'check
9882 ;; (lambda _
9883 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
9884 (home-page
9885 "https://github.com/pyserial/pyserial")
9886 (synopsis "Python Serial Port Bindings")
9887 (description "@code{pyserial} provide serial port bindings for Python. It
9888supports different byte sizes, stop bits, parity and flow control with RTS/CTS
9889and/or Xon/Xoff. The port is accessed in RAW mode.")
9890 (license license:bsd-3)))
9891
9892(define-public python2-pyserial
9893 (package-with-python2 python-pyserial))
9894
9895(define-public python-kivy
9896 (package
9897 (name "python-kivy")
9898 (version "1.10.1")
9899 (source
9900 (origin
9901 (method url-fetch)
9902 (uri (pypi-uri "Kivy" version))
9903 (file-name (string-append name "-" version ".tar.gz"))
9904 (sha256
9905 (base32
9906 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
9907 (build-system python-build-system)
9908 (arguments
9909 `(#:tests? #f ; Tests require many optional packages
9910 #:phases
9911 (modify-phases %standard-phases
9912 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
9913 (lambda* (#:key inputs #:allow-other-keys)
9914 (setenv "KIVY_SDL2_PATH"
9915 (string-append (assoc-ref inputs "sdl-union")
9916 "/include/SDL2"))
9917 #t)))))
9918 (native-inputs
9919 `(("git" ,git)
9920 ("pkg-config" ,pkg-config)
9921 ("python-cython" ,python-cython)))
9922 (inputs
9923 `(("gstreamer" ,gstreamer)
9924 ("mesa" ,mesa)
9925 ("sdl-union"
9926 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
9927 (home-page "http://kivy.org")
9928 (synopsis
9929 "Multitouch application framework")
9930 (description
9931 "A software library for rapid development of
9932hardware-accelerated multitouch applications.")
9933 (license license:expat)))
9934
9935(define-public python2-kivy
9936 (package-with-python2 python-kivy))
9937
9938(define-public python-kivy-next
9939 (deprecated-package "python-kivy-next" python-kivy))
9940
9941(define-public python2-kivy-next
9942 (deprecated-package "python2-kivy-next" python2-kivy))
9943
9944(define-public python-binaryornot
9945 (package
9946 (name "python-binaryornot")
9947 (version "0.4.4")
9948 (source (origin
9949 (method url-fetch)
9950 (uri (pypi-uri "binaryornot" version))
9951 (sha256
9952 (base32
9953 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
9954 (build-system python-build-system)
9955 (propagated-inputs
9956 `(("python-chardet" ,python-chardet)
9957 ("python-hypothesis" ,python-hypothesis)))
9958 (home-page "https://github.com/audreyr/binaryornot")
9959 (synopsis "Package to check if a file is binary or text")
9960 (description "Ultra-lightweight pure Python package to check if a file is
9961binary or text.")
9962 (license license:bsd-3)
9963 (properties `((python2-variant . ,(delay python2-binaryornot))))))
9964
9965(define-public python2-binaryornot
9966 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
9967 (package (inherit base)
9968 (propagated-inputs
9969 `(("python2-enum34" ,python2-enum34)
9970 ,@(package-propagated-inputs base))))))
9971
9972(define-public python-nltk
9973 (package
9974 (name "python-nltk")
9975 (version "3.2.1")
9976 (source (origin
9977 (method url-fetch)
9978 (uri (pypi-uri "nltk" version))
9979 (sha256
9980 (base32
9981 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
9982 (build-system python-build-system)
9983 (arguments
9984 '(;; The tests require some extra resources to be downloaded.
9985 ;; TODO Try packaging these resources.
9986 #:tests? #f))
9987 (home-page "http://nltk.org/")
9988 (synopsis "Natural Language Toolkit")
9989 (description "It provides interfaces to over 50 corpora and lexical
9990resources such as WordNet, along with a suite of text processing libraries
9991for classification, tokenization, stemming, tagging, parsing, and semantic
9992reasoning, wrappers for natural language processing libraries.")
9993 (license license:asl2.0)))
9994
9995(define-public python2-nltk
9996 (package-with-python2 python-nltk))
9997
9998(define-public python-pymongo
9999 (package
10000 (name "python-pymongo")
10001 (version "3.7.2")
10002 (source (origin
10003 (method url-fetch)
10004 (uri (pypi-uri "pymongo" version))
10005 (sha256
10006 (base32
10007 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
10008 (build-system python-build-system)
10009 (propagated-inputs
10010 `(("python-certifi" ,python-certifi)))
10011 (home-page "https://github.com/mongodb/mongo-python-driver")
10012 (synopsis "Python driver for MongoDB")
10013 (description "Python driver for MongoDB.")
10014 (license license:asl2.0)))
10015
10016(define-public python2-pymongo
10017 (package-with-python2 python-pymongo))
10018
44d10b1f
RW
10019(define-public python-consul
10020 (package
10021 (name "python-consul")
10022 (version "0.6.1")
10023 (source
10024 (origin
10025 (method url-fetch)
10026 (uri (pypi-uri "python-consul" version))
10027 (sha256
10028 (base32
10029 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
10030 (build-system python-build-system)
10031 (arguments
10032 '(#:tests? #f)) ; The tests are not distributed
10033 (propagated-inputs
10034 `(("python-requests" ,python-requests)
10035 ("python-six" ,python-six)))
10036 (home-page "https://github.com/cablehead/python-consul")
10037 (synopsis "Python client for Consul")
10038 (description
10039 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
10040discovery, monitoring and configuration.")
10041 (license license:expat)))
10042
10043(define-public python2-consul
10044 (package-with-python2 python-consul))
10045
10046(define-public python-schematics
10047 (package
10048 (name "python-schematics")
10049 (version "1.1.1")
10050 (source
10051 (origin
10052 (method url-fetch)
10053 (uri (string-append
10054 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
10055 (file-name (string-append name "-" version ".tar.gz"))
10056 (sha256
10057 (base32
10058 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
10059 (build-system python-build-system)
10060 (propagated-inputs
10061 `(("python-six" ,python-six)))
10062 (arguments
10063 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
10064 ; version requirements (eg python-coveralls)
10065 (home-page "https://github.com/schematics/schematics")
10066 (synopsis "Python Data Structures for Humans")
10067 (description "Python Data Structures for Humans.")
10068 (license license:bsd-3)))
10069
10070(define-public python2-schematics
10071 (package-with-python2 python-schematics))
10072
10073(define-public python-odfpy
10074 (package
10075 (name "python-odfpy")
10076 (version "1.3.3")
10077 (source (origin
10078 (method url-fetch)
10079 (uri (pypi-uri "odfpy" version))
10080 (sha256
10081 (base32
10082 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
10083 (arguments
10084 `(#:modules ((srfi srfi-1)
10085 (guix build python-build-system)
10086 (guix build utils))
10087 #:phases
10088 (modify-phases %standard-phases
10089 (replace 'check
10090 ;; The test runner invokes python2 and python3 for test*.py.
10091 ;; To avoid having both in inputs, we replicate it here.
10092 (lambda _
21ccc01d
RW
10093 (for-each (lambda (test-file) (invoke "python" test-file))
10094 (find-files "tests" "^test.*\\.py$"))
10095 #t)))))
44d10b1f
RW
10096 (build-system python-build-system)
10097 (home-page "https://github.com/eea/odfpy")
10098 (synopsis "Python API and tools to manipulate OpenDocument files")
10099 (description "Collection of libraries and utility programs written in
10100Python to manipulate OpenDocument 1.2 files.")
10101 (license
10102 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
10103 ;; number of files with other licenses.
10104 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
10105
10106(define-public python2-odfpy
10107 (package-with-python2 python-odfpy))
10108
10109(define-public python-natsort
10110 (package
10111 (name "python-natsort")
10112 (version "5.4.1")
10113 (source (origin
10114 (method url-fetch)
10115 (uri (pypi-uri "natsort" version))
10116 (sha256
10117 (base32
10118 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
10119 (build-system python-build-system)
10120 (arguments
10121 `(#:modules ((guix build utils)
10122 (guix build python-build-system)
10123 (srfi srfi-1)
10124 (srfi srfi-26)
10125 (ice-9 ftw))
10126 #:phases
10127 (modify-phases %standard-phases
10128 (add-before 'check 'set-cachedir
10129 ;; Tests require write access to $HOME by default
10130 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
10131 (replace 'check
10132 (lambda _
10133 (let ((cwd (getcwd)))
10134 (setenv "PYTHONPATH"
10135 (string-append
10136 cwd "/build/"
10137 (find (cut string-prefix? "lib" <>)
10138 (scandir (string-append cwd "/build")))
10139 ":"
10140 (getenv "PYTHONPATH")))
10141 (invoke "pytest" "-v")))))))
10142 (native-inputs
10143 `(("python-hypothesis" ,python-hypothesis)
10144 ("python-pytest-cov" ,python-pytest-cov)
10145 ("python-pytest-mock" ,python-pytest-mock)
10146 ("python-pytest" ,python-pytest)))
10147 (propagated-inputs ; TODO: Add python-fastnumbers.
10148 `(("python-pyicu" ,python-pyicu)))
10149 (home-page "https://github.com/SethMMorton/natsort")
10150 (synopsis "Natural sorting for python and shell")
10151 (description
10152 "Natsort lets you apply natural sorting on lists instead of
10153lexicographical. If you use the built-in @code{sorted} method in python
10154on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
10155returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
10156function @code{natsorted} that identifies numbers and sorts them separately
10157from strings. It can also sort version numbers, real numbers, mixed types
10158and more, and comes with a shell command @command{natsort} that exposes this
10159functionality in the command line.")
10160 (license license:expat)
10161 (properties `((python2-variant . ,(delay python2-natsort))))))
10162
10163(define-public python2-natsort
10164 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
10165 (package (inherit base)
10166 (native-inputs
10167 `(("python2-pathlib" ,python2-pathlib)
10168 ,@(package-native-inputs base))))))
10169
10170(define-public python-glances
10171 (package
10172 (name "python-glances")
10173 (version "3.0.2")
10174 (source
10175 (origin
10176 (method url-fetch)
10177 (uri (pypi-uri "Glances" version))
10178 (sha256
10179 (base32
10180 "09fxysfp1n16csqvzvawy74qm6a94nvwjf3vcf5gkqp4i6k4vjjy"))))
10181 (build-system python-build-system)
10182 (propagated-inputs
10183 `(("python-psutil" ,python-psutil)))
10184 (home-page
10185 "https://github.com/nicolargo/glances")
10186 (synopsis
10187 "A cross-platform curses-based monitoring tool")
10188 (description
10189 "Glances is a curses-based monitoring tool for a wide variety of platforms.
10190Glances uses the PsUtil library to get information from your system. It monitors
10191CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
10192 (license license:lgpl3+)))
10193
10194(define-public python2-glances
10195 (package-with-python2 python-glances))
10196
10197(define-public python-graphql-core
10198 (package
10199 (name "python-graphql-core")
10200 (version "0.5.3")
10201 (source
10202 (origin
10203 (method url-fetch)
10204 (uri (pypi-uri "graphql-core" version))
10205 (sha256
10206 (base32
10207 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
10208 (build-system python-build-system)
10209 (arguments
10210 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
10211 #:phases
10212 (modify-phases %standard-phases
10213 (add-after 'unpack 'patch-hardcoded-version
10214 (lambda _ (substitute*
10215 "setup.py"
10216 (("'gevent==1.1rc1'") "'gevent'"))
10217 #t)))))
10218 (native-inputs
10219 `(("python-gevent" ,python-gevent)
10220 ("python-mock" ,python-mock)
10221 ("python-pytest-mock" ,python-pytest-mock)))
10222 (propagated-inputs
10223 `(("python-promise" ,python-promise)
10224 ("python-six" ,python-six)))
10225 (home-page "https://github.com/graphql-python/graphql-core")
10226 (synopsis "GraphQL implementation for Python")
10227 (description
10228 "GraphQL implementation for Python. GraphQL is a data query language and
10229runtime designed and used to request and deliver data to mobile and web apps.
10230This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
10231to Python.")
10232 (license license:expat)))
10233
10234(define-public python2-graphql-core
10235 (package-with-python2 python-graphql-core))
10236
10237(define-public python-graphql-relay
10238 (package
10239 (name "python-graphql-relay")
10240 (version "0.4.5")
10241 (source
10242 (origin
10243 (method url-fetch)
10244 (uri (pypi-uri "graphql-relay" version))
10245 (sha256
10246 (base32
10247 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
10248 (build-system python-build-system)
10249 (arguments
10250 '(#:tests? #f)) ; The tests are not distributed
10251 (propagated-inputs
10252 `(("python-graphql-core" ,python-graphql-core)
10253 ("python-promise" ,python-promise)
10254 ("python-six" ,python-six)))
10255 (home-page "https://github.com/graphql-python/graphql-relay-py")
10256 (synopsis "Relay implementation for Python")
10257 (description
10258 "This is a library to allow the easy creation of Relay-compliant servers
10259using the GraphQL Python reference implementation of a GraphQL server. It
10260should be noted that the code is a exact port of the original
10261@url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
10262from Facebook.")
10263 (license license:expat)))
10264
10265(define-public python2-graphql-relay
10266 (package-with-python2 python-graphql-relay))
10267
10268(define-public python-graphene
10269 (package
10270 (name "python-graphene")
10271 (version "0.10.2")
10272 (source
10273 (origin
10274 (method url-fetch)
10275 (uri (pypi-uri "graphene" version))
10276 (sha256
10277 (base32
10278 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
10279 (build-system python-build-system)
10280 (propagated-inputs
10281 `(("python-graphql-core" ,python-graphql-core)
10282 ("python-graphql-relay" ,python-graphql-relay)
10283 ("python-iso8601" ,python-iso8601)
10284 ("python-promise" ,python-promise)
10285 ("python-six" ,python-six)))
10286 (arguments
10287 `(#:tests? #f)) ; no tests/ in the PyPI tarball
10288 (home-page "http://graphene-python.org/")
10289 (synopsis "GraphQL Framework for Python")
10290 (description
10291 "Graphene is a Python library for building GraphQL schemas/types.
10292A GraphQL schema describes your data model, and provides a GraphQL server
10293with an associated set of resolve methods that know how to fetch data.")
10294 (properties `((python2-variant . ,(delay python2-graphene))))
10295 (license license:expat)))
10296
10297(define-public python2-graphene
10298 (let ((base (package-with-python2
10299 (strip-python2-variant python-graphene))))
10300 (package (inherit base)
10301 (native-inputs
10302 `(("python2-sqlalchemy" ,python2-sqlalchemy)
10303 ,@(package-native-inputs base))))))
10304
10305(define-public python-nautilus
10306 (package
10307 (name "python-nautilus")
10308 (version "0.4.9")
10309 (source
10310 (origin
10311 (method url-fetch)
10312 (uri (pypi-uri "nautilus" version))
10313 (sha256
10314 (base32
10315 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
10316 (build-system python-build-system)
10317 (arguments `(#:tests? #f)) ; fails to import test modules
10318 (propagated-inputs
10319 `(("python-bcrypt" ,python-bcrypt)
10320 ("python-click" ,python-click)
10321 ("python-consul" ,python-consul)
10322 ("python-graphene" ,python-graphene)
10323 ("python-jinja2" ,python-jinja2)
10324 ("python-peewee" ,python-peewee)
10325 ("python-pika" ,python-pika)
10326 ("python-tornado" ,python-tornado)
10327 ("python-wtforms" ,python-wtforms)))
10328 (native-inputs
10329 `(("python-nose2" ,python-nose2)))
10330 (home-page "https://github.com/AlecAivazis/nautilus")
10331 (synopsis "Library for creating microservice applications")
10332 (description
10333 "Nautilus is a framework for flux based microservices that looks to
10334provide extendible implementations of common aspects of a cloud so that you can
10335focus on building massively scalable web applications.")
10336 (license license:expat)))
10337
10338(define-public python-snowballstemmer
10339 (package
10340 (name "python-snowballstemmer")
10341 (version "1.2.1")
10342 (source (origin
10343 (method url-fetch)
10344 (uri (pypi-uri "snowballstemmer" version))
10345 (sha256
10346 (base32
10347 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
10348 (build-system python-build-system)
10349 (arguments
10350 `(;; No tests exist
10351 #:tests? #f))
10352 (home-page "https://github.com/shibukawa/snowball_py")
10353 (synopsis "Snowball stemming library collection for Python")
10354 (description "This package provides 16 word stemmer algorithms generated
10355from Snowball algorithms. It includes the 15 original ones plus the Poerter
10356English stemmer.")
10357 (license license:bsd-3)))
10358
10359(define-public python2-snowballstemmer
10360 (package-with-python2 python-snowballstemmer))
10361
10362(define-public python-sphinx-cloud-sptheme
10363 (package
10364 (name "python-sphinx-cloud-sptheme")
10365 (version "1.8.0")
10366 (source (origin
10367 (method url-fetch)
10368 (uri (pypi-uri "cloud_sptheme" version))
10369 (sha256
10370 (base32
10371 "1dniqb6a39yh786f86c4jn666rwnyi1jvzn4616zhcchb7sfdshd"))))
10372 (build-system python-build-system)
10373 ;; FIXME: The 'pypi' release archive does not contain tests.
10374 (arguments '(#:tests? #f))
10375 (native-inputs
10376 `(("python-sphinx" ,python-sphinx)))
10377 (home-page "https://bitbucket.org/ecollins/cloud_sptheme")
10378 (synopsis "'Cloud' theme for Sphinx documenter")
10379 (description "This package contains the \"Cloud\" theme for Sphinx and some
10380related extensions.")
10381 (license license:bsd-3)))
10382
10383(define-public python2-sphinx-cloud-sptheme
10384 (package-with-python2 python-sphinx-cloud-sptheme))
10385
10386(define-public python-sphinx-alabaster-theme
10387 (package
10388 (name "python-sphinx-alabaster-theme")
10389 (version "0.7.12")
10390 (source (origin
10391 (method url-fetch)
10392 (uri (pypi-uri "alabaster" version))
10393 (sha256
10394 (base32
10395 "00nwwjj2d2ym4s2kk217x7jkx1hnczc3fvm8yxbqmsp6b0nxfqd6"))))
10396 (build-system python-build-system)
10397 (propagated-inputs
10398 `(("python-pygments" ,python-pygments)))
10399 (home-page "https://alabaster.readthedocs.io/")
10400 (synopsis "Configurable sidebar-enabled Sphinx theme")
10401 (description "Alabaster is a visually (c)lean, responsive, configurable
10402theme for the Sphinx documentation system. It's the default theme of Sphinx.")
10403 (license license:bsd-3)))
10404
10405(define-public python2-sphinx-alabaster-theme
10406 (package-with-python2 python-sphinx-alabaster-theme))
10407
10408(define-public python-setproctitle
10409(package
10410 (name "python-setproctitle")
10411 (version "1.1.10")
10412 (source
10413 (origin
10414 (method url-fetch)
10415 (uri (pypi-uri "setproctitle" version))
10416 (sha256
10417 (base32
10418 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
10419 (build-system python-build-system)
10420 (arguments
10421 '(#:phases
10422 (modify-phases %standard-phases
10423 (add-before 'check 'patch-Makefile
10424 ;; Stricly this is only required for the python2 variant.
10425 ;; But adding a phase in an inherited package seems to be
10426 ;; cumbersum. So we patch even for python3.
10427 (lambda _
10428 (let ((nose (assoc-ref %build-inputs "python2-nose")))
10429 (when nose
10430 (substitute* "Makefile"
10431 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
10432 (string-append nose "/bin/nosetests "))))
10433 #t)))
10434 (replace 'check
10435 (lambda _
10436 (setenv "PYTHON" (or (which "python3") (which "python")))
10437 (setenv "PYCONFIG" (or (which "python3-config")
10438 (which "python-config")))
10439 (setenv "CC" "gcc")
10440 ;; No need to extend PYTHONPATH to find the built package, since
10441 ;; the Makefile will build anyway
10442 (invoke "make" "check"))))))
10443 (native-inputs
10444 `(("procps" ,procps))) ; required for tests
10445 (home-page
10446 "https://github.com/dvarrazzo/py-setproctitle")
10447 (synopsis
10448 "Setproctitle implementation for Python to customize the process title")
10449 (description "The library allows a process to change its title (as displayed
10450by system tools such as ps and top).
10451
10452Changing the title is mostly useful in multi-process systems, for
10453example when a master process is forked: changing the children's title
10454allows to identify the task each process is busy with. The technique
10455is used by PostgreSQL and the OpenSSH Server for example.")
10456 (license license:bsd-3)
10457 (properties `((python2-variant . ,(delay python2-setproctitle))))))
10458
10459(define-public python2-setproctitle
10460 (let ((base (package-with-python2
10461 (strip-python2-variant python-setproctitle))))
10462 (package
10463 (inherit base)
10464 (native-inputs `(("python2-nose" ,python2-nose)
10465 ,@(package-native-inputs base))))))
10466
10467(define-public python-validictory
10468 (package
10469 (name "python-validictory")
10470 (version "1.0.1")
10471 (source
10472 (origin
10473 (method url-fetch)
10474 (uri (pypi-uri "validictory" version))
10475 (sha256
10476 (base32
10477 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
10478 (build-system python-build-system)
10479 (arguments
10480 '(#:phases
10481 (modify-phases %standard-phases
10482 (add-after 'unpack 'bootstrap
10483 ;; Move the tests out of the package directory to avoid
10484 ;; packaging them.
10485 (lambda* _
10486 (rename-file "validictory/tests" "tests")
10487 (delete-file "tests/__init__.py")))
10488 (replace 'check
10489 (lambda _
10490 ;; Extend PYTHONPATH so the built package will be found.
10491 (setenv "PYTHONPATH"
10492 (string-append (getcwd) "/build/lib:"
10493 (getenv "PYTHONPATH")))
6568bd5d 10494 (invoke "py.test" "-vv" ))))))
44d10b1f
RW
10495 (native-inputs
10496 `(("python-pytest" ,python-pytest)))
10497 (home-page
10498 "https://github.com/jamesturk/validictory")
10499 (synopsis "General purpose Python data validator")
10500 (description "It allows validation of arbitrary Python data structures.
10501
10502The schema format is based on the JSON Schema
10503proposal (http://json-schema.org), so combined with json the library is also
10504useful as a validator for JSON data.")
10505 (license license:expat)))
10506
10507(define-public python2-validictory
10508 (package-with-python2 python-validictory))
10509
10510(define-public python-pyelftools
10511 (package
10512 (name "python-pyelftools")
10513 (version "0.25")
10514 (source
10515 (origin
10516 (method url-fetch)
10517 (uri (pypi-uri "pyelftools" version))
10518 (sha256
10519 (base32
10520 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
10521 (build-system python-build-system)
10522 (arguments
10523 `(#:phases
10524 (modify-phases %standard-phases
10525 (add-before 'check 'set-pythonpath
10526 (lambda _
10527 (setenv "PYTHONPATH"
10528 (string-append
10529 (getcwd) "/test/"
10530 ":" (getenv "PYTHONPATH")))
10531 #t)))))
10532 (home-page
10533 "https://github.com/eliben/pyelftools")
10534 (synopsis
10535 "Analyze binary and library file information")
10536 (description "This Python library provides interfaces for parsing and
10537analyzing two binary and library file formats; the Executable and Linking
10538Format (ELF), and debugging information in the Debugging With Attributed
10539Record Format (DWARF).")
10540 (license license:public-domain)))
10541
10542(define-public python-pyev
10543 (package
10544 (name "python-pyev")
10545 (version "0.9.0")
10546 (source
10547 (origin
10548 (method url-fetch)
10549 (uri (pypi-uri "pyev" version))
10550 (sha256
10551 (base32
10552 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
10553 (build-system python-build-system)
10554 (arguments
10555 `(#:tests? #f ; no test suite
10556 #:phases
10557 (modify-phases %standard-phases
10558 (add-after 'unpack 'patch
10559 (lambda* (#:key inputs #:allow-other-keys)
10560 (let ((libev (string-append (assoc-ref inputs "libev")
10561 "/lib/libev.so.4")))
10562 (substitute* "setup.py"
10563 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
10564 (string-append "libev_dll_name = \"" libev "\"")))))))))
10565 (inputs
10566 `(("libev" ,libev)))
10567 (home-page "http://pythonhosted.org/pyev/")
10568 (synopsis "Python libev interface")
10569 (description "Pyev provides a Python interface to libev.")
10570 (license license:gpl3)))
10571
10572(define-public python2-pyev
10573 (package-with-python2 python-pyev))
10574
10575(define-public python-imagesize
10576 (package
10577 (name "python-imagesize")
10578 (version "1.1.0")
10579 (source
10580 (origin
10581 (method url-fetch)
10582 (uri (pypi-uri "imagesize" version))
10583 (sha256
10584 (base32
10585 "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk"))))
10586 (build-system python-build-system)
10587 (home-page "https://github.com/shibukawa/imagesize_py")
10588 (synopsis "Gets image size of files in various formats in Python")
10589 (description
10590 "This package allows determination of image size from
10591PNG, JPEG, JPEG2000 and GIF files in pure Python.")
10592 (license license:expat)))
10593
10594(define-public python2-imagesize
10595 (package-with-python2 python-imagesize))
10596
10597(define-public python-termstyle
10598 (package
10599 (name "python-termstyle")
10600 (version "0.1.11")
10601 (source
10602 (origin
10603 (method url-fetch)
10604 (uri (pypi-uri "termstyle" version))
10605 (sha256
10606 (base32
10607 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
10608 (build-system python-build-system)
10609 (arguments
10610 '(#:phases
10611 (modify-phases %standard-phases
10612 (replace 'check
10613 (lambda _
831080a6 10614 (invoke "python" "test3.py"))))))
44d10b1f
RW
10615 (home-page "https://github.com/gfxmonk/termstyle")
10616 (synopsis "Console text coloring for Python")
10617 (description "This package provides console text coloring for Python.")
10618 (license license:bsd-3)))
10619
10620(define-public python-argcomplete
10621 (package
10622 (name "python-argcomplete")
10623 (version "1.7.0")
10624 (source
10625 (origin
10626 (method url-fetch)
10627 (uri (pypi-uri "argcomplete" version))
10628 (sha256
10629 (base32
10630 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
10631 (build-system python-build-system)
10632 (native-inputs
10633 `(("python-pexpect" ,python-pexpect)
10634 ("tcsh" ,tcsh)
10635 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
10636 (home-page "https://github.com/kislyuk/argcomplete")
10637 (synopsis "Shell tab completion for Python argparse")
10638 (description "argcomplete provides extensible command line tab completion
10639of arguments and options for Python scripts using @code{argparse}. It's
10640particularly useful for programs with many options or sub-parsers that can
10641dynamically suggest completions; for example, when browsing resources over the
10642network.")
10643 (license license:asl2.0)))
10644
10645(define-public python2-argcomplete
10646 (package-with-python2 python-argcomplete))
10647
10648(define-public python-xopen
10649 (package
10650 (name "python-xopen")
10651 (version "0.3.3")
10652 (source
10653 (origin
10654 (method url-fetch)
10655 (uri (pypi-uri "xopen" version))
10656 (sha256
10657 (base32
10658 "1a0wbil552wsmklwd89ssmgz3pjd86qa9i7jh8wqb9wslc8a2qjr"))
10659 (file-name (string-append name "-" version ".tar.gz"))))
10660 (build-system python-build-system)
10661 (home-page "https://github.com/marcelm/xopen/")
10662 (synopsis "Open compressed files transparently")
10663 (description "This module provides an @code{xopen} function that works like
10664Python's built-in @code{open} function, but can also deal with compressed files.
10665Supported compression formats are gzip, bzip2 and, xz, and are automatically
10666recognized by their file extensions. The focus is on being as efficient as
10667possible on all supported Python versions.")
10668 (license license:expat)))
10669
10670(define-public python2-xopen
10671 (let ((base (package-with-python2
10672 (strip-python2-variant python-xopen))))
10673 (package
10674 (inherit base)
10675 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
10676 ,@(package-propagated-inputs base))))))
10677
10678(define-public python-cheetah
10679 (package
10680 (name "python-cheetah")
10681 (version "3.1.0")
10682 (source
10683 (origin
10684 (method url-fetch)
10685 (uri (pypi-uri "Cheetah3" version))
10686 (sha256
10687 (base32
10688 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
10689 (build-system python-build-system)
10690 (arguments
10691 `(#:modules ((guix build utils)
10692 (guix build python-build-system)
10693 (ice-9 ftw)
10694 (srfi srfi-1)
10695 (srfi srfi-26))
10696 #:phases (modify-phases %standard-phases
10697 (add-after 'unpack 'use-absolute-python
10698 (lambda _
10699 (substitute* "Cheetah/CheetahWrapper.py"
10700 (("#!/usr/bin/env python")
10701 (string-append "#!" (which "python"))))
10702 #t))
10703 (replace 'check
10704 (lambda _
10705 (let ((cwd (getcwd)))
10706 (setenv "PYTHONPATH"
10707 (string-append
10708 cwd "/build/"
10709 (find (cut string-prefix? "lib" <>)
10710 (scandir (string-append cwd "/build")))
10711 ":" (getenv "PYTHONPATH")))
10712 (setenv "PATH"
10713 (string-append (getenv "PATH")
10714 ":" cwd "/bin"))
10715 (setenv "TMPDIR" "/tmp")
10716
10717 (substitute* "Cheetah/Tests/Test.py"
10718 (("unittest.TextTestRunner\\(\\)")
10719 "unittest.TextTestRunner(verbosity=2)"))
10720
10721 (invoke "python" "Cheetah/Tests/Test.py")))))))
10722 (propagated-inputs
10723 `(("python-markdown" ,python-markdown))) ;optional
10724 (home-page "http://cheetahtemplate.org/")
10725 (synopsis "Template engine")
10726 (description "Cheetah is a text-based template engine and Python code
10727generator.
10728
10729Cheetah can be used as a standalone templating utility or referenced as
10730a library from other Python applications. It has many potential uses,
10731but web developers looking for a viable alternative to ASP, JSP, PHP and
10732PSP are expected to be its principle user group.
10733
10734Features:
10735@enumerate
10736@item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
10737 text-based format.
10738@item Cleanly separates content, graphic design, and program code.
10739@item Blends the power and flexibility of Python with a simple template language
10740 that non-programmers can understand.
10741@item Gives template writers full access to any Python data structure, module,
10742 function, object, or method in their templates.
10743@item Makes code reuse easy by providing an object-orientated interface to
10744 templates that is accessible from Python code or other Cheetah templates.
10745 One template can subclass another and selectively reimplement sections of it.
10746@item Provides a simple, yet powerful, caching mechanism that can dramatically
10747 improve the performance of a dynamic website.
10748@item Compiles templates into optimized, yet readable, Python code.
10749@end enumerate")
10750 (license (license:x11-style "file://LICENSE"))))
10751
10752(define-public python2-cheetah
10753 (package-with-python2 python-cheetah))
10754
10755(define-public python-dulwich
10756 (package
10757 (name "python-dulwich")
10758 (version "0.18.6")
10759 (source
10760 (origin
10761 (method url-fetch)
10762 (uri (list (string-append "https://www.dulwich.io/releases/"
10763 "dulwich-" version ".tar.gz")
10764 (pypi-uri "dulwich" version)))
10765 (sha256
10766 (base32
10767 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
10768 (build-system python-build-system)
10769 (arguments
10770 `(#:phases
10771 (modify-phases %standard-phases
10772 (add-before 'check 'fix-tests
10773 (lambda* (#:key inputs #:allow-other-keys)
10774 ;; The tests use Popen with a custom environment which doesn't
10775 ;; include PATH.
10776 (substitute* "dulwich/tests/compat/utils.py"
10777 (("'git'") (string-append "'"
10778 (which "git")
10779 "'")))
10780 (substitute* '("dulwich/tests/test_repository.py"
10781 "dulwich/tests/test_hooks.py")
10782 (("#!/bin/sh") (string-append "#!" (which "sh"))))
10783 (setenv "TEST_RUNNER" "unittest")
10784 (setenv "PYTHONHASHSEED" "random")
10785 #t)))))
10786 (propagated-inputs
10787 `(("python-fastimport" ,python-fastimport)))
10788 (native-inputs
10789 `(("python-mock" ,python-mock)
10790 ("python-geventhttpclient" ,python-geventhttpclient)
10791 ("git" ,git)))
10792 (home-page "https://www.dulwich.io/")
10793 (synopsis "Git implementation in Python")
10794 (description "Dulwich is an implementation of the Git file formats and
10795protocols written in pure Python.")
10796 ;; Can be used with either license.
10797 (license (list license:asl2.0 license:gpl2+))))
10798
10799(define-public python2-dulwich
10800 (package-with-python2 python-dulwich))
10801
10802(define-public python-pbkdf2
10803 (package
10804 (name "python-pbkdf2")
10805 (version "1.3")
10806 (source
10807 (origin
10808 (method url-fetch)
10809 (uri (pypi-uri "pbkdf2" version))
10810 (sha256
10811 (base32
10812 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
10813 (build-system python-build-system)
10814 (arguments
10815 '(#:phases
10816 (modify-phases %standard-phases
10817 (replace 'check
10818 (lambda _
10819 (setenv "PYTHONPATH"
10820 (string-append (getcwd) "/build/lib:"
10821 (getenv "PYTHONPATH")))
ee2bb944 10822 (invoke "python" "test/test_pbkdf2.py"))))))
44d10b1f
RW
10823 (propagated-inputs
10824 `(("python-pycrypto" ,python-pycrypto))) ; optional
10825 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
10826 (synopsis "Password-based key derivation")
10827 (description "This module implements the password-based key derivation
10828function, PBKDF2, specified in RSA PKCS#5 v2.0.
10829
10830PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
10831is part of the RSA Public Key Cryptography Standards series. The provided
10832implementation takes a password or a passphrase and a salt value (and
10833optionally a iteration count, a digest module, and a MAC module) and provides
10834a file-like object from which an arbitrarly-sized key can be read.")
10835 (license license:expat)))
10836
10837(define-public python2-pbkdf2
10838 (package-with-python2 python-pbkdf2))
10839
10840(define-public python-qrcode
10841 (package
10842 (name "python-qrcode")
217ea1a1 10843 (version "6.1")
44d10b1f
RW
10844 (source
10845 (origin
10846 (method url-fetch)
10847 (uri (pypi-uri "qrcode" version))
10848 (sha256
217ea1a1 10849 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
44d10b1f
RW
10850 (build-system python-build-system)
10851 (arguments
10852 ;; FIXME: Tests require packaging 'pymaging'.
10853 '(#:tests? #f))
10854 (propagated-inputs
10855 `(("python-lxml" ,python-lxml) ; for SVG output
10856 ("python-pillow" ,python-pillow) ; for PNG output
10857 ("python-six" ,python-six)))
44d10b1f
RW
10858 (home-page "https://github.com/lincolnloop/python-qrcode")
10859 (synopsis "QR Code image generator")
10860 (description "This package provides a pure Python QR Code generator
10861module. It uses the Python Imaging Library (PIL) to allow for the generation
10862of QR Codes.
10863
10864In addition this package provides a command line tool to generate QR codes and
10865either write these QR codes to a file or do the output as ascii art at the
10866console.")
10867 (license license:bsd-3)))
10868
10869(define-public python2-qrcode
10870 (package-with-python2 python-qrcode))
10871
10872(define-public python-rst2ansi
10873 (package
10874 (name "python-rst2ansi")
10875 (version "0.1.5")
10876 (source
10877 (origin
10878 (method url-fetch)
10879 (uri (pypi-uri "rst2ansi" version))
10880 (sha256
10881 (base32
10882 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
10883 (build-system python-build-system)
10884 (propagated-inputs
10885 `(("python-docutils" ,python-docutils)))
10886 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
10887 (synopsis "Convert RST to ANSI-decorated console output")
10888 (description
10889 "Python module dedicated to rendering RST (reStructuredText) documents
10890to ansi-escaped strings suitable for display in a terminal.")
10891 (license license:expat)))
10892
10893(define-public python-ansi2html
10894 (package
10895 (name "python-ansi2html")
10896 (version "1.2.0")
10897 (source
10898 (origin
10899 (method url-fetch)
10900 (uri (pypi-uri "ansi2html" version))
10901 (sha256
10902 (base32
10903 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
10904 (build-system python-build-system)
10905 (native-inputs
10906 `(("python-mock" ,python-mock)
10907 ("python-nose" ,python-nose)))
10908 (propagated-inputs
10909 `(("python-six" ,python-six)))
10910 (home-page "https://github.com/ralphbean/ansi2html")
10911 (synopsis "Convert ANSI-decorated console output to HTML")
10912 (description
10913 "@command{ansi2html} is a Python library and command line utility for
10914convering text with ANSI color codes to HTML or LaTeX.")
10915 (license license:gpl3+)))
10916
10917(define-public python2-ansi2html
10918 (package-with-python2 python-ansi2html))
10919
10920(define-public python-ddt
10921 (package
10922 (name "python-ddt")
10923 (version "1.1.3")
10924 (source
10925 (origin
10926 (method url-fetch)
10927 (uri (pypi-uri "ddt" version))
10928 (sha256
10929 (base32
10930 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
10931 (build-system python-build-system)
10932 (native-inputs
10933 `(("python-mock" ,python-mock)
10934 ("python-nose" ,python-nose)))
10935 (propagated-inputs
10936 `(("python-six" ,python-six)
10937 ("python-pyyaml" ,python-pyyaml)))
10938 (home-page "https://github.com/txels/ddt")
10939 (synopsis "Data-Driven Tests")
10940 (description
10941 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
10942running it with different test data, and make it appear as multiple test
10943cases.")
10944 (license license:expat)))
10945
10946(define-public python2-ddt
10947 (package-with-python2 python-ddt))
10948
10949(define-public python-pycountry
10950 (package
10951 (name "python-pycountry")
10952 (version "18.5.26")
10953 (source
10954 (origin
10955 (method url-fetch)
10956 (uri (pypi-uri "pycountry" version))
10957 (sha256
10958 (base32
10959 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
10960 (build-system python-build-system)
10961 (home-page "https://bitbucket.org/flyingcircus/pycountry")
10962 (synopsis "ISO databases for languages, countries, currencies, etc.")
10963 (description
10964 "@code{pycountry} provides the ISO databases for the standards:
10965@enumerate
10966@item 639-3 (Languages)
10967@item 3166 (Countries)
10968@item 3166-3 (Deleted Countries)
10969@item 3166-2 (Subdivisions of countries)
10970@item 4217 (Currencies)
10971@item 15924 (Scripts)
10972@end enumerate
10973It includes a copy from Debian’s pkg-isocodes and makes the data accessible
10974through a Python API.")
10975 (license license:lgpl2.1+)))
10976
10977(define-public python2-pycountry
10978 (package-with-python2 python-pycountry))
10979
10980(define-public python-pycosat
10981 (package
10982 (name "python-pycosat")
10983 (version "0.6.1")
10984 (source
10985 (origin
10986 (method url-fetch)
10987 (uri (pypi-uri "pycosat" version))
10988 (sha256
10989 (base32
10990 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
10991 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
10992 (build-system python-build-system)
10993 (home-page "https://github.com/ContinuumIO/pycosat")
10994 (synopsis "Bindings to picosat (a SAT solver)")
10995 (description
10996 "This package provides efficient Python bindings to @code{picosat} on
10997the C level. When importing pycosat, the @code{picosat} solver becomes part
10998of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
10999Problem} (SAT) solver.")
11000 (license license:expat)))
11001
11002(define-public python2-pycosat
11003 (package-with-python2 python-pycosat))
11004
11005(define-public python2-ruamel.ordereddict
11006 (package
11007 (name "python2-ruamel.ordereddict")
11008 (version "0.4.9")
11009 (source
11010 (origin
11011 (method url-fetch)
11012 (uri (pypi-uri "ruamel.ordereddict" version))
11013 (sha256
11014 (base32
11015 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
11016 (build-system python-build-system)
11017 (arguments
11018 `(#:python ,python-2
11019 #:phases
11020 (modify-phases %standard-phases
11021 (delete 'check)
11022 (add-after 'install 'check
11023 (lambda* (#:key inputs outputs #:allow-other-keys)
11024 (add-installed-pythonpath inputs outputs)
f987ac30 11025 (invoke "python" "test/testordereddict.py"))))))
44d10b1f
RW
11026 (home-page "https://bitbucket.org/ruamel/ordereddict")
11027 (synopsis "Version of dict that keeps keys in insertion order")
11028 (description
11029 "This is an implementation of an ordered dictionary with @dfn{Key
11030Insertion Order} (KIO: updates of values do not affect the position of the
11031key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
11032removed and put at the back). The standard library module @code{OrderedDict},
11033implemented later, implements a subset of @code{ordereddict} functionality.
11034Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
11035Order} (KSO, no sorting function can be specified, but a transform can be
11036specified to apply on the key before comparison (e.g. @code{string.lower})).")
11037 (license license:expat)))
11038
11039(define-public python-pypeg2
11040 (package
11041 (name "python-pypeg2")
11042 (version "2.15.2")
11043 (source
11044 (origin
11045 (method url-fetch)
11046 (uri (pypi-uri "pyPEG2" version))
11047 (sha256
11048 (base32
11049 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
11050 (build-system python-build-system)
11051 (propagated-inputs `(("python-lxml" ,python-lxml)))
11052 (arguments
11053 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
11054 '(#:tests? #f))
11055 (home-page "https://fdik.org/pyPEG/")
11056 (synopsis "Parsering Expression Grammars in Python")
11057 (description "PyPEG is an intrinsic parser interpreter framework for
11058Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
11059parse many formal languages.")
11060 (license license:gpl2)))
11061
11062(define-public python-incremental
11063 (package
11064 (name "python-incremental")
11065 (version "17.5.0")
11066 (source
11067 (origin
11068 (method url-fetch)
11069 (uri (pypi-uri "incremental" version))
11070 (sha256
11071 (base32
11072 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
11073 (build-system python-build-system)
11074 (home-page "https://github.com/hawkowl/incremental")
11075 (synopsis "Library for versioning Python projects")
11076 (description "Incremental is a small library that versions your Python
11077projects.")
11078 (license license:expat)))
11079
11080(define-public python2-incremental
11081 (package-with-python2 python-incremental))
11082
11083(define-public python-invoke
11084 (package
11085 (name "python-invoke")
11086 (home-page "http://www.pyinvoke.org/")
11087 (version "1.1.0")
11088 (source (origin
11089 (method url-fetch)
11090 (uri (pypi-uri "invoke" version))
11091 (sha256
11092 (base32
11093 "0aiy1xvk1f91246zxd1zqrm679vdvd10h843a2na41cqr3cflpi6"))))
11094 (build-system python-build-system)
11095 (arguments
11096 ;; XXX: Requires many dependencies that are not yet in Guix.
11097 `(#:tests? #f))
11098 (synopsis "Pythonic task execution")
11099 (description
11100 "Invoke is a Python task execution tool and library, drawing inspiration
11101from various sources to arrive at a powerful and clean feature set. It is
11102evolved from the Fabric project, but focuses on local and abstract concerns
11103instead of servers and network commands.")
11104 (license license:bsd-3)))
11105
11106(define-public python2-invoke
11107 (package-with-python2 python-invoke))
11108
11109(define-public python-automat
11110 (package
11111 (name "python-automat")
11112 (version "0.6.0")
11113 (source (origin
11114 (method url-fetch)
11115 (uri (pypi-uri "Automat" version))
11116 (sha256
11117 (base32
11118 "1a7nsrljysfmdqmpn2apfa1gg6rfah4y9sizvns8gb08rx7d07rw"))))
11119 (build-system python-build-system)
11120 ;; We disable the tests because they require python-twisted, while
11121 ;; python-twisted depends on python-automat. Twisted is optional, but the
11122 ;; tests fail if it is not available. Also see
11123 ;; <https://github.com/glyph/automat/issues/71>.
11124 (arguments '(#:tests? #f))
11125 (native-inputs
11126 `(("python-m2r" ,python-m2r)
11127 ("python-setuptools-scm" ,python-setuptools-scm)
11128 ("python-graphviz" ,python-graphviz)))
11129 (propagated-inputs
11130 `(("python-six" ,python-six)
11131 ("python-attrs" ,python-attrs)))
11132 (home-page "https://github.com/glyph/Automat")
11133 (synopsis "Self-service finite-state machines")
11134 (description "Automat is a library for concise, idiomatic Python
11135expression of finite-state automata (particularly deterministic finite-state
11136transducers).")
11137 (license license:expat)))
11138
11139(define-public python2-automat
11140 (package-with-python2 python-automat))
11141
11142(define-public python-m2r
11143 (package
11144 (name "python-m2r")
11145 (version "0.1.12")
11146 (source (origin
11147 (method url-fetch)
11148 (uri (pypi-uri "m2r" version))
11149 (sha256
11150 (base32
11151 "1axrwnf425sz4qz3c0qc7yhhki4myzb8rki7pczcsgzznzmqdyxd"))))
11152 (build-system python-build-system)
11153 (propagated-inputs
11154 `(("python-docutils" ,python-docutils)
11155 ("python-mistune" ,python-mistune)))
11156 (native-inputs
11157 `(("python-pygments" ,python-pygments)
11158 ("python-mock" ,python-mock)))
11159 (home-page "https://github.com/miyakogi/m2r")
11160 (synopsis "Markdown to reStructuredText converter")
11161 (description "M2R converts a markdown file including reST markups to valid
11162reST format.")
11163 (license license:expat)))
11164
11165(define-public python2-m2r
11166 (package-with-python2 python-m2r))
11167
11168(define-public python-constantly
11169 (package
11170 (name "python-constantly")
11171 (version "15.1.0")
11172 (source (origin
11173 (method url-fetch)
11174 (uri (pypi-uri "constantly" version))
11175 (sha256
11176 (base32
11177 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
11178 (build-system python-build-system)
11179 (home-page "https://github.com/twisted/constantly")
11180 (synopsis "Symbolic constants in Python")
11181 (description "Constantly is a Python library that provides symbolic
11182constant support. It includes collections and constants with text, numeric,
11183and bit flag values.")
11184 (license license:expat)))
11185
11186(define-public python2-constantly
11187 (package-with-python2 python-constantly))
11188
11189(define-public python-attrs
11190 (package
11191 (name "python-attrs")
c41d5144 11192 (version "19.1.0")
44d10b1f
RW
11193 (source (origin
11194 (method url-fetch)
11195 (uri (pypi-uri "attrs" version))
11196 (sha256
11197 (base32
c41d5144 11198 "16g33zr5f449lqc5wgvzpknxryfzrfsxcr6kpgxwn7l5fkv71f7h"))))
44d10b1f
RW
11199 (build-system python-build-system)
11200 (arguments
11201 `(#:modules ((guix build utils)
11202 (guix build python-build-system)
11203 (ice-9 ftw)
11204 (srfi srfi-1)
11205 (srfi srfi-26))
11206 #:phases (modify-phases %standard-phases
11207 (replace 'check
11208 (lambda _
11209 (let ((cwd (getcwd)))
11210 (setenv "PYTHONPATH"
11211 (string-append
11212 cwd "/build/"
11213 (find (cut string-prefix? "lib" <>)
11214 (scandir (string-append cwd "/build")))
11215 ":"
11216 (getenv "PYTHONPATH")))
11217 (invoke "python" "-m" "pytest")))))))
11218 (native-inputs
11219 `(("python-coverage" ,python-coverage)
11220 ("python-hypothesis" ,python-hypothesis)
11221 ("python-pympler" ,python-pympler)
11222 ("python-pytest" ,python-pytest)
11223 ("python-six" ,python-six)
11224 ("python-sphinx" ,python-sphinx)
11225 ("python-zope-interface" ,python-zope-interface)))
11226 (home-page "https://github.com/python-attrs/attrs/")
11227 (synopsis "Attributes without boilerplate")
11228 (description "@code{attrs} is a Python package with class decorators that
11229ease the chores of implementing the most common attribute-related object
11230protocols.")
11231 (license license:expat)))
11232
11233(define-public python2-attrs
11234 (package-with-python2 python-attrs))
11235
11236(define-public python-attrs-bootstrap
11237 (package
11238 (inherit python-attrs)
11239 (name "python-attrs-bootstrap")
44d10b1f
RW
11240 (native-inputs `())
11241 (arguments `(#:tests? #f))))
11242
11243(define-public python2-attrs-bootstrap
11244 (package-with-python2 python-attrs-bootstrap))
11245
11246(define-public python2-cliapp
11247 (package
11248 (name "python2-cliapp")
9064b84e 11249 (version "1.20180812.1")
44d10b1f
RW
11250 (source
11251 (origin
11252 (method url-fetch)
11253 (uri (string-append
11254 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
11255 version ".tar.gz"))
11256 (sha256
11257 (base32
9064b84e 11258 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
44d10b1f
RW
11259 (build-system python-build-system)
11260 (arguments
11261 `(#:python ,python-2
11262 #:phases
11263 (modify-phases %standard-phases
11264 ;; check phase needs to be run before the build phase. If not,
11265 ;; coverage-test-runner looks for tests for the built source files,
11266 ;; and fails.
11267 (delete 'check)
11268 (add-before 'build 'check
11269 (lambda _
11270 ;; Disable python3 tests
11271 (substitute* "check"
11272 (("python3") "# python3"))
6c826d32 11273 (invoke "./check"))))))
44d10b1f
RW
11274 (native-inputs
11275 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
11276 ("python2-pep8" ,python2-pep8)))
11277 (propagated-inputs
11278 `(("python2-pyaml" ,python2-pyaml)))
11279 (home-page "https://liw.fi/cliapp/")
11280 (synopsis "Python framework for command line programs")
11281 (description "@code{python2-cliapp} is a python framework for
11282command line programs. It contains the typical stuff such programs
11283need to do, such as parsing the command line for options, and
11284iterating over input files.")
11285 (license license:gpl2+)))
11286
11287(define-public python2-ttystatus
11288 (package
11289 (name "python2-ttystatus")
e516a9c2 11290 (version "0.36")
44d10b1f
RW
11291 (source
11292 (origin
11293 (method url-fetch)
11294 (uri (string-append
11295 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
11296 version ".tar.gz"))
11297 (sha256
11298 (base32
e516a9c2 11299 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
44d10b1f
RW
11300 (build-system python-build-system)
11301 (native-inputs
11302 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
11303 ("python2-pep8" ,python2-pep8)))
11304 (arguments
11305 `(#:python ,python-2
11306 #:phases
11307 (modify-phases %standard-phases
11308 ;; check phase needs to be run before the build phase. If not,
11309 ;; coverage-test-runner looks for tests for the built source files,
11310 ;; and fails.
11311 (delete 'check)
11312 (add-before 'build 'check
cbeee881 11313 (lambda _ (invoke "make" "check"))))))
44d10b1f
RW
11314 (home-page "https://liw.fi/ttystatus/")
11315 (synopsis "Python library for showing progress reporting and
11316status updates on terminals")
11317 (description "@code{python2-ttystatus} is a python library for
11318showing progress reporting and status updates on terminals, for
11319command line programs. Output is automatically adapted to the width
11320of the terminal: truncated if it does not fit, and resized if the
11321terminal size changes.")
11322 (license license:gpl3+)))
11323
11324(define-public python2-tracing
11325 (package
11326 (name "python2-tracing")
11327 (version "0.10")
11328 (source
11329 (origin
11330 (method url-fetch)
11331 (uri (string-append
11332 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
11333 version ".tar.gz"))
11334 (sha256
11335 (base32
11336 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
11337 (build-system python-build-system)
11338 (arguments
11339 `(#:python ,python-2))
11340 (home-page "https://liw.fi/tracing/")
11341 (synopsis "Python debug logging helper")
11342 (description "@code{python2-tracing} is a python library for
11343logging debug messages. It provides a way to turn debugging messages
11344on and off, based on the filename they occur in. It is much faster
11345than using @code{logging.Filter} to accomplish the same thing, which
11346matters when code is run in production mode. The actual logging still
11347happens using the @code{logging} library.")
11348 (license license:gpl3+)))
11349
11350(define-public python2-larch
11351 (package
11352 (name "python2-larch")
11353 (version "1.20151025")
11354 (source
11355 (origin
11356 (method url-fetch)
11357 (uri (string-append
11358 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
11359 version ".tar.gz"))
11360 (patches (search-patches
11361 "python2-larch-coverage-4.0a6-compatibility.patch"))
11362 (sha256
11363 (base32
11364 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
11365 (build-system python-build-system)
11366 (arguments
11367 `(#:python ,python-2
11368 #:phases
11369 (modify-phases %standard-phases
11370 ;; check phase needs to be run before the build phase. If not,
11371 ;; coverage-test-runner looks for tests for the built source files,
11372 ;; and fails.
11373 (delete 'check)
11374 (add-before 'build 'check
204ad455 11375 (lambda _ (invoke "make" "check"))))))
44d10b1f
RW
11376 (native-inputs
11377 `(("cmdtest" ,cmdtest)
11378 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
11379 (propagated-inputs
11380 `(("python2-tracing" ,python2-tracing)))
11381 (home-page "https://liw.fi/larch/")
11382 (synopsis "Python copy-on-write B-tree library")
11383 (description "@code{python2-larch} is an implementation of
11384particular kind of B-tree, based on research by Ohad Rodeh. See
11385@url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
11386on the data structure.
11387
11388The distinctive feature of this B-tree is that a node is never
11389(conceptually) modified. Instead, all updates are done by
11390copy-on-write. This makes it easy to clone a tree, and modify only the
11391clone, while other processes access the original tree.")
11392 (license license:gpl3+)))
11393
11394(define-public python-astroid
11395 (package
11396 (name "python-astroid")
11397 (version "2.1.0")
11398 (source
11399 (origin
11400 (method url-fetch)
11401 (uri (pypi-uri "astroid" version))
11402 (sha256
11403 (base32
11404 "08hz675knh4294bancdapql392fmbjyimhbyrmfkz1ka7l035c1m"))))
11405 (build-system python-build-system)
11406 (propagated-inputs
11407 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
11408 ("python-six" ,python-six)
11409 ("python-wrapt" ,python-wrapt)))
11410 (native-inputs
11411 `(("python-dateutil" ,python-dateutil)
11412 ("python-nose" ,python-nose)
11413 ("python-pytest" ,python-pytest)
11414 ("python-pytest-runner" ,python-pytest-runner)))
11415 (arguments
11416 `(#:phases
11417 (modify-phases %standard-phases
11418 (add-after 'unpack 'remove-spurious-test
11419 (lambda _
11420 ;; This can be removed after upgrading from python-3.7
11421 ;; https://github.com/PyCQA/astroid/issues/593
11422 ;; https://bugs.python.org/issue34056
11423 (delete-file "astroid/tests/unittest_modutils.py")
11424 #t))
11425 (replace 'check
11426 (lambda _
11427 (invoke "pytest" "astroid"))))))
11428 (home-page "https://github.com/PyCQA/astroid")
11429 (synopsis "Common base representation of python source code for pylint and
11430other projects")
11431 (description "@code{python-astroid} provides a common base representation
11432of python source code for projects such as pychecker, pyreverse, pylint, etc.
11433
11434It provides a compatible representation which comes from the _ast module. It
11435rebuilds the tree generated by the builtin _ast module by recursively walking
11436down the AST and building an extended ast. The new node classes have
11437additional methods and attributes for different usages. They include some
11438support for static inference and local name scopes. Furthermore, astroid
11439builds partial trees by inspecting living objects.")
11440 (license license:lgpl2.1+)
11441 (properties `((python2-variant . ,(delay python2-astroid))))))
11442
11443(define-public python2-astroid
11444 (let ((base (package-with-python2
11445 (strip-python2-variant python-astroid))))
11446 (package (inherit base)
11447 ;; Version 2.x removes python2 support.
11448 (version "1.6.5")
11449 (source
11450 (origin
11451 (method url-fetch)
11452 (uri (pypi-uri "astroid" version))
11453 (sha256
11454 (base32
11455 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
11456 (arguments
11457 (substitute-keyword-arguments (package-arguments base)
11458 ((#:phases phases)
11459 `(modify-phases ,phases
11460 (add-after 'unpack 'remove-spurious-test
11461 (lambda _
11462 ;; https://github.com/PyCQA/astroid/issues/276
11463 (delete-file "astroid/tests/unittest_brain.py")
11464 #t))
11465 (replace 'check
11466 (lambda _
11467 (invoke"python" "-m" "unittest" "discover"
11468 "-p" "unittest*.py")))))))
11469 (native-inputs `())
11470 (propagated-inputs
11471 `(("python2-backports-functools-lru-cache"
11472 ,python2-backports-functools-lru-cache)
11473 ("python2-enum34" ,python2-enum34)
11474 ("python2-singledispatch" ,python2-singledispatch)
11475 ,@(package-propagated-inputs base))))))
11476
11477(define-public python-isort
11478 (package
11479 (name "python-isort")
e2227b6a 11480 (version "4.3.4")
44d10b1f
RW
11481 (source
11482 (origin
e2227b6a
EF
11483 (method git-fetch)
11484 (uri (git-reference
11485 ;; Tests pass only from the Github sources
11486 (url "https://github.com/timothycrosley/isort")
11487 (commit version)))
11488 (file-name (git-file-name name version))
44d10b1f
RW
11489 (sha256
11490 (base32
e2227b6a 11491 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
44d10b1f
RW
11492 (build-system python-build-system)
11493 (native-inputs
11494 `(("python-mock" ,python-mock)
11495 ("python-pytest" ,python-pytest)))
11496 (home-page "https://github.com/timothycrosley/isort")
11497 (synopsis "Python utility/library to sort python imports")
11498 (description "@code{python-isort} is a python utility/library to sort
11499imports alphabetically, and automatically separated into sections. It
11500provides a command line utility, a python library and plugins for various
11501editors.")
e2227b6a
EF
11502 (license license:expat)
11503 (properties `((python2-variant . ,(delay python2-isort))))))
44d10b1f
RW
11504
11505(define-public python2-isort
e2227b6a
EF
11506 (let ((base (package-with-python2
11507 (strip-python2-variant python-isort))))
11508 (package (inherit base)
11509 (native-inputs
11510 `(("python2-futures" ,python2-futures)
11511 ,@(package-native-inputs base))))))
44d10b1f
RW
11512
11513(define-public python2-backports-functools-lru-cache
11514 (package
11515 (name "python2-backports-functools-lru-cache")
11516 (version "1.5")
11517 (source
11518 (origin
11519 (method url-fetch)
11520 ;; only the pypi tarballs contain the necessary metadata
11521 (uri (pypi-uri "backports.functools_lru_cache" version))
11522 (sha256
11523 (base32
11524 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
11525 (build-system python-build-system)
11526 (native-inputs
11527 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
11528 (arguments
11529 `(#:python ,python-2))
11530 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
11531 (synopsis "Backport of functools.lru_cache from Python 3.3")
11532 (description "@code{python2-backports-functools-lru-cache} is a backport
11533of @code{functools.lru_cache} from python 3.3.")
11534 (license license:expat)))
11535
11536(define-public python-configparser
11537 (package
11538 (name "python-configparser")
84127f8c 11539 (version "3.7.1")
44d10b1f
RW
11540 (source
11541 (origin
11542 (method url-fetch)
84127f8c 11543 (uri (pypi-uri "configparser" version))
44d10b1f
RW
11544 (sha256
11545 (base32
84127f8c 11546 "0cnz213il9lhgda6x70fw7mfqr8da43s3wm343lwzhqx94mgmmav"))))
44d10b1f 11547 (build-system python-build-system)
809f003f 11548 (home-page "https://github.com/jaraco/configparser/")
44d10b1f
RW
11549 (synopsis "Backport of configparser from python 3.5")
11550 (description "@code{python-configparser} is a backport of
11551@code{configparser} from Python 3.5 so that it can be used directly
11552in other versions.")
11553 (license license:expat)))
11554
11555(define-public python2-configparser
11556 (package-with-python2 python-configparser))
11557
11558(define-public python-mando
11559 (package
11560 (name "python-mando")
11561 (version "0.6.4")
11562 (source (origin
11563 (method url-fetch)
11564 (uri (pypi-uri "mando" version))
11565 (sha256
11566 (base32
11567 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
11568 (build-system python-build-system)
11569 (propagated-inputs
11570 `(("python-rst2ansi" ,python-rst2ansi)
11571 ("python-six" ,python-six)))
11572 (native-inputs
11573 `(("python-pytest" ,python-pytest)))
11574 (home-page "https://mando.readthedocs.org/")
11575 (synopsis
11576 "Wrapper around argparse, allowing creation of complete CLI applications")
11577 (description
11578 "This package is a wrapper around argparse, allowing you to write complete CLI
11579applications in seconds while maintaining all the flexibility.")
11580 (license license:expat)))
11581
11582(define-public python2-mando
11583 (package-with-python2 python-mando))
11584
11585(define-public python-fudge
11586 (package
11587 (name "python-fudge")
11588 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
11589 ;; package, which is currently the only use of this package.
11590 (version "0.9.6")
11591 (source
11592 (origin
11593 (method url-fetch)
11594 (uri (pypi-uri "fudge" version))
11595 (sha256
11596 (base32
11597 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
11598 (build-system python-build-system)
11599 (arguments
11600 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
11601 (home-page "https://github.com/fudge-py/fudge")
11602 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
11603 (description
11604 "Fudge is a Python module for using fake objects (mocks and stubs) to
11605test real ones.
11606
11607In readable Python code, you declare the methods available on your fake object
11608and how they should be called. Then you inject that into your application and
11609start testing. This declarative approach means you don’t have to record and
11610playback actions and you don’t have to inspect your fakes after running code.
11611If the fake object was used incorrectly then you’ll see an informative
11612exception message with a traceback that points to the culprit.")
11613 (license license:expat)))
11614
11615(define-public python2-fudge
11616 (package-with-python2 python-fudge))
11617
11618(define-public python-mwclient
11619 (package
11620 (name "python-mwclient")
11621 (version "0.8.4")
11622 (source
11623 (origin
11624 (method url-fetch)
11625 ;; The PyPI version wouldn't contain tests.
11626 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
11627 "v" version ".tar.gz"))
11628 (file-name (string-append name "-" version ".tar.gz"))
11629 (sha256
11630 (base32
11631 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
11632 (build-system python-build-system)
11633 (propagated-inputs
11634 `(("python-requests" ,python-requests)
11635 ("python-requests-oauthlib"
11636 ,python-requests-oauthlib)
11637 ("python-six" ,python-six)))
11638 (native-inputs
11639 `(("python-mock" ,python-mock)
11640 ("python-pytest" ,python-pytest)
11641 ("python-pytest-pep8" ,python-pytest-pep8)
11642 ("python-pytest-cache" ,python-pytest-cache)
11643 ("python-pytest-cov" ,python-pytest-cov)
11644 ("python-responses" ,python-responses)))
11645 (home-page "https://github.com/btongminh/mwclient")
11646 (synopsis "MediaWiki API client")
11647 (description "This package provides a MediaWiki API client.")
11648 (license license:expat)))
11649
11650(define-public python2-mwclient
11651 (package-with-python2 python-mwclient))
11652
11653(define-public python-utils
11654 (package
11655 (name "python-utils")
11656 (version "2.1.0")
11657 (source (origin
11658 (method url-fetch)
11659 (uri (pypi-uri "python-utils" version))
11660 (sha256
11661 (base32
11662 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
11663 (build-system python-build-system)
11664 (native-inputs
11665 `(("pytest-runner" ,python-pytest-runner)
11666 ("pytest" ,python-pytest)
11667 ("six" ,python-six)))
11668 (home-page "https://github.com/WoLpH/python-utils")
11669 (synopsis "Convenient utilities not included with the standard Python install")
11670 (description
11671 "Python Utils is a collection of small Python functions and classes which
11672make common patterns shorter and easier.")
11673 (license license:bsd-2)))
11674
11675(define-public python2-utils
11676 (package-with-python2 python-utils))
11677
11678(define-public python-sphinx-me
11679 (package
11680 (name "python-sphinx-me")
11681 (version "0.3")
11682 (source
11683 (origin
11684 (method url-fetch)
11685 (uri (pypi-uri "sphinx-me" version))
11686 (sha256
11687 (base32
11688 "06jzgp213zihnvpcy2y5jy3ykid3apc2ncp2pg6a2g05lhiziglq"))))
11689 (build-system python-build-system)
11690 (home-page "https://github.com/stephenmcd/sphinx-me")
11691 (synopsis "Create a Sphinx documentation shell")
11692 (description
11693 "Create a Sphinx documentation shell for your project and include the
11694README file as the documentation index. It handles extracting the required
11695meta data such as the project name, author and version from your project for
11696use in your Sphinx docs.")
11697 (license license:bsd-2)))
11698
11699(define-public python2-sphinx-me
11700 (package-with-python2 python-sphinx-me))
11701
11702(define-public python-diff-match-patch
11703 (package
11704 (name "python-diff-match-patch")
11705 (version "20121119")
11706 (source
11707 (origin
11708 (method url-fetch)
11709 (uri (pypi-uri "diff-match-patch" version))
11710 (sha256
11711 (base32
11712 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
11713 (build-system python-build-system)
11714 (home-page "https://code.google.com/p/google-diff-match-patch")
11715 (synopsis "Synchronize plain text")
11716 (description "Diff Match and Patch libraries offer robust algorithms to
11717perform the operations required for synchronizing plain text.")
11718 (license license:asl2.0)))
11719
11720(define-public python2-diff-match-patch
11721 (package-with-python2 python-diff-match-patch))
11722
11723(define-public python-dirsync
11724 (package
11725 (name "python-dirsync")
11726 (version "2.2.3")
11727 (source
11728 (origin
11729 (method url-fetch)
11730 (uri (pypi-uri "dirsync" version))
11731 (sha256
11732 (base32
11733 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
11734 (build-system python-build-system)
11735 (propagated-inputs
11736 `(("six" ,python-six)))
11737 (home-page "https://bitbucket.org/tkhyn/dirsync")
11738 (synopsis "Advanced directory tree synchronisation tool")
11739 (description "Advanced directory tree synchronisation tool.")
11740 (license license:expat)))
11741
11742(define-public python2-dirsync
11743 (package-with-python2 python-dirsync))
11744
11745(define-public python-levenshtein
11746 (package
11747 (name "python-levenshtein")
11748 (version "0.12.0")
11749 (source
11750 (origin
11751 (method url-fetch)
11752 (uri (pypi-uri "python-Levenshtein" version))
11753 (sha256
11754 (base32
11755 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
11756 (build-system python-build-system)
11757 (home-page "https://github.com/ztane/python-Levenshtein")
11758 (synopsis "Fast computation of Levenshtein distance and string similarity")
11759 (description
11760 "The Levenshtein Python C extension module contains functions for fast computation of
11761@enumerate
11762@item Levenshtein (edit) distance, and edit operations
11763@item string similarity
11764@item approximate median strings, and generally string averaging
11765@item string sequence and set similarity
11766@end enumerate
11767It supports both normal and Unicode strings.")
11768 (license license:gpl2+)))
11769
11770(define-public python2-levenshtein
11771 (package-with-python2 python-levenshtein))
11772
11773(define-public python-scandir
11774 (package
11775 (name "python-scandir")
11776 (version "1.9.0")
11777 (source
11778 (origin
11779 (method url-fetch)
11780 (uri (pypi-uri "scandir" version))
11781 (sha256
11782 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
11783 (build-system python-build-system)
11784 (arguments
11785 `(#:phases (modify-phases %standard-phases
11786 (replace 'check
11787 (lambda _
11788 (invoke "python" "test/run_tests.py"))))))
11789 (home-page "https://github.com/benhoyt/scandir")
11790 (synopsis "Directory iteration function")
11791 (description
11792 "Directory iteration function like os.listdir(), except that instead of
11793returning a list of bare filenames, it yields DirEntry objects that include
11794file type and stat information along with the name. Using scandir() increases
11795the speed of os.walk() by 2-20 times (depending on the platform and file
11796system) by avoiding unnecessary calls to os.stat() in most cases.
11797
11798This package is part of the Python standard library since version 3.5.")
11799 (license license:bsd-3)))
11800
11801(define-public python2-scandir
11802 (package-with-python2 python-scandir))
11803
11804(define-public python2-stemming
11805 (package
11806 (name "python2-stemming")
11807 (version "1.0.1")
11808 (source
11809 (origin
11810 (method url-fetch)
11811 (uri (pypi-uri "stemming" version))
11812 (sha256
11813 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
11814 (build-system python-build-system)
11815 (arguments
11816 `(#:python ,python-2))
11817 (home-page "https://bitbucket.org/mchaput/stemming/overview")
11818 (synopsis "Python implementations of various stemming algorithms")
11819 (description
11820 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
11821stemming algorithms for English. These implementations are straightforward and
11822efficient, unlike some Python versions of the same algorithms available on the
11823Web. This package is an extraction of the stemming code included in the Whoosh
11824search engine.")
11825 (license license:public-domain)))
11826
11827(define-public python-factory-boy
11828 (package
11829 (name "python-factory-boy")
11830 (version "2.8.1")
11831 (source
11832 (origin
11833 (method url-fetch)
11834 (uri (pypi-uri "factory_boy" version))
11835 (sha256
11836 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
11837 (build-system python-build-system)
11838 (arguments
11839 ;; Tests are not included in the tarball.
11840 `(#:tests? #f))
11841 (propagated-inputs
11842 `(("faker" ,python-faker)))
11843 (home-page "https://github.com/benhoyt/scandir")
11844 (synopsis "Versatile test fixtures replacement")
11845 (description
11846 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
11847
11848As a fixtures replacement tool, it aims to replace static, hard to maintain
11849fixtures with easy-to-use factories for complex object.
11850
11851Instead of building an exhaustive test setup with every possible combination
11852of corner cases, factory_boy allows you to use objects customized for the
11853current test, while only declaring the test-specific fields")
11854 (license license:expat)))
11855
11856(define-public python2-factory-boy
11857 (package-with-python2 python-factory-boy))
11858
11859(define-public python-translate-toolkit
11860 (package
11861 (name "python-translate-toolkit")
11862 (version "2.1.0")
11863 (source
11864 (origin
11865 (method url-fetch)
11866 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
11867 (sha256
11868 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
11869 (build-system python-build-system)
11870 (native-inputs
11871 `(("python-pytest" ,python-pytest)
11872 ("python-sphinx" ,python-sphinx)))
11873 (propagated-inputs
11874 `(("python-babel" ,python-babel)
11875 ("python-beautifulsoup4" ,python-beautifulsoup4)
11876 ("python-chardet" ,python-chardet)
11877 ("python-diff-match-patch" ,python-diff-match-patch)
11878 ("python-levenshtein" ,python-levenshtein)
11879 ("python-lxml" ,python-lxml)
11880 ("python-six" ,python-six)
11881 ("python-vobject" ,python-vobject)
11882 ("python-pyyaml" ,python-pyyaml)))
11883 (arguments
11884 ;; TODO: tests are not run, because they end with
11885 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
11886 ;; 'parse_funcs'
11887 ;; during test setup.
11888 `(#:tests? #f))
11889 (home-page "http://toolkit.translatehouse.org")
11890 (synopsis "Tools and API for translation and localization engineering")
11891 (description
11892 "Tools and API for translation and localization engineering. It contains
11893several utilities, as well as an API for building localization tools.")
11894 (license license:gpl2+)))
11895
11896(define-public python2-translate-toolkit
11897 (package-with-python2 python-translate-toolkit))
11898
11899(define-public python-packaging
11900 (package
11901 (name "python-packaging")
94295903 11902 (version "19.0")
44d10b1f
RW
11903 (source
11904 (origin
11905 (method url-fetch)
11906 (uri (pypi-uri "packaging" version))
11907 (sha256
11908 (base32
94295903 11909 "1brjhygq9dz6x1kdljivkjfldi3qf5rbkqgck1bpgv9qpv8ab60c"))))
44d10b1f
RW
11910 (build-system python-build-system)
11911 (arguments
11912 `(#:phases (modify-phases %standard-phases
11913 (replace 'check
11914 (lambda _ (invoke "py.test" "-vv"))))))
11915 (native-inputs
11916 `(("python-pretend" ,python-pretend)
11917 ("python-pytest" ,python-pytest)))
11918 (propagated-inputs
11919 `(("python-pyparsing" ,python-pyparsing)
11920 ("python-six" ,python-six)))
11921 (home-page "https://github.com/pypa/packaging")
11922 (synopsis "Core utilities for Python packages")
11923 (description "Packaging is a Python module for dealing with Python packages.
11924It offers an interface for working with package versions, names, and dependency
11925information.")
11926 ;; From 'LICENSE': This software is made available under the terms of
11927 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
11928 ;; Contributions to this software is made under the terms of *both* these
11929 ;; licenses.
11930 (license (list license:asl2.0 license:bsd-2))))
11931
11932(define-public python2-packaging
11933 (package-with-python2 python-packaging))
11934
11935(define-public python-relatorio
11936 (package
11937 (name "python-relatorio")
11938 (version "0.8.0")
11939 (source
11940 (origin
11941 (method url-fetch)
11942 (uri (pypi-uri "relatorio" version))
11943 (sha256
11944 (base32
11945 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
11946 (build-system python-build-system)
11947 (propagated-inputs
11948 `(("python-lxml" ,python-lxml)
11949 ("python-genshi" ,python-genshi)))
11950 (native-inputs
11951 `(("python-magic" ,python-magic)))
11952 (home-page "https://relatorio.tryton.org/")
11953 (synopsis "Templating library able to output ODT and PDF files")
11954 (description "Relatorio is a templating library which provides a way to
11955easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
11956for more filetypes can be easily added by creating plugins for them.")
11957 (license license:gpl3+)))
11958
11959(define-public python2-relatorio
11960 (package-with-python2 python-relatorio))
11961
11962(define-public python-radon
11963 (package
11964 (name "python-radon")
11965 (version "2.2.0")
11966 (source
11967 (origin
11968 (method url-fetch)
11969 (uri (pypi-uri "radon" version))
11970 (sha256
11971 (base32
11972 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
11973 (build-system python-build-system)
11974 (arguments
11975 `(#:phases (modify-phases %standard-phases
11976 (replace 'check
11977 (lambda _
11978 (invoke "python" "radon/tests/run.py"))))))
11979 (propagated-inputs
11980 `(("python-colorama" ,python-colorama)
11981 ("python-flake8-polyfill" ,python-flake8-polyfill)
11982 ("python-mando" ,python-mando)))
11983 (native-inputs
11984 `(("python-pytest" ,python-pytest)
11985 ("python-pytest-mock" ,python-pytest-mock)))
11986 (home-page "https://radon.readthedocs.org/")
11987 (synopsis "Code Metrics in Python")
11988 (description "Radon is a Python tool which computes various code metrics.
11989Supported metrics are:
11990@itemize @bullet
11991@item raw metrics: SLOC, comment lines, blank lines, &c.
11992@item Cyclomatic Complexity (i.e. McCabe’s Complexity)
11993@item Halstead metrics (all of them)
11994@item the Maintainability Index (a Visual Studio metric)
11995@end itemize")
11996 (license license:expat)))
11997
11998(define-public python2-radon
11999 (package-with-python2 python-radon))
12000
12001(define-public python-sure
12002 (package
12003 (name "python-sure")
12004 (version "1.4.11")
12005 (source
12006 (origin
12007 (method url-fetch)
12008 (uri (pypi-uri "sure" version))
12009 (sha256
12010 (base32
12011 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
12012 (build-system python-build-system)
12013 (propagated-inputs
12014 `(("python-mock" ,python-mock)
12015 ("python-six" ,python-six)))
12016 (native-inputs
12017 `(("python-nose" ,python-nose)))
12018 (home-page "https://github.com/gabrielfalcao/sure")
12019 (synopsis "Automated testing library in python for python")
12020 (description
12021 "Sure is a python library that leverages a DSL for writing assertions.
12022Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
12023 (license license:gpl3+)))
12024
12025(define-public python2-sure
12026 (package-with-python2 python-sure))
12027
12028(define-public python2-couleur
12029 ;; This package does not seem to support python3 at all, hence,
12030 ;; only the python2 variant definition is provided.
12031 (package
12032 (name "python2-couleur")
12033 (version "0.6.2")
12034 (source
12035 (origin
12036 (method url-fetch)
12037 (uri (pypi-uri "couleur" version))
12038 (sha256
12039 (base32
12040 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
12041 (build-system python-build-system)
12042 (arguments
12043 `(#:python ,python-2))
12044 (home-page "https://github.com/gabrielfalcao/couleur")
12045 (synopsis
12046 "ANSI terminal tool for python, colored shell and other handy fancy features")
12047 (description
12048 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
12049terminal such as coloured output in the shell, overwriting output, indentation, etc.")
12050 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
12051 ;; https://github.com/gabrielfalcao/couleur/issues/11
12052 (license license:lgpl3+)))
12053
12054(define-public python-misaka
12055 (package
12056 (name "python-misaka")
0dcb3412 12057 (version "2.1.1")
44d10b1f
RW
12058 (source
12059 (origin
12060 (method url-fetch)
12061 (uri (pypi-uri "misaka" version))
12062 (sha256
12063 (base32
0dcb3412 12064 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
44d10b1f
RW
12065 (build-system python-build-system)
12066 (arguments
12067 `(;; Line 37 of setup.py calls self.run_command('develop')
12068 ;; in the 'check' phase. This command seems to be trying
12069 ;; to write to
12070 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
12071 ;; for which it does not have the permission to write.
12072 #:tests? #f))
12073 (propagated-inputs
12074 `(("python-cffi" ,python-cffi)))
12075 (home-page "https://github.com/FSX/misaka")
12076 (synopsis "Python binding for Hoedown")
12077 (description
12078 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
12079library written in C. It features a fast HTML renderer and functionality to make custom
12080renderers (e.g. man pages or LaTeX).")
12081 (license license:expat)))
12082
12083(define-public python2-misaka
12084 (package-with-python2 python-misaka))
12085
12086(define-public python2-steadymark
12087 ;; This is forced into being a python2 only variant
12088 ;; due to its dependence on couleur that has no support
12089 ;; for python3
12090 (package
12091 (name "python2-steadymark")
12092 (version "0.7.3")
12093 (source
12094 (origin
12095 (method url-fetch)
12096 (uri (pypi-uri "steadymark" version))
12097 (sha256
12098 (base32
12099 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
12100 (build-system python-build-system)
12101 (native-inputs
12102 `(("python-couleur" ,python2-couleur)
12103 ("python-sure" ,python2-sure)
12104 ("python-misaka" ,python2-misaka)))
12105 (arguments
12106 `(#:python ,python-2
12107 #:phases
12108 (modify-phases %standard-phases
12109 (add-before 'build 'patch-setup-py
12110 (lambda _
12111 ;; Update requirements from dependency==version
12112 ;; to dependency>=version
12113 (substitute* "setup.py"
12114 (("==") ">="))
12115 #t)))))
12116 (home-page "https://github.com/gabrielfalcao/steadymark")
12117 (synopsis "Markdown-based test runner for python")
12118 (description
12119 "@code{Steadymark} allows documentation to be written in github-flavoured
12120markdown. The documentation may contain snippets of code surrounded by python
12121code blocks and @code{Steadymark} will find these snippets and run them, making
12122sure that there are no old malfunctional examples in the documentation examples.")
12123 (license license:expat)))
12124
12125(define-public python-jsonpointer
12126 (package
12127 (name "python-jsonpointer")
12128 (version "1.10")
12129 (source
12130 (origin
12131 (method url-fetch)
12132 (uri (pypi-uri "jsonpointer" version))
12133 (sha256
12134 (base32
12135 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
12136 (build-system python-build-system)
12137 (home-page "https://github.com/stefankoegl/python-json-pointer")
12138 (synopsis "Identify specific nodes in a JSON document")
12139 (description "@code{jsonpointer} allows you to access specific nodes
12140by path in a JSON document (see RFC 6901).")
12141 (license license:bsd-3)))
12142
12143(define-public python2-jsonpointer
12144 (package-with-python2 python-jsonpointer))
12145
12146(define-public python-jsonpatch
12147 (package
12148 (name "python-jsonpatch")
12149 (version "1.16")
12150 (source
12151 (origin
12152 (method url-fetch)
12153 ;; pypi version lacks tests.js
12154 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12155 "archive/v" version ".tar.gz"))
12156 (file-name (string-append name "-" version ".tar.gz"))
12157 (sha256
12158 (base32
12159 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
12160 (build-system python-build-system)
12161 (native-inputs
12162 `(("python-jsonpointer" ,python-jsonpointer)))
12163 (home-page "https://github.com/stefankoegl/python-json-patch")
12164 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
12165 (description "@code{jsonpatch} is a library and program that allows
12166applying JSON Patches according to RFC 6902.")
12167 (license license:bsd-3)))
12168
12169(define-public python2-jsonpatch
12170 (package-with-python2 python-jsonpatch))
12171
12172(define-public python-jsonpatch-0.4
12173 (package (inherit python-jsonpatch)
12174 (name "python-jsonpatch")
12175 (version "0.4")
12176 (source
12177 (origin
12178 (method url-fetch)
12179 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12180 "archive/v" version ".tar.gz"))
12181 (file-name (string-append name "-" version ".tar.gz"))
12182 (sha256
12183 (base32
12184 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
12185
12186(define-public python2-jsonpatch-0.4
12187 (package-with-python2 python-jsonpatch-0.4))
12188
12189(define-public python-rfc3986
12190 (package
12191 (name "python-rfc3986")
12192 (version "1.1.0")
12193 (source (origin
12194 (method url-fetch)
12195 (uri (pypi-uri "rfc3986" version))
12196 (sha256
12197 (base32
12198 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
12199 (build-system python-build-system)
12200 (arguments
12201 `(#:modules ((guix build utils)
12202 (guix build python-build-system)
12203 (ice-9 ftw)
12204 (srfi srfi-1)
12205 (srfi srfi-26))
12206 #:phases
12207 (modify-phases %standard-phases
12208 (replace 'check
12209 (lambda _
12210 (let ((cwd (getcwd)))
12211 (setenv "PYTHONPATH"
12212 (string-append cwd "/build/"
12213 (find (cut string-prefix? "lib" <>)
12214 (scandir (string-append cwd "/build")))
12215 ":"
12216 (getenv "PYTHONPATH")))
12217 (invoke "pytest" "-v")))))))
12218 (native-inputs
12219 `(("python-pytest" ,python-pytest)))
12220 (home-page "https://rfc3986.readthedocs.io/")
12221 (synopsis "Parse and validate URI references")
12222 (description
12223 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
12224validation and authority parsing. This module also supports RFC@tie{}6874
12225which adds support for zone identifiers to IPv6 addresses.")
12226 (license license:asl2.0)))
12227
12228(define-public python2-rfc3986
12229 (package-with-python2 python-rfc3986))
12230
12231(define-public python-rfc3987
12232 (package
12233 (name "python-rfc3987")
12234 (version "1.3.7")
12235 (source
12236 (origin
12237 (method url-fetch)
12238 (uri (pypi-uri "rfc3987" version))
12239 (sha256
12240 (base32
12241 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
12242 (build-system python-build-system)
12243 (home-page "https://pypi.python.org/pypi/rfc3987")
12244 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
12245 (description "@code{rfc3987} provides routines for parsing and
12246validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
12247 (license license:gpl3+)))
12248
12249(define-public python2-rfc3987
12250 (package-with-python2 python-rfc3987))
12251
12252(define-public python-validate-email
12253 (package
12254 (name "python-validate-email")
12255 (version "1.3")
12256 (source
12257 (origin
12258 (method url-fetch)
12259 (uri (pypi-uri "validate_email" version))
12260 (sha256
12261 (base32
12262 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
12263 (build-system python-build-system)
12264 (home-page "https://github.com/syrusakbary/validate_email")
12265 (synopsis "Verifies if an email address is valid and really exists")
12266 (description "@code{validate_email} can be used to verify if an email
12267address is valid and really exists.")
12268 (license license:lgpl3+)))
12269
12270(define-public python2-validate-email
12271 (package-with-python2 python-validate-email))
12272
12273(define-public python-flex
12274 (package
12275 (name "python-flex")
12276 (version "6.10.0")
12277 (source
12278 (origin
12279 (method url-fetch)
12280 (uri (pypi-uri "flex" version))
12281 (sha256
12282 (base32
12283 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
12284 (build-system python-build-system)
12285 (propagated-inputs
12286 `(("python-click" ,python-click)
12287 ("python-iso8601" ,python-iso8601)
12288 ("python-jsonpointer" ,python-jsonpointer)
12289 ("python-pyyaml" ,python-pyyaml)
12290 ("python-requests" ,python-requests)
12291 ("python-rfc3987" ,python-rfc3987)
12292 ("python-six" ,python-six)
12293 ("python-validate-email" ,python-validate-email)))
12294 (home-page "https://github.com/pipermerriam/flex")
12295 (synopsis "Validates Swagger schemata")
12296 (description "@code{flex} can be used to validate Swagger schemata.")
12297 (license license:bsd-3)))
12298
12299(define-public python2-flex
12300 (package-with-python2 python-flex))
12301
12302(define-public python-marshmallow
12303 (package
12304 (name "python-marshmallow")
12305 (version "3.0.0b14")
12306 (source
12307 (origin
12308 (method url-fetch)
12309 (uri (pypi-uri "marshmallow" version))
12310 (sha256
12311 (base32
12312 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
12313 (build-system python-build-system)
12314 (propagated-inputs
12315 `(("python-dateutil" ,python-dateutil)
12316 ("python-simplejson" ,python-simplejson)))
12317 (native-inputs
12318 `(("python-pytest" ,python-pytest)
12319 ("python-pytz" ,python-pytz)))
12320 (home-page "https://github.com/marshmallow-code/marshmallow")
12321 (synopsis "Convert complex datatypes to and from native
12322Python datatypes.")
12323 (description "@code{marshmallow} provides a library for converting
12324complex datatypes to and from native Python datatypes.")
12325 (license license:expat)))
12326
12327(define-public python2-marshmallow
12328 (package-with-python2 python-marshmallow))
12329
12330(define-public python-apispec
12331 (package
12332 (name "python-apispec")
12333 (version "0.25.3")
12334 (source
12335 (origin
12336 (method url-fetch)
12337 (uri (pypi-uri "apispec" version))
12338 (sha256
12339 (base32
12340 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
12341 (build-system python-build-system)
12342 (propagated-inputs
12343 `(("python-pyyaml" ,python-pyyaml)))
12344 (native-inputs
12345 `(("python-pytest" ,python-pytest)
12346 ("python-flask" ,python-flask)
12347 ("python-marshmallow" ,python-marshmallow)
12348 ("python-tornado" ,python-tornado)
12349 ("python-bottle" ,python-bottle)
12350 ("python-mock" ,python-mock)))
12351 (home-page "https://github.com/marshmallow-code/apispec")
12352 (synopsis "Swagger 2.0 API specification generator")
12353 (description "@code{python-apispec} is a pluggable API specification
12354generator. Currently supports the OpenAPI specification (f.k.a.
12355Swagger 2.0).")
12356 (license license:expat)))
12357
12358(define-public python2-apispec
12359 (package-with-python2 python-apispec))
12360
12361(define-public python-flasgger
12362 (package
12363 (name "python-flasgger")
12364 (version "0.6.3")
12365 (source
12366 (origin
12367 (method url-fetch)
12368 (uri (string-append "https://github.com/rochacbruno/flasgger/archive/"
12369 version ".tar.gz"))
12370 (file-name (string-append name "-" version ".tar.gz"))
12371 (sha256
12372 (base32
12373 "1gqzlm0rb55fdpsy5ipkganlx9cnpi454fqyycr03jm22zql14ay"))))
12374 (build-system python-build-system)
12375 (arguments
12376 `(#:phases
12377 (modify-phases %standard-phases
12378 (replace 'check
12379 (lambda* (#:key inputs outputs #:allow-other-keys)
12380 (substitute* "Makefile"
12381 (("flake8 flasgger --ignore=F403")
12382 "flake8 flasgger --ignore=E731,F403"))
12383 (setenv "PYTHONPATH" (string-append (getcwd)
12384 ":"
12385 (getenv "PYTHONPATH")))
ac599a09 12386 (invoke "py.test"))))))
44d10b1f
RW
12387 (propagated-inputs
12388 `(("python-flask" ,python-flask)
12389 ("python-pyyaml" ,python-pyyaml)
12390 ("python-jsonschema" ,python-jsonschema)
12391 ("python-mistune" ,python-mistune)
12392 ("python-six" ,python-six)))
12393 (native-inputs
12394 `(("python-decorator" ,python-decorator)
12395 ("python-flake8" ,python-flake8)
12396 ("python-flask-restful" ,python-flask-restful)
12397 ("python-flex" ,python-flex)
12398 ("python-pytest" ,python-pytest)
12399 ("python-pytest-cov" ,python-pytest-cov)
12400 ("python-marshmallow" ,python-marshmallow)
12401 ("python-apispec" ,python-apispec)))
12402 (home-page "https://github.com/rochacbruno/flasgger/")
12403 (synopsis "Extract Swagger specs from your Flask project")
12404 (description "@code{python-flasgger} allows extracting Swagger specs
12405from your Flask project. It is a fork of Flask-Swagger.")
12406 (license license:expat)))
12407
12408(define-public python2-flasgger
12409 (package-with-python2 python-flasgger))
12410
12411(define-public python-swagger-spec-validator
12412 (package
12413 (name "python-swagger-spec-validator")
12414 (version "2.1.0")
12415 (source
12416 (origin
12417 (method url-fetch)
12418 (uri (pypi-uri "swagger-spec-validator" version))
12419 (sha256
12420 (base32
12421 "13hkpn2lycwr0468yqhjb3kwszqf7hjwlq61w7vdxq1caz31k4nw"))))
12422 (build-system python-build-system)
12423 (propagated-inputs
12424 `(("python-jsonschema" ,python-jsonschema)
12425 ("python-six" ,python-six)))
12426 (home-page
12427 "https://github.com/Yelp/swagger_spec_validator")
12428 (synopsis "Validation of Swagger specifications")
12429 (description "@code{swagger_spec_validator} provides a library for
12430validating Swagger API specifications.")
12431 (license license:asl2.0)))
12432
12433(define-public python2-swagger-spec-validator
12434 (package-with-python2 python-swagger-spec-validator))
12435
12436(define-public python-apache-libcloud
12437 (package
12438 (name "python-apache-libcloud")
12439 (version "2.4.0")
12440 (source
12441 (origin
12442 (method url-fetch)
12443 (uri (pypi-uri "apache-libcloud" version))
12444 (sha256
12445 (base32
12446 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
12447 (build-system python-build-system)
12448 (arguments
12449 `(#:phases
12450 (modify-phases %standard-phases
12451 (add-after 'unpack 'patch-ssh
12452 (lambda* (#:key inputs #:allow-other-keys)
12453 (substitute* "libcloud/compute/ssh.py"
12454 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
12455 "/bin/ssh" "'")))
12456 #t))
12457 (add-after 'unpack 'patch-tests
12458 (lambda _
12459 (substitute* "./libcloud/test/test_file_fixtures.py"
12460 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
12461 (("def _ascii") "def _raw_data(self, method, url, body, headers):
12462 return (httplib.OK,
12463 \"1234abcd\",
12464 {\"test\": \"value\"},
12465 httplib.responses[httplib.OK])
12466 def _ascii"))
12467 (substitute* "libcloud/test/compute/test_ssh_client.py"
12468 (("class ShellOutSSHClientTests")
12469 "@unittest.skip(\"Guix container doesn't have ssh service\")
12470class ShellOutSSHClientTests")
12471 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
12472 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
12473 (("'.xF0', '.x90', '.x8D', '.x88'")
12474 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
12475 #t))
12476 (add-before 'check 'copy-secret
12477 (lambda _
12478 (copy-file "libcloud/test/secrets.py-dist"
12479 "libcloud/test/secrets.py")
12480 #t)))))
12481 (inputs
12482 `(("openssh" ,openssh)))
12483 (propagated-inputs
12484 `(("python-paramiko" ,python-paramiko)
12485 ("python-requests" ,python-requests)))
12486 (native-inputs
12487 `(("python-lockfile" ,python-lockfile)
12488 ("python-mock" ,python-mock)
12489 ("python-pytest" ,python-pytest)
12490 ("python-pytest-runner" ,python-pytest-runner)
12491 ("python-requests-mock" ,python-requests-mock)))
12492 (home-page "https://libcloud.apache.org/")
12493 (synopsis "Unified Cloud API")
12494 (description "@code{libcloud} is a Python library for interacting with
12495many of the popular cloud service providers using a unified API.")
12496 (license license:asl2.0)))
12497
12498(define-public python2-apache-libcloud
12499 (package-with-python2 python-apache-libcloud))
12500
12501(define-public python-smmap2
12502 (package
12503 (name "python-smmap2")
12504 (version "2.0.3")
12505 (source
12506 (origin
12507 (method url-fetch)
12508 (uri (pypi-uri "smmap2" version))
12509 (sha256
12510 (base32
12511 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
12512 (build-system python-build-system)
12513 (native-inputs
12514 `(("python-nosexcover" ,python-nosexcover)))
12515 (home-page "https://github.com/Byron/smmap")
12516 (synopsis "Python sliding window memory map manager")
12517 (description "@code{smmap2} is a pure Python implementation of a sliding
12518window memory map manager.")
12519 (license license:bsd-3)))
12520
12521(define-public python2-smmap2
12522 (package-with-python2 python-smmap2))
12523
12524(define-public python-regex
12525 (package
12526 (name "python-regex")
12527 (version "2017.06.07")
12528 (source (origin
12529 (method url-fetch)
12530 (uri (pypi-uri "regex" version))
12531 (sha256
12532 (base32
12533 "06r6b7yigikbj3a72whl85r2b64pj1r0ypmw9yalmkm0wnxq8mz4"))))
12534 (build-system python-build-system)
12535 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
12536 (synopsis "Alternative regular expression module")
12537 (description "This regular expression implementation is backwards-
12538compatible with the standard @code{re} module, but offers additional
12539functionality like full case-folding for case-insensitive matches in Unicode.")
12540 (license license:psfl)))
12541
12542(define-public python2-regex
12543 (package-with-python2 python-regex))
12544
12545(define-public python2-pyopengl
12546 (package
12547 (name "python2-pyopengl")
12548 (version "3.1.0")
12549 (source
12550 (origin
12551 (method url-fetch)
12552 (uri (pypi-uri "PyOpenGL" version))
12553 (sha256
12554 (base32
12555 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
12556 (arguments
12557 `(#:python ,python-2))
12558 (build-system python-build-system)
12559 (home-page "http://pyopengl.sourceforge.net")
12560 (synopsis "Standard OpenGL bindings for Python")
12561 (description
12562 "PyOpenGL is the most common cross platform Python binding to OpenGL and
12563related APIs. The binding is created using the standard @code{ctypes}
12564library.")
12565 (license license:bsd-3)))
12566
12567(define-public python2-pyopengl-accelerate
12568 (package
12569 (inherit python2-pyopengl)
12570 (name "python2-pyopengl-accelerate")
12571 (version "3.1.0")
12572 (source
12573 (origin
12574 (method url-fetch)
12575 (uri (pypi-uri "PyOpenGL-accelerate" version))
12576 (sha256
12577 (base32
12578 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
12579 (synopsis "Acceleration code for PyOpenGL")
12580 (description
12581 "This is the Cython-coded accelerator module for PyOpenGL.")))
12582
12583(define-public python-rencode
12584 (package
12585 (name "python-rencode")
12586 (version "1.0.5")
12587 (source
12588 (origin
12589 (method url-fetch)
12590 (uri (pypi-uri "rencode" version))
12591 (sha256
12592 (base32
12593 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
12594 (build-system python-build-system)
12595 (arguments
12596 `(#:phases
12597 (modify-phases %standard-phases
12598 (add-before 'check 'delete-bogus-test
12599 ;; This test requires /home/aresch/Downloads, which is not provided by
12600 ;; the build environment.
12601 (lambda _
12602 (delete-file "rencode/t.py")
12603 #t)))))
12604 (native-inputs `(("pkg-config" ,pkg-config)
12605 ("python-cython" ,python-cython)))
12606 (home-page "https://github.com/aresch/rencode")
12607 (synopsis "Serialization of heterogeneous data structures")
12608 (description
12609 "The @code{rencode} module is a data structure serialization library,
12610similar to @code{bencode} from the BitTorrent project. For complex,
12611heterogeneous data structures with many small elements, r-encoding stake up
12612significantly less space than b-encodings. This version of rencode is a
12613complete rewrite in Cython to attempt to increase the performance over the
12614pure Python module.")
12615 (license license:bsd-3)))
12616
12617(define-public python2-rencode
12618 (package-with-python2 python-rencode))
12619
12620(define-public python-xenon
12621 (package
12622 (name "python-xenon")
12623 (version "0.5.4")
12624 (source
12625 (origin
12626 (method url-fetch)
12627 (uri (pypi-uri "xenon" version))
12628 (sha256
12629 (base32
12630 "029cbhysg2vr5n4jz8gpg2793f8wkwnqpr1qgv6c1dn685vy31mc"))))
12631 (build-system python-build-system)
12632 (native-inputs
12633 `(("python-pyyaml" ,python-pyyaml)
12634 ("python-radon" ,python-radon)
12635 ("python-requests" ,python-requests)
12636 ("python-flake8" ,python-flake8)
12637 ("python-tox" ,python-tox)))
12638 (arguments
12639 `(#:phases
12640 (modify-phases %standard-phases
12641 (add-before 'build 'patch-test-requirements
12642 (lambda _
12643 ;; Remove httpretty dependency for tests.
12644 (substitute* "setup.py"
12645 (("httpretty") ""))
12646 #t)))))
12647 (home-page "https://xenon.readthedocs.org/")
12648 (synopsis "Monitor code metrics for Python on your CI server")
12649 (description
12650 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
12651Ideally, @code{xenon} is run every time code is committed. Through command
12652line options, various thresholds can be set for the complexity of code. It
12653will fail (i.e. it will exit with a non-zero exit code) when any of these
12654requirements is not met.")
12655 (license license:expat)))
12656
12657(define-public python2-xenon
12658 (package-with-python2 python-xenon))
12659
12660(define-public python-pysocks
12661 (package
12662 (name "python-pysocks")
12663 (version "1.6.8")
12664 (source
12665 (origin
12666 (method url-fetch)
12667 (uri (pypi-uri "PySocks" version))
12668 (sha256
12669 (base32
12670 "0wn6xafwy9c1gamwljw3fyvih5w19qy9xp39zmv8c90ai5ajrr9z"))))
12671 (build-system python-build-system)
12672 (arguments `(#:tests? #f))
12673 (home-page "https://github.com/Anorov/PySocks")
12674 (synopsis "SOCKS client module")
12675 (description "@code{pysocks} is an updated and semi-actively maintained
12676version of @code{SocksiPy} with bug fixes and extra features.")
12677 (license license:bsd-3)))
12678
12679(define-public python2-pysocks
12680 (package-with-python2 python-pysocks))
12681
12682(define-public python-pydiff
12683 (package
12684 (name "python-pydiff")
12685 (version "0.2")
12686 (source
12687 (origin
12688 (method url-fetch)
12689 (uri (pypi-uri "pydiff" version))
12690 (sha256
12691 (base32
12692 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
12693 (build-system python-build-system)
12694 (home-page "https://github.com/myint/pydiff")
12695 (synopsis "Library to diff two Python files at the bytecode level")
12696 (description
12697 "@code{pydiff} makes it easy to look for actual code changes while
12698ignoring formatting changes.")
12699 (license license:expat)))
12700
12701(define-public python2-pydiff
12702 (package-with-python2 python-pydiff))
12703
12704(define-public python-tqdm
12705 (package
12706 (name "python-tqdm")
12707 (version "4.19.6")
12708 (source
12709 (origin
12710 (method url-fetch)
12711 (uri (pypi-uri "tqdm" version))
12712 (sha256
12713 (base32
12714 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
12715 (build-system python-build-system)
12716 (native-inputs
12717 `(("python-flake8" ,python-flake8)
12718 ("python-nose" ,python-nose)
12719 ("python-coverage" ,python-coverage)))
12720 (home-page "https://github.com/tqdm/tqdm")
12721 (synopsis "Fast, extensible progress meter")
12722 (description
12723 "Make loops show a progress bar on the console by just wrapping any
12724iterable with @code{|tqdm(iterable)|}. Offers many options to define
12725design and layout.")
12726 (license (list license:mpl2.0 license:expat))))
12727
12728(define-public python2-tqdm
12729 (package-with-python2 python-tqdm))
12730
12731(define-public python-pkginfo
12732 (package
12733 (name "python-pkginfo")
12734 (version "1.4.2")
12735 (source
12736 (origin
12737 (method url-fetch)
12738 (uri (pypi-uri "pkginfo" version))
12739 (sha256
12740 (base32
12741 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
12742 (build-system python-build-system)
12743 (arguments
12744 ;; The tests are broken upstream.
12745 '(#:tests? #f))
12746 (home-page
12747 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
12748 (synopsis
12749 "Query metadatdata from sdists, bdists, and installed packages")
12750 (description
12751 "API to query the distutils metadata written in @file{PKG-INFO} inside a
12752source distriubtion (an sdist) or a binary distribution (e.g., created by
12753running bdist_egg). It can also query the EGG-INFO directory of an installed
12754distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
12755created by running @code{python setup.py develop}).")
12756 (license license:expat)))
12757
12758(define-public python2-pkginfo
12759 (package-with-python2 python-pkginfo))
12760
12761(define-public python-twine
12762 (package
12763 (name "python-twine")
12764 (version "1.9.1")
12765 (source
12766 (origin
12767 (method url-fetch)
12768 (uri (pypi-uri "twine" version))
12769 (sha256
12770 (base32
12771 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
12772 (build-system python-build-system)
12773 (propagated-inputs
12774 `(("python-tqdm" ,python-tqdm)
12775 ("python-pkginfo" ,python-pkginfo)
12776 ("python-requests" ,python-requests)
12777 ("python-requests-toolbelt" ,python-requests-toolbelt)))
12778 (home-page "https://github.com/pypa/twine")
12779 (synopsis "Collection of utilities for interacting with PyPI")
12780 (description
12781 "@code{twine} currently supports registering projects and uploading
12782distributions. It authenticates the user over HTTPS, allows them to pre-sign
12783their files and supports any packaging format (including wheels).")
12784 (license license:asl2.0)))
12785
12786(define-public python2-twine
12787 (package-with-python2 python-twine))
12788
12789(define-public python-linecache2
12790 (package
12791 (name "python-linecache2")
12792 (version "1.0.0")
12793 (source
12794 (origin
12795 (method url-fetch)
12796 (uri (pypi-uri "linecache2" version))
12797 (sha256
12798 (base32
12799 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
12800 (build-system python-build-system)
12801 (arguments
12802 `(;; The tests depend on unittest2, and our version is a bit too old.
12803 #:tests? #f))
12804 (native-inputs
12805 `(("python-pbr" ,python-pbr-minimal)))
12806 (home-page
12807 "https://github.com/testing-cabal/linecache2")
12808 (synopsis "Backports of the linecache module")
12809 (description
12810 "The linecache module allows one to get any line from any file, while
12811attempting to optimize internally, using a cache, the common case where many
12812lines are read from a single file.")
12813 (license license:psfl)))
12814
12815(define-public python2-linecache2
12816 (package-with-python2 python-linecache2))
12817
12818(define-public python-traceback2
12819 (package
12820 (name "python-traceback2")
12821 (version "1.4.0")
12822 (source
12823 (origin
12824 (method url-fetch)
12825 (uri (pypi-uri "traceback2" version))
12826 (sha256
12827 (base32
12828 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
12829 (build-system python-build-system)
12830 (arguments
12831 `(;; python-traceback2 and python-unittest2 depend on one another.
12832 #:tests? #f))
12833 (native-inputs
12834 `(("python-pbr" ,python-pbr-minimal)))
12835 (propagated-inputs
12836 `(("python-linecache2" ,python-linecache2)))
12837 (home-page
12838 "https://github.com/testing-cabal/traceback2")
12839 (synopsis "Backports of the traceback module")
12840 (description
12841 "This module provides a standard interface to extract, format and print
12842stack traces of Python programs. It exactly mimics the behavior of the Python
12843interpreter when it prints a stack trace.")
12844 (license license:psfl)))
12845
12846(define-public python2-traceback2
12847 (package-with-python2 python-traceback2))
12848
12849(define-public python-ratelimiter
12850 (package
12851 (name "python-ratelimiter")
12852 (version "1.2.0")
12853 (source
12854 (origin
12855 (method url-fetch)
12856 (uri (pypi-uri "ratelimiter" version))
12857 (sha256
12858 (base32
12859 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
12860 (build-system python-build-system)
12861 (arguments
12862 '(#:tests? #f)) ; There are no tests in the pypi archive.
12863 (home-page "https://github.com/RazerM/ratelimiter")
12864 (synopsis "Simple rate limiting object")
12865 (description
12866 "The @code{ratelimiter} module ensures that an operation will not be
12867executed more than a given number of times during a given period.")
12868 (license license:asl2.0)))
12869
12870(define-public python2-ratelimiter
12871 (package-with-python2 python-ratelimiter))
12872
12873(define-public python-dukpy
12874 (package
12875 (name "python-dukpy")
12876 (version "0.3")
12877 (source
12878 (origin
12879 (method url-fetch)
12880 (uri (string-append "https://github.com/kovidgoyal/dukpy/archive/v"
12881 version ".tar.gz"))
12882 (file-name (string-append name "-" version ".tar.gz"))
12883 (sha256
12884 (base32
12885 "0pj39rfwlzivqm5hkrsza7gssg6ggpxlq5ivc8f3h7x5pfgc6y6c"))))
12886 (build-system python-build-system)
12887 (home-page "https://github.com/kovidgoyal/dukpy")
12888 (synopsis "Run JavaScript in python")
12889 (description
12890 "dukpy is a JavaScript runtime environment for Python using the duktape
12891embeddable JavaScript engine.")
12892 ;; Dukpy is licensed under MIT like the embedded duktape library,
12893 ;; with 'errors.c' as GPL3.
12894 (license (list license:expat license:gpl3))))
12895
12896(define-public python2-dukpy
12897 (package-with-python2 python-dukpy))
12898
12899(define-public python-jsonrpclib-pelix
12900 (package
12901 (name "python-jsonrpclib-pelix")
12902 (version "0.3.2")
12903 (source
12904 (origin
12905 (method url-fetch)
12906 (uri (pypi-uri "jsonrpclib-pelix" version))
12907 (sha256
12908 (base32
12909 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
12910 (build-system python-build-system)
12911 (arguments
12912 `(#:tests? #f)) ; no tests in PyPI tarball
12913 (home-page "https://github.com/tcalmant/jsonrpclib/")
12914 (synopsis "JSON-RPC 2.0 client library for Python")
12915 (description
12916 "This library implements the JSON-RPC v2.0
12917specification (backwards-compatible) as a client library for Python. This
12918version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
12919services.")
12920 (license license:asl2.0)))
12921
12922(define-public python2-jsonrpclib-pelix
12923 (package-with-python2 python-jsonrpclib-pelix))
12924
12925(define-public python-setuptools-scm-git-archive
12926 (package
12927 (name "python-setuptools-scm-git-archive")
12928 (version "1.0")
12929 (source
12930 (origin
12931 (method url-fetch)
12932 (uri (pypi-uri "setuptools_scm_git_archive" version))
12933 (sha256
12934 (base32
12935 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
12936 (build-system python-build-system)
12937 (native-inputs
12938 `(("python-pytest" ,python-pytest)))
12939 (propagated-inputs
12940 `(("python-setuptools-scm" ,python-setuptools-scm)))
12941 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
12942 (synopsis "Setuptools_scm plugin for git archives")
12943 (description
12944 "The setuptools_scm_git_archive package is a plugin to
12945setuptools_scm, which supports obtaining versions from git archives that
12946belong to tagged versions.")
12947 (license license:expat)))
12948
12949(define-public python2-setuptools-scm-git-archive
12950 (package-with-python2 python-setuptools-scm-git-archive))
12951
12952(define-public python-pyclipper
12953 (package
12954 (name "python-pyclipper")
12955 (version "1.1.0.post1")
12956 (source
12957 (origin
12958 (method url-fetch)
12959 (uri (pypi-uri "pyclipper" version ".zip"))
12960 (sha256
12961 (base32
12962 "0ldbkbnx94an4zzrwb1sxmg6k0jgk4cwmvcdyy8y5k1zslc612wa"))
12963 (modules '((guix build utils)))
12964 (snippet
12965 '(begin
12966 ;; This file is generated by Cython.
12967 (delete-file "pyclipper/pyclipper.cpp") #t))))
12968 (build-system python-build-system)
12969 (arguments
12970 `(#:phases
12971 (modify-phases %standard-phases
12972 (add-before 'build 'cythonize-sources
12973 (lambda _
12974 (with-directory-excursion "pyclipper"
12975 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
12976 (propagated-inputs
12977 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
12978 (native-inputs
12979 `(("python-cython" ,python-cython)
12980 ("python-pytest" ,python-pytest)
12981 ("python-pytest-runner" ,python-pytest-runner)
12982 ("python-unittest2" ,python-unittest2)
12983 ("unzip" ,unzip)))
12984 (home-page "https://github.com/greginvm/pyclipper")
12985 (synopsis "Wrapper for Angus Johnson's Clipper library")
12986 (description
12987 "Pyclipper is a Cython wrapper for the C++ translation of the
12988Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
12989 (license license:expat)))
12990
12991(define-public python2-pyclipper
12992 (package-with-python2 python-pyclipper))
12993
12994(define-public python2-booleanoperations
12995 (package
12996 (name "python2-booleanoperations")
12997 (version "0.7.1")
12998 (source
12999 (origin
13000 (method url-fetch)
13001 (uri (pypi-uri "booleanOperations" version ".zip"))
13002 (sha256
13003 (base32
13004 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
13005 (build-system python-build-system)
13006 (arguments
13007 `(#:python ,python-2))
13008 (native-inputs
13009 `(("unzip" ,unzip)
13010 ("python2-pytest" ,python2-pytest)
13011 ("python2-pytest-runner" ,python2-pytest-runner)))
13012 (propagated-inputs
13013 `(("python-fonttools" ,python2-fonttools)
13014 ("python-pyclipper" ,python2-pyclipper)
13015 ("python-ufolib" ,python2-ufolib)))
13016 (home-page "https://github.com/typemytype/booleanOperations")
13017 (synopsis "Boolean operations on paths")
13018 (description
13019 "BooleanOperations provides a Python library that enables
13020boolean operations on paths.")
13021 (license license:expat)))
13022
13023(define-public python-tempdir
13024 (package
13025 (name "python-tempdir")
13026 (version "0.7.1")
13027 (source
13028 (origin
13029 (method url-fetch)
13030 (uri (pypi-uri "tempdir" version))
13031 (sha256
13032 (base32
13033 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
13034 (build-system python-build-system)
13035 (home-page "https://pypi.org/project/tempdir/")
13036 (arguments
13037 ;; the package has no tests
13038 '(#:tests? #f))
13039 (synopsis "Python library for managing temporary directories")
13040 (description
13041 "This library manages temporary directories that are automatically
13042deleted with all their contents when they are no longer needed. It is
13043particularly convenient for use in tests.")
13044 (license license:expat)))
13045
13046(define-public python2-tempdir
13047 (package-with-python2 python-tempdir))
13048
13049(define-public python-activepapers
13050 (package
13051 (name "python-activepapers")
13052 (version "0.2.2")
13053 (source
13054 (origin
13055 (method url-fetch)
13056 (uri (pypi-uri "ActivePapers.Py" version))
13057 (sha256
13058 (base32
13059 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
13060 (build-system python-build-system)
13061 (arguments
13062 `(#:modules ((ice-9 ftw)
13063 (srfi srfi-1)
13064 (guix build utils)
13065 (guix build python-build-system))
13066
13067 #:phases
13068 (modify-phases %standard-phases
13069 (add-after 'unpack 'delete-python2-code
13070 (lambda _
13071 (for-each delete-file
13072 '("lib/activepapers/builtins2.py"
13073 "lib/activepapers/standardlib2.py"
13074 "lib/activepapers/utility2.py"))))
13075 (replace 'check
13076 (lambda _
13077 ;; Deactivate the test cases that download files
13078 (setenv "NO_NETWORK_ACCESS" "1")
13079 ;; For some strange reason, some tests fail if nosetests runs all
13080 ;; test modules in a single execution. They pass if each test
13081 ;; module is run individually.
13082 (for-each (lambda (filename)
13083 (invoke "nosetests"
13084 (string-append "tests/" filename)))
13085 (scandir "tests"
13086 (lambda (filename)
13087 (string-suffix? ".py" filename)))))))))
13088 (native-inputs
13089 `(("python-tempdir" ,python-tempdir)
13090 ("python-nose" ,python-nose)))
13091 (propagated-inputs
13092 `(("python-h5py" ,python-h5py)))
13093 (home-page "http://www.activepapers.org/")
13094 (synopsis "Executable papers for scientific computing")
13095 (description
13096 "ActivePapers is a tool for working with executable papers, which
13097combine data, code, and documentation in single-file packages,
13098suitable for publication as supplementary material or on repositories
13099such as figshare or Zenodo.")
13100 (properties `((python2-variant . ,(delay python2-activepapers))))
13101 (license license:bsd-3)))
13102
13103(define-public python2-activepapers
13104 (let ((base (package-with-python2
13105 (strip-python2-variant python-activepapers))))
13106 (package
13107 (inherit base)
13108 (arguments
13109 (substitute-keyword-arguments (package-arguments base)
13110 ((#:phases phases)
13111 `(modify-phases ,phases
13112 (delete 'delete-python2-code)
13113 (add-after 'unpack 'delete-python3-code
13114 (lambda _
13115 (for-each delete-file
13116 '("lib/activepapers/builtins3.py"
13117 "lib/activepapers/standardlib3.py"
13118 "lib/activepapers/utility3.py")))))))))))
13119
13120(define-public python-semver
13121 (package
13122 (name "python-semver")
13123 (version "2.7.9")
13124 (source
13125 (origin
13126 (method url-fetch)
13127 (uri (pypi-uri "semver" version))
13128 (sha256
13129 (base32
13130 "0hhgqppchv59rqj0yzi1prdg2nfsywqmjsqy2rycyxm0hvxmbyqz"))))
13131 (build-system python-build-system)
13132 (arguments
13133 `(#:phases
13134 (modify-phases %standard-phases
13135 (add-after 'unpack 'patch-test-requirements
13136 (lambda _
13137 (substitute* "setup.py"
13138 ;; Our Python is new enough.
13139 (("'virtualenv<14\\.0\\.0'") "'virtualenv'"))
13140 #t)))))
13141 (native-inputs
13142 `(("python-tox" ,python-tox)
13143 ("python-virtualenv" ,python-virtualenv)))
13144 (home-page "https://github.com/k-bx/python-semver")
13145 (synopsis "Python helper for Semantic Versioning")
13146 (description "This package provides a Python library for
13147@url{Semantic Versioning, http://semver.org/}.")
13148 (license license:bsd-3)))
13149
13150(define-public python2-semver
13151 (package-with-python2 python-semver))
13152
13153(define-public python-pyro4
13154 (package
13155 (name "python-pyro4")
13156 (version "4.74")
13157 (source
13158 (origin
13159 (method url-fetch)
13160 (uri (pypi-uri "Pyro4" version))
13161 (sha256
13162 (base32
13163 "0pzp7c6q3vvkxq0wy9lr6wd5wky40sajz69g697i5rb2q497pvc9"))))
13164 (build-system python-build-system)
13165 (propagated-inputs
13166 `(("python-serpent" ,python-serpent)))
13167 (home-page "https://pyro4.readthedocs.io")
13168 (synopsis "Distributed object middleware for Python")
13169 (description
13170 "Pyro enables you to build applications in which objects can talk to each
13171other over the network. You can just use normal Python method calls to call
13172objects on other machines, also known as remote procedure calls (RPC).")
13173 (license license:expat)))
13174
13175(define-public python2-pyro
13176 (package
13177 (name "python2-pyro")
13178 (version "3.16")
13179 (source
13180 (origin
13181 (method url-fetch)
13182 (uri (pypi-uri "Pyro" version))
13183 (file-name (string-append "Pyro-" version ".tar.gz"))
13184 (sha256
13185 (base32
13186 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
13187 (build-system python-build-system)
13188 (arguments
13189 ;; Pyro is not compatible with Python 3
13190 `(#:python ,python-2
13191 ;; Pyro has no test cases for automatic execution
13192 #:tests? #f))
13193 (home-page "http://pythonhosted.org/Pyro/")
13194 (synopsis "Distributed object manager for Python")
13195 (description "Pyro is a Distributed Object Technology system
13196written in Python that is designed to be easy to use. It resembles
13197Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
13198which is a system and language independent Distributed Object Technology
13199and has much more to offer than Pyro or RMI. Pyro 3.x is no
13200longer maintained. New projects should use Pyro4 instead, which
13201is the new Pyro version that is actively developed.")
13202 (license license:expat)))
13203
13204(define-public python2-scientific
13205 (package
13206 (name "python2-scientific")
13207 (version "2.9.4")
13208 (source
13209 (origin
13210 (method url-fetch)
13211 (uri (string-append "https://bitbucket.org/khinsen/"
13212 "scientificpython/downloads/ScientificPython-"
13213 version ".tar.gz"))
13214 (file-name (string-append "ScientificPython-" version ".tar.gz"))
13215 (sha256
13216 (base32
13217 "0fc69zhlsn9d2jvbzyjl9ah53vj598h84nkq230c83ahfvgzx5y3"))))
13218 (build-system python-build-system)
13219 (inputs
13220 `(("netcdf" ,netcdf)))
13221 (propagated-inputs
13222 `(("python-numpy" ,python2-numpy-1.8)
13223 ("python-pyro" ,python2-pyro)))
13224 (arguments
13225 ;; ScientificPython is not compatible with Python 3
13226 `(#:python ,python-2
13227 #:tests? #f ; No test suite
13228 #:phases
13229 (modify-phases %standard-phases
13230 (replace 'build
13231 (lambda* (#:key inputs #:allow-other-keys)
77e61e25
RW
13232 (invoke "python" "setup.py" "build"
13233 (string-append "--netcdf_prefix="
13234 (assoc-ref inputs "netcdf"))))))))
44d10b1f
RW
13235 (home-page "https://bitbucket.org/khinsen/scientificpython")
13236 (synopsis "Python modules for scientific computing")
13237 (description "ScientificPython is a collection of Python modules that are
13238useful for scientific computing. Most modules are rather general (Geometry,
13239physical units, automatic derivatives, ...) whereas others are more
13240domain-specific (e.g. netCDF and PDB support). The library is currently
13241not actively maintained and works only with Python 2 and NumPy < 1.9.")
13242 (license license:cecill-c)))
13243
13244(define-public python2-mmtk
13245 (package
13246 (name "python2-mmtk")
13247 (version "2.7.11")
13248 (source
13249 (origin
13250 (method url-fetch)
13251 (uri (string-append "https://bitbucket.org/khinsen/"
13252 "mmtk/downloads/MMTK-" version ".tar.gz"))
13253 (file-name (string-append "MMTK-" version ".tar.gz"))
13254 (sha256
13255 (base32
13256 "1d0nnjx4lwsvh8f99vv1r6gi50d93yba0adkz8b4zgv4za4c5862"))))
13257 (build-system python-build-system)
13258 (native-inputs
13259 `(("netcdf" ,netcdf)))
13260 (propagated-inputs
13261 `(("python-scientific" ,python2-scientific)
13262 ("python-tkinter" ,python-2 "tk")))
13263 (arguments
13264 `(#:python ,python-2
13265 #:tests? #f
13266 #:phases
13267 (modify-phases %standard-phases
13268 (add-before 'build 'includes-from-scientific
13269 (lambda* (#:key inputs #:allow-other-keys)
13270 (mkdir-p "Include/Scientific")
13271 (copy-recursively
13272 (string-append
13273 (assoc-ref inputs "python-scientific")
13274 "/include/python2.7/Scientific")
13275 "Include/Scientific"))))))
13276 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
13277 (synopsis "Python library for molecular simulation")
13278 (description "MMTK is a library for molecular simulations with an emphasis
13279on biomolecules. It provides widely used methods such as Molecular Dynamics
13280and normal mode analysis, but also basic routines for implementing new methods
13281for simulation and analysis. The library is currently not actively maintained
13282and works only with Python 2 and NumPy < 1.9.")
13283 (license license:cecill-c)))
13284
13285(define-public python-phonenumbers
13286 (package
13287 (name "python-phonenumbers")
13288 (version "8.9.1")
13289 (source
13290 (origin
13291 (method url-fetch)
13292 (uri (pypi-uri "phonenumbers" version))
13293 (sha256
13294 (base32
13295 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
13296 (build-system python-build-system)
13297 (home-page
13298 "https://github.com/daviddrysdale/python-phonenumbers")
13299 (synopsis
13300 "Python library for dealing with international phone numbers")
13301 (description
13302 "This package provides a Python port of Google's libphonenumber library.")
13303 (license license:asl2.0)))
13304
13305(define-public python2-phonenumbers
13306 (package-with-python2 python-phonenumbers))
13307
13308(define-public python-send2trash
13309 (package
13310 (name "python-send2trash")
d9b0216b 13311 (version "1.5.0")
44d10b1f 13312 (source
d9b0216b 13313 (origin (method git-fetch)
44d10b1f 13314 ;; Source tarball on PyPI doesn't include tests.
d9b0216b
RW
13315 (uri (git-reference
13316 (url "https://github.com/hsoft/send2trash.git")
13317 (commit version)))
13318 (file-name (git-file-name name version))
44d10b1f
RW
13319 (sha256
13320 (base32
d9b0216b 13321 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
44d10b1f
RW
13322 (build-system python-build-system)
13323 (arguments
13324 '(#:phases
13325 (modify-phases %standard-phases
13326 (add-before 'check 'pre-check
13327 (lambda _
13328 (mkdir-p "/tmp/foo")
13329 (setenv "HOME" "/tmp/foo")
13330 #t)))))
13331 (home-page "https://github.com/hsoft/send2trash")
13332 (synopsis "Send files to the user's @file{~/Trash} directory")
13333 (description "This package provides a Python library to send files to the
13334user's @file{~/Trash} directory.")
13335 (license license:bsd-3)))
13336
13337(define-public python2-send2trash
13338 (package
13339 (inherit (package-with-python2 python-send2trash))
13340 (arguments
13341 (substitute-keyword-arguments (package-arguments python-send2trash)
13342 ((#:phases phases)
13343 `(modify-phases ,phases
13344 (add-before 'check 'setenv
13345 (lambda _
13346 (setenv "PYTHONPATH"
13347 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
13348 #t))))))
13349 (properties `((python2-variant . ,(delay python-send2trash))))))
13350
13351(define-public python-yapf
13352 (package
13353 (name "python-yapf")
13354 (version "0.24.0")
13355 (source
13356 (origin
13357 (method url-fetch)
13358 (uri (pypi-uri "yapf" version))
13359 (sha256
13360 (base32
13361 "0anwby0ydmyzcsgjc5dn1ryddwvii4dq61vck447q0n96npnzfyf"))))
13362 (build-system python-build-system)
13363 (home-page "https://github.com/google/yapf")
13364 (synopsis "Formatter for Python code")
13365 (description "YAPF is a formatter for Python code. It's based off of
13366@dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
13367takes the code and reformats it to the best formatting that conforms to the
13368style guide, even if the original code didn't violate the style guide.")
13369 (license license:asl2.0)))
13370
13371(define-public python2-yapf
13372 (package-with-python2 python-yapf))
13373
13374(define-public python-gyp
13375 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
13376 (revision "0"))
13377 (package
13378 (name "python-gyp")
13379 ;; Google does not release versions,
13380 ;; based on second most recent commit date.
13381 (version (git-version "0.0.0" revision commit))
13382 (source
13383 (origin
13384 ;; Google does not release tarballs,
13385 ;; git checkout is needed.
13386 (method git-fetch)
13387 (uri (git-reference
13388 (url "https://chromium.googlesource.com/external/gyp")
13389 (commit commit)))
13390 (file-name (git-file-name name version))
13391 (sha256
13392 (base32
13393 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
13394 (build-system python-build-system)
13395 (home-page "https://gyp.gsrc.io/")
13396 (synopsis "GYP is a Meta-Build system")
13397 (description
13398 "GYP builds build systems for large, cross platform applications.
13399It can be used to generate XCode projects, Visual Studio projects, Ninja build
13400files, and Makefiles.")
13401 (license license:bsd-3))))
13402
13403(define-public python2-gyp
13404 (package-with-python2 python-gyp))
13405
13406(define-public python-whatever
13407 (package
13408 (name "python-whatever")
13409 (version "0.5")
13410 (source
13411 (origin
13412 (method url-fetch)
13413 (uri (string-append "https://github.com/Suor/whatever/archive/" version
13414 ".tar.gz"))
13415 (sha256
13416 (base32
13417 "1iqvnaf0zpc6b4rvbqq4xy45mszcscyzpzknv8wg6j84pbp22sap"))
13418 (file-name (string-append name "-" version ".tar.gz"))))
13419 (build-system python-build-system)
13420 (arguments
13421 `(#:phases
13422 (modify-phases %standard-phases
13423 (replace 'check
13424 (lambda _
13425 (invoke "py.test"))))))
13426 (native-inputs
13427 `(("python-pytest" ,python-pytest)))
13428 (home-page "http://github.com/Suor/whatever")
13429 (synopsis "Make anonymous functions by partial application of operators")
13430 (description "@code{whatever} provides an easy way to make anonymous
13431functions by partial application of operators.")
13432 (license license:bsd-3)))
13433
13434(define-public python2-whatever
13435 (package-with-python2 python-whatever))
13436
13437(define-public python-funcy
13438 (package
13439 (name "python-funcy")
9e396ab8 13440 (version "1.11")
44d10b1f
RW
13441 (source
13442 (origin
a85c6027
TGR
13443 (method git-fetch)
13444 (uri (git-reference
13445 (url "https://github.com/Suor/funcy.git")
13446 (commit version)))
44d10b1f 13447 (sha256
a85c6027
TGR
13448 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
13449 (file-name (git-file-name name version))))
44d10b1f
RW
13450 (build-system python-build-system)
13451 (arguments
13452 `(#:phases
13453 (modify-phases %standard-phases
13454 (replace 'check
13455 (lambda _
13456 (invoke "py.test"))))))
13457 (native-inputs
13458 `(("python-pytest" ,python-pytest)
13459 ("python-whatever" ,python-whatever)))
13460 (home-page "http://github.com/Suor/funcy")
13461 (synopsis "Functional tools")
13462 (description "@code{funcy} is a library that provides functional tools.
13463Examples are:
13464@enumerate
13465@item merge - Merges collections of the same type
13466@item walk - Type-preserving map
13467@item select - Selects a part of a collection
13468@item take - Takes the first n items of a collection
13469@item first - Takes the first item of a collection
13470@item remove - Predicated-removes items of a collection
13471@item concat - Concatenates two collections
13472@item flatten - Flattens a collection with subcollections
13473@item distinct - Returns only distinct items
13474@item split - Predicated-splits a collection
13475@item split_at - Splits a collection at a given item
13476@item group_by - Groups items by group
13477@item pairwise - Pairs off adjacent items
13478@item partial - Partially-applies a function
13479@item curry - Curries a function
13480@item compose - Composes functions
13481@item complement - Complements a predicate
13482@item all_fn - \"all\" with predicate
13483@end enumerate")
13484 (license license:bsd-3)))
13485
13486(define-public python2-funcy
13487 (package-with-python2 python-funcy))
13488
13489(define-public python-isoweek
13490 (package
13491 (name "python-isoweek")
13492 (version "1.3.3")
13493 (source
13494 (origin
13495 (method url-fetch)
13496 (uri (pypi-uri "isoweek" version))
13497 (sha256
13498 (base32
13499 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
13500 (build-system python-build-system)
13501 (home-page "https://github.com/gisle/isoweek")
13502 (synopsis "Objects representing a week")
13503 (description "The @code{isoweek} module provide the class Week that
13504implements the week definition of ISO 8601. This standard also defines
13505a notation for identifying weeks; yyyyWww (where the W is a literal).
13506Week instances stringify to this form.")
13507 (license license:bsd-3)))
13508
13509(define-public python2-isoweek
13510 (package-with-python2 python-isoweek))
13511
13512(define-public python-tokenize-rt
13513 (package
13514 (name "python-tokenize-rt")
13515 (version "2.0.1")
13516 (source
13517 (origin
13518 (method url-fetch)
13519 (uri (pypi-uri "tokenize-rt" version))
13520 (sha256
13521 (base32
13522 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
13523 (build-system python-build-system)
13524 (home-page "https://github.com/asottile/tokenize-rt")
13525 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
13526 (description
13527 "This Python library is a wrapper around @code{tokenize} from the Python
13528standard library. It provides two additional tokens @code{ESCAPED_NL} and
13529@code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
13530and @code{tokens_to_src} to roundtrip.")
13531 (license license:expat)))
13532
13533(define-public python-future-fstrings
13534 (package
13535 (name "python-future-fstrings")
13536 (version "0.4.1")
13537 (source
13538 (origin
13539 (method url-fetch)
13540 (uri (pypi-uri "future_fstrings" version))
13541 (sha256
13542 (base32
13543 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
13544 (build-system python-build-system)
13545 (propagated-inputs
13546 `(("python-tokenize-rt" ,python-tokenize-rt)))
13547 (home-page "https://github.com/asottile/future-fstrings")
13548 (synopsis "Backport of fstrings to Python < 3.6")
13549 (description
13550 "This package provides a UTF-8 compatible encoding
13551@code{future_fstrings}, which performs source manipulation. It decodes the
13552source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
13553@code{f} strings.")
13554 (license license:expat)))
13555
13556(define-public python-typing
13557 (package
13558 (name "python-typing")
13559 (version "3.6.6")
13560 (source
13561 (origin
13562 (method url-fetch)
13563 (uri (pypi-uri "typing" version))
13564 (sha256
13565 (base32
13566 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
13567 (build-system python-build-system)
13568 (home-page "https://docs.python.org/3/library/typing.html")
13569 (synopsis "Type hints for Python")
13570 (description "This is a backport of the standard library @code{typing}
13571module to Python versions older than 3.5. Typing defines a standard notation
13572for Python function and variable type annotations. The notation can be used
13573for documenting code in a concise, standard format, and it has been designed
13574to also be used by static and runtime type checkers, static analyzers, IDEs
13575and other tools.")
13576 (license license:psfl)))
13577
13578(define-public python2-typing
13579 (package-with-python2 python-typing))
13580
f89d443b
VC
13581(define-public python-typing-extensions
13582 (package
13583 (name "python-typing-extensions")
13584 (version "3.7.2")
13585 (source
13586 (origin
13587 (method url-fetch)
13588 (uri (pypi-uri "typing_extensions" version))
13589 (sha256
13590 (base32
13591 "0wfsv71pvkyf2na938l579jh0v3kzl6g744ijgnahcwd4d9x0b7v"))))
13592 (build-system python-build-system)
13593 (home-page
13594 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
13595 (synopsis "Experimental type hints for Python")
13596 (description
13597 "The typing_extensions module contains additional @code{typing} hints not
13598yet present in the of the @code{typing} standard library.
13599Included are implementations of:
13600@enumerate
13601@item ClassVar
13602@item ContextManager
13603@item Counter
13604@item DefaultDict
13605@item Deque
13606@item NewType
13607@item NoReturn
13608@item overload
13609@item Protocol
13610@item runtime
13611@item Text
13612@item Type
13613@item TYPE_CHECKING
13614@item AsyncGenerator
13615@end enumerate\n")
13616 (license license:psfl)))
13617
44d10b1f
RW
13618(define-public bpython
13619 (package
13620 (name "bpython")
13621 (version "0.17.1")
13622 (source
13623 (origin
13624 (method url-fetch)
13625 (uri (pypi-uri "bpython" version))
13626 (sha256
13627 (base32
13628 "0bxhxi5zxdkrf8b4gwn0d363kdz3qnypjwhm1aydki53ph8ca1w9"))))
13629 (build-system python-build-system)
13630 (arguments
13631 `(#:phases
13632 (modify-phases %standard-phases
13633 (add-after 'unpack 'remove-failing-test
13634 (lambda _
13635 ;; Remove failing test. FIXME: make it pass
13636 (delete-file "bpython/test/test_args.py")
13637 #t))
13638 (add-after 'wrap 'add-aliases
13639 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
13640 (lambda* (#:key outputs #:allow-other-keys)
13641 (let ((out (assoc-ref outputs "out")))
13642 (for-each
13643 (lambda (old new)
13644 (symlink old (string-append out "/bin/" new)))
13645 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
13646 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
13647 #t)))))
13648 (propagated-inputs
13649 `(("python-pygments" ,python-pygments)
13650 ("python-requests" ,python-requests)
13651 ("python-babel" ,python-babel) ; optional, for internationalization
13652 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
13653 ("python-greenlet" ,python-greenlet)
13654 ("python-urwid" ,python-urwid) ; for bpython-urwid only
13655 ("python-six" ,python-six)))
13656 (native-inputs
13657 `(("python-sphinx" ,python-sphinx)
13658 ("python-mock" ,python-mock)))
13659 (home-page "https://bpython-interpreter.org/")
13660 (synopsis "Fancy interface to the Python interpreter")
13661 (description "Bpython is a fancy interface to the Python
13662interpreter. bpython's main features are
13663
13664@enumerate
13665@item in-line syntax highlighting,
13666@item readline-like autocomplete with suggestions displayed as you type,
13667@item expected parameter list for any Python function,
13668@item \"rewind\" function to pop the last line of code from memory and
13669 re-evaluate,
13670@item send the code you've entered off to a pastebin,
13671@item save the code you've entered to a file, and
13672@item auto-indentation.
13673@end enumerate")
13674 (license license:expat)))
13675
13676(define-public bpython2
13677 (let ((base (package-with-python2
13678 (strip-python2-variant bpython))))
13679 (package (inherit base)
13680 (name "bpython2")
13681 (arguments
13682 `(#:python ,python-2
13683 #:phases
13684 (modify-phases %standard-phases
13685 (add-after 'unpack 'remove-failing-test
13686 (lambda _
13687 ;; Remove failing test. FIXME: make it pass
13688 (delete-file "bpython/test/test_args.py")
13689 ;; Disable failing test-cases (renaming inhibits they are
13690 ;; discovered)
13691 (substitute* "bpython/test/test_curtsies_repl.py"
13692 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
13693 (string-append a "xxx_off_" b))
13694 (("^(\\s*def )(test_complex\\W)" _ a b)
13695 (string-append a "xxx_off_" b)))
13696 #t))
13697 (add-before 'build 'rename-scripts
13698 ;; rename the scripts to bypthon2, bpdb2, etc.
13699 (lambda _
13700 (substitute* "setup.py"
13701 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
13702 (string-append name "2" rest "\n"))
13703 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
13704 (string-append name "2" (or sub "") rest "\n")))
13705 #t))))))))
13706
13707(define-public python-pyinotify
13708 (package
13709 (name "python-pyinotify")
13710 (version "0.9.6")
13711 (source (origin
13712 (method url-fetch)
13713 (uri (pypi-uri "pyinotify" version))
13714 (sha256
13715 (base32
13716 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
13717 (build-system python-build-system)
13718 (arguments `(#:tests? #f)) ;no tests
13719 (home-page "https://github.com/seb-m/pyinotify")
13720 (synopsis "Python library for monitoring inotify events")
13721 (description
13722 "@code{pyinotify} provides a Python interface for monitoring
13723file system events on Linux.")
13724 (license license:expat)))
13725
13726(define-public python2-pyinotify
13727 (package-with-python2 python-pyinotify))
13728
13729;; Ada parser uses this version.
13730(define-public python2-quex-0.67.3
13731 (package
13732 (name "python2-quex")
13733 (version "0.67.3")
13734 (source
13735 (origin
13736 (method url-fetch)
13737 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
13738 (version-major+minor version)
13739 "/quex-" version ".zip"))
13740 (sha256
13741 (base32
13742 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
13743 (build-system python-build-system)
13744 (native-inputs
13745 `(("unzip" ,unzip)))
13746 (arguments
13747 `(#:python ,python-2
13748 #:tests? #f
13749 #:phases
13750 (modify-phases %standard-phases
13751 (delete 'configure)
13752 (delete 'build)
13753 (replace 'install
13754 (lambda* (#:key outputs #:allow-other-keys)
13755 (let* ((out (assoc-ref outputs "out"))
13756 (share/quex (string-append out "/share/quex"))
13757 (bin (string-append out "/bin")))
13758 (copy-recursively "." share/quex)
13759 (mkdir-p bin)
13760 (symlink (string-append share/quex "/quex-exe.py")
13761 (string-append bin "/quex"))
13762 #t))))))
13763 (native-search-paths
13764 (list (search-path-specification
13765 (variable "QUEX_PATH")
13766 (files '("share/quex")))))
13767 (home-page "http://quex.sourceforge.net/")
13768 (synopsis "Lexical analyzer generator in Python")
13769 (description "@code{quex} is a lexical analyzer generator in Python.")
13770 (license license:lgpl2.1+))) ; Non-military
13771
13772(define-public python2-quex
13773 (package (inherit python2-quex-0.67.3)
13774 (name "python2-quex")
13775 (version "0.68.1")
13776 (source
13777 (origin
13778 (method url-fetch)
13779 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
13780 (sha256
13781 (base32
13782 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
13783 (file-name (string-append name "-" version ".tar.gz"))))))
13784
13785(define-public python-more-itertools
13786 (package
13787 (name "python-more-itertools")
47f66348 13788 (version "6.0.0")
44d10b1f
RW
13789 (source
13790 (origin
13791 (method url-fetch)
13792 (uri (pypi-uri "more-itertools" version))
13793 (sha256
13794 (base32
47f66348 13795 "1lfrx2ndnilla3a5lhpjc1wjgkplkxrhp5nyn6ys2l93jkil802r"))))
44d10b1f 13796 (build-system python-build-system)
44d10b1f
RW
13797 (home-page "https://github.com/erikrose/more-itertools")
13798 (synopsis "More routines for operating on iterables, beyond itertools")
13799 (description "Python's built-in @code{itertools} module implements a
13800number of iterator building blocks inspired by constructs from APL, Haskell,
13801and SML. @code{more-itertools} includes additional building blocks for
13802working with iterables.")
47f66348 13803 (properties `((python2-variant . ,(delay python2-more-itertools))))
44d10b1f
RW
13804 (license license:expat)))
13805
47f66348 13806;; The 5.x series are the last versions supporting Python 2.7.
44d10b1f 13807(define-public python2-more-itertools
47f66348
MB
13808 (package
13809 (inherit python-more-itertools)
13810 (name "python2-more-itertools")
13811 (version "5.0.0")
13812 (source (origin
13813 (method url-fetch)
13814 (uri (pypi-uri "more-itertools" version))
13815 (sha256
13816 (base32
13817 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
13818 (arguments
13819 `(#:python ,python2-minimal))
13820 (propagated-inputs
13821 `(("python2-six" ,python2-six-bootstrap)))))
44d10b1f
RW
13822
13823(define-public python-latexcodec
13824 (package
13825 (name "python-latexcodec")
13826 (version "1.0.5")
13827 (source
13828 (origin
13829 (method url-fetch)
13830 (uri (pypi-uri "latexcodec" version))
13831 (sha256
13832 (base32
13833 "0zdd1gf24i83ykadx0y30n3001j43scqr2saql3vckk5c39dj1wn"))))
13834 (build-system python-build-system)
13835 (inputs
13836 `(("python-six" ,python-six)))
13837 (home-page "https://readthedocs.org/projects/latexcodec/")
13838 (synopsis "Work with LaTeX code in Python")
13839 (description "Lexer and codec to work with LaTeX code in Python.")
13840 (license license:expat)))
13841
13842(define-public python-pybtex
13843 (package
13844 (name "python-pybtex")
13845 (version "0.21")
13846 (source
13847 (origin
13848 (method url-fetch)
13849 (uri (pypi-uri "pybtex" version))
13850 (sha256
13851 (base32
13852 "00300j8dn5pxq4ndxmfmbmycg2znawkqs49val2x6jlmfiy6r2mg"))))
13853 (build-system python-build-system)
13854 (native-inputs
13855 `(("python-nose" ,python-nose)))
13856 (inputs
13857 `(("python-latexcodec" ,python-latexcodec)
13858 ("python-pyyaml" ,python-pyyaml)
13859 ("python-six" ,python-six)))
13860 (arguments
13861 `(#:test-target "nosetests"))
13862 (home-page "https://pybtex.org/")
13863 (synopsis "BibTeX-compatible bibliography processor")
13864 (description "Pybtex is a BibTeX-compatible bibliography processor written
13865in Python. You can simply type pybtex instead of bibtex.")
13866 (license license:expat)))
13867
13868(define-public python-onetimepass
13869 (package
13870 (name "python-onetimepass")
13871 (version "1.0.1")
13872 (source
13873 (origin
13874 (method url-fetch)
13875 (uri (pypi-uri "onetimepass" version))
13876 (sha256
13877 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
13878 (build-system python-build-system)
13879 (propagated-inputs `(("python-six" ,python-six)))
13880 (home-page "https://github.com/tadeck/onetimepass/")
13881 (synopsis "One-time password library")
13882 (description "Python one-time password library for HMAC-based (HOTP) and
13883time-based (TOTP) passwords.")
13884 (license license:expat)))
13885
13886(define-public python-parso
13887 (package
13888 (name "python-parso")
13889 (version "0.3.1")
13890 (source
13891 (origin
13892 (method url-fetch)
13893 (uri (pypi-uri "parso" version))
13894 (sha256
13895 (base32
13896 "18p89iwcm8mnf380f92g9w0bhx5km8wxp392vvjcq4y1ld1llw1m"))))
13897 (native-inputs
13898 `(("python-pytest" ,python-pytest)))
13899 (build-system python-build-system)
13900 (home-page "https://github.com/davidhalter/parso")
13901 (synopsis "Python Parser")
13902 (description "Parso is a Python parser that supports error recovery and
13903round-trip parsing for different Python versions (in multiple Python versions).
13904Parso is also able to list multiple syntax errors in your Python file.")
13905 (license license:expat)))
13906
13907(define-public python2-parso
13908 (package-with-python2 python-parso))
13909
13910(define-public python-async-generator
13911 (package
13912 (name "python-async-generator")
94fcbf8d 13913 (version "1.10")
44d10b1f
RW
13914 (source
13915 (origin
13916 (method url-fetch)
13917 (uri (pypi-uri "async_generator" version))
13918 (sha256
13919 (base32
94fcbf8d 13920 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
44d10b1f
RW
13921 (build-system python-build-system)
13922 (native-inputs
13923 `(("python-pytest" ,python-pytest)))
13924 (home-page "https://github.com/python-trio/async_generator")
13925 (synopsis "Async generators and context managers for Python 3.5+")
13926 (description "@code{async_generator} back-ports Python 3.6's native async
13927generators and Python 3.7's context managers into Python 3.5.")
13928 ;; Dual licensed.
13929 (license (list license:expat license:asl2.0))))
13930
13931(define-public python-async-timeout
13932 (package
13933 (name "python-async-timeout")
13934 (version "3.0.1")
13935 (source
13936 (origin
13937 (method url-fetch)
13938 (uri (pypi-uri "async-timeout" version))
13939 (sha256
13940 (base32
13941 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
13942 (build-system python-build-system)
13943 (home-page "https://github.com/aio-libs/async_timeout/")
13944 (synopsis "Timeout context manager for asyncio programs")
13945 (description "@code{async-timeout} provides a timeout timeout context
13946manager compatible with @code{asyncio}.")
13947 (license license:asl2.0)))
13948
13949(define-public python-glob2
13950 (package
13951 (name "python-glob2")
13952 (version "0.6")
13953 (source (origin
13954 (method url-fetch)
13955 (uri (string-append
13956 "https://github.com/miracle2k/python-glob2/archive/"
13957 version
13958 ".tar.gz"))
13959 (sha256
13960 (base32
13961 "0ja168f0dz4kbz4m06dm0rd3acaypk6hjx2km541pw22y9s40mag"))
13962 (file-name (string-append name "-" version ".tar.gz"))))
13963 (build-system python-build-system)
13964 (home-page "https://github.com/miracle2k/python-glob2/")
13965 (synopsis "Extended Version of the python buildin glob module")
13966 (description "This is an extended version of the Python
13967@url{http://docs.python.org/library/glob.html, built-in glob module} which
13968adds:
13969
13970@itemize
13971@item The ability to capture the text matched by glob patterns, and return
13972those matches alongside the file names.
13973@item A recursive @code{**} globbing syntax, akin for example to the
13974@code{globstar} option of Bash.
13975@item The ability to replace the file system functions used, in order to glob
13976on virtual file systems.
13977@item Compatible with Python 2 and Python 3 (tested with 3.3).
13978@end itemize
13979
13980Glob2 currently based on the glob code from Python 3.3.1.")
13981 (license license:bsd-2)))
13982
13983(define-public python2-glob2
13984 (package-with-python2 python-glob2))
13985
13986(define-public python-gipc
13987 (package
13988 (name "python-gipc")
13989 (version "0.6.0")
13990 (source
13991 (origin
13992 (method url-fetch)
13993 (uri (pypi-uri "gipc" version ".zip"))
13994 (sha256
13995 (base32
13996 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
13997 (build-system python-build-system)
13998 (native-inputs
13999 `(("unzip" ,unzip)))
14000 (propagated-inputs
14001 `(("python-gevent" ,python-gevent)))
14002 (home-page "http://gehrcke.de/gipc")
14003 (synopsis "Child process management in the context of gevent")
14004 (description "Usage of Python's multiprocessing package in a
14005gevent-powered application may raise problems. With @code{gipc},
14006process-based child processes can safely be created anywhere within a
14007gevent-powered application.")
14008 (license license:expat)))
14009
14010(define-public python2-gipc
14011 (package-with-python2 python-gipc))
14012
14013(define-public python-fusepy
14014 (package
14015 (name "python-fusepy")
14016 (version "2.0.4")
14017 (source
14018 (origin
14019 (method url-fetch)
14020 (uri (pypi-uri "fusepy" version))
14021 (sha256
14022 (base32
14023 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
14024 (build-system python-build-system)
14025 (arguments
14026 `(#:phases
14027 (modify-phases %standard-phases
14028 (add-before 'build 'set-library-file-name
14029 (lambda* (#:key inputs #:allow-other-keys)
14030 (let ((fuse (assoc-ref inputs "fuse")))
14031 (substitute* "fuse.py"
14032 (("find_library\\('fuse'\\)")
14033 (string-append "'" fuse "/lib/libfuse.so'")))
14034 #t))))))
14035 (propagated-inputs
14036 `(("fuse" ,fuse)))
14037 (home-page "https://github.com/fusepy/fusepy")
14038 (synopsis "Simple ctypes bindings for FUSE")
14039 (description "Python module that provides a simple interface to FUSE and
14040MacFUSE. The binding is created using the standard @code{ctypes} library.")
14041 (license license:isc)))
14042
14043(define-public python2-fusepy
14044 (package-with-python2 python-fusepy))
14045
14046(define-public python2-gdrivefs
14047 (package
14048 (name "python2-gdrivefs")
14049 (version "0.14.9")
14050 (source
14051 (origin
14052 (method url-fetch)
14053 (uri (pypi-uri "gdrivefs" version))
14054 (sha256
14055 (base32
14056 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
14057 (build-system python-build-system)
14058 (arguments
14059 `(#:python ,python-2
14060 #:phases
14061 (modify-phases %standard-phases
14062 (add-before 'build 'patch-setup-py
14063 (lambda _
14064 ;; Update requirements from dependency==version
14065 ;; to dependency>=version
14066 (substitute* "gdrivefs/resources/requirements.txt"
14067 (("==") ">="))
14068 #t)))))
14069 (native-inputs
14070 `(("python2-gipc" ,python2-gipc)
14071 ("python2-gevent" ,python2-gevent)
14072 ("python2-greenlet" ,python2-greenlet)
14073 ("python2-httplib2" ,python2-httplib2)
14074 ("python2-uritemplate" ,python2-uritemplate)
14075 ("python2-oauth2client" ,python2-oauth2client)
14076 ("python2-six" ,python2-six)))
14077 (propagated-inputs
14078 `(("python2-dateutil" ,python2-dateutil)
14079 ("python2-fusepy" ,python2-fusepy)
14080 ("python2-google-api-client" ,python2-google-api-client)))
14081 (home-page "https://github.com/dsoprea/GDriveFS")
14082 (synopsis "Mount Google Drive as a local file system")
14083 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
14084under Python 2.7.")
14085 (license license:gpl2)))
14086
14087(define-public pybind11
14088 (package
14089 (name "pybind11")
14090 (version "2.2.4")
14091 (source (origin
14092 (method git-fetch)
14093 (uri (git-reference
14094 (url "https://github.com/pybind/pybind11.git")
14095 (commit (string-append "v" version))))
14096 (sha256
14097 (base32
14098 "0pa79ymcasv8br5ifbx7878id5py2jpjac3i20cqxr6gs9l6ivlv"))
14099 (file-name (git-file-name name version))))
14100 (build-system cmake-build-system)
14101 (native-inputs
14102 `(("python" ,python)
14103 ("python-pytest" ,python-pytest)))
14104 (arguments
14105 `(#:test-target "check"))
14106 (home-page "https://github.com/pybind/pybind11/")
14107 (synopsis "Seamless operability between C++11 and Python")
14108 (description "pybind11 is a lightweight header-only library that exposes
14109C++ types in Python and vice versa, mainly to create Python bindings of
14110existing C++ code. Its goals and syntax are similar to the excellent
14111Boost.Python library by David Abrahams: to minimize boilerplate code in
14112traditional extension modules by inferring type information using compile-time
14113introspection.")
14114 (license license:expat)))
14115
14116(define-public python-fasteners
14117 (package
14118 (name "python-fasteners")
14119 (version "0.14.1")
14120 (source
14121 (origin
14122 (method url-fetch)
14123 (uri (pypi-uri "fasteners" version))
14124 (sha256
14125 (base32
14126 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
14127 (build-system python-build-system)
14128 (propagated-inputs
14129 `(("python-monotonic" ,python-monotonic)
14130 ("python-six" ,python-six)
14131 ("python-testtools" ,python-testtools)))
14132 (home-page "https://github.com/harlowja/fasteners")
14133 (synopsis "Python package that provides useful locks")
14134 (description
14135 "This package provides a Python program that provides following locks:
14136
14137@itemize
14138@item Locking decorator
14139@item Reader-writer locks
14140@item Inter-process locks
14141@item Generic helpers
14142@end itemize\n")
14143 (properties `((python2-variant . ,(delay python2-fasteners))))
14144 (license license:asl2.0)))
14145
14146(define-public python2-fasteners
14147 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
14148 (package
14149 (inherit base)
14150 (propagated-inputs
14151 `(("python2-futures" ,python2-futures)
14152 ,@(package-propagated-inputs base))))))
14153
14154(define-public python-requests-file
14155 (package
14156 (name "python-requests-file")
14157 (version "1.4.3")
14158 (source
14159 (origin
14160 (method url-fetch)
14161 (uri (pypi-uri "requests-file" version))
14162 (sha256
14163 (base32
14164 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
14165 (build-system python-build-system)
14166 (propagated-inputs
14167 `(("python-requests" ,python-requests)
14168 ("python-six" ,python-six)))
14169 (home-page
14170 "https://github.com/dashea/requests-file")
14171 (synopsis "File transport adapter for Requests")
14172 (description
14173 "Requests-File is a transport adapter for use with the Requests Python
14174library to allow local filesystem access via file:// URLs.")
14175 (license license:asl2.0)))
14176
14177(define-public python2-requests-file
14178 (package-with-python2 python-requests-file))
14179
14180(define-public python-tldextract
14181 (package
14182 (name "python-tldextract")
14183 (version "2.2.0")
14184 (source
14185 (origin
14186 (method url-fetch)
14187 (uri (pypi-uri "tldextract" version))
14188 (sha256
14189 (base32
14190 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
14191 (build-system python-build-system)
14192 (native-inputs
14193 `(("python-pytest" ,python-pytest)
14194 ("python-responses" ,python-responses)))
14195 (propagated-inputs
14196 `(("python-idna" ,python-idna)
14197 ("python-requests" ,python-requests)
14198 ("python-requests-file" ,python-requests-file)))
14199 (home-page
14200 "https://github.com/john-kurkowski/tldextract")
14201 (synopsis
14202 "Separate the TLD from the registered domain and subdomains of a URL")
14203 (description
14204 "TLDExtract accurately separates the TLD from the registered domain and
14205subdomains of a URL, using the Public Suffix List. By default, this includes
14206the public ICANN TLDs and their exceptions. It can optionally support the
14207Public Suffix List's private domains as well.")
14208 (license license:bsd-3)))
14209
14210(define-public python2-tldextract
14211 (package-with-python2 python-tldextract))
14212
14213(define-public python-pynamecheap
14214 (package
14215 (name "python-pynamecheap")
14216 (version "0.0.3")
14217 (source
14218 (origin
14219 (method url-fetch)
14220 (uri (pypi-uri "PyNamecheap" version))
14221 (sha256
14222 (base32
14223 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
14224 (build-system python-build-system)
14225 (propagated-inputs
14226 `(("python-requests" ,python-requests)))
14227 (home-page
14228 "https://github.com/Bemmu/PyNamecheap")
14229 (synopsis
14230 "Namecheap API client in Python")
14231 (description
14232 "PyNamecheap is a Namecheap API client in Python.")
14233 (license license:expat)))
14234
14235(define-public python2-pynamecheap
14236 (package-with-python2 python-pynamecheap))
14237
14238(define-public python-dns-lexicon
14239 (package
14240 (name "python-dns-lexicon")
14241 (version "2.4.0")
14242 (source
14243 (origin
14244 (method url-fetch)
14245 (uri (pypi-uri "dns-lexicon" version))
14246 (sha256
14247 (base32
14248 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
14249 (build-system python-build-system)
14250 (arguments
14251 `(#:tests? #f)) ;requires internet access
14252 (propagated-inputs
14253 `(("python-future" ,python-future)
14254 ("python-pynamecheap" ,python-pynamecheap)
14255 ("python-requests" ,python-requests)
14256 ("python-tldextract" ,python-tldextract)
14257 ("python-urllib3" ,python-urllib3)))
14258 (home-page "https://github.com/AnalogJ/lexicon")
14259 (synopsis
14260 "Manipulate DNS records on various DNS providers")
14261 (description
14262 "Lexicon provides a way to manipulate DNS records on multiple DNS
14263providers in a standardized way. It has a CLI but it can also be used as a
14264Python library. It was designed to be used in automation, specifically with
14265Let's Encrypt.")
14266 (license license:expat)))
14267
14268(define-public python2-dns-lexicon
14269 (package-with-python2 python-dns-lexicon))
14270
14271(define-public python-commandlines
14272 (package
14273 (name "python-commandlines")
14274 (version "0.4.1")
14275 (source
14276 (origin
14277 (method url-fetch)
14278 (uri (pypi-uri "commandlines" version))
14279 (sha256
14280 (base32
14281 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
14282 (build-system python-build-system)
14283 (home-page "https://github.com/chrissimpkins/commandlines")
14284 (synopsis "Command line argument to object parsing library")
14285 (description
14286 "@code{Commandlines} is a Python library for command line application
14287development that supports command line argument parsing, command string
14288validation testing and application logic.")
14289 (license license:expat)))
14290
14291;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
14292;; python-numba. They have a very unflexible relationship.
14293(define-public python-numba
14294 (package
14295 (name "python-numba")
14296 (version "0.39.0")
14297 (source
14298 (origin
14299 (method url-fetch)
14300 (uri (pypi-uri "numba" version))
14301 (sha256
14302 (base32
14303 "1bibvkwga1v8293i9ivl469d8bzgabn3vgr2ig7c1i68v8frsx07"))))
14304 (build-system python-build-system)
14305 (arguments
14306 `(#:modules ((guix build utils)
14307 (guix build python-build-system)
14308 (ice-9 ftw)
14309 (srfi srfi-1)
14310 (srfi srfi-26))
14311 #:phases
14312 (modify-phases %standard-phases
14313 (add-after 'unpack 'disable-proprietary-features
14314 (lambda _
14315 (setenv "NUMBA_DISABLE_HSA" "1")
14316 (setenv "NUMBA_DISABLE_CUDA" "1")
14317 #t))
14318 (add-after 'unpack 'remove-failing-tests
14319 (lambda _
14320 ;; FIXME: these tests fail for unknown reasons:
14321 ;; test_non_writable_pycache, test_non_creatable_pycache, and
14322 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
14323 (substitute* "numba/tests/test_dispatcher.py"
14324 (("def test(_non_writable_pycache)" _ m)
14325 (string-append "def guix_skip" m))
14326 (("def test(_non_creatable_pycache)" _ m)
14327 (string-append "def guix_skip" m))
14328 (("def test(_frozen)" _ m)
14329 (string-append "def guix_skip" m)))
14330
14331 ;; These tests fail because we don't run the tests from the build
14332 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
14333 ;; They ar in numba.tests.test_pycc.TestDistutilsSupport.
14334 (substitute* "numba/tests/test_pycc.py"
14335 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
14336 (string-append "def guix_skip" m)))
14337 #t))
14338 (replace 'check
14339 (lambda _
14340 (let ((cwd (getcwd)))
14341 (setenv "PYTHONPATH"
14342 (string-append cwd "/build/"
14343 (find (cut string-prefix? "lib" <>)
14344 (scandir (string-append cwd "/build")))
14345 ":"
14346 (getenv "PYTHONPATH")))
14347 ;; Something is wrong with the PYTHONPATH when running the
14348 ;; tests from the build directory, as it complains about not being
14349 ;; able to import certain modules.
14350 (with-directory-excursion "/tmp"
14351 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
14352 #t)))))
14353 (propagated-inputs
14354 `(("python-llvmlite" ,python-llvmlite)
14355 ("python-numpy" ,python-numpy)
14356 ("python-singledispatch" ,python-singledispatch)))
14357 ;; Needed for tests.
14358 (inputs
14359 `(("python-jinja2" ,python-jinja2)
14360 ("python-pygments" ,python-pygments)))
14361 (home-page "https://numba.pydata.org")
14362 (synopsis "Compile Python code using LLVM")
14363 (description "Numba gives you the power to speed up your applications with
14364high performance functions written directly in Python. With a few
14365annotations, array-oriented and math-heavy Python code can be just-in-time
14366compiled to native machine instructions, similar in performance to C, C++ and
14367Fortran, without having to switch languages or Python interpreters.
14368
14369Numba works by generating optimized machine code using the LLVM compiler
14370infrastructure at import time, runtime, or statically (using the included pycc
14371tool).")
14372 (license license:bsd-3)))
14373
14374(define-public python-anndata
14375 (package
14376 (name "python-anndata")
14377 (version "0.6.9")
14378 (source
14379 (origin
14380 (method url-fetch)
14381 (uri (pypi-uri "anndata" version))
14382 (sha256
14383 (base32
14384 "1fh461xyyc7pcrjfgd013bdc2alf53r46ss3gfw3431mbb1gappi"))))
14385 (build-system python-build-system)
14386 (propagated-inputs
14387 `(("python-h5py" ,python-h5py)
14388 ("python-natsort" ,python-natsort)
14389 ("python-pandas" ,python-pandas)
14390 ("python-scipy" ,python-scipy)))
14391 (home-page "https://github.com/theislab/anndata")
14392 (synopsis "Annotated data for data analysis pipelines")
14393 (description "Anndata is a package for simple (functional) high-level APIs
14394for data analysis pipelines. In this context, it provides an efficient,
14395scalable way of keeping track of data together with learned annotations and
14396reduces the code overhead typically encountered when using a mostly
14397object-oriented library such as @code{scikit-learn}.")
14398 (license license:bsd-3)))
14399
14400(define-public python-dill
14401 (package
14402 (name "python-dill")
14403 (version "0.2.8.2")
14404 (source
14405 (origin
14406 (method url-fetch)
14407 (uri (pypi-uri "dill" version))
14408 (sha256
14409 (base32
14410 "1cymzn9fxwdy33h21zkk4gqgzvd25110hh3zdqnvnwa3p52c4kb2"))))
14411 (build-system python-build-system)
14412 ;; FIXME: The check phase fails with "don't know how to make test".
14413 (arguments '(#:tests? #f))
14414 (home-page "https://pypi.org/project/dill")
14415 (synopsis "Serialize all of Python")
14416 (description "Dill extends Python's @code{pickle} module for serializing
14417and de-serializing Python objects to the majority of the built-in Python
14418types. Dill provides the user the same interface as the @code{pickle} module,
14419and also includes some additional features. In addition to pickling Python
14420objects, @code{dill} provides the ability to save the state of an interpreter
14421session in a single command. Hence, it would be feasable to save a
14422interpreter session, close the interpreter, ship the pickled file to another
14423computer, open a new interpreter, unpickle the session and thus continue from
14424the saved state of the original interpreter session.")
14425 (license license:bsd-3)))
14426
14427(define-public python-multiprocess
14428 (package
14429 (name "python-multiprocess")
14430 (version "0.70.6.1")
14431 (source
14432 (origin
14433 (method url-fetch)
14434 (uri (pypi-uri "multiprocess" version))
14435 (sha256
14436 (base32
14437 "1ip5caz67b3q0553mr8gm8xwsb8x500jn8ml0gihgyfy52m2ypcq"))))
14438 (build-system python-build-system)
14439 (propagated-inputs
14440 `(("python-dill" ,python-dill)))
14441 (home-page "https://pypi.org/project/multiprocess")
14442 (synopsis "Multiprocessing and multithreading in Python")
14443 (description
14444 "This package is a fork of the multiprocessing Python package, a package
14445which supports the spawning of processes using the API of the standard
14446library's @code{threading} module.")
14447 (license license:bsd-3)))
14448
14449(define-public python-toolz
14450 (package
14451 (name "python-toolz")
14452 (version "0.9.0")
14453 (source
14454 (origin
14455 (method url-fetch)
14456 (uri (pypi-uri "toolz" version))
14457 (sha256
14458 (base32
14459 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
14460 (build-system python-build-system)
14461 ;; FIXME: tests cannot be computed: "Can't perform this operation for
14462 ;; unregistered loader type"
14463 (arguments '(#:tests? #f))
14464 (home-page "https://github.com/pytoolz/toolz/")
14465 (synopsis "List processing tools and functional utilities")
14466 (description
14467 "This package provides a set of utility functions for iterators,
14468functions, and dictionaries.")
14469 (license license:bsd-3)))
14470
14471(define-public python2-toolz
14472 (package-with-python2 python-toolz))
14473
14474(define-public python-cytoolz
14475 (package
14476 (name "python-cytoolz")
14477 (version "0.9.0.1")
14478 (source
14479 (origin
14480 (method url-fetch)
14481 (uri (pypi-uri "cytoolz" version))
14482 (sha256
14483 (base32
14484 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
14485 (build-system python-build-system)
14486 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
14487 ;; 'exceptions'"
14488 (arguments '(#:tests? #f))
14489 (propagated-inputs
14490 `(("python-toolz" ,python-toolz)))
14491 (native-inputs
14492 `(("python-cython" ,python-cython)))
14493 (home-page "https://github.com/pytoolz/cytoolz")
14494 (synopsis "High performance functional utilities")
14495 (description
14496 "The cytoolz package implements the same API as provided by toolz. The
14497main differences are that @code{cytoolz} is faster and cytoolz offers a C API
14498that is accessible to other projects developed in Cython.")
14499 (license license:bsd-3)))
14500
14501(define-public python-sortedcontainers
14502 (package
14503 (name "python-sortedcontainers")
14504 (version "2.0.4")
14505 (source
14506 (origin
14507 (method url-fetch)
14508 (uri (pypi-uri "sortedcontainers" version))
14509 (sha256
14510 (base32
14511 "10hrk2k0hbf9x78vd3f0lj277m1yzfhzzxr0hja718liwb398wk0"))))
14512 (build-system python-build-system)
14513 (native-inputs
14514 `(("python-tox" ,python-tox)))
14515 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
14516 (synopsis "Sorted List, Sorted Dict, Sorted Set")
14517 (description
14518 "This package provides a sorted collections library, written in
14519pure-Python.")
14520 (license license:asl2.0)))
14521
14522(define-public python-cloudpickle
14523 (package
14524 (name "python-cloudpickle")
14525 (version "0.6.1")
14526 (source
14527 (origin
14528 (method url-fetch)
14529 (uri (pypi-uri "cloudpickle" version))
14530 (sha256
14531 (base32
14532 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
14533 (build-system python-build-system)
14534 ;; FIXME: there are 5 errors in 122 tests:
14535 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
14536 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
14537 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
14538 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
14539 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
14540 ;; TypeError: cannot serialize '_io.BufferedRandom' object
14541 (arguments '(#:tests? #f))
14542 (native-inputs
14543 `(("python-pytest" ,python-pytest)
14544 ("python-mock" ,python-mock)
14545 ("python-tornado" ,python-tornado)))
14546 (home-page "https://github.com/cloudpipe/cloudpickle")
14547 (synopsis "Extended pickling support for Python objects")
14548 (description
14549 "Cloudpickle makes it possible to serialize Python constructs not
14550supported by the default pickle module from the Python standard library. It
14551is especially useful for cluster computing where Python expressions are
14552shipped over the network to execute on remote hosts, possibly close to the
14553data.")
14554 (license license:bsd-3)))
14555
14556(define-public python2-cloudpickle
14557 (package-with-python2 python-cloudpickle))
14558
14559(define-public python-locket
14560 (package
14561 (name "python-locket")
14562 (version "0.2.0")
14563 (source
14564 (origin
14565 (method url-fetch)
14566 (uri (pypi-uri "locket" version))
14567 (sha256
14568 (base32
14569 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
14570 (build-system python-build-system)
14571 (home-page "https://github.com/mwilliamson/locket.py")
14572 (synopsis "File-based locks for Python")
14573 (description
14574 "Locket implements a lock that can be used by multiple processes provided
14575they use the same path.")
14576 (license license:bsd-2)))
14577
14578(define-public python2-locket
14579 (package-with-python2 python-locket))
14580
14581(define-public python-blosc
14582 (package
14583 (name "python-blosc")
14584 (version "1.5.1")
14585 (source
14586 (origin
14587 (method url-fetch)
14588 (uri (pypi-uri "blosc" version))
14589 (sha256
14590 (base32
14591 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
14592 (build-system python-build-system)
14593 ;; FIXME: all tests pass, but then this error is printed:
14594 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
14595 (arguments '(#:tests? #f))
14596 (propagated-inputs
14597 `(("python-numpy" ,python-numpy)))
14598 (home-page "https://github.com/blosc/python-blosc")
14599 (synopsis "Python wrapper for the Blosc data compressor library")
14600 (description "Blosc is a high performance compressor optimized for binary
14601data. It has been designed to transmit data to the processor cache faster
14602than the traditional, non-compressed, direct memory fetch approach via a
14603@code{memcpy()} system call.
14604
14605Blosc works well for compressing numerical arrays that contains data with
14606relatively low entropy, like sparse data, time series, grids with
14607regular-spaced values, etc.
14608
14609This Python package wraps the Blosc library.")
14610 (license license:bsd-3)))
14611
14612(define-public python2-blosc
14613 (package-with-python2 python-blosc))
14614
14615(define-public python-partd
14616 (package
14617 (name "python-partd")
14618 (version "0.3.9")
14619 (source
14620 (origin
14621 (method url-fetch)
14622 (uri (pypi-uri "partd" version))
14623 (sha256
14624 (base32
14625 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
14626 (build-system python-build-system)
14627 (propagated-inputs
14628 `(("python-blosc" ,python-blosc)
14629 ("python-locket" ,python-locket)
14630 ("python-numpy" ,python-numpy)
14631 ("python-pandas" ,python-pandas)
14632 ("python-pyzmq" ,python-pyzmq)
14633 ("python-toolz" ,python-toolz)))
14634 (home-page "https://github.com/dask/partd/")
14635 (synopsis "Appendable key-value storage")
14636 (description "Partd stores key-value pairs. Values are raw bytes. We
14637append on old values. Partd excels at shuffling operations.")
14638 (license license:bsd-3)))
14639
14640(define-public python2-partd
14641 (package-with-python2 python-partd))
14642
14643(define-public python-dask
14644 (package
14645 (name "python-dask")
14646 (version "1.0.0")
14647 (source
14648 (origin
14649 (method url-fetch)
14650 (uri (pypi-uri "dask" version))
14651 (sha256
14652 (base32
14653 "1xwz8h020ipwav2p5gcq9pskya1cvzd6hjyvd06dvr3w5lxlmym1"))))
14654 (build-system python-build-system)
14655 ;; A single test out of 5000+ fails. This test is marked as xfail when
14656 ;; pytest-xdist is used.
14657 (arguments
14658 `(#:phases
14659 (modify-phases %standard-phases
14660 (add-after 'unpack 'disable-broken-test
14661 (lambda _
14662 (substitute* "dask/tests/test_threaded.py"
14663 (("def test_interrupt\\(\\)" m)
14664 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
14665 m)))
14666 (when (which "python2")
14667 ;; This test fails with recent Pandas:
14668 ;; <https://github.com/dask/dask/issues/3794>.
14669 (substitute* "dask/dataframe/tests/test_dataframe.py"
14670 (("def test_info\\(\\)" m)
14671 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
14672 m))))
14673 #t))
14674 (replace 'check
14675 (lambda _ (invoke "pytest" "-vv"))))))
14676 (propagated-inputs
14677 `(("python-cloudpickle" ,python-cloudpickle)
14678 ("python-numpy" ,python-numpy)
14679 ("python-pandas" ,python-pandas)
14680 ("python-partd" ,python-partd)
14681 ("python-toolz" ,python-toolz)
14682 ("python-pyyaml" ,python-pyyaml)))
14683 (native-inputs
14684 `(("python-pytest" ,python-pytest)
14685 ("python-pytest-runner" ,python-pytest-runner)))
14686 (home-page "https://github.com/dask/dask/")
14687 (synopsis "Parallel computing with task scheduling")
14688 (description
14689 "Dask is a flexible parallel computing library for analytics. It
14690consists of two components: dynamic task scheduling optimized for computation,
14691and large data collections like parallel arrays, dataframes, and lists that
14692extend common interfaces like NumPy, Pandas, or Python iterators to
14693larger-than-memory or distributed environments. These parallel collections
14694run on top of the dynamic task schedulers. ")
14695 (license license:bsd-3)))
14696
14697(define-public python2-dask
14698 (package-with-python2 python-dask))
14699
14700(define-public python-ilinkedlist
14701 (package
14702 (name "python-ilinkedlist")
14703 (version "0.4.0")
14704 (source
14705 (origin
14706 (method url-fetch)
14707 (uri (pypi-uri "ilinkedlist" version))
14708 (sha256
14709 (base32
14710 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
14711 (build-system python-build-system)
14712 (native-inputs `(("python-pytest" ,python-pytest)))
14713 (inputs `(("python" ,python)))
14714 (home-page "https://github.com/luther9/ilinkedlist-py")
14715 (synopsis "Immutable linked list library")
14716 (description
14717 "This is a implementation of immutable linked lists for Python. It
14718contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
14719Since a linked list is treated as immutable, it is hashable, and its length
14720can be retrieved in constant time. Some of the terminology is inspired by
14721LISP. It is possible to create an improper list by creating a @code{Pair}
14722with a non-list @code{cdr}.")
14723 (license license:gpl3+)))
14724
14725(define-public python-readlike
14726 (package
14727 (name "python-readlike")
14728 (version "0.1.3")
14729 (source
14730 (origin
14731 (method url-fetch)
14732 (uri (pypi-uri "readlike" version))
14733 (sha256
14734 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
14735 (build-system python-build-system)
14736 (home-page "https://github.com/jangler/readlike")
14737 (synopsis "GNU Readline-like line editing module")
14738 (description
14739 "This Python module provides line editing functions similar to the default
14740Emacs-style ones of GNU Readline. Unlike the Python standard library's
14741@code{readline} package, this one allows access to those capabilties in settings
14742outside of a standard command-line interface. It is especially well-suited to
14743interfacing with Urwid, due to a shared syntax for describing key inputs.
14744
14745Currently, all stateless Readline commands are implemented. Yanking and history
14746are not supported.")
14747 (license license:expat)))
14748
14749(define-public python2-readlike
14750 (package-with-python2 python-readlike))
14751
14752(define-public python-reparser
14753 (package
14754 (name "python-reparser")
14755 (version "1.4.3")
14756 (source
14757 (origin
14758 (method url-fetch)
14759 (uri (pypi-uri "ReParser" version))
14760 (sha256
14761 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
14762 (build-system python-build-system)
14763 (home-page "https://github.com/xmikos/reparser")
14764 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
14765 (description
14766 "This Python library provides a simple lexer/parser for inline markup based
14767on regular expressions.")
14768 (license license:expat)))
14769
14770(define-public python2-reparser
14771 (let ((reparser (package-with-python2
14772 (strip-python2-variant python-reparser))))
14773 (package (inherit reparser)
14774 (propagated-inputs
14775 `(("python2-enum34" ,python2-enum34)
14776 ,@(package-propagated-inputs reparser))))))
14777
14778(define-public python-precis-i18n
14779 (package
14780 (name "python-precis-i18n")
14781 (version "1.0.0")
14782 (source
14783 (origin
14784 (method url-fetch)
14785 (uri (pypi-uri "precis_i18n" version))
14786 (sha256
14787 (base32
14788 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
14789 (build-system python-build-system)
14790 (home-page "https://github.com/byllyfish/precis_i18n")
14791 (synopsis "Implementation of the PRECIS framework")
14792 (description
14793 "This module implements the PRECIS Framework as described in RFC 8264,
14794RFC 8265 and RFC 8266.")
14795 (license license:expat)))
14796
d0446c4b
RW
14797(define-public python-absl-py
14798 (package
14799 (name "python-absl-py")
14800 (version "0.6.1")
14801 (source
14802 (origin
14803 (method url-fetch)
14804 (uri (pypi-uri "absl-py" version))
14805 (sha256
14806 (base32
14807 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
14808 (build-system python-build-system)
14809 (propagated-inputs
14810 `(("python-six" ,python-six)))
14811 (home-page "https://github.com/abseil/abseil-py")
14812 (synopsis "Abseil Python common libraries")
14813 (description
14814 "This package provides the Abseil Python Common Libraries, a collection
14815of Python libraries for building Python applications.")
14816 (license license:asl2.0)))
14817
81bed4e9
RW
14818(define-public python-astor
14819 (package
14820 (name "python-astor")
14821 (version "0.7.1")
14822 (source
14823 (origin
14824 (method url-fetch)
14825 (uri (pypi-uri "astor" version))
14826 (sha256
14827 (base32
14828 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
14829 (build-system python-build-system)
14830 ;; FIXME: There are two errors and two test failures.
14831 (arguments `(#:tests? #f))
14832 (home-page "https://github.com/berkerpeksag/astor")
39ee82ff 14833 (synopsis "Read and write Python ASTs")
81bed4e9 14834 (description "Astor is designed to allow easy manipulation of Python
39ee82ff 14835source via the Abstract Syntax Tree.")
81bed4e9
RW
14836 (license license:bsd-3)))
14837
39ee82ff
RW
14838(define-public python2-astor
14839 (package-with-python2 python-astor))
14840
22e623ae
RW
14841(define-public python-grpcio
14842 (package
14843 (name "python-grpcio")
14844 (version "1.17.1")
14845 (source
14846 (origin
14847 (method url-fetch)
14848 (uri (pypi-uri "grpcio" version))
14849 (sha256
14850 (base32
14851 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
14852 (build-system python-build-system)
14853 (propagated-inputs
14854 `(("python-six" ,python-six)))
14855 (home-page "https://grpc.io")
14856 (synopsis "HTTP/2-based RPC framework")
14857 (description "This package provides a Python library for communicating
14858with the HTTP/2-based RPC framework gRPC.")
14859 (license license:asl2.0)))
14860
79869f80
RW
14861(define-public python-astunparse
14862 (package
14863 (name "python-astunparse")
14864 (version "1.6.1")
14865 (source
14866 (origin
14867 (method url-fetch)
14868 (uri (pypi-uri "astunparse" version))
14869 (sha256
14870 (base32
14871 "1jhidwyrqn17avqh9xnnm3wd7q7aahaq009cba67g86y6gxicyyj"))))
14872 (build-system python-build-system)
14873 (arguments '(#:tests? #f)) ; there are none
14874 (propagated-inputs
14875 `(("python-six" ,python-six)
14876 ("python-wheel" ,python-wheel)))
14877 (home-page "https://github.com/simonpercivall/astunparse")
14878 (synopsis "AST unparser for Python")
14879 (description "This package provides an AST unparser for Python. It is a
14880factored out version of @code{unparse} found in the Python source
14881distribution.")
14882 (license license:bsd-3)))
14883
2884aac0
RW
14884(define-public python-gast
14885 (package
14886 (name "python-gast")
14887 (version "0.2.0")
14888 (source
14889 (origin
14890 (method url-fetch)
14891 (uri (pypi-uri "gast" version))
14892 (sha256
14893 (base32
14894 "0c296xm1vz9x4w4inmdl0k8mnc0i9arw94si2i7pglpc461r0s3h"))))
14895 (build-system python-build-system)
14896 (propagated-inputs
14897 `(("python-astunparse" ,python-astunparse)))
14898 (home-page "https://pypi.org/project/gast/")
14899 (synopsis "Generic Python AST that abstracts the underlying Python version")
14900 (description
14901 "GAST provides a compatibility layer between the AST of various Python
14902versions, as produced by @code{ast.parse} from the standard @code{ast}
14903module.")
14904 (license license:bsd-3)))
14905
44d10b1f
RW
14906(define-public python-wikidata
14907 (package
14908 (name "python-wikidata")
14909 (version "0.6.1")
14910 (source
14911 (origin
14912 (method url-fetch)
14913 (uri (pypi-uri "Wikidata" version))
14914 (sha256
14915 (base32
14916 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
14917 (build-system python-build-system)
14918 (propagated-inputs
14919 `(("python-babel" ,python-babel)))
14920 (home-page "https://github.com/dahlia/wikidata")
14921 (synopsis "Wikidata client library")
14922 (description
14923 "This package provides a Python interface to
14924@url{https://www.wikidata.org/, Wikidata}.")
14925 (properties '((upstream-name . "Wikidata")))
14926 (license license:gpl3+)))
14927
14928(define-public python-doctest-ignore-unicode
14929 (package
14930 (name "python-doctest-ignore-unicode")
14931 (version "0.1.2")
14932 (source
14933 (origin
14934 (method url-fetch)
14935 (uri (pypi-uri "doctest-ignore-unicode" version))
14936 (sha256
14937 (base32
14938 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
14939 (build-system python-build-system)
14940 (native-inputs
14941 `(("python-nose" ,python-nose)))
14942 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
14943 (synopsis "Ignore Unicode literal prefixes in doctests")
14944 (description
14945 "This package adds support for a flag to ignore Unicode literal prefixes
14946in doctests.")
14947 (license license:asl2.0)))
14948
14949(define-public python-attr
14950 (package
14951 (name "python-attr")
14952 (version "0.3.1")
14953 (source
14954 (origin
14955 (method url-fetch)
14956 (uri (pypi-uri "attr" version))
14957 (sha256
14958 (base32
14959 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
14960 (build-system python-build-system)
14961 (home-page "https://github.com/denis-ryzhkov/attr")
14962 (synopsis "Decorator for attributes of target function or class")
14963 (description "Simple decorator to set attributes of target function or
14964class in a @acronym{DRY, Don't Repeat Yourself} way.")
14965 (license license:expat)))
f98232a3
VC
14966
14967(define-public python-construct
14968 (package
14969 (name "python-construct")
14970 (version "2.9.45")
14971 (source
14972 (origin
14973 (method url-fetch)
14974 (uri (pypi-uri "construct" version))
14975 (sha256
14976 (base32
14977 "130iy05awzigm2xah2yvlmb08mac5bi4gzr5m3g7k1krs3ps0w92"))))
14978 (build-system python-build-system)
14979 (arguments
14980 `(#:tests? #f)) ; No tests exist.
14981 (propagated-inputs
14982 `(("python-extras" ,python-extras)
14983 ("python-arrow" ,python-arrow)
14984 ("python-numpy" ,python-numpy)
14985 ("python-ruamel.yaml" ,python-ruamel.yaml)))
14986 (home-page "http://construct.readthedocs.io")
14987 (synopsis "Declarative and symmetrical parser and builder for binary data")
14988 (description
14989 "This package provides both simple, atomic constructs (such as
14990integers of various sizes), as well as composite ones which allow you
14991form hierarchical and sequential structures of increasing complexity.
14992It features bit and byte granularity, easy debugging and testing, an
14993easy-to-extend subclass system, and lots of primitive constructs to
14994make your work easier.")
14995 (license license:expat)))
b742c006
LF
14996
14997(define-public python-humanize
14998 (package
14999 (name "python-humanize")
15000 (version "0.5.1")
15001 (source
15002 (origin
15003 (method url-fetch)
15004 (uri (pypi-uri "humanize" version))
15005 (sha256
15006 (base32
15007 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
15008 (arguments
15009 '(#:tests? #f)) ; tests not in pypi archive
15010 (build-system python-build-system)
15011 (home-page "https://github.com/jmoiron/humanize")
15012 (synopsis "Print numerical information in a human-readable form")
15013 (description "This package provides a Python module that displays numbers
15014and dates in \"human readable\" forms. For example, it would display
15015\"12345591313\" as \"12.3 billion\".")
15016 (license license:expat)))
d5bbf66d
LF
15017
15018(define-public python-txaio
15019 (package
15020 (name "python-txaio")
15021 (version "18.8.1")
15022 (source
15023 (origin
15024 (method url-fetch)
15025 (uri (pypi-uri "txaio" version))
15026 (sha256
15027 (base32
15028 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
15029 (build-system python-build-system)
15030 (propagated-inputs
15031 `(("python-twisted" ,python-twisted)
15032 ("python-six" ,python-six)))
15033 (home-page "https://github.com/crossbario/txaio")
15034 (synopsis "Compatibility layer between Python asyncio and Twisted")
15035 (description "Txaio provides a compatibility layer between the Python
15036@code{asyncio} module and @code{Twisted}.")
15037 (license license:expat)))