gnu: python-prometheus-client: Remove duplicate.
[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>
44d10b1f
RW
4;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr>
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>
14;;; Copyright © 2015, 2016, 2017 Leo Famulari <leo@famulari.name>
15;;; Copyright © 2015, 2017 Ben Woodcroft <donttrustben@gmail.com>
16;;; Copyright © 2015, 2016 Erik Edrosa <erik.edrosa@gmail.com>
17;;; Copyright © 2015, 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
18;;; Copyright © 2015, 2017 Kyle Meyer <kyle@kyleam.com>
19;;; Copyright © 2015, 2016 Chris Marusich <cmmarusich@gmail.com>
20;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
21;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
22;;; Copyright © 2016, 2018 Hartmut Goebel <h.goebel@crazy-compilers.com>
23;;; Copyright © 2016 Daniel Pimentel <d4n1@d4n1.org>
24;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
25;;; Copyright © 2016, 2017 Troy Sankey <sankeytms@gmail.com>
26;;; Copyright © 2016, 2017 Nils Gillmann <ng0@n0.is>
27;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
28;;; Copyright © 2016 David Craven <david@craven.ch>
29;;; Copyright © 2016, 2017, 2018 Marius Bakke <mbakke@fastmail.com>
30;;; Copyright © 2016, 2017 Stefan Reichör <stefan@xsteve.at>
31;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
32;;; Copyright © 2016, 2017 Alex Vong <alexvong1995@gmail.com>
33;;; Copyright © 2016, 2017, 2018 Arun Isaac <arunisaac@systemreboot.net>
34;;; Copyright © 2016, 2017, 2018 Julien Lepiller <julien@lepiller.eu>
35;;; Copyright © 2016, 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
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>
60;;;
61;;; This file is part of GNU Guix.
62;;;
63;;; GNU Guix is free software; you can redistribute it and/or modify it
64;;; under the terms of the GNU General Public License as published by
65;;; the Free Software Foundation; either version 3 of the License, or (at
66;;; your option) any later version.
67;;;
68;;; GNU Guix is distributed in the hope that it will be useful, but
69;;; WITHOUT ANY WARRANTY; without even the implied warranty of
70;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
71;;; GNU General Public License for more details.
72;;;
73;;; You should have received a copy of the GNU General Public License
74;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
75
76(define-module (gnu packages python-xyz)
77 #:use-module ((guix licenses) #:prefix license:)
78 #:use-module (gnu packages)
79 #:use-module (gnu packages algebra)
80 #:use-module (gnu packages adns)
81 #:use-module (gnu packages attr)
82 #:use-module (gnu packages backup)
83 #:use-module (gnu packages bash)
84 #:use-module (gnu packages check)
85 #:use-module (gnu packages compression)
86 #:use-module (gnu packages crypto)
87 #:use-module (gnu packages databases)
88 #:use-module (gnu packages file)
89 #:use-module (gnu packages fontutils)
90 #:use-module (gnu packages gcc)
91 #:use-module (gnu packages geo)
92 #:use-module (gnu packages ghostscript)
93 #:use-module (gnu packages gl)
94 #:use-module (gnu packages glib)
95 #:use-module (gnu packages graphviz)
96 #:use-module (gnu packages graphics)
97 #:use-module (gnu packages gstreamer)
98 #:use-module (gnu packages gtk)
99 #:use-module (gnu packages icu4c)
100 #:use-module (gnu packages image)
101 #:use-module (gnu packages imagemagick)
102 #:use-module (gnu packages libevent)
103 #:use-module (gnu packages libffi)
104 #:use-module (gnu packages linux)
105 #:use-module (gnu packages llvm)
106 #:use-module (gnu packages man)
107 #:use-module (gnu packages maths)
108 #:use-module (gnu packages multiprecision)
109 #:use-module (gnu packages networking)
110 #:use-module (gnu packages ncurses)
111 #:use-module (gnu packages openstack)
112 #:use-module (gnu packages pcre)
113 #:use-module (gnu packages perl)
114 #:use-module (gnu packages pkg-config)
115 #:use-module (gnu packages python)
d362b11d 116 #:use-module (gnu packages python-check)
44d10b1f
RW
117 #:use-module (gnu packages python-crypto)
118 #:use-module (gnu packages python-web)
119 #:use-module (gnu packages qt)
120 #:use-module (gnu packages readline)
121 #:use-module (gnu packages sdl)
122 #:use-module (gnu packages search)
123 #:use-module (gnu packages shells)
124 #:use-module (gnu packages ssh)
125 #:use-module (gnu packages terminals)
126 #:use-module (gnu packages tex)
127 #:use-module (gnu packages texinfo)
128 #:use-module (gnu packages time)
129 #:use-module (gnu packages tls)
130 #:use-module (gnu packages version-control)
131 #:use-module (gnu packages video)
132 #:use-module (gnu packages web)
133 #:use-module (gnu packages base)
134 #:use-module (gnu packages xml)
135 #:use-module (gnu packages xorg)
136 #:use-module (gnu packages xdisorg)
137 #:use-module (gnu packages tcl)
138 #:use-module (gnu packages bdw-gc)
139 #:use-module (guix packages)
140 #:use-module (guix download)
141 #:use-module (guix git-download)
142 #:use-module (guix utils)
143 #:use-module (guix build-system gnu)
144 #:use-module (guix build-system cmake)
145 #:use-module (guix build-system python)
146 #:use-module (guix build-system trivial)
147 #:use-module (srfi srfi-1)
148 #:use-module (srfi srfi-26))
149
150(define-public python-psutil
151 (package
152 (name "python-psutil")
153 (version "5.4.3")
154 (source
155 (origin
156 (method url-fetch)
157 (uri (pypi-uri "psutil" version))
158 (sha256
159 (base32
160 "063v69x7spyclyaxrd3gmzj3p16q5ayg97xqhwb1kyn22a9pwip2"))))
161 (build-system python-build-system)
162 (arguments
163 ;; FIXME: some tests does not return and times out.
164 '(#:tests? #f))
165 (home-page "https://www.github.com/giampaolo/psutil")
166 (synopsis "Library for retrieving information on running processes")
167 (description
168 "psutil (Python system and process utilities) is a library for retrieving
169information on running processes and system utilization (CPU, memory, disks,
170network) in Python. It is useful mainly for system monitoring, profiling and
171limiting process resources and management of running processes. It implements
172many functionalities offered by command line tools such as: ps, top, lsof,
173netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
174pidof, tty, taskset, pmap.")
175 (properties `((python2-variant . ,(delay python2-psutil))))
176 (license license:bsd-3)))
177
178(define-public python2-psutil
179 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
180 (package
181 (inherit base)
182 (propagated-inputs
183 `(("python2-enum34" ,python2-enum34) ;optional
184 ,@(package-propagated-inputs base))))))
185
186(define-public python-shapely
187 (package
188 (name "python-shapely")
189 (version "1.6.3")
190 (source
191 (origin
192 (method url-fetch)
193 (uri (pypi-uri "Shapely" version))
194 (sha256
195 (base32
196 "0svc58dzcw9gj92b4sgq35sdxkf85z0qwlzxarkzq4bp3h8jy58l"))))
197 (build-system python-build-system)
198 (native-inputs
199 `(("python-cython" ,python-cython)
200 ("python-matplotlib" ,python-matplotlib)
201 ("python-pytest" ,python-pytest)
202 ("python-pytest-cov" ,python-pytest-cov)))
203 (inputs
204 `(("geos" ,geos)))
205 (propagated-inputs
206 `(("python-numpy" ,python-numpy)))
207 (arguments
208 `(#:phases
209 (modify-phases %standard-phases
210 (add-after 'unpack 'patch-geos-path
211 (lambda* (#:key inputs #:allow-other-keys)
212 (let ((geos (assoc-ref inputs "geos"))
213 (glibc (assoc-ref inputs ,(if (%current-target-system)
214 "cross-libc" "libc"))))
215 (substitute* "shapely/geos.py"
216 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
217 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
218 geos "/lib/libgeos_c.so'])"))
219 (("free = load_dll\\('c'\\)\\.free")
220 (string-append "free = load_dll('c', fallbacks=['"
221 glibc "/lib/libc.so.6']).free"))))
222 #t)))))
223 (home-page "https://github.com/Toblerity/Shapely")
224 (synopsis "Library for the manipulation and analysis of geometric objects")
225 (description "Shapely is a Python package for manipulation and analysis of
226planar geometric objects. It is based on the @code{GEOS} library.")
227 (license license:bsd-3)))
228
229(define-public python-logwrap
230 (package
231 (name "python-logwrap")
232 (version "3.2.1")
233 (source
234 (origin
235 (method url-fetch)
236 (uri (pypi-uri "logwrap" version ".zip"))
237 (sha256
238 (base32
239 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
240 (build-system python-build-system)
241 (propagated-inputs
242 `(("python-six" ,python-six)
243 ("python-typing" ,python-typing)))
244 (native-inputs
245 `(("unzip" ,unzip)
246 ("python-cython" ,python-cython)
247 ("python-pytest" ,python-pytest)
248 ("python-pytest-cov" ,python-pytest-cov)
249 ("python-pytest-runner" ,python-pytest-runner)))
250 (home-page "https://github.com/penguinolog/logwrap")
251 (synopsis "Decorator for logging function arguments")
252 (description "This package provides a decorator to log function arguments
253and function call return values in a human-readable way.")
254 (license license:asl2.0)))
255
256(define-public python2-shapely
257 (package-with-python2 python-shapely))
258
259(define-public python-clyent
260 (package
261 (name "python-clyent")
262 (version "1.2.1")
263 (source
264 (origin
265 (method url-fetch)
266 (uri (pypi-uri "clyent" version))
267 (sha256
268 (base32
269 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
270 (build-system python-build-system)
271 (native-inputs
272 `(("python-mock" ,python-mock)))
273 (home-page "https://github.com/binstar/clyent")
274 (synopsis "Command line client library")
275 (description "Clyent is a Python command line utiliy library. It is used
276by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
277 (license license:bsd-3)))
278
279(define-public python2-clyent
280 (package-with-python2 python-clyent))
281
282(define-public python-babel
283 (package
284 (name "python-babel")
285 (version "2.6.0")
286 (source
287 (origin
288 (method url-fetch)
289 (uri (pypi-uri "Babel" version))
290 (sha256
291 (base32
292 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))
293 (build-system python-build-system)
294 (native-inputs
295 `(("python-freezegun" ,python-freezegun)
296 ("python-pytest" ,python-pytest)))
297 (propagated-inputs
298 `(("python-pytz" ,python-pytz)))
299 (arguments
300 `(#:phases (modify-phases %standard-phases
301 (replace 'check
302 (lambda _ (invoke "pytest" "-vv"))))))
303 (home-page "http://babel.pocoo.org/")
304 (synopsis
305 "Tools for internationalizing Python applications")
306 (description
307 "Babel is composed of two major parts:
308- tools to build and work with gettext message catalogs
309- a Python interface to the CLDR (Common Locale Data Repository), providing
310access to various locale display names, localized number and date formatting,
311etc. ")
312 (license license:bsd-3)))
313
314(define-public python2-babel
315 (package-with-python2 python-babel))
316
317(define-public python2-backport-ssl-match-hostname
318 (package
319 (name "python2-backport-ssl-match-hostname")
320 (version "3.5.0.1")
321 (source
322 (origin
323 (method url-fetch)
2c1f0d09 324 (uri (pypi-uri "backports.ssl_match_hostname" version))
44d10b1f
RW
325 (sha256
326 (base32
327 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
328 (build-system python-build-system)
329 (arguments
330 `(#:python ,python-2
331 #:tests? #f)) ; no test target
332 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
333 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
334 (description
335 "This backport brings the ssl.match_hostname() function to users of
336earlier versions of Python. The function checks the hostname in the
337certificate returned by the server to which a connection has been established,
338and verifies that it matches the intended target hostname.")
339 (license license:psfl)))
340
341(define-public python-hdf4
342 (package
343 (name "python-hdf4")
344 (version "0.9")
345 (source
346 (origin
347 (method url-fetch)
348 (uri (pypi-uri name version))
349 (sha256
350 (base32
351 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
352 (build-system python-build-system)
353 (native-inputs `(("nose" ,python-nose)))
354 (propagated-inputs `(("numpy" ,python-numpy)))
355 (inputs
356 `(("hdf4" ,hdf4)
357 ("libjpeg" ,libjpeg)
358 ("zlib" ,zlib)))
359 (arguments
360 `(#:phases
361 (modify-phases %standard-phases
362 (replace 'check
363 (lambda _
364 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
365 ;; on to import numpy. Somehow this works on their CI system.
366 ;; Let's just manage PYTHONPATH here instead.
367 (substitute* "runexamples.sh"
368 (("export PYTHONPATH=.*") ""))
369 (setenv "PYTHONPATH"
370 (string-append (getcwd) ":"
371 (getenv "PYTHONPATH")))
372 (invoke "./runexamples.sh")
373 (invoke "nosetests" "-v"))))))
374 (home-page "https://github.com/fhs/python-hdf4")
375 (synopsis "Python interface to the NCSA HDF4 library")
376 (description
377 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
378which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
379NetCDF files can also be read and modified. Python-HDF4 is a fork of
380@url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
381 (license license:expat)))
382
383(define-public python2-hdf4
384 (package-with-python2 python-hdf4))
385
386(define-public python-h5py
387 (package
388 (name "python-h5py")
389 (version "2.8.0")
390 (source
391 (origin
392 (method url-fetch)
393 (uri (pypi-uri "h5py" version))
394 (sha256
395 (base32
396 "0mdr6wrq02ac93m1aqx9kad0ppfzmm4imlxqgyy1x4l7hmdcc9p6"))))
397 (build-system python-build-system)
398 (arguments
399 `(#:tests? #f ; no test target
400 #:phases
401 (modify-phases %standard-phases
402 (add-after 'unpack 'fix-hdf5-paths
403 (lambda* (#:key inputs #:allow-other-keys)
404 (let ((prefix (assoc-ref inputs "hdf5")))
405 (substitute* "setup_build.py"
406 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
407 (string-append "['" prefix "/lib" "']"))
408 (("'/opt/local/include', '/usr/local/include'")
409 (string-append "'" prefix "/include" "'")))
410 (substitute* "setup_configure.py"
411 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
412 (string-append "['" prefix "/lib" "']")))
413 #t))))))
414 (propagated-inputs
415 `(("python-six" ,python-six)
416 ("python-numpy" ,python-numpy)))
417 (inputs
418 `(("hdf5" ,hdf5)))
419 (native-inputs
420 `(("python-cython" ,python-cython)
421 ("python-pkgconfig" ,python-pkgconfig)))
422 (home-page "http://www.h5py.org/")
423 (synopsis "Read and write HDF5 files from Python")
424 (description
425 "The h5py package provides both a high- and low-level interface to the
426HDF5 library from Python. The low-level interface is intended to be a
427complete wrapping of the HDF5 API, while the high-level component supports
428access to HDF5 files, datasets and groups using established Python and NumPy
429concepts.")
430 (license license:bsd-3)))
431
432(define-public python2-h5py
433 (package-with-python2 python-h5py))
434
8b89dedc
RW
435(define-public python-sh
436 (package
437 (name "python-sh")
438 (version "1.12.14")
439 (source
440 (origin
441 (method url-fetch)
442 (uri (pypi-uri "sh" version))
443 (sha256
444 (base32
445 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
446 (build-system python-build-system)
447 (home-page "https://github.com/amoffat/sh")
448 (synopsis "Python subprocess replacement")
449 (description "This package provides a replacement for Python's
450@code{subprocess} feature.")
451 (license license:expat)))
452
d362b11d
RW
453(define-public python-cftime
454 (package
455 (name "python-cftime")
456 (version "1.0.3.4")
457 (source
458 (origin
459 (method url-fetch)
460 (uri (pypi-uri "cftime" version))
461 (sha256
462 (base32
463 "0362dhxbzk593walyjz30dll6y2y79wialik647cbwdsf3ad0x6x"))))
464 (build-system python-build-system)
465 (propagated-inputs
466 `(("python-numpy" ,python-numpy)))
467 (native-inputs
468 `(("python-coveralls" ,python-coveralls)
469 ("python-cython" ,python-cython)
470 ("python-pytest-cov" ,python-pytest-cov)))
471 (home-page "https://github.com/Unidata/cftime")
472 (synopsis "Library for time handling")
473 (description
474 "This package provides time-handling functionality that used to be part
475of the netcdf4 package before.")
476 ;; This package claims to include code under the GPLv3 but is released
477 ;; under ISC.
478 (license (list license:isc license:gpl3+))))
479
44d10b1f
RW
480(define-public python-netcdf4
481 (package
482 (name "python-netcdf4")
93e7b209 483 (version "1.4.2")
44d10b1f
RW
484 (source
485 (origin
486 (method url-fetch)
487 (uri (pypi-uri "netCDF4" version))
488 (sha256
489 (base32
93e7b209 490 "0c0sklgrmv15ygliin8qq0hp7vanmbi74m6zpi0r1ksr0hssyd5r"))))
44d10b1f 491 (build-system python-build-system)
93e7b209
RW
492 (arguments
493 '(#:phases
494 (modify-phases %standard-phases
495 (add-after 'unpack 'configure-locations
496 (lambda* (#:key inputs #:allow-other-keys)
497 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
498 #t)))))
44d10b1f
RW
499 (native-inputs
500 `(("python-cython" ,python-cython)))
501 (propagated-inputs
93e7b209
RW
502 `(("python-numpy" ,python-numpy)
503 ("python-cftime" ,python-cftime)))
44d10b1f
RW
504 (inputs
505 `(("netcdf" ,netcdf)
506 ("hdf4" ,hdf4)
507 ("hdf5" ,hdf5)))
93e7b209 508 (home-page "https://github.com/Unidata/netcdf4-python")
44d10b1f
RW
509 (synopsis "Python/numpy interface to the netCDF library")
510 (description "Netcdf4-python is a Python interface to the netCDF C
511library. netCDF version 4 has many features not found in earlier
512versions of the library and is implemented on top of HDF5. This module
513can read and write files in both the new netCDF 4 and the old netCDF 3
514format, and can create files that are readable by HDF5 clients. The
515API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
516to users of that module.")
517 ;; The software is mainly ISC, but includes some files covered
518 ;; by the Expat license.
519 (license (list license:isc license:expat))))
520
521(define-public python2-netcdf4
522 (package-with-python2 python-netcdf4))
523
524(define-public python-lockfile
525 (package
526 (name "python-lockfile")
527 (version "0.12.2")
528 (source
529 (origin
530 (method url-fetch)
8318bf07 531 (uri (pypi-uri "lockfile" version))
44d10b1f
RW
532 (sha256
533 (base32
534 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
535 (build-system python-build-system)
536 (arguments '(#:test-target "check"))
537 (native-inputs
538 `(("python-pbr" ,python-pbr)))
539 (home-page "https://launchpad.net/pylockfile")
540 (synopsis "Platform-independent file locking module")
541 (description
542 "The lockfile package exports a LockFile class which provides a simple
543API for locking files.")
544 (license license:expat)))
545
546(define-public python2-lockfile
547 (package-with-python2 python-lockfile))
548
549(define-public python-semantic-version
550 (package
551 (name "python-semantic-version")
552 (version "2.6.0")
553 (source
554 (origin
555 (method url-fetch)
556 (uri (pypi-uri "semantic_version" version))
557 (sha256
558 (base32
559 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
560 (build-system python-build-system)
561 (arguments
562 `(#:tests? #f)) ; PyPI tarball lacks tests
563 (home-page "https://github.com/rbarrois/python-semanticversion")
564 (synopsis "Semantic versioning module for Python")
565 (description
566 "The @code{semantic_version} class is a small library for handling
567@uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
568
569It can compare versions, generate a new version that represents a bump in one of
570the version levels, and check whether any given string is a proper semantic
571version identifier.")
572 (license license:bsd-3)))
573
574(define-public python2-semantic-version
575 (package-with-python2 python-semantic-version))
576
577(define-public python-serpent
578 (package
579 (name "python-serpent")
580 (version "1.27")
581 (source
582 (origin
583 (method url-fetch)
584 (uri (pypi-uri "serpent" version))
585 (sha256
586 (base32
587 "04p9dsrm5pv8vhk3flvih55kgvlzpi38hlaykdiakddmgwqw93bg"))))
588 (build-system python-build-system)
589 (home-page "https://github.com/irmen/Serpent")
590 (synopsis "Serializer for literal Python expressions")
591 (description
592 "Serpent provides ast.literal_eval() compatible object tree
593serialization. It serializes an object tree into bytes (utf-8 encoded string)
594that can be decoded and then passed as-is to ast.literal_eval() to rebuild it
595as the original object tree. As such it is safe to send serpent data to other
596machines over the network for instance (because only safe literals are
597encoded).")
598 (license license:expat)))
599
600(define-public python-setuptools
601 (package
602 (name "python-setuptools")
603 (version "40.0.0")
604 (source
605 (origin
606 (method url-fetch)
607 (uri (pypi-uri "setuptools" version ".zip"))
608 (sha256
609 (base32
610 "0pq116lr14gnc62v76nk0npkm6krb2mpp7p9ab369zgv4n7dnah1"))
611 (modules '((guix build utils)))
612 (snippet
613 '(begin
614 ;; Remove included binaries which are used to build self-extracting
615 ;; installers for Windows.
616 ;; TODO: Find some way to build them ourself so we can include them.
617 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
618 #t))))
619 (build-system python-build-system)
620 ;; FIXME: Tests require pytest, which itself relies on setuptools.
621 ;; One could bootstrap with an internal untested setuptools.
622 (arguments
623 `(#:tests? #f))
624 (home-page "https://pypi.python.org/pypi/setuptools")
625 (synopsis
626 "Library designed to facilitate packaging Python projects")
627 (description
628 "Setuptools is a fully-featured, stable library designed to facilitate
629packaging Python projects, where packaging includes:
630Python package and module definitions,
631distribution package metadata,
632test hooks,
633project installation,
634platform-specific details,
635Python 3 support.")
636 ;; TODO: setuptools now bundles the following libraries:
637 ;; packaging, pyparsing, six and appdirs. How to unbundle?
638 (license (list license:psfl ; setuptools itself
639 license:expat ; six, appdirs, pyparsing
640 license:asl2.0 ; packaging is dual ASL2/BSD-2
641 license:bsd-2))))
642
643(define-public python2-setuptools
644 (package-with-python2 python-setuptools))
645
646(define-public python-uniseg
647 (package
648 (name "python-uniseg")
649 (version "0.7.1")
650 (source
651 (origin
652 (method url-fetch)
653 (uri (pypi-uri "uniseg" version ".zip"))
654 (sha256
655 (base32
656 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
657 (build-system python-build-system)
658 (arguments
659 '(#:tests? #f)) ; The test suite requires network access.
660 (native-inputs
661 `(("unzip" ,unzip)))
662 (home-page
663 "https://bitbucket.org/emptypage/uniseg-python")
664 (synopsis
665 "Python library to determine Unicode text segmentations")
666 (description
667 "Uniseg is a Python package used to determine Unicode text segmentations.
668Supported segmentations include:
669@enumerate
670@item @dfn{Code point} (any value in the Unicode codespace)
671@item @dfn{Grapheme cluster} (user-perceived character made of a single or
672multiple Unicode code points, e.g. \"G\" + acute-accent)
673@item Word break
674@item Sentence break
675@item Line break
676@end enumerate")
677 (license license:expat)))
678
679(define-public python2-uniseg
680 (package-with-python2 python-uniseg))
681
682(define-public python-humanfriendly
683 (package
684 (name "python-humanfriendly")
685 (version "4.4.1")
686 (source
687 (origin
688 (method url-fetch)
689 (uri (pypi-uri "humanfriendly" version))
690 (sha256
691 (base32
692 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
693 (build-system python-build-system)
694 (arguments
695 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
696 #:tests? #f))
697 (propagated-inputs
698 `(("python-monotonic" ,python-monotonic)))
699 (home-page "https://humanfriendly.readthedocs.io")
700 (synopsis "Human-friendly input and output in Python")
701 (description
702 "The functions and classes in @code{humanfriendly} can be used to make
703text interfaces more user-friendly. It includes tools to parse and format
704numbers, file sizes, and timespans, timers for long-running operations, menus
705to allow the user to choose from a list of options, and terminal interaction
706helpers.")
707 (license license:expat)))
708
709(define-public python2-humanfriendly
710 (package-with-python2 python-humanfriendly))
711
712(define-public python-capturer
713 (package
714 (name "python-capturer")
715 (version "2.4")
716 (source
717 (origin
718 (method url-fetch)
719 (uri (pypi-uri "capturer" version))
720 (sha256
721 (base32
722 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
723 (build-system python-build-system)
724 (arguments
725 `(#:tests? #f))
726 (propagated-inputs
727 `(("python-humanfriendly" ,python-humanfriendly)))
728 (home-page "https://capturer.readthedocs.io")
729 (synopsis "Capture stdout and stderr streams of the current process")
730 (description
731 "The capturer package makes it easy to capture the stdout and stderr
732streams of the current process and subprocesses. Output can be relayed
733to the terminal in real time but is also available to the Python program
734for additional processing.")
735 (license license:expat)))
736
737(define-public python2-capturer
738 (package-with-python2 python-capturer))
739
740(define-public python-case
741 (package
742 (name "python-case")
743 (version "1.5.3")
744 (source
745 (origin
746 (method url-fetch)
747 (uri (pypi-uri "case" version))
748 (sha256
749 (base32
750 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
751 (build-system python-build-system)
752 (propagated-inputs
753 `(("python-mock" ,python-mock)
754 ("python-nose" ,python-nose)
755 ("python-six" ,python-six)
756 ("python-unittest2" ,python-unittest2)))
757 (native-inputs
758 `(("python-coverage" ,python-coverage)))
759 (home-page "https://github.com/celery/case")
760 (synopsis "Unittest utilities and convenience methods")
761 (description
762 "The @code{case} package provides utilities on top of unittest, including
763some helpful Python 2 compatibility convenience methods.")
764 (license license:bsd-3)))
765
766(define-public python-verboselogs
767 (package
768 (name "python-verboselogs")
769 (version "1.7")
770 (source
771 (origin
772 (method url-fetch)
773 (uri (pypi-uri "verboselogs" version))
774 (sha256
775 (base32
776 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
777 (build-system python-build-system)
778 (native-inputs
779 `(("python-mock" ,python-mock)
780 ("python-astroid" ,python-astroid)
781 ("python-pylint" ,python-pylint)))
782 (home-page "https://verboselogs.readthedocs.io")
783 (synopsis "Verbose logging level for Python's logging module")
784 (description
785 "The @code{verboselogs} package extends Python's @code{logging} module to
786add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
787 (license license:expat)))
788
789(define-public python2-verboselogs
790 (package-with-python2 python-verboselogs))
791
792(define-public python-coloredlogs
793 (package
794 (name "python-coloredlogs")
795 (version "7.3")
796 (source
797 (origin
798 (method url-fetch)
799 (uri (pypi-uri "coloredlogs" version))
800 (sha256
801 (base32
802 "1blcann6dyg5dhps9pg12rn0q0rjrlajpmmil0gy0j4cbvnl2il9"))))
803 (build-system python-build-system)
804 (arguments
805 `(;Tests require some updated modules
806 #:tests? #f))
807 (propagated-inputs
808 `(("python-capturer" ,python-capturer)))
809 (home-page "https://coloredlogs.readthedocs.io")
810 (synopsis "Colored stream handler for Python's logging module")
811 (description
812 "The @code{coloredlogs} package enables colored terminal output for
813Python's logging module. The @code{ColoredFormatter} class inherits from
814@code{logging.Formatter} and uses ANSI escape sequences to render your logging
815messages in color.")
816 (license license:expat)))
817
818(define-public python2-coloredlogs
819 (package-with-python2 python-coloredlogs))
820
821(define-public python-eventlet
822 (package
823 (name "python-eventlet")
824 (version "0.20.1")
825 (source
826 (origin
827 (method url-fetch)
828 (uri (pypi-uri "eventlet" version))
829 (sha256
830 (base32
831 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
832 (build-system python-build-system)
833 (propagated-inputs
834 `(("python-greenlet" ,python-greenlet)))
835 (arguments
836 ;; TODO: Requires unpackaged 'enum-compat'.
837 '(#:tests? #f))
838 (home-page "http://eventlet.net")
839 (synopsis "Concurrent networking library for Python")
840 (description
841 "Eventlet is a concurrent networking library for Python that
842allows you to change how you run your code, not how you write it.
843It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
844Coroutines ensure that the developer uses a blocking style of programming
845that is similar to threading, but provide the benefits of non-blocking I/O.
846The event dispatch is implicit, which means you can easily use @code{Eventlet}
847from the Python interpreter, or as a small part of a larger application.")
848 (license license:expat)))
849
850(define-public python2-eventlet
851 (let ((base (package-with-python2
852 (strip-python2-variant python-eventlet))))
853 (package (inherit base)
854 (propagated-inputs
855 `(("python2-enum34" ,python2-enum34)
856 ,@(package-propagated-inputs base))))))
857
858(define-public python-six
859 (package
860 (name "python-six")
861 (version "1.11.0")
862 (source
863 (origin
864 (method url-fetch)
865 (uri (pypi-uri "six" version))
866 (sha256
867 (base32
868 "1scqzwc51c875z23phj48gircqjgnn3af8zy2izjwmnlxrxsgs3h"))))
869 (build-system python-build-system)
870 (arguments
871 `(#:phases
872 (modify-phases %standard-phases
873 (replace 'check
874 (lambda _
875 (invoke "py.test" "-v"))))))
876 (native-inputs
877 `(("python-py" ,python-py)
878 ("python-pytest" ,python-pytest-bootstrap)))
879 (home-page "https://pypi.python.org/pypi/six/")
880 (synopsis "Python 2 and 3 compatibility utilities")
881 (description
882 "Six is a Python 2 and 3 compatibility library. It provides utility
883functions for smoothing over the differences between the Python versions with
884the goal of writing Python code that is compatible on both Python versions.
885Six supports every Python version since 2.5. It is contained in only one
886Python file, so it can be easily copied into your project.")
887 (license license:x11)))
888
889(define-public python2-six
890 (package-with-python2 python-six))
891
892(define-public python-six-bootstrap
893 (package
894 (inherit python-six)
895 (name "python-six-bootstrap")
896 (native-inputs `())
897 (arguments `(#:tests? #f))))
898
899(define-public python2-six-bootstrap
900 (package-with-python2 python-six-bootstrap))
901
902(define-public python-schedule
903 (package
904 (name "python-schedule")
905 (version "0.4.3")
906 (source
907 (origin
908 (method url-fetch)
909 (uri (pypi-uri "schedule" version))
910 (sha256
911 (base32
912 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
913 (build-system python-build-system)
914 (native-inputs
915 `(("python-pytest" ,python-pytest)
916 ("python-mock" ,python-mock)))
917 (home-page "https://github.com/dbader/schedule")
918 (synopsis "Schedule periodic function calls in Python")
919 (description
920 "Schedule is an in-process scheduler for periodic jobs that uses the
921builder pattern for configuration. Schedule lets you run Python functions (or
922any other callable) periodically at pre-determined intervals using a simple,
923human-friendly syntax.")
924 (license license:expat)))
925
926(define-public python2-schedule
927 (package-with-python2 python-schedule))
928
929(define-public python-pandas
930 (package
931 (name "python-pandas")
932 (version "0.23.4")
933 (source
934 (origin
935 (method url-fetch)
936 (uri (pypi-uri "pandas" version))
937 (sha256
938 (base32 "1x54pd7hr3y7qahx6b5bf2wzj54xvl8r3s1h4pl254pnmi3wl92v"))))
939 (build-system python-build-system)
940 (arguments
941 `(#:modules ((guix build utils)
942 (guix build python-build-system)
943 (ice-9 ftw)
944 (srfi srfi-26))
945 #:phases (modify-phases %standard-phases
946 (replace 'check
947 (lambda _
948 (let ((build-directory
949 (string-append
950 (getcwd) "/build/"
951 (car (scandir "build"
952 (cut string-prefix? "lib." <>))))))
953 ;; Disable the "strict data files" option which causes
954 ;; the build to error out if required data files are not
955 ;; available (as is the case with PyPI archives).
956 (substitute* "setup.cfg"
957 (("addopts = --strict-data-files") "addopts = "))
958 (with-directory-excursion build-directory
959 ;; Delete tests that require "moto" which is not yet in Guix.
960 (for-each delete-file
961 '("pandas/tests/io/conftest.py"
962 "pandas/tests/io/json/test_compression.py"
963 "pandas/tests/io/parser/test_network.py"
964 "pandas/tests/io/test_excel.py"
965 "pandas/tests/io/test_parquet.py"))
966 (invoke "pytest" "-vv" "pandas" "--skip-slow"
967 "--skip-network" "-k"
968 ;; XXX: Due to the deleted tests above.
969 "not test_read_s3_jsonl"))))))))
970 (propagated-inputs
971 `(("python-numpy" ,python-numpy)
972 ("python-pytz" ,python-pytz)
973 ("python-dateutil" ,python-dateutil)))
974 (native-inputs
975 `(("python-cython" ,python-cython)
976 ("python-beautifulsoup4" ,python-beautifulsoup4)
977 ("python-lxml" ,python-lxml)
978 ("python-html5lib" ,python-html5lib)
979 ("python-nose" ,python-nose)
980 ("python-pytest" ,python-pytest)))
981 (home-page "https://pandas.pydata.org")
982 (synopsis "Data structures for data analysis, time series, and statistics")
983 (description
984 "Pandas is a Python package providing fast, flexible, and expressive data
985structures designed to make working with structured (tabular,
986multidimensional, potentially heterogeneous) and time series data both easy
987and intuitive. It aims to be the fundamental high-level building block for
988doing practical, real world data analysis in Python.")
989 (license license:bsd-3)))
990
991(define-public python2-pandas
992 (package-with-python2 python-pandas))
993
994(define-public python2-mechanize
995 (package
996 (name "python2-mechanize")
997 (version "0.2.5")
998 (source
999 (origin
1000 (method url-fetch)
1cc184e6 1001 (uri (pypi-uri "mechanize" version))
44d10b1f
RW
1002 (sha256
1003 (base32
1004 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1005 (build-system python-build-system)
1006 (arguments
1007 `(#:python ,python-2 ; apparently incompatible with Python 3
1008 #:tests? #f))
1009 ;; test fails with message
1010 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1011 ;; (python-3.3.2) or
1012 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1013 ;; (python-2.7.5).
1014 ;; The source code is from March 2011 and probably not up-to-date
1015 ;; with respect to python unit tests.
1016 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1017 (synopsis
1018 "Stateful programmatic web browsing in Python")
1019 (description
1020 "Mechanize implements stateful programmatic web browsing in Python,
1021after Andy Lester’s Perl module WWW::Mechanize.")
1022 (license (license:non-copyleft
1023 "file://COPYING"
1024 "See COPYING in the distribution."))))
1025
1026
1027(define-public python-simplejson
1028 (package
1029 (name "python-simplejson")
1030 (version "3.14.0")
1031 (source
1032 (origin
1033 (method url-fetch)
1034 (uri (pypi-uri "simplejson" version))
1035 (sha256
1036 (base32
1037 "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy"))))
1038 (build-system python-build-system)
1039 (home-page "http://simplejson.readthedocs.org/en/latest/")
1040 (synopsis
1041 "Json library for Python")
1042 (description
1043 "JSON (JavaScript Object Notation) is a subset of JavaScript
1044syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1045format.
1046
1047Simplejson exposes an API familiar to users of the standard library marshal
1048and pickle modules. It is the externally maintained version of the json
1049library contained in Python 2.6, but maintains compatibility with Python 2.5
1050and (currently) has significant performance advantages, even without using
1051the optional C extension for speedups. Simplejson is also supported on
1052Python 3.3+.")
1053 (license license:x11)))
1054
1055(define-public python2-simplejson
1056 (package-with-python2 python-simplejson))
1057
1058
1059(define-public python-pyicu
1060 (package
1061 (name "python-pyicu")
1062 (version "2.2")
1063 (source
1064 (origin
1065 (method url-fetch)
1066 (uri (pypi-uri "PyICU" version))
1067 (sha256
1068 (base32
1069 "0wq9y5fi1ighgf5aws9nr87vi1w44p7q1k83rx2y3qj5d2xyhspa"))))
1070 (build-system python-build-system)
1071 (inputs
1072 `(("icu4c" ,icu4c)))
1073 (native-inputs
1074 `(("python-pytest" ,python-pytest)
1075 ("python-six" ,python-six)))
1076 (home-page "https://github.com/ovalhub/pyicu")
1077 (synopsis "Python extension wrapping the ICU C++ API")
1078 (description
1079 "PyICU is a python extension wrapping the ICU C++ API.")
1080 (properties `((python2-variant . ,(delay python2-pyicu))))
1081 (license license:x11)))
1082
1083(define-public python2-pyicu
1084 (let ((base (package-with-python2
1085 (strip-python2-variant python-pyicu))))
1086 (package
1087 (inherit base)
1088 (arguments
1089 `(,@(package-arguments base)
1090 #:phases
1091 (modify-phases %standard-phases
1092 (add-before 'check 'delete-failing-test
1093 (λ _
1094 ;; XXX: This fails due to Unicode issues unique to Python 2,
1095 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1096 (delete-file "test/test_Script.py")
1097 #t))))))))
1098
1099(define-public python2-dogtail
1100 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1101 ;; spaces in indentation" with Python 3.
1102 (package
1103 (name "python2-dogtail")
1104 (version "0.9.9")
1105 (source (origin
1106 (method url-fetch)
1107 (uri (pypi-uri "dogtail" version))
1108 (sha256
1109 (base32
1110 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1111 (build-system python-build-system)
1112 (arguments `(#:python ,python-2
1113 #:tests? #f)) ; invalid command "test"
1114 ;; Currently no offical homepage.
1115 (home-page "https://pypi.python.org/pypi/dogtail/")
1116 (synopsis "GUI test tool and automation framework written in Python")
1117 (description
1118 "Dogtail is a GUI test tool and automation framework written in Python.
1119It uses Accessibility (a11y) technologies to communicate with desktop
1120applications. dogtail scripts are written in Python and executed like any
1121other Python program.")
1122 (license license:gpl2+)))
1123
1124(define-public python-empy
1125 (package
1126 (name "python-empy")
1127 (version "3.3")
1128 (source (origin
1129 (method url-fetch)
1130 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1131 version ".tar.gz"))
1132 (sha256
1133 (base32
1134 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1135 (build-system python-build-system)
1136 (arguments
1137 `(#:tests? #f)) ;python2 only
1138 (home-page "http://www.alcyone.com/software/empy/")
1139 (synopsis "Templating system for Python")
1140 (description
1141 "EmPy is a system for embedding Python expressions and statements in
1142template text; it takes an EmPy source file, processes it, and produces
1143output. This is accomplished via expansions, which are special signals to the
1144EmPy system and are set off by a special prefix (by default the at sign, @@).
1145EmPy can expand arbitrary Python expressions and statements in this way, as
1146well as a variety of special forms. Textual data not explicitly delimited in
1147this way is sent unaffected to the output, allowing Python to be used in
1148effect as a markup language. Also supported are callbacks via hooks,
1149recording and playback via diversions, and dynamic, chainable filters. The
1150system is highly configurable via command line options and embedded
1151commands.")
1152 (license license:lgpl2.1+)))
1153
1154(define-public python2-empy
1155 (package-with-python2 python-empy))
1156
1157(define-public python2-element-tree
1158 (package
1159 (name "python2-element-tree")
1160 (version "1.2.6")
1161 (source (origin
1162 (method url-fetch)
1163 (uri (string-append
1164 "http://effbot.org/media/downloads/elementtree-"
1165 version "-20050316.tar.gz"))
1166 (sha256
1167 (base32
1168 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1169 (build-system python-build-system)
1170 (arguments
1171 `(#:python ,python-2 ; seems to be part of Python 3
1172 #:tests? #f)) ; no 'test' sub-command
1173 (synopsis "Toolkit for XML processing in Python")
1174 (description
1175 "ElementTree is a Python library supporting lightweight XML processing.")
1176 (home-page "http://effbot.org/zone/element-index.htm")
1177 (license (license:x11-style
1178 "http://docs.python.org/2/license.html"
1179 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1180
1181(define-public python2-pybugz
1182 (package
1183 (name "python2-pybugz")
1184 (version "0.6.11")
1185 (source (origin
1186 (method url-fetch)
1187 (uri (string-append
1188 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1189 version ".tar.gz"))
1190 (sha256
1191 (base32
1192 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1193 (patches (search-patches "pybugz-stty.patch"
1194 "pybugz-encode-error.patch"))))
1195 (build-system python-build-system)
1196 (arguments
1197 `(#:python ,python-2 ; SyntaxError with Python 3
1198 #:tests? #f)) ; no 'test' sub-command
1199 (propagated-inputs
1200 `(("element-tree" ,python2-element-tree)))
1201 (synopsis "Python and command-line interface to Bugzilla")
1202 (description
1203 "PyBugz is a Python library and command-line tool to query the Bugzilla
1204bug tracking system. It is meant as an aid to speed up interaction with the
1205bug tracker.")
1206 (home-page "http://www.liquidx.net/pybugz/")
1207 (license license:gpl2)))
1208
1209(define-public python2-enum
1210 (package
1211 (name "python2-enum")
1212 (version "0.4.6")
1213 (source (origin
1214 (method url-fetch)
1215 (uri (pypi-uri "enum" version))
1216 (sha256
1217 (base32
1218 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1219 (build-system python-build-system)
1220 (arguments
1221 `(#:python ,python-2))
1222 (home-page "http://pypi.python.org/pypi/enum/")
1223 (synopsis "Robust enumerated type support in Python")
1224 (description
1225 "This provides a module for robust enumerations in Python. It has
1226been superseded by the Python standard library and is provided only for
1227compatibility.")
1228 ;; Choice of either license.
1229 (license (list license:gpl3+ license:psfl))))
1230
1231(define-public python-enum34
1232 (package
1233 (name "python-enum34")
1234 (version "1.1.6")
1235 (source
1236 (origin
1237 (method url-fetch)
1238 (uri (pypi-uri "enum34" version))
1239 (sha256
1240 (base32
1241 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1242 (build-system python-build-system)
1243 (home-page "https://pypi.python.org/pypi/enum34")
1244 (synopsis "Backported Python 3.4 Enum")
1245 (description
1246 "Enum34 is the new Python stdlib enum module available in Python 3.4
1247backported for previous versions of Python from 2.4 to 3.3.")
1248 (license license:bsd-3)))
1249
1250(define-public python2-enum34
1251 (package-with-python2 python-enum34))
1252
1253(define-public python-parse-type
1254 (package
1255 (name "python-parse-type")
1256 (version "0.4.2")
1257 (source
1258 (origin
1259 (method url-fetch)
1260 (uri (pypi-uri "parse_type" version))
1261 (sha256
1262 (base32
1263 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1264 (build-system python-build-system)
1265 (propagated-inputs
1266 `(("python-six" ,python-six)
1267 ("python-parse" ,python-parse)))
1268 (native-inputs
1269 `(("python-pytest" ,python-pytest)
1270 ("python-pytest-runner" ,python-pytest-runner)))
1271 (home-page "https://github.com/jenisys/parse_type")
1272 (synopsis "Extended parse module")
1273 (description
1274 "Parse_type extends the python parse module.")
1275 (properties
1276 `((python2-variant . ,(delay python2-parse-type))))
1277 (license license:bsd-3)))
1278
1279(define-public python2-parse-type
1280 (let ((base (package-with-python2
1281 (strip-python2-variant python-parse-type))))
1282 (package (inherit base)
1283 (propagated-inputs
1284 `(("python2-enum34" ,python2-enum34)
1285 ,@(package-propagated-inputs base))))))
1286
1287(define-public python-parse
1288 (package
1289 (name "python-parse")
1290 (version "1.8.4")
1291 (source
1292 (origin
1293 (method url-fetch)
1294 (uri (pypi-uri "parse" version))
1295 (sha256
1296 (base32
1297 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
1298 (build-system python-build-system)
1299 (arguments
1300 `(#:phases
1301 (modify-phases %standard-phases
1302 (replace 'check
1303 (lambda _ (invoke "python" "test_parse.py"))))))
1304 (home-page "https://github.com/r1chardj0n3s/parse")
1305 (synopsis "Parse strings")
1306 (description
1307 "Parse strings using a specification based on the Python @code{format()}
1308syntax.")
1309 (license license:x11)))
1310
1311(define-public python-polib
1312 (package
1313 (name "python-polib")
1314 (version "1.0.8")
1315 (source (origin
1316 (method url-fetch)
1317 (uri (pypi-uri "polib" version))
1318 (sha256
1319 (base32
1320 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1321 (build-system python-build-system)
1322 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1323 (synopsis "Manipulate, create and modify gettext files")
1324 (description "Polib can manipulate any gettext format (po, pot and mo)
1325files. It can be used to create po files from scratch or to modify
1326existing ones.")
1327 (license license:expat)))
1328
1329(define-public python2-polib
1330 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1331 (package
1332 (inherit base)
1333 (arguments `(,@(package-arguments base)
1334 ;; Tests don't work with python2.
1335 #:tests? #f)))))
1336
1337(define-public scons
1338 (package
1339 (name "scons")
ad34338d 1340 (version "3.0.3")
44d10b1f 1341 (source (origin
ad34338d
RW
1342 (method git-fetch)
1343 (uri (git-reference
1344 (url "https://github.com/SCons/scons.git")
1345 (commit version)))
1346 (file-name (git-file-name name version))
44d10b1f
RW
1347 (sha256
1348 (base32
ad34338d 1349 "1xizkjgrvydkjhpv7i5rx0mdkp3618sis7jsckjh57nxcynlk5dc"))))
44d10b1f
RW
1350 (build-system python-build-system)
1351 (arguments
1352 `(#:use-setuptools? #f ; still relies on distutils
ad34338d
RW
1353 #:tests? #f ; no 'python setup.py test' command
1354 #:phases
1355 (modify-phases %standard-phases
1356 (add-before 'build 'bootstrap
1357 (lambda _
1358 (substitute* "src/engine/SCons/compat/__init__.py"
1359 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
1360 "sys.modules[new] = __import__(old)"))
1361 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
1362 (chdir "build/scons")
1363 #t)))))
44d10b1f
RW
1364 (home-page "http://scons.org/")
1365 (synopsis "Software construction tool written in Python")
1366 (description
1367 "SCons is a software construction tool. Think of SCons as an improved,
1368cross-platform substitute for the classic Make utility with integrated
1369functionality similar to autoconf/automake and compiler caches such as ccache.
1370In short, SCons is an easier, more reliable and faster way to build
1371software.")
1372 (license license:x11)))
1373
1374(define-public scons-python2
1375 (package
1376 (inherit (package-with-python2 scons))
1377 (name "scons-python2")))
1378
1379(define-public python-extras
1380 (package
1381 (name "python-extras")
1382 (version "1.0.0")
1383 (source
1384 (origin
1385 (method url-fetch)
1386 (uri (pypi-uri "extras" version))
1387 (sha256
1388 (base32
1389 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1390 (build-system python-build-system)
1391 (arguments
1392 ;; FIXME: Circular dependency on testtools.
1393 '(#:tests? #f))
1394 (home-page "https://github.com/testing-cabal/extras")
1395 (synopsis "Useful extensions to the Python standard library")
1396 (description
1397 "Extras is a set of extensions to the Python standard library.")
1398 (license license:expat)))
1399
1400(define-public python2-extras
1401 (package-with-python2 python-extras))
1402
1403(define-public python-mimeparse
1404 (package
1405 (name "python-mimeparse")
1406 (version "1.6.0")
1407 (source
1408 (origin
1409 (method url-fetch)
89bf667c 1410 (uri (pypi-uri "python-mimeparse" version))
44d10b1f
RW
1411 (sha256
1412 (base32
1413 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
1414 (build-system python-build-system)
1415 (arguments
1416 '(#:phases
1417 (modify-phases %standard-phases
1418 (replace 'check
1419 (lambda _
1420 (invoke "./mimeparse_test.py"))))))
1421 (home-page
1422 "https://github.com/dbtsai/python-mimeparse")
1423 (synopsis "Python library for parsing MIME types")
1424 (description
1425 "Mimeparse provides basic functions for parsing MIME type names and
1426matching them against a list of media-ranges.")
1427 (license license:expat)))
1428
1429(define-public python2-mimeparse
1430 (package-with-python2 python-mimeparse))
1431
1432(define-public python-miniboa
1433 (package
1434 (name "python-miniboa")
1435 (version "1.0.7")
1436 (source
1437 (origin
1438 (method url-fetch)
1439 (uri (pypi-uri "miniboa" version))
1440 (sha256
1441 (base32
1442 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
1443 (build-system python-build-system)
1444 (home-page "https://github.com/shmup/miniboa")
1445 (synopsis "Simple, single-threaded Telnet server")
1446 (description
1447 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
1448server.")
1449 (license license:asl2.0)))
1450
1451(define-public python2-miniboa
1452 (package-with-python2 python-miniboa))
1453
1454(define-public python-pafy
1455 (package
1456 (name "python-pafy")
1457 (version "0.5.3.1")
1458 (source
1459 (origin
1460 (method url-fetch)
1461 (uri (pypi-uri "pafy" version))
1462 (sha256
1463 (base32
1464 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1465 (build-system python-build-system)
1466 (arguments
1467 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1468 (propagated-inputs
1469 ;; Youtube-dl is a python package which is imported in the file
1470 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1471 `(("youtube-dl" ,youtube-dl)))
1472 (home-page "https://np1.github.io/pafy/")
1473 (synopsis "Retrieve YouTube content and metadata")
1474 (description
1475 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1476 (license license:lgpl3+)))
1477
1478(define-public python2-funcsigs
1479 (package
1480 (name "python2-funcsigs")
1481 (version "1.0.2")
1482 (source (origin
1483 (method url-fetch)
1484 (uri (pypi-uri "funcsigs" version))
1485 (sha256
1486 (base32
1487 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1488 (build-system python-build-system)
1489 (arguments
1490 `(#:python ,python-2))
1491 (native-inputs
1492 `(("python2-unittest2" ,python2-unittest2)))
1493 (home-page "http://funcsigs.readthedocs.org")
1494 (synopsis "Python function signatures from PEP362")
1495 (description
1496 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1497 (license license:asl2.0)))
1498
1499(define-public python2-funcsigs-bootstrap
1500 (package
1501 (inherit python2-funcsigs)
1502 (name "python2-funcsigs-bootstrap")
1503 (native-inputs `())
1504 (arguments
1505 `(#:tests? #f
1506 ,@(package-arguments python2-funcsigs)))))
1507
1508(define-public python-py
1509 (package
1510 (name "python-py")
1511 (version "1.5.4")
1512 (source
1513 (origin
1514 (method url-fetch)
1515 (uri (pypi-uri "py" version))
1516 (sha256
1517 (base32
1518 "1xxvwfn82457djf55f5n2c94699rfqnk43br8fif2r2q8gvrmm9z"))))
1519 (build-system python-build-system)
1520 (arguments
1521 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1522 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1523 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1524 ;; Is this module globally installed?"
1525 '(#:tests? #f))
1526 (native-inputs
1527 `(("python-setuptools-scm" ,python-setuptools-scm)))
1528 (home-page "https://github.com/pytest-dev/py")
1529 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1530 (description
1531 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1532code introspection, and logging.")
1533 (license license:expat)))
1534
1535(define-public python2-py
1536 (package-with-python2 python-py))
1537
1538;; Recent versions of python-fixtures and python-testrepository need
1539;; python-pbr for packaging, which itself needs these two packages for
1540;; testing.
1541;; To fix this circular dependency, we use a build of python-pbr, based on the
1542;; same source, just without any test dependencies and with tests disabled.
1543;; python-pbr-minmal is then used to package python-fixtures and
1544;; python-testrepository.
1545;; Strictly speaking we currently could remove the test-requirements from the
1546;; normal python-pbr package (and save this package) since test are disabled
1547;; there anyway. But this may change in future.
1548(define-public python-pbr-minimal
1549 (package
1550 (name "python-pbr-minimal")
1551 (version "3.0.1")
1552 (source
1553 (origin
1554 (method url-fetch)
1555 (uri (pypi-uri "pbr" version))
1556 (sha256
1557 (base32
1558 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
1559 (build-system python-build-system)
1560 (arguments
1561 `(#:tests? #f))
1562 (home-page "http://docs.openstack.org/developer/pbr/")
1563 (synopsis "Minimal build of python-pbr used for bootstrapping")
1564 (description
1565 "Used only for bootstrapping python2-pbr, you should not need this.")
1566 (license license:asl2.0)))
1567
1568(define-public python2-pbr-minimal
1569 (package-with-python2 python-pbr-minimal))
1570
1571(define-public python-pbr
1572 (package
1573 (inherit python-pbr-minimal)
1574 (name "python-pbr")
1575 (arguments
1576 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1577 (propagated-inputs
1578 `(("git" ,git))) ;; pbr actually uses the "git" binary.
1579 (native-inputs
1580 `(("python-fixtures" ,python-fixtures-bootstrap)
1581 ;; discover, coverage, hacking, subunit
1582 ("python-mock" ,python-mock)
1583 ("python-six" ,python-six)
1584 ("python-sphinx" ,python-sphinx)
1585 ("python-testrepository" ,python-testrepository-bootstrap)
1586 ("python-testresources" ,python-testresources-bootstrap)
1587 ("python-testscenarios" ,python-testscenarios-bootstrap)
1588 ("python-testtools" ,python-testtools-bootstrap)
1589 ("python-virtualenv" ,python-virtualenv)))
1590 (synopsis "Enhance the default behavior of Python’s setuptools")
1591 (description
1592 "Python Build Reasonableness (PBR) is a library that injects some useful
1593and sensible default behaviors into your setuptools run. It will set
1594versions, process requirements files and generate AUTHORS and ChangeLog file
1595from git information.
1596")))
1597
1598(define-public python2-pbr
1599 (package-with-python2 python-pbr))
1600
1601(define-public python-exif-read
1602 (package
1603 (name "python-exif-read")
1604 (version "2.1.2")
1605 (source (origin
1606 (method url-fetch)
1607 (uri (pypi-uri "ExifRead" version))
1608 (sha256
1609 (base32
1610 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
1611 (build-system python-build-system)
1612 (arguments `(#:tests? #f)) ; no tests
1613 (home-page "https://github.com/ianare/exif-py")
1614 (synopsis "Python library to extract EXIF data from image files")
1615 (description
1616 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1617files.")
1618 (license license:bsd-3)))
1619
1620(define-public python2-exif-read
1621 (package-with-python2 python-exif-read))
1622
1623(define-public python-pyld
1624 (package
1625 (name "python-pyld")
1626 (version "1.0.3")
1627 (source (origin
1628 (method url-fetch)
1629 (uri (pypi-uri "PyLD" version))
1630 (sha256
1631 (base32
1632 "12i2g6xdj30k7xxcibg3sc5y76snwq8l6n8fy9lyi577kgy0h2pm"))))
1633 (build-system python-build-system)
1634 (home-page "https://github.com/digitalbazaar/pyld")
1635 (synopsis "Python implementation of the JSON-LD specification")
1636 (description
1637 "PyLD is an implementation of the JSON-LD specification.")
1638 (license license:bsd-3)))
1639
1640(define-public python2-pyld
1641 (package-with-python2 python-pyld))
1642
1643(define-public python-click
1644 (package
1645 (name "python-click")
61984855 1646 (version "7.0")
44d10b1f
RW
1647 (source
1648 (origin
1649 (method url-fetch)
1650 (uri (pypi-uri "click" version))
1651 (sha256
1652 (base32
61984855 1653 "1mzjixd4vjbjvzb6vylki9w1556a9qmdh35kzmq6cign46av952v"))))
44d10b1f
RW
1654 (build-system python-build-system)
1655 (arguments
8d7e7ca6 1656 `(#:phases
44d10b1f
RW
1657 (modify-phases %standard-phases
1658 (add-after 'unpack 'fix-paths
1659 (lambda* (#:key inputs #:allow-other-keys)
1660 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
1661 "cross-libc" "libc"))))
1662 (substitute* "click/_unicodefun.py"
1663 (("'locale'")
1664 (string-append "'" glibc "/bin/locale'"))))
8d7e7ca6
EF
1665 #t))
1666 (replace 'check
1667 (lambda _
1668 (invoke "python" "-m" "pytest"))))))
44d10b1f
RW
1669 (native-inputs
1670 `(("python-pytest" ,python-pytest)))
61984855 1671 (home-page "https://palletsprojects.com/p/click/")
44d10b1f
RW
1672 (synopsis "Command line library for Python")
1673 (description
1674 "Click is a Python package for creating command line interfaces in a
1675composable way with as little code as necessary. Its name stands for
1676\"Command Line Interface Creation Kit\". It's highly configurable but comes
1677with sensible defaults out of the box.")
1678 (license license:bsd-3)))
1679
1680(define-public python2-click
1681 (package-with-python2 python-click))
1682
1683(define-public python-wheel
1684 (package
1685 (name "python-wheel")
1686 (version "0.30.0a0")
1687 (source
1688 (origin
1689 (method url-fetch)
1690 (uri (pypi-uri "wheel" version))
1691 (sha256
1692 (base32
1693 "1nm6mn8isny0hr86rhbfrpfj867c0phf001xgsd69xfp9ady1wwq"))))
1694 (build-system python-build-system)
1695 (native-inputs
1696 `(("python-jsonschema" ,python-jsonschema)
1697 ("python-pytest-cov" ,python-pytest-cov)))
1698 (home-page "https://bitbucket.org/pypa/wheel/")
1699 (synopsis "Format for built Python packages")
1700 (description
1701 "A wheel is a ZIP-format archive with a specially formatted filename and
1702the @code{.whl} extension. It is designed to contain all the files for a PEP
1703376 compatible install in a way that is very close to the on-disk format. Many
1704packages will be properly installed with only the @code{Unpack} step and the
1705unpacked archive preserves enough information to @code{Spread} (copy data and
1706scripts to their final locations) at any later time. Wheel files can be
1707installed with a newer @code{pip} or with wheel's own command line utility.")
1708 (license license:expat)
1709 (properties `((python2-variant . ,(delay python2-wheel))))))
1710
1711(define-public python2-wheel
1712 (let ((wheel (package-with-python2
1713 (strip-python2-variant python-wheel))))
1714 (package (inherit wheel)
1715 (native-inputs `(("python2-functools32" ,python2-functools32)
1716 ,@(package-native-inputs wheel))))))
1717
1718(define-public python-vcversioner
1719 (package
1720 (name "python-vcversioner")
1721 (version "2.16.0.0")
1722 (source
1723 (origin
1724 (method url-fetch)
1725 (uri (pypi-uri "vcversioner" version))
1726 (sha256
1727 (base32
1728 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
1729 (build-system python-build-system)
1730 (synopsis "Python library for version number discovery")
1731 (description "Vcversioner is a Python library that inspects tagging
1732information in a variety of version control systems in order to discover
1733version numbers.")
1734 (home-page "https://github.com/habnabit/vcversioner")
1735 (license license:isc)))
1736
1737(define-public python2-vcversioner
1738 (package-with-python2 python-vcversioner))
1739
1740(define-public python-jsonschema
1741 (package
1742 (name "python-jsonschema")
1743 (version "2.6.0")
1744 (source (origin
1745 (method url-fetch)
786ccb87 1746 (uri (pypi-uri "jsonschema" version))
44d10b1f
RW
1747 (sha256
1748 (base32
1749 "00kf3zmpp9ya4sydffpifn0j0mzm342a2vzh82p6r0vh10cg7xbg"))))
1750 (build-system python-build-system)
1751 (arguments
1752 '(#:phases
1753 (modify-phases %standard-phases
8d466799 1754 (replace 'check (lambda _ (invoke "nosetests"))))))
44d10b1f
RW
1755 (native-inputs
1756 `(("python-nose" ,python-nose)
1757 ("python-vcversioner" ,python-vcversioner)))
1758 (home-page "https://github.com/Julian/jsonschema")
1759 (synopsis "Implementation of JSON Schema for Python")
1760 (description
1761 "Jsonschema is an implementation of JSON Schema for Python.")
1762 (license license:expat)
1763 (properties `((python2-variant . ,(delay python2-jsonschema))))))
1764
1765(define-public python2-jsonschema
1766 (let ((jsonschema (package-with-python2
1767 (strip-python2-variant python-jsonschema))))
1768 (package (inherit jsonschema)
1769 (native-inputs
1770 `(("python2-mock" ,python2-mock)
1771 ,@(package-native-inputs jsonschema)))
1772 (propagated-inputs
1773 `(("python2-functools32" ,python2-functools32))))))
1774
1775(define-public python-schema
1776 (package
1777 (name "python-schema")
1778 (version "0.6.6")
1779 (source
1780 (origin
1781 (method url-fetch)
1782 (uri (pypi-uri "schema" version))
1783 (sha256
1784 (base32
1785 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
1786 (build-system python-build-system)
1787 (native-inputs
1788 `(("python-pytest" ,python-pytest)))
1789 (home-page "https://github.com/keleshev/schema")
1790 (synopsis "Simple data validation library")
1791 (description
1792 "@code{python-schema} is a library for validating Python data
1793structures, such as those obtained from config-files, forms, external
1794services or command-line parsing, converted from JSON/YAML (or
1795something else) to Python data-types.")
1796 (license license:psfl)))
1797
1798(define-public python2-schema
1799 (package-with-python2 python-schema))
1800
1801(define-public python-schema-0.5
1802 (package (inherit python-schema)
1803 (version "0.5.0")
1804 (source
1805 (origin
1806 (method url-fetch)
1807 (uri (pypi-uri "schema" version))
1808 (sha256
1809 (base32
1810 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
1811
1812(define-public python2-schema-0.5
1813 (package-with-python2 python-schema-0.5))
1814
1815(define-public python-kitchen
1816 (package
1817 (name "python-kitchen")
1818 (version "1.2.5")
1819 (source
1820 (origin
1821 (method url-fetch)
1822 (uri (pypi-uri "kitchen" version))
1823 (sha256
1824 (base32
1825 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
1826 (build-system python-build-system)
1827 (propagated-inputs
1828 `(("python-chardet" ,python-chardet)))
1829 (home-page "https://github.com/fedora-infra/kitchen")
1830 (synopsis "Python API for snippets")
1831 (description "@code{kitchen} module provides a python API for all sorts of
1832little useful snippets of code that everybody ends up writing for their projects
1833but never seem big enough to build an independent release. Use kitchen and stop
1834cutting and pasting that code over and over.")
1835 (license (list license:lgpl2.1+
1836 ;; subprocess.py, test_subprocess.py,
1837 ;; kitchen/pycompat25/defaultdict.py:
1838 license:psfl))))
1839
1840(define-public python2-kitchen
1841 (package-with-python2 python-kitchen))
1842
1843(define-public python-unidecode
1844 (package
1845 (name "python-unidecode")
1846 (version "1.0.23")
1847 (source (origin
1848 (method url-fetch)
1849 (uri (pypi-uri "Unidecode" version))
1850 (sha256
1851 (base32
1852 "1ysjbr3nqfqj97h8zyj3v9pya413vkv7a1mzml80w37xx15kb1cb"))))
1853 (build-system python-build-system)
1854 (home-page "https://pypi.python.org/pypi/Unidecode")
1855 (synopsis "ASCII transliterations of Unicode text")
1856 (description
1857 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
1858useful when integrating with legacy code that doesn't support Unicode, or for
1859ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
1860machine identifiers from human-readable Unicode strings that should still be
1861somewhat intelligible.")
1862 (license license:gpl2+)))
1863
1864(define-public python2-unidecode
1865 (package-with-python2 python-unidecode))
1866
1867(define-public python-pyjwt
1868 (package
1869 (name "python-pyjwt")
1870 (version "1.5.3")
1871 (source
1872 (origin
1873 (method url-fetch)
1874 (uri (pypi-uri "PyJWT" version))
1875 (sha256
1876 (base32
1877 "1rxsg14i33vm2i6lz0my628108c81k43v10n4h3p0gx62xdyf2sh"))
1878 (modules '((guix build utils)))
1879 (snippet
1880 '(begin
1881 (for-each delete-file-recursively
1882 (find-files "." "\\.pyc$"))
1883 #t))))
1884 (build-system python-build-system)
1885 (native-inputs
1886 `(("python-pytest" ,python-pytest)
1887 ("python-pytest-cov" ,python-pytest-cov)
1888 ("python-pytest-runner" ,python-pytest-runner)))
1889 (home-page "https://github.com/progrium/pyjwt")
1890 (synopsis "JSON Web Token implementation in Python")
1891 (description
1892 "PyJWT is a JSON Web Token implementation written in Python.")
1893 (license license:expat)))
1894
1895(define-public python2-pyjwt
1896 (package-with-python2 python-pyjwt))
1897
1898(define-public python-pykka
1899 (package
1900 (name "python-pykka")
1901 (version "1.2.1")
1902 (source
1903 (origin
1904 (method url-fetch)
1905 (uri (pypi-uri "Pykka" version))
1906 (sha256
1907 (base32
1908 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
1909 (build-system python-build-system)
1910 (native-inputs
1911 `(("python-mock" ,python-mock)
1912 ("python-nose" ,python-nose)
1913 ("python-gevent" ,python-gevent)
1914 ("python-eventlet" ,python-eventlet)))
1915 (home-page "https://www.pykka.org/")
1916 (synopsis "Pykka is a Python implementation of the actor model")
1917 (description
1918 "Pykka is a Python implementation of the actor model.
1919The actor model introduces some simple rules to control the sharing
1920of state and cooperation between execution units, which makes it
1921easier to build concurrent applications.")
1922 (license license:asl2.0)))
1923
1924(define-public python2-pykka
1925 (package-with-python2 python-pykka))
1926
1927(define-public python-pympler
1928 (package
1929 (name "python-pympler")
1930 (home-page "https://pythonhosted.org/Pympler/")
1931 (version "0.5")
1932 (source (origin
1933 (method url-fetch)
1934 (uri (pypi-uri "Pympler" version))
1935 (sha256
1936 (base32
1937 "03qwsbilqgvnbl3a1jmpgixbr2kq6m3fvdlzyr3wdp01bwlc85kx"))))
1938 (build-system python-build-system)
1939 (arguments
1940 `(#:phases (modify-phases %standard-phases
1941 (delete 'check)
1942 (add-after 'install 'check
1943 (lambda* (#:key inputs outputs #:allow-other-keys)
1944 (add-installed-pythonpath inputs outputs)
1945 (invoke "python" "setup.py" "test"))))))
1946 (synopsis "Measure, monitor and analyze memory behavior")
1947 (description
1948 "Pympler is a development tool to measure, monitor and analyze
1949the memory behavior of Python objects in a running Python application.
1950
1951By pympling a Python application, detailed insight in the size and the
1952lifetime of Python objects can be obtained. Undesirable or unexpected
1953runtime behavior like memory bloat and other @samp{pymples} can easily
1954be identified.
1955
1956A web profiling frontend exposes process statistics, garbage
1957visualisation and class tracker statistics.")
1958 (license license:asl2.0)))
1959
1960(define-public python2-pympler
1961 (package-with-python2 python-pympler))
1962
1963(define-public python-itsdangerous
1964 (package
1965 (name "python-itsdangerous")
acfcf2ed 1966 (version "1.1.0")
44d10b1f
RW
1967 (source
1968 (origin
1969 (method url-fetch)
acfcf2ed 1970 (uri (pypi-uri "itsdangerous" version))
44d10b1f
RW
1971 (sha256
1972 (base32
acfcf2ed 1973 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
44d10b1f 1974 (build-system python-build-system)
acfcf2ed 1975 (home-page "https://palletsprojects.com/p/itsdangerous/")
44d10b1f
RW
1976 (synopsis "Python library for passing data to/from untrusted environments")
1977 (description
1978 "Itsdangerous provides various helpers to pass trusted data to untrusted
1979environments and back.")
1980 (license license:bsd-3)))
1981
1982(define-public python2-itsdangerous
1983 (package-with-python2 python-itsdangerous))
1984
1985(define-public python-pyyaml
1986 (package
1987 (name "python-pyyaml")
1988 (version "3.13")
1989 (source
1990 (origin
1991 (method url-fetch)
1992 (uri (pypi-uri "PyYAML" version))
1993 (sha256
1994 (base32
1995 "1gx603g484z46cb74j9rzr6sjlh2vndxayicvlyhxdz98lhhkwry"))))
1996 (build-system python-build-system)
1997 (inputs
1998 `(("libyaml" ,libyaml)))
1999 (home-page "http://pyyaml.org/wiki/PyYAML")
2000 (synopsis "YAML parser and emitter for Python")
2001 (description
2002 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2003complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2004API, and sensible error messages. PyYAML supports standard YAML tags and
2005provides Python-specific tags that allow to represent an arbitrary Python
2006object.")
2007 (license license:expat)))
2008
2009(define-public python2-pyyaml
2010 (package-with-python2 python-pyyaml))
2011
2012(define-public python-vine
2013 (package
2014 (name "python-vine")
2015 (version "1.1.4")
2016 (source
2017 (origin
2018 (method url-fetch)
2019 (uri (pypi-uri "vine" version))
2020 (sha256
2021 (base32
2022 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
2023 (build-system python-build-system)
2024 (native-inputs
2025 `(("python-pytest" ,python-pytest)
2026 ("python-case" ,python-case)))
2027 (home-page "https://github.com/celery/vine")
2028 (synopsis "Promises for Python")
2029 (description
2030 "@code{vine} provides a special implementation of promises in that it can
2031be used both for \"promise of a value\" and lazy evaluation. The biggest
2032upside for this is that everything in a promise can also be a promise,
2033e.g. filters, callbacks and errbacks can all be promises.")
2034 (license license:bsd-3)))
2035
2036(define-public python-virtualenv
2037 (package
2038 (name "python-virtualenv")
2782bd51 2039 (version "16.1.0")
44d10b1f
RW
2040 (source
2041 (origin
2042 (method url-fetch)
2043 (uri (pypi-uri "virtualenv" version))
2044 (sha256
2045 (base32
2782bd51 2046 "0242cg3hdq3qdvx5flyrki8lpwlgwf5k45c21ks5049fv7ygm6gq"))))
44d10b1f
RW
2047 (build-system python-build-system)
2048 (arguments
2049 `(#:phases
2050 (modify-phases %standard-phases
2782bd51 2051 (add-before 'check 'disable-failing-test
44d10b1f
RW
2052 (lambda _
2053 ;; Disable failing test. See upstream bug report
2054 ;; https://github.com/pypa/virtualenv/issues/957
2055 (substitute* "tests/test_virtualenv.py"
2056 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2782bd51 2057 #t)))))
44d10b1f
RW
2058 (native-inputs
2059 `(("python-mock" ,python-mock)
2060 ("python-pytest" ,python-pytest)))
2061 (home-page "https://virtualenv.pypa.io/")
2062 (synopsis "Virtual Python environment builder")
2063 (description
2064 "Virtualenv is a tool to create isolated Python environments.")
2065 (license license:expat)))
2066
2067(define-public python2-virtualenv
2068 (package-with-python2 python-virtualenv))
2069
2070(define-public python-markupsafe
2071 (package
2072 (name "python-markupsafe")
2073 (version "1.0")
2074 (source
2075 (origin
2076 (method url-fetch)
5182927c 2077 (uri (pypi-uri "MarkupSafe" version))
44d10b1f
RW
2078 (sha256
2079 (base32
2080 "0rdn1s8x9ni7ss8rfiacj7x1085lx8mh2zdwqslnw8xc3l4nkgm6"))))
2081 (build-system python-build-system)
2082 (home-page "https://github.com/mitsuhiko/markupsafe")
2083 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2084 (description
2085 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2086for Python.")
2087 (license license:bsd-3)))
2088
2089(define-public python2-markupsafe
2090 (package-with-python2 python-markupsafe))
2091
2092(define-public python-jinja2
2093 (package
2094 (name "python-jinja2")
2095 (version "2.10")
2096 (source
2097 (origin
2098 (method url-fetch)
2099 (uri (pypi-uri "Jinja2" version))
2100 (sha256
2101 (base32
2102 "190l36hfw3wb2n3n68yacjabxyb1pnxwn7vjx96cmjj002xy2jzq"))))
2103 (build-system python-build-system)
2104 (propagated-inputs
2105 `(("python-markupsafe" ,python-markupsafe)))
2106 (home-page "http://jinja.pocoo.org/")
2107 (synopsis "Python template engine")
2108 (description
2109 "Jinja2 is a small but fast and easy to use stand-alone template engine
2110written in pure Python.")
2111 (license license:bsd-3)))
2112
2113(define-public python2-jinja2
2114 (package-with-python2 python-jinja2))
2115
2116(define-public python-pystache
2117 (package
2118 (name "python-pystache")
2119 (version "0.5.4")
2120 (source (origin
2121 (method url-fetch)
2122 (uri (pypi-uri "pystache" version))
2123 (sha256
2124 (base32
2125 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2126 (build-system python-build-system)
2127 (arguments
2128 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2129 (home-page "http://defunkt.io/pystache/")
2130 (synopsis "Python logic-less template engine")
2131 (description
2132 "Pystache is a Python implementation of the framework agnostic,
2133logic-free templating system Mustache.")
2134 (license license:expat)
2135 (properties `((python2-variant . ,(delay python2-pystache))))))
2136
2137(define-public python2-pystache
2138 (package (inherit (package-with-python2
2139 (strip-python2-variant python-pystache)))
2140 (arguments
2141 `(#:python ,python-2
2142 #:phases
2143 (modify-phases %standard-phases
2144 (replace 'check
2145 (lambda _
dfafc29b 2146 (invoke "python" "test_pystache.py"))))))))
44d10b1f
RW
2147
2148(define-public python-joblib
2149 (package
2150 (name "python-joblib")
2151 (version "0.13.0")
2152 (source (origin
2153 (method url-fetch)
2154 (uri (pypi-uri "joblib" version))
2155 (sha256
2156 (base32
2157 "0612nazad8dxmn3xghfrmjax6456l4xy6hn9cngs7vydi14ds7v5"))))
2158 (build-system python-build-system)
2159 (arguments
2160 `(#:phases
2161 (modify-phases %standard-phases
2162 (replace 'check
2163 (lambda _ (invoke "pytest" "-v" "joblib"))))))
2164 (native-inputs
2165 `(("python-pytest" ,python-pytest)))
2166 (home-page "https://joblib.readthedocs.io/")
2167 (synopsis "Using Python functions as pipeline jobs")
2168 (description
2169 "Joblib is a set of tools to provide lightweight pipelining in Python.
2170In particular, joblib offers: transparent disk-caching of the output values
2171and lazy re-evaluation (memoize pattern), easy simple parallel computing
2172logging and tracing of the execution.")
2173 (license license:bsd-3)))
2174
2175(define-public python2-joblib
2176 (package-with-python2 python-joblib))
2177
2178(define-public python-docutils
2179 (package
2180 (name "python-docutils")
2181 (version "0.14")
2182 (source
2183 (origin
2184 (method url-fetch)
2185 (uri (pypi-uri "docutils" version))
2186 (sha256
2187 (base32
2188 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
2189 (build-system python-build-system)
2190 (arguments
2191 '(#:tests? #f)) ; no setup.py test command
2192 (home-page "http://docutils.sourceforge.net/")
2193 (synopsis "Python Documentation Utilities")
2194 (description
2195 "Docutils is a modular system for processing documentation into useful
2196formats, such as HTML, XML, and LaTeX. For input Docutils supports
2197reStructuredText.")
2198 ;; Most of the source code is public domain, but some source files are
2199 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2200 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2201
2202(define-public python2-docutils
2203 (package-with-python2 python-docutils))
2204
2205(define-public python-pygments
2206 (package
2207 (name "python-pygments")
2208 (version "2.2.0")
2209 (source
2210 (origin
2211 (method url-fetch)
2212 (uri (pypi-uri "Pygments" version))
2213 (sha256
2214 (base32
2215 "1k78qdvir1yb1c634nkv6rbga8wv4289xarghmsbbvzhvr311bnv"))))
2216 (build-system python-build-system)
2217 (arguments
2218 ;; FIXME: Tests require sphinx, which depends on this.
2219 '(#:tests? #f))
2220 (home-page "http://pygments.org/")
2221 (synopsis "Syntax highlighting")
2222 (description
2223 "Pygments is a syntax highlighting package written in Python.")
2224 (license license:bsd-2)))
2225
2226(define-public python2-pygments
2227 (package-with-python2 python-pygments))
2228
2229(define-public python-sphinxcontrib-websupport
2230 (package
2231 (name "python-sphinxcontrib-websupport")
2232 (version "1.1.0")
2233 (source (origin
2234 (method url-fetch)
2235 (uri (pypi-uri "sphinxcontrib-websupport" version))
2236 (sha256
2237 (base32
2238 "1ff3ix76xi1y6m99qxhaq5161ix9swwzydilvdya07mgbcvpzr4x"))))
2239 (build-system python-build-system)
2240 (arguments
2241 ;; FIXME: Tests depend on Sphinx, which depends on this.
2242 `(#:tests? #f))
2243 (home-page "http://sphinx-doc.org/")
2244 (synopsis "Sphinx API for web applications")
2245 (description "This package provides a Python API to easily integrate
2246Sphinx documentation into your web application. It provides tools to
2247integrate Sphinx documents in web templates and to handle searches.")
2248 (license license:bsd-3)))
2249
2250(define-public python2-sphinxcontrib-websupport
2251 (package-with-python2 python-sphinxcontrib-websupport))
2252
2253(define-public python-sphinx
2254 (package
2255 (name "python-sphinx")
2256 (version "1.7.7")
2257 (source
2258 (origin
2259 (method url-fetch)
2260 (uri (pypi-uri "Sphinx" version))
2261 (sha256
2262 (base32
2263 "0pkkbfj7cl157q550gcs45am5y78ps0h7q6455d64s1zmw01jlvi"))))
2264 (build-system python-build-system)
2265 (arguments
2266 `(#:phases
2267 (modify-phases %standard-phases
2268 (replace 'check
2269 (lambda _
2270 ;; Requires Internet access.
2271 (delete-file "tests/test_build_linkcheck.py")
2272 (substitute* "tests/test_build_latex.py"
2273 (("@pytest.mark.sphinx\\('latex', testroot='images'\\)")
2274 "@pytest.mark.skip()"))
2275 (when (which "python")
2276 ;; XXX: These tests are broken when using Python2:
2277 ;; <https://github.com/sphinx-doc/sphinx/issues/4710>.
2278 (delete-file "tests/test_api_translator.py")
2279 (delete-file "tests/test_setup_command.py"))
2280 (invoke "make" "test"))))))
2281 (propagated-inputs
2282 `(("python-imagesize" ,python-imagesize)
2283 ("python-sphinx-alabaster-theme"
2284 ,python-sphinx-alabaster-theme)
2285 ("python-babel" ,python-babel)
2286 ("python-snowballstemmer" ,python-snowballstemmer)
2287 ("python-docutils" ,python-docutils)
2288 ("python-jinja2" ,python-jinja2)
2289 ("python-packaging" ,python-packaging)
2290 ("python-pygments" ,python-pygments)
2291 ("python-requests" ,python-requests)
2292 ("python-six" ,python-six)
2293 ("python-sphinxcontrib-websupport" ,python-sphinxcontrib-websupport)))
2294 (native-inputs
2295 `(("graphviz" ,graphviz)
2296 ("imagemagick" ,imagemagick) ;for "convert"
2297 ("python-html5lib" ,python-html5lib)
2298 ("python-mock" ,python-mock)
2299 ("python-nose" ,python-nose)
2300 ("python-pytest" ,python-pytest)))
2301 (home-page "http://sphinx-doc.org/")
2302 (synopsis "Python documentation generator")
2303 (description "Sphinx is a tool that makes it easy to create documentation
2304for Python projects or other documents consisting of multiple reStructuredText
2305sources.")
2306 (license license:bsd-3)
2307 (properties `((python2-variant . ,(delay python2-sphinx))))))
2308
2309(define-public python2-sphinx
2310 (let ((base (package-with-python2 (strip-python2-variant python-sphinx))))
2311 (package
2312 (inherit base)
2313 (native-inputs `(("python2-mock" ,python2-mock)
2314 ("python2-enum34" ,python2-enum34)
2315 ,@(package-native-inputs base)))
2316 (propagated-inputs `(("python2-pytz" ,python2-pytz)
2317 ("python2-typing" ,python2-typing)
2318 ,@(package-propagated-inputs base))))))
2319
2320(define-public python-sphinx-gallery
2321 (package
2322 (name "python-sphinx-gallery")
2323 (version "0.1.13")
2324 (source (origin
2325 (method url-fetch)
2326 (uri (string-append "https://github.com/sphinx-gallery/sphinx-gallery"
2327 "/archive/v" version ".tar.gz"))
2328 (file-name (string-append name "-" version ".tar.gz"))
2329 (sha256
2330 (base32
2331 "03fs99mcb1r7qp0xixqv07vcz98sk21yq19ffdysi0infdcpzfkd"))))
2332 (build-system python-build-system)
2333 (arguments
2334 ;; FIXME: Tests attempt to download <https://docs.python.org/3/objects.inv>,
2335 ;; <https://docs.scipy.org/doc/numpy/objects.inv>, and
2336 ;; <https://matplotlib.org/objects.inv>.
2337 `(#:tests? #f))
2338 (native-inputs
2339 `(("python-pytest-runner" ,python-pytest-runner)))
2340 (home-page "https://sphinx-gallery.github.io/")
2341 (synopsis "Generate an examples gallery automatically")
2342 (description
2343 "@code{sphinx_gallery} is a Sphinx extension that builds an HTML version
2344from any set of Python scripts and puts it into an examples gallery.")
2345 (license license:bsd-3)))
2346
2347(define-public python2-sphinx-gallery
2348 (package-with-python2 python-sphinx-gallery))
2349
2350(define-public python-sphinx-rtd-theme
2351 (package
2352 (name "python-sphinx-rtd-theme")
2353 (version "0.2.4")
2354 (source
2355 (origin
2356 (method url-fetch)
2357 (uri (pypi-uri "sphinx_rtd_theme" version))
2358 (sha256
2359 (base32
2360 "05rlhjzdyapr2w74jjs7mrm8hi69qskcr5vya9f9drpsys7lpxrd"))))
2361 (build-system python-build-system)
2362 (arguments '(#:tests? #f)) ; No tests.
2363 (propagated-inputs
2364 `(("python-sphinx" ,python-sphinx)))
2365 (home-page "https://github.com/snide/sphinx_rtd_theme/")
2366 (synopsis "ReadTheDocs.org theme for Sphinx")
2367 (description "A theme for Sphinx used by ReadTheDocs.org.")
2368 (license license:expat)))
2369
2370(define-public python2-sphinx-rtd-theme
2371 (package-with-python2 python-sphinx-rtd-theme))
2372
2373(define-public python-guzzle-sphinx-theme
2374 (package
2375 (name "python-guzzle-sphinx-theme")
2376 (version "0.7.11")
2377 (source
2378 (origin
2379 (method url-fetch)
2380 (uri (pypi-uri "guzzle_sphinx_theme" version))
2381 (sha256
2382 (base32
2383 "1rnkzrrsbnifn3vsb4pfaia3nlvgvw6ndpxp7lzjrh23qcwid34v"))))
2384 (build-system python-build-system)
2385 (propagated-inputs
2386 `(("python-sphinx" ,python-sphinx)))
2387 (home-page "https://github.com/guzzle/guzzle_sphinx_theme")
2388 (synopsis "Sphinx theme used by Guzzle")
2389 (description "This package provides guzzle_sphinx_theme, a theme for the
2390Sphinx documentation system, used by @uref{http://docs.guzzlephp.org, Guzzle}
2391and several other projects.")
2392 (license license:expat)))
2393
2394(define-public python2-guzzle-sphinx-theme
2395 (package-with-python2 python-guzzle-sphinx-theme))
2396
2397(define-public python-rst.linker
2398 (package
2399 (name "python-rst.linker")
2400 (version "1.10")
2401 (source
2402 (origin
2403 (method url-fetch)
2404 (uri (pypi-uri "rst.linker" version))
2405 (sha256
2406 (base32
2407 "0iqaacp7pj1s8avs4kc0qg0r7dscywaq37y6l9j14glqdikk0wdj"))))
2408 (build-system python-build-system)
2409 (propagated-inputs
2410 `(("python-dateutil" ,python-dateutil)
2411 ("python-six" ,python-six)))
2412 (native-inputs
2413 `(("python-setuptools-scm" ,python-setuptools-scm)))
2414 ;; Test would require path.py, which would introduce a cyclic dependence.
2415 (arguments `(#:tests? #f))
2416 ;; Note: As of version 1.7 the documentation is not worth building.
2417 (home-page "https://github.com/jaraco/rst.linker")
2418 (synopsis "Sphinx plugin to add links and timestamps")
2419 (description "rst.linker allows to automatically replace text by a
2420reStructuredText external reference or timestamps. It's primary purpose is to
2421augment the changelog, but it can be used for other documents, too.")
2422 (license license:expat)))
2423
2424(define-public python2-rst.linker
2425 (package-with-python2 python-rst.linker))
2426
2427(define-public python-feedgenerator
2428 (package
2429 (name "python-feedgenerator")
2430 (version "1.9")
2431 (source
2432 (origin
2433 (method url-fetch)
2434 (uri (pypi-uri "feedgenerator" version))
2435 (sha256
2436 (base32
2437 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
2438 (modules '((guix build utils)))
2439 (snippet
2440 '(begin
2441 ;; Remove pre-compiled .pyc files from source.
2442 (for-each delete-file-recursively
2443 (find-files "." "__pycache__" #:directories? #t))
2444 (for-each delete-file (find-files "." "\\.pyc$"))
2445 #t))))
2446 (build-system python-build-system)
2447 (propagated-inputs
2448 `(("python-pytz" ,python-pytz)
2449 ("python-six" ,python-six)))
2450 (home-page "https://github.com/getpelican/feedgenerator")
2451 (synopsis
2452 "Standalone version of Django's Atom/RSS feed generator")
2453 (description
2454 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2455which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
2456 (license license:bsd-3)))
2457
2458(define-public python2-feedgenerator
2459 (package-with-python2 python-feedgenerator))
2460
2461(define-public python-toml
2462 (package
2463 (name "python-toml")
2464 (version "0.9.4")
2465 (source
2466 (origin
2467 (method url-fetch)
2468 (uri (pypi-uri "toml" version))
2469 (sha256
2470 (base32
2471 "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf"))))
2472 (build-system python-build-system)
2473 (arguments
2474 `(#:tests? #f)) ;no tests suite in release
2475 (home-page "https://github.com/uiri/toml")
2476 (synopsis "Library for TOML")
2477 (description
2478 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
2479Language (TOML) configuration files.")
2480 (license license:expat)))
2481
2482(define-public python-black
2483 (package
2484 (name "python-black")
2485 (version "18.6b4")
2486 (source
2487 (origin
2488 (method url-fetch)
2489 (uri (pypi-uri "black" version))
2490 (sha256
2491 (base32
2492 "0i4sfqgz6w15vd50kbhi7g7rifgqlf8yfr8y78rypd56q64qn592"))))
2493 (build-system python-build-system)
2494 (arguments
2495 `(#:phases
2496 (modify-phases %standard-phases
2497 (add-after 'patch-source-shebangs 'patch-extra-shebangs
2498 (lambda _
2499 (let ((python3 (which "python3")))
2500 (substitute* '("tests/data/fmtonoff.py"
2501 "tests/data/string_prefixes.py"
2502 "tests/data/function.py")
2503 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
2504 (string-append "#!" python3 (if (string? minor-version)
2505 minor-version
2506 ""))))))))))
2507 (propagated-inputs
2508 `(("python-click" ,python-click)
2509 ("python-attrs" ,python-attrs)
2510 ("python-appdirs" ,python-appdirs)
2511 ("python-toml" ,python-toml)))
2512 (home-page "https://github.com/ambv/black")
2513 (synopsis "The uncompromising code formatter")
2514 (description "Black is the uncompromising Python code formatter.")
2515 (license license:expat)))
2516
2517(define-public python-blinker
2518 (package
2519 (name "python-blinker")
2520 (version "1.4")
2521 (source
2522 (origin
2523 (method url-fetch)
2524 (uri (pypi-uri "blinker" version))
2525 (sha256
2526 (base32
2527 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
2528 (build-system python-build-system)
2529 (home-page "http://pythonhosted.org/blinker/")
2530 (synopsis "Fast, simple object-to-object and broadcast signaling")
2531 (description
2532 "Blinker provides a fast dispatching system that allows any number of
2533interested parties to subscribe to events, or \"signals\".")
2534 (license license:expat)))
2535
2536(define-public python2-blinker
2537 (package-with-python2 python-blinker))
2538
2539(define-public pelican
2540 (package
2541 (name "pelican")
2542 (version "3.7.1")
2543 (source
2544 (origin
2545 (method url-fetch)
2546 (uri (pypi-uri "pelican" version))
2547 (sha256
2548 (base32
2549 "12spygavv9b6xpb5pgp7f0p3z0mms60nx6zrpx1yfkj68zz4flra"))))
2550 (build-system python-build-system)
2551 (propagated-inputs
2552 `(("python-feedgenerator" ,python-feedgenerator)
2553 ("python-jinja2" ,python-jinja2)
2554 ("python-pygments" ,python-pygments)
2555 ("python-docutils" ,python-docutils)
2556 ("python-pytz" ,python-pytz)
2557 ("python-blinker" ,python-blinker)
2558 ("python-unidecode" ,python-unidecode)
2559 ("python-six" ,python-six)
2560 ("python-dateutil" ,python-dateutil)
2561 ("python-markdown" ,python-markdown)))
2562 (home-page "https://getpelican.com/")
2563 (arguments
2564 `(;; XXX Requires a lot more packages to do unit tests :P
2565 #:tests? #f
2566 #:phases (modify-phases %standard-phases
2567 (add-before
2568 'install 'adjust-requires
2569 ;; Since feedgenerator is installed from git, it doesn't
2570 ;; conform to the version requirements.
2571 ;;
2572 ;; We *do have* "feedgenerator >= 1.6", but strip off the
2573 ;; version requirement so setuptools doesn't get confused.
2574 (lambda _
2575 (substitute* "setup.py"
2576 (("['\"]feedgenerator.*?['\"]")
2577 "'feedgenerator'")))))))
2578 (synopsis "Python-based static site publishing system")
2579 (description
2580 "Pelican is a tool to generate a static blog from reStructuredText,
2581Markdown input files, and more. Pelican uses Jinja2 for templating
2582and is very extensible.")
2583 (license license:agpl3+)))
2584
2585(define-public python-scikit-image
2586 (package
2587 (name "python-scikit-image")
2588 (version "0.14.1")
2589 (source
2590 (origin
2591 (method url-fetch)
2592 (uri (pypi-uri "scikit-image" version))
2593 (sha256
2594 (base32 "0l1c3rl4s1jyv80i5hns4pgih09zrxfj7lygdc51w8sgyysb7ac6"))))
2595 (build-system python-build-system)
2596 (arguments
2597 ;; TODO: Some tests require running X11 server. Disable them?
2598 '(#:tests? #f))
2599 ;; See DEPENDS.txt for the list of build and run time requiremnts
2600 (propagated-inputs
2601 `(("python-cloudpickle" ,python-cloudpickle)
2602 ("python-dask" ,python-dask)
2603 ("python-matplotlib" ,python-matplotlib)
2604 ("python-networkx" ,python-networkx)
2605 ("python-numpy" ,python-numpy)
2606 ("python-pillow" ,python-pillow)
2607 ("python-pywavelets" ,python-pywavelets)
2608 ("python-scipy" ,python-scipy)
2609 ("python-six" ,python-six)))
2610 (native-inputs
2611 `(("python-cython" ,python-cython)))
2612 (home-page "http://scikit-image.org/")
2613 (synopsis "Image processing in Python")
2614 (description
2615 "Scikit-image is a collection of algorithms for image processing.")
2616 (license license:bsd-3)))
2617
2618(define-public python2-scikit-image
2619 (package-with-python2 python-scikit-image))
2620
2621(define-public python-cython
2622 (package
2623 (name "python-cython")
2624 (version "0.28.4")
2625 (source
2626 (origin
2627 (method url-fetch)
2628 (uri (pypi-uri "Cython" version))
2629 (sha256
2630 (base32
2631 "0imw9s2rbrh32clbl10csnwmig9p3nzkrd2baxxxfmnrsc42pb3n"))))
2632 (build-system python-build-system)
2633 ;; we need the full python package and not just the python-wrapper
2634 ;; because we need libpython3.3m.so
2635 (inputs
2636 `(("python" ,python)))
2637 (arguments
2638 `(#:phases
2639 (modify-phases %standard-phases
2640 (add-before 'check 'set-HOME
2641 ;; some tests require access to "$HOME/.cython"
2642 (lambda _ (setenv "HOME" "/tmp") #t))
2643
2644 ;; FIXME: These tests started failing on armhf after the 0.28 update
2645 ;; (commit c69d11c5930), both with an error such as this:
2646 ;; compiling (cpp) and running dictcomp ...
2647 ;; === C/C++ compiler error output: ===
2648 ;; ‘
2649 ;; dictcomp.cpp:5221: confused by earlier errors, bailing out
2650 ;; See <https://hydra.gnu.org/build/2948724> for logs.
2651 ,@(if (target-arm32?)
2652 `((add-before 'check 'disable-failing-tests
2653 (lambda _
2654 (let ((disabled-tests (open-file "tests/bugs.txt" "a")))
2655 (for-each (lambda (test)
2656 (format disabled-tests "~a\n" test))
2657 '("memslice" "dictcomp"))
2658 (close-port disabled-tests)))))
2659 '())
2660
2661 (replace 'check
2662 (lambda _
2663 ;; The "with_outer_raising" test fails with Python 3.7. See
2664 ;; https://github.com/cython/cython/issues/2454
2665 (delete-file "tests/run/generators_py.py")
2666 (invoke "python" "runtests.py" "-vv"))))))
2667 (home-page "http://cython.org/")
2668 (synopsis "C extensions for Python")
2669 (description "Cython is an optimising static compiler for both the Python
2670programming language and the extended Cython programming language. It makes
2671writing C extensions for Python as easy as Python itself.")
2672 (license license:asl2.0)
2673 (properties `((python2-variant . ,(delay python2-cython))))))
2674
2675(define-public python2-cython
2676 (package (inherit (package-with-python2
2677 (strip-python2-variant python-cython)))
2678 (name "python2-cython")
2679 (inputs
2680 `(("python-2" ,python-2))))) ; this is not automatically changed
2681
2682;; The RPython toolchain currently does not support Python 3.
2683(define-public python2-rpython
2684 (package
2685 (name "python2-rpython")
2686 (version "0.2.1")
2687 (source
2688 (origin
2689 (method url-fetch)
2690 (uri (pypi-uri "rpython" version))
2691 (sha256
2692 (base32
2693 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
2694 (build-system python-build-system)
2695 (arguments `(#:python ,python-2))
2696 (native-inputs
2697 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
2698 (home-page "https://rpython.readthedocs.org")
2699 (synopsis "Framework for implementing interpreters and virtual machines")
2700 (description "RPython is a translation and support framework for
2701producing implementations of dynamic languages, emphasizing a clean separation
2702between language specification and implementation aspects.")
2703 (license license:expat)))
2704
2705;; NOTE: when upgrading numpy please make sure that python-pandas and
2706;; python-scipy still build, as these three packages are often used together.
2707(define-public python-numpy
2708 (package
2709 (name "python-numpy")
2710 (version "1.15.4")
2711 (source
2712 (origin
2713 (method url-fetch)
2714 (uri (string-append
2715 "https://github.com/numpy/numpy/releases/download/v"
2716 version "/numpy-" version ".tar.gz"))
2717 (sha256
2718 (base32
2719 "102vcl2qq4pjbm7a3d67vkkvn4466ngia1d8wi5avqwqh8j0jvkn"))))
2720 (build-system python-build-system)
2721 (inputs
2722 `(("openblas" ,openblas)
2723 ("lapack" ,lapack)))
2724 (native-inputs
2725 `(("python-cython" ,python-cython)
2726 ("python-pytest" ,python-pytest)
2727 ("gfortran" ,gfortran)))
2728 (arguments
2729 `(#:phases
2730 (modify-phases %standard-phases
2731 (add-before 'build 'configure-blas-lapack
2732 (lambda* (#:key inputs #:allow-other-keys)
2733 (call-with-output-file "site.cfg"
2734 (lambda (port)
2735 (format port
2736 "[openblas]
2737libraries = openblas
2738library_dirs = ~a/lib
2739include_dirs = ~a/include
2740
2741# backslash-n to make emacs happy
2742\n[lapack]
2743lapack_libs = lapack
2744library_dirs = ~a/lib
2745include_dirs = ~a/include
2746"
2747 (assoc-ref inputs "openblas")
2748 (assoc-ref inputs "openblas")
2749 (assoc-ref inputs "lapack")
2750 (assoc-ref inputs "lapack"))))
2751 #t))
2752 (add-before 'build 'fix-executable-paths
2753 (lambda* (#:key inputs #:allow-other-keys)
2754 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
2755 ;; instead of /bin/sh.
2756 (substitute* "numpy/distutils/exec_command.py"
2757 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
2758 (string-append match-start (assoc-ref inputs "bash") match-end)))
2759 ;; Use "gcc" executable, not "cc".
2760 (substitute* "numpy/distutils/system_info.py"
2761 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
2762 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
2763 #t))
2764 ;; Tests can only be run after the library has been installed and not
2765 ;; within the source directory.
2766 (delete 'check)
2767 (add-after 'install 'check
2768 (lambda* (#:key outputs inputs #:allow-other-keys)
2769 ;; Make installed package available for running the tests
2770 (add-installed-pythonpath inputs outputs)
2771 ;; Make sure "f2py" etc is found.
2772 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
2773 ":" (getenv "PATH")))
2774 (with-directory-excursion "/tmp"
2775 (invoke "python" "-c"
2776 "import numpy; numpy.test(verbose=2)")))))))
2777 (home-page "http://www.numpy.org/")
2778 (synopsis "Fundamental package for scientific computing with Python")
2779 (description "NumPy is the fundamental package for scientific computing
2780with Python. It contains among other things: a powerful N-dimensional array
2781object, sophisticated (broadcasting) functions, tools for integrating C/C++
2782and Fortran code, useful linear algebra, Fourier transform, and random number
2783capabilities.")
2784 (license license:bsd-3)))
2785
2786(define-public python2-numpy
2787 (package-with-python2 python-numpy))
2788
2789;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
2790;; interest only for legacy code going back to NumPy's predecessor
2791;; Numeric.
2792(define-public python2-numpy-1.8
2793 (package (inherit python2-numpy)
2794 (version "1.8.2")
2795 (source
2796 (origin
2797 (method url-fetch)
2798 (uri (string-append
2799 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
2800 (file-name (string-append "python2-numpy-" version ".tar.gz"))
2801 (sha256
2802 (base32
2803 "0sc20gz1b17xnyrkp5frca3ql5qfalpv916hfg2kqxpwr6jg0f1g"))))
2804 (arguments
2805 (substitute-keyword-arguments (package-arguments python2-numpy)
2806 ((#:phases phases)
2807 `(modify-phases ,phases
2808 (replace 'configure-blas-lapack
2809 (lambda* (#:key inputs #:allow-other-keys)
2810 (call-with-output-file "site.cfg"
2811 (lambda (port)
2812 (format port
2813 "[openblas]
2814libraries = openblas,lapack
2815library_dirs = ~a/lib:~a/lib
2816include_dirs = ~a/include:~a/include
2817"
2818 (assoc-ref inputs "openblas")
2819 (assoc-ref inputs "lapack")
2820 (assoc-ref inputs "openblas")
2821 (assoc-ref inputs "lapack"))))
2822 #t))))))
2823 (native-inputs
2824 `(("python2-nose" ,python2-nose)))
2825 (description "NumPy is the fundamental package for scientific computing
2826with Python. It contains among other things: a powerful N-dimensional array
2827object, sophisticated (broadcasting) functions, tools for integrating C/C++
2828and Fortran code, useful linear algebra, Fourier transform, and random number
2829capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
2830that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
2831Numeric.")
2832 (license license:bsd-3)))
2833
2834(define-public python-munch
2835 (package
2836 (name "python-munch")
2837 (version "2.0.4")
2838 (source
2839 (origin
2840 (method url-fetch)
2841 (uri (pypi-uri "munch" version))
2842 (sha256
2843 (base32
2844 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
2845 (build-system python-build-system)
2846 (home-page "https://github.com/Infinidat/munch")
2847 (synopsis "Dot-accessible dictionary")
2848 (description "Munch is a dot-accessible dictionary similar to JavaScript
2849objects.")
2850 (license license:expat)))
2851
2852(define-public python2-munch
2853 (package-with-python2 python-munch))
2854
2855(define-public python-colormath
2856 (package
2857 (name "python-colormath")
2858 (version "3.0.0")
2859 (source
2860 (origin
2861 (method url-fetch)
2862 (uri (pypi-uri "colormath" version))
2863 (sha256
2864 (base32
2865 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
2866 (build-system python-build-system)
2867 (propagated-inputs
2868 `(("python-networkx" ,python-networkx)
2869 ("python-numpy" ,python-numpy)))
2870 (home-page "https://github.com/gtaylor/python-colormath")
2871 (synopsis "Color math and conversion library")
2872 (description
2873 "This is a Python library for color math and conversions.")
2874 (license license:bsd-3)))
2875
2876(define-public python2-colormath
2877 (package-with-python2 python-colormath))
2878
2879(define-public python-spectra
2880 (package
2881 (name "python-spectra")
2882 (version "0.0.11")
2883 (source
2884 (origin
2885 (method url-fetch)
2886 (uri (pypi-uri "spectra" version))
2887 (sha256
2888 (base32
2889 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
2890 (build-system python-build-system)
2891 (arguments
2892 `(#:phases
2893 (modify-phases %standard-phases
2894 (replace 'check
38ec0f6a 2895 (lambda _ (invoke "nosetests" "-v"))))))
44d10b1f
RW
2896 (propagated-inputs
2897 `(("python-colormath" ,python-colormath)))
2898 (native-inputs
2899 `(("python-nose" ,python-nose)))
2900 (home-page "https://github.com/jsvine/spectra")
2901 (synopsis "Color scales and color conversion")
2902 (description
2903 "This package provides a Python library intended to make color math,
2904color scales, and color space conversion easy. It has support for:
2905
2906@enumerate
2907@item Color scales
2908@item Color ranges
2909@item Color blending
2910@item Brightening/darkening colors
2911@item Saturating/desaturating colors
2912@item Conversion to/from multiple color spaces.
2913@end enumerate\n")
2914 (license license:expat)))
2915
2916(define-public python2-spectra
2917 (package-with-python2 python-spectra))
2918
2919(define-public python-numpy-documentation
2920 (package
2921 (name "python-numpy-documentation")
2922 (version (package-version python-numpy))
2923 (source (package-source python-numpy))
2924 (build-system python-build-system)
2925 (native-inputs
2926 `(("python-matplotlib" ,python-matplotlib)
2927 ("python-numpy" ,python-numpy)
2928 ("pkg-config" ,pkg-config)
2929 ("python-sphinx" ,python-sphinx)
2930 ("python-numpydoc" ,python-numpydoc)
2931 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
2932 texlive-fonts-cm-super
2933 texlive-fonts-ec
2934 texlive-generic-ifxetex
2935 texlive-generic-pdftex
2936 texlive-latex-amsfonts
2937 texlive-latex-capt-of
2938 texlive-latex-cmap
2939 texlive-latex-environ
2940 texlive-latex-eqparbox
2941 texlive-latex-etoolbox
2942 texlive-latex-expdlist
2943 texlive-latex-fancyhdr
2944 texlive-latex-fancyvrb
2945 texlive-latex-fncychap
2946 texlive-latex-float
2947 texlive-latex-framed
2948 texlive-latex-geometry
2949 texlive-latex-graphics
2950 texlive-latex-hyperref
2951 texlive-latex-mdwtools
2952 texlive-latex-multirow
2953 texlive-latex-needspace
2954 texlive-latex-oberdiek
2955 texlive-latex-parskip
2956 texlive-latex-preview
2957 texlive-latex-tabulary
2958 texlive-latex-threeparttable
2959 texlive-latex-titlesec
2960 texlive-latex-trimspaces
2961 texlive-latex-ucs
2962 texlive-latex-upquote
2963 texlive-latex-url
2964 texlive-latex-varwidth
2965 texlive-latex-wrapfig)))
2966 ("texinfo" ,texinfo)
2967 ("perl" ,perl)
2968 ("scipy-sphinx-theme"
2969 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
2970 (method git-fetch)
2971 (uri (git-reference
2972 (url "https://github.com/scipy/scipy-sphinx-theme.git")
2973 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
2974 (sha256
2975 (base32
2976 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
2977 ,@(package-native-inputs python-numpy)))
2978 (arguments
2979 `(#:tests? #f ; we're only generating the documentation
2980 #:phases
2981 (modify-phases %standard-phases
2982 (delete 'build)
2983 (replace 'install
2984 (lambda* (#:key inputs outputs #:allow-other-keys)
2985 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
2986 (doc (string-append
2987 data "/doc/" ,name "-"
2988 ,(package-version python-numpy)))
2989 (info-reader (string-append data "/info"))
2990 (html (string-append doc "/html"))
2991 (scipy-sphinx-theme "scipy-sphinx-theme")
2992 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
2993 (pyver ,(string-append "PYVER=")))
2994
2995 ;; FIXME: this is needed to for texlive-union to generate
2996 ;; fonts, which are not found.
2997 (setenv "HOME" "/tmp")
2998
2999 (with-directory-excursion "doc"
3000 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3001 (mkdir-p html)
4fc898da
RW
3002 (invoke "make" "html" pyver)
3003 (invoke "make" "latex" "PAPER=a4" pyver)
3004 (invoke "make" "-C" "build/latex"
44d10b1f
RW
3005 "all-pdf" "PAPER=a4" pyver)
3006 ;; FIXME: Generation of the info file fails.
4fc898da 3007 ;; (invoke "make" "info" pyver)
44d10b1f
RW
3008 ;; (mkdir-p info)
3009 ;; (copy-file "build/texinfo/numpy.info"
3010 ;; (string-append info "/numpy.info"))
3011 (for-each (lambda (file)
3012 (copy-file (string-append "build/latex" file)
3013 (string-append doc file)))
3014 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3015 (with-directory-excursion "build/html"
3016 (for-each (lambda (file)
3017 (let* ((dir (dirname file))
3018 (tgt-dir (string-append html "/" dir)))
3019 (unless (equal? "." dir)
3020 (mkdir-p tgt-dir))
3021 (install-file file html)))
3022 (find-files "." ".*")))))
3023 #t)))))
3024 (home-page (package-home-page python-numpy))
3025 (synopsis "Documentation for the python-numpy package")
3026 (description (package-description python-numpy))
3027 (license (package-license python-numpy))))
3028
3029(define-public python2-numpy-documentation
3030 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3031 (package
3032 (inherit numpy-documentation)
3033 (native-inputs `(("python2-functools32" ,python2-functools32)
3034 ,@(package-native-inputs numpy-documentation))))))
3035
3036(define-public python-pygit2
3037 (package
3038 (name "python-pygit2")
3039 (version "0.27.3")
3040 (source
3041 (origin
3042 (method url-fetch)
3043 (uri (pypi-uri "pygit2" version))
3044 (sha256
3045 (base32
3046 "046ahvsb7a20sgvscqfm3cb32sp3sii4gim9vz7zzrkf7yz16xlv"))))
3047 (build-system python-build-system)
3048 (arguments
3049 '(#:phases
3050 (modify-phases %standard-phases
3051 ;; Remove after the next update. See:
3052 ;; https://github.com/libgit2/pygit2/pull/851
3053 (add-after 'unpack 'compile-with-cffi
3054 (lambda _
3055 (substitute* "setup.py"
3056 (("install_requires")
3057 "setup_requires=['cffi'],\n install_requires"))
3058 #t))
3059 (add-after 'unpack 'fix-dependency-versioning
3060 (lambda _
3061 (substitute* "setup.py"
3062 (("<") "<="))
3063 #t)))))
3064 (propagated-inputs
3065 `(("python-six" ,python-six)
3066 ("python-cffi" ,python-cffi)
3067 ("libgit2" ,libgit2)
3068 ("python-tox" ,python-tox)))
3069 (native-inputs
3070 `(("python-pytest" ,python-pytest)))
3071 (home-page "https://github.com/libgit2/pygit2")
3072 (synopsis "Python bindings for libgit2")
3073 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3074library, libgit2 implements Git plumbing.")
3075 ;; GPL2.0 only, with linking exception.
3076 (license license:gpl2)))
3077
3078(define-public python2-pygit2
3079 (package-with-python2 python-pygit2))
3080
3081(define-public python-pyparsing
3082 (package
3083 (name "python-pyparsing")
3084 (version "2.2.1")
3085 (source
3086 (origin
3087 (method url-fetch)
3088 (uri (pypi-uri "pyparsing" version))
3089 (sha256
3090 (base32 "06dgd0iilvf8m0ssmfpcbh8l6jf0zkp8adbb84llksg17crfx4zl"))))
3091 (build-system python-build-system)
3092 (outputs '("out" "doc"))
3093 (arguments
3094 `(#:tests? #f ; no test target
3095 #:phases
3096 (modify-phases %standard-phases
3097 (add-after 'install 'install-doc
3098 (lambda* (#:key outputs #:allow-other-keys)
3099 (let* ((doc (string-append (assoc-ref outputs "doc")
3100 "/share/doc/" ,name "-" ,version))
3101 (html-doc (string-append doc "/html"))
3102 (examples (string-append doc "/examples")))
3103 (mkdir-p html-doc)
3104 (mkdir-p examples)
3105 (for-each
3106 (lambda (dir tgt)
3107 (map (lambda (file)
3108 (install-file file tgt))
3109 (find-files dir ".*")))
3110 (list "docs" "htmldoc" "examples")
3111 (list doc html-doc examples))
3112 #t))))))
3113 (home-page "https://github.com/pyparsing/pyparsing")
3114 (synopsis "Python parsing class library")
3115 (description
3116 "The pyparsing module is an alternative approach to creating and
3117executing simple grammars, vs. the traditional lex/yacc approach, or the use
3118of regular expressions. The pyparsing module provides a library of classes
3119that client code uses to construct the grammar directly in Python code.")
3120 (license license:expat)))
3121
3122(define-public python2-pyparsing
3123 (package-with-python2 python-pyparsing))
3124
3125(define-public python-numpydoc
3126 (package
3127 (name "python-numpydoc")
3128 (version "0.8.0")
3129 (source
3130 (origin
3131 (method url-fetch)
3132 (uri (pypi-uri "numpydoc" version))
3133 (sha256
3134 (base32
3135 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
3136 (build-system python-build-system)
3137 (propagated-inputs
3138 `(("python-sphinx" ,python-sphinx)))
3139 (native-inputs
3140 `(("python-nose" ,python-nose)))
3141 (home-page "https://pypi.python.org/pypi/numpydoc")
3142 (synopsis
3143 "Numpy's Sphinx extensions")
3144 (description
3145 "Sphinx extension to support docstrings in Numpy format.")
3146 (license license:bsd-2)))
3147
3148(define-public python2-numpydoc
3149 (package-with-python2 python-numpydoc))
3150
3151(define-public python-numexpr
3152 (package
3153 (name "python-numexpr")
3154 (version "2.6.5")
3155 (source
3156 (origin
3157 (method url-fetch)
3158 (uri (pypi-uri "numexpr" version))
3159 (sha256
3160 (base32
3161 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3162 (build-system python-build-system)
3163 (arguments `(#:tests? #f)) ; no tests included
3164 (propagated-inputs
3165 `(("python-numpy" ,python-numpy)))
3166 (home-page "https://github.com/pydata/numexpr")
3167 (synopsis "Fast numerical expression evaluator for NumPy")
3168 (description
3169 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3170expressions that operate on arrays are accelerated and use less memory than
3171doing the same calculation in Python. In addition, its multi-threaded
3172capabilities can make use of all your cores, which may accelerate
3173computations, most specially if they are not memory-bounded (e.g. those using
3174transcendental functions).")
3175 (license license:expat)))
3176
3177(define-public python2-numexpr
3178 (package-with-python2 python-numexpr))
3179
3180(define-public python-cycler
3181 (package
3182 (name "python-cycler")
3183 (version "0.10.0")
3184 (source (origin
3185 (method url-fetch)
3186 (uri (pypi-uri "cycler" version))
3187 (sha256
3188 (base32
3189 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3190 (build-system python-build-system)
3191 (arguments
3192 ;; XXX: The current version requires 'coveralls' which we don't have.
3193 ;; Enable this for the next release which uses 'python-pytest'.
3194 '(#:tests? #f))
3195 (propagated-inputs
3196 `(("python-six" ,python-six)))
3197 (home-page "http://matplotlib.org/cycler/")
3198 (synopsis "Composable keyword argument iterator")
3199 (description
3200 "When using @code{matplotlib} and plotting more than one line, it is
3201common to want to be able to want to be able to cycle over one or more artist
3202styles; but the plotting logic can quickly become involved.
3203To address this and enable easy cycling over arbitrary @code{kwargs}, the
3204@code{Cycler} class was developed.")
3205 (license license:bsd-3)))
3206
3207(define-public python2-cycler
3208 (package-with-python2 python-cycler))
3209
3210(define-public python-colorspacious
3211 (package
3212 (name "python-colorspacious")
3213 (version "1.1.0")
3214 (source
3215 (origin
3216 (method url-fetch)
3217 (uri (string-append "https://github.com/njsmith/colorspacious/archive/v"
3218 version ".tar.gz"))
3219 (file-name (string-append name "-" version))
3220 (sha256
3221 (base32 "1vflh5jm32qb0skza2i8pjacv09w6gq84fqpp2nj77s0rbmzgr4k"))))
3222 (build-system python-build-system)
3223 (propagated-inputs
3224 `(("python-numpy" ,python-numpy)))
3225 (native-inputs
3226 `(("python-nose" ,python-nose)))
3227 (arguments
3228 `(#:phases
3229 (modify-phases %standard-phases
3230 (replace 'check
3231 (lambda _
c988afda 3232 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
44d10b1f
RW
3233 (home-page "https://github.com/njsmith/colorspacious")
3234 (synopsis "Python library for colorspace conversions")
3235 (description "@code{colorspacious} is a Python library that lets you
3236convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3237 (license license:expat)))
3238
3239(define-public python2-colorspacious
3240 (package-with-python2 python-colorspacious))
3241
3242(define-public python-matplotlib
3243 (package
3244 (name "python-matplotlib")
3245 (version "2.2.3")
3246 (source
3247 (origin
3248 (method url-fetch)
3249 (uri (pypi-uri "matplotlib" version))
3250 (sha256
3251 (base32
3252 "1rcc7x9ig3hpchkc4cwdvym3y451w74275fxr455zkfagrsvymbk"))))
3253 (build-system python-build-system)
3254 (propagated-inputs ; the following packages are all needed at run time
3255 `(("python-cycler" ,python-cycler)
3256 ("python-kiwisolver" ,python-kiwisolver)
3257 ("python-pyparsing" ,python-pyparsing)
3258 ("python-pygobject" ,python-pygobject)
3259 ("gobject-introspection" ,gobject-introspection)
3260 ("python-tkinter" ,python "tk")
3261 ("python-dateutil" ,python-dateutil)
3262 ("python-numpy" ,python-numpy)
3263 ("python-pillow" ,python-pillow)
3264 ("python-pytz" ,python-pytz)
3265 ("python-six" ,python-six)
3266 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3267 ;; from 'gtk+') provides the required 'typelib' files used by
3268 ;; 'gobject-introspection'. The location of these files is set with the
3269 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3270 ;; is done automatically by a 'native-search-path' procedure. However,
3271 ;; at run-time the user must set this variable as follows:
3272 ;;
3273 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
3274 ("gtk+" ,gtk+)
3275 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3276 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3277 ;; object. For this reason we need to import both libraries.
3278 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3279 ("python-pycairo" ,python-pycairo)
3280 ;; XXX: qtwebkit cannot be built reliably.
3281 ("python-pyqt" ,python-pyqt-without-qtwebkit)
3282 ("python-cairocffi" ,python-cairocffi)))
3283 (inputs
3284 `(("libpng" ,libpng)
3285 ("imagemagick" ,imagemagick)
3286 ("freetype" ,freetype)
3287 ("cairo" ,cairo)
3288 ("glib" ,glib)
3289 ;; FIXME: Add backends when available.
3290 ;("python-wxpython" ,python-wxpython)
3291 ("tcl" ,tcl)
3292 ("tk" ,tk)))
3293 (native-inputs
3294 `(("pkg-config" ,pkg-config)
3295 ("python-nose" ,python-nose)
3296 ("python-mock" ,python-mock)))
3297 (arguments
3298 `(#:phases
3299 (modify-phases %standard-phases
3300 (add-before 'build 'configure-environment
3301 (lambda* (#:key outputs inputs #:allow-other-keys)
3302 (let ((cairo (assoc-ref inputs "cairo"))
3303 (gtk+ (assoc-ref inputs "gtk+")))
3304 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3305 ;; has not effect.
3306 (setenv "LD_LIBRARY_PATH"
3307 (string-append cairo "/lib:" gtk+ "/lib"))
3308 (setenv "HOME" (getcwd))
3309 (call-with-output-file "setup.cfg"
3310 (lambda (port)
3311 (format port "[directories]~%
3312basedirlist = ~a,~a~%
3313 [rc_options]~%
3314backend = TkAgg~%"
3315 (assoc-ref inputs "tcl")
3316 (assoc-ref inputs "tk")))))
3317 #t)))))
3318 (home-page "http://matplotlib.org")
3319 (synopsis "2D plotting library for Python")
3320 (description
3321 "Matplotlib is a Python 2D plotting library which produces publication
3322quality figures in a variety of hardcopy formats and interactive environments
3323across platforms. Matplotlib can be used in Python scripts, the python and
3324ipython shell, web application servers, and six graphical user interface
3325toolkits.")
3326 (license license:psfl)
3327 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3328
3329(define-public python2-matplotlib
3330 (let ((matplotlib (package-with-python2
3331 (strip-python2-variant python-matplotlib))))
3332 (package (inherit matplotlib)
3333 ;; Make sure to use special packages for Python 2 instead
3334 ;; of those automatically rewritten by package-with-python2.
3335 (propagated-inputs
3336 `(("python2-pycairo" ,python2-pycairo)
3337 ("python2-backports-functools-lru-cache"
3338 ,python2-backports-functools-lru-cache)
3339 ("python2-functools32" ,python2-functools32)
3340 ("python2-pygobject-2" ,python2-pygobject-2)
3341 ("python2-subprocess32" ,python2-subprocess32)
3342 ("python2-tkinter" ,python-2 "tk")
3343 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3344 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
3345
3346(define-public python-matplotlib-documentation
3347 (package
3348 (name "python-matplotlib-documentation")
3349 (version (package-version python-matplotlib))
3350 (source (package-source python-matplotlib))
3351 (build-system python-build-system)
3352 (native-inputs
3353 `(("python-matplotlib" ,python-matplotlib)
3354 ("python-colorspacious" ,python-colorspacious)
3355 ("python-sphinx" ,python-sphinx)
3356 ("python-sphinx-gallery" ,python-sphinx-gallery)
3357 ("python-numpydoc" ,python-numpydoc)
3358 ("python-ipython" ,python-ipython)
3359 ("python-mock" ,python-mock)
3360 ("graphviz" ,graphviz)
3361 ("texlive" ,texlive)
3362 ("texinfo" ,texinfo)
3363 ,@(package-native-inputs python-matplotlib)))
3364 (arguments
3365 `(#:tests? #f ; we're only generating documentation
3366 #:phases
3367 (modify-phases %standard-phases
3368 (replace 'build
3369 (lambda _
3370 (chdir "doc")
3371 ;; Produce pdf in 'A4' format.
3372 (substitute* "conf.py"
3373 (("latex_paper_size = 'letter'") "")
3374 ;; latex_paper_size is deprecated -> set paper size using
3375 ;; latex_elements
3376 (("latex_elements\\['pointsize'\\] = '11pt'" match)
3377 ;; insert at a point where latex_elements{} is defined:
3378 (string-append match "\nlatex_elements['papersize'] = 'a4paper'")))
3379 (invoke "make" "SPHINXBUILD=sphinx-build" "html" "latex" "texinfo")))
3380 (replace 'install
3381 (lambda* (#:key inputs outputs #:allow-other-keys)
3382 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3383 (doc (string-append data "/doc/python-matplotlib-" ,version))
3384 (info (string-append data "/info"))
3385 (html (string-append doc "/html")))
3386 (mkdir-p html)
3387 (mkdir-p info)
3388 (copy-recursively "build/html" html)
3389 (symlink (string-append html "/_images")
3390 (string-append info "/matplotlib-figures"))
3391 (with-directory-excursion "build/texinfo"
3392 (substitute* "matplotlib.texi"
3393 (("@image\\{([^,]*)" all file)
3394 (string-append "@image{matplotlib-figures/" file)))
3395 (symlink (string-append html "/_images")
3396 "./matplotlib-figures")
3397 (system* "makeinfo" "--no-split"
3398 "-o" "matplotlib.info" "matplotlib.texi"))
3399 (copy-file "build/texinfo/matplotlib.info"
3400 (string-append info "/matplotlib.info"))
3401 (copy-file "build/latex/Matplotlib.pdf"
3402 (string-append doc "/Matplotlib.pdf")))
3403 #t)))))
3404 (home-page (package-home-page python-matplotlib))
3405 (synopsis "Documentation for the python-matplotlib package")
3406 (description (package-description python-matplotlib))
3407 (license (package-license python-matplotlib))))
3408
3409(define-public python2-matplotlib-documentation
3410 (package-with-python2 python-matplotlib-documentation))
3411
3412(define-public python2-pysnptools
3413 (package
3414 (name "python2-pysnptools")
5d1ade85 3415 (version "0.3.13")
44d10b1f
RW
3416 (source
3417 (origin
3418 (method url-fetch)
5d1ade85 3419 (uri (pypi-uri "pysnptools" version))
44d10b1f
RW
3420 (sha256
3421 (base32
5d1ade85 3422 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
44d10b1f
RW
3423 (build-system python-build-system)
3424 (arguments
5d1ade85
RW
3425 `(#:python ,python-2 ; only Python 2.7 is supported
3426 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
44d10b1f
RW
3427 (propagated-inputs
3428 `(("python2-numpy" ,python2-numpy)
3429 ("python2-scipy" ,python2-scipy)
3430 ("python2-pandas" ,python2-pandas)))
44d10b1f 3431 (native-inputs
5d1ade85 3432 `(("python2-cython" ,python2-cython)))
1b66989b 3433 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
44d10b1f
RW
3434 (synopsis "Library for reading and manipulating genetic data")
3435 (description
3436 "PySnpTools is a library for reading and manipulating genetic data. It
3437can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
3438those files. It can also efficiently manipulate ranges of integers using set
3439operators such as union, intersection, and difference.")
3440 (license license:asl2.0)))
3441
3442(define-public python-scipy
3443 (package
3444 (name "python-scipy")
3445 (version "1.1.0")
3446 (source
3447 (origin
3448 (method url-fetch)
3449 (uri (pypi-uri "scipy" version))
3450 (sha256
3451 (base32
3452 "1lfg686w6vv2m2dfs8v9d0bf2i18z7wz5vgzjnkgmpr4hi0550w7"))))
3453 (build-system python-build-system)
3454 (propagated-inputs
3455 `(("python-numpy" ,python-numpy)
3456 ("python-matplotlib" ,python-matplotlib)
3457 ("python-pyparsing" ,python-pyparsing)))
3458 (inputs
3459 `(("lapack" ,lapack)
3460 ("openblas" ,openblas)))
3461 (native-inputs
3462 `(("python-cython" ,python-cython)
3463 ("python-pytest" ,python-pytest)
3464 ("python-sphinx" ,python-sphinx)
3465 ("python-numpydoc" ,python-numpydoc)
3466 ("gfortran" ,gfortran)
3467 ("perl" ,perl)
3468 ("which" ,which)))
3469 (outputs '("out" "doc"))
3470 (arguments
3471 `(#:phases
3472 (modify-phases %standard-phases
3473 (add-after 'unpack 'disable-broken-tests
3474 (lambda _
3475 (substitute* "scipy/sparse/linalg/dsolve/tests/test_linsolve.py"
3476 (("^( +)def test_threads_parallel\\(self\\):" m indent)
3477 (string-append indent
3478 "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
3479 m)))
3480 (substitute* "scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py"
3481 (("^def test_parallel_threads\\(\\):" m)
3482 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
3483 m)))
3484 #t))
3485 (add-before 'build 'configure-openblas
3486 (lambda* (#:key inputs #:allow-other-keys)
3487 (call-with-output-file "site.cfg"
3488 (lambda (port)
3489 (format port
3490 "[blas]
3491libraries = openblas
3492library_dirs = ~a/lib
3493include_dirs = ~a/include
3494
3495# backslash-n to make emacs happy
3496\n[atlas]
3497library_dirs = ~a/lib
3498atlas_libs = openblas
3499"
3500 (assoc-ref inputs "openblas")
3501 (assoc-ref inputs "openblas")
3502 (assoc-ref inputs "openblas"))))
3503 #t))
3504 (add-after 'install 'install-doc
3505 (lambda* (#:key inputs outputs #:allow-other-keys)
3506 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3507 (doc (string-append data "/doc/" ,name "-" ,version))
3508 (html (string-append doc "/html"))
3509 (pyver ,(string-append "PYVER=" (version-major+minor
3510 (package-version python))))
3511 ;; By default it tries to run sphinx-build through the Python
3512 ;; interpreter which won't work with our shell wrapper.
3513 (sphinxbuild "SPHINXBUILD=LANG=C sphinx-build"))
3514 ;; Make installed package available for building the
3515 ;; documentation
3516 (add-installed-pythonpath inputs outputs)
3517 (with-directory-excursion "doc"
3518 ;; Fix generation of images for mathematical expressions.
3519 (substitute* (find-files "source" "conf\\.py")
3520 (("pngmath_use_preview = True")
3521 "pngmath_use_preview = False"))
3522 (mkdir-p html)
3523 (invoke "make" "html" pyver sphinxbuild)
3524 (with-directory-excursion "build/html"
3525 (for-each (lambda (file)
3526 (let* ((dir (dirname file))
3527 (tgt-dir (string-append html "/" dir)))
3528 (install-file file html)))
3529 (find-files "." ".*")))))
3530 #t))
3531 ;; Tests can only be run after the library has been installed and not
3532 ;; within the source directory.
3533 (delete 'check)
3534 (add-after 'install 'check
3535 (lambda* (#:key inputs outputs #:allow-other-keys)
3536 (add-installed-pythonpath inputs outputs)
3537 (with-directory-excursion "/tmp"
3538 (invoke "python" "-c"
3539 "import scipy; scipy.test(verbose=2)")))))))
3540 (home-page "https://www.scipy.org/")
3541 (synopsis "The Scipy library provides efficient numerical routines")
3542 (description "The SciPy library is one of the core packages that make up
3543the SciPy stack. It provides many user-friendly and efficient numerical
3544routines such as routines for numerical integration and optimization.")
3545 (properties `((python2-variant . ,(delay python2-scipy))))
3546 (license license:bsd-3)))
3547
3548(define-public python2-scipy
3549 (package-with-python2
3550 (strip-python2-variant python-scipy)))
3551
3552(define-public python-socksipy-branch
3553 (package
3554 (name "python-socksipy-branch")
3555 (version "1.01")
3556 (source
3557 (origin
3558 (method url-fetch)
3559 (uri (pypi-uri "SocksiPy-branch" version))
3560 (sha256
3561 (base32
3562 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
3563 (build-system python-build-system)
3564 (arguments
3565 `(#:tests? #f)) ; There are no tests
3566 (home-page "https://code.google.com/archive/p/socksipy-branch/")
3567 (synopsis "Python SOCKS module")
3568 (description
3569 "SocksiPy - A Python SOCKS client module. It provides a
3570socket-like interface that supports connections to any TCP
3571service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
3572The original version was developed by Dan Haim, this is a
3573branch created by Mario Vilas to address some open issues,
3574as the original project seems to have been abandoned circa 2007.")
3575 (license license:bsd-3)))
3576
3577(define-public python2-socksipy-branch
3578 (package-with-python2 python-socksipy-branch))
3579
3580(define-public python-pycodestyle
3581 (package
3582 (name "python-pycodestyle")
3583 (version "2.4.0")
3584 (source
3585 (origin
3586 (method url-fetch)
3587 (uri (pypi-uri "pycodestyle" version))
3588 (sha256
3589 (base32
3590 "0fhy4vnlgpjq4qd1wdnl6pvdw7rah0ypmn8c9mkhz8clsndskz6b"))))
3591 (build-system python-build-system)
3592 (home-page "https://pycodestyle.readthedocs.io/")
3593 (synopsis "Python style guide checker")
3594 (description "@code{pycodestyle} (formerly pep8) is a tool to check
3595Python code against some of the style conventions in
3596@url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
3597 (license license:expat)))
3598
3599(define-public python2-pycodestyle
3600 (package-with-python2 python-pycodestyle))
3601
3602(define-public python-multidict
3603 (package
3604 (name "python-multidict")
3605 (version "4.2.0")
3606 (source
3607 (origin
3608 (method url-fetch)
3609 (uri (pypi-uri "multidict" version))
3610 (sha256
3611 (base32
3612 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
3613 (build-system python-build-system)
3614 (native-inputs
3615 `(("python-pytest" ,python-pytest)
3616 ("python-pytest-runner" ,python-pytest-runner)))
3617 (home-page "https://github.com/aio-libs/multidict/")
3618 (synopsis "Multidict implementation")
3619 (description "Multidict is dict-like collection of key-value pairs
3620where key might be occurred more than once in the container.")
3621 (license license:asl2.0)))
3622
3623(define-public python-orderedmultidict
3624 (package
3625 (name "python-orderedmultidict")
3626 (version "0.7.11")
3627 (source
3628 (origin
3629 (method url-fetch)
3630 (uri (pypi-uri "orderedmultidict" version))
3631 (sha256
3632 (base32
3633 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
3634 (build-system python-build-system)
3635 (arguments
3636 `(#:phases
3637 (modify-phases %standard-phases
3638 (add-after 'unpack 'fix-tests
3639 (lambda _
3640 ;; The package uses nosetest for running the tests.
3641 ;; Adding this initfile allows to run the test suite
3642 ;; without requiring nosetest.
d1c4f329
RW
3643 (with-output-to-file "tests/__init__.py" newline)
3644 #t)))))
44d10b1f
RW
3645 (propagated-inputs
3646 `(("python-six" ,python-six)))
3647 (native-inputs
3648 `(("python-pycodestyle" ,python-pycodestyle)))
3649 (home-page "https://github.com/gruns/orderedmultidict")
3650 (synopsis "Python Ordered Multivalue Dictionary - omdict")
3651 (description "This package contains a library for ordered multivalue
3652dictionaries. A multivalue dictionary is a dictionary that can store
3653multiple values for the same key. An ordered multivalue dictionary is a
3654multivalue dictionary that retains the order of insertions and deletions.")
3655 (license license:unlicense)))
3656
3657(define-public python2-orderedmultidict
3658 (package-with-python2 python-orderedmultidict))
3659
3660(define-public python-autopep8
3661 (package
3662 (name "python-autopep8")
3663 (version "1.3.5")
3664 (source
3665 (origin
3666 (method url-fetch)
3667 (uri (pypi-uri "autopep8" version))
3668 (sha256
3669 (base32
3670 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
3671 (build-system python-build-system)
3672 (propagated-inputs
3673 `(("python-pycodestyle" ,python-pycodestyle)))
3674 (home-page "https://github.com/hhatto/autopep8")
3675 (synopsis "Format Python code according to the PEP 8 style guide")
3676 (description
3677 "@code{autopep8} automatically formats Python code to conform to
3678the PEP 8 style guide. It uses the pycodestyle utility to determine
3679what parts of the code needs to be formatted. @code{autopep8} is
3680capable of fixing most of the formatting issues that can be reported
3681by pycodestyle.")
3682 (license (license:non-copyleft
3683 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
3684
3685(define-public python2-autopep8
3686 (package-with-python2 python-autopep8))
3687
3688(define-public python-distutils-extra
3689 (package
3690 (name "python-distutils-extra")
3691 (version "2.38")
3692 (source
3693 (origin
3694 (method url-fetch)
3695 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
3696 version "/+download/python-distutils-extra-"
3697 version ".tar.gz"))
3698 (sha256
3699 (base32
3700 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
3701 (build-system python-build-system)
3702 (home-page "https://launchpad.net/python-distutils-extra/")
3703 (synopsis "Enhancements to Python's distutils")
3704 (description
3705 "The python-distutils-extra module enables you to easily integrate
3706gettext support, themed icons, and scrollkeeper-based documentation into
3707Python's distutils.")
3708 (license license:gpl2)))
3709
3710(define-public python2-distutils-extra
3711 (package-with-python2 python-distutils-extra))
3712
3713(define-public python2-elib.intl
3714 (package
3715 (name "python2-elib.intl")
3716 (version "0.0.3")
3717 (source
3718 (origin
3719 ;; This project doesn't tag releases or publish tarballs, so we take
3720 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
3721 (method git-fetch)
3722 (uri (git-reference
3723 (url "https://github.com/dieterv/elib.intl.git")
3724 (commit "d09997cfef")))
3725 (file-name (string-append name "-" version "-checkout"))
3726 (sha256
3727 (base32
3728 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
3729 (build-system python-build-system)
3730 (arguments
3731 ;; incompatible with Python 3 (exception syntax)
3732 `(#:python ,python-2
3733 #:tests? #f))
3734 (home-page "https://github.com/dieterv/elib.intl")
3735 (synopsis "Enhanced internationalization for Python")
3736 (description
3737 "The elib.intl module provides enhanced internationalization (I18N)
3738services for your Python modules and applications.")
3739 (license license:lgpl3+)))
3740
3741(define-public python-olefile
3742 (package
3743 (name "python-olefile")
3744 (version "0.45.1")
3745 (source
3746 (origin
3747 (method url-fetch)
3748 (uri (string-append "https://github.com/decalage2/olefile/archive/v"
3749 version ".tar.gz"))
3750 (file-name (string-append name "-" version ".tar.gz"))
3751 (sha256
3752 (base32
3753 "18ai19zwagm6nli14k8bii31ipbab2rp7plrvsm6gmfql551a8ai"))))
3754 (build-system python-build-system)
3755 (home-page
3756 "https://www.decalage.info/python/olefileio")
3757 (synopsis "Read and write Microsoft OLE2 files.")
3758 (description
3759 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
3760Storage or Compound Document, Microsoft Office). It is an improved version of
3761the OleFileIO module from PIL, the Python Image Library.")
3762 (license license:bsd-3)))
3763
3764(define-public python2-olefile
3765 (package-with-python2 python-olefile))
3766
3767(define-public python-pillow
3768 (package
3769 (name "python-pillow")
3770 (version "5.4.1")
3771 (source
3772 (origin
3773 (method url-fetch)
3774 (uri (pypi-uri "Pillow" version))
3775 (sha256
3776 (base32
3777 "17waygkhhzjd75kajlfw9v57mbb41lcpg6cvkdijqd7smm76ccsj"))))
3778 (build-system python-build-system)
3779 (native-inputs
3780 `(("python-pytest" ,python-pytest)))
3781 (inputs
3782 `(("freetype" ,freetype)
3783 ("lcms" ,lcms)
3784 ("zlib" ,zlib)
3785 ("libjpeg" ,libjpeg)
3786 ("openjpeg" ,openjpeg)
3787 ("libtiff" ,libtiff)
3788 ("libwebp" ,libwebp)))
3789 (propagated-inputs
3790 `(("python-olefile" ,python-olefile)))
3791 (arguments
3792 `(#:phases
3793 (modify-phases %standard-phases
3794 (add-after 'unpack 'patch-ldconfig
3795 (lambda _
3796 (substitute* "setup.py"
3797 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
3798 (delete 'check) ; We must run checks after python-pillow is installed.
3799 (add-after 'install 'check-installed
3800 (lambda* (#:key outputs inputs #:allow-other-keys)
3801 (begin
3802 (setenv "HOME" (getcwd))
3803 ;; Make installed package available for running the tests.
3804 (add-installed-pythonpath inputs outputs)
3805 (invoke "python" "selftest.py" "--installed")
3806 (invoke "python" "-m" "pytest" "-vv")))))))
3807 (home-page "https://python-pillow.org")
3808 (synopsis "Fork of the Python Imaging Library")
3809 (description
3810 "The Python Imaging Library adds image processing capabilities to your
3811Python interpreter. This library provides extensive file format support, an
3812efficient internal representation, and fairly powerful image processing
3813capabilities. The core image library is designed for fast access to data
3814stored in a few basic pixel formats. It should provide a solid foundation for
3815a general image processing tool.")
3816 (license (license:x11-style
3817 "http://www.pythonware.com/products/pil/license.htm"
3818 "The PIL Software License"))))
3819
3820(define-public python2-pillow
3821 (package-with-python2 python-pillow))
3822
3823(define-public python-pycparser
3824 (package
3825 (name "python-pycparser")
3826 (version "2.18")
3827 (source
3828 (origin
3829 (method url-fetch)
3830 (uri (pypi-uri "pycparser" version))
3831 (sha256
3832 (base32
3833 "09mjyw82ibqzl449g7swy8bfxnfpmas0815d2rkdjlcqw81wma4r"))))
3834 (outputs '("out" "doc"))
3835 (build-system python-build-system)
3836 (native-inputs
3837 `(("pkg-config" ,pkg-config)))
3838 (arguments
3839 `(#:phases
3840 (modify-phases %standard-phases
3841 (replace 'check
3842 (lambda _
3843 (with-directory-excursion "tests"
acb75c03
RW
3844 (invoke "python" "all_tests.py"))
3845 #t))
44d10b1f
RW
3846 (add-after 'install 'install-doc
3847 (lambda* (#:key outputs #:allow-other-keys)
3848 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3849 (doc (string-append data "/doc/" ,name "-" ,version))
3850 (examples (string-append doc "/examples")))
3851 (mkdir-p examples)
3852 (for-each (lambda (file)
3853 (copy-file (string-append "." file)
3854 (string-append doc file)))
3855 '("/README.rst" "/CHANGES" "/LICENSE"))
3856 (copy-recursively "examples" examples)))))))
3857 (home-page "https://github.com/eliben/pycparser")
3858 (synopsis "C parser in Python")
3859 (description
3860 "Pycparser is a complete parser of the C language, written in pure Python
3861using the PLY parsing library. It parses C code into an AST and can serve as
3862a front-end for C compilers or analysis tools.")
3863 (license license:bsd-3)))
3864
3865(define-public python2-pycparser
3866 (package-with-python2 python-pycparser))
3867
3868(define-public python-pywavelets
3869 (package
3870 (name "python-pywavelets")
3871 (version "1.0.1")
3872 (home-page "https://github.com/PyWavelets/pywt")
3873 (source (origin
3874 (method url-fetch)
3875 (uri (pypi-uri "PyWavelets" version))
3876 (sha256
3877 (base32
3878 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
3879 (build-system python-build-system)
3880 (arguments
3881 '(#:modules ((ice-9 ftw)
3882 (srfi srfi-1)
3883 (srfi srfi-26)
3884 (guix build utils)
3885 (guix build python-build-system))
3886 #:phases (modify-phases %standard-phases
3887 (replace 'check
3888 (lambda _
3889 (let ((cwd (getcwd))
3890 (libdir (find (cut string-prefix? "lib." <>)
3891 (scandir "build"))))
3892 (with-directory-excursion (string-append cwd "/build/" libdir)
3893 (invoke "nosetests" "-v" "."))))))))
3894 (native-inputs
3895 `(("python-matplotlib" ,python-matplotlib) ;for tests
3896 ("python-nose" ,python-nose)))
3897 (propagated-inputs
3898 `(("python-numpy" ,python-numpy)))
3899 (synopsis "Wavelet transforms in Python")
3900 (description
3901 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
3902mathematical basis functions that are localized in both time and frequency.
3903Wavelet transforms are time-frequency transforms employing wavelets. They are
3904similar to Fourier transforms, the difference being that Fourier transforms are
3905localized only in frequency instead of in time and frequency.")
3906 (license license:expat)))
3907
3908(define-public python2-pywavelets
3909 (package-with-python2 python-pywavelets))
3910
3911(define-public python-xcffib
3912 (package
3913 (name "python-xcffib")
3914 (version "0.6.0")
3915 (source
3916 (origin
3917 (method url-fetch)
3918 (uri (pypi-uri "xcffib" version))
3919 (sha256
3920 (base32
3921 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
3922 (build-system python-build-system)
3923 (inputs
3924 `(("libxcb" ,libxcb)))
3925 (propagated-inputs
3926 `(("python-cffi" ,python-cffi) ; used at run time
3927 ("python-six" ,python-six)))
3928 (arguments
3929 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
3930 #:tests? #f
3931 #:phases
3932 (modify-phases %standard-phases
3933 (add-after 'unpack 'fix-libxcb-path
3934 (lambda* (#:key inputs #:allow-other-keys)
3935 (let ((libxcb (assoc-ref inputs "libxcb")))
3936 (substitute* '("xcffib/__init__.py")
3937 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
3938 #t)))
3939 (add-after 'install 'install-doc
3940 (lambda* (#:key outputs #:allow-other-keys)
3941 (let ((doc (string-append (assoc-ref outputs "out") "/share"
3942 "/doc/" ,name "-" ,version)))
3943 (mkdir-p doc)
3944 (copy-file "README.md"
3945 (string-append doc "/README.md"))
3946 #t))))))
3947 (home-page "https://github.com/tych0/xcffib")
3948 (synopsis "XCB Python bindings")
3949 (description
3950 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
3951support for Python 3 and PyPy. It is based on cffi.")
3952 (license license:expat)))
3953
3954(define-public python2-xcffib
3955 (package-with-python2 python-xcffib))
3956
3957(define-public python-cairocffi
3958 (package
3959 (name "python-cairocffi")
3960 (version "0.9.0")
3961 (source
3962 (origin
3963 (method url-fetch)
3964 (uri (pypi-uri "cairocffi" version))
3965 (sha256
3966 (base32
3967 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
3968 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
3969 (build-system python-build-system)
3970 (outputs '("out" "doc"))
3971 (inputs
3972 `(("glib" ,glib)
3973 ("gtk+" ,gtk+)
3974 ("gdk-pixbuf" ,gdk-pixbuf)
3975 ("cairo" ,cairo)
3976 ("pango" ,pango)))
3977 (native-inputs
3978 `(("pkg-config" ,pkg-config)
3979 ("python-pytest" ,python-pytest)
3980 ("python-pytest-cov" ,python-pytest-cov)
3981 ("python-pytest-runner" ,python-pytest-runner)
3982 ("python-sphinx" ,python-sphinx)
3983 ("python-docutils" ,python-docutils)))
3984 (propagated-inputs
3985 `(("python-xcffib" ,python-xcffib))) ; used at run time
3986 (arguments
3987 `(#:phases
3988 (modify-phases %standard-phases
3989 (add-after 'unpack 'patch-paths
3990 (lambda* (#:key inputs outputs #:allow-other-keys)
3991 (substitute* (find-files "." "\\.py$")
3992 (("dlopen\\(ffi, 'cairo'")
3993 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
3994 "/lib/libcairo.so.2'"))
3995 (("dlopen\\(ffi, 'gdk-3'")
3996 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
3997 "/lib/libgtk-3.so.0'"))
3998 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
3999 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
4000 "/lib/libgdk_pixbuf-2.0.so.0'"))
4001 (("dlopen\\(ffi, 'glib-2.0'")
4002 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4003 "/lib/libglib-2.0.so.0'"))
4004 (("dlopen\\(ffi, 'gobject-2.0'")
4005 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4006 "/lib/libgobject-2.0.so.0'"))
4007 (("dlopen\\(ffi, 'pangocairo-1.0'")
4008 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4009 "/lib/libpangocairo-1.0.so.0'"))
4010 (("dlopen\\(ffi, 'pango-1.0'")
4011 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4012 "/lib/libpango-1.0.so.0'")))
4013 #t))
4014 (add-after 'install 'install-doc
4015 (lambda* (#:key inputs outputs #:allow-other-keys)
4016 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4017 (doc (string-append data "/doc/" ,name "-" ,version))
4018 (html (string-append doc "/html")))
4019 (setenv "LD_LIBRARY_PATH"
4020 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4021 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4022 (setenv "LANG" "en_US.UTF-8")
4023 (mkdir-p html)
4024 (for-each (lambda (file)
4025 (copy-file (string-append "." file)
4026 (string-append doc file)))
4027 '("/README.rst" "/CHANGES" "/LICENSE"))
4028 (system* "python" "setup.py" "build_sphinx")
4029 (copy-recursively "docs/_build/html" html)
4030 #t))))))
4031 (home-page "https://github.com/Kozea/cairocffi")
4032 (synopsis "Python bindings and object-oriented API for Cairo")
4033 (description
4034 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4035Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4036graphics library with support for multiple backends including image buffers,
4037PNG, PostScript, PDF, and SVG file output.")
4038 (license license:bsd-3)))
4039
4040(define-public python2-cairocffi
4041 (package-with-python2 python-cairocffi))
4042
4043(define-public python-decorator
4044 (package
4045 (name "python-decorator")
4046 (version "4.3.0")
4047 (source
4048 (origin
4049 (method url-fetch)
4050 (uri (pypi-uri "decorator" version))
4051 (sha256
4052 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
4053 (build-system python-build-system)
4054 (home-page "https://pypi.python.org/pypi/decorator/")
4055 (synopsis "Python module to simplify usage of decorators")
4056 (description
4057 "The aim of the decorator module is to simplify the usage of decorators
4058for the average programmer, and to popularize decorators usage giving examples
4059of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4060etc. The core of this module is a decorator factory.")
4061 (license license:expat)))
4062
4063(define-public python2-decorator
4064 (package-with-python2 python-decorator))
4065
4066(define-public python-drmaa
4067 (package
4068 (name "python-drmaa")
4069 (version "0.7.7")
4070 (source
4071 (origin
4072 (method url-fetch)
4073 (uri (pypi-uri "drmaa" version))
4074 (sha256
4075 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4076 (build-system python-build-system)
4077 ;; The test suite requires libdrmaa which is provided by the cluster
4078 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4079 ;; should be set to the path of the libdrmaa library.
4080 (arguments '(#:tests? #f))
4081 (native-inputs
4082 `(("python-nose" ,python-nose)))
4083 (home-page "https://pypi.python.org/pypi/drmaa")
4084 (synopsis "Python bindings for the DRMAA library")
4085 (description
4086 "A Python package for Distributed Resource Management (DRM) job
4087submission and control. This package is an implementation of the DRMAA 1.0
4088Python language binding specification.")
4089 (license license:bsd-3)))
4090
4091(define-public python2-drmaa
4092 (package-with-python2 python-drmaa))
4093
4094(define-public python-grako
4095 (package
4096 (name "python-grako")
4097 (version "3.99.9")
4098 (source
4099 (origin
4100 (method url-fetch)
4101 (uri
4102 (pypi-uri "grako" version ".zip"))
4103 (sha256
4104 (base32
4105 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4106 (build-system python-build-system)
4107 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4108 (native-inputs
4109 `(("unzip" ,unzip)
4110 ("python-pytest" ,python-pytest)
4111 ("python-pytest-runner" ,python-pytest-runner)))
4112 (home-page "https://bitbucket.org/neogeny/grako")
4113 (synopsis "EBNF parser generator")
4114 (description
4115 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4116memoizing PEG/Packrat parser in Python.")
4117 (license license:bsd-3)))
4118
4119(define-public python2-grako
4120 (package-with-python2 python-grako))
4121
4122(define-public python-gridmap
4123 (package
4124 (name "python-gridmap")
4125 (version "0.13.0")
4126 (source
4127 (origin
4128 (method url-fetch)
4129 (uri (string-append
4130 "https://github.com/pygridtools/gridmap/archive/v"
4131 version ".tar.gz"))
4132 (file-name (string-append name "-" version ".tar.gz"))
4133 (sha256
4134 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
4135 (build-system python-build-system)
4136 (arguments
4137 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4138 (propagated-inputs
4139 `(("python-psutil" ,python-psutil)
4140 ("python-drmaa" ,python-drmaa)
4141 ("python-pyzmq" ,python-pyzmq)))
4142 (home-page "https://github.com/pygridtools/gridmap")
4143 (synopsis "Create jobs on a cluster directly from Python")
4144 (description
4145 "Gridmap is a Python package to allow you to easily create jobs on the
4146cluster directly from Python. You can directly map Python functions onto the
4147cluster without needing to write any wrapper code yourself.")
4148 (license license:gpl3+)))
4149
4150(define-public python2-gridmap
4151 (package-with-python2 python-gridmap))
4152
4153(define-public python-honcho
4154 (package
4155 (name "python-honcho")
4156 (version "1.0.1")
4157 (source
4158 (origin
4159 (method url-fetch)
4160 (uri (string-append
4161 "https://github.com/nickstenning/honcho/archive/v"
4162 version ".tar.gz"))
4163 (file-name (string-append name "-" version ".tar.gz"))
4164 (sha256
4165 (base32 "0zizn61n5z5hq421hkypk9pw8s6fpxw30f4hsg7k4ivwzy3gjw9j"))))
4166 (build-system python-build-system)
4167 (native-inputs
4168 `(("python-pytest" ,python-pytest)
4169 ("python-mock" ,python-mock)
4170 ("python-tox" ,python-tox)
4171 ("which" ,which))) ;for tests
4172 (propagated-inputs
4173 `(("python-jinja2" ,python-jinja2)))
4174 (arguments
4175 `(#:phases
4176 (modify-phases %standard-phases
4177 (delete 'check)
4178 (add-after 'install 'check
4179 (lambda* (#:key outputs inputs #:allow-other-keys)
4180 ;; fix honcho path in testsuite
4181 (substitute* "tests/conftest.py"
4182 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
4183 "/bin/honcho" "'")))
4184 ;; It's easier to run tests after install.
4185 ;; Make installed package available for running the tests
4186 (add-installed-pythonpath inputs outputs)
95b707fb 4187 (invoke "py.test" "-v"))))))
44d10b1f
RW
4188 (home-page "https://github.com/nickstenning/honcho")
4189 (synopsis "Manage Procfile-based applications")
4190 (description
4191 "A Procfile is a file which describes how to run an application
4192consisting of serveral processes. honcho starts all listed processes.
4193The output of all running processes is collected by honcho and
4194displayed.")
4195 (license license:expat)))
4196
4197(define-public python2-honcho
4198 (package-with-python2 python-honcho))
4199
4200(define-public python-pexpect
4201 (package
4202 (name "python-pexpect")
4203 (version "4.6.0")
4204 (source
4205 (origin
4206 (method url-fetch)
4207 (uri (pypi-uri "pexpect" version))
4208 (sha256
4209 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
4210 (build-system python-build-system)
4211 (arguments
4212 `(#:phases
4213 (modify-phases %standard-phases
4214 (add-before 'check 'prepare-tests
4215 (lambda _
4216 (substitute* (find-files "tests")
4217 (("/bin/ls") (which "ls"))
4218 (("/bin/echo") (which "echo"))
4219 (("/bin/which") (which "which"))
4220 ;; Many tests try to use the /bin directory which
4221 ;; is not present in the build environment.
4222 ;; Use one that's non-empty and unlikely to change.
4223 (("/bin'") "/dev'"))
4224 ;; XXX: Socket connection test gets "Connection reset by peer".
4225 ;; Why does it not work? Delete for now.
4226 (delete-file "tests/test_socket.py")
4227 #t))
4228 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
4229 (native-inputs
4230 `(("python-nose" ,python-nose)
4231 ("python-pytest" ,python-pytest)
4232 ("man-db" ,man-db)
4233 ("which" ,which)
4234 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
4235 (propagated-inputs
4236 `(("python-ptyprocess" ,python-ptyprocess)))
4237 (home-page "http://pexpect.readthedocs.org/")
4238 (synopsis "Controlling interactive console applications")
4239 (description
4240 "Pexpect is a pure Python module for spawning child applications;
4241controlling them; and responding to expected patterns in their output.
4242Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4243child application and control it as if a human were typing commands.")
4244 (license license:isc)))
4245
4246(define-public python2-pexpect
4247 (package-with-python2 python-pexpect))
4248
4249(define-public python-setuptools-scm
4250 (package
4251 (name "python-setuptools-scm")
4252 (version "3.1.0")
4253 (source (origin
4254 (method url-fetch)
4255 (uri (pypi-uri "setuptools_scm" version))
4256 (sha256
4257 (base32
4258 "0h4bglwfz8b9prqljv8z3w9rgydfyxzaj05bm1y6zs5m6shz548i"))))
4259 (build-system python-build-system)
4260 (home-page "https://github.com/pypa/setuptools_scm/")
4261 (synopsis "Manage Python package versions in SCM metadata")
4262 (description
4263 "Setuptools_scm handles managing your Python package versions in
4264@dfn{software configuration management} (SCM) metadata instead of declaring
4265them as the version argument or in a SCM managed file.")
4266 (license license:expat)))
4267
4268(define-public python2-setuptools-scm
4269 (package-with-python2 python-setuptools-scm))
4270
4271(define-public python-pathpy
4272 (package
4273 (name "python-pathpy")
4274 (version "11.0.1")
4275 (source
4276 (origin
4277 (method url-fetch)
4278 (uri (pypi-uri "path.py" version))
4279 (sha256
4280 (base32 "07x15v8c7ry9bvycw294c9yq6ky9v2b0dalvgi6rn38ilh69vsz7"))))
4281 ;; (outputs '("out" "doc"))
4282 (build-system python-build-system)
4283 (propagated-inputs
4284 `(("python-appdirs" ,python-appdirs)))
4285 (native-inputs
4286 `(("python-setuptools-scm" ,python-setuptools-scm)
4287 ("python-sphinx" ,python-sphinx)
4288 ("python-rst.linker" ,python-rst.linker)
4289 ("python-pytest" ,python-pytest)
4290 ("python-pytest-runner" ,python-pytest-runner)))
4291 (arguments
4292 ;; FIXME: Documentation and tests require "jaraco.packaging".
4293 `(#:tests? #f))
4294 ;; #:phases
4295 ;; (modify-phases %standard-phases
4296 ;; (add-after 'build 'build-doc
4297 ;; (lambda _
4298 ;; (setenv "LANG" "en_US.UTF-8")
4299 ;; (zero? (system* "python" "setup.py" "build_sphinx"))))
4300 ;; (add-after 'install 'install-doc
4301 ;; (lambda* (#:key outputs #:allow-other-keys)
4302 ;; (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4303 ;; (doc (string-append data "/doc/" ,name "-" ,version))
4304 ;; (html (string-append doc "/html")))
4305 ;; (mkdir-p html)
4306 ;; (for-each (lambda (file)
4307 ;; (copy-file file (string-append doc "/" file)))
4308 ;; '("README.rst" "CHANGES.rst"))
4309 ;; (copy-recursively "build/sphinx/html" html)))))))
4310 (home-page "https://github.com/jaraco/path.py")
4311 (synopsis "Python module wrapper for built-in os.path")
4312 (description
4313 "@code{path.py} implements path objects as first-class entities, allowing
4314common operations on files to be invoked on those path objects directly.")
4315 (license license:expat)))
4316
4317(define-public python2-pathpy
4318 (package-with-python2 python-pathpy))
4319
4320(define-public python-simplegeneric
4321 (package
4322 (name "python-simplegeneric")
4323 (version "0.8.1")
4324 (source
4325 (origin
4326 (method url-fetch)
6c8c3980 4327 (uri (pypi-uri "simplegeneric" version ".zip"))
44d10b1f
RW
4328 (sha256
4329 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
4330 (build-system python-build-system)
4331 (native-inputs
4332 `(("unzip" ,unzip)))
4333 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
4334 (synopsis "Python module for simple generic functions")
4335 (description
4336 "The simplegeneric module lets you define simple single-dispatch generic
4337functions, akin to Python’s built-in generic functions like @code{len()},
4338@code{iter()} and so on. However, instead of using specially-named methods,
4339these generic functions use simple lookup tables, akin to those used by
4340e.g. @code{pickle.dump()} and other generic functions found in the Python
4341standard library.")
4342 (license license:zpl2.1)))
4343
4344(define-public python2-simplegeneric
4345 (package-with-python2 python-simplegeneric))
4346
4347(define-public python-ipython-genutils
4348 ;; TODO: This package is retired, check if can be removed, see description.
4349 (package
4350 (name "python-ipython-genutils")
4351 (version "0.1.0")
4352 (source
4353 (origin
4354 (method url-fetch)
c9671d4b 4355 (uri (pypi-uri "ipython_genutils" version))
44d10b1f
RW
4356 (sha256
4357 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
4358 (build-system python-build-system)
4359 (arguments `(#:tests? #f)) ; no tests
4360 (home-page "https://ipython.org")
4361 (synopsis "Vestigial utilities from IPython")
4362 (description
4363 "This package provides retired utilities from IPython. No packages
4364outside IPython/Jupyter should depend on it.
4365
4366This package shouldn't exist. It contains some common utilities shared by
4367Jupyter and IPython projects during The Big Split. As soon as possible, those
4368packages will remove their dependency on this, and this package will go
4369away.")
4370 (license license:bsd-3)))
4371
4372(define-public python2-ipython-genutils
4373 (package-with-python2 python-ipython-genutils))
4374
4375(define-public python-traitlets
4376 (package
4377 (name "python-traitlets")
4378 (version "4.3.2")
4379 (source
4380 (origin
4381 (method url-fetch)
4382 (uri (pypi-uri "traitlets" version))
4383 (sha256
4384 (base32
4385 "0dbq7sx26xqz5ixs711k5nc88p8a0nqyz6162pwks5dpcz9d4jww"))))
4386 (build-system python-build-system)
4387 (arguments
4388 `(#:phases
4389 (modify-phases %standard-phases
4390 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
4391 (propagated-inputs
4392 `(("python-ipython-genutils" ,python-ipython-genutils)
4393 ("python-decorator" ,python-decorator))) ;not needed for >4.3.2
4394 (native-inputs
4395 `(("python-pytest" ,python-pytest)))
4396 (properties `((python2-variant . ,(delay python2-traitlets))))
4397 (home-page "https://ipython.org")
4398 (synopsis "Configuration system for Python applications")
4399 (description
4400 "Traitlets is a framework that lets Python classes have attributes with
4401type checking, dynamically calculated default values, and ‘on change’
4402callbacks. The package also includes a mechanism to use traitlets for
4403configuration, loading values from files or from command line arguments. This
4404is a distinct layer on top of traitlets, so you can use traitlets in your code
4405without using the configuration machinery.")
4406 (license license:bsd-3)))
4407
4408(define-public python2-traitlets
4409 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
4410 (package
4411 (inherit traitlets)
4412 (propagated-inputs
4413 `(("python2-enum34" ,python2-enum34)
4414 ,@(package-propagated-inputs traitlets))))))
4415
4416(define-public python-jupyter-core
4417 (package
4418 (name "python-jupyter-core")
4419 (version "4.4.0")
4420 (source
4421 (origin
4422 (method url-fetch)
4423 (uri (string-append (pypi-uri "jupyter_core" version)))
4424 (sha256
4425 (base32
4426 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
4427 (build-system python-build-system)
4428 ;; FIXME: not sure how to run the tests
4429 (arguments `(#:tests? #f))
4430 (propagated-inputs
4431 `(("python-traitlets" ,python-traitlets)))
4432 (home-page "http://jupyter.org/")
4433 (synopsis "Jupyter base package")
4434 (description
4435 "Jupyter core is the base package on which Jupyter projects rely.")
4436 (license license:bsd-3)))
4437
4438(define-public python2-jupyter-core
4439 (package-with-python2 python-jupyter-core))
4440
4441(define-public python-jupyter-client
4442 (package
4443 (name "python-jupyter-client")
4444 (version "5.2.4")
4445 (source
4446 (origin
4447 (method url-fetch)
4448 (uri (pypi-uri "jupyter_client" version))
4449 (sha256
4450 (base32
4451 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
4452 (build-system python-build-system)
4453 ;; Tests fail because of missing native python kernel which I assume is
4454 ;; provided by the ipython package, which we cannot use because it would
4455 ;; cause a dependency cycle.
4456 (arguments `(#:tests? #f))
4457 (propagated-inputs
4458 `(("python-pyzmq" ,python-pyzmq)
4459 ("python-traitlets" ,python-traitlets)
4460 ("python-jupyter-core" ,python-jupyter-core)))
4461 (home-page "http://jupyter.org/")
4462 (synopsis "Jupyter protocol implementation and client libraries")
4463 (description
4464 "The @code{jupyter_client} package contains the reference implementation
4465of the Jupyter protocol. It also provides client and kernel management APIs
4466for working with kernels, and the @code{jupyter kernelspec} entrypoint for
4467installing @code{kernelspec}s for use with Jupyter frontends.")
4468 (license license:bsd-3)))
4469
4470(define-public python2-jupyter-client
4471 (package-with-python2 python-jupyter-client))
4472
4473(define-public python-ipykernel
4474 (package
4475 (name "python-ipykernel")
4476 (version "5.1.0")
4477 (source
4478 (origin
4479 (method url-fetch)
4480 (uri (pypi-uri "ipykernel" version))
4481 (sha256
4482 (base32 "0br95qhrd5k65g10djngiy27hs0642301hlf2q142i8djabvzh0g"))))
4483 (build-system python-build-system)
4484 (arguments
4485 `(#:phases
4486 (modify-phases %standard-phases
4487 (replace 'check
4488 (lambda _
4489 (setenv "HOME" "/tmp")
4490 (invoke "pytest" "-v")
4491 #t)))))
4492 (propagated-inputs
4493 `(("python-ipython" ,python-ipython)
4494 ;; imported at runtime during connect
4495 ("python-jupyter-client" ,python-jupyter-client)))
4496 (native-inputs
4497 `(("python-pytest" ,python-pytest)
4498 ("python-nose" ,python-nose)))
4499 (home-page "https://ipython.org")
4500 (synopsis "IPython Kernel for Jupyter")
4501 (description
4502 "This package provides the IPython kernel for Jupyter.")
4503 (license license:bsd-3)))
4504
4505(define-public python2-ipykernel
4506 (package-with-python2 python-ipykernel))
4507
4508(define-public python-send2trash
4509 (package
4510 (name "python-send2trash")
4511 (version "1.5.0")
4512 (source
4513 (origin
4514 (method url-fetch)
4515 (uri (pypi-uri "send2trash" version))
4516 (sha256
4517 (base32
4518 "1ci8vcwjmjlp11ljj1ckrfmml9fkq1mclx2gr53y4zvhgp01q030"))))
4519 (build-system python-build-system)
4520 (home-page "https://github.com/hsoft/send2trash")
4521 (synopsis "Send files to trash")
4522 (description
4523 "This package provides a cross-platform mechanism to send files to the
4524trash.")
4525 (license license:bsd-3)))
4526
4527(define-public python2-send2trash
4528 (package-with-python2 python-send2trash))
4529
4530;; This is the latest release of the LTS version of ipython with support for
4531;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
4532;; dropped support for Python 2.7. We may want to rename this package.
4533(define-public python-ipython
4534 (package
4535 (name "python-ipython")
4536 (version "5.8.0")
4537 (source
4538 (origin
4539 (method url-fetch)
4540 (uri (pypi-uri "ipython" version ".tar.gz"))
4541 (sha256
4542 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
4543 (build-system python-build-system)
4544 (outputs '("out" "doc"))
4545 (propagated-inputs
4546 `(("python-pyzmq" ,python-pyzmq)
4547 ("python-prompt-toolkit" ,python-prompt-toolkit-1)
4548 ("python-terminado" ,python-terminado)
4549 ("python-matplotlib" ,python-matplotlib)
4550 ("python-numpy" ,python-numpy)
4551 ("python-numpydoc" ,python-numpydoc)
4552 ("python-jinja2" ,python-jinja2)
4553 ("python-mistune" ,python-mistune)
4554 ("python-pexpect" ,python-pexpect)
4555 ("python-pickleshare" ,python-pickleshare)
4556 ("python-simplegeneric" ,python-simplegeneric)
4557 ("python-jsonschema" ,python-jsonschema)
4558 ("python-traitlets" ,python-traitlets)
4559 ("python-nbformat" ,python-nbformat)
4560 ("python-pygments" ,python-pygments)))
4561 (inputs
4562 `(("readline" ,readline)
4563 ("which" ,which)))
4564 (native-inputs
4565 `(("graphviz" ,graphviz)
4566 ("pkg-config" ,pkg-config)
4567 ("python-requests" ,python-requests) ;; for tests
4568 ("python-testpath" ,python-testpath)
4569 ("python-nose" ,python-nose)
4570 ("python-sphinx" ,python-sphinx)
4571 ("python-shpinx-rtd-theme" ,python-sphinx-rtd-theme)
4572 ;; FIXME: It's possible that a smaller union would work just as well.
4573 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
4574 texlive-fonts-ec
4575 texlive-generic-ifxetex
4576 texlive-generic-pdftex
4577 texlive-latex-amsfonts
4578 texlive-latex-capt-of
4579 texlive-latex-cmap
4580 texlive-latex-environ
4581 texlive-latex-eqparbox
4582 texlive-latex-etoolbox
4583 texlive-latex-expdlist
4584 texlive-latex-fancyhdr
4585 texlive-latex-fancyvrb
4586 texlive-latex-fncychap
4587 texlive-latex-float
4588 texlive-latex-framed
4589 texlive-latex-geometry
4590 texlive-latex-graphics
4591 texlive-latex-hyperref
4592 texlive-latex-mdwtools
4593 texlive-latex-multirow
4594 texlive-latex-oberdiek
4595 texlive-latex-parskip
4596 texlive-latex-preview
4597 texlive-latex-tabulary
4598 texlive-latex-threeparttable
4599 texlive-latex-titlesec
4600 texlive-latex-trimspaces
4601 texlive-latex-ucs
4602 texlive-latex-upquote
4603 texlive-latex-url
4604 texlive-latex-varwidth
4605 texlive-latex-wrapfig)))
4606 ("texinfo" ,texinfo)))
4607 (arguments
4608 `(#:phases
4609 (modify-phases %standard-phases
4610 (add-after 'install 'install-doc
4611 (lambda* (#:key inputs outputs #:allow-other-keys)
4612 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4613 (doc (string-append data "/doc/" ,name "-" ,version))
4614 (html (string-append doc "/html"))
4615 (man1 (string-append data "/man/man1"))
4616 (info (string-append data "/info"))
4617 (examples (string-append doc "/examples"))
4618 (python-arg (string-append "PYTHON=" (which "python"))))
4619 (setenv "LANG" "en_US.utf8")
4620 ;; Make installed package available for running the tests
4621 (add-installed-pythonpath inputs outputs)
4622 (with-directory-excursion "docs"
4623 ;; FIXME: pdf fails to build
4624 ;;(system* "make" "pdf" "PAPER=a4")
4625 (system* "make" python-arg "html")
4626 (system* "make" python-arg "info"))
4627 (copy-recursively "docs/man" man1)
4628 (copy-recursively "examples" examples)
4629 (copy-recursively "docs/build/html" html)
4630 ;; (copy-file "docs/build/latex/ipython.pdf"
4631 ;; (string-append doc "/ipython.pdf"))
4632 (mkdir-p info)
4633 (copy-file "docs/build/texinfo/ipython.info"
4634 (string-append info "/ipython.info"))
4635 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
4636 #t))
4637 ;; Tests can only be run after the library has been installed and not
4638 ;; within the source directory.
4639 (delete 'check)
4640 (add-after 'install 'check
4641 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
4642 (if tests?
4643 (begin
4644 ;; Make installed package available for running the tests
4645 (add-installed-pythonpath inputs outputs)
4646 (setenv "HOME" "/tmp/") ;; required by a test
4647 ;; We only test the core because one of the other tests
4648 ;; tries to import ipykernel.
4649 (invoke "python" "IPython/testing/iptest.py"
4650 "-v" "IPython/core/tests"))
4651 #t)))
4652 (add-before 'check 'fix-tests
4653 (lambda* (#:key inputs #:allow-other-keys)
4654 (substitute* "./IPython/utils/_process_posix.py"
4655 (("/usr/bin/env', 'which") (which "which")))
4656 (substitute* "./IPython/core/tests/test_inputtransformer.py"
4657 (("#!/usr/bin/env python")
4658 (string-append "#!" (which "python"))))
4659 ;; Disable 1 failing test
4660 (substitute* "./IPython/core/tests/test_magic.py"
4661 (("def test_dirops\\(\\):" all)
4662 (string-append "@dec.skipif(True)\n" all)))
4663 ;; This test introduces a circular dependency on ipykernel
4664 ;; (which depends on ipython).
4665 (delete-file "IPython/core/tests/test_display.py")
4666 ;; These tests throw errors for unknown reasons.
4667 (delete-file "IPython/extensions/tests/test_storemagic.py")
4668 (delete-file "IPython/core/tests/test_displayhook.py")
4669 (delete-file "IPython/core/tests/test_interactiveshell.py")
4670 (delete-file "IPython/core/tests/test_pylabtools.py")
4671 (delete-file "IPython/core/tests/test_paths.py")
4672 #t)))))
4673 (home-page "https://ipython.org")
4674 (synopsis "IPython is a tool for interactive computing in Python")
4675 (description
4676 "IPython provides a rich architecture for interactive computing with:
4677Powerful interactive shells, a browser-based notebook, support for interactive
4678data visualization, embeddable interpreters and tools for parallel
4679computing.")
4680 (license license:bsd-3)
4681 (properties `((python2-variant . ,(delay python2-ipython))))))
4682
4683(define-public python2-ipython
4684 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
4685 (package
4686 (inherit ipython)
4687 ;; FIXME: add pyreadline once available.
4688 (propagated-inputs
4689 `(("python2-backports-shutil-get-terminal-size"
4690 ,python2-backports-shutil-get-terminal-size)
4691 ("python2-pathlib2" ,python2-pathlib2)
4692 ,@(package-propagated-inputs ipython)))
4693 (native-inputs
4694 `(("python2-mock" ,python2-mock)
4695 ,@(package-native-inputs ipython))))))
4696
4697(define-public python-urwid
4698 (package
4699 (name "python-urwid")
4700 (version "2.0.1")
4701 (source
4702 (origin
4703 (method url-fetch)
4704 (uri (pypi-uri "urwid" version))
4705 (sha256
4706 (base32
4707 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
4708 (build-system python-build-system)
4709 (home-page "http://urwid.org")
4710 (synopsis "Console user interface library for Python")
4711 (description
4712 "Urwid is a curses-based UI/widget library for Python. It includes many
4713features useful for text console applications.")
4714 (license license:lgpl2.1+)))
4715
4716(define-public python2-urwid
4717 (package-with-python2 python-urwid))
4718
4719(define-public python-urwidtrees
4720 (package
4721 (name "python-urwidtrees")
4722 (version "1.0.2")
4723 (source
4724 (origin
4725 (method url-fetch)
4726 ;; package author intends on distributing via github rather than pypi:
4727 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
4728 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
4729 version ".tar.gz"))
4730 (file-name (string-append name "-" version ".tar.gz"))
4731 (sha256
4732 (base32
4733 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
4734 (build-system python-build-system)
4735 (arguments
4736 '(#:tests? #f)) ; no tests
4737 (propagated-inputs `(("python-urwid" ,python-urwid)))
4738 (home-page "https://github.com/pazz/urwidtrees")
4739 (synopsis "Tree widgets for urwid")
4740 (description "Urwidtrees is a Widget Container API for the @code{urwid}
4741toolkit. Use it to build trees of widgets.")
4742 (license license:gpl3+)))
4743
4744(define-public python2-urwidtrees
4745 (package-with-python2 python-urwidtrees))
4746
4747(define-public python-ua-parser
4748 (package
4749 (name "python-ua-parser")
4750 (version "0.8.0")
4751 (source
4752 (origin
4753 (method url-fetch)
4754 (uri (pypi-uri "ua-parser" version))
4755 (sha256
4756 (base32
4757 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
4758 (build-system python-build-system)
4759 (arguments
4760 `(#:tests? #f)) ;no test suite in release
4761 (native-inputs
4762 `(("python-pyyaml" ,python-pyyaml)))
4763 (home-page "https://github.com/ua-parser/uap-python")
4764 (synopsis "User agent parser")
4765 (description
4766 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
4767 (license license:asl2.0)))
4768
4769(define-public python2-ua-parser
4770 (package-with-python2 python-ua-parser))
4771
4772(define-public python-user-agents
4773 (package
4774 (name "python-user-agents")
4775 (version "1.1.0")
4776 (source
4777 (origin
4778 (method url-fetch)
4779 (uri (pypi-uri "user-agents" version))
4780 (sha256
4781 (base32
4782 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
4783 (build-system python-build-system)
4784 (arguments
4785 `(#:tests? #f)) ;missing devices.json test file in release
4786 (propagated-inputs
4787 `(("python-ua-parser" ,python-ua-parser)))
4788 (home-page "https://github.com/selwin/python-user-agents")
4789 (synopsis "User Agent strings parsing library")
4790 (description
4791 "A library to identify devices (phones, tablets) and their capabilities by
4792parsing (browser/HTTP) user agent strings.")
4793 (license license:expat)))
4794
4795(define-public python2-user-agents
4796 (package-with-python2 python-user-agents))
4797
4798(define-public python-dbus
4799 (package
4800 (name "python-dbus")
4801 (version "1.2.8")
4802 (source
4803 (origin
4804 (method url-fetch)
4805 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
4806 "dbus-python-" version ".tar.gz"))
4807 (sha256
4808 (base32
4809 "0vvvjmiwnc9cjlks3gcdk43ap7llhlpz7cm1wbw0nc2yfsxjpwdb"))))
4810 (build-system gnu-build-system)
4811 (arguments
4812 '(#:phases
4813 (modify-phases %standard-phases
4814 (add-before
4815 'check 'pre-check
4816 (lambda _
4817 ;; XXX: For the missing '/etc/machine-id'.
4818 (substitute* "test/run-test.sh"
4819 (("DBUS_FATAL_WARNINGS=1")
4820 "DBUS_FATAL_WARNINGS=0"))
4821 #t)))))
4822 (native-inputs
4823 `(("pkg-config" ,pkg-config)))
4824 (inputs
4825 `(("python" ,python-wrapper)
4826 ("dbus-glib" ,dbus-glib)))
4827 (synopsis "Python bindings for D-bus")
4828 (description "python-dbus provides bindings for libdbus, the reference
4829implementation of D-Bus.")
4830 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
4831 (license license:expat)))
4832
4833(define-public python2-dbus
4834 (package (inherit python-dbus)
4835 (name "python2-dbus")
4836 (inputs `(("python" ,python-2)
4837 ,@(alist-delete "python"
4838 (package-inputs python-dbus)
4839 equal?)))
4840 ;; FIXME: on Python 2, the test_utf8 fails with:
4841 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
4842 (arguments `(#:tests? #f))))
4843
4844(define-public python-lxml
4845 (package
4846 (name "python-lxml")
4847 (version "4.2.5")
4848 (source
4849 (origin
4850 (method url-fetch)
4851 (uri (pypi-uri "lxml" version))
4852 (sha256
4853 (base32
4854 "0zw0y9hs0nflxhl9cs6ipwwh53szi3w2x06wl0k9cylyqac0cwin"))))
4855 (build-system python-build-system)
4856 (inputs
4857 `(("libxml2" ,libxml2)
4858 ("libxslt" ,libxslt)))
4859 (home-page "http://lxml.de/")
4860 (synopsis
4861 "Python XML processing library")
4862 (description
4863 "The lxml XML toolkit is a Pythonic binding for the C libraries
4864libxml2 and libxslt.")
4865 (license license:bsd-3))) ; and a few more, see LICENSES.txt
4866
4867(define-public python2-lxml
4868 (package-with-python2 python-lxml))
4869
4870;; beautifulsoup4 has a totally different namespace than 3.x,
4871;; and pypi seems to put it under its own name, so I guess we should too
4872(define-public python-beautifulsoup4
4873 (package
4874 (name "python-beautifulsoup4")
4875 (version "4.6.3")
4876 (source
4877 (origin
4878 (method url-fetch)
4879 (uri (pypi-uri "beautifulsoup4" version))
4880 (sha256
4881 (base32
4882 "041dhalzjciw6qyzzq7a2k4h1yvyk76xigp35hv5ibnn448ydy4h"))))
4883 (build-system python-build-system)
4884 (arguments
4885 `(#:phases
4886 (modify-phases %standard-phases
4887 ;; The Python 2 source is the definitive source of beautifulsoup4. We
4888 ;; must use this conversion script when building with Python 3. The
4889 ;; conversion script also runs the tests.
4890 ;; For more information, see the file 'convert-py3k' in the source
4891 ;; distribution.
4892 (replace 'check
dff0197e 4893 (lambda _ (invoke "./convert-py3k"))))))
44d10b1f
RW
4894 (home-page
4895 "https://www.crummy.com/software/BeautifulSoup/bs4/")
4896 (synopsis
4897 "Python screen-scraping library")
4898 (description
4899 "Beautiful Soup is a Python library designed for rapidly setting up
4900screen-scraping projects. It offers Pythonic idioms for navigating,
4901searching, and modifying a parse tree, providing a toolkit for
4902dissecting a document and extracting what you need. It automatically
4903converts incoming documents to Unicode and outgoing documents to UTF-8.")
4904 (license license:expat)
4905 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
4906
4907(define-public python2-beautifulsoup4
4908 (package
4909 (inherit (package-with-python2
4910 (strip-python2-variant python-beautifulsoup4)))
4911 (arguments `(#:python ,python-2))))
4912
4913(define-public python-netifaces
4914 (package
4915 (name "python-netifaces")
4916 (version "0.10.7")
4917 (source
4918 (origin
4919 (method url-fetch)
4920 (uri (pypi-uri "netifaces" version))
4921 (sha256
4922 (base32
4923 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
4924 (build-system python-build-system)
4925 (home-page "https://github.com/al45tair/netifaces")
4926 (synopsis
4927 "Python module for portable network interface information")
4928 (description
4929 "Netifaces is a Python module providing information on network
4930interfaces in an easy and portable manner.")
4931 (license license:expat)))
4932
4933(define-public python2-netifaces
4934 (package-with-python2 python-netifaces))
4935
4936(define-public python-networkx
4937 (package
4938 (name "python-networkx")
4939 (version "2.2")
4940 (source
4941 (origin
4942 (method url-fetch)
4943 (uri (pypi-uri "networkx" version ".zip"))
4944 (sha256
4945 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
4946 (build-system python-build-system)
4947 ;; python-decorator is needed at runtime.
4948 (propagated-inputs
4949 `(("python-decorator" ,python-decorator)))
4950 (native-inputs
4951 `(("python-nose" ,python-nose)
4952 ("unzip" ,unzip)))
4953 (home-page "https://networkx.github.io/")
4954 (synopsis "Python module for creating and manipulating graphs and networks")
4955 (description
4956 "NetworkX is a Python package for the creation, manipulation, and study
4957of the structure, dynamics, and functions of complex networks.")
4958 (license license:bsd-3)))
4959
4960(define-public python2-networkx
4961 (package-with-python2 python-networkx))
4962
4963(define-public python-datrie
4964 (package
4965 (name "python-datrie")
4966 (version "0.7.1")
4967 (source
4968 (origin
4969 (method url-fetch)
4970 (uri (pypi-uri "datrie" version))
4971 (sha256
4972 (base32
4973 "08r0if7dry2q7p34gf7ffyrlnf4bdvnprxgydlfxgfnvq8f3f4bs"))))
4974 (build-system python-build-system)
4975 (arguments
4976 `(#:phases (modify-phases %standard-phases
4977 (add-before 'build 'cythonize
4978 (lambda _
4979 ;; Regenerate Cython classes to solve ABI issues with Python
4980 ;; 3.7.0. See <https://github.com/pytries/datrie/issues/52>.
4981 (invoke "cython" "src/datrie.pyx" "src/cdatrie.pxd"
4982 "src/stdio_ext.pxd" "-a"))))))
4983 (native-inputs
4984 `(("python-cython" ,python-cython)
4985 ("python-hypothesis" ,python-hypothesis)
4986 ("python-pytest" ,python-pytest)
4987 ("python-pytest-runner" ,python-pytest-runner)))
4988 (home-page "https://github.com/kmike/datrie")
4989 (synopsis "Fast, efficiently stored trie for Python")
4990 (description
4991 "This package provides a fast, efficiently stored trie implementation for
4992Python.")
4993 (license license:lgpl2.1+)))
4994
4995(define-public snakemake
4996 (package
4997 (name "snakemake")
4998 (version "5.2.4")
4999 (source
5000 (origin
5001 (method url-fetch)
5002 (uri (pypi-uri "snakemake" version))
5003 (sha256
5004 (base32 "0gj0xxgiq3mp9qyyrbfzldiaq1giliqw0in64nqiz7vx49myqj7z"))))
5005 (build-system python-build-system)
5006 (arguments
5007 ;; TODO: Package missing test dependencies.
5008 '(#:tests? #f
5009 #:phases
5010 (modify-phases %standard-phases
5011 ;; For cluster execution Snakemake will call Python. Since there is
5012 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
5013 ;; this by calling the snakemake wrapper instead.
5014 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
5015 (lambda* (#:key outputs #:allow-other-keys)
5016 (substitute* "snakemake/executors.py"
5017 (("\\{sys.executable\\} -m snakemake")
5018 (string-append (assoc-ref outputs "out")
5019 "/bin/snakemake")))
5020 #t)))))
5021 (propagated-inputs
5022 `(("python-gitpython" ,python-gitpython)
5023 ("python-wrapt" ,python-wrapt)
5024 ("python-requests" ,python-requests)
5025 ("python-appdirs" ,python-appdirs)
5026 ("python-configargparse" ,python-configargparse)
5027 ("python-datrie" ,python-datrie)
5028 ("python-docutils" ,python-docutils)
5029 ("python-jinja2" ,python-jinja2)
5030 ("python-jsonschema" ,python-jsonschema)
5031 ("python-networkx" ,python-networkx)
5032 ("python-pyyaml" ,python-pyyaml)
5033 ("python-ratelimiter" ,python-ratelimiter)))
5034 (home-page "https://snakemake.readthedocs.io")
5035 (synopsis "Python-based execution environment for make-like workflows")
5036 (description
5037 "Snakemake aims to reduce the complexity of creating workflows by
5038providing a clean and modern domain specific specification language (DSL) in
5039Python style, together with a fast and comfortable execution environment.")
5040 (license license:expat)))
5041
5042;; This is currently needed for the pigx-* packages.
5043(define-public snakemake-4
5044 (package (inherit snakemake)
5045 (version "4.4.0")
5046 (source
5047 (origin
5048 (method url-fetch)
5049 (uri (pypi-uri "snakemake" version))
5050 (sha256
5051 (base32 "0g0paia4z7w3srnqdmavq3hrb2x7qnpf81jx50njl0p7y4y0j8jv"))))
5052 (propagated-inputs
5053 `(("python-wrapt" ,python-wrapt)
5054 ("python-requests" ,python-requests)
5055 ("python-appdirs" ,python-appdirs)
5056 ("python-configargparse" ,python-configargparse)
5057 ("python-pyyaml" ,python-pyyaml)
5058 ("python-ratelimiter" ,python-ratelimiter)))))
5059
5060(define-public python-pyqrcode
5061 (package
5062 (name "python-pyqrcode")
5063 (version "1.2.1")
5064 (source
5065 (origin
5066 (method url-fetch)
5067 (uri (pypi-uri "PyQRCode" version))
5068 (sha256
5069 (base32
5070 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
5071 (build-system python-build-system)
5072 (home-page
5073 "https://github.com/mnooner256/pyqrcode")
5074 (synopsis "QR code generator")
5075 (description
5076 "Pyqrcode is a QR code generator written purely in Python with
5077SVG, EPS, PNG and terminal output.")
5078 (license license:bsd-3)))
5079
5080(define-public python-seaborn
5081 (package
5082 (name "python-seaborn")
5083 (version "0.9.0")
5084 (source
5085 (origin
5086 (method url-fetch)
5087 (uri (pypi-uri "seaborn" version))
5088 (sha256
5089 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))))
5090 (build-system python-build-system)
5091 (arguments
5092 `(#:phases
5093 (modify-phases %standard-phases
5094 (add-before 'check 'start-xserver
5095 (lambda* (#:key inputs #:allow-other-keys)
5096 (let ((xorg-server (assoc-ref inputs "xorg-server")))
5097 ;; There must be a running X server and make check doesn't
5098 ;; start one. Therefore we must do it.
5099 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
5100 (setenv "DISPLAY" ":1")
5101 #t)))
5102 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
5103 (propagated-inputs
5104 `(("python-pandas" ,python-pandas)
5105 ("python-matplotlib" ,python-matplotlib)
5106 ("python-numpy" ,python-numpy)
5107 ("python-scipy" ,python-scipy)))
5108 (native-inputs
5109 `(("python-pytest" ,python-pytest)
5110 ("xorg-server" ,xorg-server)))
5111 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5112 (synopsis "Statistical data visualization")
5113 (description
5114 "Seaborn is a library for making attractive and informative statistical
5115graphics in Python. It is built on top of matplotlib and tightly integrated
5116with the PyData stack, including support for numpy and pandas data structures
5117and statistical routines from scipy and statsmodels.")
5118 (license license:bsd-3)))
5119
5120(define-public python2-seaborn
5121 (package-with-python2 python-seaborn))
5122
5123(define-public python-mpmath
5124 (package
5125 (name "python-mpmath")
5126 (version "0.19")
5127 (source (origin
5128 (method url-fetch)
5129 (uri (string-append "http://mpmath.org/files/mpmath-"
5130 version ".tar.gz"))
5131 (sha256
5132 (base32
5133 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
5134 (build-system python-build-system)
5135 (arguments
5136 '(#:phases
5137 (modify-phases %standard-phases
5138 (replace 'check
5139 (lambda _
5d7a6f1c 5140 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
44d10b1f
RW
5141 (home-page "http://mpmath.org")
5142 (synopsis "Arbitrary-precision floating-point arithmetic in python")
5143 (description
5144 "@code{mpmath} can be used as an arbitrary-precision substitute for
5145Python's float/complex types and math/cmath modules, but also does much
5146more advanced mathematics.")
5147 (license license:bsd-3)))
5148
5149(define-public python2-mpmath
5150 (package-with-python2 python-mpmath))
5151
5152(define-public python-bigfloat
5153 (package
5154 (name "python-bigfloat")
5155 (version "0.3.0")
5156 (source
5157 (origin
5158 (method url-fetch)
5159 (uri (pypi-uri "bigfloat" version))
5160 (sha256
5161 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
5162 (build-system python-build-system)
5163 (inputs
5164 `(("mpfr" ,mpfr)))
5165 (home-page "https://github.com/mdickinson/bigfloat")
5166 (synopsis "Arbitrary precision floating-point arithmetic for Python")
5167 (description
5168 "This packages provides a Python interface to the MPFR library for
5169multiprecision arithmetic.")
5170 (license license:lgpl3+)))
5171
5172(define-public python2-bigfloat
5173 (package-with-python2 python-bigfloat))
5174
5175(define-public python-sympy
5176 (package
5177 (name "python-sympy")
5178 (version "1.1.1")
5179 (source
5180 (origin
5181 (method url-fetch)
5182 (uri (string-append
5183 "https://github.com/sympy/sympy/releases/download/sympy-"
5184 version "/sympy-" version ".tar.gz"))
5185 (sha256
5186 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
5187 (build-system python-build-system)
5188 (arguments
5189 `(#:phases
5190 (modify-phases %standard-phases
5191 ;; Run the core tests after installation. By default it would run
5192 ;; *all* tests, which take a very long time to complete and are known
5193 ;; to be flaky.
5194 (delete 'check)
5195 (add-after 'install 'check
5196 (lambda* (#:key outputs #:allow-other-keys)
5197 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
5198 #t)))))
5199 (propagated-inputs
5200 `(("python-mpmath" ,python-mpmath)))
5201 (home-page "http://www.sympy.org/")
5202 (synopsis "Python library for symbolic mathematics")
5203 (description
5204 "SymPy is a Python library for symbolic mathematics. It aims to become a
5205full-featured computer algebra system (CAS) while keeping the code as simple
5206as possible in order to be comprehensible and easily extensible.")
5207 (license license:bsd-3)))
5208
5209(define-public python2-sympy
5210 (package
5211 (inherit (package-with-python2 python-sympy))
5212 (arguments
5213 `(#:phases
5214 (modify-phases %standard-phases
5215 ;; Run the core tests after installation. By default it would run
5216 ;; *all* tests, which take a very long time to complete and are known
5217 ;; to be flaky.
5218 (delete 'check)
5219 (add-after 'install 'check
5220 (lambda* (#:key outputs #:allow-other-keys)
5221 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
5222 #t)))))))
5223
5224(define-public python-q
5225 (package
5226 (name "python-q")
5227 (version "2.6")
5228 (source
5229 (origin
5230 (method url-fetch)
5231 (uri (pypi-uri "q" version))
5232 (sha256
5233 (base32
5234 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
5235 (build-system python-build-system)
5236 (home-page "https://github.com/zestyping/q")
5237 (synopsis "Quick-and-dirty debugging output for tired programmers")
5238 (description
5239 "q is a Python module for \"print\" style of debugging Python code. It
5240provides convenient short API for print out of values, tracebacks, and
5241falling into the Python interpreter.")
5242 (license license:asl2.0)))
5243
5244(define-public python2-q
5245 (package-with-python2 python-q))
5246
5247(define-public python2-xlib
5248 (package
5249 (name "python2-xlib")
5250 (version "0.14")
5251 (source (origin
5252 (method url-fetch)
5253 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
5254 "/" version "/"
5255 "python-xlib-" version ".tar.gz"))
5256 (sha256
5257 (base32
5258 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
5259 (build-system python-build-system)
5260 (arguments
5261 `(#:python ,python-2 ;Python 2 only
5262 #:tests? #f)) ;no tests
5263 (home-page "http://python-xlib.sourceforge.net/")
5264 (synopsis "Python X11 client library")
5265 (description
5266 "The Python X Library is intended to be a fully functional X client
5267library for Python programs. It is useful to implement low-level X clients.
5268It is written entirely in Python.")
5269 (license license:gpl2+)))
5270
5271(define-public python-singledispatch
5272 (package
5273 (name "python-singledispatch")
5274 (version "3.4.0.3")
5275 (source
5276 (origin
5277 (method url-fetch)
5278 (uri (pypi-uri "singledispatch" version))
5279 (sha256
5280 (base32
5281 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
5282 (build-system python-build-system)
5283 (native-inputs
5284 `(("python-six" ,python-six))) ; required for conversion, not at run-time
5285 (home-page
5286 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
5287 (synopsis "Backport of singledispatch feature from Python 3.4")
5288 (description
5289 "This library brings functools.singledispatch from Python 3.4 to Python
52902.6-3.3.")
5291 (license license:expat)))
5292
5293(define-public python2-singledispatch
5294 (package-with-python2 python-singledispatch))
5295
5296;; the python- version can be removed with python-3.5
5297(define-public python-backports-abc
5298 (package
5299 (name "python-backports-abc")
5300 (version "0.5")
5301 (source
5302 (origin
5303 (method url-fetch)
5304 (uri (pypi-uri "backports_abc" version))
5305 (sha256
5306 (base32
5307 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
5308 (build-system python-build-system)
5309 (home-page "https://github.com/cython/backports_abc")
5310 (synopsis "Backport of additions to the 'collections.abc' module")
5311 (description
5312 "Python-backports-abc provides a backport of additions to the
5313'collections.abc' module in Python-3.5.")
5314 (license license:psfl)))
5315
5316(define-public python2-backports-abc
5317 (package-with-python2 python-backports-abc))
5318
5319(define-public python-backports-csv
5320 (package
5321 (name "python-backports-csv")
5322 (version "1.0.5")
5323 (source
5324 (origin
5325 (method url-fetch)
5326 (uri (pypi-uri "backports.csv" version))
5327 (sha256
5328 (base32
5329 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
5330 (build-system python-build-system)
5331 (home-page "https://github.com/ryanhiebert/backports.csv")
5332 (synopsis "Backport of Python 3's csv module for Python 2")
5333 (description
5334 "Provides a backport of Python 3's @code{csv} module for parsing
5335comma separated values. The API of the @code{csv} module in Python 2
5336is drastically different from the @code{csv} module in Python 3.
5337This is due, for the most part, to the difference between str in
5338Python 2 and Python 3.")
5339 (license license:psfl)))
5340
5341(define-public python2-backports-csv
5342 (package-with-python2 python-backports-csv))
5343
5344(define-public python2-backports-shutil-get-terminal-size
5345 (package
5346 (name "python2-backports-shutil-get-terminal-size")
5347 (version "1.0.0")
5348 (source
5349 (origin
5350 (method url-fetch)
5351 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
5352 (sha256
5353 (base32
5354 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
5355 (build-system python-build-system)
5356 (arguments
5357 `(#:python ,python-2
5358 #:phases
5359 (modify-phases %standard-phases
5360 (replace 'check
5361 (lambda _
4a4a7d9a 5362 (invoke "py.test" "-v"))))))
44d10b1f
RW
5363 (native-inputs
5364 `(("python2-pytest" ,python2-pytest)))
5365 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
5366 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
5367 (description
5368 "This package provides a backport of the @code{get_terminal_size
5369function} from Python 3.3's @code{shutil}.
5370Unlike the original version it is written in pure Python rather than C,
5371so it might be a tiny bit slower.")
5372 (license license:expat)))
5373
5374(define-public python-waf
5375 (package
5376 (name "python-waf")
5377 (version "2.0.11")
5378 (source (origin
5379 (method url-fetch)
5380 (uri (string-append "https://waf.io/"
5381 "waf-" version ".tar.bz2"))
5382 (sha256
5383 (base32
5384 "13zrniwkmfqgsgzi9v5m1367fppp9yzrz6z2ny6hy8dmpb8mj4z4"))))
5385 (build-system python-build-system)
5386 (arguments
5387 '(#:phases
5388 (modify-phases %standard-phases
5389 (replace 'build
5390 (lambda _
5391 (invoke "python" "waf-light" "configure" "build")))
5392 (replace 'check
5393 (lambda _
5394 (invoke "python" "waf" "--version")))
5395 (replace 'install
5396 (lambda* (#:key outputs #:allow-other-keys)
5397 (let ((out (assoc-ref outputs "out")))
5398 (install-file "waf" (string-append out "/bin")))
5399 #t))
5400 ;; waf breaks when it is wrapped.
5401 (delete 'wrap))))
5402 (home-page "https://waf.io/")
5403 (synopsis "Python-based build system")
5404 (description
5405 "Waf is a Python-based framework for configuring, compiling and installing
5406applications.")
5407 (license license:bsd-3)))
5408
5409(define-public python2-waf
5410 (package-with-python2 python-waf))
5411
5412(define-public python-pyzmq
5413 (package
5414 (name "python-pyzmq")
5415 (version "17.1.2")
5416 (source
5417 (origin
5418 (method url-fetch)
5419 (uri (pypi-uri "pyzmq" version))
5420 (sha256
5421 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
5422 (build-system python-build-system)
5423 (arguments
5424 `(#:configure-flags
5425 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
5426 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
5427 ;; --inplace' for 'python setup.py test' to work.
5428 #:tests? #f))
5429 (inputs
5430 `(("zeromq" ,zeromq)))
5431 (native-inputs
5432 `(("pkg-config" ,pkg-config)
5433 ("python-nose" ,python-nose)))
5434 (home-page "https://github.com/zeromq/pyzmq")
5435 (synopsis "Python bindings for 0MQ")
5436 (description
5437 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
5438 (license license:bsd-4)))
5439
5440(define-public python2-pyzmq
5441 (package-with-python2 python-pyzmq))
5442
5443(define-public python-pep8
5444 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
5445 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
5446 ;; some dependents' test suites, and nothing more.
5447 (package
5448 (name "python-pep8")
5449 (version "1.7.0")
5450 (source
5451 (origin
5452 (method url-fetch)
5453 (uri (pypi-uri "pep8" version))
5454 (sha256
5455 (base32
5456 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
5457 (build-system python-build-system)
5458 (home-page "https://pep8.readthedocs.org/")
5459 (synopsis "Python style guide checker")
5460 (description
5461 "This tools checks Python code against some of the style conventions in
5462PEP 8.")
5463 (license license:expat)))
5464
5465(define-public python2-pep8
5466 (package-with-python2 python-pep8))
5467
5468(define-public python-pyflakes
5469 (package
5470 (name "python-pyflakes")
5471 (version "2.0.0")
5472 (source
5473 (origin
5474 (method url-fetch)
5475 (uri (pypi-uri "pyflakes" version))
5476 (sha256
5477 (base32
5478 "0jba28czyvimdc72llms3f17swp3i8jdcabf5w0j00adfbn64xls"))))
5479 (build-system python-build-system)
5480 (home-page
5481 "https://github.com/pyflakes/pyflakes")
5482 (synopsis "Passive checker of Python programs")
5483 (description
5484 "Pyflakes statically checks Python source code for common errors.")
5485 (license license:expat)))
5486
5487(define-public python2-pyflakes
5488 (package-with-python2 python-pyflakes))
5489
5490(define-public python-mccabe
5491 (package
5492 (name "python-mccabe")
5493 (version "0.6.1")
5494 (source
5495 (origin
5496 (method url-fetch)
5497 (uri (pypi-uri "mccabe" version))
5498 (sha256
5499 (base32
5500 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
5501 (build-system python-build-system)
5502 (native-inputs
5503 `(("python-pytest" ,python-pytest-bootstrap)
5504 ("python-pytest-runner" ,python-pytest-runner)))
5505 (home-page "https://github.com/flintwork/mccabe")
5506 (synopsis "McCabe checker, plugin for flake8")
5507 (description
5508 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
5509complexity of Python source code.")
5510 (license license:expat)))
5511
5512(define-public python2-mccabe
5513 (package-with-python2 python-mccabe))
5514
5515(define-public python-mccabe-0.2.1
5516 (package (inherit python-mccabe)
5517 (version "0.2.1")
5518 (source
5519 (origin
5520 (method url-fetch)
5521 (uri (pypi-uri "mccabe" version))
5522 (sha256
5523 (base32
5524 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
5525
5526(define-public python2-mccabe-0.2.1
5527 (package-with-python2 python-mccabe-0.2.1))
5528
5529;; Flake8 2.4.1 requires an older version of pep8.
5530;; This should be removed ASAP.
5531(define-public python-pep8-1.5.7
5532 (package (inherit python-pep8)
5533 (version "1.5.7")
5534 (source
f3576970
RW
5535 (origin
5536 (method url-fetch)
5537 (uri (pypi-uri "pep8" version))
5538 (sha256
5539 (base32
5540 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
44d10b1f
RW
5541 (arguments
5542 ;; XXX Tests not compatible with Python 3.5.
5543 '(#:tests? #f))))
5544
5545(define-public python2-pep8-1.5.7
5546 (package-with-python2 python-pep8-1.5.7))
5547
5548;; Flake8 2.4.1 requires an older version of pyflakes.
5549;; This should be removed ASAP.
5550(define-public python-pyflakes-0.8.1
5551 (package (inherit python-pyflakes)
5552 (version "0.8.1")
5553 (source
8c4dffb5
RW
5554 (origin
5555 (method url-fetch)
5556 (uri (pypi-uri "pyflakes" version))
5557 (sha256
5558 (base32
5559 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
44d10b1f
RW
5560 (arguments
5561 ;; XXX Tests not compatible with Python 3.5.
5562 '(#:tests? #f))))
5563
5564(define-public python2-pyflakes-0.8.1
5565 (package-with-python2 python-pyflakes-0.8.1))
5566
5567;; This package is used by hypothesis which has thousands of dependent packages.
5568;; FIXME: Consolidate this with "python-flake8" below in the next rebuild cycle.
5569(define-public python-flake8-3.5
5570 (package
5571 (name "python-flake8")
5572 (version "3.5.0")
5573 (source
5574 (origin
5575 (method url-fetch)
5576 (uri (pypi-uri "flake8" version))
5577 (sha256
5578 (base32
5579 "184b33grvvjmiwlv9kyd7yng9qv5ld24154j70z332xxg9gjclvj"))))
5580 (build-system python-build-system)
5581 (arguments
5582 `(#:phases
5583 (modify-phases %standard-phases
5584 ;; Two errors don't seem to have assigned codes.
5585 (add-after 'unpack 'delete-broken-test
5586 (lambda _ (delete-file "tests/unit/test_pyflakes_codes.py") #t))
5587 (add-after 'unpack 'fix-problem-with-pycodestyle
5588 (lambda _
5589 ;; See https://gitlab.com/pycqa/flake8/merge_requests/230
5590 ;; This should no longer be needed with the next release.
5591 (substitute* "setup.py"
5592 (("PEP8_PLUGIN\\('break_around_binary_operator'\\),")
5593 "PEP8_PLUGIN('break_after_binary_operator'),\
5594PEP8_PLUGIN('break_before_binary_operator'),"))
5595 #t))
5596 (delete 'check)
5597 (add-after 'install 'check
5598 (lambda* (#:key inputs outputs #:allow-other-keys)
5599 (add-installed-pythonpath inputs outputs)
5600 (invoke "pytest" "-v")
5601 #t)))))
5602 (propagated-inputs
5603 `(("python-pycodestyle" ,python-pycodestyle)
5604 ("python-pyflakes" ,python-pyflakes)
5605 ("python-mccabe" ,python-mccabe)))
5606 (native-inputs
5607 `(("python-mock" ,python-mock)
5608 ("python-pytest" ,python-pytest-bootstrap)
5609 ("python-pytest-runner" ,python-pytest-runner)))
5610 (home-page "https://gitlab.com/pycqa/flake8")
5611 (synopsis
5612 "The modular source code checker: pep8, pyflakes and co")
5613 (description
5614 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
5615 (properties `((python2-variant . ,(delay python2-flake8-3.5))))
5616 (license license:expat)))
5617
5618(define-public python2-flake8-3.5
5619 (let ((base (package-with-python2 (strip-python2-variant python-flake8-3.5))))
5620 (package (inherit base)
5621 (propagated-inputs
5622 `(("python2-configparser" ,python2-configparser)
5623 ("python2-enum34" ,python2-enum34)
5624 ,@(package-propagated-inputs base))))))
5625
5626;; Version 3.5.0 has compatibility issues with Pyflakes 2.0, so we need
5627;; this newer version. Keep it as a separate variable for now to avoid
5628;; rebuilding "python-hypothesis"; this should be removed in the next
5629;; rebuild cycle.
5630(define-public python-flake8
5631 (package
5632 (inherit python-flake8-3.5)
5633 (version "3.6.0")
5634 (source (origin
5635 (method url-fetch)
5636 (uri (pypi-uri "flake8" version))
5637 (sha256
5638 (base32
5639 "0w0nprx22rbvrrkbfx9v5jc5gskbm08g219l7r8wai8zfswgadba"))))
5640 (arguments
5641 (substitute-keyword-arguments (package-arguments python-flake8-3.5)
5642 ((#:phases phases)
5643 `(modify-phases ,phases
5644 (delete 'delete-broken-test)
5645 (delete 'fix-problem-with-pycodestyle)))))
5646 (properties `((python2-variant . ,(delay python2-flake8))))))
5647
5648(define-public python2-flake8
5649 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
5650 (package (inherit base)
5651 (propagated-inputs
5652 (package-propagated-inputs python2-flake8-3.5)))))
5653
5654;; python-hacking requires flake8 <2.6.0.
5655(define-public python-flake8-2.5
5656 (package
5657 (inherit python-flake8)
5658 (version "2.5.5")
5659 (source (origin
5660 (method url-fetch)
5661 (uri (pypi-uri "flake8" version))
5662 (sha256
5663 (base32
5664 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
5665 (propagated-inputs
5666 `(("python-pep8" ,python-pep8)
5667 ,@(package-propagated-inputs python-flake8)))
5668 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
5669
5670(define-public python2-flake8-2.5
5671 (package
5672 (inherit python2-flake8)
5673 (version (package-version python-flake8-2.5))
5674 (source (origin
5675 (inherit (package-source python-flake8-2.5))))
5676 (propagated-inputs
5677 `(("python2-pep8" ,python2-pep8)
5678 ,@(package-propagated-inputs python2-flake8)))))
5679
5680(define-public python-flake8-polyfill
5681 (package
5682 (name "python-flake8-polyfill")
5683 (version "1.0.2")
5684 (source
5685 (origin
5686 (method url-fetch)
5687 (uri (pypi-uri "flake8-polyfill" version))
5688 (sha256
5689 (base32
5690 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
5691 (build-system python-build-system)
5692 (arguments
5693 '(#:phases
5694 (modify-phases %standard-phases
5695 (replace 'check
5696 (lambda _
5697 (setenv "PYTHONPATH"
5698 (string-append (getcwd) "/build/lib:"
5699 (getenv "PYTHONPATH")))
4f0a0894 5700 (invoke "py.test" "-v"))))))
44d10b1f
RW
5701 (native-inputs
5702 `(("python-flake8" ,python-flake8)
5703 ("python-mock" ,python-mock)
5704 ("python-pep8" ,python-pep8)
5705 ("python-pycodestyle" ,python-pycodestyle)
5706 ("python-pytest" ,python-pytest)))
5707 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
5708 (synopsis "Polyfill package for Flake8 plugins")
5709 (description
5710 "This package that provides some compatibility helpers for Flake8
5711plugins that intend to support Flake8 2.x and 3.x simultaneously.")
5712 (license license:expat)))
5713
5714(define-public python2-flake8-polyfill
5715 (package-with-python2 python-flake8-polyfill))
5716
5717(define-public python-mistune
5718 (package
5719 (name "python-mistune")
5720 (version "0.8.4")
5721 (source
5722 (origin
5723 (method url-fetch)
5724 (uri (pypi-uri "mistune" version))
5725 (sha256
5726 (base32
5727 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
5728 (build-system python-build-system)
5729 (native-inputs
5730 `(("python-nose" ,python-nose)
5731 ("python-cython" ,python-cython)))
5732 (home-page "https://github.com/lepture/mistune")
5733 (synopsis "Markdown parser in pure Python")
5734 (description "This package provides a fast markdown parser in pure
5735Python.")
5736 (license license:bsd-3)))
5737
5738(define-public python2-mistune
5739 (package-with-python2 python-mistune))
5740
5741(define-public python-markdown
5742 (package
5743 (name "python-markdown")
5744 (version "3.0.1")
5745 (source
5746 (origin
5747 (method url-fetch)
5748 (uri (pypi-uri "Markdown" version))
5749 (sha256
5750 (base32
5751 "0z6v8649sr434d5r5zmrhydka7v7f9yas4bwcgkcs0650jdhybnh"))))
5752 (build-system python-build-system)
5753 (native-inputs
5754 `(("python-nose" ,python-nose)
5755 ("python-pyyaml" ,python-pyyaml)))
5756 (home-page "https://python-markdown.github.io/")
5757 (synopsis "Python implementation of Markdown")
5758 (description
5759 "This package provides a Python implementation of John Gruber's
5760Markdown. The library features international input, various Markdown
5761extensions, and several HTML output formats. A command line wrapper
5762markdown_py is also provided to convert Markdown files to HTML.")
5763 (license license:bsd-3)))
5764
5765(define-public python2-markdown
5766 (package-with-python2 python-markdown))
5767
5768(define-public python-ptyprocess
5769 (package
5770 (name "python-ptyprocess")
5771 (version "0.5.2")
5772 (source
5773 (origin
5774 (method url-fetch)
5775 (uri (pypi-uri "ptyprocess" version))
5776 (sha256
5777 (base32
5778 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
5779 (build-system python-build-system)
5780 (native-inputs
5781 `(("python-nose" ,python-nose)))
5782 (arguments
5783 `(#:phases
5784 (modify-phases %standard-phases
5785 (replace 'check
7904d6fa 5786 (lambda _ (invoke "nosetests"))))))
44d10b1f
RW
5787 (home-page "https://github.com/pexpect/ptyprocess")
5788 (synopsis "Run a subprocess in a pseudo terminal")
5789 (description
5790 "This package provides a Python library used to launch a subprocess in a
5791pseudo terminal (pty), and interact with both the process and its pty.")
5792 (license license:isc)))
5793
5794(define-public python2-ptyprocess
5795 (package-with-python2 python-ptyprocess))
5796
5797(define-public python-cram
5798 (package
5799 (name "python-cram")
5800 (version "0.7")
5801 (home-page "https://bitheap.org/cram/")
5802 (source (origin
5803 (method url-fetch)
5804 (uri (list (string-append home-page "cram-"
5805 version ".tar.gz")
5806 (pypi-uri "cram" version)))
5807 (sha256
5808 (base32
5809 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
5810 (arguments
5811 '(#:phases
5812 (modify-phases %standard-phases
5813 (add-after 'unpack 'patch-source
5814 (lambda _
5815 (substitute* (find-files "cram" ".*\\.py$")
5816 ;; Replace default shell path.
5817 (("/bin/sh") (which "sh")))
5818 (substitute* (find-files "tests" ".*\\.t$")
5819 (("md5") "md5sum")
5820 (("/bin/bash") (which "bash"))
5821 (("/bin/sh") (which "sh")))
5822 (substitute* "cram/_test.py"
5823 ;; This hack works around a bug triggered by substituting
5824 ;; the /bin/sh paths. "tests/usage.t" compares the output of
5825 ;; "cram -h", which breaks the output at 80 characters. This
5826 ;; causes the line showing the default shell to break into two
5827 ;; lines, but the test expects a single line...
5828 (("env\\['COLUMNS'\\] = '80'")
5829 "env['COLUMNS'] = '160'"))
5830 #t))
5831 (delete 'check)
5832 (add-after 'install 'check
5833 ;; The test phase uses the built library and executable.
5834 ;; It's easier to run it after install since the build
5835 ;; directory contains version-specific PATH.
5836 (lambda* (#:key inputs outputs #:allow-other-keys)
5837 (add-installed-pythonpath inputs outputs)
5838 (setenv "PATH" (string-append (getenv "PATH") ":"
5839 (assoc-ref outputs "out") "/bin"))
2d7db192 5840 (invoke "make" "test"))))))
44d10b1f
RW
5841 (build-system python-build-system)
5842 (native-inputs
5843 `(("python-coverage" ,python-coverage)
5844 ("which" ,which)))
5845 (synopsis "Simple testing framework for command line applications")
5846 (description
5847 "Cram is a functional testing framework for command line applications.
5848Cram tests look like snippets of interactive shell sessions. Cram runs each
5849command and compares the command output in the test with the command’s actual
5850output.")
5851 (license license:gpl2+)))
5852
5853(define-public python2-cram
5854 (package-with-python2 python-cram))
5855
5856(define-public python-straight-plugin
5857 (package
5858 (name "python-straight-plugin")
5859 (version "1.4.1")
5860 (source
5861 (origin
5862 (method url-fetch)
5863 (uri (pypi-uri "straight.plugin" version))
5864 (sha256
5865 (base32
5866 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
5867 (build-system python-build-system)
5868 (home-page "https://github.com/ironfroggy/straight.plugin")
5869 (synopsis "Simple namespaced plugin facility")
5870 (description "Straight Plugin provides a type of plugin you can create from
5871almost any existing Python modules, and an easy way for outside developers to
5872add functionality and customization to your projects with their own plugins.")
5873 (license license:expat)))
5874
5875(define-public python2-straight-plugin
5876 (package-with-python2 python-straight-plugin))
5877
5878(define-public python-fonttools
5879 (package
5880 (name "python-fonttools")
5881 (version "3.28.0")
5882 (source (origin
5883 (method url-fetch)
5884 (uri (pypi-uri "fonttools" version ".zip"))
5885 (sha256
5886 (base32
5887 "0vsvjhidpb5kywpjgz1j3fywzkddxkb0afqai18qa3h6lqjyxwpb"))))
5888 (build-system python-build-system)
5889 (native-inputs
5890 `(("unzip" ,unzip)
5891 ("python-pytest" ,python-pytest)
5892 ("python-pytest-runner" ,python-pytest-runner)))
5893 (home-page "https://github.com/behdad/fonttools")
5894 (synopsis "Tools to manipulate font files")
5895 (description
5896 "FontTools/TTX is a library to manipulate font files from Python. It
5897supports reading and writing of TrueType/OpenType fonts, reading and writing
5898of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
5899also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
5900from an XML-based format.")
5901 (license license:expat)))
5902
5903(define-public python2-fonttools
5904 (package-with-python2 python-fonttools))
5905
5906(define-public python-ly
5907 (package
5908 (name "python-ly")
5909 (version "0.9.5")
5910 (source
5911 (origin
5912 (method url-fetch)
5913 (uri (pypi-uri name version))
5914 (sha256
5915 (base32
5916 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
5917 (build-system python-build-system)
5918 (arguments
5919 ;; FIXME: Some tests need network access.
5920 '(#:tests? #f))
5921 (synopsis "Tool and library for manipulating LilyPond files")
5922 (description "This package provides a Python library to parse, manipulate
5923or create documents in LilyPond format. A command line program ly is also
5924provided that can be used to do various manipulations with LilyPond files.")
5925 (home-page "https://pypi.python.org/pypi/python-ly")
5926 (license license:gpl2+)))
5927
5928(define-public python-appdirs
5929 (package
5930 (name "python-appdirs")
5931 (version "1.4.3")
5932 (source
5933 (origin
5934 (method url-fetch)
5935 (uri (pypi-uri "appdirs" version))
5936 (sha256
5937 (base32
5938 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
5939 (build-system python-build-system)
5940 (home-page "https://github.com/ActiveState/appdirs")
5941 (synopsis
5942 "Determine platform-specific dirs, e.g. a \"user data dir\"")
5943 (description
5944 "This module provides a portable way of finding out where user data
5945should be stored on various operating systems.")
5946 (license license:expat)))
5947
5948(define-public python2-appdirs
5949 (package-with-python2 python-appdirs))
5950
5951(define-public python-llfuse
5952 (package
5953 (name "python-llfuse")
5954 (version "1.3.5")
5955 (source (origin
5956 (method url-fetch)
5957 (uri (pypi-uri "llfuse" version ".tar.bz2"))
5958 (sha256
5959 (base32
5960 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
5961 (build-system python-build-system)
5962 (inputs
5963 `(("fuse" ,fuse)
5964 ("attr" ,attr)))
5965 (native-inputs
5966 `(("pkg-config" ,pkg-config)))
5967 (synopsis "Python bindings for FUSE")
5968 (description
5969 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
5970 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
5971 (license license:lgpl2.0+)
5972 (properties `((python2-variant . ,(delay python2-llfuse))))))
5973
5974(define-public python2-llfuse
5975 (package (inherit (package-with-python2
5976 (strip-python2-variant python-llfuse)))
5977 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
5978
5979;; For attic-0.16
5980(define-public python-llfuse-0.41
5981 (package (inherit python-llfuse)
5982 (version "0.41.1")
5983 (source (origin
5984 (method url-fetch)
5985 (uri (string-append
5986 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
5987 "llfuse-" version ".tar.bz2"))
5988 (sha256
5989 (base32
5990 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
5991 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
5992 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
5993 (license (list license:expat license:lgpl2.0+))))
5994
5995(define-public python-msgpack
5996 (package
5997 (name "python-msgpack")
5998 (version "0.5.6")
5999 (source (origin
6000 (method url-fetch)
6001 (uri (pypi-uri "msgpack" version))
6002 (sha256
6003 (base32
6004 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
6005 (build-system python-build-system)
6006 (arguments
6007 `(#:modules ((guix build utils)
6008 (guix build python-build-system)
6009 (ice-9 ftw)
6010 (srfi srfi-1)
6011 (srfi srfi-26))
6012 #:phases
6013 (modify-phases %standard-phases
6014 (replace 'check
6015 (lambda _
6016 (let ((cwd (getcwd)))
6017 (setenv "PYTHONPATH"
6018 (string-append cwd "/build/"
6019 (find (cut string-prefix? "lib" <>)
6020 (scandir (string-append cwd "/build")))
6021 ":"
6022 (getenv "PYTHONPATH")))
6023 (invoke "pytest" "-v" "test")))))))
6024 (native-inputs
6025 `(("python-pytest" ,python-pytest)))
6026 (synopsis "MessagePack (de)serializer")
6027 (description "MessagePack is a fast, compact binary serialization format,
6028suitable for similar data to JSON. This package provides CPython bindings for
6029reading and writing MessagePack data.")
6030 (home-page "https://pypi.python.org/pypi/msgpack/")
6031 (license license:asl2.0)))
6032
6033;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
6034;; release 0.5. Some packages like borg still call it by the old name for now.
6035;; <https://bugs.gnu.org/30662>
6036(define-public python-msgpack-transitional
6037 (package
6038 (inherit python-msgpack)
6039 (name "python-msgpack-transitional")
6040 (arguments
6041 (substitute-keyword-arguments (package-arguments python-msgpack)
6042 ((#:phases phases)
6043 `(modify-phases ,phases
6044 (add-after 'unpack 'configure-transitional
6045 (lambda _
6046 ;; Keep using the old name.
6047 (substitute* "setup.py"
6048 (("TRANSITIONAL = False")
6049 "TRANSITIONAL = 1"))
6050 #t))))))))
6051
6052(define-public python2-msgpack
6053 (package-with-python2 python-msgpack))
6054
6055(define-public python-netaddr
6056 (package
6057 (name "python-netaddr")
6058 (version "0.7.19")
6059 (source
6060 (origin
6061 (method url-fetch)
6062 (uri (pypi-uri "netaddr" version))
6063 (sha256
6064 (base32
6065 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
6066 (build-system python-build-system)
6067 (arguments `(#:tests? #f)) ;; No tests.
6068 (home-page "https://github.com/drkjam/netaddr/")
6069 (synopsis "Pythonic manipulation of network addresses")
6070 (description
6071 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6072and MAC network addresses.")
6073 (license license:bsd-3)))
6074
6075(define-public python2-netaddr
6076 (package-with-python2 python-netaddr))
6077
6078(define-public python-wrapt
6079 (package
6080 (name "python-wrapt")
dddd7a75 6081 (version "1.11.1")
44d10b1f
RW
6082 (source
6083 (origin
6084 (method url-fetch)
6085 (uri (pypi-uri "wrapt" version))
6086 (sha256
6087 (base32
dddd7a75 6088 "0cqmysny1pz01jw26q48q5zasvns6507rwhgm6wcw743f0r01sja"))))
44d10b1f
RW
6089 (build-system python-build-system)
6090 (arguments
6091 ;; Tests are not included in the tarball, they are only available in the
6092 ;; git repository.
6093 `(#:tests? #f))
6094 (home-page "https://github.com/GrahamDumpleton/wrapt")
6095 (synopsis "Module for decorators, wrappers and monkey patching")
6096 (description
6097 "The aim of the wrapt module is to provide a transparent object proxy for
6098 Python, which can be used as the basis for the construction of function
6099 wrappers and decorator functions.")
6100 (license license:bsd-2)))
6101
6102(define-public python2-wrapt
6103 (package-with-python2 python-wrapt))
6104
6105(define-public python-xlrd
6106 (package
6107 (name "python-xlrd")
6108 (version "1.0.0")
6109 (source (origin
6110 (method url-fetch)
6111 (uri (pypi-uri "xlrd" version))
6112 (sha256
6113 (base32
6114 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
6115 (build-system python-build-system)
6116 (arguments
6117 `(#:phases
6118 (modify-phases %standard-phases
6119 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
6120 ;; run tests instead for now.
45fd0081 6121 (replace 'check (lambda _ (invoke "nosetests"))))))
44d10b1f
RW
6122 (native-inputs `(("python-nose" ,python-nose)))
6123 (home-page "http://www.python-excel.org/")
6124 (synopsis "Library for extracting data from Excel files")
6125 (description "This packages provides a library to extract data from
6126spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
6127@samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
6128Unicode-aware. It is not intended as an end-user tool.")
6129 (license license:bsd-3)))
6130
6131(define-public python2-xlrd
6132 (package-with-python2 python-xlrd))
6133
6134(define-public python-prettytable
6135 (package
6136 (name "python-prettytable")
6137 (version "0.7.2")
6138 (source
6139 (origin
6140 (method url-fetch)
337c3a1e 6141 (uri (pypi-uri "prettytable" version ".tar.bz2"))
44d10b1f
RW
6142 (sha256
6143 (base32
6144 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
6145 (build-system python-build-system)
6146 (home-page "http://code.google.com/p/prettytable/")
6147 (synopsis "Display tabular data in an ASCII table format")
6148 (description
6149 "A library designed to represent tabular data in visually appealing ASCII
6150tables. PrettyTable allows for selection of which columns are to be printed,
6151independent alignment of columns (left or right justified or centred) and
6152printing of sub-tables by specifying a row range.")
6153 (license license:bsd-3)))
6154
6155(define-public python2-prettytable
6156 (package-with-python2 python-prettytable))
6157
6158(define-public python-tables
6159 (package
6160 (name "python-tables")
6161 (version "3.4.4")
6162 (source
6163 (origin
6164 (method url-fetch)
6165 (uri (pypi-uri "tables" version))
6166 (sha256
6167 (base32
6168 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
6169 (modules '((guix build utils)))
6170 (snippet
6171 '(begin
6172 ;; Remove pre-compiled .pyc files from source.
6173 (for-each delete-file-recursively
6174 (find-files "." "__pycache__" #:directories? #t))
6175 (for-each delete-file (find-files "." "\\.pyc$"))
6176 #t))))
6177 (build-system python-build-system)
6178 (arguments
6179 `(;; FIXME: python-build-system does not pass configure-flags to "build"
6180 ;; or "check", so we must override the build and check phases.
6181 #:phases
6182 (modify-phases %standard-phases
6183 (add-after 'unpack 'use-gcc
6184 (lambda _
6185 (substitute* "setup.py"
6186 (("compiler = new_compiler\\(\\)" line)
6187 (string-append line
6188 "\ncompiler.set_executables(compiler='gcc',"
6189 "compiler_so='gcc',"
6190 "linker_exe='gcc',"
6191 "linker_so='gcc -shared')")))
6192 #t))
6193 (replace 'build
6194 (lambda* (#:key inputs #:allow-other-keys)
35d79d61
RW
6195 (invoke "python" "setup.py" "build"
6196 (string-append "--hdf5="
6197 (assoc-ref inputs "hdf5")))))
44d10b1f
RW
6198 (replace 'check
6199 (lambda* (#:key inputs #:allow-other-keys)
35d79d61
RW
6200 (invoke "python" "setup.py" "check"
6201 (string-append "--hdf5="
6202 (assoc-ref inputs "hdf5"))))))))
44d10b1f
RW
6203 (propagated-inputs
6204 `(("python-numexpr" ,python-numexpr)
6205 ("python-numpy" ,python-numpy)))
6206 (native-inputs
6207 `(("python-cython" ,python-cython)
6208 ("pkg-config" ,pkg-config)))
6209 (inputs
6210 `(("hdf5" ,hdf5)
6211 ("bzip2" ,bzip2)
6212 ("zlib" ,zlib)))
6213 (home-page "http://www.pytables.org/")
6214 (synopsis "Hierarchical datasets for Python")
6215 (description "PyTables is a package for managing hierarchical datasets and
6216designed to efficiently cope with extremely large amounts of data.")
6217 (license license:bsd-3)))
6218
6219(define-public python2-tables
6220 (package-with-python2 python-tables))
6221
6222(define-public python-pyasn1
6223 (package
6224 (name "python-pyasn1")
6225 (version "0.4.3")
6226 (source
6227 (origin
6228 (method url-fetch)
6229 (uri (pypi-uri "pyasn1" version))
6230 (sha256
6231 (base32
6232 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
6233 (build-system python-build-system)
6234 (home-page "http://pyasn1.sourceforge.net/")
6235 (synopsis "ASN.1 types and codecs")
6236 (description
6237 "This is an implementation of ASN.1 types and codecs in Python. It is
6238suitable for a wide range of protocols based on the ASN.1 specification.")
6239 (license license:bsd-2)))
6240
6241(define-public python2-pyasn1
6242 (package-with-python2 python-pyasn1))
6243
6244(define-public python-pyasn1-modules
6245 (package
6246 (name "python-pyasn1-modules")
6247 (version "0.2.2")
6248 (source
6249 (origin
6250 (method url-fetch)
6251 (uri (pypi-uri "pyasn1-modules" version))
6252 (sha256
6253 (base32
6254 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
6255 (build-system python-build-system)
6256 (propagated-inputs
6257 `(("python-pyasn1" ,python-pyasn1)))
6258 (home-page "https://sourceforge.net/projects/pyasn1/")
6259 (synopsis "ASN.1 codec implementations")
6260 (description
6261 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
6262implementations of ASN.1-based codecs and protocols.")
6263 (license license:bsd-3)))
6264
6265(define-public python2-pyasn1-modules
6266 (package-with-python2 python-pyasn1-modules))
6267
6268(define-public python-ipaddress
6269 (package
6270 (name "python-ipaddress")
6271 (version "1.0.22")
6272 (source (origin
6273 (method url-fetch)
6274 (uri (pypi-uri "ipaddress" version))
6275 (sha256
6276 (base32
6277 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
6278 (build-system python-build-system)
6279 (home-page "https://github.com/phihag/ipaddress")
6280 (synopsis "IP address manipulation library")
6281 (description
6282 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
6283 in Python. This library is used to create, poke at, and manipulate IPv4 and
6284 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
6285 module to older versions of Python.")
6286 (license license:psfl)))
6287
6288(define-public python2-ipaddress
6289 (package-with-python2 python-ipaddress))
6290
6291(define-public python2-ipaddr
6292 (package
6293 (name "python2-ipaddr")
6294 (version "2.1.11")
6295 (source
6296 (origin
6297 (method url-fetch)
6298 (uri (pypi-uri "ipaddr" version))
6299 (sha256
6300 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
6301 (build-system python-build-system)
6302 (arguments
6303 `(#:python ,python-2 ;version 2 only
6304 #:phases
6305 (modify-phases %standard-phases
6306 (replace 'check
40b8c4e3 6307 (lambda _ (invoke "python" "ipaddr_test.py"))))))
44d10b1f
RW
6308 (home-page "https://github.com/google/ipaddr-py")
6309 (synopsis "IP address manipulation library")
6310 (description
6311 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
6312IPv6 addresses and networks.
6313
6314For new implementations you may prefer to use the standard module
6315@code{ipaddress}, which was introduced in Python 3.3 and backported to older
6316versions of Python.")
6317 (license license:asl2.0)))
6318
6319(define-public python-idna
6320 (package
6321 (name "python-idna")
6322 (version "2.7")
6323 (source
6324 (origin
6325 (method url-fetch)
6326 (uri (pypi-uri "idna" version))
6327 (sha256
6328 (base32
6329 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))
6330 (build-system python-build-system)
6331 (home-page "https://github.com/kjd/idna")
6332 (synopsis "Internationalized domain names in applications")
6333 (description
6334 "This is a library to support the Internationalised Domain Names in
6335Applications (IDNA) protocol as specified in RFC 5891. This version of the
6336protocol is often referred to as “IDNA2008” and can produce different results
6337from the earlier standard from 2003. The library is also intended to act as a
6338suitable drop-in replacement for the “encodings.idna” module that comes with
6339the Python standard library but currently only supports the older 2003
6340specification.")
6341 (license license:bsd-4)))
6342
6343(define-public python2-idna
6344 (package-with-python2 python-idna))
6345
6346(define-public python-idna-ssl
6347 (package
6348 (name "python-idna-ssl")
6349 (version "1.0.1")
6350 (source
6351 (origin
6352 (method url-fetch)
6353 (uri (pypi-uri "idna-ssl" version))
6354 (sha256
6355 (base32
6356 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
6357 (build-system python-build-system)
6358 (arguments
6359 `(#:tests? #f)) ;circular dependency with python-aiohttp
6360 (home-page "https://github.com/aio-libs/idna-ssl")
6361 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
6362 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
6363domains support.")
6364 (license license:expat)))
6365
6366(define-public python-pretend
6367 (package
6368 (name "python-pretend")
6369 (version "1.0.9")
6370 (source
6371 (origin
6372 (method url-fetch)
9f1f22ee 6373 (uri (pypi-uri "pretend" version))
44d10b1f
RW
6374 (sha256
6375 (base32
6376 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
6377 (build-system python-build-system)
6378 (home-page "https://github.com/alex/pretend")
6379 (synopsis "Library for stubbing in Python")
6380 (description
6381 "Pretend is a library to make stubbing with Python easier. Stubbing is a
6382technique for writing tests. You may hear the term mixed up with mocks,
6383fakes, or doubles. Basically, a stub is an object that returns pre-canned
6384responses, rather than doing any computation.")
6385 (license license:bsd-3)))
6386
6387(define-public python2-pretend
6388 (package-with-python2 python-pretend))
6389
6390(define-public python-pip
6391 (package
6392 (name "python-pip")
6393 (version "18.1")
6394 (source
6395 (origin
6396 (method url-fetch)
6397 (uri (pypi-uri "pip" version))
6398 (sha256
6399 (base32
6400 "188fclay154s520n43s7cxxlhdaiysvxf19zk8vr1xbyjyyr58n0"))))
6401 (build-system python-build-system)
6402 (arguments
6403 '(#:tests? #f)) ; there are no tests in the pypi archive.
6404 (home-page "https://pip.pypa.io/")
6405 (synopsis "Package manager for Python software")
6406 (description
6407 "Pip is a package manager for Python software, that finds packages on the
6408Python Package Index (PyPI).")
6409 (license license:expat)))
6410
6411(define-public python2-pip
6412 (package-with-python2 python-pip))
6413
6414(define-public python-tlsh
6415 (package
6416 (name "python-tlsh")
6417 (version "3.4.5")
6418 (home-page "https://github.com/trendmicro/tlsh")
6419 (source (origin
6420 (method url-fetch)
6421 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
6422 version ".tar.gz"))
6423 (sha256
6424 (base32
6425 "1x1vahd4zg5kpyr9h9hs3fvh460p25rjy4cclwdnbbw8x3vc30q3"))
6426 (file-name (string-append name "-" version ".tar.gz"))))
6427 (build-system cmake-build-system)
6428 (arguments
6429 '(#:out-of-source? #f
6430 #:phases (modify-phases %standard-phases
6431 (replace
6432 'install
6433 (lambda* (#:key outputs #:allow-other-keys)
6434 ;; Build and install the Python bindings. The underlying
6435 ;; C++ library is apparently not meant to be installed.
6436 (let ((out (assoc-ref outputs "out")))
6437 (with-directory-excursion "py_ext"
6438 (and (system* "python" "setup.py" "build")
6439 (system* "python" "setup.py" "install"
6440 (string-append "--prefix=" out))))))))))
6441 (inputs `(("python" ,python-wrapper))) ;for the bindings
6442 (synopsis "Fuzzy matching library for Python")
6443 (description
6444 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
6445Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
6446value which can be used for similarity comparisons. Similar objects have
6447similar hash values, which allows for the detection of similar objects by
6448comparing their hash values. The byte stream should have a sufficient amount
6449of complexity; for example, a byte stream of identical bytes will not generate
6450a hash value.")
6451 (license license:asl2.0)))
6452
6453(define-public python2-tlsh
6454 (package
6455 (inherit python-tlsh)
6456 (name "python2-tlsh")
6457 (inputs `(("python" ,python-2)))))
6458
6459(define-public python-termcolor
6460 (package
6461 (name "python-termcolor")
6462 (version "1.1.0")
6463 (source
6464 (origin
6465 (method url-fetch)
6466 (uri (pypi-uri "termcolor" version))
6467 (sha256
6468 (base32
6469 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
6470 (build-system python-build-system)
6471 (arguments
6472 ;; There are no tests.
6473 `(#:tests? #f))
6474 (home-page "https://pypi.python.org/pypi/termcolor")
6475 (synopsis "ANSII Color formatting for terminal output")
6476 (description
6477 "This package provides ANSII Color formatting for output in terminals.")
6478 (license license:expat)))
6479
6480(define-public python2-termcolor
6481 (package-with-python2 python-termcolor))
6482
6483(define-public python-libarchive-c
6484 (package
6485 (name "python-libarchive-c")
6486 (version "2.8")
6487 (source (origin
6488 (method url-fetch)
6489 (uri (pypi-uri "libarchive-c" version))
6490 (sha256
6491 (base32
6492 "0qg0v1s9c1xdk9philhnv8k6c6nicvnvfwlc0j9srg90jmdlvm06"))))
6493 (build-system python-build-system)
6494 (arguments
6495 '(#:phases (modify-phases %standard-phases
6496 (add-before
6497 'build 'reference-libarchive
6498 (lambda* (#:key inputs #:allow-other-keys)
6499 ;; Retain the absolute file name of libarchive.so.
6500 (let ((libarchive (assoc-ref inputs "libarchive")))
6501 (substitute* "libarchive/ffi.py"
6502 (("find_library\\('archive'\\)")
6503 (string-append "'" libarchive
6504 "/lib/libarchive.so'"))))))
6505 (replace 'check
6506 (lambda _ (invoke "pytest" "-vv"))))))
6507 (native-inputs
6508 `(("python-mock" ,python-mock)
6509 ("python-pytest" ,python-pytest)))
6510 (inputs
6511 `(("libarchive" ,libarchive)))
6512 (home-page "https://github.com/Changaco/python-libarchive-c")
6513 (synopsis "Python interface to libarchive")
6514 (description
6515 "This package provides Python bindings to libarchive, a C library to
6516access possibly compressed archives in many different formats. It uses
6517Python's @code{ctypes} foreign function interface (FFI).")
6518 (license license:lgpl2.0+)))
6519
6520(define-public python2-libarchive-c
6521 (package-with-python2 python-libarchive-c))
6522
6523(define-public python-file
6524 (package
6525 (inherit file)
6526 (name "python-file")
6527 (build-system python-build-system)
6528 (arguments
6529 '(#:tests? #f ;no tests
6530 #:configure-flags '("--single-version-externally-managed" "--root=/")
6531 #:phases (modify-phases %standard-phases
6532 (add-before 'build 'change-directory
6533 (lambda _
6534 (chdir "python")
6535 #t))
6536 (add-before 'build 'set-library-file-name
6537 (lambda* (#:key inputs #:allow-other-keys)
6538 (let ((file (assoc-ref inputs "file")))
6539 (substitute* "magic.py"
6540 (("find_library\\('magic'\\)")
6541 (string-append "'" file "/lib/libmagic.so'")))
6542 #t))))))
6543 (inputs `(("file" ,file)))
6544 (self-native-input? #f)
6545 (synopsis "Python bindings to the libmagic file type guesser. Note that
6546this module and the python-magic module both provide a \"magic.py\" file;
6547these two modules, which are different and were developed separately, both
6548serve the same purpose: provide Python bindings for libmagic.")))
6549
6550(define-public python2-file
6551 (package-with-python2 python-file))
6552
6553(define-public python-debian
6554 (package
6555 (name "python-debian")
6556 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
6557 (version "0.1.28")
6558 (source
6559 (origin
6560 (method url-fetch)
6561 (uri (pypi-uri name version))
6562 (sha256
6563 (base32
6564 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
6565 (build-system python-build-system)
6566 (propagated-inputs
6567 `(("python-six" ,python-six)))
6568 (synopsis "Debian package related modules")
6569 (description
6570 ;; XXX: Use @enumerate instead of @itemize to work around
6571 ;; <http://bugs.gnu.org/21772>.
6572 "This package provides Python modules that abstract many formats of
6573Debian-related files, such as:
6574
6575@enumerate
6576@item Debtags information;
6577@item @file{debian/changelog} files;
6578@item packages files, pdiffs;
6579@item control files of single or multiple RFC822-style paragraphs---e.g.
6580 @file{debian/control}, @file{.changes}, @file{.dsc};
6581@item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
6582 contained files and meta-information.
6583@end enumerate\n")
6584
6585 ;; Modules are either GPLv2+ or GPLv3+.
6586 (license license:gpl3+)))
6587
6588(define-public python2-debian
6589 (package-with-python2 python-debian))
6590
6591(define-public python-nbformat
6592 (package
6593 (name "python-nbformat")
6594 (version "4.4.0")
6595 (source
6596 (origin
6597 (method url-fetch)
6598 (uri (pypi-uri "nbformat" version))
6599 (sha256
6600 (base32
6601 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
6602 (build-system python-build-system)
6603 (arguments `(#:tests? #f)) ; no test target
6604 (propagated-inputs
6605 `(("python-ipython-genutils" ,python-ipython-genutils)
6606 ("python-jsonschema" ,python-jsonschema)
6607 ("python-jupyter-core" ,python-jupyter-core)
6608 ("python-traitlets" ,python-traitlets)))
6609 (home-page "http://jupyter.org")
6610 (synopsis "Jupyter Notebook format")
6611 (description "This package provides the reference implementation of the
6612Jupyter Notebook format and Python APIs for working with notebooks.")
6613 (license license:bsd-3)))
6614
6615(define-public python2-nbformat
6616 (package-with-python2 python-nbformat))
6617
6618(define-public python-bleach
6619 (package
6620 (name "python-bleach")
6621 (version "1.4.3")
6622 (source
6623 (origin
6624 (method url-fetch)
6625 (uri (pypi-uri "bleach" version))
6626 (sha256
6627 (base32
6628 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
6629 (build-system python-build-system)
6630 (propagated-inputs
6631 `(("python-html5lib" ,python-html5lib-0.9)
6632 ("python-six" ,python-six)))
6633 (native-inputs
6634 `(("python-nose" ,python-nose)))
6635 (home-page "https://github.com/jsocol/bleach")
6636 (synopsis "Whitelist-based HTML-sanitizing tool")
6637 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
6638 (license license:asl2.0)))
6639
6640(define-public python2-bleach
6641 (package-with-python2 python-bleach))
6642
6643(define-public python-entrypoints
6644 (package
6645 (name "python-entrypoints")
a7f1b718 6646 (version "0.3")
44d10b1f
RW
6647 (source
6648 (origin
6649 (method url-fetch)
a7f1b718 6650 (uri (pypi-uri "entrypoints" version))
44d10b1f
RW
6651 (sha256
6652 (base32
a7f1b718 6653 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
44d10b1f
RW
6654 (build-system python-build-system)
6655 ;; The package does not come with a setup.py file, so we have to generate
6656 ;; one ourselves.
6657 (arguments
6658 `(#:tests? #f
6659 #:phases
6660 (modify-phases %standard-phases
6661 (add-after 'unpack 'create-setup.py
6662 (lambda _
6663 (call-with-output-file "setup.py"
6664 (lambda (port)
6665 (format port "\
6666from setuptools import setup
6667setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
6668" ,version))))))))
6669 (home-page "https://github.com/takluyver/entrypoints")
6670 (synopsis "Discover and load entry points from installed Python packages")
6671 (description "Entry points are a way for Python packages to advertise
6672objects with some common interface. The most common examples are
6673@code{console_scripts} entry points, which define shell commands by
6674identifying a Python function to run. The @code{entrypoints} module contains
6675functions to find and load entry points.")
6676 (license license:expat)))
6677
6678(define-public python2-entrypoints
6679 (package-with-python2 python-entrypoints))
6680
6681(define-public python-nbconvert
6682 (package
6683 (name "python-nbconvert")
6684 (version "5.0.0b1")
6685 (source
6686 (origin
6687 (method url-fetch)
6688 (uri (pypi-uri "nbconvert" version))
6689 (sha256
6690 (base32
6691 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
6692 (build-system python-build-system)
6693 (arguments
6694 `(;; The "bdist_egg" target is disabled by default, causing the installation
6695 ;; to fail.
6696 #:configure-flags (list "bdist_egg")
6697 ;; FIXME: 5 failures, 40 errors.
6698 #:tests? #f))
6699 ;; #:phases
6700 ;; (modify-phases %standard-phases
6701 ;; (replace 'check
6702 ;; (lambda _
6703 ;; (zero? (system* "py.test" "-v")))))
6704 (native-inputs
6705 `(("python-pytest" ,python-pytest)))
6706 (propagated-inputs
6707 `(("python-bleach" ,python-bleach)
6708 ("python-entrypoints" ,python-entrypoints)
6709 ("python-jinja2" ,python-jinja2)
6710 ("python-jupyter-core" ,python-jupyter-core)
6711 ("python-mistune" ,python-mistune)
6712 ("python-nbformat" ,python-nbformat)
6713 ("python-pygments" ,python-pygments)
6714 ("python-traitlets" ,python-traitlets)))
6715 (home-page "http://jupyter.org")
6716 (synopsis "Converting Jupyter Notebooks")
6717 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
6718notebooks to various other formats via Jinja templates. It allows you to
6719convert an @code{.ipynb} notebook file into various static formats including:
6720
6721@enumerate
6722@item HTML
6723@item LaTeX
6724@item PDF
6725@item Reveal JS
6726@item Markdown (md)
6727@item ReStructured Text (rst)
6728@item executable script
6729@end enumerate\n")
6730 (license license:bsd-3)))
6731
6732(define-public python2-nbconvert
6733 (package-with-python2 python-nbconvert))
6734
44d10b1f
RW
6735(define-public python-notebook
6736 (package
6737 (name "python-notebook")
6738 (version "5.7.4")
6739 (source (origin
6740 (method url-fetch)
6741 (uri (pypi-uri "notebook" version))
6742 (sha256
6743 (base32
6744 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
6745 (build-system python-build-system)
6746 (arguments
6747 `(#:phases
6748 (modify-phases %standard-phases
6749 (replace 'check
6750 (lambda _
6751 ;; These tests require a browser
6752 (delete-file-recursively "notebook/tests/selenium")
6753 ;; Some tests need HOME
6754 (setenv "HOME" "/tmp")
6755 ;; This file contains "warningfilters", which are not supported
6756 ;; by this version of nose.
6757 (delete-file "setup.cfg")
6758 (with-directory-excursion "/tmp"
6759 (invoke "nosetests" "-v"))
6760 #t)))))
6761 (propagated-inputs
6762 `(("python-jupyter-core" ,python-jupyter-core)
6763 ("python-nbformat" ,python-nbformat)
6764 ("python-nbconvert" ,python-nbconvert)
6765 ("python-prometheus-client" ,python-prometheus-client)
6766 ("python-send2trash" ,python-send2trash)
6767 ("python-terminado" ,python-terminado)))
6768 (native-inputs
6769 `(("python-nose" ,python-nose)
6770 ("python-sphinx" ,python-sphinx)
6771 ("python-requests" ,python-requests)))
6772 (home-page "http://jupyter.org/")
6773 (synopsis "Web-based notebook environment for interactive computing")
6774 (description
6775 "The Jupyter HTML notebook is a web-based notebook environment for
6776interactive computing.")
6777 (properties `((python2-variant . ,(delay python2-notebook))))
6778 (license license:bsd-3)))
6779
6780(define-public python2-notebook
6781 (let ((base (package-with-python2
6782 (strip-python2-variant python-notebook))))
6783 (package (inherit base)
6784 (native-inputs
6785 `(("python2-mock" ,python2-mock)
6786 ,@(package-native-inputs base)))
6787 (arguments
6788 (substitute-keyword-arguments (package-arguments base)
6789 ((#:phases phases)
6790 `(modify-phases ,phases
6791 (add-before 'check 'disable-test-case
6792 ;; The test requires network access to localhost. Curiously it
6793 ;; fails with Python 2 only. Simply make the test-case return
6794 ;; immediately.
6795 (lambda _
6796 (substitute*
6797 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
6798 (("formats = self.nbconvert_api") "return #")))))))))))
6799
6800(define-public python-widgetsnbextension
6801 (package
6802 (name "python-widgetsnbextension")
6803 (version "3.4.2")
6804 (source
6805 (origin
6806 (method url-fetch)
6807 (uri (pypi-uri "widgetsnbextension" version))
6808 (sha256
6809 (base32
6810 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
6811 (build-system python-build-system)
6812 (propagated-inputs
6813 `(("python-ipykernel" ,python-ipykernel)
6814 ("python-notebook" ,python-notebook)))
6815 (native-inputs
6816 `(("python-certifi" ,python-certifi)
6817 ("python-nose" ,python-nose)))
6818 (home-page "https://ipython.org")
6819 (synopsis "IPython HTML widgets for Jupyter")
6820 (description "This package provides interactive HTML widgets for Jupyter
6821notebooks.")
6822 (license license:bsd-3)))
6823
6824(define-public python2-widgetsnbextension
6825 (package-with-python2 python-widgetsnbextension))
6826
6827(define-public python-ipywidgets
6828 (package
6829 (name "python-ipywidgets")
6830 (version "5.2.2")
6831 (source
6832 (origin
6833 (method url-fetch)
6834 (uri (pypi-uri "ipywidgets" version))
6835 (sha256
6836 (base32
6837 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
6838 (build-system python-build-system)
6839 (propagated-inputs
6840 `(("python-ipython" ,python-ipython)
6841 ("python-traitlets" ,python-traitlets)
6842 ("python-widgetsnbextension" ,python-widgetsnbextension)))
6843 (native-inputs
6844 `(("python-nose" ,python-nose)
6845 ("python-pytest" ,python-pytest)))
6846 (home-page "https://ipython.org")
6847 (synopsis "IPython HTML widgets for Jupyter")
6848 (description "Ipywidgets are interactive HTML widgets for Jupyter
6849notebooks and the IPython kernel. Notebooks come alive when interactive
6850widgets are used. Users gain control of their data and can visualize changes
6851in the data.")
6852 (license license:bsd-3)))
6853
6854(define-public python2-ipywidgets
6855 (package-with-python2 python-ipywidgets))
6856
6857(define-public python-jupyter-console
6858 (package
6859 (name "python-jupyter-console")
6860 (version "5.2.0")
6861 (source
6862 (origin
6863 (method url-fetch)
6864 (uri (pypi-uri "jupyter_console" version))
6865 (sha256
6866 (base32
6867 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
6868 (build-system python-build-system)
6869 ;; Tests only run in an TTY.
6870 (arguments `(#:tests? #f))
6871 (propagated-inputs
6872 `(("python-ipykernel" ,python-ipykernel)
6873 ("python-jupyter-client" ,python-jupyter-client)
6874 ("python-prompt-toolkit" ,python-prompt-toolkit-1)
6875 ("python-pygments" ,python-pygments)))
6876 (native-inputs
6877 `(("python-nose" ,python-nose)))
6878 (home-page "https://jupyter.org")
6879 (synopsis "Jupyter terminal console")
6880 (description "This package provides a terminal-based console frontend for
6881Jupyter kernels. It also allows for console-based interaction with non-Python
6882Jupyter kernels such as IJulia and IRKernel.")
6883 (license license:bsd-3)))
6884
6885(define-public python2-jupyter-console
6886 (package-with-python2 python-jupyter-console))
6887
6888;; The python-ipython and python-jupyter-console require each other. To get
6889;; the functionality in both packages working, strip down the
6890;; python-jupyter-console package when using it as an input to python-ipython.
6891(define python-jupyter-console-minimal
6892 (package
6893 (inherit python-jupyter-console)
6894 (name "python-jupyter-console-minimal")
6895 (arguments
6896 (substitute-keyword-arguments
6897 (package-arguments python-jupyter-console)
6898 ((#:phases phases)
6899 `(modify-phases ,phases
6900 (add-after 'install 'delete-bin
6901 (lambda* (#:key outputs #:allow-other-keys)
6902 ;; Delete the bin files, to avoid conflicts in profiles
6903 ;; where python-ipython and python-jupyter-console are
6904 ;; both present.
6905 (delete-file-recursively
6906 (string-append
6907 (assoc-ref outputs "out") "/bin"))))))))
6908 ;; Remove the python-ipython propagated input, to avoid the cycle
6909 (propagated-inputs
6910 (alist-delete
6911 "python-ipython"
6912 (package-propagated-inputs python-jupyter-console)))))
6913
6914(define-public python-qtconsole
6915 (package
6916 (name "python-qtconsole")
6917 (version "4.4.3")
6918 (source
6919 (origin
6920 (method url-fetch)
6921 (uri (pypi-uri "qtconsole" version))
6922 (sha256
6923 (base32
6924 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
6925 (build-system python-build-system)
6926 (arguments
6927 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
6928 ;; but we only have the LTS version 5.x. This means that there might be
6929 ;; runtime errors, but since this is a dependency of the Jupyter package,
6930 ;; and Jupyter can be used without the qtconsole we can overlook this for
6931 ;; now.
6932 `(#:tests? #f
6933 #:phases
6934 (modify-phases %standard-phases
6935 (add-before 'check 'pre-check
6936 (lambda _
6937 (setenv "QT_QPA_PLATFORM" "offscreen")
6938 #t)))))
6939 (propagated-inputs
6940 `(("python-ipykernel" ,python-ipykernel)
6941 ("python-ipython" ,python-ipython)))
6942 (native-inputs
6943 `(("python-pytest" ,python-pytest)))
6944 (home-page "http://jupyter.org")
6945 (synopsis "Jupyter Qt console")
6946 (description "This package provides a Qt-based console for Jupyter with
6947support for rich media output.")
6948 (license license:bsd-3)))
6949
6950(define-public jupyter
6951 (package
6952 (name "jupyter")
6953 (version "1.0.0")
6954 (source
6955 (origin
6956 (method url-fetch)
6957 (uri (pypi-uri "jupyter" version))
6958 (sha256
6959 (base32
6960 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
6961 (build-system python-build-system)
6962 (arguments '(#:tests? #f)) ; there are none.
6963 (propagated-inputs
6964 `(("python-ipykernel" ,python-ipykernel)
6965 ("python-ipywidgets" ,python-ipywidgets)
6966 ("python-jupyter-console" ,python-jupyter-console)
6967 ("python-nbconvert" ,python-nbconvert)
6968 ("python-notebook" ,python-notebook)
6969 ("python-qtconsole" ,python-qtconsole)))
6970 (native-search-paths
6971 (list (search-path-specification
6972 (variable "JUPYTER_PATH")
6973 (files '("share/jupyter")))))
6974 (home-page "https://jupyter.org")
6975 (synopsis "Web application for interactive documents")
6976 (description
6977 "The Jupyter Notebook is a web application that allows you to create and
6978share documents that contain live code, equations, visualizations and
6979explanatory text. Uses include: data cleaning and transformation, numerical
6980simulation, statistical modeling, machine learning and much more.")
6981 (license license:bsd-3)))
6982
6983(define-public python-chardet
6984 (package
6985 (name "python-chardet")
6986 (version "3.0.4")
6987 (source
6988 (origin
6989 (method url-fetch)
6990 (uri (pypi-uri "chardet" version))
6991 (sha256
6992 (base32
6993 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
6994 (native-inputs
6995 `(("python-hypothesis" ,python-hypothesis)
6996 ("python-pytest" ,python-pytest)
6997 ("python-pytest-runner" ,python-pytest-runner)))
6998 (build-system python-build-system)
6999 (home-page "https://github.com/chardet/chardet")
7000 (synopsis "Universal encoding detector for Python 2 and 3")
7001 (description
7002 "This package provides @code{chardet}, a Python module that can
7003automatically detect a wide range of file encodings.")
7004 (license license:lgpl2.1+)))
7005
7006(define-public python2-chardet
7007 (package-with-python2 python-chardet))
7008
7009(define-public python-docopt
7010 (package
7011 (name "python-docopt")
7012 (version "0.6.2")
7013 (source
7014 (origin
7015 (method url-fetch)
7016 ;; The release on PyPI does not include tests.
7017 (uri (string-append
7018 "https://github.com/docopt/docopt/archive/"
7019 version ".tar.gz"))
7020 (file-name (string-append name "-" version ".tar.gz"))
7021 (sha256
7022 (base32
7023 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
7024 (build-system python-build-system)
7025 (native-inputs
7026 `(("python-pytest" ,python-pytest)))
7027 (arguments
7028 `(#:phases
7029 (modify-phases %standard-phases
7030 (replace 'check
7031 (lambda _ (invoke "py.test"))))))
7032 (home-page "http://docopt.org")
7033 (synopsis "Command-line interface description language for Python")
7034 (description "This library allows the user to define a command-line
7035interface from a program's help message rather than specifying it
7036programatically with command-line parsers like @code{getopt} and
7037@code{argparse}.")
7038 (license license:expat)))
7039
7040(define-public python2-docopt
7041 (package-with-python2 python-docopt))
7042
7043(define-public python-pythondialog
7044 (package
7045 (name "python-pythondialog")
7046 (version "3.4.0")
7047 (source
7048 (origin
7049 (method url-fetch)
7050 (uri (pypi-uri "pythondialog" version))
7051 (sha256
7052 (base32
7053 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
7054 (build-system python-build-system)
7055 (arguments
7056 `(#:phases
7057 (modify-phases %standard-phases
7058 (add-after 'unpack 'patch-path
7059 (lambda* (#:key inputs #:allow-other-keys)
7060 (let* ((dialog (assoc-ref inputs "dialog")))
7061 ;; Since this library really wants to grovel the search path, we
7062 ;; must hardcode dialog's store path into it.
7063 (substitute* "dialog.py"
7064 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
7065 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
7066 #t))))
7067 #:tests? #f)) ; no test suite
7068 (propagated-inputs
7069 `(("dialog" ,dialog)))
7070 (home-page "http://pythondialog.sourceforge.net/")
7071 (synopsis "Python interface to the UNIX dialog utility")
7072 (description "A Python wrapper for the dialog utility. Its purpose is to
7073provide an easy to use, pythonic and comprehensive Python interface to dialog.
7074This allows one to make simple text-mode user interfaces on Unix-like systems")
7075 (license license:lgpl2.1)
7076 (properties `((python2-variant . ,(delay python2-pythondialog))))))
7077
7078(define-public python2-pythondialog
7079 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
7080 (package
7081 (inherit base)
7082 (version (package-version python-pythondialog))
7083 (source (origin
7084 (method url-fetch)
7085 (uri (pypi-uri "python2-pythondialog" version))
7086 (sha256
7087 (base32
7088 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
7089
7090(define-public python-configobj
7091 (package
7092 (name "python-configobj")
7093 (version "5.0.6")
7094 (source (origin
7095 (method url-fetch)
b0758fbb 7096 (uri (pypi-uri "configobj" version))
44d10b1f
RW
7097 (sha256
7098 (base32
7099 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
7100 ;; Patch setup.py so it looks for python-setuptools, which is
7101 ;; required to parse the keyword 'install_requires' in setup.py.
7102 (patches (search-patches "python-configobj-setuptools.patch"))))
7103 (build-system python-build-system)
7104 (propagated-inputs
7105 `(("python-six" ,python-six)))
7106 (synopsis "Config file reading, writing and validation")
7107 (description "ConfigObj is a simple but powerful config file reader and
7108writer: an ini file round tripper. Its main feature is that it is very easy to
7109use, with a straightforward programmer’s interface and a simple syntax for
7110config files.")
7111 (home-page "https://github.com/DiffSK/configobj")
7112 (license license:bsd-3)))
7113
7114(define-public python2-configobj
7115 (package-with-python2 python-configobj))
7116
7117(define-public python-configargparse
7118 (package
7119 (name "python-configargparse")
7120 (version "0.12.0")
7121 (source (origin
7122 (method url-fetch)
7123 (uri (pypi-uri "ConfigArgParse" version))
7124 (sha256
7125 (base32
7126 "0fgkiqh6r3rbkdq3k8c48m85g52k96686rw3a6jg4lcncrkpvk98"))))
7127 (build-system python-build-system)
7128 (native-inputs
7129 `(("python-pyyaml" ,python-pyyaml)))
7130 (arguments
7131 `(#:phases
7132 (modify-phases %standard-phases
7133 (replace 'check
7134 (lambda _
7135 ;; Bypass setuptools-shim because one test relies on "setup.py"
7136 ;; being the first argument passed to the python call.
7137 ;;
7138 ;; NOTE: Many tests do not run because they rely on Python's
7139 ;; built-in test.test_argparse, but we remove the unit tests from
7140 ;; our Python installation.
7141 (invoke "python" "setup.py" "test"))))))
7142 (synopsis "Replacement for argparse")
7143 (description "A drop-in replacement for argparse that allows options to also
7144be set via config files and/or environment variables.")
7145 (home-page "https://github.com/bw2/ConfigArgParse")
7146 (license license:expat)))
7147
7148(define-public python2-configargparse
7149 (package-with-python2 python-configargparse))
7150
7151(define-public python-argparse-manpage
7152 (package
7153 (name "python-argparse-manpage")
7154 (version "1.1")
7155 (source
7156 (origin
7157 (method url-fetch)
7158 (uri (pypi-uri "argparse-manpage" version))
7159 (sha256
7160 (base32
7161 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
7162 (build-system python-build-system)
7163 (home-page "https://github.com/praiskup/argparse-manpage")
7164 (synopsis "Build manual page from Python's ArgumentParser object")
7165 (description
7166 "This package provides tools to build manual pages from Python's
7167@code{ArgumentParser} object.")
7168 (license license:asl2.0)))
7169
7170(define-public python2-contextlib2
7171 (package
7172 (name "python2-contextlib2")
7173 (version "0.5.5")
7174 (source
7175 (origin
7176 (method url-fetch)
7177 (uri (pypi-uri "contextlib2" version))
7178 (sha256
7179 (base32
7180 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
7181 (build-system python-build-system)
7182 (arguments
7183 `(#:python ,python-2
7184 #:phases
7185 (modify-phases %standard-phases
7186 (replace 'check
7187 (lambda _ (invoke "python" "test_contextlib2.py" "-v"))))))
7188 (native-inputs
7189 `(("python2-unittest2" ,python2-unittest2)))
7190 (home-page "http://contextlib2.readthedocs.org/")
7191 (synopsis "Tools for decorators and context managers")
7192 (description "This module is primarily a backport of the Python
71933.2 contextlib to earlier Python versions. Like contextlib, it
7194provides utilities for common tasks involving decorators and context
7195managers. It also contains additional features that are not part of
7196the standard library.")
7197 (license license:psfl)))
7198
7199(define-public python-texttable
7200 (package
7201 (name "python-texttable")
7202 (version "0.8.7")
7203 (source
7204 (origin
7205 (method url-fetch)
7206 (uri (pypi-uri "texttable" version))
7207 (sha256
7208 (base32
7209 "1liiiydgkg37i46a418aw19fyf6z3ds51wdwwpyjbs12x0phhf4a"))))
7210 (build-system python-build-system)
7211 (arguments '(#:tests? #f)) ; no tests
7212 (home-page "https://github.com/foutaise/texttable/")
7213 (synopsis "Python module for creating simple ASCII tables")
7214 (description "Texttable is a Python module for creating simple ASCII
7215tables.")
7216 (license license:lgpl2.1+)))
7217
7218(define-public python2-texttable
7219 (package-with-python2 python-texttable))
7220
7221(define-public python-atomicwrites
7222 (package
7223 (name "python-atomicwrites")
7224 (version "1.1.5")
7225 (source (origin
7226 (method url-fetch)
7227 (uri (pypi-uri "atomicwrites" version))
7228 (sha256
7229 (base32
7230 "11bm90fwm2avvf4f3ib8g925w7jr4m11vcsinn1bi6ns4bm32214"))))
7231 (build-system python-build-system)
7232 (synopsis "Atomic file writes in Python")
7233 (description "Library for atomic file writes using platform dependent tools
7234for atomic file system operations.")
7235 (home-page "https://github.com/untitaker/python-atomicwrites")
7236 (license license:expat)))
7237
7238(define-public python2-atomicwrites
7239 (package-with-python2 python-atomicwrites))
7240
7241(define-public python-click-threading
7242 (package
7243 (name "python-click-threading")
7244 (version "0.4.4")
7245 (source (origin
7246 (method url-fetch)
7247 (uri (pypi-uri "click-threading" version))
7248 (sha256
7249 (base32
7250 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
7251 (build-system python-build-system)
7252 (propagated-inputs
7253 `(("python-click" ,python-click)))
7254 (synopsis "Utilities for multithreading in Click")
7255 (description "This package provides utilities for multithreading in Click
7256applications.")
7257 (home-page "https://github.com/click-contrib/click-threading")
7258 (license license:expat)))
7259
7260(define-public python-click-log
7261 (package
7262 (name "python-click-log")
7263 (version "0.3.2")
7264 (source (origin
7265 (method url-fetch)
7266 (uri (pypi-uri "click-log" version))
7267 (sha256
7268 (base32
7269 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
7270 (build-system python-build-system)
7271 (propagated-inputs
7272 `(("python-click" ,python-click)))
7273 (synopsis "Logging for click applications")
7274 (description "This package provides a Python library for logging Click
7275applications.")
7276 (home-page "https://github.com/click-contrib/click-log")
7277 (license license:expat)))
7278
7279(define-public python-apipkg
7280 (package
7281 (name "python-apipkg")
7282 (version "1.4")
7283 (source (origin
7284 (method url-fetch)
7285 (uri (pypi-uri "apipkg" version))
7286 (sha256
7287 (base32
7288 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
7289 (build-system python-build-system)
7290 (native-inputs
7291 `(("python-pytest" ,python-pytest)))
7292 (synopsis "Namespace control and lazy-import mechanism")
7293 (description "With apipkg you can control the exported namespace of a Python
7294package and greatly reduce the number of imports for your users. It is a small
7295pure Python module that works on virtually all Python versions.")
7296 (home-page "https://github.com/pytest-dev/apipkg")
7297 (license license:expat)))
7298
7299(define-public python2-apipkg
7300 (package-with-python2 python-apipkg))
7301
7302(define-public python-execnet
7303 (package
7304 (name "python-execnet")
7305 (version "1.4.1")
7306 (source (origin
7307 (method url-fetch)
7308 (uri (pypi-uri "execnet" version))
7309 (sha256
7310 (base32
7311 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
7312 (build-system python-build-system)
7313 (arguments
7314 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
7315 ;; The two test failures are caused by the lack of an `ssh` executable.
7316 ;; The test suite can be run with pytest after the 'install' phase.
7317 #:tests? #f))
7318 (native-inputs
7319 `(("python-pytest" ,python-pytest)
7320 ("python-setuptools-scm" ,python-setuptools-scm)))
7321 (propagated-inputs
7322 `(("python-apipkg" ,python-apipkg)))
7323 (synopsis "Rapid multi-Python deployment")
7324 (description "Execnet provides a share-nothing model with
7325channel-send/receive communication for distributing execution across many
7326Python interpreters across version, platform and network barriers. It has a
7327minimal and fast API targeting the following uses:
7328@enumerate
7329@item distribute tasks to (many) local or remote CPUs
7330@item write and deploy hybrid multi-process applications
7331@item write scripts to administer multiple environments
7332@end enumerate")
7333 (home-page "http://codespeak.net/execnet/")
7334 (license license:expat)))
7335
7336(define-public python2-execnet
7337 (package-with-python2 python-execnet))
7338
7339(define-public python-icalendar
7340 (package
7341 (name "python-icalendar")
7342 (version "4.0.3")
7343 (source (origin
7344 (method url-fetch)
7345 (uri (pypi-uri "icalendar" version))
7346 (sha256
7347 (base32
7348 "0mk3dk1dxkcm46jy48v27j2w2349iv4sbimqj1yb5js43mx49hh7"))))
7349 (build-system python-build-system)
7350 (propagated-inputs
7351 `(("python-dateutil" ,python-dateutil)
7352 ("python-pytz" ,python-pytz)))
7353 (synopsis "Python library for parsing iCalendar files")
7354 (description "The icalendar package is a parser/generator of iCalendar
7355files for use with Python.")
7356 (home-page "https://github.com/collective/icalendar")
7357 (license license:bsd-2)))
7358
7359(define-public python-sphinxcontrib-newsfeed
7360 (package
7361 (name "python-sphinxcontrib-newsfeed")
7362 (version "0.1.4")
7363 (source (origin
7364 (method url-fetch)
7365 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
7366 (sha256
7367 (base32
7368 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
7369 (arguments '(#:tests? #f)) ; No tests.
7370 (build-system python-build-system)
7371 (propagated-inputs
7372 `(("python-sphinx" ,python-sphinx)))
7373 (synopsis "News Feed extension for Sphinx")
7374 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
7375Blog, News or Announcements section to a Sphinx website.")
7376 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
7377 (license license:bsd-2)))
7378
7379(define-public python-args
7380 (package
7381 (name "python-args")
7382 (version "0.1.0")
7383 (source (origin
7384 (method url-fetch)
7385 (uri (pypi-uri "args" version))
7386 (sha256
7387 (base32
7388 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
7389 (build-system python-build-system)
7390 (home-page "https://github.com/kennethreitz/args")
7391 (synopsis "Command-line argument parser")
7392 (description
7393 "This library provides a Python module to parse command-line arguments.")
7394 (license license:bsd-3)))
7395
7396(define-public python2-args
7397 (package-with-python2 python-args))
7398
7399(define-public python-clint
7400 (package
7401 (name "python-clint")
7402 (version "0.5.1")
7403 (source (origin
7404 (method url-fetch)
7405 (uri (pypi-uri "clint" version))
7406 (sha256
7407 (base32
7408 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
7409 (build-system python-build-system)
7410 (arguments
7411 '(#:phases
7412 (modify-phases %standard-phases
7413 (replace 'check
7414 (lambda _ (invoke "py.test" "-v"))))))
7415 (native-inputs
7416 `(("python-pytest" ,python-pytest)))
7417 (propagated-inputs
7418 `(("python-args" ,python-args)))
7419 (home-page "https://github.com/kennethreitz/clint")
7420 (synopsis "Command-line interface tools")
7421 (description
7422 "Clint is a Python module filled with a set of tools for developing
7423command-line applications, including tools for colored and indented
7424output, progress bar display, and pipes.")
7425 (license license:isc)))
7426
7427(define-public python2-clint
7428 (package-with-python2 python-clint))
7429
7430(define-public python-astor
7431 (package
7432 (name "python-astor")
7433 (version "0.5")
7434 (source (origin
7435 (method url-fetch)
7436 (uri (pypi-uri "astor" version))
7437 (sha256
7438 (base32
7439 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
7440 (build-system python-build-system)
7441 (home-page "https://github.com/berkerpeksag/astor")
7442 (synopsis "Read and write Python ASTs")
7443 (description
7444 "Astor is designed to allow easy manipulation of Python source via the
7445Abstract Syntax Tree.")
7446 (license license:bsd-3)))
7447
7448(define-public python2-astor
7449 (package-with-python2 python-astor))
7450
7451(define-public python-rply
7452 (package
7453 (name "python-rply")
7454 (version "0.7.5")
7455 (source (origin
7456 (method url-fetch)
7457 (uri (pypi-uri "rply" version))
7458 (sha256
7459 (base32
7460 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
7461 (build-system python-build-system)
7462 (propagated-inputs
7463 `(("python-appdirs" ,python-appdirs)))
7464 (home-page "https://github.com/alex/rply")
7465 (synopsis "Parser generator for Python")
7466 (description
7467 "This package provides a pure Python based parser generator, that also
7468works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
7469with a new public API, and RPython support.")
7470 (license license:bsd-3)))
7471
7472(define-public python2-rply
7473 (package-with-python2 python-rply))
7474
7475(define-public python-hy
7476 (package
7477 (name "python-hy")
7478 (version "0.13.0")
7479 (source (origin
7480 (method url-fetch)
7481 (uri (pypi-uri "hy" version))
7482 (sha256
7483 (base32
7484 "19sfymaksx9jhksfnb15ahid46mzrhdfzz6yy2craz2qnzvpmky8"))))
7485 (build-system python-build-system)
7486 (arguments
7487 '(#:phases
7488 (modify-phases %standard-phases
7489 (replace 'check
7490 (lambda _
7491 ;; Tests require write access to HOME.
7492 (setenv "HOME" "/tmp")
7493 (invoke "nosetests"))))))
7494 (native-inputs
7495 `(("python-coverage" ,python-coverage)
7496 ("python-nose" ,python-nose)))
7497 (propagated-inputs
7498 `(("python-astor" ,python-astor)
7499 ("python-clint" ,python-clint)
7500 ("python-rply" ,python-rply)))
7501 (home-page "http://hylang.org/")
7502 (synopsis "Lisp frontend to Python")
7503 (description
7504 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
7505its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
7506Python at your fingertips, in Lisp form.")
7507 (license license:expat)))
7508
7509(define-public python2-hy
7510 (package-with-python2 python-hy))
7511
7512(define-public python2-functools32
7513 (package
7514 (name "python2-functools32")
7515 (version "3.2.3-2")
7516 (source
7517 (origin
7518 (method url-fetch)
7519 (uri (pypi-uri "functools32" version))
7520 (sha256
7521 (base32
7522 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
7523 (build-system python-build-system)
7524 (arguments
7525 `(#:python ,python-2
7526 #:tests? #f)) ; no test target
7527 (home-page "https://github.com/MiCHiLU/python-functools32")
7528 (synopsis
7529 "Backport of the functools module from Python 3.2.3")
7530 (description
7531 "This package is a backport of the @code{functools} module from Python
75323.2.3 for use with older versions of Python and PyPy.")
7533 (license license:expat)))
7534
7535(define-public python2-subprocess32
7536 (package
7537 (name "python2-subprocess32")
7538 (version "3.2.7")
7539 (source (origin
7540 (method url-fetch)
7541 (uri (pypi-uri "subprocess32" version))
7542 (sha256
7543 (base32
7544 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
7545 (patches
7546 (search-patches "python2-subprocess32-disable-input-test.patch"))))
7547 (build-system python-build-system)
7548 (arguments
7549 `(#:python ,python-2
7550 ;; The test suite fails with Python > 2.7.13:
7551 ;; import test.support
7552 ;; ImportError: No module named support
7553 #:tests? #f
7554 #:phases
7555 (modify-phases %standard-phases
7556 (add-after 'unpack 'patch-/bin/sh
7557 (lambda _
7558 (substitute* '("subprocess32.py"
7559 "test_subprocess32.py")
7560 (("/bin/sh") (which "sh")))
7561 #t)))))
7562 (home-page "https://github.com/google/python-subprocess32")
7563 (synopsis "Backport of the subprocess module from Python 3.2")
7564 (description
7565 "This is a backport of the @code{subprocess} standard library module
7566from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
7567new features. On POSIX systems it is guaranteed to be reliable when used
7568in threaded applications. It includes timeout support from Python 3.3 but
7569otherwise matches 3.2’s API.")
7570 (license license:psfl)))
7571
7572(define-public python2-futures
7573 (package
7574 (name "python2-futures")
7575 (version "3.2.0")
7576 (source
7577 (origin
7578 (method url-fetch)
7579 (uri (pypi-uri "futures" version))
7580 (sha256
7581 (base32
7582 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
7583 (build-system python-build-system)
7584 (arguments `(#:python ,python-2
7585 ;; FIXME: Python 2.7.14 moved the test.support library,
7586 ;; but our package has not yet been adjusted. Enable
7587 ;; tests when the python2 package has been fixed.
7588 #:tests? #f))
7589 (home-page "https://github.com/agronholm/pythonfutures")
7590 (synopsis
7591 "Backport of the concurrent.futures package from Python 3.2")
7592 (description
7593 "The concurrent.futures module provides a high-level interface for
7594asynchronously executing callables. This package backports the
7595concurrent.futures package from Python 3.2")
7596 (license license:bsd-3)))
7597
7598(define-public python-promise
7599 (package
7600 (name "python-promise")
7601 (version "0.4.2")
7602 (source
7603 (origin
7604 (method url-fetch)
7605 (uri (pypi-uri "promise" version))
7606 (sha256
7607 (base32
7608 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
7609 (build-system python-build-system)
7610 ;; Tests wants python-futures, which is a python2 only program, and
7611 ;; can't be found by python-promise at test time.
7612 (arguments `(#:tests? #f))
7613 (home-page "https://github.com/syrusakbary/promise")
7614 (synopsis "Promises/A+ implementation for Python")
7615 (description
7616 "Promises/A+ implementation for Python")
7617 (properties `((python2-variant . ,(delay python2-promise))))
7618 (license license:expat)))
7619
7620(define-public python2-promise
7621 (let ((promise (package-with-python2
7622 (strip-python2-variant python-promise))))
7623 (package (inherit promise)
7624 (arguments (substitute-keyword-arguments (package-arguments promise)
7625 ((#:tests? _) #t)))
7626 (native-inputs
7627 `(("python2-futures" ,python2-futures)
7628 ("python2-pytest" ,python2-pytest)
7629 ,@(package-native-inputs promise))))))
7630
7631(define-public python-colorama
7632 (package
7633 (name "python-colorama")
7634 (version "0.3.9")
7635 (source
7636 (origin
7637 (method url-fetch)
7638 (uri (pypi-uri "colorama" version))
7639 (sha256
7640 (base32
7641 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
7642 (build-system python-build-system)
7643 (synopsis "Colored terminal text rendering for Python")
7644 (description "Colorama is a Python library for rendering colored terminal
7645text.")
7646 (home-page "https://pypi.python.org/pypi/colorama")
7647 (license license:bsd-3)))
7648
7649(define-public python2-colorama
7650 (package-with-python2 python-colorama))
7651
7652(define-public python-rsa
7653 (package
7654 (name "python-rsa")
7655 (version "3.4.2")
7656 (source
7657 (origin
7658 (method url-fetch)
7659 (uri (pypi-uri "rsa" version))
7660 (sha256
7661 (base32
7662 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
7663 (build-system python-build-system)
7664 (propagated-inputs
7665 `(("python-pyasn1" ,python-pyasn1)))
7666 (synopsis "Pure-Python RSA implementation")
7667 (description "Python-RSA is a pure-Python RSA implementation. It supports
7668encryption and decryption, signing and verifying signatures, and key
7669generation according to PKCS#1 version 1.5. It can be used as a Python
7670library as well as on the command line.")
7671 (home-page "https://stuvel.eu/rsa")
7672 (license license:asl2.0)))
7673
7674(define-public python2-rsa
7675 (package-with-python2 python-rsa))
7676
7677(define-public python-pluggy
7678 (package
7679 (name "python-pluggy")
7680 (version "0.7.1")
7681 (source
7682 (origin
7683 (method url-fetch)
7684 (uri (pypi-uri "pluggy" version))
7685 (sha256
7686 (base32
7687 "1qbn70mksmr03hac6jgp6fiqc4l7859z8dchx2x950vhlij87swm"))))
7688 (build-system python-build-system)
7689 (native-inputs
7690 `(("python-setuptools-scm" ,python-setuptools-scm)))
7691 (synopsis "Plugin and hook calling mechanism for Python")
7692 (description "Pluggy is an extraction of the plugin manager as used by
7693Pytest but stripped of Pytest specific details.")
7694 (home-page "https://pypi.python.org/pypi/pluggy")
7695 (license license:expat)))
7696
7697(define-public python2-pluggy
7698 (package-with-python2 python-pluggy))
7699
7700(define-public python-tox
7701 (package
7702 (name "python-tox")
7703 (version "2.8.1")
7704 (source
7705 (origin
7706 (method url-fetch)
7707 (uri (pypi-uri "tox" version))
7708 (sha256
7709 (base32
7710 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
7711 (build-system python-build-system)
7712 (arguments
7713 ;; FIXME: Tests require pytest-timeout, which itself requires
7714 ;; pytest>=2.8.0 for installation.
7715 '(#:tests? #f))
7716 (propagated-inputs
7717 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
7718 ("python-py" ,python-py)
7719 ("python-virtualenv" ,python-virtualenv)))
7720 (native-inputs
7721 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
7722 ("python-pytest" ,python-pytest) ; >= 2.3.5
7723 ("python-setuptools-scm" ,python-setuptools-scm)))
7724 (home-page "http://tox.testrun.org/")
7725 (synopsis "Virtualenv-based automation of test activities")
7726 (description "Tox is a generic virtualenv management and test command line
7727tool. It can be used to check that a package installs correctly with
7728different Python versions and interpreters, or run tests in each type of
7729supported environment, or act as a frontend to continuous integration
7730servers.")
7731 (license license:expat)))
7732
7733(define-public python2-tox
7734 (package-with-python2 python-tox))
7735
7736(define-public python-jmespath
7737 (package
7738 (name "python-jmespath")
7739 (version "0.9.3")
7740 (source
7741 (origin
7742 (method url-fetch)
7743 (uri (pypi-uri "jmespath" version))
7744 (sha256
7745 (base32
7746 "0r7wc7fsxmlwzxx9j1j7rms06c6xs6d4sysirdhz1jk2mb4x90ba"))))
7747 (build-system python-build-system)
7748 (native-inputs
7749 `(("python-nose" ,python-nose)))
7750 (synopsis "JSON Matching Expressions")
7751 (description "JMESPath (pronounced “james path”) is a Python library that
7752allows one to declaratively specify how to extract elements from a JSON
7753document.")
7754 (home-page "https://github.com/jmespath/jmespath.py")
7755 (license license:expat)))
7756
7757(define-public python2-jmespath
7758 (package-with-python2 python-jmespath))
7759
7760(define-public python-botocore
7761 (package
7762 (name "python-botocore")
7763 (version "1.8.43")
7764 (source
7765 (origin
7766 (method url-fetch)
7767 (uri (pypi-uri "botocore" version))
7768 (sha256
7769 (base32
7770 "12cqpbnz3vfv41mp9admvciw7bc7hz57sjpqs2bxaw9wnfmbw5lg"))))
7771 (build-system python-build-system)
7772 (arguments
7773 ;; FIXME: Many tests are failing.
7774 '(#:tests? #f))
7775 (propagated-inputs
7776 `(("python-dateutil" ,python-dateutil)
7777 ("python-docutils" ,python-docutils)
7778 ("python-jmespath" ,python-jmespath)))
7779 (native-inputs
7780 `(("python-mock" ,python-mock)
7781 ("python-nose" ,python-nose)
7782 ("behave" ,behave)
7783 ("python-tox" ,python-tox)
7784 ("python-wheel" ,python-wheel)))
7785 (home-page "https://github.com/boto/botocore")
7786 (synopsis "Low-level interface to AWS")
7787 (description "Botocore is a Python library that provides a low-level
7788interface to the Amazon Web Services (AWS) API.")
7789 (license license:asl2.0)))
7790
7791(define-public python2-botocore
7792 (package-with-python2 python-botocore))
7793
7794(define-public python-xdo
7795 (package
7796 (name "python-xdo")
7797 (version "0.3")
7798 (source (origin
7799 (method url-fetch)
7800 (uri (string-append
7801 "http://http.debian.net/debian/pool/main/p/python-xdo/"
7802 "python-xdo_" version ".orig.tar.gz"))
7803 (sha256
7804 (base32
7805 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
7806 (build-system python-build-system)
7807 (arguments
7808 '(#:phases
7809 (modify-phases %standard-phases
7810 (add-before 'install 'patch-libxdo-path
7811 ;; Hardcode the path of dynamically loaded libxdo library.
7812 (lambda* (#:key inputs #:allow-other-keys)
7813 (let ((libxdo (string-append
7814 (assoc-ref inputs "xdotool")
7815 "/lib/libxdo.so")))
7816 (substitute* "xdo/_xdo.py"
7817 (("find_library\\(\"xdo\"\\)")
7818 (simple-format #f "\"~a\"" libxdo)))
7819 #t))))
7820 #:tests? #f)) ; no tests provided
7821 (propagated-inputs
7822 `(("python-six" ,python-six)))
7823 (inputs
7824 `(("xdotool" ,xdotool)
7825 ("libX11" ,libx11)))
7826 (home-page "https://tracker.debian.org/pkg/python-xdo")
7827 (synopsis "Python library for simulating X11 keyboard/mouse input")
7828 (description "Provides bindings to libxdo for manipulating X11 via simulated
7829input. (Note that this is mostly a legacy library; you may wish to look at
7830python-xdo for newer bindings.)")
7831 (license license:bsd-3)))
7832
7833(define-public python2-xdo
7834 (package-with-python2 python-xdo))
7835
7836(define-public python-mako
7837 (package
7838 (name "python-mako")
7839 (version "1.0.7")
7840 (source
7841 (origin
7842 (method url-fetch)
7843 (uri (pypi-uri "Mako" version))
7844 (sha256
7845 (base32
7846 "1bi5gnr8r8dva06qpyx4kgjc6spm2k1y908183nbbaylggjzs0jf"))))
7847 (build-system python-build-system)
7848 (propagated-inputs
7849 `(("python-markupsafe" ,python-markupsafe)))
7850 (native-inputs
7851 `(("python-mock" ,python-mock)
7852 ("python-nose" ,python-nose)
7853 ("python-pytest" ,python-pytest)))
7854 (home-page "http://www.makotemplates.org/")
7855 (synopsis "Templating language for Python")
7856 (description "Mako is a templating language for Python that compiles
7857templates into Python modules.")
7858 (license license:expat)))
7859
7860(define-public python2-mako
7861 (package-with-python2 python-mako))
7862
7863(define-public python-waitress
7864 (package
7865 (name "python-waitress")
7866 (version "1.1.0")
7867 (source
7868 (origin
7869 (method url-fetch)
7870 (uri (pypi-uri "waitress" version))
7871 (patches (search-patches "python-waitress-fix-tests.patch"))
7872 (sha256
7873 (base32
7874 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
7875 (build-system python-build-system)
7876 (home-page "https://github.com/Pylons/waitress")
7877 (synopsis "Waitress WSGI server")
7878 (description "Waitress is meant to be a production-quality pure-Python WSGI
7879server with very acceptable performance.")
7880 (license license:zpl2.1)))
7881
7882(define-public python2-waitress
7883 (package-with-python2 python-waitress))
7884
7885(define-public python-pyquery
7886 (package
7887 (name "python-pyquery")
7888 (version "1.2.17")
7889 (source
7890 (origin
7891 (method url-fetch)
7892 (uri (pypi-uri "pyquery" version))
7893 (sha256
7894 (base32
7895 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
7896 (build-system python-build-system)
7897 (native-inputs
7898 `(("python-webob" ,python-webob)
7899 ("python-webtest" ,python-webtest)))
7900 (propagated-inputs
7901 `(("python-lxml" ,python-lxml)
7902 ("python-cssselect" ,python-cssselect)))
7903 (home-page "https://github.com/gawel/pyquery")
7904 (synopsis "Make jQuery-like queries on xml documents")
7905 (description "pyquery allows you to make jQuery queries on xml documents.
7906The API is as much as possible the similar to jQuery. pyquery uses lxml for
7907fast xml and html manipulation.")
7908 (license license:bsd-3)))
7909
7910(define-public python2-pyquery
7911 (package-with-python2 python-pyquery))
7912
7913(define-public python-anyjson
7914 (package
7915 (name "python-anyjson")
7916 (version "0.3.3")
7917 (source
7918 (origin
7919 (method url-fetch)
7920 (uri (pypi-uri "anyjson" version))
7921 (sha256
7922 (base32
7923 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
7924 (build-system python-build-system)
7925 (arguments
7926 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
7927 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
7928 ;; whatever) so this transformation needs to be done before the tests
7929 ;; can be run. Maybe we could add a build step to transform beforehand
7930 ;; but it could be annoying/difficult.
7931 ;; We can enable tests for the Python 2 version, though, and do below.
7932 #:tests? #f))
7933 (home-page "https://bitbucket.org/runeh/anyjson/")
7934 (synopsis
7935 "Wraps best available JSON implementation in a common interface")
7936 (description
7937 "Anyjson loads whichever is the fastest JSON module installed
7938and provides a uniform API regardless of which JSON implementation is used.")
7939 (license license:bsd-3)
7940 (properties `((python2-variant . ,(delay python2-anyjson))))))
7941
7942(define-public python2-anyjson
7943 (let ((anyjson (package-with-python2
7944 (strip-python2-variant python-anyjson))))
7945 (package
7946 (inherit anyjson)
7947 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
7948 #:tests? #t
7949 ,@(package-arguments anyjson)))
7950 (native-inputs `(("python2-nose" ,python2-nose))))))
7951
7952(define-public python-amqp
7953 (package
7954 (name "python-amqp")
7955 (version "2.3.2")
7956 (source
7957 (origin
7958 (method url-fetch)
7959 (uri (pypi-uri "amqp" version))
7960 (sha256
7961 (base32
7962 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
7963 (build-system python-build-system)
7964 (native-inputs
7965 `(("python-case" ,python-case)
7966 ("python-pytest-sugar" ,python-pytest-sugar)
7967 ("python-mock" ,python-mock)))
7968 (propagated-inputs
7969 `(("python-vine" ,python-vine)))
7970 (home-page "https://github.com/celery/py-amqp")
7971 (synopsis
7972 "Low-level AMQP client for Python (fork of amqplib)")
7973 (description
7974 "This is a fork of amqplib which was originally written by Barry Pederson.
7975It is maintained by the Celery project, and used by kombu as a pure python
7976alternative when librabbitmq is not available.")
7977 (license license:lgpl2.1+)
7978 (properties `((python2-variant . ,(delay python2-amqp))))))
7979
7980(define-public python2-amqp
7981 (let ((amqp (package-with-python2
7982 (strip-python2-variant python-amqp))))
7983 (package
7984 (inherit amqp)
7985 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
7986 ;; unmaintained. Weirdly, does not do this on the python 3
7987 ;; version?
7988 #:tests? #f
7989 ,@(package-arguments amqp))))))
7990
7991(define-public python-txamqp
7992 (package
7993 (name "python-txamqp")
7994 (version "0.8.2")
7995 (source
7996 (origin
7997 (method url-fetch)
7998 (uri (pypi-uri "txAMQP" version))
7999 (sha256
8000 (base32
8001 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
8002 (build-system python-build-system)
8003 (propagated-inputs
8004 `(("python-six" ,python-six)
8005 ("python-twisted" ,python-twisted)))
8006 (home-page "https://github.com/txamqp/txamqp")
8007 (synopsis "Communicate with AMQP peers and brokers using Twisted")
8008 (description
8009 "This package provides a Python library for communicating with AMQP peers
8010and brokers using the asynchronous networking framework Twisted. It contains
8011all the necessary code to connect, send and receive messages to/from an
8012AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
8013also includes support for using Thrift RPC over AMQP in Twisted
8014applications.")
8015 (license license:asl2.0)))
8016
8017(define-public python2-txamqp
8018 (package-with-python2 python-txamqp))
8019
8020(define-public python-kombu
8021 (package
8022 (name "python-kombu")
8023 (version "4.2.2")
8024 (source
8025 (origin
8026 (method url-fetch)
8027 (uri (pypi-uri "kombu" version))
8028 (sha256
8029 (base32
8030 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
8031 (build-system python-build-system)
8032 (native-inputs
8033 `(("python-mock" ,python-mock)
8034 ("python-case" ,python-case)
8035 ("python-pyro4" ,python-pyro4)
8036 ("python-pytest-sugar" ,python-pytest-sugar)
8037 ("python-pytz" ,python-pytz)))
8038 (propagated-inputs
8039 `(("python-anyjson" ,python-anyjson)
8040 ("python-amqp" ,python-amqp)
8041 ("python-redis" ,python-redis)))
8042 (home-page "https://kombu.readthedocs.io")
8043 (synopsis "Message passing library for Python")
8044 (description "The aim of Kombu is to make messaging in Python as easy as
8045possible by providing an idiomatic high-level interface for the AMQ protocol,
8046and also provide proven and tested solutions to common messaging problems.
8047AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
8048message orientation, queuing, routing, reliability and security, for which the
8049RabbitMQ messaging server is the most popular implementation.")
8050 (license license:bsd-3)
8051 (properties `((python2-variant . ,(delay python2-kombu))))))
8052
8053(define-public python2-kombu
8054 (let ((kombu (package-with-python2
8055 (strip-python2-variant python-kombu))))
8056 (package
8057 (inherit kombu)
8058 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
8059 ;; It works fine on the python3 variant.
8060 #:tests? #f
8061 ,@(package-arguments kombu)))
8062 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8063 ,@(package-native-inputs kombu))))))
8064
8065(define-public python-billiard
8066 (package
8067 (name "python-billiard")
8068 (version "3.5.0.5")
8069 (source
8070 (origin
8071 (method url-fetch)
8072 (uri (pypi-uri "billiard" version))
8073 (sha256
8074 (base32
8075 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
8076 (build-system python-build-system)
8077 (native-inputs
8078 `(("python-case" ,python-case)
8079 ("python-pytest" ,python-pytest)))
8080 (home-page "https://github.com/celery/billiard")
8081 (synopsis
8082 "Python multiprocessing fork with improvements and bugfixes")
8083 (description
8084 "Billiard is a fork of the Python 2.7 multiprocessing package. The
8085multiprocessing package itself is a renamed and updated version of R Oudkerk's
8086pyprocessing package. This standalone variant is intended to be compatible with
8087Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
8088 (license license:bsd-3)
8089 (properties `((python2-variant . ,(delay python2-billiard))))))
8090
8091(define-public python2-billiard
8092 (let ((billiard (package-with-python2
8093 (strip-python2-variant python-billiard))))
8094 (package
8095 (inherit billiard)
8096 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8097 ("python2-mock" ,python2-mock)
8098 ,@(package-native-inputs billiard))))))
8099
8100(define-public python-celery
8101 (package
8102 (name "python-celery")
8103 (version "4.2.1")
8104 (source
8105 (origin
8106 (method url-fetch)
8107 (uri (pypi-uri "celery" version))
8108 (sha256
8109 (base32
8110 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
8111 (build-system python-build-system)
8112 (arguments
8113 '(;; TODO The tests fail with Python 3.7
8114 ;; https://github.com/celery/celery/issues/4849
8115 #:tests? #f
8116 #:phases
8117 (modify-phases %standard-phases
8118 (add-after 'unpack 'patch-requirements
8119 (lambda _
8120 (substitute* "requirements/test.txt"
8121 (("pytest>=3\\.0,<3\\.3")
8122 "pytest>=3.0"))
8123 #t)))))
8124 (native-inputs
8125 `(("python-case" ,python-case)
8126 ("python-pytest" ,python-pytest)))
8127 (propagated-inputs
8128 `(("python-pytz" ,python-pytz)
8129 ("python-billiard" ,python-billiard)
8130 ("python-kombu" ,python-kombu)))
8131 (home-page "https://celeryproject.org")
8132 (synopsis "Distributed Task Queue")
8133 (description "Celery is an asynchronous task queue/job queue based on
8134distributed message passing. It is focused on real-time operation, but
8135supports scheduling as well. The execution units, called tasks, are executed
8136concurrently on a single or more worker servers using multiprocessing,
8137Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
8138synchronously (wait until ready).")
8139 (license license:bsd-3)
8140 (properties `((python2-variant . ,(delay python2-celery))))))
8141
8142(define-public python2-celery
8143 (let ((celery (package-with-python2
8144 (strip-python2-variant python-celery))))
8145 (package
8146 (inherit celery)
8147 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8148 ("python2-mock" ,python2-mock)
8149 ,@(package-native-inputs celery))))))
8150
8151(define-public python-translitcodec
8152 (package
8153 (name "python-translitcodec")
8154 (version "0.4.0")
8155 (source
8156 (origin
8157 (method url-fetch)
8158 (uri (pypi-uri "translitcodec" version))
8159 (sha256
8160 (base32
8161 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
8162 (build-system python-build-system)
8163 (arguments
8164 `(#:tests? #f)) ; no tests provided
8165 (home-page
8166 "https://github.com/claudep/translitcodec")
8167 (synopsis
8168 "Unicode to 8-bit charset transliteration codec")
8169 (description
8170 "This package contains codecs for transliterating ISO 10646 texts into
8171best-effort representations using smaller coded character sets (ASCII,
8172ISO 8859, etc.).")
8173 (license license:expat)))
8174
8175(define-public python2-translitcodec
8176 (package-with-python2 python-translitcodec))
8177
8178(define-public python-editor
8179 (package
8180 (name "python-editor")
8181 (version "0.5")
8182 (source
8183 (origin
8184 (method url-fetch)
8185 (uri (pypi-uri "python-editor" version))
8186 (sha256
8187 (base32
8188 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
8189 (build-system python-build-system)
8190 (home-page
8191 "https://github.com/fmoo/python-editor")
8192 (synopsis
8193 "Programmatically open an editor, capture the result")
8194 (description
8195 "python-editor is a library that provides the editor module for
8196programmatically interfacing with your system's $EDITOR.")
8197 (license license:asl2.0)))
8198
8199(define-public python2-editor
8200 (package-with-python2 python-editor))
8201
8202(define-public python-sphinxcontrib-programoutput
8203 (package
8204 (name "python-sphinxcontrib-programoutput")
8205 (version "0.10")
8206 (source (origin
8207 (method url-fetch)
8208 (uri (pypi-uri "sphinxcontrib-programoutput" version))
8209 (sha256
8210 (base32
8211 "153hhnlbx4688zj9wd64819ps5znc2jlyp5crkgzvn5hxgy99vpx"))))
8212 (build-system python-build-system)
8213 (arguments
8214 ;; FIXME: Many tests are failing and the upstream is gone.
8215 '(#:tests? #f))
8216 (propagated-inputs
8217 `(("python-sphinx" ,python-sphinx)))
8218 (synopsis "Sphinx extension to include program output")
8219 (description "A Sphinx extension to literally insert the output of arbitrary
8220commands into documents, helping you to keep your command examples up to date.")
8221 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
8222 (license license:bsd-2)))
8223
8224(define-public python2-sphinxcontrib-programoutput
8225 (package-with-python2 python-sphinxcontrib-programoutput))
8226
8227(define-public python-sphinx-repoze-autointerface
8228 (package
8229 (name "python-sphinx-repoze-autointerface")
8230 (version "0.8")
8231 (source (origin
8232 (method url-fetch)
8233 (uri (pypi-uri "repoze.sphinx.autointerface" version))
8234 (sha256
8235 (base32
8236 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
8237 (build-system python-build-system)
8238 (arguments '(#:tests? #f)) ; No tests.
8239 (propagated-inputs
8240 `(("python-sphinx" ,python-sphinx)
8241 ("python-zope-interface" ,python-zope-interface)))
8242 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
8243 (description "This package defines an extension for the Sphinx documentation
8244system. The extension allows generation of API documentation by
8245introspection of @code{zope.interface} instances in code.")
8246 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
8247 (license license:repoze)))
8248
8249(define-public python2-sphinx-repoze-autointerface
8250 (package-with-python2 python-sphinx-repoze-autointerface))
8251
8252(define-public python-vobject
8253 (package
8254 (name "python-vobject")
8255 (version "0.9.5")
8256 (source (origin
8257 (method url-fetch)
8258 (uri (pypi-uri "vobject" version))
8259 (sha256
8260 (base32
8261 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
8262 (build-system python-build-system)
8263 (arguments
8264 '(;; The test suite relies on some non-portable Windows interfaces.
8265 #:tests? #f))
8266 (propagated-inputs
8267 `(("python-dateutil" ,python-dateutil)
8268 ("python-pyicu" ,python-pyicu)))
8269 (synopsis "Parse and generate vCard and vCalendar files")
8270 (description "Vobject is intended to be a full featured Python package for
8271parsing and generating vCard and vCalendar files. Currently, iCalendar files
8272are supported and well tested. vCard 3.0 files are supported, and all data
8273should be imported, but only a few components are understood in a sophisticated
8274way.")
8275 (home-page "http://eventable.github.io/vobject/")
8276 (license license:asl2.0)))
8277
8278(define-public python2-vobject
8279 (package-with-python2 python-vobject))
8280
8281(define-public python-munkres
8282 (package
8283 (name "python-munkres")
8284 (version "1.0.8")
8285 (source (origin
8286 (method url-fetch)
8287 (uri (pypi-uri "munkres" version))
8288 (sha256
8289 (base32
8290 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
8291 (build-system python-build-system)
8292 (arguments
8293 '(#:tests? #f)) ; no test suite
8294 (home-page "http://software.clapper.org/munkres/")
8295 (synopsis "Implementation of the Munkres algorithm")
8296 (description "The Munkres module provides an implementation of the Munkres
8297algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
8298useful for solving the Assignment Problem.")
8299 (license license:bsd-3)))
8300
8301(define-public python2-munkres
8302 (package-with-python2 python-munkres))
8303
8304(define-public python-whoosh
8305 (package
8306 (name "python-whoosh")
8307 (version "2.7.4")
8308 (source
8309 (origin
8310 (method url-fetch)
8311 (uri (pypi-uri "Whoosh" version))
8312 (sha256
8313 (base32
8314 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
8315 (build-system python-build-system)
8316 (native-inputs
8317 `(("python-pytest" ,python-pytest)))
8318 (home-page "https://bitbucket.org/mchaput/whoosh")
8319 (synopsis "Full text indexing, search, and spell checking library")
8320 (description
8321 "Whoosh is a fast, pure-Python full text indexing, search, and spell
8322checking library.")
8323 (license license:bsd-2)))
8324
8325(define-public python2-whoosh
8326 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
8327 (package (inherit whoosh)
8328 (propagated-inputs
8329 `(("python2-backport-ssl-match-hostname"
8330 ,python2-backport-ssl-match-hostname)
8331 ,@(package-propagated-inputs whoosh))))))
8332
8333(define-public python-pathlib
8334 (package
8335 (name "python-pathlib")
8336 (version "1.0.1")
8337 (source (origin
8338 (method url-fetch)
8339 (uri (pypi-uri "pathlib" version))
8340 (sha256
8341 (base32
8342 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
8343 (build-system python-build-system)
8344 ;; The tests depend on the internal "test" module, which does not provide
8345 ;; a stable interface.
8346 (arguments `(#:tests? #f))
8347 (home-page "https://pathlib.readthedocs.org/")
8348 (synopsis "Object-oriented file system paths")
8349 (description "Pathlib offers a set of classes to handle file system paths.
8350It offers the following advantages over using string objects:
8351
8352@enumerate
8353@item No more cumbersome use of os and os.path functions. Everything can
8354be done easily through operators, attribute accesses, and method calls.
8355@item Embodies the semantics of different path types. For example,
8356comparing Windows paths ignores casing.
8357@item Well-defined semantics, eliminating any inconsistencies or
8358ambiguities (forward vs. backward slashes, etc.).
8359@end enumerate
8360
8361Note: In Python 3.4, pathlib is now part of the standard library. For other
8362Python versions please consider python-pathlib2 instead, which tracks the
8363standard library module. This module (python-pathlib) isn't maintained
8364anymore.")
8365 (license license:expat)))
8366
8367(define-public python2-pathlib
8368 (package-with-python2 python-pathlib))
8369
8370(define-public python2-pathlib2
8371 (package
8372 (name "python2-pathlib2")
8373 (version "2.3.2")
8374 (source (origin
8375 (method url-fetch)
8376 (uri (pypi-uri "pathlib2" version))
8377 (sha256
8378 (base32
8379 "10yb0iv5x2hs631rcppkhbddx799d3h8pcwmkbh2a66ns3w71ccf"))))
8380 (build-system python-build-system)
8381 ;; We only need the the Python 2 variant, since for Python 3 our minimum
8382 ;; version is 3.4 which already includes this package as part of the
8383 ;; standard library.
8384 (arguments
8385 `(#:python ,python-2))
8386 (propagated-inputs
8387 `(("python2-scandir" ,python2-scandir)
8388 ("python2-six" ,python2-six)))
8389 (home-page "https://pypi.python.org/pypi/pathlib2/")
8390 (synopsis "Object-oriented file system paths - backport of standard
8391pathlib module")
8392 (description "The goal of pathlib2 is to provide a backport of standard
8393pathlib module which tracks the standard library module, so all the newest
8394features of the standard pathlib can be used also on older Python versions.
8395
8396Pathlib offers a set of classes to handle file system paths. It offers the
8397following advantages over using string objects:
8398
8399@enumerate
8400@item No more cumbersome use of os and os.path functions. Everything can
8401be done easily through operators, attribute accesses, and method calls.
8402@item Embodies the semantics of different path types. For example,
8403comparing Windows paths ignores casing.
8404@item Well-defined semantics, eliminating any inconsistencies or
8405ambiguities (forward vs. backward slashes, etc.).
8406@end enumerate")
8407 (license license:expat)))
8408
8409(define-public python2-pathlib2-bootstrap
8410 (hidden-package
8411 (package
8412 (inherit python2-pathlib2)
8413 (name "python2-pathlib2-bootstrap")
8414 (propagated-inputs
8415 `(("python2-scandir" ,python2-scandir)
8416 ("python2-six" ,python2-six-bootstrap))))))
8417
8418(define-public python-jellyfish
8419 (package
8420 (name "python-jellyfish")
8421 (version "0.5.6")
8422 (source (origin
8423 (method url-fetch)
8424 (uri (pypi-uri "jellyfish" version))
8425 (sha256
8426 (base32
8427 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
8428 (build-system python-build-system)
8429 (native-inputs
8430 `(("python-pytest" ,python-pytest)))
8431 (home-page "https://github.com/jamesturk/jellyfish")
8432 (synopsis "Approximate and phonetic matching of strings")
8433 (description "Jellyfish uses a variety of string comparison and phonetic
8434encoding algorithms to do fuzzy string matching.")
8435 (license license:bsd-2)
8436 (properties `((python2-variant . ,(delay python2-jellyfish))))))
8437
8438(define-public python2-jellyfish
8439 (let ((jellyfish (package-with-python2
8440 (strip-python2-variant python-jellyfish))))
8441 (package (inherit jellyfish)
8442 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
8443 ,@(package-native-inputs jellyfish))))))
8444
8445(define-public python2-unicodecsv
8446 (package
8447 (name "python2-unicodecsv")
8448 (version "0.14.1")
8449 (source (origin
8450 (method url-fetch)
8451 ;; The test suite is not included in the PyPi release.
8452 ;; https://github.com/jdunck/python-unicodecsv/issues/19
8453 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
8454 "archive/" version ".tar.gz"))
8455 (file-name (string-append name "-" version ".tar.gz"))
8456 (sha256
8457 (base32
8458 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
8459 (build-system python-build-system)
8460 (arguments
8461 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
8462 #:python ,python-2))
8463 (native-inputs
8464 `(("python2-unittest2" ,python2-unittest2)))
8465 (home-page "https://github.com/jdunck/python-unicodecsv")
8466 (synopsis "Unicode CSV module for Python 2")
8467 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
8468module, adding support for Unicode strings.")
8469 (license license:bsd-2)))
8470
8471(define-public python-rarfile
8472 (package
8473 (name "python-rarfile")
8474 (version "2.8")
8475 (source (origin
8476 (method url-fetch)
8477 (uri (pypi-uri "rarfile" version))
8478 (sha256
8479 (base32
8480 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
8481 (build-system python-build-system)
8482 (arguments
8483 '(#:phases
8484 (modify-phases %standard-phases
8485 (replace 'check
8486 ;; Many tests fail, but the installation proceeds.
e59dd341 8487 (lambda _ (invoke "make" "-C" "test" "test"))))))
44d10b1f
RW
8488 (native-inputs
8489 `(("which" ,which))) ; required for tests
8490 (propagated-inputs
8491 `(("libarchive" ,libarchive)))
8492 (home-page "https://github.com/markokr/rarfile")
8493 (synopsis "RAR archive reader for Python")
8494 (description "This is Python module for RAR archive reading. The interface
8495is made as zipfile like as possible.")
8496 (license license:isc)))
8497
8498(define-public python2-rarfile
8499 (package-with-python2 python-rarfile))
8500
8501(define-public python-magic
8502 (package
8503 (name "python-magic")
8504 (version "0.4.15")
8505 (source
8506 (origin
8507 (method url-fetch)
8508 (uri (pypi-uri "python-magic" version))
8509 (sha256
8510 (base32
8511 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
8512 (file-name (string-append name "-" version "-checkout"))))
8513 (build-system python-build-system)
8514 (arguments
8515 ;; The tests are unreliable, so don't run them. The tests fail
8516 ;; under Python3 because they were written for Python2 and
8517 ;; contain import statements that do not work in Python3. One of
8518 ;; the tests fails under Python2 because its assertions are
8519 ;; overly stringent; it relies on comparing output strings which
8520 ;; are brittle and can change depending on the version of
8521 ;; libmagic being used and the system on which the test is
8522 ;; running. In my case, under GuixSD 0.10.0, only one test
8523 ;; failed, and it seems to have failed only because the version
8524 ;; of libmagic that is packaged in Guix outputs a slightly
8525 ;; different (but not wrong) string than the one that the test
8526 ;; expected.
8527 '(#:tests? #f
8528 #:phases (modify-phases %standard-phases
8529 ;; Replace a specific method call with a hard-coded
8530 ;; path to the necessary libmagic.so file in the
8531 ;; store. If we don't do this, then the method call
8532 ;; will fail to find the libmagic.so file, which in
8533 ;; turn will cause any application using
8534 ;; python-magic to fail.
8535 (add-before 'build 'hard-code-path-to-libmagic
8536 (lambda* (#:key inputs #:allow-other-keys)
8537 (let ((file (assoc-ref inputs "file")))
8538 (substitute* "magic.py"
8539 (("ctypes.util.find_library\\('magic'\\)")
8540 (string-append "'" file "/lib/libmagic.so'")))
8541 #t)))
8542 (add-before 'install 'disable-egg-compression
8543 (lambda _
8544 (let ((port (open-file "setup.cfg" "a")))
8545 (display "\n[easy_install]\nzip_ok = 0\n"
8546 port)
8547 (close-port port)
8548 #t))))))
8549 (inputs
8550 ;; python-magic needs to be able to find libmagic.so.
8551 `(("file" ,file)))
8552 (home-page
8553 "https://github.com/ahupp/python-magic")
8554 (synopsis
8555 "File type identification using libmagic")
8556 (description
8557 "This module uses ctypes to access the libmagic file type
8558identification library. It makes use of the local magic database and
8559supports both textual and MIME-type output. Note that this module and
8560the python-file module both provide a \"magic.py\" file; these two
8561modules, which are different and were developed separately, both serve
8562the same purpose: to provide Python bindings for libmagic.")
8563 (license license:expat)))
8564
8565(define-public python2-magic
8566 (package-with-python2 python-magic))
8567
8568(define-public python2-s3cmd
8569 (package
8570 (name "python2-s3cmd")
8571 (version "1.6.1")
8572 (source
8573 (origin
8574 (method url-fetch)
8575 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
8576 "s3cmd-" version ".tar.gz"))
8577 (sha256
8578 (base32
8579 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
8580 (build-system python-build-system)
8581 (arguments
8582 ;; s3cmd is written for python2 only and contains no tests.
8583 `(#:python ,python-2
8584 #:tests? #f))
8585 (propagated-inputs
8586 `(("python2-dateutil" ,python2-dateutil)
8587 ;; The python-file package also provides a magic.py module.
8588 ;; This is an unfortunate state of affairs; however, s3cmd
8589 ;; fails to install if it cannot find specifically the
8590 ;; python-magic package. Thus we include it, instead of using
8591 ;; python-file. Ironically, s3cmd sometimes works better
8592 ;; without libmagic bindings at all:
8593 ;; https://github.com/s3tools/s3cmd/issues/198
8594 ("python2-magic" ,python2-magic)))
8595 (home-page "http://s3tools.org/s3cmd")
8596 (synopsis "Command line tool for S3-compatible storage services")
8597 (description
8598 "S3cmd is a command line tool for uploading, retrieving and managing data
8599in storage services that are compatible with the Amazon Simple Storage
8600Service (S3) protocol, including S3 itself. It supports rsync-like backup,
8601GnuPG encryption, and more. It also supports management of Amazon's
8602CloudFront content delivery network.")
8603 (license license:gpl2+)))
8604
8605(define-public python-pkgconfig
8606 (package
8607 (name "python-pkgconfig")
8608 (version "1.3.1")
8609 (source
8610 (origin
8611 (method url-fetch)
8612 (uri (pypi-uri "pkgconfig" version))
8613 (sha256
8614 (base32
8615 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
8616 (build-system python-build-system)
8617 (native-inputs
8618 `(("python-nose" ,python-nose)))
8619 (inputs
8620 `(("pkg-config" ,pkg-config)))
8621 (arguments
8622 `(#:phases
8623 (modify-phases %standard-phases
8624 (add-before 'build 'patch
8625 ;; Hard-code the path to pkg-config.
8626 (lambda _
8627 (substitute* "pkgconfig/pkgconfig.py"
8628 (("cmd = 'pkg-config")
8629 (string-append "cmd = '" (which "pkg-config"))))
8630 #t))
8631 (replace 'check
8632 (lambda _
8633 (invoke "nosetests" "test.py"))))))
8634 (home-page "https://github.com/matze/pkgconfig")
8635 (synopsis "Python interface for pkg-config")
8636 (description "This module provides a Python interface to pkg-config. It
8637can be used to find all pkg-config packages, check if a package exists,
8638check if a package meets certain version requirements, query CFLAGS and
8639LDFLAGS and parse the output to build extensions with setup.py.")
8640 (license license:expat)))
8641
8642(define-public python2-pkgconfig
8643 (package-with-python2 python-pkgconfig))
8644
8645(define-public python-bz2file
8646 (package
8647 (name "python-bz2file")
8648 (version "0.98")
8649 (source
8650 (origin
8651 (method url-fetch)
8652 (uri (pypi-uri "bz2file" version))
8653 (sha256
8654 (base32
8655 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
8656 (build-system python-build-system)
8657 (arguments
8658 `(#:tests? #f)) ; Tests use deprecated python modules.
8659 (home-page "https://github.com/nvawda/bz2file")
8660 (synopsis "Read and write bzip2-compressed files")
8661 (description
8662 "Bz2file is a Python library for reading and writing bzip2-compressed
8663files. It contains a drop-in replacement for the I/O interface in the
8664standard library's @code{bz2} module, including features from the latest
8665development version of CPython that are not available in older releases.")
8666 (license license:asl2.0)))
8667
8668(define-public python2-bz2file
8669 (package-with-python2 python-bz2file))
8670
8671(define-public python-future
8672 (package
8673 (name "python-future")
8674 (version "0.16.0")
8675 (source
8676 (origin
8677 (method url-fetch)
8678 (uri (pypi-uri "future" version))
8679 (sha256
8680 (base32
8681 "1nzy1k4m9966sikp0qka7lirh8sqrsyainyf8rk97db7nwdfv773"))))
8682 (build-system python-build-system)
8683 ;; Many tests connect to the network or are otherwise flawed.
8684 ;; https://github.com/PythonCharmers/python-future/issues/210
8685 (arguments
8686 `(#:tests? #f))
8687 (home-page "http://python-future.org")
8688 (synopsis "Single-source support for Python 3 and 2")
8689 (description
8690 "@code{python-future} is the missing compatibility layer between Python 2 and
8691Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
8692to support both Python 2 and Python 3 with minimal overhead.")
8693 (license license:expat)))
8694
8695(define-public python2-future
8696 (package-with-python2 python-future))
8697
8698(define-public python-cysignals
8699 (package
8700 (name "python-cysignals")
8e3e51df 8701 (version "1.9.0")
44d10b1f
RW
8702 (source
8703 (origin
8704 (method url-fetch)
8e3e51df 8705 (uri (pypi-uri "cysignals" version))
44d10b1f
RW
8706 (sha256
8707 (base32
8e3e51df 8708 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
44d10b1f
RW
8709 (build-system python-build-system)
8710 (native-inputs
8711 `(("python-cython" ,python-cython)
8712 ("python-sphinx" ,python-sphinx)))
8713 (inputs
8714 `(("pari-gp" ,pari-gp)))
8715 (arguments
8716 `(#:modules ((guix build python-build-system)
8717 ((guix build gnu-build-system) #:prefix gnu:)
8718 (guix build utils))
8719 ;; FIXME: Tests are executed after installation and currently fail
8720 ;; when not installing into standard locations; the author is working
8721 ;; on a fix.
8722 #:tests? #f
8723 #:phases
8724 (modify-phases %standard-phases
8725 (add-before
8726 'build 'configure
8727 (assoc-ref gnu:%standard-phases 'configure)))))
8728 (home-page
8729 "https://github.com/sagemath/cysignals")
8730 (synopsis
8731 "Handling of interrupts and signals for Cython")
8732 (description
8733 "The cysignals package provides mechanisms to handle interrupts (and
8734other signals and errors) in Cython code, using two related approaches,
8735for mixed Cython/Python code or external C libraries and pure Cython code,
8736respectively.")
8737 (license license:lgpl3+)))
8738
8739(define-public python2-cysignals
8740 (package-with-python2 python-cysignals))
8741
8742(define-public python2-shedskin
8743 (package
8744 (name "python2-shedskin")
8745 (version "0.9.4")
8746 (source
8747 (origin
8748 (method url-fetch)
8749 (uri (string-append "https://github.com/shedskin/shedskin/"
8750 "releases/download/v" version
8751 "/shedskin-" version ".tgz"))
8752 (sha256
8753 (base32
8754 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
8755 (build-system python-build-system)
8756 (arguments
8757 `(#:python ,python-2
8758 #:phases (modify-phases %standard-phases
8759 (add-after 'unpack 'fix-resulting-include-libs
8760 (lambda* (#:key inputs #:allow-other-keys)
8761 (let ((libgc (assoc-ref inputs "libgc"))
8762 (pcre (assoc-ref inputs "pcre")))
8763 (substitute* "shedskin/makefile.py"
8764 (("variable == 'CCFLAGS':[ ]*")
8765 (string-append "variable == 'CCFLAGS':\n"
8766 " line += ' -I " pcre "/include"
8767 " -I " libgc "/include'"))
8768 (("variable == 'LFLAGS':[ ]*")
8769 (string-append "variable == 'LFLAGS':\n"
8770 " line += ' -L" pcre "/lib"
8771 " -L " libgc "/lib'")))
8772 #t))))))
8773 (inputs `(("pcre" ,pcre)
8774 ("libgc" ,libgc)))
8775 (home-page "https://shedskin.github.io/")
8776 (synopsis "Experimental Python-2 to C++ Compiler")
8777 (description (string-append "This is an experimental compiler for a subset of
8778Python. It generates C++ code and a Makefile."))
8779 (license (list license:gpl3 license:bsd-3 license:expat))))
8780
8781(define-public python2-rope
8782 (package
8783 (name "python2-rope")
8784 (version "0.10.3")
8785 (source
8786 (origin
8787 (method url-fetch)
8788 (uri (pypi-uri "rope" version))
8789 (sha256
8790 (base32
8791 "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
8792 (arguments
8793 ;; Rope is currently python-2 only.
8794 ;; https://github.com/python-rope/rope/issues/57
8795 `(#:python ,python-2))
8796 (build-system python-build-system)
8797 (native-inputs
8798 `(("python2-unittest2" ,python2-unittest2)))
8799 (home-page "https://github.com/python-rope/rope")
8800 (synopsis "Refactoring library for Python")
8801 (description "Rope is a refactoring library for Python. It facilitates
8802the renaming, moving and extracting of attributes, functions, modules, fields
8803and parameters in Python 2 source code. These refactorings can also be applied
8804to occurrences in strings and comments.")
8805 (license license:gpl2)))
8806
8807(define-public python-py3status
8808 (package
8809 (name "python-py3status")
8810 (version "3.7")
8811 (source
8812 (origin
8813 (method url-fetch)
8814 (uri (pypi-uri "py3status" version))
8815 (sha256
8816 (base32
8817 "0shxcfz4wcczj0mhwp4w0dvwd2fdd9bgprq8slim1519iiqzgwhq"))))
8818 (build-system python-build-system)
8819 (inputs
8820 `(("file" ,file)))
8821 (arguments
8822 '(#:phases
8823 (modify-phases %standard-phases
8824 ;; 'file' is used for detection of configuration file encoding
8825 ;; let's make link the dependency to particular input
8826 (add-before 'build 'patch-file-path
8827 (lambda* (#:key inputs #:allow-other-keys)
8828 (let ((file-path (assoc-ref inputs "file")))
8829 (substitute* "py3status/parse_config.py"
8830 (("\\['file', '-b'")
8831 (string-append "['" file-path "/bin/file', '-b'")))
8832 #t))))
8833 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
8834 (home-page "https://github.com/ultrabug/py3status")
8835 (synopsis "Extensible i3status wrapper written in Python")
8836 (description "py3status is an i3status wrapper which extends i3status
8837functionality in a modular way, allowing you to extend your panel with your
8838own code, responding to click events and updating clock every second.")
8839 (license license:bsd-3)))
8840
8841(define-public python-tblib
8842 (package
8843 (name "python-tblib")
8844 (version "1.3.2")
8845 (source (origin
8846 (method url-fetch)
8847 (uri (pypi-uri "tblib" version))
8848 (sha256 (base32
8849 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
8850 (build-system python-build-system)
8851 (arguments
8852 `(#:phases
8853 (modify-phases %standard-phases
8854 (add-before 'check 'adjust-tests
8855 (lambda _
8856 (when (which "python3")
8857 ;; Adjust the example output to match that of Python 3.7:
8858 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
8859 (substitute* "README.rst"
8860 (("Exception\\('fail',") "Exception('fail'"))
8861 #t)))
8862 (replace 'check
8863 (lambda _
8864 ;; Upstream runs tests after installation and the package itself
8865 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
8866 ;; found.
8867 (setenv "PYTHONPATH"
8868 (string-append (getcwd) "/build/lib:"
8869 (getenv "PYTHONPATH")))
8870 (invoke "py.test" "-vv" "tests" "README.rst"))))))
8871 (native-inputs
8872 `(("python-pytest" ,python-pytest)
8873 ("python-six" ,python-six)))
8874 (home-page "https://github.com/ionelmc/python-tblib")
8875 (synopsis "Traceback serialization library")
8876 (description
8877 "Traceback serialization allows you to:
8878
8879@enumerate
8880@item Pickle tracebacks and raise exceptions with pickled tracebacks in
8881different processes. This allows better error handling when running code over
8882multiple processes (imagine multiprocessing, billiard, futures, celery etc).
8883
8884@item Parse traceback strings and raise with the parsed tracebacks.
8885@end enumerate\n")
8886 (license license:bsd-3)))
8887
8888(define-public python2-tblib
8889 (package-with-python2 python-tblib))
8890
8891(define-public python-greenlet
8892 (package
8893 (name "python-greenlet")
8894 (version "0.4.15")
8895 (source (origin
8896 (method url-fetch)
8897 (uri (pypi-uri "greenlet" version))
8898 (sha256
8899 (base32
8900 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
8901 (build-system python-build-system)
8902 (home-page "https://greenlet.readthedocs.io/")
8903 (synopsis "Lightweight in-process concurrent programming")
8904 (description
8905 "Greenlet package is a spin-off of Stackless, a version of CPython
8906that supports micro-threads called \"tasklets\". Tasklets run
8907pseudo-concurrently (typically in a single or a few OS-level threads) and
8908are synchronized with data exchanges on \"channels\".")
8909 (license (list license:psfl license:expat))))
8910
8911(define-public python2-greenlet
8912 (package-with-python2 python-greenlet))
8913
8914(define-public python-objgraph
8915 (package
8916 (name "python-objgraph")
8917 (version "3.4.0")
8918 (source
8919 (origin
8920 (method url-fetch)
8921 (uri (pypi-uri "objgraph" version))
8922 (sha256
8923 (base32
8924 "184m09am5gpbqfaiy7l0hwh476mczbrly1dffs0rw2p1d1i2q32a"))))
8925 (build-system python-build-system)
8926 (propagated-inputs
8927 `(("python-graphviz" ,python-graphviz)))
8928 (native-inputs
8929 `(("python-mock" ,python-mock)
8930 ("graphviz" ,graphviz)))
8931 (home-page "https://mg.pov.lt/objgraph/")
8932 (synopsis "Draw Python object reference graphs with graphviz")
8933 (description
8934 "This package provides tools to draw Python object reference graphs with
8935graphviz.")
8936 (license license:expat)))
8937
8938(define-public python-gevent
8939 (package
8940 (name "python-gevent")
8941 (version "1.3.7")
8942 (source (origin
8943 (method url-fetch)
8944 (uri (pypi-uri "gevent" version))
8945 (sha256
8946 (base32
8947 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
8948 (modules '((guix build utils)))
8949 (snippet
8950 '(begin
8951 ;; unbunding libev and c-ares
8952 (delete-file-recursively "deps")
8953 #t))))
8954 (build-system python-build-system)
8955 (arguments
8956 `(#:modules ((ice-9 ftw)
8957 (ice-9 match)
8958 (srfi srfi-26)
8959 (guix build utils)
8960 (guix build python-build-system))
8961 #:phases (modify-phases %standard-phases
8962 (add-after 'unpack 'unpack-libev
8963 (lambda* (#:key inputs #:allow-other-keys)
8964 (mkdir-p "deps/libev")
8965 ;; FIXME: gevent requires building libev, even though
8966 ;; it only links against the proper one.
8967 (invoke "tar" "-xf" (assoc-ref inputs "libev-source")
8968 "--strip-components=1" "-C" "deps/libev")))
8969 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
8970 (lambda _
8971 (substitute* "src/gevent/subprocess.py"
8972 (("/bin/sh") (which "sh")))
8973 (for-each (lambda (file)
8974 (substitute* file
8975 (("/bin/sh") (which "sh"))
8976 (("/bin/true") (which "true"))))
8977 (find-files "src/greentest" "\\.py$"))
8978 #t))
8979 (add-before 'build 'do-not-use-bundled-sources
8980 (lambda* (#:key inputs #:allow-other-keys)
8981 (setenv "CONFIG_SHELL" (which "bash"))
8982 (setenv "LIBEV_EMBED" "false")
8983 (setenv "CARES_EMBED" "false")
8984 (setenv "EMBED" "false")
8985
8986 (let ((greenlet (string-append
8987 (assoc-ref inputs "python-greenlet")
8988 "/include")))
8989 (match (scandir greenlet
8990 (lambda (item)
8991 (string-prefix? "python" item)))
8992 ((python)
8993 (setenv "CPATH"
8994 (string-append greenlet "/" python)))))
8995 #t))
8996 (add-before 'check 'skip-timer-test
8997 (lambda _
8998 ;; XXX: Skip 'TestTimerResolution', which appears to be
8999 ;; unreliable.
9000 (substitute* "src/greentest/test__core_timer.py"
9001 (("not greentest.RUNNING_ON_CI") "False"))
9002 #t))
9003 (replace 'check
9004 (lambda _
9005 ;; Make sure the build directory is on PYTHONPATH.
9006 (setenv "PYTHONPATH"
9007 (string-append
9008 (getenv "PYTHONPATH") ":"
9009 (getcwd) "/build/"
9010 (car (scandir "build" (cut string-prefix? "lib." <>)))))
9011 (with-directory-excursion "src/greentest"
9012 ;; XXX: Many tests require network access. Instead we only
9013 ;; run known-good tests. Unfortunately we cannot use
9014 ;; recursion here since this directory also contains
9015 ;; Python-version-specific subfolders.
9016 (apply invoke "python" "testrunner.py" "--config"
9017 "known_failures.py"
9018 (scandir "." (cut regexp-exec
9019 (make-regexp "test_+(subprocess|core)")
9020 <>)))))))))
9021 (propagated-inputs
9022 `(("python-greenlet" ,python-greenlet)
9023 ("python-objgraph" ,python-objgraph)))
9024 (native-inputs
9025 `(("libev-source" ,(package-source libev))
9026 ("python-six" ,python-six)))
9027 (inputs
9028 `(("c-ares" ,c-ares)
9029 ("libev" ,libev)))
9030 (home-page "http://www.gevent.org/")
9031 (synopsis "Coroutine-based network library")
9032 (description
9033 "gevent is a coroutine-based Python networking library that uses greenlet
9034to provide a high-level synchronous API on top of the libev event loop.")
9035 (license license:expat)
9036 (properties `((python2-variant . ,(delay python2-gevent))))))
9037
9038(define-public python2-gevent
9039 (let ((base (package-with-python2
9040 (strip-python2-variant python-gevent))))
9041 (package
9042 (inherit base)
9043 (native-inputs `(,@(package-native-inputs python-gevent)
9044 ("python-mock" ,python2-mock))))))
9045
9046(define-public python-fastimport
9047 (package
9048 (name "python-fastimport")
9049 (version "0.9.6")
9050 (source
9051 (origin
9052 (method url-fetch)
9053 (uri (pypi-uri "fastimport" version))
9054 (sha256
9055 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
9056 (build-system python-build-system)
9057 (home-page "https://github.com/jelmer/python-fastimport")
9058 (synopsis "VCS fastimport parser and generator in Python")
9059 (description "This package provides a parser for and generator of the Git
9060@url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
9061format.")
9062 (license license:gpl2+)))
9063
9064(define-public python2-fastimport
9065 (package-with-python2 python-fastimport))
9066
9067(define-public python-twisted
9068 (package
9069 (name "python-twisted")
9070 (version "17.1.0")
9071 (source (origin
9072 (method url-fetch)
9073 (uri (pypi-uri "Twisted" version ".tar.bz2"))
9074 (sha256
9075 (base32
9076 "1p245mg15hkxp7hy5cyq2fgvlgjkb4cg0gwkwd148nzy1bbi3wnv"))))
9077 (build-system python-build-system)
9078 (arguments
9079 '(#:tests? #f)) ; FIXME: Some tests are failing.
9080 ;; #:phases
9081 ;; (modify-phases %standard-phases
9082 ;; (replace 'check
9083 ;; (lambda _
9084 ;; (zero? (system* "./bin/trial" "twisted")))))
9085 (propagated-inputs
9086 `(("python-zope-interface" ,python-zope-interface)
9087 ("python-incremental" ,python-incremental)
9088 ("python-constantly" ,python-constantly)
9089 ("python-automat" ,python-automat)))
9090 (home-page "https://twistedmatrix.com/")
9091 (synopsis "Asynchronous networking framework written in Python")
9092 (description
9093 "Twisted is an extensible framework for Python programming, with special
9094focus on event-based network programming and multiprotocol integration.")
9095 (license license:expat)))
9096
9097(define-public python2-twisted
9098 (package-with-python2 python-twisted))
9099
9100(define-public python-pika
9101 (package
9102 (name "python-pika")
9103 (version "0.12.0")
9104 (source
9105 (origin
9106 (method url-fetch)
9107 (uri (pypi-uri "pika" version))
9108 (sha256
9109 (base32
9110 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
9111 (build-system python-build-system)
9112 (native-inputs
9113 `(("python-pyev" ,python-pyev)
9114 ("python-tornado" ,python-tornado)
9115 ("python-twisted" ,python-twisted)))
9116 (home-page "https://pika.readthedocs.org")
9117 (synopsis "Pure Python AMQP Client Library")
9118 (description
9119 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
9120Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
9121network support library.")
9122 (license license:bsd-3)))
9123
9124(define-public python2-pika
9125 (package-with-python2 python-pika))
9126
9127(define-public python-ply
9128 (package
9129 (name "python-ply")
9130 (version "3.10")
9131 (source
9132 (origin
9133 (method url-fetch)
9134 (uri (pypi-uri "ply" version))
9135 (sha256
9136 (base32
9137 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
9138 (build-system python-build-system)
9139 (home-page "http://www.dabeaz.com/ply/")
9140 (synopsis "Python Lex & Yacc")
9141 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
9142It uses LR parsing and does extensive error checking.")
9143 (license license:bsd-3)))
9144
9145(define-public python2-ply
9146 (package-with-python2 python-ply))
9147
9148(define-public python-tabulate
9149 (package
9150 (name "python-tabulate")
9151 (version "0.7.7")
9152 (source (origin
9153 (method url-fetch)
9154 (uri (pypi-uri "tabulate" version))
9155 (sha256
9156 (base32
9157 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
9158 (build-system python-build-system)
9159 (arguments
9160 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
9161 ;; and the latest release is not tagged in the upstream repository.
9162 '(#:tests? #f))
9163 (home-page "https://bitbucket.org/astanin/python-tabulate")
9164 (synopsis "Pretty-print tabular data")
9165 (description
9166 "Tabulate is a library and command-line utility to pretty-print tabular
9167data in Python.")
9168 (license license:expat)))
9169
9170(define-public python2-tabulate
9171 (package-with-python2 python-tabulate))
9172
9173(define-public python-kazoo
9174 (package
9175 (name "python-kazoo")
9176 (version "2.4.0")
9177 (source
9178 (origin
9179 (method url-fetch)
9180 (uri (pypi-uri "kazoo" version))
9181 (sha256
9182 (base32
9183 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
9184 (build-system python-build-system)
9185 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
9186 (propagated-inputs
9187 `(("python-six" ,python-six)))
9188 (home-page "https://kazoo.readthedocs.org")
9189 (synopsis "High-level Zookeeper client library")
9190 (description
9191 "Kazoo is a Python client library for the Apache Zookeeper distributed
9192application service. It is designed to be easy to use and to avoid common
9193programming errors.")
9194 (license license:asl2.0)))
9195
9196(define-public python2-kazoo
9197 (package-with-python2 python-kazoo))
9198
9199(define-public python-pykafka
9200 (package
9201 (name "python-pykafka")
9202 (version "2.4.0")
9203 (source (origin
9204 (method url-fetch)
0ca1d040 9205 (uri (pypi-uri "pykafka" version))
44d10b1f
RW
9206 (sha256
9207 (base32
9208 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
9209 (build-system python-build-system)
9210 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
9211 (propagated-inputs
9212 `(("python-gevent" ,python-gevent)
9213 ("python-kazoo" ,python-kazoo)
9214 ("python-tabulate" ,python-tabulate)))
9215 (inputs
9216 `(("librdkafka" ,librdkafka)))
9217 (home-page "https://pykafka.readthedocs.io/")
9218 (synopsis "Apache Kafka client for Python")
9219 (description
9220 "PyKafka is a client for the Apache Kafka distributed messaging system.
9221It includes Python implementations of Kafka producers and consumers, which
9222are optionally backed by a C extension built on librdkafka.")
9223 (license license:asl2.0)))
9224
9225(define-public python2-pykafka
9226 (package-with-python2 python-pykafka))
9227
9228(define-public python-wcwidth
9229 (package
9230 (name "python-wcwidth")
9231 (version "0.1.7")
9232 (source
9233 (origin
9234 (method url-fetch)
9235 (uri (pypi-uri "wcwidth" version))
9236 (sha256
9237 (base32
9238 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
9239 (build-system python-build-system)
9240 (home-page "https://github.com/jquast/wcwidth")
9241 (synopsis "Measure number of terminal column cells of wide-character codes")
9242 (description "Wcwidth measures the number of terminal column cells of
9243wide-character codes. It is useful for those implementing a terminal emulator,
9244or programs that carefully produce output to be interpreted by one. It is a
9245Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
9246specified in POSIX.1-2001 and POSIX.1-2008.")
9247 (license license:expat)))
9248
9249(define-public python2-wcwidth
9250 (package-with-python2 python-wcwidth))
9251
9252(define-public python2-jsonrpclib
9253 (package
9254 (name "python2-jsonrpclib")
9255 (version "0.1.7")
9256 (source (origin
9257 (method url-fetch)
6571bba0 9258 (uri (pypi-uri "jsonrpclib" version))
44d10b1f
RW
9259 (sha256
9260 (base32
9261 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
9262 (build-system python-build-system)
9263 (arguments
9264 `(#:tests? #f
9265 #:python ,python-2))
9266 (home-page "https://github.com/joshmarshall/jsonrpclib/")
9267 (synopsis "Implementation of JSON-RPC specification for Python")
9268 (description
9269 "This library is an implementation of the JSON-RPC specification.
9270It supports both the original 1.0 specification, as well as the
9271new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
9272etc.")
9273 (license license:asl2.0)))
9274
9275(define-public python-chai
9276 (package
9277 (name "python-chai")
9278 (version "1.1.2")
9279 (source (origin
9280 (method url-fetch)
9281 (uri (pypi-uri "chai" version))
9282 (sha256
9283 (base32
9284 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
9285 (build-system python-build-system)
9286 (home-page "https://github.com/agoragames/chai")
9287 (synopsis "Mocking framework for Python")
9288 (description
9289 "Chai provides an api for mocking, stubbing and spying your python
9290objects, patterned after the Mocha library for Ruby.")
9291 (license license:bsd-3)))
9292
9293(define-public python2-chai
9294 (package-with-python2 python-chai))
9295
9296(define-public python-inflection
9297 (package
9298 (name "python-inflection")
9299 (version "0.3.1")
9300 (source
9301 (origin (method url-fetch)
9302 (uri (pypi-uri "inflection" version))
9303 (sha256
9304 (base32
9305 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
9306 (build-system python-build-system)
9307 (native-inputs
9308 `(("python-pytest" ,python-pytest)))
9309 (home-page "https://github.com/jpvanhal/inflection")
9310 (synopsis "Python string transformation library")
9311 (description
9312 "Inflection is a string transformation library. It singularizes
9313and pluralizes English words, and transforms strings from CamelCase to
9314underscored string.")
9315 (license license:expat)))
9316
9317(define-public python2-inflection
9318 (package-with-python2 python-inflection))
9319
9320(define-public python-pylev
9321 (package
9322 (name "python-pylev")
9323 (version "1.3.0")
9324 (source (origin
9325 (method url-fetch)
9326 (uri (pypi-uri "pylev" version))
9327 (sha256
9328 (base32
9329 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
9330 (build-system python-build-system)
9331 (home-page "https://github.com/toastdriven/pylev")
9332 (synopsis "Levenshtein distance implementation in Python")
9333 (description "Pure Python Levenshtein implementation, based off the
9334Wikipedia code samples at
9335@url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
9336 (license license:bsd-3)))
9337
9338(define-public python2-pylev
9339 (package-with-python2 python-pylev))
9340
9341(define-public python-cleo
9342 (package
9343 (name "python-cleo")
9344 (version "0.6.1")
9345 (source (origin
9346 (method url-fetch)
9347 (uri (pypi-uri "cleo" version))
9348 (sha256
9349 (base32
9350 "0q1cf0szr0d54am4pypzwdnm74zpladdsinad94c2fz5i06fdpf7"))))
9351 (build-system python-build-system)
9352 (native-inputs
9353 `(;; For testing
9354 ("python-mock" ,python-mock)
9355 ("python-pytest-mock" ,python-pytest-mock)
9356 ("python-pytest" ,python-pytest)))
9357 (propagated-inputs
9358 `(("python-backpack" ,python-backpack)
9359 ("python-pastel" ,python-pastel)
9360 ("python-pylev" ,python-pylev)))
9361 (home-page "https://github.com/sdispater/cleo")
9362 (synopsis "Command-line arguments library for Python")
9363 (description
9364 "Cleo allows you to create command-line commands with signature in
9365docstring and colored output.")
9366 (license license:expat)))
9367
9368(define-public python2-cleo
9369 (package-with-python2 python-cleo))
9370
9371(define-public python-lazy-object-proxy
9372 (package
9373 (name "python-lazy-object-proxy")
9374 (version "1.3.1")
9375 (source (origin
9376 (method url-fetch)
9377 (uri (pypi-uri "lazy-object-proxy" version))
9378 (sha256
9379 (base32
9380 "0yha7q9bhw857fwaby785d63mffhngl9npwzlk9i0pwlkwvbx4gb"))))
9381 (build-system python-build-system)
9382 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
9383 (synopsis "Lazy object proxy for python")
9384 (description
9385 "Lazy object proxy is an object that wraps a callable but defers the call
9386until the object is actually required, and caches the result of said call.")
9387 (license license:bsd-2)))
9388
9389(define-public python2-lazy-object-proxy
9390 (package-with-python2 python-lazy-object-proxy))
9391
9392(define-public python-dnspython
9393 (package
9394 (name "python-dnspython")
9395 (version "1.15.0")
9396 (source (origin
9397 (method url-fetch)
9398 (uri (string-append "http://www.dnspython.org/kits/"
9399 version "/dnspython-" version ".tar.gz"))
9400 (sha256
9401 (base32
9402 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
9403 (build-system python-build-system)
9404 (arguments '(#:tests? #f)) ; XXX: requires internet access
9405 (home-page "http://www.dnspython.org")
9406 (synopsis "DNS toolkit for Python")
9407 (description
9408 "dnspython is a DNS toolkit for Python. It supports almost all record
9409types. It can be used for queries, zone transfers, and dynamic updates.
9410It supports TSIG authenticated messages and EDNS0.")
9411 (license license:expat)))
9412
9413(define-public python2-dnspython
9414 (package-with-python2 python-dnspython))
9415
9416(define-public python-email-validator
9417 (package
9418 (name "python-email-validator")
9419 (version "1.0.2")
9420 (source
9421 (origin (method url-fetch)
9422 (uri (pypi-uri "email_validator" version))
9423 (sha256
9424 (base32
9425 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
9426 (build-system python-build-system)
9427 (arguments
9428 '(#:phases
9429 (modify-phases %standard-phases
9430 (add-before 'build 'use-dnspython
9431 (lambda _
9432 (substitute* "setup.py"
9433 (("dnspython3") "dnspython"))
9434 #t)))))
9435 (propagated-inputs
9436 `(("python-dnspython" ,python-dnspython)
9437 ("python-idna" ,python-idna)))
9438 (home-page "https://github.com/JoshData/python-email-validator")
9439 (synopsis "Email address validation library for Python")
9440 (description
9441 "This library validates email address syntax and deliverability.")
9442 (license license:cc0)))
9443
9444(define-public python2-email-validator
9445 (package-with-python2 python-email-validator))
9446
9447(define-public python-ukpostcodeparser
9448 (package
9449 (name "python-ukpostcodeparser")
9450 (version "1.0.3")
9451 (source (origin
9452 (method url-fetch)
9453 (uri (pypi-uri "UkPostcodeParser" version))
9454 (sha256
9455 (base32
9456 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
9457 (build-system python-build-system)
9458 (home-page "https://github.com/hamstah/ukpostcodeparser")
9459 (synopsis "UK Postcode parser for Python")
9460 (description
9461 "This library provides the @code{parse_uk_postcode} function for
9462parsing UK postcodes.")
9463 (license license:expat)))
9464
9465(define-public python2-ukpostcodeparser
9466 (package-with-python2 python-ukpostcodeparser))
9467
9468(define-public python-faker
9469 (package
9470 (name "python-faker")
9471 (version "0.7.9")
9472 (source (origin
9473 (method url-fetch)
9474 (uri (pypi-uri "Faker" version))
9475 (sha256
9476 (base32
9477 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
9478 (patches
9479 (search-patches "python-faker-fix-build-32bit.patch"))
9480 (modules '((guix build utils)))
9481 (snippet
9482 '(begin
9483 (for-each delete-file (find-files "." "\\.pyc$"))
9484 #t))))
9485 (build-system python-build-system)
9486 (arguments
9487 '(#:phases
9488 (modify-phases %standard-phases
9489 (replace 'check
49ff8827 9490 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
44d10b1f
RW
9491 (native-inputs
9492 `(;; For testing
9493 ("python-email-validator" ,python-email-validator)
9494 ("python-mock" ,python-mock)
9495 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
9496 (propagated-inputs
9497 `(("python-dateutil" ,python-dateutil)
9498 ("python-six" ,python-six)))
9499 (home-page "https://github.com/joke2k/faker")
9500 (synopsis "Python package that generates fake data")
9501 (description
9502 "Faker is a Python package that generates fake data such as names,
9503addresses, and phone numbers.")
9504 (license license:expat)
9505 (properties `((python2-variant . ,(delay python2-faker))))))
9506
9507(define-public python2-faker
9508 (let ((base (package-with-python2 (strip-python2-variant
9509 python-faker))))
9510 (package
9511 (inherit base)
9512 (propagated-inputs
9513 `(("python2-ipaddress" ,python2-ipaddress)
9514 ,@(package-propagated-inputs base))))))
9515
9516(define-public python-pyaml
9517 (package
9518 (name "python-pyaml")
9519 (version "18.11.0")
9520 (source (origin
9521 (method url-fetch)
9522 (uri (pypi-uri "pyaml" version))
9523 (sha256
9524 (base32
9525 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
9526 (build-system python-build-system)
9527 (native-inputs
9528 `(("python-unidecode" ,python-unidecode)))
9529 (propagated-inputs
9530 `(("python-pyyaml" ,python-pyyaml)))
9531 (home-page "https://github.com/mk-fg/pretty-yaml")
9532 (synopsis "YAML pretty-print library for Python")
9533 (description
9534 "pyaml is a PyYAML based python module to produce pretty and readable
9535YAML-serialized data.")
9536 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
9537
9538(define-public python2-pyaml
9539 (package-with-python2 python-pyaml))
9540
9541(define-public python-backpack
9542 (package
9543 (name "python-backpack")
9544 (version "0.1")
9545 (source
9546 (origin
9547 (method url-fetch)
9548 (uri (pypi-uri "backpack" version))
9549 (sha256
9550 (base32
9551 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
9552 (build-system python-build-system)
9553 (native-inputs
9554 `(("python-pytest" ,python-pytest)
9555 ("python-nose" ,python-nose)))
9556 (propagated-inputs
9557 `(("python-simplejson" ,python-simplejson)))
9558 (home-page "https://github.com/sdispater/backpack")
9559 (synopsis "Utilities for working with Python collections")
9560 (description "Backpack provides some useful utilities for working with
9561collections of data.")
9562 (license license:expat)))
9563
9564(define-public python2-backpack
9565 (package-with-python2 python-backpack))
9566
9567(define-public python-prompt-toolkit
9568 (package
9569 (name "python-prompt-toolkit")
9570 (version "2.0.7")
9571 (source
9572 (origin
9573 (method url-fetch)
9574 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
9575 (sha256
9576 (base32
9577 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
9578 (build-system python-build-system)
9579 (arguments
9580 `(#:phases
9581 (modify-phases %standard-phases
9582 (delete 'check)
9583 (add-after 'install 'post-install-check
9584 (lambda* (#:key inputs outputs #:allow-other-keys)
9585 ;; HOME is needed for the test
9586 ;; "test_pathcompleter_can_expanduser".
9587 (setenv "HOME" "/tmp")
9588 (add-installed-pythonpath inputs outputs)
9589 (invoke "py.test"))))))
9590 (propagated-inputs
9591 `(("python-wcwidth" ,python-wcwidth)
9592 ("python-six" ,python-six)
9593 ("python-pygments" ,python-pygments)))
9594 (native-inputs
9595 `(("python-pytest" ,python-pytest)))
9596 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
9597 (synopsis "Library for building command line interfaces in Python")
9598 (description
9599 "Prompt-Toolkit is a library for building interactive command line
9600interfaces in Python. It's like GNU Readline but it also features syntax
9601highlighting while typing, out-of-the-box multi-line input editing, advanced
9602code completion, incremental search, support for Chinese double-width
9603characters, mouse support, and auto suggestions.")
9604 (license license:bsd-3)))
9605
9606(define-public python2-prompt-toolkit
9607 (package-with-python2 python-prompt-toolkit))
9608
9609(define-public python-prompt-toolkit-1
9610 (package (inherit python-prompt-toolkit)
9611 (version "1.0.15")
9612 (source
9613 (origin
9614 (method url-fetch)
9615 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
9616 (sha256
9617 (base32
9618 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
9619
9620(define-public python2-prompt-toolkit-1
9621 (package-with-python2 python-prompt-toolkit-1))
9622
9623(define-public python-jedi
9624 (package
9625 (name "python-jedi")
40bd0aa3 9626 (version "0.13.2")
44d10b1f
RW
9627 (source
9628 (origin
9629 (method url-fetch)
9630 (uri (pypi-uri "jedi" version))
9631 (sha256
9632 (base32
40bd0aa3 9633 "1za944msp0f8x36qa8l309jhv0kzlsdh7r9nj3z12y8npnsh45sp"))))
44d10b1f
RW
9634 (build-system python-build-system)
9635 (arguments
40bd0aa3 9636 `( ;; Many tests are failing with Python 3.7.x as of version 0.13.2 (see:
44d10b1f
RW
9637 ;; https://github.com/davidhalter/jedi/issues/1263)
9638 #:tests? #f
9639 #:phases
9640 (modify-phases %standard-phases
9641 (replace 'check
9642 (lambda* (#:key tests? #:allow-other-keys)
9643 (when tests?
9644 (invoke "py.test" "-vv")))))))
9645 (native-inputs
9646 `(("python-pytest" ,python-pytest)
9647 ("python-docopt" ,python-docopt)))
9648 (propagated-inputs
9649 `(("python-parso" ,python-parso)))
9650 (home-page "https://github.com/davidhalter/jedi")
9651 (synopsis "Autocompletion and static analysis library for Python")
9652 (description
9653 "Jedi is a static analysis tool for Python that can be used in Integrated
9654Development Environments (@dfn{IDE}s) and text editors. It understands Python
9655on a deeper level than many other static analysis frameworks for Python.
9656
9657Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
9658well.")
9659 (license license:expat)))
9660
9661(define-public python2-jedi
9662 (package-with-python2 python-jedi))
9663
9664(define-public ptpython
9665 (package
9666 (name "ptpython")
9667 (version "0.34")
9668 (source (origin
9669 (method url-fetch)
9670 (uri (pypi-uri "ptpython" version))
9671 (sha256
9672 (base32
9673 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
9674 (build-system python-build-system)
9675 (arguments
9676 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
9677 (propagated-inputs
9678 `(("python-docopt" ,python-docopt)
9679 ("python-jedi" ,python-jedi)
9680 ("python-prompt-toolkit" ,python-prompt-toolkit)
9681 ("python-pygments" ,python-pygments)))
9682 (home-page "https://github.com/jonathanslenders/ptpython")
9683 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
9684 (description
9685 "ptpython is a Python read-eval-print loop with IDE-like features.
9686It supports syntax highlighting, multiline editing, autocompletion, mouse,
9687color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
9688etc.")
9689 (license license:bsd-3)
9690 (properties `((python2-variant . ,(delay ptpython-2))))))
9691
9692(define-public ptpython-2
9693 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
9694 (package
9695 (inherit base)
9696 (name "ptpython2"))))
9697
9698(define-public python-stem
9699 (package
9700 (name "python-stem")
9701 (version "1.7.0")
9702 (source
9703 (origin
9704 (method url-fetch)
9705 (uri (pypi-uri "stem" version))
9706 (sha256
9707 (base32
9708 "1awiglfiajnx2hva9aqpj3fmdvdb4qg7cwnlfyih827m68y3cq8v"))))
9709 (build-system python-build-system)
9710 (arguments
9711 `(#:phases
9712 (modify-phases %standard-phases
9713 (replace 'check
9714 (lambda _
9715 (invoke "./run_tests.py" "--unit")
9716 #t)))))
9717 (native-inputs
9718 `(("python-mock" ,python-mock)
9719 ("python-pycodestyle" ,python-pycodestyle)
9720 ("python-pyflakes" ,python-pyflakes)))
9721 (home-page "https://stem.torproject.org/")
9722 (synopsis
9723 "Python controller library that allows applications to interact with Tor")
9724 (description
9725 "Stem is a Python controller library for Tor. With it you can use Tor's
9726control protocol to script against the Tor process and read descriptor data
9727relays publish about themselves.")
9728 (license license:lgpl3)))
9729
9730(define-public python2-stem
9731 (package-with-python2 python-stem))
9732
9733(define-public python-pyserial
9734 (package
9735 (name "python-pyserial")
9736 (version "3.1.1")
9737 (source
9738 (origin
9739 (method url-fetch)
9740 (uri (pypi-uri "pyserial" version))
9741 (sha256
9742 (base32
9743 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
9744 (build-system python-build-system)
9745 (arguments
9746 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
9747 ;; #:phases
9748 ;; (modify-phases %standard-phases
9749 ;; (replace 'check
9750 ;; (lambda _
9751 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
9752 (home-page
9753 "https://github.com/pyserial/pyserial")
9754 (synopsis "Python Serial Port Bindings")
9755 (description "@code{pyserial} provide serial port bindings for Python. It
9756supports different byte sizes, stop bits, parity and flow control with RTS/CTS
9757and/or Xon/Xoff. The port is accessed in RAW mode.")
9758 (license license:bsd-3)))
9759
9760(define-public python2-pyserial
9761 (package-with-python2 python-pyserial))
9762
9763(define-public python-kivy
9764 (package
9765 (name "python-kivy")
9766 (version "1.10.1")
9767 (source
9768 (origin
9769 (method url-fetch)
9770 (uri (pypi-uri "Kivy" version))
9771 (file-name (string-append name "-" version ".tar.gz"))
9772 (sha256
9773 (base32
9774 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
9775 (build-system python-build-system)
9776 (arguments
9777 `(#:tests? #f ; Tests require many optional packages
9778 #:phases
9779 (modify-phases %standard-phases
9780 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
9781 (lambda* (#:key inputs #:allow-other-keys)
9782 (setenv "KIVY_SDL2_PATH"
9783 (string-append (assoc-ref inputs "sdl-union")
9784 "/include/SDL2"))
9785 #t)))))
9786 (native-inputs
9787 `(("git" ,git)
9788 ("pkg-config" ,pkg-config)
9789 ("python-cython" ,python-cython)))
9790 (inputs
9791 `(("gstreamer" ,gstreamer)
9792 ("mesa" ,mesa)
9793 ("sdl-union"
9794 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
9795 (home-page "http://kivy.org")
9796 (synopsis
9797 "Multitouch application framework")
9798 (description
9799 "A software library for rapid development of
9800hardware-accelerated multitouch applications.")
9801 (license license:expat)))
9802
9803(define-public python2-kivy
9804 (package-with-python2 python-kivy))
9805
9806(define-public python-kivy-next
9807 (deprecated-package "python-kivy-next" python-kivy))
9808
9809(define-public python2-kivy-next
9810 (deprecated-package "python2-kivy-next" python2-kivy))
9811
9812(define-public python-binaryornot
9813 (package
9814 (name "python-binaryornot")
9815 (version "0.4.4")
9816 (source (origin
9817 (method url-fetch)
9818 (uri (pypi-uri "binaryornot" version))
9819 (sha256
9820 (base32
9821 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
9822 (build-system python-build-system)
9823 (propagated-inputs
9824 `(("python-chardet" ,python-chardet)
9825 ("python-hypothesis" ,python-hypothesis)))
9826 (home-page "https://github.com/audreyr/binaryornot")
9827 (synopsis "Package to check if a file is binary or text")
9828 (description "Ultra-lightweight pure Python package to check if a file is
9829binary or text.")
9830 (license license:bsd-3)
9831 (properties `((python2-variant . ,(delay python2-binaryornot))))))
9832
9833(define-public python2-binaryornot
9834 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
9835 (package (inherit base)
9836 (propagated-inputs
9837 `(("python2-enum34" ,python2-enum34)
9838 ,@(package-propagated-inputs base))))))
9839
9840(define-public python-nltk
9841 (package
9842 (name "python-nltk")
9843 (version "3.2.1")
9844 (source (origin
9845 (method url-fetch)
9846 (uri (pypi-uri "nltk" version))
9847 (sha256
9848 (base32
9849 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
9850 (build-system python-build-system)
9851 (arguments
9852 '(;; The tests require some extra resources to be downloaded.
9853 ;; TODO Try packaging these resources.
9854 #:tests? #f))
9855 (home-page "http://nltk.org/")
9856 (synopsis "Natural Language Toolkit")
9857 (description "It provides interfaces to over 50 corpora and lexical
9858resources such as WordNet, along with a suite of text processing libraries
9859for classification, tokenization, stemming, tagging, parsing, and semantic
9860reasoning, wrappers for natural language processing libraries.")
9861 (license license:asl2.0)))
9862
9863(define-public python2-nltk
9864 (package-with-python2 python-nltk))
9865
9866(define-public python-pymongo
9867 (package
9868 (name "python-pymongo")
9869 (version "3.7.2")
9870 (source (origin
9871 (method url-fetch)
9872 (uri (pypi-uri "pymongo" version))
9873 (sha256
9874 (base32
9875 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
9876 (build-system python-build-system)
9877 (propagated-inputs
9878 `(("python-certifi" ,python-certifi)))
9879 (home-page "https://github.com/mongodb/mongo-python-driver")
9880 (synopsis "Python driver for MongoDB")
9881 (description "Python driver for MongoDB.")
9882 (license license:asl2.0)))
9883
9884(define-public python2-pymongo
9885 (package-with-python2 python-pymongo))
9886
9887(define-public python-sh
9888 (package
9889 (name "python-sh")
9890 (version "1.11")
9891 (source (origin
9892 (method url-fetch)
9893 (uri (pypi-uri "sh" version))
9894 (sha256
9895 (base32
9896 "192r0mpv6dmkysjzhc43ddffiwb5g7c76bgr1mb1z2xz9awbj3sr"))))
9897 (build-system python-build-system)
9898 (arguments
9899 `(#:tests? #f)) ; no tests
9900 (home-page "https://github.com/amoffat/sh")
9901 (synopsis "Python subprocess interface")
9902 (description "Abstracts process invocation by providing a function
9903interface for programs.")
9904 (license license:expat)))
9905
9906(define-public python2-sh
9907 (package-with-python2 python-sh))
9908
9909(define-public python-consul
9910 (package
9911 (name "python-consul")
9912 (version "0.6.1")
9913 (source
9914 (origin
9915 (method url-fetch)
9916 (uri (pypi-uri "python-consul" version))
9917 (sha256
9918 (base32
9919 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
9920 (build-system python-build-system)
9921 (arguments
9922 '(#:tests? #f)) ; The tests are not distributed
9923 (propagated-inputs
9924 `(("python-requests" ,python-requests)
9925 ("python-six" ,python-six)))
9926 (home-page "https://github.com/cablehead/python-consul")
9927 (synopsis "Python client for Consul")
9928 (description
9929 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
9930discovery, monitoring and configuration.")
9931 (license license:expat)))
9932
9933(define-public python2-consul
9934 (package-with-python2 python-consul))
9935
9936(define-public python-schematics
9937 (package
9938 (name "python-schematics")
9939 (version "1.1.1")
9940 (source
9941 (origin
9942 (method url-fetch)
9943 (uri (string-append
9944 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
9945 (file-name (string-append name "-" version ".tar.gz"))
9946 (sha256
9947 (base32
9948 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
9949 (build-system python-build-system)
9950 (propagated-inputs
9951 `(("python-six" ,python-six)))
9952 (arguments
9953 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
9954 ; version requirements (eg python-coveralls)
9955 (home-page "https://github.com/schematics/schematics")
9956 (synopsis "Python Data Structures for Humans")
9957 (description "Python Data Structures for Humans.")
9958 (license license:bsd-3)))
9959
9960(define-public python2-schematics
9961 (package-with-python2 python-schematics))
9962
9963(define-public python-odfpy
9964 (package
9965 (name "python-odfpy")
9966 (version "1.3.3")
9967 (source (origin
9968 (method url-fetch)
9969 (uri (pypi-uri "odfpy" version))
9970 (sha256
9971 (base32
9972 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
9973 (arguments
9974 `(#:modules ((srfi srfi-1)
9975 (guix build python-build-system)
9976 (guix build utils))
9977 #:phases
9978 (modify-phases %standard-phases
9979 (replace 'check
9980 ;; The test runner invokes python2 and python3 for test*.py.
9981 ;; To avoid having both in inputs, we replicate it here.
9982 (lambda _
21ccc01d
RW
9983 (for-each (lambda (test-file) (invoke "python" test-file))
9984 (find-files "tests" "^test.*\\.py$"))
9985 #t)))))
44d10b1f
RW
9986 (build-system python-build-system)
9987 (home-page "https://github.com/eea/odfpy")
9988 (synopsis "Python API and tools to manipulate OpenDocument files")
9989 (description "Collection of libraries and utility programs written in
9990Python to manipulate OpenDocument 1.2 files.")
9991 (license
9992 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
9993 ;; number of files with other licenses.
9994 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
9995
9996(define-public python2-odfpy
9997 (package-with-python2 python-odfpy))
9998
9999(define-public python-natsort
10000 (package
10001 (name "python-natsort")
10002 (version "5.4.1")
10003 (source (origin
10004 (method url-fetch)
10005 (uri (pypi-uri "natsort" version))
10006 (sha256
10007 (base32
10008 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
10009 (build-system python-build-system)
10010 (arguments
10011 `(#:modules ((guix build utils)
10012 (guix build python-build-system)
10013 (srfi srfi-1)
10014 (srfi srfi-26)
10015 (ice-9 ftw))
10016 #:phases
10017 (modify-phases %standard-phases
10018 (add-before 'check 'set-cachedir
10019 ;; Tests require write access to $HOME by default
10020 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
10021 (replace 'check
10022 (lambda _
10023 (let ((cwd (getcwd)))
10024 (setenv "PYTHONPATH"
10025 (string-append
10026 cwd "/build/"
10027 (find (cut string-prefix? "lib" <>)
10028 (scandir (string-append cwd "/build")))
10029 ":"
10030 (getenv "PYTHONPATH")))
10031 (invoke "pytest" "-v")))))))
10032 (native-inputs
10033 `(("python-hypothesis" ,python-hypothesis)
10034 ("python-pytest-cov" ,python-pytest-cov)
10035 ("python-pytest-mock" ,python-pytest-mock)
10036 ("python-pytest" ,python-pytest)))
10037 (propagated-inputs ; TODO: Add python-fastnumbers.
10038 `(("python-pyicu" ,python-pyicu)))
10039 (home-page "https://github.com/SethMMorton/natsort")
10040 (synopsis "Natural sorting for python and shell")
10041 (description
10042 "Natsort lets you apply natural sorting on lists instead of
10043lexicographical. If you use the built-in @code{sorted} method in python
10044on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
10045returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
10046function @code{natsorted} that identifies numbers and sorts them separately
10047from strings. It can also sort version numbers, real numbers, mixed types
10048and more, and comes with a shell command @command{natsort} that exposes this
10049functionality in the command line.")
10050 (license license:expat)
10051 (properties `((python2-variant . ,(delay python2-natsort))))))
10052
10053(define-public python2-natsort
10054 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
10055 (package (inherit base)
10056 (native-inputs
10057 `(("python2-pathlib" ,python2-pathlib)
10058 ,@(package-native-inputs base))))))
10059
10060(define-public python-glances
10061 (package
10062 (name "python-glances")
10063 (version "3.0.2")
10064 (source
10065 (origin
10066 (method url-fetch)
10067 (uri (pypi-uri "Glances" version))
10068 (sha256
10069 (base32
10070 "09fxysfp1n16csqvzvawy74qm6a94nvwjf3vcf5gkqp4i6k4vjjy"))))
10071 (build-system python-build-system)
10072 (propagated-inputs
10073 `(("python-psutil" ,python-psutil)))
10074 (home-page
10075 "https://github.com/nicolargo/glances")
10076 (synopsis
10077 "A cross-platform curses-based monitoring tool")
10078 (description
10079 "Glances is a curses-based monitoring tool for a wide variety of platforms.
10080Glances uses the PsUtil library to get information from your system. It monitors
10081CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
10082 (license license:lgpl3+)))
10083
10084(define-public python2-glances
10085 (package-with-python2 python-glances))
10086
10087(define-public python-graphql-core
10088 (package
10089 (name "python-graphql-core")
10090 (version "0.5.3")
10091 (source
10092 (origin
10093 (method url-fetch)
10094 (uri (pypi-uri "graphql-core" version))
10095 (sha256
10096 (base32
10097 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
10098 (build-system python-build-system)
10099 (arguments
10100 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
10101 #:phases
10102 (modify-phases %standard-phases
10103 (add-after 'unpack 'patch-hardcoded-version
10104 (lambda _ (substitute*
10105 "setup.py"
10106 (("'gevent==1.1rc1'") "'gevent'"))
10107 #t)))))
10108 (native-inputs
10109 `(("python-gevent" ,python-gevent)
10110 ("python-mock" ,python-mock)
10111 ("python-pytest-mock" ,python-pytest-mock)))
10112 (propagated-inputs
10113 `(("python-promise" ,python-promise)
10114 ("python-six" ,python-six)))
10115 (home-page "https://github.com/graphql-python/graphql-core")
10116 (synopsis "GraphQL implementation for Python")
10117 (description
10118 "GraphQL implementation for Python. GraphQL is a data query language and
10119runtime designed and used to request and deliver data to mobile and web apps.
10120This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
10121to Python.")
10122 (license license:expat)))
10123
10124(define-public python2-graphql-core
10125 (package-with-python2 python-graphql-core))
10126
10127(define-public python-graphql-relay
10128 (package
10129 (name "python-graphql-relay")
10130 (version "0.4.5")
10131 (source
10132 (origin
10133 (method url-fetch)
10134 (uri (pypi-uri "graphql-relay" version))
10135 (sha256
10136 (base32
10137 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
10138 (build-system python-build-system)
10139 (arguments
10140 '(#:tests? #f)) ; The tests are not distributed
10141 (propagated-inputs
10142 `(("python-graphql-core" ,python-graphql-core)
10143 ("python-promise" ,python-promise)
10144 ("python-six" ,python-six)))
10145 (home-page "https://github.com/graphql-python/graphql-relay-py")
10146 (synopsis "Relay implementation for Python")
10147 (description
10148 "This is a library to allow the easy creation of Relay-compliant servers
10149using the GraphQL Python reference implementation of a GraphQL server. It
10150should be noted that the code is a exact port of the original
10151@url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
10152from Facebook.")
10153 (license license:expat)))
10154
10155(define-public python2-graphql-relay
10156 (package-with-python2 python-graphql-relay))
10157
10158(define-public python-graphene
10159 (package
10160 (name "python-graphene")
10161 (version "0.10.2")
10162 (source
10163 (origin
10164 (method url-fetch)
10165 (uri (pypi-uri "graphene" version))
10166 (sha256
10167 (base32
10168 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
10169 (build-system python-build-system)
10170 (propagated-inputs
10171 `(("python-graphql-core" ,python-graphql-core)
10172 ("python-graphql-relay" ,python-graphql-relay)
10173 ("python-iso8601" ,python-iso8601)
10174 ("python-promise" ,python-promise)
10175 ("python-six" ,python-six)))
10176 (arguments
10177 `(#:tests? #f)) ; no tests/ in the PyPI tarball
10178 (home-page "http://graphene-python.org/")
10179 (synopsis "GraphQL Framework for Python")
10180 (description
10181 "Graphene is a Python library for building GraphQL schemas/types.
10182A GraphQL schema describes your data model, and provides a GraphQL server
10183with an associated set of resolve methods that know how to fetch data.")
10184 (properties `((python2-variant . ,(delay python2-graphene))))
10185 (license license:expat)))
10186
10187(define-public python2-graphene
10188 (let ((base (package-with-python2
10189 (strip-python2-variant python-graphene))))
10190 (package (inherit base)
10191 (native-inputs
10192 `(("python2-sqlalchemy" ,python2-sqlalchemy)
10193 ,@(package-native-inputs base))))))
10194
10195(define-public python-nautilus
10196 (package
10197 (name "python-nautilus")
10198 (version "0.4.9")
10199 (source
10200 (origin
10201 (method url-fetch)
10202 (uri (pypi-uri "nautilus" version))
10203 (sha256
10204 (base32
10205 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
10206 (build-system python-build-system)
10207 (arguments `(#:tests? #f)) ; fails to import test modules
10208 (propagated-inputs
10209 `(("python-bcrypt" ,python-bcrypt)
10210 ("python-click" ,python-click)
10211 ("python-consul" ,python-consul)
10212 ("python-graphene" ,python-graphene)
10213 ("python-jinja2" ,python-jinja2)
10214 ("python-peewee" ,python-peewee)
10215 ("python-pika" ,python-pika)
10216 ("python-tornado" ,python-tornado)
10217 ("python-wtforms" ,python-wtforms)))
10218 (native-inputs
10219 `(("python-nose2" ,python-nose2)))
10220 (home-page "https://github.com/AlecAivazis/nautilus")
10221 (synopsis "Library for creating microservice applications")
10222 (description
10223 "Nautilus is a framework for flux based microservices that looks to
10224provide extendible implementations of common aspects of a cloud so that you can
10225focus on building massively scalable web applications.")
10226 (license license:expat)))
10227
10228(define-public python-snowballstemmer
10229 (package
10230 (name "python-snowballstemmer")
10231 (version "1.2.1")
10232 (source (origin
10233 (method url-fetch)
10234 (uri (pypi-uri "snowballstemmer" version))
10235 (sha256
10236 (base32
10237 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
10238 (build-system python-build-system)
10239 (arguments
10240 `(;; No tests exist
10241 #:tests? #f))
10242 (home-page "https://github.com/shibukawa/snowball_py")
10243 (synopsis "Snowball stemming library collection for Python")
10244 (description "This package provides 16 word stemmer algorithms generated
10245from Snowball algorithms. It includes the 15 original ones plus the Poerter
10246English stemmer.")
10247 (license license:bsd-3)))
10248
10249(define-public python2-snowballstemmer
10250 (package-with-python2 python-snowballstemmer))
10251
10252(define-public python-sphinx-cloud-sptheme
10253 (package
10254 (name "python-sphinx-cloud-sptheme")
10255 (version "1.8.0")
10256 (source (origin
10257 (method url-fetch)
10258 (uri (pypi-uri "cloud_sptheme" version))
10259 (sha256
10260 (base32
10261 "1dniqb6a39yh786f86c4jn666rwnyi1jvzn4616zhcchb7sfdshd"))))
10262 (build-system python-build-system)
10263 ;; FIXME: The 'pypi' release archive does not contain tests.
10264 (arguments '(#:tests? #f))
10265 (native-inputs
10266 `(("python-sphinx" ,python-sphinx)))
10267 (home-page "https://bitbucket.org/ecollins/cloud_sptheme")
10268 (synopsis "'Cloud' theme for Sphinx documenter")
10269 (description "This package contains the \"Cloud\" theme for Sphinx and some
10270related extensions.")
10271 (license license:bsd-3)))
10272
10273(define-public python2-sphinx-cloud-sptheme
10274 (package-with-python2 python-sphinx-cloud-sptheme))
10275
10276(define-public python-sphinx-alabaster-theme
10277 (package
10278 (name "python-sphinx-alabaster-theme")
10279 (version "0.7.12")
10280 (source (origin
10281 (method url-fetch)
10282 (uri (pypi-uri "alabaster" version))
10283 (sha256
10284 (base32
10285 "00nwwjj2d2ym4s2kk217x7jkx1hnczc3fvm8yxbqmsp6b0nxfqd6"))))
10286 (build-system python-build-system)
10287 (propagated-inputs
10288 `(("python-pygments" ,python-pygments)))
10289 (home-page "https://alabaster.readthedocs.io/")
10290 (synopsis "Configurable sidebar-enabled Sphinx theme")
10291 (description "Alabaster is a visually (c)lean, responsive, configurable
10292theme for the Sphinx documentation system. It's the default theme of Sphinx.")
10293 (license license:bsd-3)))
10294
10295(define-public python2-sphinx-alabaster-theme
10296 (package-with-python2 python-sphinx-alabaster-theme))
10297
10298(define-public python-setproctitle
10299(package
10300 (name "python-setproctitle")
10301 (version "1.1.10")
10302 (source
10303 (origin
10304 (method url-fetch)
10305 (uri (pypi-uri "setproctitle" version))
10306 (sha256
10307 (base32
10308 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
10309 (build-system python-build-system)
10310 (arguments
10311 '(#:phases
10312 (modify-phases %standard-phases
10313 (add-before 'check 'patch-Makefile
10314 ;; Stricly this is only required for the python2 variant.
10315 ;; But adding a phase in an inherited package seems to be
10316 ;; cumbersum. So we patch even for python3.
10317 (lambda _
10318 (let ((nose (assoc-ref %build-inputs "python2-nose")))
10319 (when nose
10320 (substitute* "Makefile"
10321 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
10322 (string-append nose "/bin/nosetests "))))
10323 #t)))
10324 (replace 'check
10325 (lambda _
10326 (setenv "PYTHON" (or (which "python3") (which "python")))
10327 (setenv "PYCONFIG" (or (which "python3-config")
10328 (which "python-config")))
10329 (setenv "CC" "gcc")
10330 ;; No need to extend PYTHONPATH to find the built package, since
10331 ;; the Makefile will build anyway
10332 (invoke "make" "check"))))))
10333 (native-inputs
10334 `(("procps" ,procps))) ; required for tests
10335 (home-page
10336 "https://github.com/dvarrazzo/py-setproctitle")
10337 (synopsis
10338 "Setproctitle implementation for Python to customize the process title")
10339 (description "The library allows a process to change its title (as displayed
10340by system tools such as ps and top).
10341
10342Changing the title is mostly useful in multi-process systems, for
10343example when a master process is forked: changing the children's title
10344allows to identify the task each process is busy with. The technique
10345is used by PostgreSQL and the OpenSSH Server for example.")
10346 (license license:bsd-3)
10347 (properties `((python2-variant . ,(delay python2-setproctitle))))))
10348
10349(define-public python2-setproctitle
10350 (let ((base (package-with-python2
10351 (strip-python2-variant python-setproctitle))))
10352 (package
10353 (inherit base)
10354 (native-inputs `(("python2-nose" ,python2-nose)
10355 ,@(package-native-inputs base))))))
10356
10357(define-public python-validictory
10358 (package
10359 (name "python-validictory")
10360 (version "1.0.1")
10361 (source
10362 (origin
10363 (method url-fetch)
10364 (uri (pypi-uri "validictory" version))
10365 (sha256
10366 (base32
10367 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
10368 (build-system python-build-system)
10369 (arguments
10370 '(#:phases
10371 (modify-phases %standard-phases
10372 (add-after 'unpack 'bootstrap
10373 ;; Move the tests out of the package directory to avoid
10374 ;; packaging them.
10375 (lambda* _
10376 (rename-file "validictory/tests" "tests")
10377 (delete-file "tests/__init__.py")))
10378 (replace 'check
10379 (lambda _
10380 ;; Extend PYTHONPATH so the built package will be found.
10381 (setenv "PYTHONPATH"
10382 (string-append (getcwd) "/build/lib:"
10383 (getenv "PYTHONPATH")))
6568bd5d 10384 (invoke "py.test" "-vv" ))))))
44d10b1f
RW
10385 (native-inputs
10386 `(("python-pytest" ,python-pytest)))
10387 (home-page
10388 "https://github.com/jamesturk/validictory")
10389 (synopsis "General purpose Python data validator")
10390 (description "It allows validation of arbitrary Python data structures.
10391
10392The schema format is based on the JSON Schema
10393proposal (http://json-schema.org), so combined with json the library is also
10394useful as a validator for JSON data.")
10395 (license license:expat)))
10396
10397(define-public python2-validictory
10398 (package-with-python2 python-validictory))
10399
10400(define-public python-pyelftools
10401 (package
10402 (name "python-pyelftools")
10403 (version "0.25")
10404 (source
10405 (origin
10406 (method url-fetch)
10407 (uri (pypi-uri "pyelftools" version))
10408 (sha256
10409 (base32
10410 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
10411 (build-system python-build-system)
10412 (arguments
10413 `(#:phases
10414 (modify-phases %standard-phases
10415 (add-before 'check 'set-pythonpath
10416 (lambda _
10417 (setenv "PYTHONPATH"
10418 (string-append
10419 (getcwd) "/test/"
10420 ":" (getenv "PYTHONPATH")))
10421 #t)))))
10422 (home-page
10423 "https://github.com/eliben/pyelftools")
10424 (synopsis
10425 "Analyze binary and library file information")
10426 (description "This Python library provides interfaces for parsing and
10427analyzing two binary and library file formats; the Executable and Linking
10428Format (ELF), and debugging information in the Debugging With Attributed
10429Record Format (DWARF).")
10430 (license license:public-domain)))
10431
10432(define-public python-pyev
10433 (package
10434 (name "python-pyev")
10435 (version "0.9.0")
10436 (source
10437 (origin
10438 (method url-fetch)
10439 (uri (pypi-uri "pyev" version))
10440 (sha256
10441 (base32
10442 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
10443 (build-system python-build-system)
10444 (arguments
10445 `(#:tests? #f ; no test suite
10446 #:phases
10447 (modify-phases %standard-phases
10448 (add-after 'unpack 'patch
10449 (lambda* (#:key inputs #:allow-other-keys)
10450 (let ((libev (string-append (assoc-ref inputs "libev")
10451 "/lib/libev.so.4")))
10452 (substitute* "setup.py"
10453 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
10454 (string-append "libev_dll_name = \"" libev "\"")))))))))
10455 (inputs
10456 `(("libev" ,libev)))
10457 (home-page "http://pythonhosted.org/pyev/")
10458 (synopsis "Python libev interface")
10459 (description "Pyev provides a Python interface to libev.")
10460 (license license:gpl3)))
10461
10462(define-public python2-pyev
10463 (package-with-python2 python-pyev))
10464
10465(define-public python-imagesize
10466 (package
10467 (name "python-imagesize")
10468 (version "1.1.0")
10469 (source
10470 (origin
10471 (method url-fetch)
10472 (uri (pypi-uri "imagesize" version))
10473 (sha256
10474 (base32
10475 "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk"))))
10476 (build-system python-build-system)
10477 (home-page "https://github.com/shibukawa/imagesize_py")
10478 (synopsis "Gets image size of files in various formats in Python")
10479 (description
10480 "This package allows determination of image size from
10481PNG, JPEG, JPEG2000 and GIF files in pure Python.")
10482 (license license:expat)))
10483
10484(define-public python2-imagesize
10485 (package-with-python2 python-imagesize))
10486
10487(define-public python-termstyle
10488 (package
10489 (name "python-termstyle")
10490 (version "0.1.11")
10491 (source
10492 (origin
10493 (method url-fetch)
10494 (uri (pypi-uri "termstyle" version))
10495 (sha256
10496 (base32
10497 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
10498 (build-system python-build-system)
10499 (arguments
10500 '(#:phases
10501 (modify-phases %standard-phases
10502 (replace 'check
10503 (lambda _
831080a6 10504 (invoke "python" "test3.py"))))))
44d10b1f
RW
10505 (home-page "https://github.com/gfxmonk/termstyle")
10506 (synopsis "Console text coloring for Python")
10507 (description "This package provides console text coloring for Python.")
10508 (license license:bsd-3)))
10509
10510(define-public python-argcomplete
10511 (package
10512 (name "python-argcomplete")
10513 (version "1.7.0")
10514 (source
10515 (origin
10516 (method url-fetch)
10517 (uri (pypi-uri "argcomplete" version))
10518 (sha256
10519 (base32
10520 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
10521 (build-system python-build-system)
10522 (native-inputs
10523 `(("python-pexpect" ,python-pexpect)
10524 ("tcsh" ,tcsh)
10525 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
10526 (home-page "https://github.com/kislyuk/argcomplete")
10527 (synopsis "Shell tab completion for Python argparse")
10528 (description "argcomplete provides extensible command line tab completion
10529of arguments and options for Python scripts using @code{argparse}. It's
10530particularly useful for programs with many options or sub-parsers that can
10531dynamically suggest completions; for example, when browsing resources over the
10532network.")
10533 (license license:asl2.0)))
10534
10535(define-public python2-argcomplete
10536 (package-with-python2 python-argcomplete))
10537
10538(define-public python-xopen
10539 (package
10540 (name "python-xopen")
10541 (version "0.3.3")
10542 (source
10543 (origin
10544 (method url-fetch)
10545 (uri (pypi-uri "xopen" version))
10546 (sha256
10547 (base32
10548 "1a0wbil552wsmklwd89ssmgz3pjd86qa9i7jh8wqb9wslc8a2qjr"))
10549 (file-name (string-append name "-" version ".tar.gz"))))
10550 (build-system python-build-system)
10551 (home-page "https://github.com/marcelm/xopen/")
10552 (synopsis "Open compressed files transparently")
10553 (description "This module provides an @code{xopen} function that works like
10554Python's built-in @code{open} function, but can also deal with compressed files.
10555Supported compression formats are gzip, bzip2 and, xz, and are automatically
10556recognized by their file extensions. The focus is on being as efficient as
10557possible on all supported Python versions.")
10558 (license license:expat)))
10559
10560(define-public python2-xopen
10561 (let ((base (package-with-python2
10562 (strip-python2-variant python-xopen))))
10563 (package
10564 (inherit base)
10565 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
10566 ,@(package-propagated-inputs base))))))
10567
10568(define-public python-cheetah
10569 (package
10570 (name "python-cheetah")
10571 (version "3.1.0")
10572 (source
10573 (origin
10574 (method url-fetch)
10575 (uri (pypi-uri "Cheetah3" version))
10576 (sha256
10577 (base32
10578 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
10579 (build-system python-build-system)
10580 (arguments
10581 `(#:modules ((guix build utils)
10582 (guix build python-build-system)
10583 (ice-9 ftw)
10584 (srfi srfi-1)
10585 (srfi srfi-26))
10586 #:phases (modify-phases %standard-phases
10587 (add-after 'unpack 'use-absolute-python
10588 (lambda _
10589 (substitute* "Cheetah/CheetahWrapper.py"
10590 (("#!/usr/bin/env python")
10591 (string-append "#!" (which "python"))))
10592 #t))
10593 (replace 'check
10594 (lambda _
10595 (let ((cwd (getcwd)))
10596 (setenv "PYTHONPATH"
10597 (string-append
10598 cwd "/build/"
10599 (find (cut string-prefix? "lib" <>)
10600 (scandir (string-append cwd "/build")))
10601 ":" (getenv "PYTHONPATH")))
10602 (setenv "PATH"
10603 (string-append (getenv "PATH")
10604 ":" cwd "/bin"))
10605 (setenv "TMPDIR" "/tmp")
10606
10607 (substitute* "Cheetah/Tests/Test.py"
10608 (("unittest.TextTestRunner\\(\\)")
10609 "unittest.TextTestRunner(verbosity=2)"))
10610
10611 (invoke "python" "Cheetah/Tests/Test.py")))))))
10612 (propagated-inputs
10613 `(("python-markdown" ,python-markdown))) ;optional
10614 (home-page "http://cheetahtemplate.org/")
10615 (synopsis "Template engine")
10616 (description "Cheetah is a text-based template engine and Python code
10617generator.
10618
10619Cheetah can be used as a standalone templating utility or referenced as
10620a library from other Python applications. It has many potential uses,
10621but web developers looking for a viable alternative to ASP, JSP, PHP and
10622PSP are expected to be its principle user group.
10623
10624Features:
10625@enumerate
10626@item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
10627 text-based format.
10628@item Cleanly separates content, graphic design, and program code.
10629@item Blends the power and flexibility of Python with a simple template language
10630 that non-programmers can understand.
10631@item Gives template writers full access to any Python data structure, module,
10632 function, object, or method in their templates.
10633@item Makes code reuse easy by providing an object-orientated interface to
10634 templates that is accessible from Python code or other Cheetah templates.
10635 One template can subclass another and selectively reimplement sections of it.
10636@item Provides a simple, yet powerful, caching mechanism that can dramatically
10637 improve the performance of a dynamic website.
10638@item Compiles templates into optimized, yet readable, Python code.
10639@end enumerate")
10640 (license (license:x11-style "file://LICENSE"))))
10641
10642(define-public python2-cheetah
10643 (package-with-python2 python-cheetah))
10644
10645(define-public python-dulwich
10646 (package
10647 (name "python-dulwich")
10648 (version "0.18.6")
10649 (source
10650 (origin
10651 (method url-fetch)
10652 (uri (list (string-append "https://www.dulwich.io/releases/"
10653 "dulwich-" version ".tar.gz")
10654 (pypi-uri "dulwich" version)))
10655 (sha256
10656 (base32
10657 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
10658 (build-system python-build-system)
10659 (arguments
10660 `(#:phases
10661 (modify-phases %standard-phases
10662 (add-before 'check 'fix-tests
10663 (lambda* (#:key inputs #:allow-other-keys)
10664 ;; The tests use Popen with a custom environment which doesn't
10665 ;; include PATH.
10666 (substitute* "dulwich/tests/compat/utils.py"
10667 (("'git'") (string-append "'"
10668 (which "git")
10669 "'")))
10670 (substitute* '("dulwich/tests/test_repository.py"
10671 "dulwich/tests/test_hooks.py")
10672 (("#!/bin/sh") (string-append "#!" (which "sh"))))
10673 (setenv "TEST_RUNNER" "unittest")
10674 (setenv "PYTHONHASHSEED" "random")
10675 #t)))))
10676 (propagated-inputs
10677 `(("python-fastimport" ,python-fastimport)))
10678 (native-inputs
10679 `(("python-mock" ,python-mock)
10680 ("python-geventhttpclient" ,python-geventhttpclient)
10681 ("git" ,git)))
10682 (home-page "https://www.dulwich.io/")
10683 (synopsis "Git implementation in Python")
10684 (description "Dulwich is an implementation of the Git file formats and
10685protocols written in pure Python.")
10686 ;; Can be used with either license.
10687 (license (list license:asl2.0 license:gpl2+))))
10688
10689(define-public python2-dulwich
10690 (package-with-python2 python-dulwich))
10691
10692(define-public python-pbkdf2
10693 (package
10694 (name "python-pbkdf2")
10695 (version "1.3")
10696 (source
10697 (origin
10698 (method url-fetch)
10699 (uri (pypi-uri "pbkdf2" version))
10700 (sha256
10701 (base32
10702 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
10703 (build-system python-build-system)
10704 (arguments
10705 '(#:phases
10706 (modify-phases %standard-phases
10707 (replace 'check
10708 (lambda _
10709 (setenv "PYTHONPATH"
10710 (string-append (getcwd) "/build/lib:"
10711 (getenv "PYTHONPATH")))
ee2bb944 10712 (invoke "python" "test/test_pbkdf2.py"))))))
44d10b1f
RW
10713 (propagated-inputs
10714 `(("python-pycrypto" ,python-pycrypto))) ; optional
10715 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
10716 (synopsis "Password-based key derivation")
10717 (description "This module implements the password-based key derivation
10718function, PBKDF2, specified in RSA PKCS#5 v2.0.
10719
10720PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
10721is part of the RSA Public Key Cryptography Standards series. The provided
10722implementation takes a password or a passphrase and a salt value (and
10723optionally a iteration count, a digest module, and a MAC module) and provides
10724a file-like object from which an arbitrarly-sized key can be read.")
10725 (license license:expat)))
10726
10727(define-public python2-pbkdf2
10728 (package-with-python2 python-pbkdf2))
10729
10730(define-public python-qrcode
10731 (package
10732 (name "python-qrcode")
10733 (version "6.0")
10734 (source
10735 (origin
10736 (method url-fetch)
10737 (uri (pypi-uri "qrcode" version))
10738 (sha256
10739 (base32
10740 "1gz1g2n9kqwqkak78aavr354z1v3yyiksk7q6xp5hi1zr6s0syq3"))))
10741 (build-system python-build-system)
10742 (arguments
10743 ;; FIXME: Tests require packaging 'pymaging'.
10744 '(#:tests? #f))
10745 (propagated-inputs
10746 `(("python-lxml" ,python-lxml) ; for SVG output
10747 ("python-pillow" ,python-pillow) ; for PNG output
10748 ("python-six" ,python-six)))
10749 (inputs
10750 `(;; The setup.cfg file needs to be used, and support for this requires
10751 ;; at least version 30.3.0 of setuptools
10752 ("python-setuptools" ,python-setuptools)))
10753 (home-page "https://github.com/lincolnloop/python-qrcode")
10754 (synopsis "QR Code image generator")
10755 (description "This package provides a pure Python QR Code generator
10756module. It uses the Python Imaging Library (PIL) to allow for the generation
10757of QR Codes.
10758
10759In addition this package provides a command line tool to generate QR codes and
10760either write these QR codes to a file or do the output as ascii art at the
10761console.")
10762 (license license:bsd-3)))
10763
10764(define-public python2-qrcode
10765 (package-with-python2 python-qrcode))
10766
10767(define-public python-rst2ansi
10768 (package
10769 (name "python-rst2ansi")
10770 (version "0.1.5")
10771 (source
10772 (origin
10773 (method url-fetch)
10774 (uri (pypi-uri "rst2ansi" version))
10775 (sha256
10776 (base32
10777 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
10778 (build-system python-build-system)
10779 (propagated-inputs
10780 `(("python-docutils" ,python-docutils)))
10781 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
10782 (synopsis "Convert RST to ANSI-decorated console output")
10783 (description
10784 "Python module dedicated to rendering RST (reStructuredText) documents
10785to ansi-escaped strings suitable for display in a terminal.")
10786 (license license:expat)))
10787
10788(define-public python-ansi2html
10789 (package
10790 (name "python-ansi2html")
10791 (version "1.2.0")
10792 (source
10793 (origin
10794 (method url-fetch)
10795 (uri (pypi-uri "ansi2html" version))
10796 (sha256
10797 (base32
10798 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
10799 (build-system python-build-system)
10800 (native-inputs
10801 `(("python-mock" ,python-mock)
10802 ("python-nose" ,python-nose)))
10803 (propagated-inputs
10804 `(("python-six" ,python-six)))
10805 (home-page "https://github.com/ralphbean/ansi2html")
10806 (synopsis "Convert ANSI-decorated console output to HTML")
10807 (description
10808 "@command{ansi2html} is a Python library and command line utility for
10809convering text with ANSI color codes to HTML or LaTeX.")
10810 (license license:gpl3+)))
10811
10812(define-public python2-ansi2html
10813 (package-with-python2 python-ansi2html))
10814
10815(define-public python-ddt
10816 (package
10817 (name "python-ddt")
10818 (version "1.1.3")
10819 (source
10820 (origin
10821 (method url-fetch)
10822 (uri (pypi-uri "ddt" version))
10823 (sha256
10824 (base32
10825 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
10826 (build-system python-build-system)
10827 (native-inputs
10828 `(("python-mock" ,python-mock)
10829 ("python-nose" ,python-nose)))
10830 (propagated-inputs
10831 `(("python-six" ,python-six)
10832 ("python-pyyaml" ,python-pyyaml)))
10833 (home-page "https://github.com/txels/ddt")
10834 (synopsis "Data-Driven Tests")
10835 (description
10836 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
10837running it with different test data, and make it appear as multiple test
10838cases.")
10839 (license license:expat)))
10840
10841(define-public python2-ddt
10842 (package-with-python2 python-ddt))
10843
10844(define-public python-pycountry
10845 (package
10846 (name "python-pycountry")
10847 (version "18.5.26")
10848 (source
10849 (origin
10850 (method url-fetch)
10851 (uri (pypi-uri "pycountry" version))
10852 (sha256
10853 (base32
10854 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
10855 (build-system python-build-system)
10856 (home-page "https://bitbucket.org/flyingcircus/pycountry")
10857 (synopsis "ISO databases for languages, countries, currencies, etc.")
10858 (description
10859 "@code{pycountry} provides the ISO databases for the standards:
10860@enumerate
10861@item 639-3 (Languages)
10862@item 3166 (Countries)
10863@item 3166-3 (Deleted Countries)
10864@item 3166-2 (Subdivisions of countries)
10865@item 4217 (Currencies)
10866@item 15924 (Scripts)
10867@end enumerate
10868It includes a copy from Debian’s pkg-isocodes and makes the data accessible
10869through a Python API.")
10870 (license license:lgpl2.1+)))
10871
10872(define-public python2-pycountry
10873 (package-with-python2 python-pycountry))
10874
10875(define-public python-pycosat
10876 (package
10877 (name "python-pycosat")
10878 (version "0.6.1")
10879 (source
10880 (origin
10881 (method url-fetch)
10882 (uri (pypi-uri "pycosat" version))
10883 (sha256
10884 (base32
10885 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
10886 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
10887 (build-system python-build-system)
10888 (home-page "https://github.com/ContinuumIO/pycosat")
10889 (synopsis "Bindings to picosat (a SAT solver)")
10890 (description
10891 "This package provides efficient Python bindings to @code{picosat} on
10892the C level. When importing pycosat, the @code{picosat} solver becomes part
10893of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
10894Problem} (SAT) solver.")
10895 (license license:expat)))
10896
10897(define-public python2-pycosat
10898 (package-with-python2 python-pycosat))
10899
10900(define-public python2-ruamel.ordereddict
10901 (package
10902 (name "python2-ruamel.ordereddict")
10903 (version "0.4.9")
10904 (source
10905 (origin
10906 (method url-fetch)
10907 (uri (pypi-uri "ruamel.ordereddict" version))
10908 (sha256
10909 (base32
10910 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
10911 (build-system python-build-system)
10912 (arguments
10913 `(#:python ,python-2
10914 #:phases
10915 (modify-phases %standard-phases
10916 (delete 'check)
10917 (add-after 'install 'check
10918 (lambda* (#:key inputs outputs #:allow-other-keys)
10919 (add-installed-pythonpath inputs outputs)
f987ac30 10920 (invoke "python" "test/testordereddict.py"))))))
44d10b1f
RW
10921 (home-page "https://bitbucket.org/ruamel/ordereddict")
10922 (synopsis "Version of dict that keeps keys in insertion order")
10923 (description
10924 "This is an implementation of an ordered dictionary with @dfn{Key
10925Insertion Order} (KIO: updates of values do not affect the position of the
10926key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
10927removed and put at the back). The standard library module @code{OrderedDict},
10928implemented later, implements a subset of @code{ordereddict} functionality.
10929Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
10930Order} (KSO, no sorting function can be specified, but a transform can be
10931specified to apply on the key before comparison (e.g. @code{string.lower})).")
10932 (license license:expat)))
10933
10934(define-public python-pypeg2
10935 (package
10936 (name "python-pypeg2")
10937 (version "2.15.2")
10938 (source
10939 (origin
10940 (method url-fetch)
10941 (uri (pypi-uri "pyPEG2" version))
10942 (sha256
10943 (base32
10944 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
10945 (build-system python-build-system)
10946 (propagated-inputs `(("python-lxml" ,python-lxml)))
10947 (arguments
10948 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
10949 '(#:tests? #f))
10950 (home-page "https://fdik.org/pyPEG/")
10951 (synopsis "Parsering Expression Grammars in Python")
10952 (description "PyPEG is an intrinsic parser interpreter framework for
10953Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
10954parse many formal languages.")
10955 (license license:gpl2)))
10956
10957(define-public python-incremental
10958 (package
10959 (name "python-incremental")
10960 (version "17.5.0")
10961 (source
10962 (origin
10963 (method url-fetch)
10964 (uri (pypi-uri "incremental" version))
10965 (sha256
10966 (base32
10967 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
10968 (build-system python-build-system)
10969 (home-page "https://github.com/hawkowl/incremental")
10970 (synopsis "Library for versioning Python projects")
10971 (description "Incremental is a small library that versions your Python
10972projects.")
10973 (license license:expat)))
10974
10975(define-public python2-incremental
10976 (package-with-python2 python-incremental))
10977
10978(define-public python-invoke
10979 (package
10980 (name "python-invoke")
10981 (home-page "http://www.pyinvoke.org/")
10982 (version "1.1.0")
10983 (source (origin
10984 (method url-fetch)
10985 (uri (pypi-uri "invoke" version))
10986 (sha256
10987 (base32
10988 "0aiy1xvk1f91246zxd1zqrm679vdvd10h843a2na41cqr3cflpi6"))))
10989 (build-system python-build-system)
10990 (arguments
10991 ;; XXX: Requires many dependencies that are not yet in Guix.
10992 `(#:tests? #f))
10993 (synopsis "Pythonic task execution")
10994 (description
10995 "Invoke is a Python task execution tool and library, drawing inspiration
10996from various sources to arrive at a powerful and clean feature set. It is
10997evolved from the Fabric project, but focuses on local and abstract concerns
10998instead of servers and network commands.")
10999 (license license:bsd-3)))
11000
11001(define-public python2-invoke
11002 (package-with-python2 python-invoke))
11003
11004(define-public python-automat
11005 (package
11006 (name "python-automat")
11007 (version "0.6.0")
11008 (source (origin
11009 (method url-fetch)
11010 (uri (pypi-uri "Automat" version))
11011 (sha256
11012 (base32
11013 "1a7nsrljysfmdqmpn2apfa1gg6rfah4y9sizvns8gb08rx7d07rw"))))
11014 (build-system python-build-system)
11015 ;; We disable the tests because they require python-twisted, while
11016 ;; python-twisted depends on python-automat. Twisted is optional, but the
11017 ;; tests fail if it is not available. Also see
11018 ;; <https://github.com/glyph/automat/issues/71>.
11019 (arguments '(#:tests? #f))
11020 (native-inputs
11021 `(("python-m2r" ,python-m2r)
11022 ("python-setuptools-scm" ,python-setuptools-scm)
11023 ("python-graphviz" ,python-graphviz)))
11024 (propagated-inputs
11025 `(("python-six" ,python-six)
11026 ("python-attrs" ,python-attrs)))
11027 (home-page "https://github.com/glyph/Automat")
11028 (synopsis "Self-service finite-state machines")
11029 (description "Automat is a library for concise, idiomatic Python
11030expression of finite-state automata (particularly deterministic finite-state
11031transducers).")
11032 (license license:expat)))
11033
11034(define-public python2-automat
11035 (package-with-python2 python-automat))
11036
11037(define-public python-m2r
11038 (package
11039 (name "python-m2r")
11040 (version "0.1.12")
11041 (source (origin
11042 (method url-fetch)
11043 (uri (pypi-uri "m2r" version))
11044 (sha256
11045 (base32
11046 "1axrwnf425sz4qz3c0qc7yhhki4myzb8rki7pczcsgzznzmqdyxd"))))
11047 (build-system python-build-system)
11048 (propagated-inputs
11049 `(("python-docutils" ,python-docutils)
11050 ("python-mistune" ,python-mistune)))
11051 (native-inputs
11052 `(("python-pygments" ,python-pygments)
11053 ("python-mock" ,python-mock)))
11054 (home-page "https://github.com/miyakogi/m2r")
11055 (synopsis "Markdown to reStructuredText converter")
11056 (description "M2R converts a markdown file including reST markups to valid
11057reST format.")
11058 (license license:expat)))
11059
11060(define-public python2-m2r
11061 (package-with-python2 python-m2r))
11062
11063(define-public python-constantly
11064 (package
11065 (name "python-constantly")
11066 (version "15.1.0")
11067 (source (origin
11068 (method url-fetch)
11069 (uri (pypi-uri "constantly" version))
11070 (sha256
11071 (base32
11072 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
11073 (build-system python-build-system)
11074 (home-page "https://github.com/twisted/constantly")
11075 (synopsis "Symbolic constants in Python")
11076 (description "Constantly is a Python library that provides symbolic
11077constant support. It includes collections and constants with text, numeric,
11078and bit flag values.")
11079 (license license:expat)))
11080
11081(define-public python2-constantly
11082 (package-with-python2 python-constantly))
11083
11084(define-public python-attrs
11085 (package
11086 (name "python-attrs")
11087 (version "18.2.0")
11088 (source (origin
11089 (method url-fetch)
11090 (uri (pypi-uri "attrs" version))
11091 (sha256
11092 (base32
11093 "0s9ydh058wmmf5v391pym877x4ahxg45dw6a0w4c7s5wgpigdjqh"))))
11094 (build-system python-build-system)
11095 (arguments
11096 `(#:modules ((guix build utils)
11097 (guix build python-build-system)
11098 (ice-9 ftw)
11099 (srfi srfi-1)
11100 (srfi srfi-26))
11101 #:phases (modify-phases %standard-phases
11102 (replace 'check
11103 (lambda _
11104 (let ((cwd (getcwd)))
11105 (setenv "PYTHONPATH"
11106 (string-append
11107 cwd "/build/"
11108 (find (cut string-prefix? "lib" <>)
11109 (scandir (string-append cwd "/build")))
11110 ":"
11111 (getenv "PYTHONPATH")))
11112 (invoke "python" "-m" "pytest")))))))
11113 (native-inputs
11114 `(("python-coverage" ,python-coverage)
11115 ("python-hypothesis" ,python-hypothesis)
11116 ("python-pympler" ,python-pympler)
11117 ("python-pytest" ,python-pytest)
11118 ("python-six" ,python-six)
11119 ("python-sphinx" ,python-sphinx)
11120 ("python-zope-interface" ,python-zope-interface)))
11121 (home-page "https://github.com/python-attrs/attrs/")
11122 (synopsis "Attributes without boilerplate")
11123 (description "@code{attrs} is a Python package with class decorators that
11124ease the chores of implementing the most common attribute-related object
11125protocols.")
11126 (license license:expat)))
11127
11128(define-public python2-attrs
11129 (package-with-python2 python-attrs))
11130
11131(define-public python-attrs-bootstrap
11132 (package
11133 (inherit python-attrs)
11134 (name "python-attrs-bootstrap")
11135 ;; Keep this on a fixed version so python-attrs can be updated without
11136 ;; triggering a mass-rebuild. FIXME: Update this in the next rebuild cycle.
11137 (version "17.4.0")
11138 (source (origin
11139 (method url-fetch)
11140 (uri (pypi-uri "attrs" version))
11141 (sha256
11142 (base32
11143 "1jafnn1kzd6qhxgprhx6y6ik1r5m2rilx25syzcmq03azp660y8w"))))
11144 (native-inputs `())
11145 (arguments `(#:tests? #f))))
11146
11147(define-public python2-attrs-bootstrap
11148 (package-with-python2 python-attrs-bootstrap))
11149
11150(define-public python2-cliapp
11151 (package
11152 (name "python2-cliapp")
11153 (version "1.20170823")
11154 (source
11155 (origin
11156 (method url-fetch)
11157 (uri (string-append
11158 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
11159 version ".tar.gz"))
11160 (sha256
11161 (base32
11162 "1i9gik0xrj6jmi95s5w988jl1y265baz5xm5pbqdyvsh8h9ln6yq"))))
11163 (build-system python-build-system)
11164 (arguments
11165 `(#:python ,python-2
11166 #:phases
11167 (modify-phases %standard-phases
11168 ;; check phase needs to be run before the build phase. If not,
11169 ;; coverage-test-runner looks for tests for the built source files,
11170 ;; and fails.
11171 (delete 'check)
11172 (add-before 'build 'check
11173 (lambda _
11174 ;; Disable python3 tests
11175 (substitute* "check"
11176 (("python3") "# python3"))
6c826d32 11177 (invoke "./check"))))))
44d10b1f
RW
11178 (native-inputs
11179 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
11180 ("python2-pep8" ,python2-pep8)))
11181 (propagated-inputs
11182 `(("python2-pyaml" ,python2-pyaml)))
11183 (home-page "https://liw.fi/cliapp/")
11184 (synopsis "Python framework for command line programs")
11185 (description "@code{python2-cliapp} is a python framework for
11186command line programs. It contains the typical stuff such programs
11187need to do, such as parsing the command line for options, and
11188iterating over input files.")
11189 (license license:gpl2+)))
11190
11191(define-public python2-ttystatus
11192 (package
11193 (name "python2-ttystatus")
11194 (version "0.35")
11195 (source
11196 (origin
11197 (method url-fetch)
11198 (uri (string-append
11199 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
11200 version ".tar.gz"))
11201 (sha256
11202 (base32
11203 "0vivqbw7ddhsq1zj3g9cvvv4f0phl0pis2smsnwcr2szz2fk3hl6"))))
11204 (build-system python-build-system)
11205 (native-inputs
11206 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
11207 ("python2-pep8" ,python2-pep8)))
11208 (arguments
11209 `(#:python ,python-2
11210 #:phases
11211 (modify-phases %standard-phases
11212 ;; check phase needs to be run before the build phase. If not,
11213 ;; coverage-test-runner looks for tests for the built source files,
11214 ;; and fails.
11215 (delete 'check)
11216 (add-before 'build 'check
cbeee881 11217 (lambda _ (invoke "make" "check"))))))
44d10b1f
RW
11218 (home-page "https://liw.fi/ttystatus/")
11219 (synopsis "Python library for showing progress reporting and
11220status updates on terminals")
11221 (description "@code{python2-ttystatus} is a python library for
11222showing progress reporting and status updates on terminals, for
11223command line programs. Output is automatically adapted to the width
11224of the terminal: truncated if it does not fit, and resized if the
11225terminal size changes.")
11226 (license license:gpl3+)))
11227
11228(define-public python2-tracing
11229 (package
11230 (name "python2-tracing")
11231 (version "0.10")
11232 (source
11233 (origin
11234 (method url-fetch)
11235 (uri (string-append
11236 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
11237 version ".tar.gz"))
11238 (sha256
11239 (base32
11240 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
11241 (build-system python-build-system)
11242 (arguments
11243 `(#:python ,python-2))
11244 (home-page "https://liw.fi/tracing/")
11245 (synopsis "Python debug logging helper")
11246 (description "@code{python2-tracing} is a python library for
11247logging debug messages. It provides a way to turn debugging messages
11248on and off, based on the filename they occur in. It is much faster
11249than using @code{logging.Filter} to accomplish the same thing, which
11250matters when code is run in production mode. The actual logging still
11251happens using the @code{logging} library.")
11252 (license license:gpl3+)))
11253
11254(define-public python2-larch
11255 (package
11256 (name "python2-larch")
11257 (version "1.20151025")
11258 (source
11259 (origin
11260 (method url-fetch)
11261 (uri (string-append
11262 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
11263 version ".tar.gz"))
11264 (patches (search-patches
11265 "python2-larch-coverage-4.0a6-compatibility.patch"))
11266 (sha256
11267 (base32
11268 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
11269 (build-system python-build-system)
11270 (arguments
11271 `(#:python ,python-2
11272 #:phases
11273 (modify-phases %standard-phases
11274 ;; check phase needs to be run before the build phase. If not,
11275 ;; coverage-test-runner looks for tests for the built source files,
11276 ;; and fails.
11277 (delete 'check)
11278 (add-before 'build 'check
204ad455 11279 (lambda _ (invoke "make" "check"))))))
44d10b1f
RW
11280 (native-inputs
11281 `(("cmdtest" ,cmdtest)
11282 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
11283 (propagated-inputs
11284 `(("python2-tracing" ,python2-tracing)))
11285 (home-page "https://liw.fi/larch/")
11286 (synopsis "Python copy-on-write B-tree library")
11287 (description "@code{python2-larch} is an implementation of
11288particular kind of B-tree, based on research by Ohad Rodeh. See
11289@url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
11290on the data structure.
11291
11292The distinctive feature of this B-tree is that a node is never
11293(conceptually) modified. Instead, all updates are done by
11294copy-on-write. This makes it easy to clone a tree, and modify only the
11295clone, while other processes access the original tree.")
11296 (license license:gpl3+)))
11297
11298(define-public python-astroid
11299 (package
11300 (name "python-astroid")
11301 (version "2.1.0")
11302 (source
11303 (origin
11304 (method url-fetch)
11305 (uri (pypi-uri "astroid" version))
11306 (sha256
11307 (base32
11308 "08hz675knh4294bancdapql392fmbjyimhbyrmfkz1ka7l035c1m"))))
11309 (build-system python-build-system)
11310 (propagated-inputs
11311 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
11312 ("python-six" ,python-six)
11313 ("python-wrapt" ,python-wrapt)))
11314 (native-inputs
11315 `(("python-dateutil" ,python-dateutil)
11316 ("python-nose" ,python-nose)
11317 ("python-pytest" ,python-pytest)
11318 ("python-pytest-runner" ,python-pytest-runner)))
11319 (arguments
11320 `(#:phases
11321 (modify-phases %standard-phases
11322 (add-after 'unpack 'remove-spurious-test
11323 (lambda _
11324 ;; This can be removed after upgrading from python-3.7
11325 ;; https://github.com/PyCQA/astroid/issues/593
11326 ;; https://bugs.python.org/issue34056
11327 (delete-file "astroid/tests/unittest_modutils.py")
11328 #t))
11329 (replace 'check
11330 (lambda _
11331 (invoke "pytest" "astroid"))))))
11332 (home-page "https://github.com/PyCQA/astroid")
11333 (synopsis "Common base representation of python source code for pylint and
11334other projects")
11335 (description "@code{python-astroid} provides a common base representation
11336of python source code for projects such as pychecker, pyreverse, pylint, etc.
11337
11338It provides a compatible representation which comes from the _ast module. It
11339rebuilds the tree generated by the builtin _ast module by recursively walking
11340down the AST and building an extended ast. The new node classes have
11341additional methods and attributes for different usages. They include some
11342support for static inference and local name scopes. Furthermore, astroid
11343builds partial trees by inspecting living objects.")
11344 (license license:lgpl2.1+)
11345 (properties `((python2-variant . ,(delay python2-astroid))))))
11346
11347(define-public python2-astroid
11348 (let ((base (package-with-python2
11349 (strip-python2-variant python-astroid))))
11350 (package (inherit base)
11351 ;; Version 2.x removes python2 support.
11352 (version "1.6.5")
11353 (source
11354 (origin
11355 (method url-fetch)
11356 (uri (pypi-uri "astroid" version))
11357 (sha256
11358 (base32
11359 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
11360 (arguments
11361 (substitute-keyword-arguments (package-arguments base)
11362 ((#:phases phases)
11363 `(modify-phases ,phases
11364 (add-after 'unpack 'remove-spurious-test
11365 (lambda _
11366 ;; https://github.com/PyCQA/astroid/issues/276
11367 (delete-file "astroid/tests/unittest_brain.py")
11368 #t))
11369 (replace 'check
11370 (lambda _
11371 (invoke"python" "-m" "unittest" "discover"
11372 "-p" "unittest*.py")))))))
11373 (native-inputs `())
11374 (propagated-inputs
11375 `(("python2-backports-functools-lru-cache"
11376 ,python2-backports-functools-lru-cache)
11377 ("python2-enum34" ,python2-enum34)
11378 ("python2-singledispatch" ,python2-singledispatch)
11379 ,@(package-propagated-inputs base))))))
11380
11381(define-public python-isort
11382 (package
11383 (name "python-isort")
e2227b6a 11384 (version "4.3.4")
44d10b1f
RW
11385 (source
11386 (origin
e2227b6a
EF
11387 (method git-fetch)
11388 (uri (git-reference
11389 ;; Tests pass only from the Github sources
11390 (url "https://github.com/timothycrosley/isort")
11391 (commit version)))
11392 (file-name (git-file-name name version))
44d10b1f
RW
11393 (sha256
11394 (base32
e2227b6a 11395 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
44d10b1f
RW
11396 (build-system python-build-system)
11397 (native-inputs
11398 `(("python-mock" ,python-mock)
11399 ("python-pytest" ,python-pytest)))
11400 (home-page "https://github.com/timothycrosley/isort")
11401 (synopsis "Python utility/library to sort python imports")
11402 (description "@code{python-isort} is a python utility/library to sort
11403imports alphabetically, and automatically separated into sections. It
11404provides a command line utility, a python library and plugins for various
11405editors.")
e2227b6a
EF
11406 (license license:expat)
11407 (properties `((python2-variant . ,(delay python2-isort))))))
44d10b1f
RW
11408
11409(define-public python2-isort
e2227b6a
EF
11410 (let ((base (package-with-python2
11411 (strip-python2-variant python-isort))))
11412 (package (inherit base)
11413 (native-inputs
11414 `(("python2-futures" ,python2-futures)
11415 ,@(package-native-inputs base))))))
44d10b1f
RW
11416
11417(define-public python2-backports-functools-lru-cache
11418 (package
11419 (name "python2-backports-functools-lru-cache")
11420 (version "1.5")
11421 (source
11422 (origin
11423 (method url-fetch)
11424 ;; only the pypi tarballs contain the necessary metadata
11425 (uri (pypi-uri "backports.functools_lru_cache" version))
11426 (sha256
11427 (base32
11428 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
11429 (build-system python-build-system)
11430 (native-inputs
11431 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
11432 (arguments
11433 `(#:python ,python-2))
11434 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
11435 (synopsis "Backport of functools.lru_cache from Python 3.3")
11436 (description "@code{python2-backports-functools-lru-cache} is a backport
11437of @code{functools.lru_cache} from python 3.3.")
11438 (license license:expat)))
11439
11440(define-public python-configparser
11441 (package
11442 (name "python-configparser")
11443 (version "3.5.0")
11444 (source
11445 (origin
11446 (method url-fetch)
11447 (uri (string-append
11448 "https://bitbucket.org/ambv/configparser/get/"
11449 version ".tar.bz2"))
11450 (file-name (string-append name "-" version ".tar.gz"))
11451 (sha256
11452 (base32
11453 "0waq40as14abwzbb321hfz4vr1fi363nscy32ga14qvfygrg96wa"))))
11454 (build-system python-build-system)
11455 (home-page "http://docs.python.org/py3k/library/configparser.html")
11456 (synopsis "Backport of configparser from python 3.5")
11457 (description "@code{python-configparser} is a backport of
11458@code{configparser} from Python 3.5 so that it can be used directly
11459in other versions.")
11460 (license license:expat)))
11461
11462(define-public python2-configparser
11463 (package-with-python2 python-configparser))
11464
11465(define-public python-mando
11466 (package
11467 (name "python-mando")
11468 (version "0.6.4")
11469 (source (origin
11470 (method url-fetch)
11471 (uri (pypi-uri "mando" version))
11472 (sha256
11473 (base32
11474 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
11475 (build-system python-build-system)
11476 (propagated-inputs
11477 `(("python-rst2ansi" ,python-rst2ansi)
11478 ("python-six" ,python-six)))
11479 (native-inputs
11480 `(("python-pytest" ,python-pytest)))
11481 (home-page "https://mando.readthedocs.org/")
11482 (synopsis
11483 "Wrapper around argparse, allowing creation of complete CLI applications")
11484 (description
11485 "This package is a wrapper around argparse, allowing you to write complete CLI
11486applications in seconds while maintaining all the flexibility.")
11487 (license license:expat)))
11488
11489(define-public python2-mando
11490 (package-with-python2 python-mando))
11491
11492(define-public python-fudge
11493 (package
11494 (name "python-fudge")
11495 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
11496 ;; package, which is currently the only use of this package.
11497 (version "0.9.6")
11498 (source
11499 (origin
11500 (method url-fetch)
11501 (uri (pypi-uri "fudge" version))
11502 (sha256
11503 (base32
11504 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
11505 (build-system python-build-system)
11506 (arguments
11507 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
11508 (home-page "https://github.com/fudge-py/fudge")
11509 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
11510 (description
11511 "Fudge is a Python module for using fake objects (mocks and stubs) to
11512test real ones.
11513
11514In readable Python code, you declare the methods available on your fake object
11515and how they should be called. Then you inject that into your application and
11516start testing. This declarative approach means you don’t have to record and
11517playback actions and you don’t have to inspect your fakes after running code.
11518If the fake object was used incorrectly then you’ll see an informative
11519exception message with a traceback that points to the culprit.")
11520 (license license:expat)))
11521
11522(define-public python2-fudge
11523 (package-with-python2 python-fudge))
11524
11525(define-public python-mwclient
11526 (package
11527 (name "python-mwclient")
11528 (version "0.8.4")
11529 (source
11530 (origin
11531 (method url-fetch)
11532 ;; The PyPI version wouldn't contain tests.
11533 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
11534 "v" version ".tar.gz"))
11535 (file-name (string-append name "-" version ".tar.gz"))
11536 (sha256
11537 (base32
11538 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
11539 (build-system python-build-system)
11540 (propagated-inputs
11541 `(("python-requests" ,python-requests)
11542 ("python-requests-oauthlib"
11543 ,python-requests-oauthlib)
11544 ("python-six" ,python-six)))
11545 (native-inputs
11546 `(("python-mock" ,python-mock)
11547 ("python-pytest" ,python-pytest)
11548 ("python-pytest-pep8" ,python-pytest-pep8)
11549 ("python-pytest-cache" ,python-pytest-cache)
11550 ("python-pytest-cov" ,python-pytest-cov)
11551 ("python-responses" ,python-responses)))
11552 (home-page "https://github.com/btongminh/mwclient")
11553 (synopsis "MediaWiki API client")
11554 (description "This package provides a MediaWiki API client.")
11555 (license license:expat)))
11556
11557(define-public python2-mwclient
11558 (package-with-python2 python-mwclient))
11559
11560(define-public python-utils
11561 (package
11562 (name "python-utils")
11563 (version "2.1.0")
11564 (source (origin
11565 (method url-fetch)
11566 (uri (pypi-uri "python-utils" version))
11567 (sha256
11568 (base32
11569 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
11570 (build-system python-build-system)
11571 (native-inputs
11572 `(("pytest-runner" ,python-pytest-runner)
11573 ("pytest" ,python-pytest)
11574 ("six" ,python-six)))
11575 (home-page "https://github.com/WoLpH/python-utils")
11576 (synopsis "Convenient utilities not included with the standard Python install")
11577 (description
11578 "Python Utils is a collection of small Python functions and classes which
11579make common patterns shorter and easier.")
11580 (license license:bsd-2)))
11581
11582(define-public python2-utils
11583 (package-with-python2 python-utils))
11584
11585(define-public python-sphinx-me
11586 (package
11587 (name "python-sphinx-me")
11588 (version "0.3")
11589 (source
11590 (origin
11591 (method url-fetch)
11592 (uri (pypi-uri "sphinx-me" version))
11593 (sha256
11594 (base32
11595 "06jzgp213zihnvpcy2y5jy3ykid3apc2ncp2pg6a2g05lhiziglq"))))
11596 (build-system python-build-system)
11597 (home-page "https://github.com/stephenmcd/sphinx-me")
11598 (synopsis "Create a Sphinx documentation shell")
11599 (description
11600 "Create a Sphinx documentation shell for your project and include the
11601README file as the documentation index. It handles extracting the required
11602meta data such as the project name, author and version from your project for
11603use in your Sphinx docs.")
11604 (license license:bsd-2)))
11605
11606(define-public python2-sphinx-me
11607 (package-with-python2 python-sphinx-me))
11608
11609(define-public python-diff-match-patch
11610 (package
11611 (name "python-diff-match-patch")
11612 (version "20121119")
11613 (source
11614 (origin
11615 (method url-fetch)
11616 (uri (pypi-uri "diff-match-patch" version))
11617 (sha256
11618 (base32
11619 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
11620 (build-system python-build-system)
11621 (home-page "https://code.google.com/p/google-diff-match-patch")
11622 (synopsis "Synchronize plain text")
11623 (description "Diff Match and Patch libraries offer robust algorithms to
11624perform the operations required for synchronizing plain text.")
11625 (license license:asl2.0)))
11626
11627(define-public python2-diff-match-patch
11628 (package-with-python2 python-diff-match-patch))
11629
11630(define-public python-dirsync
11631 (package
11632 (name "python-dirsync")
11633 (version "2.2.3")
11634 (source
11635 (origin
11636 (method url-fetch)
11637 (uri (pypi-uri "dirsync" version))
11638 (sha256
11639 (base32
11640 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
11641 (build-system python-build-system)
11642 (propagated-inputs
11643 `(("six" ,python-six)))
11644 (home-page "https://bitbucket.org/tkhyn/dirsync")
11645 (synopsis "Advanced directory tree synchronisation tool")
11646 (description "Advanced directory tree synchronisation tool.")
11647 (license license:expat)))
11648
11649(define-public python2-dirsync
11650 (package-with-python2 python-dirsync))
11651
11652(define-public python-levenshtein
11653 (package
11654 (name "python-levenshtein")
11655 (version "0.12.0")
11656 (source
11657 (origin
11658 (method url-fetch)
11659 (uri (pypi-uri "python-Levenshtein" version))
11660 (sha256
11661 (base32
11662 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
11663 (build-system python-build-system)
11664 (home-page "https://github.com/ztane/python-Levenshtein")
11665 (synopsis "Fast computation of Levenshtein distance and string similarity")
11666 (description
11667 "The Levenshtein Python C extension module contains functions for fast computation of
11668@enumerate
11669@item Levenshtein (edit) distance, and edit operations
11670@item string similarity
11671@item approximate median strings, and generally string averaging
11672@item string sequence and set similarity
11673@end enumerate
11674It supports both normal and Unicode strings.")
11675 (license license:gpl2+)))
11676
11677(define-public python2-levenshtein
11678 (package-with-python2 python-levenshtein))
11679
11680(define-public python-scandir
11681 (package
11682 (name "python-scandir")
11683 (version "1.9.0")
11684 (source
11685 (origin
11686 (method url-fetch)
11687 (uri (pypi-uri "scandir" version))
11688 (sha256
11689 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
11690 (build-system python-build-system)
11691 (arguments
11692 `(#:phases (modify-phases %standard-phases
11693 (replace 'check
11694 (lambda _
11695 (invoke "python" "test/run_tests.py"))))))
11696 (home-page "https://github.com/benhoyt/scandir")
11697 (synopsis "Directory iteration function")
11698 (description
11699 "Directory iteration function like os.listdir(), except that instead of
11700returning a list of bare filenames, it yields DirEntry objects that include
11701file type and stat information along with the name. Using scandir() increases
11702the speed of os.walk() by 2-20 times (depending on the platform and file
11703system) by avoiding unnecessary calls to os.stat() in most cases.
11704
11705This package is part of the Python standard library since version 3.5.")
11706 (license license:bsd-3)))
11707
11708(define-public python2-scandir
11709 (package-with-python2 python-scandir))
11710
11711(define-public python2-stemming
11712 (package
11713 (name "python2-stemming")
11714 (version "1.0.1")
11715 (source
11716 (origin
11717 (method url-fetch)
11718 (uri (pypi-uri "stemming" version))
11719 (sha256
11720 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
11721 (build-system python-build-system)
11722 (arguments
11723 `(#:python ,python-2))
11724 (home-page "https://bitbucket.org/mchaput/stemming/overview")
11725 (synopsis "Python implementations of various stemming algorithms")
11726 (description
11727 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
11728stemming algorithms for English. These implementations are straightforward and
11729efficient, unlike some Python versions of the same algorithms available on the
11730Web. This package is an extraction of the stemming code included in the Whoosh
11731search engine.")
11732 (license license:public-domain)))
11733
11734(define-public python-factory-boy
11735 (package
11736 (name "python-factory-boy")
11737 (version "2.8.1")
11738 (source
11739 (origin
11740 (method url-fetch)
11741 (uri (pypi-uri "factory_boy" version))
11742 (sha256
11743 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
11744 (build-system python-build-system)
11745 (arguments
11746 ;; Tests are not included in the tarball.
11747 `(#:tests? #f))
11748 (propagated-inputs
11749 `(("faker" ,python-faker)))
11750 (home-page "https://github.com/benhoyt/scandir")
11751 (synopsis "Versatile test fixtures replacement")
11752 (description
11753 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
11754
11755As a fixtures replacement tool, it aims to replace static, hard to maintain
11756fixtures with easy-to-use factories for complex object.
11757
11758Instead of building an exhaustive test setup with every possible combination
11759of corner cases, factory_boy allows you to use objects customized for the
11760current test, while only declaring the test-specific fields")
11761 (license license:expat)))
11762
11763(define-public python2-factory-boy
11764 (package-with-python2 python-factory-boy))
11765
11766(define-public python-translate-toolkit
11767 (package
11768 (name "python-translate-toolkit")
11769 (version "2.1.0")
11770 (source
11771 (origin
11772 (method url-fetch)
11773 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
11774 (sha256
11775 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
11776 (build-system python-build-system)
11777 (native-inputs
11778 `(("python-pytest" ,python-pytest)
11779 ("python-sphinx" ,python-sphinx)))
11780 (propagated-inputs
11781 `(("python-babel" ,python-babel)
11782 ("python-beautifulsoup4" ,python-beautifulsoup4)
11783 ("python-chardet" ,python-chardet)
11784 ("python-diff-match-patch" ,python-diff-match-patch)
11785 ("python-levenshtein" ,python-levenshtein)
11786 ("python-lxml" ,python-lxml)
11787 ("python-six" ,python-six)
11788 ("python-vobject" ,python-vobject)
11789 ("python-pyyaml" ,python-pyyaml)))
11790 (arguments
11791 ;; TODO: tests are not run, because they end with
11792 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
11793 ;; 'parse_funcs'
11794 ;; during test setup.
11795 `(#:tests? #f))
11796 (home-page "http://toolkit.translatehouse.org")
11797 (synopsis "Tools and API for translation and localization engineering")
11798 (description
11799 "Tools and API for translation and localization engineering. It contains
11800several utilities, as well as an API for building localization tools.")
11801 (license license:gpl2+)))
11802
11803(define-public python2-translate-toolkit
11804 (package-with-python2 python-translate-toolkit))
11805
11806(define-public python-packaging
11807 (package
11808 (name "python-packaging")
11809 (version "18.0")
11810 (source
11811 (origin
11812 (method url-fetch)
11813 (uri (pypi-uri "packaging" version))
11814 (sha256
11815 (base32
11816 "01wq9c53ix5rz6qg2c98gy8n4ff768rmanifm8m5jpjiaizj51h8"))))
11817 (build-system python-build-system)
11818 (arguments
11819 `(#:phases (modify-phases %standard-phases
11820 (replace 'check
11821 (lambda _ (invoke "py.test" "-vv"))))))
11822 (native-inputs
11823 `(("python-pretend" ,python-pretend)
11824 ("python-pytest" ,python-pytest)))
11825 (propagated-inputs
11826 `(("python-pyparsing" ,python-pyparsing)
11827 ("python-six" ,python-six)))
11828 (home-page "https://github.com/pypa/packaging")
11829 (synopsis "Core utilities for Python packages")
11830 (description "Packaging is a Python module for dealing with Python packages.
11831It offers an interface for working with package versions, names, and dependency
11832information.")
11833 ;; From 'LICENSE': This software is made available under the terms of
11834 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
11835 ;; Contributions to this software is made under the terms of *both* these
11836 ;; licenses.
11837 (license (list license:asl2.0 license:bsd-2))))
11838
11839(define-public python2-packaging
11840 (package-with-python2 python-packaging))
11841
11842(define-public python-relatorio
11843 (package
11844 (name "python-relatorio")
11845 (version "0.8.0")
11846 (source
11847 (origin
11848 (method url-fetch)
11849 (uri (pypi-uri "relatorio" version))
11850 (sha256
11851 (base32
11852 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
11853 (build-system python-build-system)
11854 (propagated-inputs
11855 `(("python-lxml" ,python-lxml)
11856 ("python-genshi" ,python-genshi)))
11857 (native-inputs
11858 `(("python-magic" ,python-magic)))
11859 (home-page "https://relatorio.tryton.org/")
11860 (synopsis "Templating library able to output ODT and PDF files")
11861 (description "Relatorio is a templating library which provides a way to
11862easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
11863for more filetypes can be easily added by creating plugins for them.")
11864 (license license:gpl3+)))
11865
11866(define-public python2-relatorio
11867 (package-with-python2 python-relatorio))
11868
11869(define-public python-radon
11870 (package
11871 (name "python-radon")
11872 (version "2.2.0")
11873 (source
11874 (origin
11875 (method url-fetch)
11876 (uri (pypi-uri "radon" version))
11877 (sha256
11878 (base32
11879 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
11880 (build-system python-build-system)
11881 (arguments
11882 `(#:phases (modify-phases %standard-phases
11883 (replace 'check
11884 (lambda _
11885 (invoke "python" "radon/tests/run.py"))))))
11886 (propagated-inputs
11887 `(("python-colorama" ,python-colorama)
11888 ("python-flake8-polyfill" ,python-flake8-polyfill)
11889 ("python-mando" ,python-mando)))
11890 (native-inputs
11891 `(("python-pytest" ,python-pytest)
11892 ("python-pytest-mock" ,python-pytest-mock)))
11893 (home-page "https://radon.readthedocs.org/")
11894 (synopsis "Code Metrics in Python")
11895 (description "Radon is a Python tool which computes various code metrics.
11896Supported metrics are:
11897@itemize @bullet
11898@item raw metrics: SLOC, comment lines, blank lines, &c.
11899@item Cyclomatic Complexity (i.e. McCabe’s Complexity)
11900@item Halstead metrics (all of them)
11901@item the Maintainability Index (a Visual Studio metric)
11902@end itemize")
11903 (license license:expat)))
11904
11905(define-public python2-radon
11906 (package-with-python2 python-radon))
11907
11908(define-public python-sure
11909 (package
11910 (name "python-sure")
11911 (version "1.4.11")
11912 (source
11913 (origin
11914 (method url-fetch)
11915 (uri (pypi-uri "sure" version))
11916 (sha256
11917 (base32
11918 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
11919 (build-system python-build-system)
11920 (propagated-inputs
11921 `(("python-mock" ,python-mock)
11922 ("python-six" ,python-six)))
11923 (native-inputs
11924 `(("python-nose" ,python-nose)))
11925 (home-page "https://github.com/gabrielfalcao/sure")
11926 (synopsis "Automated testing library in python for python")
11927 (description
11928 "Sure is a python library that leverages a DSL for writing assertions.
11929Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
11930 (license license:gpl3+)))
11931
11932(define-public python2-sure
11933 (package-with-python2 python-sure))
11934
11935(define-public python2-couleur
11936 ;; This package does not seem to support python3 at all, hence,
11937 ;; only the python2 variant definition is provided.
11938 (package
11939 (name "python2-couleur")
11940 (version "0.6.2")
11941 (source
11942 (origin
11943 (method url-fetch)
11944 (uri (pypi-uri "couleur" version))
11945 (sha256
11946 (base32
11947 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
11948 (build-system python-build-system)
11949 (arguments
11950 `(#:python ,python-2))
11951 (home-page "https://github.com/gabrielfalcao/couleur")
11952 (synopsis
11953 "ANSI terminal tool for python, colored shell and other handy fancy features")
11954 (description
11955 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
11956terminal such as coloured output in the shell, overwriting output, indentation, etc.")
11957 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
11958 ;; https://github.com/gabrielfalcao/couleur/issues/11
11959 (license license:lgpl3+)))
11960
11961(define-public python-misaka
11962 (package
11963 (name "python-misaka")
11964 (version "2.1.0")
11965 (source
11966 (origin
11967 (method url-fetch)
11968 (uri (pypi-uri "misaka" version))
11969 (sha256
11970 (base32
11971 "1yqrq3a5rracirmvk52n28nn6ckdaz897gnigv89a9gmyn87sqw7"))))
11972 (build-system python-build-system)
11973 (arguments
11974 `(;; Line 37 of setup.py calls self.run_command('develop')
11975 ;; in the 'check' phase. This command seems to be trying
11976 ;; to write to
11977 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
11978 ;; for which it does not have the permission to write.
11979 #:tests? #f))
11980 (propagated-inputs
11981 `(("python-cffi" ,python-cffi)))
11982 (home-page "https://github.com/FSX/misaka")
11983 (synopsis "Python binding for Hoedown")
11984 (description
11985 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
11986library written in C. It features a fast HTML renderer and functionality to make custom
11987renderers (e.g. man pages or LaTeX).")
11988 (license license:expat)))
11989
11990(define-public python2-misaka
11991 (package-with-python2 python-misaka))
11992
11993(define-public python2-steadymark
11994 ;; This is forced into being a python2 only variant
11995 ;; due to its dependence on couleur that has no support
11996 ;; for python3
11997 (package
11998 (name "python2-steadymark")
11999 (version "0.7.3")
12000 (source
12001 (origin
12002 (method url-fetch)
12003 (uri (pypi-uri "steadymark" version))
12004 (sha256
12005 (base32
12006 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
12007 (build-system python-build-system)
12008 (native-inputs
12009 `(("python-couleur" ,python2-couleur)
12010 ("python-sure" ,python2-sure)
12011 ("python-misaka" ,python2-misaka)))
12012 (arguments
12013 `(#:python ,python-2
12014 #:phases
12015 (modify-phases %standard-phases
12016 (add-before 'build 'patch-setup-py
12017 (lambda _
12018 ;; Update requirements from dependency==version
12019 ;; to dependency>=version
12020 (substitute* "setup.py"
12021 (("==") ">="))
12022 #t)))))
12023 (home-page "https://github.com/gabrielfalcao/steadymark")
12024 (synopsis "Markdown-based test runner for python")
12025 (description
12026 "@code{Steadymark} allows documentation to be written in github-flavoured
12027markdown. The documentation may contain snippets of code surrounded by python
12028code blocks and @code{Steadymark} will find these snippets and run them, making
12029sure that there are no old malfunctional examples in the documentation examples.")
12030 (license license:expat)))
12031
12032(define-public python-jsonpointer
12033 (package
12034 (name "python-jsonpointer")
12035 (version "1.10")
12036 (source
12037 (origin
12038 (method url-fetch)
12039 (uri (pypi-uri "jsonpointer" version))
12040 (sha256
12041 (base32
12042 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
12043 (build-system python-build-system)
12044 (home-page "https://github.com/stefankoegl/python-json-pointer")
12045 (synopsis "Identify specific nodes in a JSON document")
12046 (description "@code{jsonpointer} allows you to access specific nodes
12047by path in a JSON document (see RFC 6901).")
12048 (license license:bsd-3)))
12049
12050(define-public python2-jsonpointer
12051 (package-with-python2 python-jsonpointer))
12052
12053(define-public python-jsonpatch
12054 (package
12055 (name "python-jsonpatch")
12056 (version "1.16")
12057 (source
12058 (origin
12059 (method url-fetch)
12060 ;; pypi version lacks tests.js
12061 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12062 "archive/v" version ".tar.gz"))
12063 (file-name (string-append name "-" version ".tar.gz"))
12064 (sha256
12065 (base32
12066 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
12067 (build-system python-build-system)
12068 (native-inputs
12069 `(("python-jsonpointer" ,python-jsonpointer)))
12070 (home-page "https://github.com/stefankoegl/python-json-patch")
12071 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
12072 (description "@code{jsonpatch} is a library and program that allows
12073applying JSON Patches according to RFC 6902.")
12074 (license license:bsd-3)))
12075
12076(define-public python2-jsonpatch
12077 (package-with-python2 python-jsonpatch))
12078
12079(define-public python-jsonpatch-0.4
12080 (package (inherit python-jsonpatch)
12081 (name "python-jsonpatch")
12082 (version "0.4")
12083 (source
12084 (origin
12085 (method url-fetch)
12086 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12087 "archive/v" version ".tar.gz"))
12088 (file-name (string-append name "-" version ".tar.gz"))
12089 (sha256
12090 (base32
12091 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
12092
12093(define-public python2-jsonpatch-0.4
12094 (package-with-python2 python-jsonpatch-0.4))
12095
12096(define-public python-rfc3986
12097 (package
12098 (name "python-rfc3986")
12099 (version "1.1.0")
12100 (source (origin
12101 (method url-fetch)
12102 (uri (pypi-uri "rfc3986" version))
12103 (sha256
12104 (base32
12105 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
12106 (build-system python-build-system)
12107 (arguments
12108 `(#:modules ((guix build utils)
12109 (guix build python-build-system)
12110 (ice-9 ftw)
12111 (srfi srfi-1)
12112 (srfi srfi-26))
12113 #:phases
12114 (modify-phases %standard-phases
12115 (replace 'check
12116 (lambda _
12117 (let ((cwd (getcwd)))
12118 (setenv "PYTHONPATH"
12119 (string-append cwd "/build/"
12120 (find (cut string-prefix? "lib" <>)
12121 (scandir (string-append cwd "/build")))
12122 ":"
12123 (getenv "PYTHONPATH")))
12124 (invoke "pytest" "-v")))))))
12125 (native-inputs
12126 `(("python-pytest" ,python-pytest)))
12127 (home-page "https://rfc3986.readthedocs.io/")
12128 (synopsis "Parse and validate URI references")
12129 (description
12130 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
12131validation and authority parsing. This module also supports RFC@tie{}6874
12132which adds support for zone identifiers to IPv6 addresses.")
12133 (license license:asl2.0)))
12134
12135(define-public python2-rfc3986
12136 (package-with-python2 python-rfc3986))
12137
12138(define-public python-rfc3987
12139 (package
12140 (name "python-rfc3987")
12141 (version "1.3.7")
12142 (source
12143 (origin
12144 (method url-fetch)
12145 (uri (pypi-uri "rfc3987" version))
12146 (sha256
12147 (base32
12148 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
12149 (build-system python-build-system)
12150 (home-page "https://pypi.python.org/pypi/rfc3987")
12151 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
12152 (description "@code{rfc3987} provides routines for parsing and
12153validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
12154 (license license:gpl3+)))
12155
12156(define-public python2-rfc3987
12157 (package-with-python2 python-rfc3987))
12158
12159(define-public python-validate-email
12160 (package
12161 (name "python-validate-email")
12162 (version "1.3")
12163 (source
12164 (origin
12165 (method url-fetch)
12166 (uri (pypi-uri "validate_email" version))
12167 (sha256
12168 (base32
12169 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
12170 (build-system python-build-system)
12171 (home-page "https://github.com/syrusakbary/validate_email")
12172 (synopsis "Verifies if an email address is valid and really exists")
12173 (description "@code{validate_email} can be used to verify if an email
12174address is valid and really exists.")
12175 (license license:lgpl3+)))
12176
12177(define-public python2-validate-email
12178 (package-with-python2 python-validate-email))
12179
12180(define-public python-flex
12181 (package
12182 (name "python-flex")
12183 (version "6.10.0")
12184 (source
12185 (origin
12186 (method url-fetch)
12187 (uri (pypi-uri "flex" version))
12188 (sha256
12189 (base32
12190 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
12191 (build-system python-build-system)
12192 (propagated-inputs
12193 `(("python-click" ,python-click)
12194 ("python-iso8601" ,python-iso8601)
12195 ("python-jsonpointer" ,python-jsonpointer)
12196 ("python-pyyaml" ,python-pyyaml)
12197 ("python-requests" ,python-requests)
12198 ("python-rfc3987" ,python-rfc3987)
12199 ("python-six" ,python-six)
12200 ("python-validate-email" ,python-validate-email)))
12201 (home-page "https://github.com/pipermerriam/flex")
12202 (synopsis "Validates Swagger schemata")
12203 (description "@code{flex} can be used to validate Swagger schemata.")
12204 (license license:bsd-3)))
12205
12206(define-public python2-flex
12207 (package-with-python2 python-flex))
12208
12209(define-public python-marshmallow
12210 (package
12211 (name "python-marshmallow")
12212 (version "3.0.0b14")
12213 (source
12214 (origin
12215 (method url-fetch)
12216 (uri (pypi-uri "marshmallow" version))
12217 (sha256
12218 (base32
12219 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
12220 (build-system python-build-system)
12221 (propagated-inputs
12222 `(("python-dateutil" ,python-dateutil)
12223 ("python-simplejson" ,python-simplejson)))
12224 (native-inputs
12225 `(("python-pytest" ,python-pytest)
12226 ("python-pytz" ,python-pytz)))
12227 (home-page "https://github.com/marshmallow-code/marshmallow")
12228 (synopsis "Convert complex datatypes to and from native
12229Python datatypes.")
12230 (description "@code{marshmallow} provides a library for converting
12231complex datatypes to and from native Python datatypes.")
12232 (license license:expat)))
12233
12234(define-public python2-marshmallow
12235 (package-with-python2 python-marshmallow))
12236
12237(define-public python-apispec
12238 (package
12239 (name "python-apispec")
12240 (version "0.25.3")
12241 (source
12242 (origin
12243 (method url-fetch)
12244 (uri (pypi-uri "apispec" version))
12245 (sha256
12246 (base32
12247 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
12248 (build-system python-build-system)
12249 (propagated-inputs
12250 `(("python-pyyaml" ,python-pyyaml)))
12251 (native-inputs
12252 `(("python-pytest" ,python-pytest)
12253 ("python-flask" ,python-flask)
12254 ("python-marshmallow" ,python-marshmallow)
12255 ("python-tornado" ,python-tornado)
12256 ("python-bottle" ,python-bottle)
12257 ("python-mock" ,python-mock)))
12258 (home-page "https://github.com/marshmallow-code/apispec")
12259 (synopsis "Swagger 2.0 API specification generator")
12260 (description "@code{python-apispec} is a pluggable API specification
12261generator. Currently supports the OpenAPI specification (f.k.a.
12262Swagger 2.0).")
12263 (license license:expat)))
12264
12265(define-public python2-apispec
12266 (package-with-python2 python-apispec))
12267
12268(define-public python-flasgger
12269 (package
12270 (name "python-flasgger")
12271 (version "0.6.3")
12272 (source
12273 (origin
12274 (method url-fetch)
12275 (uri (string-append "https://github.com/rochacbruno/flasgger/archive/"
12276 version ".tar.gz"))
12277 (file-name (string-append name "-" version ".tar.gz"))
12278 (sha256
12279 (base32
12280 "1gqzlm0rb55fdpsy5ipkganlx9cnpi454fqyycr03jm22zql14ay"))))
12281 (build-system python-build-system)
12282 (arguments
12283 `(#:phases
12284 (modify-phases %standard-phases
12285 (replace 'check
12286 (lambda* (#:key inputs outputs #:allow-other-keys)
12287 (substitute* "Makefile"
12288 (("flake8 flasgger --ignore=F403")
12289 "flake8 flasgger --ignore=E731,F403"))
12290 (setenv "PYTHONPATH" (string-append (getcwd)
12291 ":"
12292 (getenv "PYTHONPATH")))
ac599a09 12293 (invoke "py.test"))))))
44d10b1f
RW
12294 (propagated-inputs
12295 `(("python-flask" ,python-flask)
12296 ("python-pyyaml" ,python-pyyaml)
12297 ("python-jsonschema" ,python-jsonschema)
12298 ("python-mistune" ,python-mistune)
12299 ("python-six" ,python-six)))
12300 (native-inputs
12301 `(("python-decorator" ,python-decorator)
12302 ("python-flake8" ,python-flake8)
12303 ("python-flask-restful" ,python-flask-restful)
12304 ("python-flex" ,python-flex)
12305 ("python-pytest" ,python-pytest)
12306 ("python-pytest-cov" ,python-pytest-cov)
12307 ("python-marshmallow" ,python-marshmallow)
12308 ("python-apispec" ,python-apispec)))
12309 (home-page "https://github.com/rochacbruno/flasgger/")
12310 (synopsis "Extract Swagger specs from your Flask project")
12311 (description "@code{python-flasgger} allows extracting Swagger specs
12312from your Flask project. It is a fork of Flask-Swagger.")
12313 (license license:expat)))
12314
12315(define-public python2-flasgger
12316 (package-with-python2 python-flasgger))
12317
12318(define-public python-swagger-spec-validator
12319 (package
12320 (name "python-swagger-spec-validator")
12321 (version "2.1.0")
12322 (source
12323 (origin
12324 (method url-fetch)
12325 (uri (pypi-uri "swagger-spec-validator" version))
12326 (sha256
12327 (base32
12328 "13hkpn2lycwr0468yqhjb3kwszqf7hjwlq61w7vdxq1caz31k4nw"))))
12329 (build-system python-build-system)
12330 (propagated-inputs
12331 `(("python-jsonschema" ,python-jsonschema)
12332 ("python-six" ,python-six)))
12333 (home-page
12334 "https://github.com/Yelp/swagger_spec_validator")
12335 (synopsis "Validation of Swagger specifications")
12336 (description "@code{swagger_spec_validator} provides a library for
12337validating Swagger API specifications.")
12338 (license license:asl2.0)))
12339
12340(define-public python2-swagger-spec-validator
12341 (package-with-python2 python-swagger-spec-validator))
12342
12343(define-public python-apache-libcloud
12344 (package
12345 (name "python-apache-libcloud")
12346 (version "2.4.0")
12347 (source
12348 (origin
12349 (method url-fetch)
12350 (uri (pypi-uri "apache-libcloud" version))
12351 (sha256
12352 (base32
12353 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
12354 (build-system python-build-system)
12355 (arguments
12356 `(#:phases
12357 (modify-phases %standard-phases
12358 (add-after 'unpack 'patch-ssh
12359 (lambda* (#:key inputs #:allow-other-keys)
12360 (substitute* "libcloud/compute/ssh.py"
12361 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
12362 "/bin/ssh" "'")))
12363 #t))
12364 (add-after 'unpack 'patch-tests
12365 (lambda _
12366 (substitute* "./libcloud/test/test_file_fixtures.py"
12367 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
12368 (("def _ascii") "def _raw_data(self, method, url, body, headers):
12369 return (httplib.OK,
12370 \"1234abcd\",
12371 {\"test\": \"value\"},
12372 httplib.responses[httplib.OK])
12373 def _ascii"))
12374 (substitute* "libcloud/test/compute/test_ssh_client.py"
12375 (("class ShellOutSSHClientTests")
12376 "@unittest.skip(\"Guix container doesn't have ssh service\")
12377class ShellOutSSHClientTests")
12378 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
12379 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
12380 (("'.xF0', '.x90', '.x8D', '.x88'")
12381 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
12382 #t))
12383 (add-before 'check 'copy-secret
12384 (lambda _
12385 (copy-file "libcloud/test/secrets.py-dist"
12386 "libcloud/test/secrets.py")
12387 #t)))))
12388 (inputs
12389 `(("openssh" ,openssh)))
12390 (propagated-inputs
12391 `(("python-paramiko" ,python-paramiko)
12392 ("python-requests" ,python-requests)))
12393 (native-inputs
12394 `(("python-lockfile" ,python-lockfile)
12395 ("python-mock" ,python-mock)
12396 ("python-pytest" ,python-pytest)
12397 ("python-pytest-runner" ,python-pytest-runner)
12398 ("python-requests-mock" ,python-requests-mock)))
12399 (home-page "https://libcloud.apache.org/")
12400 (synopsis "Unified Cloud API")
12401 (description "@code{libcloud} is a Python library for interacting with
12402many of the popular cloud service providers using a unified API.")
12403 (license license:asl2.0)))
12404
12405(define-public python2-apache-libcloud
12406 (package-with-python2 python-apache-libcloud))
12407
12408(define-public python-smmap2
12409 (package
12410 (name "python-smmap2")
12411 (version "2.0.3")
12412 (source
12413 (origin
12414 (method url-fetch)
12415 (uri (pypi-uri "smmap2" version))
12416 (sha256
12417 (base32
12418 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
12419 (build-system python-build-system)
12420 (native-inputs
12421 `(("python-nosexcover" ,python-nosexcover)))
12422 (home-page "https://github.com/Byron/smmap")
12423 (synopsis "Python sliding window memory map manager")
12424 (description "@code{smmap2} is a pure Python implementation of a sliding
12425window memory map manager.")
12426 (license license:bsd-3)))
12427
12428(define-public python2-smmap2
12429 (package-with-python2 python-smmap2))
12430
12431(define-public python-regex
12432 (package
12433 (name "python-regex")
12434 (version "2017.06.07")
12435 (source (origin
12436 (method url-fetch)
12437 (uri (pypi-uri "regex" version))
12438 (sha256
12439 (base32
12440 "06r6b7yigikbj3a72whl85r2b64pj1r0ypmw9yalmkm0wnxq8mz4"))))
12441 (build-system python-build-system)
12442 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
12443 (synopsis "Alternative regular expression module")
12444 (description "This regular expression implementation is backwards-
12445compatible with the standard @code{re} module, but offers additional
12446functionality like full case-folding for case-insensitive matches in Unicode.")
12447 (license license:psfl)))
12448
12449(define-public python2-regex
12450 (package-with-python2 python-regex))
12451
12452(define-public python2-pyopengl
12453 (package
12454 (name "python2-pyopengl")
12455 (version "3.1.0")
12456 (source
12457 (origin
12458 (method url-fetch)
12459 (uri (pypi-uri "PyOpenGL" version))
12460 (sha256
12461 (base32
12462 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
12463 (arguments
12464 `(#:python ,python-2))
12465 (build-system python-build-system)
12466 (home-page "http://pyopengl.sourceforge.net")
12467 (synopsis "Standard OpenGL bindings for Python")
12468 (description
12469 "PyOpenGL is the most common cross platform Python binding to OpenGL and
12470related APIs. The binding is created using the standard @code{ctypes}
12471library.")
12472 (license license:bsd-3)))
12473
12474(define-public python2-pyopengl-accelerate
12475 (package
12476 (inherit python2-pyopengl)
12477 (name "python2-pyopengl-accelerate")
12478 (version "3.1.0")
12479 (source
12480 (origin
12481 (method url-fetch)
12482 (uri (pypi-uri "PyOpenGL-accelerate" version))
12483 (sha256
12484 (base32
12485 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
12486 (synopsis "Acceleration code for PyOpenGL")
12487 (description
12488 "This is the Cython-coded accelerator module for PyOpenGL.")))
12489
12490(define-public python-rencode
12491 (package
12492 (name "python-rencode")
12493 (version "1.0.5")
12494 (source
12495 (origin
12496 (method url-fetch)
12497 (uri (pypi-uri "rencode" version))
12498 (sha256
12499 (base32
12500 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
12501 (build-system python-build-system)
12502 (arguments
12503 `(#:phases
12504 (modify-phases %standard-phases
12505 (add-before 'check 'delete-bogus-test
12506 ;; This test requires /home/aresch/Downloads, which is not provided by
12507 ;; the build environment.
12508 (lambda _
12509 (delete-file "rencode/t.py")
12510 #t)))))
12511 (native-inputs `(("pkg-config" ,pkg-config)
12512 ("python-cython" ,python-cython)))
12513 (home-page "https://github.com/aresch/rencode")
12514 (synopsis "Serialization of heterogeneous data structures")
12515 (description
12516 "The @code{rencode} module is a data structure serialization library,
12517similar to @code{bencode} from the BitTorrent project. For complex,
12518heterogeneous data structures with many small elements, r-encoding stake up
12519significantly less space than b-encodings. This version of rencode is a
12520complete rewrite in Cython to attempt to increase the performance over the
12521pure Python module.")
12522 (license license:bsd-3)))
12523
12524(define-public python2-rencode
12525 (package-with-python2 python-rencode))
12526
12527(define-public python-xenon
12528 (package
12529 (name "python-xenon")
12530 (version "0.5.4")
12531 (source
12532 (origin
12533 (method url-fetch)
12534 (uri (pypi-uri "xenon" version))
12535 (sha256
12536 (base32
12537 "029cbhysg2vr5n4jz8gpg2793f8wkwnqpr1qgv6c1dn685vy31mc"))))
12538 (build-system python-build-system)
12539 (native-inputs
12540 `(("python-pyyaml" ,python-pyyaml)
12541 ("python-radon" ,python-radon)
12542 ("python-requests" ,python-requests)
12543 ("python-flake8" ,python-flake8)
12544 ("python-tox" ,python-tox)))
12545 (arguments
12546 `(#:phases
12547 (modify-phases %standard-phases
12548 (add-before 'build 'patch-test-requirements
12549 (lambda _
12550 ;; Remove httpretty dependency for tests.
12551 (substitute* "setup.py"
12552 (("httpretty") ""))
12553 #t)))))
12554 (home-page "https://xenon.readthedocs.org/")
12555 (synopsis "Monitor code metrics for Python on your CI server")
12556 (description
12557 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
12558Ideally, @code{xenon} is run every time code is committed. Through command
12559line options, various thresholds can be set for the complexity of code. It
12560will fail (i.e. it will exit with a non-zero exit code) when any of these
12561requirements is not met.")
12562 (license license:expat)))
12563
12564(define-public python2-xenon
12565 (package-with-python2 python-xenon))
12566
12567(define-public python-pysocks
12568 (package
12569 (name "python-pysocks")
12570 (version "1.6.8")
12571 (source
12572 (origin
12573 (method url-fetch)
12574 (uri (pypi-uri "PySocks" version))
12575 (sha256
12576 (base32
12577 "0wn6xafwy9c1gamwljw3fyvih5w19qy9xp39zmv8c90ai5ajrr9z"))))
12578 (build-system python-build-system)
12579 (arguments `(#:tests? #f))
12580 (home-page "https://github.com/Anorov/PySocks")
12581 (synopsis "SOCKS client module")
12582 (description "@code{pysocks} is an updated and semi-actively maintained
12583version of @code{SocksiPy} with bug fixes and extra features.")
12584 (license license:bsd-3)))
12585
12586(define-public python2-pysocks
12587 (package-with-python2 python-pysocks))
12588
12589(define-public python-pydiff
12590 (package
12591 (name "python-pydiff")
12592 (version "0.2")
12593 (source
12594 (origin
12595 (method url-fetch)
12596 (uri (pypi-uri "pydiff" version))
12597 (sha256
12598 (base32
12599 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
12600 (build-system python-build-system)
12601 (home-page "https://github.com/myint/pydiff")
12602 (synopsis "Library to diff two Python files at the bytecode level")
12603 (description
12604 "@code{pydiff} makes it easy to look for actual code changes while
12605ignoring formatting changes.")
12606 (license license:expat)))
12607
12608(define-public python2-pydiff
12609 (package-with-python2 python-pydiff))
12610
12611(define-public python-tqdm
12612 (package
12613 (name "python-tqdm")
12614 (version "4.19.6")
12615 (source
12616 (origin
12617 (method url-fetch)
12618 (uri (pypi-uri "tqdm" version))
12619 (sha256
12620 (base32
12621 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
12622 (build-system python-build-system)
12623 (native-inputs
12624 `(("python-flake8" ,python-flake8)
12625 ("python-nose" ,python-nose)
12626 ("python-coverage" ,python-coverage)))
12627 (home-page "https://github.com/tqdm/tqdm")
12628 (synopsis "Fast, extensible progress meter")
12629 (description
12630 "Make loops show a progress bar on the console by just wrapping any
12631iterable with @code{|tqdm(iterable)|}. Offers many options to define
12632design and layout.")
12633 (license (list license:mpl2.0 license:expat))))
12634
12635(define-public python2-tqdm
12636 (package-with-python2 python-tqdm))
12637
12638(define-public python-pkginfo
12639 (package
12640 (name "python-pkginfo")
12641 (version "1.4.2")
12642 (source
12643 (origin
12644 (method url-fetch)
12645 (uri (pypi-uri "pkginfo" version))
12646 (sha256
12647 (base32
12648 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
12649 (build-system python-build-system)
12650 (arguments
12651 ;; The tests are broken upstream.
12652 '(#:tests? #f))
12653 (home-page
12654 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
12655 (synopsis
12656 "Query metadatdata from sdists, bdists, and installed packages")
12657 (description
12658 "API to query the distutils metadata written in @file{PKG-INFO} inside a
12659source distriubtion (an sdist) or a binary distribution (e.g., created by
12660running bdist_egg). It can also query the EGG-INFO directory of an installed
12661distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
12662created by running @code{python setup.py develop}).")
12663 (license license:expat)))
12664
12665(define-public python2-pkginfo
12666 (package-with-python2 python-pkginfo))
12667
12668(define-public python-twine
12669 (package
12670 (name "python-twine")
12671 (version "1.9.1")
12672 (source
12673 (origin
12674 (method url-fetch)
12675 (uri (pypi-uri "twine" version))
12676 (sha256
12677 (base32
12678 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
12679 (build-system python-build-system)
12680 (propagated-inputs
12681 `(("python-tqdm" ,python-tqdm)
12682 ("python-pkginfo" ,python-pkginfo)
12683 ("python-requests" ,python-requests)
12684 ("python-requests-toolbelt" ,python-requests-toolbelt)))
12685 (home-page "https://github.com/pypa/twine")
12686 (synopsis "Collection of utilities for interacting with PyPI")
12687 (description
12688 "@code{twine} currently supports registering projects and uploading
12689distributions. It authenticates the user over HTTPS, allows them to pre-sign
12690their files and supports any packaging format (including wheels).")
12691 (license license:asl2.0)))
12692
12693(define-public python2-twine
12694 (package-with-python2 python-twine))
12695
12696(define-public python-linecache2
12697 (package
12698 (name "python-linecache2")
12699 (version "1.0.0")
12700 (source
12701 (origin
12702 (method url-fetch)
12703 (uri (pypi-uri "linecache2" version))
12704 (sha256
12705 (base32
12706 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
12707 (build-system python-build-system)
12708 (arguments
12709 `(;; The tests depend on unittest2, and our version is a bit too old.
12710 #:tests? #f))
12711 (native-inputs
12712 `(("python-pbr" ,python-pbr-minimal)))
12713 (home-page
12714 "https://github.com/testing-cabal/linecache2")
12715 (synopsis "Backports of the linecache module")
12716 (description
12717 "The linecache module allows one to get any line from any file, while
12718attempting to optimize internally, using a cache, the common case where many
12719lines are read from a single file.")
12720 (license license:psfl)))
12721
12722(define-public python2-linecache2
12723 (package-with-python2 python-linecache2))
12724
12725(define-public python-traceback2
12726 (package
12727 (name "python-traceback2")
12728 (version "1.4.0")
12729 (source
12730 (origin
12731 (method url-fetch)
12732 (uri (pypi-uri "traceback2" version))
12733 (sha256
12734 (base32
12735 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
12736 (build-system python-build-system)
12737 (arguments
12738 `(;; python-traceback2 and python-unittest2 depend on one another.
12739 #:tests? #f))
12740 (native-inputs
12741 `(("python-pbr" ,python-pbr-minimal)))
12742 (propagated-inputs
12743 `(("python-linecache2" ,python-linecache2)))
12744 (home-page
12745 "https://github.com/testing-cabal/traceback2")
12746 (synopsis "Backports of the traceback module")
12747 (description
12748 "This module provides a standard interface to extract, format and print
12749stack traces of Python programs. It exactly mimics the behavior of the Python
12750interpreter when it prints a stack trace.")
12751 (license license:psfl)))
12752
12753(define-public python2-traceback2
12754 (package-with-python2 python-traceback2))
12755
12756(define-public python-ratelimiter
12757 (package
12758 (name "python-ratelimiter")
12759 (version "1.2.0")
12760 (source
12761 (origin
12762 (method url-fetch)
12763 (uri (pypi-uri "ratelimiter" version))
12764 (sha256
12765 (base32
12766 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
12767 (build-system python-build-system)
12768 (arguments
12769 '(#:tests? #f)) ; There are no tests in the pypi archive.
12770 (home-page "https://github.com/RazerM/ratelimiter")
12771 (synopsis "Simple rate limiting object")
12772 (description
12773 "The @code{ratelimiter} module ensures that an operation will not be
12774executed more than a given number of times during a given period.")
12775 (license license:asl2.0)))
12776
12777(define-public python2-ratelimiter
12778 (package-with-python2 python-ratelimiter))
12779
12780(define-public python-dukpy
12781 (package
12782 (name "python-dukpy")
12783 (version "0.3")
12784 (source
12785 (origin
12786 (method url-fetch)
12787 (uri (string-append "https://github.com/kovidgoyal/dukpy/archive/v"
12788 version ".tar.gz"))
12789 (file-name (string-append name "-" version ".tar.gz"))
12790 (sha256
12791 (base32
12792 "0pj39rfwlzivqm5hkrsza7gssg6ggpxlq5ivc8f3h7x5pfgc6y6c"))))
12793 (build-system python-build-system)
12794 (home-page "https://github.com/kovidgoyal/dukpy")
12795 (synopsis "Run JavaScript in python")
12796 (description
12797 "dukpy is a JavaScript runtime environment for Python using the duktape
12798embeddable JavaScript engine.")
12799 ;; Dukpy is licensed under MIT like the embedded duktape library,
12800 ;; with 'errors.c' as GPL3.
12801 (license (list license:expat license:gpl3))))
12802
12803(define-public python2-dukpy
12804 (package-with-python2 python-dukpy))
12805
12806(define-public python-jsonrpclib-pelix
12807 (package
12808 (name "python-jsonrpclib-pelix")
12809 (version "0.3.2")
12810 (source
12811 (origin
12812 (method url-fetch)
12813 (uri (pypi-uri "jsonrpclib-pelix" version))
12814 (sha256
12815 (base32
12816 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
12817 (build-system python-build-system)
12818 (arguments
12819 `(#:tests? #f)) ; no tests in PyPI tarball
12820 (home-page "https://github.com/tcalmant/jsonrpclib/")
12821 (synopsis "JSON-RPC 2.0 client library for Python")
12822 (description
12823 "This library implements the JSON-RPC v2.0
12824specification (backwards-compatible) as a client library for Python. This
12825version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
12826services.")
12827 (license license:asl2.0)))
12828
12829(define-public python2-jsonrpclib-pelix
12830 (package-with-python2 python-jsonrpclib-pelix))
12831
12832(define-public python-setuptools-scm-git-archive
12833 (package
12834 (name "python-setuptools-scm-git-archive")
12835 (version "1.0")
12836 (source
12837 (origin
12838 (method url-fetch)
12839 (uri (pypi-uri "setuptools_scm_git_archive" version))
12840 (sha256
12841 (base32
12842 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
12843 (build-system python-build-system)
12844 (native-inputs
12845 `(("python-pytest" ,python-pytest)))
12846 (propagated-inputs
12847 `(("python-setuptools-scm" ,python-setuptools-scm)))
12848 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
12849 (synopsis "Setuptools_scm plugin for git archives")
12850 (description
12851 "The setuptools_scm_git_archive package is a plugin to
12852setuptools_scm, which supports obtaining versions from git archives that
12853belong to tagged versions.")
12854 (license license:expat)))
12855
12856(define-public python2-setuptools-scm-git-archive
12857 (package-with-python2 python-setuptools-scm-git-archive))
12858
12859(define-public python-pyclipper
12860 (package
12861 (name "python-pyclipper")
12862 (version "1.1.0.post1")
12863 (source
12864 (origin
12865 (method url-fetch)
12866 (uri (pypi-uri "pyclipper" version ".zip"))
12867 (sha256
12868 (base32
12869 "0ldbkbnx94an4zzrwb1sxmg6k0jgk4cwmvcdyy8y5k1zslc612wa"))
12870 (modules '((guix build utils)))
12871 (snippet
12872 '(begin
12873 ;; This file is generated by Cython.
12874 (delete-file "pyclipper/pyclipper.cpp") #t))))
12875 (build-system python-build-system)
12876 (arguments
12877 `(#:phases
12878 (modify-phases %standard-phases
12879 (add-before 'build 'cythonize-sources
12880 (lambda _
12881 (with-directory-excursion "pyclipper"
12882 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
12883 (propagated-inputs
12884 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
12885 (native-inputs
12886 `(("python-cython" ,python-cython)
12887 ("python-pytest" ,python-pytest)
12888 ("python-pytest-runner" ,python-pytest-runner)
12889 ("python-unittest2" ,python-unittest2)
12890 ("unzip" ,unzip)))
12891 (home-page "https://github.com/greginvm/pyclipper")
12892 (synopsis "Wrapper for Angus Johnson's Clipper library")
12893 (description
12894 "Pyclipper is a Cython wrapper for the C++ translation of the
12895Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
12896 (license license:expat)))
12897
12898(define-public python2-pyclipper
12899 (package-with-python2 python-pyclipper))
12900
12901(define-public python2-booleanoperations
12902 (package
12903 (name "python2-booleanoperations")
12904 (version "0.7.1")
12905 (source
12906 (origin
12907 (method url-fetch)
12908 (uri (pypi-uri "booleanOperations" version ".zip"))
12909 (sha256
12910 (base32
12911 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
12912 (build-system python-build-system)
12913 (arguments
12914 `(#:python ,python-2))
12915 (native-inputs
12916 `(("unzip" ,unzip)
12917 ("python2-pytest" ,python2-pytest)
12918 ("python2-pytest-runner" ,python2-pytest-runner)))
12919 (propagated-inputs
12920 `(("python-fonttools" ,python2-fonttools)
12921 ("python-pyclipper" ,python2-pyclipper)
12922 ("python-ufolib" ,python2-ufolib)))
12923 (home-page "https://github.com/typemytype/booleanOperations")
12924 (synopsis "Boolean operations on paths")
12925 (description
12926 "BooleanOperations provides a Python library that enables
12927boolean operations on paths.")
12928 (license license:expat)))
12929
12930(define-public python-tempdir
12931 (package
12932 (name "python-tempdir")
12933 (version "0.7.1")
12934 (source
12935 (origin
12936 (method url-fetch)
12937 (uri (pypi-uri "tempdir" version))
12938 (sha256
12939 (base32
12940 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
12941 (build-system python-build-system)
12942 (home-page "https://pypi.org/project/tempdir/")
12943 (arguments
12944 ;; the package has no tests
12945 '(#:tests? #f))
12946 (synopsis "Python library for managing temporary directories")
12947 (description
12948 "This library manages temporary directories that are automatically
12949deleted with all their contents when they are no longer needed. It is
12950particularly convenient for use in tests.")
12951 (license license:expat)))
12952
12953(define-public python2-tempdir
12954 (package-with-python2 python-tempdir))
12955
12956(define-public python-activepapers
12957 (package
12958 (name "python-activepapers")
12959 (version "0.2.2")
12960 (source
12961 (origin
12962 (method url-fetch)
12963 (uri (pypi-uri "ActivePapers.Py" version))
12964 (sha256
12965 (base32
12966 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
12967 (build-system python-build-system)
12968 (arguments
12969 `(#:modules ((ice-9 ftw)
12970 (srfi srfi-1)
12971 (guix build utils)
12972 (guix build python-build-system))
12973
12974 #:phases
12975 (modify-phases %standard-phases
12976 (add-after 'unpack 'delete-python2-code
12977 (lambda _
12978 (for-each delete-file
12979 '("lib/activepapers/builtins2.py"
12980 "lib/activepapers/standardlib2.py"
12981 "lib/activepapers/utility2.py"))))
12982 (replace 'check
12983 (lambda _
12984 ;; Deactivate the test cases that download files
12985 (setenv "NO_NETWORK_ACCESS" "1")
12986 ;; For some strange reason, some tests fail if nosetests runs all
12987 ;; test modules in a single execution. They pass if each test
12988 ;; module is run individually.
12989 (for-each (lambda (filename)
12990 (invoke "nosetests"
12991 (string-append "tests/" filename)))
12992 (scandir "tests"
12993 (lambda (filename)
12994 (string-suffix? ".py" filename)))))))))
12995 (native-inputs
12996 `(("python-tempdir" ,python-tempdir)
12997 ("python-nose" ,python-nose)))
12998 (propagated-inputs
12999 `(("python-h5py" ,python-h5py)))
13000 (home-page "http://www.activepapers.org/")
13001 (synopsis "Executable papers for scientific computing")
13002 (description
13003 "ActivePapers is a tool for working with executable papers, which
13004combine data, code, and documentation in single-file packages,
13005suitable for publication as supplementary material or on repositories
13006such as figshare or Zenodo.")
13007 (properties `((python2-variant . ,(delay python2-activepapers))))
13008 (license license:bsd-3)))
13009
13010(define-public python2-activepapers
13011 (let ((base (package-with-python2
13012 (strip-python2-variant python-activepapers))))
13013 (package
13014 (inherit base)
13015 (arguments
13016 (substitute-keyword-arguments (package-arguments base)
13017 ((#:phases phases)
13018 `(modify-phases ,phases
13019 (delete 'delete-python2-code)
13020 (add-after 'unpack 'delete-python3-code
13021 (lambda _
13022 (for-each delete-file
13023 '("lib/activepapers/builtins3.py"
13024 "lib/activepapers/standardlib3.py"
13025 "lib/activepapers/utility3.py")))))))))))
13026
13027(define-public python-semver
13028 (package
13029 (name "python-semver")
13030 (version "2.7.9")
13031 (source
13032 (origin
13033 (method url-fetch)
13034 (uri (pypi-uri "semver" version))
13035 (sha256
13036 (base32
13037 "0hhgqppchv59rqj0yzi1prdg2nfsywqmjsqy2rycyxm0hvxmbyqz"))))
13038 (build-system python-build-system)
13039 (arguments
13040 `(#:phases
13041 (modify-phases %standard-phases
13042 (add-after 'unpack 'patch-test-requirements
13043 (lambda _
13044 (substitute* "setup.py"
13045 ;; Our Python is new enough.
13046 (("'virtualenv<14\\.0\\.0'") "'virtualenv'"))
13047 #t)))))
13048 (native-inputs
13049 `(("python-tox" ,python-tox)
13050 ("python-virtualenv" ,python-virtualenv)))
13051 (home-page "https://github.com/k-bx/python-semver")
13052 (synopsis "Python helper for Semantic Versioning")
13053 (description "This package provides a Python library for
13054@url{Semantic Versioning, http://semver.org/}.")
13055 (license license:bsd-3)))
13056
13057(define-public python2-semver
13058 (package-with-python2 python-semver))
13059
13060(define-public python-pyro4
13061 (package
13062 (name "python-pyro4")
13063 (version "4.74")
13064 (source
13065 (origin
13066 (method url-fetch)
13067 (uri (pypi-uri "Pyro4" version))
13068 (sha256
13069 (base32
13070 "0pzp7c6q3vvkxq0wy9lr6wd5wky40sajz69g697i5rb2q497pvc9"))))
13071 (build-system python-build-system)
13072 (propagated-inputs
13073 `(("python-serpent" ,python-serpent)))
13074 (home-page "https://pyro4.readthedocs.io")
13075 (synopsis "Distributed object middleware for Python")
13076 (description
13077 "Pyro enables you to build applications in which objects can talk to each
13078other over the network. You can just use normal Python method calls to call
13079objects on other machines, also known as remote procedure calls (RPC).")
13080 (license license:expat)))
13081
13082(define-public python2-pyro
13083 (package
13084 (name "python2-pyro")
13085 (version "3.16")
13086 (source
13087 (origin
13088 (method url-fetch)
13089 (uri (pypi-uri "Pyro" version))
13090 (file-name (string-append "Pyro-" version ".tar.gz"))
13091 (sha256
13092 (base32
13093 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
13094 (build-system python-build-system)
13095 (arguments
13096 ;; Pyro is not compatible with Python 3
13097 `(#:python ,python-2
13098 ;; Pyro has no test cases for automatic execution
13099 #:tests? #f))
13100 (home-page "http://pythonhosted.org/Pyro/")
13101 (synopsis "Distributed object manager for Python")
13102 (description "Pyro is a Distributed Object Technology system
13103written in Python that is designed to be easy to use. It resembles
13104Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
13105which is a system and language independent Distributed Object Technology
13106and has much more to offer than Pyro or RMI. Pyro 3.x is no
13107longer maintained. New projects should use Pyro4 instead, which
13108is the new Pyro version that is actively developed.")
13109 (license license:expat)))
13110
13111(define-public python2-scientific
13112 (package
13113 (name "python2-scientific")
13114 (version "2.9.4")
13115 (source
13116 (origin
13117 (method url-fetch)
13118 (uri (string-append "https://bitbucket.org/khinsen/"
13119 "scientificpython/downloads/ScientificPython-"
13120 version ".tar.gz"))
13121 (file-name (string-append "ScientificPython-" version ".tar.gz"))
13122 (sha256
13123 (base32
13124 "0fc69zhlsn9d2jvbzyjl9ah53vj598h84nkq230c83ahfvgzx5y3"))))
13125 (build-system python-build-system)
13126 (inputs
13127 `(("netcdf" ,netcdf)))
13128 (propagated-inputs
13129 `(("python-numpy" ,python2-numpy-1.8)
13130 ("python-pyro" ,python2-pyro)))
13131 (arguments
13132 ;; ScientificPython is not compatible with Python 3
13133 `(#:python ,python-2
13134 #:tests? #f ; No test suite
13135 #:phases
13136 (modify-phases %standard-phases
13137 (replace 'build
13138 (lambda* (#:key inputs #:allow-other-keys)
77e61e25
RW
13139 (invoke "python" "setup.py" "build"
13140 (string-append "--netcdf_prefix="
13141 (assoc-ref inputs "netcdf"))))))))
44d10b1f
RW
13142 (home-page "https://bitbucket.org/khinsen/scientificpython")
13143 (synopsis "Python modules for scientific computing")
13144 (description "ScientificPython is a collection of Python modules that are
13145useful for scientific computing. Most modules are rather general (Geometry,
13146physical units, automatic derivatives, ...) whereas others are more
13147domain-specific (e.g. netCDF and PDB support). The library is currently
13148not actively maintained and works only with Python 2 and NumPy < 1.9.")
13149 (license license:cecill-c)))
13150
13151(define-public python2-mmtk
13152 (package
13153 (name "python2-mmtk")
13154 (version "2.7.11")
13155 (source
13156 (origin
13157 (method url-fetch)
13158 (uri (string-append "https://bitbucket.org/khinsen/"
13159 "mmtk/downloads/MMTK-" version ".tar.gz"))
13160 (file-name (string-append "MMTK-" version ".tar.gz"))
13161 (sha256
13162 (base32
13163 "1d0nnjx4lwsvh8f99vv1r6gi50d93yba0adkz8b4zgv4za4c5862"))))
13164 (build-system python-build-system)
13165 (native-inputs
13166 `(("netcdf" ,netcdf)))
13167 (propagated-inputs
13168 `(("python-scientific" ,python2-scientific)
13169 ("python-tkinter" ,python-2 "tk")))
13170 (arguments
13171 `(#:python ,python-2
13172 #:tests? #f
13173 #:phases
13174 (modify-phases %standard-phases
13175 (add-before 'build 'includes-from-scientific
13176 (lambda* (#:key inputs #:allow-other-keys)
13177 (mkdir-p "Include/Scientific")
13178 (copy-recursively
13179 (string-append
13180 (assoc-ref inputs "python-scientific")
13181 "/include/python2.7/Scientific")
13182 "Include/Scientific"))))))
13183 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
13184 (synopsis "Python library for molecular simulation")
13185 (description "MMTK is a library for molecular simulations with an emphasis
13186on biomolecules. It provides widely used methods such as Molecular Dynamics
13187and normal mode analysis, but also basic routines for implementing new methods
13188for simulation and analysis. The library is currently not actively maintained
13189and works only with Python 2 and NumPy < 1.9.")
13190 (license license:cecill-c)))
13191
13192(define-public python-phonenumbers
13193 (package
13194 (name "python-phonenumbers")
13195 (version "8.9.1")
13196 (source
13197 (origin
13198 (method url-fetch)
13199 (uri (pypi-uri "phonenumbers" version))
13200 (sha256
13201 (base32
13202 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
13203 (build-system python-build-system)
13204 (home-page
13205 "https://github.com/daviddrysdale/python-phonenumbers")
13206 (synopsis
13207 "Python library for dealing with international phone numbers")
13208 (description
13209 "This package provides a Python port of Google's libphonenumber library.")
13210 (license license:asl2.0)))
13211
13212(define-public python2-phonenumbers
13213 (package-with-python2 python-phonenumbers))
13214
13215(define-public python-send2trash
13216 (package
13217 (name "python-send2trash")
13218 (version "1.4.2")
13219 (source
13220 (origin (method url-fetch)
13221 ;; Source tarball on PyPI doesn't include tests.
13222 (uri (string-append "https://github.com/hsoft/send2trash/archive/"
13223 version ".tar.gz"))
13224 (file-name (string-append name "-" version ".tar.gz"))
13225 (sha256
13226 (base32
13227 "0ffyhwjyx61slkdy38iwjc4gmj7fj9gs2q58f075gwvq630pzm9z"))))
13228 (build-system python-build-system)
13229 (arguments
13230 '(#:phases
13231 (modify-phases %standard-phases
13232 (add-before 'check 'pre-check
13233 (lambda _
13234 (mkdir-p "/tmp/foo")
13235 (setenv "HOME" "/tmp/foo")
13236 #t)))))
13237 (home-page "https://github.com/hsoft/send2trash")
13238 (synopsis "Send files to the user's @file{~/Trash} directory")
13239 (description "This package provides a Python library to send files to the
13240user's @file{~/Trash} directory.")
13241 (license license:bsd-3)))
13242
13243(define-public python2-send2trash
13244 (package
13245 (inherit (package-with-python2 python-send2trash))
13246 (arguments
13247 (substitute-keyword-arguments (package-arguments python-send2trash)
13248 ((#:phases phases)
13249 `(modify-phases ,phases
13250 (add-before 'check 'setenv
13251 (lambda _
13252 (setenv "PYTHONPATH"
13253 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
13254 #t))))))
13255 (properties `((python2-variant . ,(delay python-send2trash))))))
13256
13257(define-public python-yapf
13258 (package
13259 (name "python-yapf")
13260 (version "0.24.0")
13261 (source
13262 (origin
13263 (method url-fetch)
13264 (uri (pypi-uri "yapf" version))
13265 (sha256
13266 (base32
13267 "0anwby0ydmyzcsgjc5dn1ryddwvii4dq61vck447q0n96npnzfyf"))))
13268 (build-system python-build-system)
13269 (home-page "https://github.com/google/yapf")
13270 (synopsis "Formatter for Python code")
13271 (description "YAPF is a formatter for Python code. It's based off of
13272@dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
13273takes the code and reformats it to the best formatting that conforms to the
13274style guide, even if the original code didn't violate the style guide.")
13275 (license license:asl2.0)))
13276
13277(define-public python2-yapf
13278 (package-with-python2 python-yapf))
13279
13280(define-public python-gyp
13281 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
13282 (revision "0"))
13283 (package
13284 (name "python-gyp")
13285 ;; Google does not release versions,
13286 ;; based on second most recent commit date.
13287 (version (git-version "0.0.0" revision commit))
13288 (source
13289 (origin
13290 ;; Google does not release tarballs,
13291 ;; git checkout is needed.
13292 (method git-fetch)
13293 (uri (git-reference
13294 (url "https://chromium.googlesource.com/external/gyp")
13295 (commit commit)))
13296 (file-name (git-file-name name version))
13297 (sha256
13298 (base32
13299 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
13300 (build-system python-build-system)
13301 (home-page "https://gyp.gsrc.io/")
13302 (synopsis "GYP is a Meta-Build system")
13303 (description
13304 "GYP builds build systems for large, cross platform applications.
13305It can be used to generate XCode projects, Visual Studio projects, Ninja build
13306files, and Makefiles.")
13307 (license license:bsd-3))))
13308
13309(define-public python2-gyp
13310 (package-with-python2 python-gyp))
13311
13312(define-public python-whatever
13313 (package
13314 (name "python-whatever")
13315 (version "0.5")
13316 (source
13317 (origin
13318 (method url-fetch)
13319 (uri (string-append "https://github.com/Suor/whatever/archive/" version
13320 ".tar.gz"))
13321 (sha256
13322 (base32
13323 "1iqvnaf0zpc6b4rvbqq4xy45mszcscyzpzknv8wg6j84pbp22sap"))
13324 (file-name (string-append name "-" version ".tar.gz"))))
13325 (build-system python-build-system)
13326 (arguments
13327 `(#:phases
13328 (modify-phases %standard-phases
13329 (replace 'check
13330 (lambda _
13331 (invoke "py.test"))))))
13332 (native-inputs
13333 `(("python-pytest" ,python-pytest)))
13334 (home-page "http://github.com/Suor/whatever")
13335 (synopsis "Make anonymous functions by partial application of operators")
13336 (description "@code{whatever} provides an easy way to make anonymous
13337functions by partial application of operators.")
13338 (license license:bsd-3)))
13339
13340(define-public python2-whatever
13341 (package-with-python2 python-whatever))
13342
13343(define-public python-funcy
13344 (package
13345 (name "python-funcy")
13346 (version "1.10")
13347 (source
13348 (origin
13349 (method url-fetch)
13350 (uri (string-append "https://github.com/Suor/funcy/archive/" version
13351 ".tar.gz"))
13352 (sha256
13353 (base32
13354 "1fanxivsip29vgarw6dn39xym3q4pbxcpa11plpp548lvxajpahz"))
13355 (file-name (string-append name "-" version ".tar.gz"))))
13356 (build-system python-build-system)
13357 (arguments
13358 `(#:phases
13359 (modify-phases %standard-phases
13360 (replace 'check
13361 (lambda _
13362 (invoke "py.test"))))))
13363 (native-inputs
13364 `(("python-pytest" ,python-pytest)
13365 ("python-whatever" ,python-whatever)))
13366 (home-page "http://github.com/Suor/funcy")
13367 (synopsis "Functional tools")
13368 (description "@code{funcy} is a library that provides functional tools.
13369Examples are:
13370@enumerate
13371@item merge - Merges collections of the same type
13372@item walk - Type-preserving map
13373@item select - Selects a part of a collection
13374@item take - Takes the first n items of a collection
13375@item first - Takes the first item of a collection
13376@item remove - Predicated-removes items of a collection
13377@item concat - Concatenates two collections
13378@item flatten - Flattens a collection with subcollections
13379@item distinct - Returns only distinct items
13380@item split - Predicated-splits a collection
13381@item split_at - Splits a collection at a given item
13382@item group_by - Groups items by group
13383@item pairwise - Pairs off adjacent items
13384@item partial - Partially-applies a function
13385@item curry - Curries a function
13386@item compose - Composes functions
13387@item complement - Complements a predicate
13388@item all_fn - \"all\" with predicate
13389@end enumerate")
13390 (license license:bsd-3)))
13391
13392(define-public python2-funcy
13393 (package-with-python2 python-funcy))
13394
13395(define-public python-isoweek
13396 (package
13397 (name "python-isoweek")
13398 (version "1.3.3")
13399 (source
13400 (origin
13401 (method url-fetch)
13402 (uri (pypi-uri "isoweek" version))
13403 (sha256
13404 (base32
13405 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
13406 (build-system python-build-system)
13407 (home-page "https://github.com/gisle/isoweek")
13408 (synopsis "Objects representing a week")
13409 (description "The @code{isoweek} module provide the class Week that
13410implements the week definition of ISO 8601. This standard also defines
13411a notation for identifying weeks; yyyyWww (where the W is a literal).
13412Week instances stringify to this form.")
13413 (license license:bsd-3)))
13414
13415(define-public python2-isoweek
13416 (package-with-python2 python-isoweek))
13417
13418(define-public python-tokenize-rt
13419 (package
13420 (name "python-tokenize-rt")
13421 (version "2.0.1")
13422 (source
13423 (origin
13424 (method url-fetch)
13425 (uri (pypi-uri "tokenize-rt" version))
13426 (sha256
13427 (base32
13428 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
13429 (build-system python-build-system)
13430 (home-page "https://github.com/asottile/tokenize-rt")
13431 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
13432 (description
13433 "This Python library is a wrapper around @code{tokenize} from the Python
13434standard library. It provides two additional tokens @code{ESCAPED_NL} and
13435@code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
13436and @code{tokens_to_src} to roundtrip.")
13437 (license license:expat)))
13438
13439(define-public python-future-fstrings
13440 (package
13441 (name "python-future-fstrings")
13442 (version "0.4.1")
13443 (source
13444 (origin
13445 (method url-fetch)
13446 (uri (pypi-uri "future_fstrings" version))
13447 (sha256
13448 (base32
13449 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
13450 (build-system python-build-system)
13451 (propagated-inputs
13452 `(("python-tokenize-rt" ,python-tokenize-rt)))
13453 (home-page "https://github.com/asottile/future-fstrings")
13454 (synopsis "Backport of fstrings to Python < 3.6")
13455 (description
13456 "This package provides a UTF-8 compatible encoding
13457@code{future_fstrings}, which performs source manipulation. It decodes the
13458source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
13459@code{f} strings.")
13460 (license license:expat)))
13461
13462(define-public python-typing
13463 (package
13464 (name "python-typing")
13465 (version "3.6.6")
13466 (source
13467 (origin
13468 (method url-fetch)
13469 (uri (pypi-uri "typing" version))
13470 (sha256
13471 (base32
13472 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
13473 (build-system python-build-system)
13474 (home-page "https://docs.python.org/3/library/typing.html")
13475 (synopsis "Type hints for Python")
13476 (description "This is a backport of the standard library @code{typing}
13477module to Python versions older than 3.5. Typing defines a standard notation
13478for Python function and variable type annotations. The notation can be used
13479for documenting code in a concise, standard format, and it has been designed
13480to also be used by static and runtime type checkers, static analyzers, IDEs
13481and other tools.")
13482 (license license:psfl)))
13483
13484(define-public python2-typing
13485 (package-with-python2 python-typing))
13486
13487(define-public bpython
13488 (package
13489 (name "bpython")
13490 (version "0.17.1")
13491 (source
13492 (origin
13493 (method url-fetch)
13494 (uri (pypi-uri "bpython" version))
13495 (sha256
13496 (base32
13497 "0bxhxi5zxdkrf8b4gwn0d363kdz3qnypjwhm1aydki53ph8ca1w9"))))
13498 (build-system python-build-system)
13499 (arguments
13500 `(#:phases
13501 (modify-phases %standard-phases
13502 (add-after 'unpack 'remove-failing-test
13503 (lambda _
13504 ;; Remove failing test. FIXME: make it pass
13505 (delete-file "bpython/test/test_args.py")
13506 #t))
13507 (add-after 'wrap 'add-aliases
13508 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
13509 (lambda* (#:key outputs #:allow-other-keys)
13510 (let ((out (assoc-ref outputs "out")))
13511 (for-each
13512 (lambda (old new)
13513 (symlink old (string-append out "/bin/" new)))
13514 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
13515 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
13516 #t)))))
13517 (propagated-inputs
13518 `(("python-pygments" ,python-pygments)
13519 ("python-requests" ,python-requests)
13520 ("python-babel" ,python-babel) ; optional, for internationalization
13521 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
13522 ("python-greenlet" ,python-greenlet)
13523 ("python-urwid" ,python-urwid) ; for bpython-urwid only
13524 ("python-six" ,python-six)))
13525 (native-inputs
13526 `(("python-sphinx" ,python-sphinx)
13527 ("python-mock" ,python-mock)))
13528 (home-page "https://bpython-interpreter.org/")
13529 (synopsis "Fancy interface to the Python interpreter")
13530 (description "Bpython is a fancy interface to the Python
13531interpreter. bpython's main features are
13532
13533@enumerate
13534@item in-line syntax highlighting,
13535@item readline-like autocomplete with suggestions displayed as you type,
13536@item expected parameter list for any Python function,
13537@item \"rewind\" function to pop the last line of code from memory and
13538 re-evaluate,
13539@item send the code you've entered off to a pastebin,
13540@item save the code you've entered to a file, and
13541@item auto-indentation.
13542@end enumerate")
13543 (license license:expat)))
13544
13545(define-public bpython2
13546 (let ((base (package-with-python2
13547 (strip-python2-variant bpython))))
13548 (package (inherit base)
13549 (name "bpython2")
13550 (arguments
13551 `(#:python ,python-2
13552 #:phases
13553 (modify-phases %standard-phases
13554 (add-after 'unpack 'remove-failing-test
13555 (lambda _
13556 ;; Remove failing test. FIXME: make it pass
13557 (delete-file "bpython/test/test_args.py")
13558 ;; Disable failing test-cases (renaming inhibits they are
13559 ;; discovered)
13560 (substitute* "bpython/test/test_curtsies_repl.py"
13561 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
13562 (string-append a "xxx_off_" b))
13563 (("^(\\s*def )(test_complex\\W)" _ a b)
13564 (string-append a "xxx_off_" b)))
13565 #t))
13566 (add-before 'build 'rename-scripts
13567 ;; rename the scripts to bypthon2, bpdb2, etc.
13568 (lambda _
13569 (substitute* "setup.py"
13570 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
13571 (string-append name "2" rest "\n"))
13572 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
13573 (string-append name "2" (or sub "") rest "\n")))
13574 #t))))))))
13575
13576(define-public python-pyinotify
13577 (package
13578 (name "python-pyinotify")
13579 (version "0.9.6")
13580 (source (origin
13581 (method url-fetch)
13582 (uri (pypi-uri "pyinotify" version))
13583 (sha256
13584 (base32
13585 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
13586 (build-system python-build-system)
13587 (arguments `(#:tests? #f)) ;no tests
13588 (home-page "https://github.com/seb-m/pyinotify")
13589 (synopsis "Python library for monitoring inotify events")
13590 (description
13591 "@code{pyinotify} provides a Python interface for monitoring
13592file system events on Linux.")
13593 (license license:expat)))
13594
13595(define-public python2-pyinotify
13596 (package-with-python2 python-pyinotify))
13597
13598;; Ada parser uses this version.
13599(define-public python2-quex-0.67.3
13600 (package
13601 (name "python2-quex")
13602 (version "0.67.3")
13603 (source
13604 (origin
13605 (method url-fetch)
13606 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
13607 (version-major+minor version)
13608 "/quex-" version ".zip"))
13609 (sha256
13610 (base32
13611 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
13612 (build-system python-build-system)
13613 (native-inputs
13614 `(("unzip" ,unzip)))
13615 (arguments
13616 `(#:python ,python-2
13617 #:tests? #f
13618 #:phases
13619 (modify-phases %standard-phases
13620 (delete 'configure)
13621 (delete 'build)
13622 (replace 'install
13623 (lambda* (#:key outputs #:allow-other-keys)
13624 (let* ((out (assoc-ref outputs "out"))
13625 (share/quex (string-append out "/share/quex"))
13626 (bin (string-append out "/bin")))
13627 (copy-recursively "." share/quex)
13628 (mkdir-p bin)
13629 (symlink (string-append share/quex "/quex-exe.py")
13630 (string-append bin "/quex"))
13631 #t))))))
13632 (native-search-paths
13633 (list (search-path-specification
13634 (variable "QUEX_PATH")
13635 (files '("share/quex")))))
13636 (home-page "http://quex.sourceforge.net/")
13637 (synopsis "Lexical analyzer generator in Python")
13638 (description "@code{quex} is a lexical analyzer generator in Python.")
13639 (license license:lgpl2.1+))) ; Non-military
13640
13641(define-public python2-quex
13642 (package (inherit python2-quex-0.67.3)
13643 (name "python2-quex")
13644 (version "0.68.1")
13645 (source
13646 (origin
13647 (method url-fetch)
13648 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
13649 (sha256
13650 (base32
13651 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
13652 (file-name (string-append name "-" version ".tar.gz"))))))
13653
13654(define-public python-more-itertools
13655 (package
13656 (name "python-more-itertools")
13657 (version "4.3.0")
13658 (source
13659 (origin
13660 (method url-fetch)
13661 (uri (pypi-uri "more-itertools" version))
13662 (sha256
13663 (base32
13664 "17h3na0rdh8xq30w4b9pizgkdxmm51896bxw600x84jflg9vaxn4"))))
13665 (build-system python-build-system)
13666 (arguments
13667 `(,@(if (any (cute string-prefix? <> (or (%current-system)
13668 (%current-target-system)))
13669 '("armhf" "i686"))
13670 '(#:phases
13671 (modify-phases %standard-phases
13672 ;; This is required for 32-bit hardware.
13673 ;; TODO: Try to remove this when upgrading.
13674 (add-after 'unpack 'patch-test
13675 (lambda _
13676 (substitute* "more_itertools/tests/test_more.py"
13677 (("10 \\*\\* 10") "9 ** 9"))
13678 #t))))
13679 '())))
13680 (propagated-inputs
13681 `(("python-six" ,python-six-bootstrap)))
13682 (home-page "https://github.com/erikrose/more-itertools")
13683 (synopsis "More routines for operating on iterables, beyond itertools")
13684 (description "Python's built-in @code{itertools} module implements a
13685number of iterator building blocks inspired by constructs from APL, Haskell,
13686and SML. @code{more-itertools} includes additional building blocks for
13687working with iterables.")
13688 (license license:expat)))
13689
13690(define-public python2-more-itertools
13691 (package-with-python2 python-more-itertools))
13692
13693(define-public python-latexcodec
13694 (package
13695 (name "python-latexcodec")
13696 (version "1.0.5")
13697 (source
13698 (origin
13699 (method url-fetch)
13700 (uri (pypi-uri "latexcodec" version))
13701 (sha256
13702 (base32
13703 "0zdd1gf24i83ykadx0y30n3001j43scqr2saql3vckk5c39dj1wn"))))
13704 (build-system python-build-system)
13705 (inputs
13706 `(("python-six" ,python-six)))
13707 (home-page "https://readthedocs.org/projects/latexcodec/")
13708 (synopsis "Work with LaTeX code in Python")
13709 (description "Lexer and codec to work with LaTeX code in Python.")
13710 (license license:expat)))
13711
13712(define-public python-pybtex
13713 (package
13714 (name "python-pybtex")
13715 (version "0.21")
13716 (source
13717 (origin
13718 (method url-fetch)
13719 (uri (pypi-uri "pybtex" version))
13720 (sha256
13721 (base32
13722 "00300j8dn5pxq4ndxmfmbmycg2znawkqs49val2x6jlmfiy6r2mg"))))
13723 (build-system python-build-system)
13724 (native-inputs
13725 `(("python-nose" ,python-nose)))
13726 (inputs
13727 `(("python-latexcodec" ,python-latexcodec)
13728 ("python-pyyaml" ,python-pyyaml)
13729 ("python-six" ,python-six)))
13730 (arguments
13731 `(#:test-target "nosetests"))
13732 (home-page "https://pybtex.org/")
13733 (synopsis "BibTeX-compatible bibliography processor")
13734 (description "Pybtex is a BibTeX-compatible bibliography processor written
13735in Python. You can simply type pybtex instead of bibtex.")
13736 (license license:expat)))
13737
13738(define-public python-onetimepass
13739 (package
13740 (name "python-onetimepass")
13741 (version "1.0.1")
13742 (source
13743 (origin
13744 (method url-fetch)
13745 (uri (pypi-uri "onetimepass" version))
13746 (sha256
13747 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
13748 (build-system python-build-system)
13749 (propagated-inputs `(("python-six" ,python-six)))
13750 (home-page "https://github.com/tadeck/onetimepass/")
13751 (synopsis "One-time password library")
13752 (description "Python one-time password library for HMAC-based (HOTP) and
13753time-based (TOTP) passwords.")
13754 (license license:expat)))
13755
13756(define-public python-parso
13757 (package
13758 (name "python-parso")
13759 (version "0.3.1")
13760 (source
13761 (origin
13762 (method url-fetch)
13763 (uri (pypi-uri "parso" version))
13764 (sha256
13765 (base32
13766 "18p89iwcm8mnf380f92g9w0bhx5km8wxp392vvjcq4y1ld1llw1m"))))
13767 (native-inputs
13768 `(("python-pytest" ,python-pytest)))
13769 (build-system python-build-system)
13770 (home-page "https://github.com/davidhalter/parso")
13771 (synopsis "Python Parser")
13772 (description "Parso is a Python parser that supports error recovery and
13773round-trip parsing for different Python versions (in multiple Python versions).
13774Parso is also able to list multiple syntax errors in your Python file.")
13775 (license license:expat)))
13776
13777(define-public python2-parso
13778 (package-with-python2 python-parso))
13779
13780(define-public python-async-generator
13781 (package
13782 (name "python-async-generator")
13783 (version "1.9")
13784 (source
13785 (origin
13786 (method url-fetch)
13787 (uri (pypi-uri "async_generator" version))
13788 (sha256
13789 (base32
13790 "0wc3hidz1q85cja93k5pzybn0fprfnqyrv4qlkdqdzklc5f4dmdp"))))
13791 (build-system python-build-system)
13792 (native-inputs
13793 `(("python-pytest" ,python-pytest)))
13794 (home-page "https://github.com/python-trio/async_generator")
13795 (synopsis "Async generators and context managers for Python 3.5+")
13796 (description "@code{async_generator} back-ports Python 3.6's native async
13797generators and Python 3.7's context managers into Python 3.5.")
13798 ;; Dual licensed.
13799 (license (list license:expat license:asl2.0))))
13800
13801(define-public python-async-timeout
13802 (package
13803 (name "python-async-timeout")
13804 (version "3.0.1")
13805 (source
13806 (origin
13807 (method url-fetch)
13808 (uri (pypi-uri "async-timeout" version))
13809 (sha256
13810 (base32
13811 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
13812 (build-system python-build-system)
13813 (home-page "https://github.com/aio-libs/async_timeout/")
13814 (synopsis "Timeout context manager for asyncio programs")
13815 (description "@code{async-timeout} provides a timeout timeout context
13816manager compatible with @code{asyncio}.")
13817 (license license:asl2.0)))
13818
13819(define-public python-glob2
13820 (package
13821 (name "python-glob2")
13822 (version "0.6")
13823 (source (origin
13824 (method url-fetch)
13825 (uri (string-append
13826 "https://github.com/miracle2k/python-glob2/archive/"
13827 version
13828 ".tar.gz"))
13829 (sha256
13830 (base32
13831 "0ja168f0dz4kbz4m06dm0rd3acaypk6hjx2km541pw22y9s40mag"))
13832 (file-name (string-append name "-" version ".tar.gz"))))
13833 (build-system python-build-system)
13834 (home-page "https://github.com/miracle2k/python-glob2/")
13835 (synopsis "Extended Version of the python buildin glob module")
13836 (description "This is an extended version of the Python
13837@url{http://docs.python.org/library/glob.html, built-in glob module} which
13838adds:
13839
13840@itemize
13841@item The ability to capture the text matched by glob patterns, and return
13842those matches alongside the file names.
13843@item A recursive @code{**} globbing syntax, akin for example to the
13844@code{globstar} option of Bash.
13845@item The ability to replace the file system functions used, in order to glob
13846on virtual file systems.
13847@item Compatible with Python 2 and Python 3 (tested with 3.3).
13848@end itemize
13849
13850Glob2 currently based on the glob code from Python 3.3.1.")
13851 (license license:bsd-2)))
13852
13853(define-public python2-glob2
13854 (package-with-python2 python-glob2))
13855
13856(define-public python-gipc
13857 (package
13858 (name "python-gipc")
13859 (version "0.6.0")
13860 (source
13861 (origin
13862 (method url-fetch)
13863 (uri (pypi-uri "gipc" version ".zip"))
13864 (sha256
13865 (base32
13866 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
13867 (build-system python-build-system)
13868 (native-inputs
13869 `(("unzip" ,unzip)))
13870 (propagated-inputs
13871 `(("python-gevent" ,python-gevent)))
13872 (home-page "http://gehrcke.de/gipc")
13873 (synopsis "Child process management in the context of gevent")
13874 (description "Usage of Python's multiprocessing package in a
13875gevent-powered application may raise problems. With @code{gipc},
13876process-based child processes can safely be created anywhere within a
13877gevent-powered application.")
13878 (license license:expat)))
13879
13880(define-public python2-gipc
13881 (package-with-python2 python-gipc))
13882
13883(define-public python-fusepy
13884 (package
13885 (name "python-fusepy")
13886 (version "2.0.4")
13887 (source
13888 (origin
13889 (method url-fetch)
13890 (uri (pypi-uri "fusepy" version))
13891 (sha256
13892 (base32
13893 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
13894 (build-system python-build-system)
13895 (arguments
13896 `(#:phases
13897 (modify-phases %standard-phases
13898 (add-before 'build 'set-library-file-name
13899 (lambda* (#:key inputs #:allow-other-keys)
13900 (let ((fuse (assoc-ref inputs "fuse")))
13901 (substitute* "fuse.py"
13902 (("find_library\\('fuse'\\)")
13903 (string-append "'" fuse "/lib/libfuse.so'")))
13904 #t))))))
13905 (propagated-inputs
13906 `(("fuse" ,fuse)))
13907 (home-page "https://github.com/fusepy/fusepy")
13908 (synopsis "Simple ctypes bindings for FUSE")
13909 (description "Python module that provides a simple interface to FUSE and
13910MacFUSE. The binding is created using the standard @code{ctypes} library.")
13911 (license license:isc)))
13912
13913(define-public python2-fusepy
13914 (package-with-python2 python-fusepy))
13915
13916(define-public python2-gdrivefs
13917 (package
13918 (name "python2-gdrivefs")
13919 (version "0.14.9")
13920 (source
13921 (origin
13922 (method url-fetch)
13923 (uri (pypi-uri "gdrivefs" version))
13924 (sha256
13925 (base32
13926 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
13927 (build-system python-build-system)
13928 (arguments
13929 `(#:python ,python-2
13930 #:phases
13931 (modify-phases %standard-phases
13932 (add-before 'build 'patch-setup-py
13933 (lambda _
13934 ;; Update requirements from dependency==version
13935 ;; to dependency>=version
13936 (substitute* "gdrivefs/resources/requirements.txt"
13937 (("==") ">="))
13938 #t)))))
13939 (native-inputs
13940 `(("python2-gipc" ,python2-gipc)
13941 ("python2-gevent" ,python2-gevent)
13942 ("python2-greenlet" ,python2-greenlet)
13943 ("python2-httplib2" ,python2-httplib2)
13944 ("python2-uritemplate" ,python2-uritemplate)
13945 ("python2-oauth2client" ,python2-oauth2client)
13946 ("python2-six" ,python2-six)))
13947 (propagated-inputs
13948 `(("python2-dateutil" ,python2-dateutil)
13949 ("python2-fusepy" ,python2-fusepy)
13950 ("python2-google-api-client" ,python2-google-api-client)))
13951 (home-page "https://github.com/dsoprea/GDriveFS")
13952 (synopsis "Mount Google Drive as a local file system")
13953 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
13954under Python 2.7.")
13955 (license license:gpl2)))
13956
13957(define-public pybind11
13958 (package
13959 (name "pybind11")
13960 (version "2.2.4")
13961 (source (origin
13962 (method git-fetch)
13963 (uri (git-reference
13964 (url "https://github.com/pybind/pybind11.git")
13965 (commit (string-append "v" version))))
13966 (sha256
13967 (base32
13968 "0pa79ymcasv8br5ifbx7878id5py2jpjac3i20cqxr6gs9l6ivlv"))
13969 (file-name (git-file-name name version))))
13970 (build-system cmake-build-system)
13971 (native-inputs
13972 `(("python" ,python)
13973 ("python-pytest" ,python-pytest)))
13974 (arguments
13975 `(#:test-target "check"))
13976 (home-page "https://github.com/pybind/pybind11/")
13977 (synopsis "Seamless operability between C++11 and Python")
13978 (description "pybind11 is a lightweight header-only library that exposes
13979C++ types in Python and vice versa, mainly to create Python bindings of
13980existing C++ code. Its goals and syntax are similar to the excellent
13981Boost.Python library by David Abrahams: to minimize boilerplate code in
13982traditional extension modules by inferring type information using compile-time
13983introspection.")
13984 (license license:expat)))
13985
13986(define-public python-fasteners
13987 (package
13988 (name "python-fasteners")
13989 (version "0.14.1")
13990 (source
13991 (origin
13992 (method url-fetch)
13993 (uri (pypi-uri "fasteners" version))
13994 (sha256
13995 (base32
13996 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
13997 (build-system python-build-system)
13998 (propagated-inputs
13999 `(("python-monotonic" ,python-monotonic)
14000 ("python-six" ,python-six)
14001 ("python-testtools" ,python-testtools)))
14002 (home-page "https://github.com/harlowja/fasteners")
14003 (synopsis "Python package that provides useful locks")
14004 (description
14005 "This package provides a Python program that provides following locks:
14006
14007@itemize
14008@item Locking decorator
14009@item Reader-writer locks
14010@item Inter-process locks
14011@item Generic helpers
14012@end itemize\n")
14013 (properties `((python2-variant . ,(delay python2-fasteners))))
14014 (license license:asl2.0)))
14015
14016(define-public python2-fasteners
14017 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
14018 (package
14019 (inherit base)
14020 (propagated-inputs
14021 `(("python2-futures" ,python2-futures)
14022 ,@(package-propagated-inputs base))))))
14023
14024(define-public python-requests-file
14025 (package
14026 (name "python-requests-file")
14027 (version "1.4.3")
14028 (source
14029 (origin
14030 (method url-fetch)
14031 (uri (pypi-uri "requests-file" version))
14032 (sha256
14033 (base32
14034 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
14035 (build-system python-build-system)
14036 (propagated-inputs
14037 `(("python-requests" ,python-requests)
14038 ("python-six" ,python-six)))
14039 (home-page
14040 "https://github.com/dashea/requests-file")
14041 (synopsis "File transport adapter for Requests")
14042 (description
14043 "Requests-File is a transport adapter for use with the Requests Python
14044library to allow local filesystem access via file:// URLs.")
14045 (license license:asl2.0)))
14046
14047(define-public python2-requests-file
14048 (package-with-python2 python-requests-file))
14049
14050(define-public python-tldextract
14051 (package
14052 (name "python-tldextract")
14053 (version "2.2.0")
14054 (source
14055 (origin
14056 (method url-fetch)
14057 (uri (pypi-uri "tldextract" version))
14058 (sha256
14059 (base32
14060 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
14061 (build-system python-build-system)
14062 (native-inputs
14063 `(("python-pytest" ,python-pytest)
14064 ("python-responses" ,python-responses)))
14065 (propagated-inputs
14066 `(("python-idna" ,python-idna)
14067 ("python-requests" ,python-requests)
14068 ("python-requests-file" ,python-requests-file)))
14069 (home-page
14070 "https://github.com/john-kurkowski/tldextract")
14071 (synopsis
14072 "Separate the TLD from the registered domain and subdomains of a URL")
14073 (description
14074 "TLDExtract accurately separates the TLD from the registered domain and
14075subdomains of a URL, using the Public Suffix List. By default, this includes
14076the public ICANN TLDs and their exceptions. It can optionally support the
14077Public Suffix List's private domains as well.")
14078 (license license:bsd-3)))
14079
14080(define-public python2-tldextract
14081 (package-with-python2 python-tldextract))
14082
14083(define-public python-pynamecheap
14084 (package
14085 (name "python-pynamecheap")
14086 (version "0.0.3")
14087 (source
14088 (origin
14089 (method url-fetch)
14090 (uri (pypi-uri "PyNamecheap" version))
14091 (sha256
14092 (base32
14093 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
14094 (build-system python-build-system)
14095 (propagated-inputs
14096 `(("python-requests" ,python-requests)))
14097 (home-page
14098 "https://github.com/Bemmu/PyNamecheap")
14099 (synopsis
14100 "Namecheap API client in Python")
14101 (description
14102 "PyNamecheap is a Namecheap API client in Python.")
14103 (license license:expat)))
14104
14105(define-public python2-pynamecheap
14106 (package-with-python2 python-pynamecheap))
14107
14108(define-public python-dns-lexicon
14109 (package
14110 (name "python-dns-lexicon")
14111 (version "2.4.0")
14112 (source
14113 (origin
14114 (method url-fetch)
14115 (uri (pypi-uri "dns-lexicon" version))
14116 (sha256
14117 (base32
14118 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
14119 (build-system python-build-system)
14120 (arguments
14121 `(#:tests? #f)) ;requires internet access
14122 (propagated-inputs
14123 `(("python-future" ,python-future)
14124 ("python-pynamecheap" ,python-pynamecheap)
14125 ("python-requests" ,python-requests)
14126 ("python-tldextract" ,python-tldextract)
14127 ("python-urllib3" ,python-urllib3)))
14128 (home-page "https://github.com/AnalogJ/lexicon")
14129 (synopsis
14130 "Manipulate DNS records on various DNS providers")
14131 (description
14132 "Lexicon provides a way to manipulate DNS records on multiple DNS
14133providers in a standardized way. It has a CLI but it can also be used as a
14134Python library. It was designed to be used in automation, specifically with
14135Let's Encrypt.")
14136 (license license:expat)))
14137
14138(define-public python2-dns-lexicon
14139 (package-with-python2 python-dns-lexicon))
14140
14141(define-public python-commandlines
14142 (package
14143 (name "python-commandlines")
14144 (version "0.4.1")
14145 (source
14146 (origin
14147 (method url-fetch)
14148 (uri (pypi-uri "commandlines" version))
14149 (sha256
14150 (base32
14151 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
14152 (build-system python-build-system)
14153 (home-page "https://github.com/chrissimpkins/commandlines")
14154 (synopsis "Command line argument to object parsing library")
14155 (description
14156 "@code{Commandlines} is a Python library for command line application
14157development that supports command line argument parsing, command string
14158validation testing and application logic.")
14159 (license license:expat)))
14160
14161;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
14162;; python-numba. They have a very unflexible relationship.
14163(define-public python-numba
14164 (package
14165 (name "python-numba")
14166 (version "0.39.0")
14167 (source
14168 (origin
14169 (method url-fetch)
14170 (uri (pypi-uri "numba" version))
14171 (sha256
14172 (base32
14173 "1bibvkwga1v8293i9ivl469d8bzgabn3vgr2ig7c1i68v8frsx07"))))
14174 (build-system python-build-system)
14175 (arguments
14176 `(#:modules ((guix build utils)
14177 (guix build python-build-system)
14178 (ice-9 ftw)
14179 (srfi srfi-1)
14180 (srfi srfi-26))
14181 #:phases
14182 (modify-phases %standard-phases
14183 (add-after 'unpack 'disable-proprietary-features
14184 (lambda _
14185 (setenv "NUMBA_DISABLE_HSA" "1")
14186 (setenv "NUMBA_DISABLE_CUDA" "1")
14187 #t))
14188 (add-after 'unpack 'remove-failing-tests
14189 (lambda _
14190 ;; FIXME: these tests fail for unknown reasons:
14191 ;; test_non_writable_pycache, test_non_creatable_pycache, and
14192 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
14193 (substitute* "numba/tests/test_dispatcher.py"
14194 (("def test(_non_writable_pycache)" _ m)
14195 (string-append "def guix_skip" m))
14196 (("def test(_non_creatable_pycache)" _ m)
14197 (string-append "def guix_skip" m))
14198 (("def test(_frozen)" _ m)
14199 (string-append "def guix_skip" m)))
14200
14201 ;; These tests fail because we don't run the tests from the build
14202 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
14203 ;; They ar in numba.tests.test_pycc.TestDistutilsSupport.
14204 (substitute* "numba/tests/test_pycc.py"
14205 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
14206 (string-append "def guix_skip" m)))
14207 #t))
14208 (replace 'check
14209 (lambda _
14210 (let ((cwd (getcwd)))
14211 (setenv "PYTHONPATH"
14212 (string-append cwd "/build/"
14213 (find (cut string-prefix? "lib" <>)
14214 (scandir (string-append cwd "/build")))
14215 ":"
14216 (getenv "PYTHONPATH")))
14217 ;; Something is wrong with the PYTHONPATH when running the
14218 ;; tests from the build directory, as it complains about not being
14219 ;; able to import certain modules.
14220 (with-directory-excursion "/tmp"
14221 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
14222 #t)))))
14223 (propagated-inputs
14224 `(("python-llvmlite" ,python-llvmlite)
14225 ("python-numpy" ,python-numpy)
14226 ("python-singledispatch" ,python-singledispatch)))
14227 ;; Needed for tests.
14228 (inputs
14229 `(("python-jinja2" ,python-jinja2)
14230 ("python-pygments" ,python-pygments)))
14231 (home-page "https://numba.pydata.org")
14232 (synopsis "Compile Python code using LLVM")
14233 (description "Numba gives you the power to speed up your applications with
14234high performance functions written directly in Python. With a few
14235annotations, array-oriented and math-heavy Python code can be just-in-time
14236compiled to native machine instructions, similar in performance to C, C++ and
14237Fortran, without having to switch languages or Python interpreters.
14238
14239Numba works by generating optimized machine code using the LLVM compiler
14240infrastructure at import time, runtime, or statically (using the included pycc
14241tool).")
14242 (license license:bsd-3)))
14243
14244(define-public python-anndata
14245 (package
14246 (name "python-anndata")
14247 (version "0.6.9")
14248 (source
14249 (origin
14250 (method url-fetch)
14251 (uri (pypi-uri "anndata" version))
14252 (sha256
14253 (base32
14254 "1fh461xyyc7pcrjfgd013bdc2alf53r46ss3gfw3431mbb1gappi"))))
14255 (build-system python-build-system)
14256 (propagated-inputs
14257 `(("python-h5py" ,python-h5py)
14258 ("python-natsort" ,python-natsort)
14259 ("python-pandas" ,python-pandas)
14260 ("python-scipy" ,python-scipy)))
14261 (home-page "https://github.com/theislab/anndata")
14262 (synopsis "Annotated data for data analysis pipelines")
14263 (description "Anndata is a package for simple (functional) high-level APIs
14264for data analysis pipelines. In this context, it provides an efficient,
14265scalable way of keeping track of data together with learned annotations and
14266reduces the code overhead typically encountered when using a mostly
14267object-oriented library such as @code{scikit-learn}.")
14268 (license license:bsd-3)))
14269
14270(define-public python-dill
14271 (package
14272 (name "python-dill")
14273 (version "0.2.8.2")
14274 (source
14275 (origin
14276 (method url-fetch)
14277 (uri (pypi-uri "dill" version))
14278 (sha256
14279 (base32
14280 "1cymzn9fxwdy33h21zkk4gqgzvd25110hh3zdqnvnwa3p52c4kb2"))))
14281 (build-system python-build-system)
14282 ;; FIXME: The check phase fails with "don't know how to make test".
14283 (arguments '(#:tests? #f))
14284 (home-page "https://pypi.org/project/dill")
14285 (synopsis "Serialize all of Python")
14286 (description "Dill extends Python's @code{pickle} module for serializing
14287and de-serializing Python objects to the majority of the built-in Python
14288types. Dill provides the user the same interface as the @code{pickle} module,
14289and also includes some additional features. In addition to pickling Python
14290objects, @code{dill} provides the ability to save the state of an interpreter
14291session in a single command. Hence, it would be feasable to save a
14292interpreter session, close the interpreter, ship the pickled file to another
14293computer, open a new interpreter, unpickle the session and thus continue from
14294the saved state of the original interpreter session.")
14295 (license license:bsd-3)))
14296
14297(define-public python-multiprocess
14298 (package
14299 (name "python-multiprocess")
14300 (version "0.70.6.1")
14301 (source
14302 (origin
14303 (method url-fetch)
14304 (uri (pypi-uri "multiprocess" version))
14305 (sha256
14306 (base32
14307 "1ip5caz67b3q0553mr8gm8xwsb8x500jn8ml0gihgyfy52m2ypcq"))))
14308 (build-system python-build-system)
14309 (propagated-inputs
14310 `(("python-dill" ,python-dill)))
14311 (home-page "https://pypi.org/project/multiprocess")
14312 (synopsis "Multiprocessing and multithreading in Python")
14313 (description
14314 "This package is a fork of the multiprocessing Python package, a package
14315which supports the spawning of processes using the API of the standard
14316library's @code{threading} module.")
14317 (license license:bsd-3)))
14318
14319(define-public python-toolz
14320 (package
14321 (name "python-toolz")
14322 (version "0.9.0")
14323 (source
14324 (origin
14325 (method url-fetch)
14326 (uri (pypi-uri "toolz" version))
14327 (sha256
14328 (base32
14329 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
14330 (build-system python-build-system)
14331 ;; FIXME: tests cannot be computed: "Can't perform this operation for
14332 ;; unregistered loader type"
14333 (arguments '(#:tests? #f))
14334 (home-page "https://github.com/pytoolz/toolz/")
14335 (synopsis "List processing tools and functional utilities")
14336 (description
14337 "This package provides a set of utility functions for iterators,
14338functions, and dictionaries.")
14339 (license license:bsd-3)))
14340
14341(define-public python2-toolz
14342 (package-with-python2 python-toolz))
14343
14344(define-public python-cytoolz
14345 (package
14346 (name "python-cytoolz")
14347 (version "0.9.0.1")
14348 (source
14349 (origin
14350 (method url-fetch)
14351 (uri (pypi-uri "cytoolz" version))
14352 (sha256
14353 (base32
14354 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
14355 (build-system python-build-system)
14356 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
14357 ;; 'exceptions'"
14358 (arguments '(#:tests? #f))
14359 (propagated-inputs
14360 `(("python-toolz" ,python-toolz)))
14361 (native-inputs
14362 `(("python-cython" ,python-cython)))
14363 (home-page "https://github.com/pytoolz/cytoolz")
14364 (synopsis "High performance functional utilities")
14365 (description
14366 "The cytoolz package implements the same API as provided by toolz. The
14367main differences are that @code{cytoolz} is faster and cytoolz offers a C API
14368that is accessible to other projects developed in Cython.")
14369 (license license:bsd-3)))
14370
14371(define-public python-sortedcontainers
14372 (package
14373 (name "python-sortedcontainers")
14374 (version "2.0.4")
14375 (source
14376 (origin
14377 (method url-fetch)
14378 (uri (pypi-uri "sortedcontainers" version))
14379 (sha256
14380 (base32
14381 "10hrk2k0hbf9x78vd3f0lj277m1yzfhzzxr0hja718liwb398wk0"))))
14382 (build-system python-build-system)
14383 (native-inputs
14384 `(("python-tox" ,python-tox)))
14385 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
14386 (synopsis "Sorted List, Sorted Dict, Sorted Set")
14387 (description
14388 "This package provides a sorted collections library, written in
14389pure-Python.")
14390 (license license:asl2.0)))
14391
14392(define-public python-cloudpickle
14393 (package
14394 (name "python-cloudpickle")
14395 (version "0.6.1")
14396 (source
14397 (origin
14398 (method url-fetch)
14399 (uri (pypi-uri "cloudpickle" version))
14400 (sha256
14401 (base32
14402 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
14403 (build-system python-build-system)
14404 ;; FIXME: there are 5 errors in 122 tests:
14405 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
14406 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
14407 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
14408 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
14409 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
14410 ;; TypeError: cannot serialize '_io.BufferedRandom' object
14411 (arguments '(#:tests? #f))
14412 (native-inputs
14413 `(("python-pytest" ,python-pytest)
14414 ("python-mock" ,python-mock)
14415 ("python-tornado" ,python-tornado)))
14416 (home-page "https://github.com/cloudpipe/cloudpickle")
14417 (synopsis "Extended pickling support for Python objects")
14418 (description
14419 "Cloudpickle makes it possible to serialize Python constructs not
14420supported by the default pickle module from the Python standard library. It
14421is especially useful for cluster computing where Python expressions are
14422shipped over the network to execute on remote hosts, possibly close to the
14423data.")
14424 (license license:bsd-3)))
14425
14426(define-public python2-cloudpickle
14427 (package-with-python2 python-cloudpickle))
14428
14429(define-public python-locket
14430 (package
14431 (name "python-locket")
14432 (version "0.2.0")
14433 (source
14434 (origin
14435 (method url-fetch)
14436 (uri (pypi-uri "locket" version))
14437 (sha256
14438 (base32
14439 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
14440 (build-system python-build-system)
14441 (home-page "https://github.com/mwilliamson/locket.py")
14442 (synopsis "File-based locks for Python")
14443 (description
14444 "Locket implements a lock that can be used by multiple processes provided
14445they use the same path.")
14446 (license license:bsd-2)))
14447
14448(define-public python2-locket
14449 (package-with-python2 python-locket))
14450
14451(define-public python-blosc
14452 (package
14453 (name "python-blosc")
14454 (version "1.5.1")
14455 (source
14456 (origin
14457 (method url-fetch)
14458 (uri (pypi-uri "blosc" version))
14459 (sha256
14460 (base32
14461 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
14462 (build-system python-build-system)
14463 ;; FIXME: all tests pass, but then this error is printed:
14464 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
14465 (arguments '(#:tests? #f))
14466 (propagated-inputs
14467 `(("python-numpy" ,python-numpy)))
14468 (home-page "https://github.com/blosc/python-blosc")
14469 (synopsis "Python wrapper for the Blosc data compressor library")
14470 (description "Blosc is a high performance compressor optimized for binary
14471data. It has been designed to transmit data to the processor cache faster
14472than the traditional, non-compressed, direct memory fetch approach via a
14473@code{memcpy()} system call.
14474
14475Blosc works well for compressing numerical arrays that contains data with
14476relatively low entropy, like sparse data, time series, grids with
14477regular-spaced values, etc.
14478
14479This Python package wraps the Blosc library.")
14480 (license license:bsd-3)))
14481
14482(define-public python2-blosc
14483 (package-with-python2 python-blosc))
14484
14485(define-public python-partd
14486 (package
14487 (name "python-partd")
14488 (version "0.3.9")
14489 (source
14490 (origin
14491 (method url-fetch)
14492 (uri (pypi-uri "partd" version))
14493 (sha256
14494 (base32
14495 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
14496 (build-system python-build-system)
14497 (propagated-inputs
14498 `(("python-blosc" ,python-blosc)
14499 ("python-locket" ,python-locket)
14500 ("python-numpy" ,python-numpy)
14501 ("python-pandas" ,python-pandas)
14502 ("python-pyzmq" ,python-pyzmq)
14503 ("python-toolz" ,python-toolz)))
14504 (home-page "https://github.com/dask/partd/")
14505 (synopsis "Appendable key-value storage")
14506 (description "Partd stores key-value pairs. Values are raw bytes. We
14507append on old values. Partd excels at shuffling operations.")
14508 (license license:bsd-3)))
14509
14510(define-public python2-partd
14511 (package-with-python2 python-partd))
14512
14513(define-public python-dask
14514 (package
14515 (name "python-dask")
14516 (version "1.0.0")
14517 (source
14518 (origin
14519 (method url-fetch)
14520 (uri (pypi-uri "dask" version))
14521 (sha256
14522 (base32
14523 "1xwz8h020ipwav2p5gcq9pskya1cvzd6hjyvd06dvr3w5lxlmym1"))))
14524 (build-system python-build-system)
14525 ;; A single test out of 5000+ fails. This test is marked as xfail when
14526 ;; pytest-xdist is used.
14527 (arguments
14528 `(#:phases
14529 (modify-phases %standard-phases
14530 (add-after 'unpack 'disable-broken-test
14531 (lambda _
14532 (substitute* "dask/tests/test_threaded.py"
14533 (("def test_interrupt\\(\\)" m)
14534 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
14535 m)))
14536 (when (which "python2")
14537 ;; This test fails with recent Pandas:
14538 ;; <https://github.com/dask/dask/issues/3794>.
14539 (substitute* "dask/dataframe/tests/test_dataframe.py"
14540 (("def test_info\\(\\)" m)
14541 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
14542 m))))
14543 #t))
14544 (replace 'check
14545 (lambda _ (invoke "pytest" "-vv"))))))
14546 (propagated-inputs
14547 `(("python-cloudpickle" ,python-cloudpickle)
14548 ("python-numpy" ,python-numpy)
14549 ("python-pandas" ,python-pandas)
14550 ("python-partd" ,python-partd)
14551 ("python-toolz" ,python-toolz)
14552 ("python-pyyaml" ,python-pyyaml)))
14553 (native-inputs
14554 `(("python-pytest" ,python-pytest)
14555 ("python-pytest-runner" ,python-pytest-runner)))
14556 (home-page "https://github.com/dask/dask/")
14557 (synopsis "Parallel computing with task scheduling")
14558 (description
14559 "Dask is a flexible parallel computing library for analytics. It
14560consists of two components: dynamic task scheduling optimized for computation,
14561and large data collections like parallel arrays, dataframes, and lists that
14562extend common interfaces like NumPy, Pandas, or Python iterators to
14563larger-than-memory or distributed environments. These parallel collections
14564run on top of the dynamic task schedulers. ")
14565 (license license:bsd-3)))
14566
14567(define-public python2-dask
14568 (package-with-python2 python-dask))
14569
14570(define-public python-ilinkedlist
14571 (package
14572 (name "python-ilinkedlist")
14573 (version "0.4.0")
14574 (source
14575 (origin
14576 (method url-fetch)
14577 (uri (pypi-uri "ilinkedlist" version))
14578 (sha256
14579 (base32
14580 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
14581 (build-system python-build-system)
14582 (native-inputs `(("python-pytest" ,python-pytest)))
14583 (inputs `(("python" ,python)))
14584 (home-page "https://github.com/luther9/ilinkedlist-py")
14585 (synopsis "Immutable linked list library")
14586 (description
14587 "This is a implementation of immutable linked lists for Python. It
14588contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
14589Since a linked list is treated as immutable, it is hashable, and its length
14590can be retrieved in constant time. Some of the terminology is inspired by
14591LISP. It is possible to create an improper list by creating a @code{Pair}
14592with a non-list @code{cdr}.")
14593 (license license:gpl3+)))
14594
14595(define-public python-readlike
14596 (package
14597 (name "python-readlike")
14598 (version "0.1.3")
14599 (source
14600 (origin
14601 (method url-fetch)
14602 (uri (pypi-uri "readlike" version))
14603 (sha256
14604 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
14605 (build-system python-build-system)
14606 (home-page "https://github.com/jangler/readlike")
14607 (synopsis "GNU Readline-like line editing module")
14608 (description
14609 "This Python module provides line editing functions similar to the default
14610Emacs-style ones of GNU Readline. Unlike the Python standard library's
14611@code{readline} package, this one allows access to those capabilties in settings
14612outside of a standard command-line interface. It is especially well-suited to
14613interfacing with Urwid, due to a shared syntax for describing key inputs.
14614
14615Currently, all stateless Readline commands are implemented. Yanking and history
14616are not supported.")
14617 (license license:expat)))
14618
14619(define-public python2-readlike
14620 (package-with-python2 python-readlike))
14621
14622(define-public python-reparser
14623 (package
14624 (name "python-reparser")
14625 (version "1.4.3")
14626 (source
14627 (origin
14628 (method url-fetch)
14629 (uri (pypi-uri "ReParser" version))
14630 (sha256
14631 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
14632 (build-system python-build-system)
14633 (home-page "https://github.com/xmikos/reparser")
14634 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
14635 (description
14636 "This Python library provides a simple lexer/parser for inline markup based
14637on regular expressions.")
14638 (license license:expat)))
14639
14640(define-public python2-reparser
14641 (let ((reparser (package-with-python2
14642 (strip-python2-variant python-reparser))))
14643 (package (inherit reparser)
14644 (propagated-inputs
14645 `(("python2-enum34" ,python2-enum34)
14646 ,@(package-propagated-inputs reparser))))))
14647
14648(define-public python-precis-i18n
14649 (package
14650 (name "python-precis-i18n")
14651 (version "1.0.0")
14652 (source
14653 (origin
14654 (method url-fetch)
14655 (uri (pypi-uri "precis_i18n" version))
14656 (sha256
14657 (base32
14658 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
14659 (build-system python-build-system)
14660 (home-page "https://github.com/byllyfish/precis_i18n")
14661 (synopsis "Implementation of the PRECIS framework")
14662 (description
14663 "This module implements the PRECIS Framework as described in RFC 8264,
14664RFC 8265 and RFC 8266.")
14665 (license license:expat)))
14666
d0446c4b
RW
14667(define-public python-absl-py
14668 (package
14669 (name "python-absl-py")
14670 (version "0.6.1")
14671 (source
14672 (origin
14673 (method url-fetch)
14674 (uri (pypi-uri "absl-py" version))
14675 (sha256
14676 (base32
14677 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
14678 (build-system python-build-system)
14679 (propagated-inputs
14680 `(("python-six" ,python-six)))
14681 (home-page "https://github.com/abseil/abseil-py")
14682 (synopsis "Abseil Python common libraries")
14683 (description
14684 "This package provides the Abseil Python Common Libraries, a collection
14685of Python libraries for building Python applications.")
14686 (license license:asl2.0)))
14687
81bed4e9
RW
14688(define-public python-astor
14689 (package
14690 (name "python-astor")
14691 (version "0.7.1")
14692 (source
14693 (origin
14694 (method url-fetch)
14695 (uri (pypi-uri "astor" version))
14696 (sha256
14697 (base32
14698 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
14699 (build-system python-build-system)
14700 ;; FIXME: There are two errors and two test failures.
14701 (arguments `(#:tests? #f))
14702 (home-page "https://github.com/berkerpeksag/astor")
14703 (synopsis "Read/rewrite/write Python ASTs")
14704 (description "Astor is designed to allow easy manipulation of Python
14705source via the AST.")
14706 (license license:bsd-3)))
14707
22e623ae
RW
14708(define-public python-grpcio
14709 (package
14710 (name "python-grpcio")
14711 (version "1.17.1")
14712 (source
14713 (origin
14714 (method url-fetch)
14715 (uri (pypi-uri "grpcio" version))
14716 (sha256
14717 (base32
14718 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
14719 (build-system python-build-system)
14720 (propagated-inputs
14721 `(("python-six" ,python-six)))
14722 (home-page "https://grpc.io")
14723 (synopsis "HTTP/2-based RPC framework")
14724 (description "This package provides a Python library for communicating
14725with the HTTP/2-based RPC framework gRPC.")
14726 (license license:asl2.0)))
14727
79869f80
RW
14728(define-public python-astunparse
14729 (package
14730 (name "python-astunparse")
14731 (version "1.6.1")
14732 (source
14733 (origin
14734 (method url-fetch)
14735 (uri (pypi-uri "astunparse" version))
14736 (sha256
14737 (base32
14738 "1jhidwyrqn17avqh9xnnm3wd7q7aahaq009cba67g86y6gxicyyj"))))
14739 (build-system python-build-system)
14740 (arguments '(#:tests? #f)) ; there are none
14741 (propagated-inputs
14742 `(("python-six" ,python-six)
14743 ("python-wheel" ,python-wheel)))
14744 (home-page "https://github.com/simonpercivall/astunparse")
14745 (synopsis "AST unparser for Python")
14746 (description "This package provides an AST unparser for Python. It is a
14747factored out version of @code{unparse} found in the Python source
14748distribution.")
14749 (license license:bsd-3)))
14750
2884aac0
RW
14751(define-public python-gast
14752 (package
14753 (name "python-gast")
14754 (version "0.2.0")
14755 (source
14756 (origin
14757 (method url-fetch)
14758 (uri (pypi-uri "gast" version))
14759 (sha256
14760 (base32
14761 "0c296xm1vz9x4w4inmdl0k8mnc0i9arw94si2i7pglpc461r0s3h"))))
14762 (build-system python-build-system)
14763 (propagated-inputs
14764 `(("python-astunparse" ,python-astunparse)))
14765 (home-page "https://pypi.org/project/gast/")
14766 (synopsis "Generic Python AST that abstracts the underlying Python version")
14767 (description
14768 "GAST provides a compatibility layer between the AST of various Python
14769versions, as produced by @code{ast.parse} from the standard @code{ast}
14770module.")
14771 (license license:bsd-3)))
14772
44d10b1f
RW
14773(define-public python-wikidata
14774 (package
14775 (name "python-wikidata")
14776 (version "0.6.1")
14777 (source
14778 (origin
14779 (method url-fetch)
14780 (uri (pypi-uri "Wikidata" version))
14781 (sha256
14782 (base32
14783 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
14784 (build-system python-build-system)
14785 (propagated-inputs
14786 `(("python-babel" ,python-babel)))
14787 (home-page "https://github.com/dahlia/wikidata")
14788 (synopsis "Wikidata client library")
14789 (description
14790 "This package provides a Python interface to
14791@url{https://www.wikidata.org/, Wikidata}.")
14792 (properties '((upstream-name . "Wikidata")))
14793 (license license:gpl3+)))
14794
14795(define-public python-doctest-ignore-unicode
14796 (package
14797 (name "python-doctest-ignore-unicode")
14798 (version "0.1.2")
14799 (source
14800 (origin
14801 (method url-fetch)
14802 (uri (pypi-uri "doctest-ignore-unicode" version))
14803 (sha256
14804 (base32
14805 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
14806 (build-system python-build-system)
14807 (native-inputs
14808 `(("python-nose" ,python-nose)))
14809 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
14810 (synopsis "Ignore Unicode literal prefixes in doctests")
14811 (description
14812 "This package adds support for a flag to ignore Unicode literal prefixes
14813in doctests.")
14814 (license license:asl2.0)))
14815
14816(define-public python-attr
14817 (package
14818 (name "python-attr")
14819 (version "0.3.1")
14820 (source
14821 (origin
14822 (method url-fetch)
14823 (uri (pypi-uri "attr" version))
14824 (sha256
14825 (base32
14826 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
14827 (build-system python-build-system)
14828 (home-page "https://github.com/denis-ryzhkov/attr")
14829 (synopsis "Decorator for attributes of target function or class")
14830 (description "Simple decorator to set attributes of target function or
14831class in a @acronym{DRY, Don't Repeat Yourself} way.")
14832 (license license:expat)))