gnu: python-pep8-1.5.7: Use PYPI-URI.
[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")
1340 (version "3.0.1")
1341 (source (origin
1342 (method url-fetch)
1343 (uri (string-append "mirror://sourceforge/scons/scons/" version
1344 "/scons-" version ".tar.gz"))
1345 (sha256
1346 (base32
1347 "0wzid419mlwqw9llrg8gsx4nkzhqy16m4m40r0xnh6cwscw5wir4"))))
1348 (build-system python-build-system)
1349 (arguments
1350 `(#:use-setuptools? #f ; still relies on distutils
1351 #:tests? #f)) ; no 'python setup.py test' command
1352 (home-page "http://scons.org/")
1353 (synopsis "Software construction tool written in Python")
1354 (description
1355 "SCons is a software construction tool. Think of SCons as an improved,
1356cross-platform substitute for the classic Make utility with integrated
1357functionality similar to autoconf/automake and compiler caches such as ccache.
1358In short, SCons is an easier, more reliable and faster way to build
1359software.")
1360 (license license:x11)))
1361
1362(define-public scons-python2
1363 (package
1364 (inherit (package-with-python2 scons))
1365 (name "scons-python2")))
1366
1367(define-public python-extras
1368 (package
1369 (name "python-extras")
1370 (version "1.0.0")
1371 (source
1372 (origin
1373 (method url-fetch)
1374 (uri (pypi-uri "extras" version))
1375 (sha256
1376 (base32
1377 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1378 (build-system python-build-system)
1379 (arguments
1380 ;; FIXME: Circular dependency on testtools.
1381 '(#:tests? #f))
1382 (home-page "https://github.com/testing-cabal/extras")
1383 (synopsis "Useful extensions to the Python standard library")
1384 (description
1385 "Extras is a set of extensions to the Python standard library.")
1386 (license license:expat)))
1387
1388(define-public python2-extras
1389 (package-with-python2 python-extras))
1390
1391(define-public python-mimeparse
1392 (package
1393 (name "python-mimeparse")
1394 (version "1.6.0")
1395 (source
1396 (origin
1397 (method url-fetch)
89bf667c 1398 (uri (pypi-uri "python-mimeparse" version))
44d10b1f
RW
1399 (sha256
1400 (base32
1401 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
1402 (build-system python-build-system)
1403 (arguments
1404 '(#:phases
1405 (modify-phases %standard-phases
1406 (replace 'check
1407 (lambda _
1408 (invoke "./mimeparse_test.py"))))))
1409 (home-page
1410 "https://github.com/dbtsai/python-mimeparse")
1411 (synopsis "Python library for parsing MIME types")
1412 (description
1413 "Mimeparse provides basic functions for parsing MIME type names and
1414matching them against a list of media-ranges.")
1415 (license license:expat)))
1416
1417(define-public python2-mimeparse
1418 (package-with-python2 python-mimeparse))
1419
1420(define-public python-miniboa
1421 (package
1422 (name "python-miniboa")
1423 (version "1.0.7")
1424 (source
1425 (origin
1426 (method url-fetch)
1427 (uri (pypi-uri "miniboa" version))
1428 (sha256
1429 (base32
1430 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
1431 (build-system python-build-system)
1432 (home-page "https://github.com/shmup/miniboa")
1433 (synopsis "Simple, single-threaded Telnet server")
1434 (description
1435 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
1436server.")
1437 (license license:asl2.0)))
1438
1439(define-public python2-miniboa
1440 (package-with-python2 python-miniboa))
1441
1442(define-public python-pafy
1443 (package
1444 (name "python-pafy")
1445 (version "0.5.3.1")
1446 (source
1447 (origin
1448 (method url-fetch)
1449 (uri (pypi-uri "pafy" version))
1450 (sha256
1451 (base32
1452 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1453 (build-system python-build-system)
1454 (arguments
1455 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1456 (propagated-inputs
1457 ;; Youtube-dl is a python package which is imported in the file
1458 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1459 `(("youtube-dl" ,youtube-dl)))
1460 (home-page "https://np1.github.io/pafy/")
1461 (synopsis "Retrieve YouTube content and metadata")
1462 (description
1463 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1464 (license license:lgpl3+)))
1465
1466(define-public python2-funcsigs
1467 (package
1468 (name "python2-funcsigs")
1469 (version "1.0.2")
1470 (source (origin
1471 (method url-fetch)
1472 (uri (pypi-uri "funcsigs" version))
1473 (sha256
1474 (base32
1475 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1476 (build-system python-build-system)
1477 (arguments
1478 `(#:python ,python-2))
1479 (native-inputs
1480 `(("python2-unittest2" ,python2-unittest2)))
1481 (home-page "http://funcsigs.readthedocs.org")
1482 (synopsis "Python function signatures from PEP362")
1483 (description
1484 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1485 (license license:asl2.0)))
1486
1487(define-public python2-funcsigs-bootstrap
1488 (package
1489 (inherit python2-funcsigs)
1490 (name "python2-funcsigs-bootstrap")
1491 (native-inputs `())
1492 (arguments
1493 `(#:tests? #f
1494 ,@(package-arguments python2-funcsigs)))))
1495
1496(define-public python-py
1497 (package
1498 (name "python-py")
1499 (version "1.5.4")
1500 (source
1501 (origin
1502 (method url-fetch)
1503 (uri (pypi-uri "py" version))
1504 (sha256
1505 (base32
1506 "1xxvwfn82457djf55f5n2c94699rfqnk43br8fif2r2q8gvrmm9z"))))
1507 (build-system python-build-system)
1508 (arguments
1509 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1510 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1511 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1512 ;; Is this module globally installed?"
1513 '(#:tests? #f))
1514 (native-inputs
1515 `(("python-setuptools-scm" ,python-setuptools-scm)))
1516 (home-page "https://github.com/pytest-dev/py")
1517 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1518 (description
1519 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1520code introspection, and logging.")
1521 (license license:expat)))
1522
1523(define-public python2-py
1524 (package-with-python2 python-py))
1525
1526;; Recent versions of python-fixtures and python-testrepository need
1527;; python-pbr for packaging, which itself needs these two packages for
1528;; testing.
1529;; To fix this circular dependency, we use a build of python-pbr, based on the
1530;; same source, just without any test dependencies and with tests disabled.
1531;; python-pbr-minmal is then used to package python-fixtures and
1532;; python-testrepository.
1533;; Strictly speaking we currently could remove the test-requirements from the
1534;; normal python-pbr package (and save this package) since test are disabled
1535;; there anyway. But this may change in future.
1536(define-public python-pbr-minimal
1537 (package
1538 (name "python-pbr-minimal")
1539 (version "3.0.1")
1540 (source
1541 (origin
1542 (method url-fetch)
1543 (uri (pypi-uri "pbr" version))
1544 (sha256
1545 (base32
1546 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
1547 (build-system python-build-system)
1548 (arguments
1549 `(#:tests? #f))
1550 (home-page "http://docs.openstack.org/developer/pbr/")
1551 (synopsis "Minimal build of python-pbr used for bootstrapping")
1552 (description
1553 "Used only for bootstrapping python2-pbr, you should not need this.")
1554 (license license:asl2.0)))
1555
1556(define-public python2-pbr-minimal
1557 (package-with-python2 python-pbr-minimal))
1558
1559(define-public python-pbr
1560 (package
1561 (inherit python-pbr-minimal)
1562 (name "python-pbr")
1563 (arguments
1564 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1565 (propagated-inputs
1566 `(("git" ,git))) ;; pbr actually uses the "git" binary.
1567 (native-inputs
1568 `(("python-fixtures" ,python-fixtures-bootstrap)
1569 ;; discover, coverage, hacking, subunit
1570 ("python-mock" ,python-mock)
1571 ("python-six" ,python-six)
1572 ("python-sphinx" ,python-sphinx)
1573 ("python-testrepository" ,python-testrepository-bootstrap)
1574 ("python-testresources" ,python-testresources-bootstrap)
1575 ("python-testscenarios" ,python-testscenarios-bootstrap)
1576 ("python-testtools" ,python-testtools-bootstrap)
1577 ("python-virtualenv" ,python-virtualenv)))
1578 (synopsis "Enhance the default behavior of Python’s setuptools")
1579 (description
1580 "Python Build Reasonableness (PBR) is a library that injects some useful
1581and sensible default behaviors into your setuptools run. It will set
1582versions, process requirements files and generate AUTHORS and ChangeLog file
1583from git information.
1584")))
1585
1586(define-public python2-pbr
1587 (package-with-python2 python-pbr))
1588
1589(define-public python-exif-read
1590 (package
1591 (name "python-exif-read")
1592 (version "2.1.2")
1593 (source (origin
1594 (method url-fetch)
1595 (uri (pypi-uri "ExifRead" version))
1596 (sha256
1597 (base32
1598 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
1599 (build-system python-build-system)
1600 (arguments `(#:tests? #f)) ; no tests
1601 (home-page "https://github.com/ianare/exif-py")
1602 (synopsis "Python library to extract EXIF data from image files")
1603 (description
1604 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1605files.")
1606 (license license:bsd-3)))
1607
1608(define-public python2-exif-read
1609 (package-with-python2 python-exif-read))
1610
1611(define-public python-pyld
1612 (package
1613 (name "python-pyld")
1614 (version "1.0.3")
1615 (source (origin
1616 (method url-fetch)
1617 (uri (pypi-uri "PyLD" version))
1618 (sha256
1619 (base32
1620 "12i2g6xdj30k7xxcibg3sc5y76snwq8l6n8fy9lyi577kgy0h2pm"))))
1621 (build-system python-build-system)
1622 (home-page "https://github.com/digitalbazaar/pyld")
1623 (synopsis "Python implementation of the JSON-LD specification")
1624 (description
1625 "PyLD is an implementation of the JSON-LD specification.")
1626 (license license:bsd-3)))
1627
1628(define-public python2-pyld
1629 (package-with-python2 python-pyld))
1630
1631(define-public python-click
1632 (package
1633 (name "python-click")
61984855 1634 (version "7.0")
44d10b1f
RW
1635 (source
1636 (origin
1637 (method url-fetch)
1638 (uri (pypi-uri "click" version))
1639 (sha256
1640 (base32
61984855 1641 "1mzjixd4vjbjvzb6vylki9w1556a9qmdh35kzmq6cign46av952v"))))
44d10b1f
RW
1642 (build-system python-build-system)
1643 (arguments
8d7e7ca6 1644 `(#:phases
44d10b1f
RW
1645 (modify-phases %standard-phases
1646 (add-after 'unpack 'fix-paths
1647 (lambda* (#:key inputs #:allow-other-keys)
1648 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
1649 "cross-libc" "libc"))))
1650 (substitute* "click/_unicodefun.py"
1651 (("'locale'")
1652 (string-append "'" glibc "/bin/locale'"))))
8d7e7ca6
EF
1653 #t))
1654 (replace 'check
1655 (lambda _
1656 (invoke "python" "-m" "pytest"))))))
44d10b1f
RW
1657 (native-inputs
1658 `(("python-pytest" ,python-pytest)))
61984855 1659 (home-page "https://palletsprojects.com/p/click/")
44d10b1f
RW
1660 (synopsis "Command line library for Python")
1661 (description
1662 "Click is a Python package for creating command line interfaces in a
1663composable way with as little code as necessary. Its name stands for
1664\"Command Line Interface Creation Kit\". It's highly configurable but comes
1665with sensible defaults out of the box.")
1666 (license license:bsd-3)))
1667
1668(define-public python2-click
1669 (package-with-python2 python-click))
1670
1671(define-public python-wheel
1672 (package
1673 (name "python-wheel")
1674 (version "0.30.0a0")
1675 (source
1676 (origin
1677 (method url-fetch)
1678 (uri (pypi-uri "wheel" version))
1679 (sha256
1680 (base32
1681 "1nm6mn8isny0hr86rhbfrpfj867c0phf001xgsd69xfp9ady1wwq"))))
1682 (build-system python-build-system)
1683 (native-inputs
1684 `(("python-jsonschema" ,python-jsonschema)
1685 ("python-pytest-cov" ,python-pytest-cov)))
1686 (home-page "https://bitbucket.org/pypa/wheel/")
1687 (synopsis "Format for built Python packages")
1688 (description
1689 "A wheel is a ZIP-format archive with a specially formatted filename and
1690the @code{.whl} extension. It is designed to contain all the files for a PEP
1691376 compatible install in a way that is very close to the on-disk format. Many
1692packages will be properly installed with only the @code{Unpack} step and the
1693unpacked archive preserves enough information to @code{Spread} (copy data and
1694scripts to their final locations) at any later time. Wheel files can be
1695installed with a newer @code{pip} or with wheel's own command line utility.")
1696 (license license:expat)
1697 (properties `((python2-variant . ,(delay python2-wheel))))))
1698
1699(define-public python2-wheel
1700 (let ((wheel (package-with-python2
1701 (strip-python2-variant python-wheel))))
1702 (package (inherit wheel)
1703 (native-inputs `(("python2-functools32" ,python2-functools32)
1704 ,@(package-native-inputs wheel))))))
1705
1706(define-public python-vcversioner
1707 (package
1708 (name "python-vcversioner")
1709 (version "2.16.0.0")
1710 (source
1711 (origin
1712 (method url-fetch)
1713 (uri (pypi-uri "vcversioner" version))
1714 (sha256
1715 (base32
1716 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
1717 (build-system python-build-system)
1718 (synopsis "Python library for version number discovery")
1719 (description "Vcversioner is a Python library that inspects tagging
1720information in a variety of version control systems in order to discover
1721version numbers.")
1722 (home-page "https://github.com/habnabit/vcversioner")
1723 (license license:isc)))
1724
1725(define-public python2-vcversioner
1726 (package-with-python2 python-vcversioner))
1727
1728(define-public python-jsonschema
1729 (package
1730 (name "python-jsonschema")
1731 (version "2.6.0")
1732 (source (origin
1733 (method url-fetch)
786ccb87 1734 (uri (pypi-uri "jsonschema" version))
44d10b1f
RW
1735 (sha256
1736 (base32
1737 "00kf3zmpp9ya4sydffpifn0j0mzm342a2vzh82p6r0vh10cg7xbg"))))
1738 (build-system python-build-system)
1739 (arguments
1740 '(#:phases
1741 (modify-phases %standard-phases
8d466799 1742 (replace 'check (lambda _ (invoke "nosetests"))))))
44d10b1f
RW
1743 (native-inputs
1744 `(("python-nose" ,python-nose)
1745 ("python-vcversioner" ,python-vcversioner)))
1746 (home-page "https://github.com/Julian/jsonschema")
1747 (synopsis "Implementation of JSON Schema for Python")
1748 (description
1749 "Jsonschema is an implementation of JSON Schema for Python.")
1750 (license license:expat)
1751 (properties `((python2-variant . ,(delay python2-jsonschema))))))
1752
1753(define-public python2-jsonschema
1754 (let ((jsonschema (package-with-python2
1755 (strip-python2-variant python-jsonschema))))
1756 (package (inherit jsonschema)
1757 (native-inputs
1758 `(("python2-mock" ,python2-mock)
1759 ,@(package-native-inputs jsonschema)))
1760 (propagated-inputs
1761 `(("python2-functools32" ,python2-functools32))))))
1762
1763(define-public python-schema
1764 (package
1765 (name "python-schema")
1766 (version "0.6.6")
1767 (source
1768 (origin
1769 (method url-fetch)
1770 (uri (pypi-uri "schema" version))
1771 (sha256
1772 (base32
1773 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
1774 (build-system python-build-system)
1775 (native-inputs
1776 `(("python-pytest" ,python-pytest)))
1777 (home-page "https://github.com/keleshev/schema")
1778 (synopsis "Simple data validation library")
1779 (description
1780 "@code{python-schema} is a library for validating Python data
1781structures, such as those obtained from config-files, forms, external
1782services or command-line parsing, converted from JSON/YAML (or
1783something else) to Python data-types.")
1784 (license license:psfl)))
1785
1786(define-public python2-schema
1787 (package-with-python2 python-schema))
1788
1789(define-public python-schema-0.5
1790 (package (inherit python-schema)
1791 (version "0.5.0")
1792 (source
1793 (origin
1794 (method url-fetch)
1795 (uri (pypi-uri "schema" version))
1796 (sha256
1797 (base32
1798 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
1799
1800(define-public python2-schema-0.5
1801 (package-with-python2 python-schema-0.5))
1802
1803(define-public python-kitchen
1804 (package
1805 (name "python-kitchen")
1806 (version "1.2.5")
1807 (source
1808 (origin
1809 (method url-fetch)
1810 (uri (pypi-uri "kitchen" version))
1811 (sha256
1812 (base32
1813 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
1814 (build-system python-build-system)
1815 (propagated-inputs
1816 `(("python-chardet" ,python-chardet)))
1817 (home-page "https://github.com/fedora-infra/kitchen")
1818 (synopsis "Python API for snippets")
1819 (description "@code{kitchen} module provides a python API for all sorts of
1820little useful snippets of code that everybody ends up writing for their projects
1821but never seem big enough to build an independent release. Use kitchen and stop
1822cutting and pasting that code over and over.")
1823 (license (list license:lgpl2.1+
1824 ;; subprocess.py, test_subprocess.py,
1825 ;; kitchen/pycompat25/defaultdict.py:
1826 license:psfl))))
1827
1828(define-public python2-kitchen
1829 (package-with-python2 python-kitchen))
1830
1831(define-public python-unidecode
1832 (package
1833 (name "python-unidecode")
1834 (version "1.0.23")
1835 (source (origin
1836 (method url-fetch)
1837 (uri (pypi-uri "Unidecode" version))
1838 (sha256
1839 (base32
1840 "1ysjbr3nqfqj97h8zyj3v9pya413vkv7a1mzml80w37xx15kb1cb"))))
1841 (build-system python-build-system)
1842 (home-page "https://pypi.python.org/pypi/Unidecode")
1843 (synopsis "ASCII transliterations of Unicode text")
1844 (description
1845 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
1846useful when integrating with legacy code that doesn't support Unicode, or for
1847ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
1848machine identifiers from human-readable Unicode strings that should still be
1849somewhat intelligible.")
1850 (license license:gpl2+)))
1851
1852(define-public python2-unidecode
1853 (package-with-python2 python-unidecode))
1854
1855(define-public python-pyjwt
1856 (package
1857 (name "python-pyjwt")
1858 (version "1.5.3")
1859 (source
1860 (origin
1861 (method url-fetch)
1862 (uri (pypi-uri "PyJWT" version))
1863 (sha256
1864 (base32
1865 "1rxsg14i33vm2i6lz0my628108c81k43v10n4h3p0gx62xdyf2sh"))
1866 (modules '((guix build utils)))
1867 (snippet
1868 '(begin
1869 (for-each delete-file-recursively
1870 (find-files "." "\\.pyc$"))
1871 #t))))
1872 (build-system python-build-system)
1873 (native-inputs
1874 `(("python-pytest" ,python-pytest)
1875 ("python-pytest-cov" ,python-pytest-cov)
1876 ("python-pytest-runner" ,python-pytest-runner)))
1877 (home-page "https://github.com/progrium/pyjwt")
1878 (synopsis "JSON Web Token implementation in Python")
1879 (description
1880 "PyJWT is a JSON Web Token implementation written in Python.")
1881 (license license:expat)))
1882
1883(define-public python2-pyjwt
1884 (package-with-python2 python-pyjwt))
1885
1886(define-public python-pykka
1887 (package
1888 (name "python-pykka")
1889 (version "1.2.1")
1890 (source
1891 (origin
1892 (method url-fetch)
1893 (uri (pypi-uri "Pykka" version))
1894 (sha256
1895 (base32
1896 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
1897 (build-system python-build-system)
1898 (native-inputs
1899 `(("python-mock" ,python-mock)
1900 ("python-nose" ,python-nose)
1901 ("python-gevent" ,python-gevent)
1902 ("python-eventlet" ,python-eventlet)))
1903 (home-page "https://www.pykka.org/")
1904 (synopsis "Pykka is a Python implementation of the actor model")
1905 (description
1906 "Pykka is a Python implementation of the actor model.
1907The actor model introduces some simple rules to control the sharing
1908of state and cooperation between execution units, which makes it
1909easier to build concurrent applications.")
1910 (license license:asl2.0)))
1911
1912(define-public python2-pykka
1913 (package-with-python2 python-pykka))
1914
1915(define-public python-pympler
1916 (package
1917 (name "python-pympler")
1918 (home-page "https://pythonhosted.org/Pympler/")
1919 (version "0.5")
1920 (source (origin
1921 (method url-fetch)
1922 (uri (pypi-uri "Pympler" version))
1923 (sha256
1924 (base32
1925 "03qwsbilqgvnbl3a1jmpgixbr2kq6m3fvdlzyr3wdp01bwlc85kx"))))
1926 (build-system python-build-system)
1927 (arguments
1928 `(#:phases (modify-phases %standard-phases
1929 (delete 'check)
1930 (add-after 'install 'check
1931 (lambda* (#:key inputs outputs #:allow-other-keys)
1932 (add-installed-pythonpath inputs outputs)
1933 (invoke "python" "setup.py" "test"))))))
1934 (synopsis "Measure, monitor and analyze memory behavior")
1935 (description
1936 "Pympler is a development tool to measure, monitor and analyze
1937the memory behavior of Python objects in a running Python application.
1938
1939By pympling a Python application, detailed insight in the size and the
1940lifetime of Python objects can be obtained. Undesirable or unexpected
1941runtime behavior like memory bloat and other @samp{pymples} can easily
1942be identified.
1943
1944A web profiling frontend exposes process statistics, garbage
1945visualisation and class tracker statistics.")
1946 (license license:asl2.0)))
1947
1948(define-public python2-pympler
1949 (package-with-python2 python-pympler))
1950
1951(define-public python-itsdangerous
1952 (package
1953 (name "python-itsdangerous")
acfcf2ed 1954 (version "1.1.0")
44d10b1f
RW
1955 (source
1956 (origin
1957 (method url-fetch)
acfcf2ed 1958 (uri (pypi-uri "itsdangerous" version))
44d10b1f
RW
1959 (sha256
1960 (base32
acfcf2ed 1961 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
44d10b1f 1962 (build-system python-build-system)
acfcf2ed 1963 (home-page "https://palletsprojects.com/p/itsdangerous/")
44d10b1f
RW
1964 (synopsis "Python library for passing data to/from untrusted environments")
1965 (description
1966 "Itsdangerous provides various helpers to pass trusted data to untrusted
1967environments and back.")
1968 (license license:bsd-3)))
1969
1970(define-public python2-itsdangerous
1971 (package-with-python2 python-itsdangerous))
1972
1973(define-public python-pyyaml
1974 (package
1975 (name "python-pyyaml")
1976 (version "3.13")
1977 (source
1978 (origin
1979 (method url-fetch)
1980 (uri (pypi-uri "PyYAML" version))
1981 (sha256
1982 (base32
1983 "1gx603g484z46cb74j9rzr6sjlh2vndxayicvlyhxdz98lhhkwry"))))
1984 (build-system python-build-system)
1985 (inputs
1986 `(("libyaml" ,libyaml)))
1987 (home-page "http://pyyaml.org/wiki/PyYAML")
1988 (synopsis "YAML parser and emitter for Python")
1989 (description
1990 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
1991complete YAML 1.1 parser, Unicode support, pickle support, capable extension
1992API, and sensible error messages. PyYAML supports standard YAML tags and
1993provides Python-specific tags that allow to represent an arbitrary Python
1994object.")
1995 (license license:expat)))
1996
1997(define-public python2-pyyaml
1998 (package-with-python2 python-pyyaml))
1999
2000(define-public python-vine
2001 (package
2002 (name "python-vine")
2003 (version "1.1.4")
2004 (source
2005 (origin
2006 (method url-fetch)
2007 (uri (pypi-uri "vine" version))
2008 (sha256
2009 (base32
2010 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
2011 (build-system python-build-system)
2012 (native-inputs
2013 `(("python-pytest" ,python-pytest)
2014 ("python-case" ,python-case)))
2015 (home-page "https://github.com/celery/vine")
2016 (synopsis "Promises for Python")
2017 (description
2018 "@code{vine} provides a special implementation of promises in that it can
2019be used both for \"promise of a value\" and lazy evaluation. The biggest
2020upside for this is that everything in a promise can also be a promise,
2021e.g. filters, callbacks and errbacks can all be promises.")
2022 (license license:bsd-3)))
2023
2024(define-public python-virtualenv
2025 (package
2026 (name "python-virtualenv")
2782bd51 2027 (version "16.1.0")
44d10b1f
RW
2028 (source
2029 (origin
2030 (method url-fetch)
2031 (uri (pypi-uri "virtualenv" version))
2032 (sha256
2033 (base32
2782bd51 2034 "0242cg3hdq3qdvx5flyrki8lpwlgwf5k45c21ks5049fv7ygm6gq"))))
44d10b1f
RW
2035 (build-system python-build-system)
2036 (arguments
2037 `(#:phases
2038 (modify-phases %standard-phases
2782bd51 2039 (add-before 'check 'disable-failing-test
44d10b1f
RW
2040 (lambda _
2041 ;; Disable failing test. See upstream bug report
2042 ;; https://github.com/pypa/virtualenv/issues/957
2043 (substitute* "tests/test_virtualenv.py"
2044 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2782bd51 2045 #t)))))
44d10b1f
RW
2046 (native-inputs
2047 `(("python-mock" ,python-mock)
2048 ("python-pytest" ,python-pytest)))
2049 (home-page "https://virtualenv.pypa.io/")
2050 (synopsis "Virtual Python environment builder")
2051 (description
2052 "Virtualenv is a tool to create isolated Python environments.")
2053 (license license:expat)))
2054
2055(define-public python2-virtualenv
2056 (package-with-python2 python-virtualenv))
2057
2058(define-public python-markupsafe
2059 (package
2060 (name "python-markupsafe")
2061 (version "1.0")
2062 (source
2063 (origin
2064 (method url-fetch)
5182927c 2065 (uri (pypi-uri "MarkupSafe" version))
44d10b1f
RW
2066 (sha256
2067 (base32
2068 "0rdn1s8x9ni7ss8rfiacj7x1085lx8mh2zdwqslnw8xc3l4nkgm6"))))
2069 (build-system python-build-system)
2070 (home-page "https://github.com/mitsuhiko/markupsafe")
2071 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2072 (description
2073 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2074for Python.")
2075 (license license:bsd-3)))
2076
2077(define-public python2-markupsafe
2078 (package-with-python2 python-markupsafe))
2079
2080(define-public python-jinja2
2081 (package
2082 (name "python-jinja2")
2083 (version "2.10")
2084 (source
2085 (origin
2086 (method url-fetch)
2087 (uri (pypi-uri "Jinja2" version))
2088 (sha256
2089 (base32
2090 "190l36hfw3wb2n3n68yacjabxyb1pnxwn7vjx96cmjj002xy2jzq"))))
2091 (build-system python-build-system)
2092 (propagated-inputs
2093 `(("python-markupsafe" ,python-markupsafe)))
2094 (home-page "http://jinja.pocoo.org/")
2095 (synopsis "Python template engine")
2096 (description
2097 "Jinja2 is a small but fast and easy to use stand-alone template engine
2098written in pure Python.")
2099 (license license:bsd-3)))
2100
2101(define-public python2-jinja2
2102 (package-with-python2 python-jinja2))
2103
2104(define-public python-pystache
2105 (package
2106 (name "python-pystache")
2107 (version "0.5.4")
2108 (source (origin
2109 (method url-fetch)
2110 (uri (pypi-uri "pystache" version))
2111 (sha256
2112 (base32
2113 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2114 (build-system python-build-system)
2115 (arguments
2116 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2117 (home-page "http://defunkt.io/pystache/")
2118 (synopsis "Python logic-less template engine")
2119 (description
2120 "Pystache is a Python implementation of the framework agnostic,
2121logic-free templating system Mustache.")
2122 (license license:expat)
2123 (properties `((python2-variant . ,(delay python2-pystache))))))
2124
2125(define-public python2-pystache
2126 (package (inherit (package-with-python2
2127 (strip-python2-variant python-pystache)))
2128 (arguments
2129 `(#:python ,python-2
2130 #:phases
2131 (modify-phases %standard-phases
2132 (replace 'check
2133 (lambda _
dfafc29b 2134 (invoke "python" "test_pystache.py"))))))))
44d10b1f
RW
2135
2136(define-public python-joblib
2137 (package
2138 (name "python-joblib")
2139 (version "0.13.0")
2140 (source (origin
2141 (method url-fetch)
2142 (uri (pypi-uri "joblib" version))
2143 (sha256
2144 (base32
2145 "0612nazad8dxmn3xghfrmjax6456l4xy6hn9cngs7vydi14ds7v5"))))
2146 (build-system python-build-system)
2147 (arguments
2148 `(#:phases
2149 (modify-phases %standard-phases
2150 (replace 'check
2151 (lambda _ (invoke "pytest" "-v" "joblib"))))))
2152 (native-inputs
2153 `(("python-pytest" ,python-pytest)))
2154 (home-page "https://joblib.readthedocs.io/")
2155 (synopsis "Using Python functions as pipeline jobs")
2156 (description
2157 "Joblib is a set of tools to provide lightweight pipelining in Python.
2158In particular, joblib offers: transparent disk-caching of the output values
2159and lazy re-evaluation (memoize pattern), easy simple parallel computing
2160logging and tracing of the execution.")
2161 (license license:bsd-3)))
2162
2163(define-public python2-joblib
2164 (package-with-python2 python-joblib))
2165
2166(define-public python-docutils
2167 (package
2168 (name "python-docutils")
2169 (version "0.14")
2170 (source
2171 (origin
2172 (method url-fetch)
2173 (uri (pypi-uri "docutils" version))
2174 (sha256
2175 (base32
2176 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
2177 (build-system python-build-system)
2178 (arguments
2179 '(#:tests? #f)) ; no setup.py test command
2180 (home-page "http://docutils.sourceforge.net/")
2181 (synopsis "Python Documentation Utilities")
2182 (description
2183 "Docutils is a modular system for processing documentation into useful
2184formats, such as HTML, XML, and LaTeX. For input Docutils supports
2185reStructuredText.")
2186 ;; Most of the source code is public domain, but some source files are
2187 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2188 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2189
2190(define-public python2-docutils
2191 (package-with-python2 python-docutils))
2192
2193(define-public python-pygments
2194 (package
2195 (name "python-pygments")
2196 (version "2.2.0")
2197 (source
2198 (origin
2199 (method url-fetch)
2200 (uri (pypi-uri "Pygments" version))
2201 (sha256
2202 (base32
2203 "1k78qdvir1yb1c634nkv6rbga8wv4289xarghmsbbvzhvr311bnv"))))
2204 (build-system python-build-system)
2205 (arguments
2206 ;; FIXME: Tests require sphinx, which depends on this.
2207 '(#:tests? #f))
2208 (home-page "http://pygments.org/")
2209 (synopsis "Syntax highlighting")
2210 (description
2211 "Pygments is a syntax highlighting package written in Python.")
2212 (license license:bsd-2)))
2213
2214(define-public python2-pygments
2215 (package-with-python2 python-pygments))
2216
2217(define-public python-sphinxcontrib-websupport
2218 (package
2219 (name "python-sphinxcontrib-websupport")
2220 (version "1.1.0")
2221 (source (origin
2222 (method url-fetch)
2223 (uri (pypi-uri "sphinxcontrib-websupport" version))
2224 (sha256
2225 (base32
2226 "1ff3ix76xi1y6m99qxhaq5161ix9swwzydilvdya07mgbcvpzr4x"))))
2227 (build-system python-build-system)
2228 (arguments
2229 ;; FIXME: Tests depend on Sphinx, which depends on this.
2230 `(#:tests? #f))
2231 (home-page "http://sphinx-doc.org/")
2232 (synopsis "Sphinx API for web applications")
2233 (description "This package provides a Python API to easily integrate
2234Sphinx documentation into your web application. It provides tools to
2235integrate Sphinx documents in web templates and to handle searches.")
2236 (license license:bsd-3)))
2237
2238(define-public python2-sphinxcontrib-websupport
2239 (package-with-python2 python-sphinxcontrib-websupport))
2240
2241(define-public python-sphinx
2242 (package
2243 (name "python-sphinx")
2244 (version "1.7.7")
2245 (source
2246 (origin
2247 (method url-fetch)
2248 (uri (pypi-uri "Sphinx" version))
2249 (sha256
2250 (base32
2251 "0pkkbfj7cl157q550gcs45am5y78ps0h7q6455d64s1zmw01jlvi"))))
2252 (build-system python-build-system)
2253 (arguments
2254 `(#:phases
2255 (modify-phases %standard-phases
2256 (replace 'check
2257 (lambda _
2258 ;; Requires Internet access.
2259 (delete-file "tests/test_build_linkcheck.py")
2260 (substitute* "tests/test_build_latex.py"
2261 (("@pytest.mark.sphinx\\('latex', testroot='images'\\)")
2262 "@pytest.mark.skip()"))
2263 (when (which "python")
2264 ;; XXX: These tests are broken when using Python2:
2265 ;; <https://github.com/sphinx-doc/sphinx/issues/4710>.
2266 (delete-file "tests/test_api_translator.py")
2267 (delete-file "tests/test_setup_command.py"))
2268 (invoke "make" "test"))))))
2269 (propagated-inputs
2270 `(("python-imagesize" ,python-imagesize)
2271 ("python-sphinx-alabaster-theme"
2272 ,python-sphinx-alabaster-theme)
2273 ("python-babel" ,python-babel)
2274 ("python-snowballstemmer" ,python-snowballstemmer)
2275 ("python-docutils" ,python-docutils)
2276 ("python-jinja2" ,python-jinja2)
2277 ("python-packaging" ,python-packaging)
2278 ("python-pygments" ,python-pygments)
2279 ("python-requests" ,python-requests)
2280 ("python-six" ,python-six)
2281 ("python-sphinxcontrib-websupport" ,python-sphinxcontrib-websupport)))
2282 (native-inputs
2283 `(("graphviz" ,graphviz)
2284 ("imagemagick" ,imagemagick) ;for "convert"
2285 ("python-html5lib" ,python-html5lib)
2286 ("python-mock" ,python-mock)
2287 ("python-nose" ,python-nose)
2288 ("python-pytest" ,python-pytest)))
2289 (home-page "http://sphinx-doc.org/")
2290 (synopsis "Python documentation generator")
2291 (description "Sphinx is a tool that makes it easy to create documentation
2292for Python projects or other documents consisting of multiple reStructuredText
2293sources.")
2294 (license license:bsd-3)
2295 (properties `((python2-variant . ,(delay python2-sphinx))))))
2296
2297(define-public python2-sphinx
2298 (let ((base (package-with-python2 (strip-python2-variant python-sphinx))))
2299 (package
2300 (inherit base)
2301 (native-inputs `(("python2-mock" ,python2-mock)
2302 ("python2-enum34" ,python2-enum34)
2303 ,@(package-native-inputs base)))
2304 (propagated-inputs `(("python2-pytz" ,python2-pytz)
2305 ("python2-typing" ,python2-typing)
2306 ,@(package-propagated-inputs base))))))
2307
2308(define-public python-sphinx-gallery
2309 (package
2310 (name "python-sphinx-gallery")
2311 (version "0.1.13")
2312 (source (origin
2313 (method url-fetch)
2314 (uri (string-append "https://github.com/sphinx-gallery/sphinx-gallery"
2315 "/archive/v" version ".tar.gz"))
2316 (file-name (string-append name "-" version ".tar.gz"))
2317 (sha256
2318 (base32
2319 "03fs99mcb1r7qp0xixqv07vcz98sk21yq19ffdysi0infdcpzfkd"))))
2320 (build-system python-build-system)
2321 (arguments
2322 ;; FIXME: Tests attempt to download <https://docs.python.org/3/objects.inv>,
2323 ;; <https://docs.scipy.org/doc/numpy/objects.inv>, and
2324 ;; <https://matplotlib.org/objects.inv>.
2325 `(#:tests? #f))
2326 (native-inputs
2327 `(("python-pytest-runner" ,python-pytest-runner)))
2328 (home-page "https://sphinx-gallery.github.io/")
2329 (synopsis "Generate an examples gallery automatically")
2330 (description
2331 "@code{sphinx_gallery} is a Sphinx extension that builds an HTML version
2332from any set of Python scripts and puts it into an examples gallery.")
2333 (license license:bsd-3)))
2334
2335(define-public python2-sphinx-gallery
2336 (package-with-python2 python-sphinx-gallery))
2337
2338(define-public python-sphinx-rtd-theme
2339 (package
2340 (name "python-sphinx-rtd-theme")
2341 (version "0.2.4")
2342 (source
2343 (origin
2344 (method url-fetch)
2345 (uri (pypi-uri "sphinx_rtd_theme" version))
2346 (sha256
2347 (base32
2348 "05rlhjzdyapr2w74jjs7mrm8hi69qskcr5vya9f9drpsys7lpxrd"))))
2349 (build-system python-build-system)
2350 (arguments '(#:tests? #f)) ; No tests.
2351 (propagated-inputs
2352 `(("python-sphinx" ,python-sphinx)))
2353 (home-page "https://github.com/snide/sphinx_rtd_theme/")
2354 (synopsis "ReadTheDocs.org theme for Sphinx")
2355 (description "A theme for Sphinx used by ReadTheDocs.org.")
2356 (license license:expat)))
2357
2358(define-public python2-sphinx-rtd-theme
2359 (package-with-python2 python-sphinx-rtd-theme))
2360
2361(define-public python-guzzle-sphinx-theme
2362 (package
2363 (name "python-guzzle-sphinx-theme")
2364 (version "0.7.11")
2365 (source
2366 (origin
2367 (method url-fetch)
2368 (uri (pypi-uri "guzzle_sphinx_theme" version))
2369 (sha256
2370 (base32
2371 "1rnkzrrsbnifn3vsb4pfaia3nlvgvw6ndpxp7lzjrh23qcwid34v"))))
2372 (build-system python-build-system)
2373 (propagated-inputs
2374 `(("python-sphinx" ,python-sphinx)))
2375 (home-page "https://github.com/guzzle/guzzle_sphinx_theme")
2376 (synopsis "Sphinx theme used by Guzzle")
2377 (description "This package provides guzzle_sphinx_theme, a theme for the
2378Sphinx documentation system, used by @uref{http://docs.guzzlephp.org, Guzzle}
2379and several other projects.")
2380 (license license:expat)))
2381
2382(define-public python2-guzzle-sphinx-theme
2383 (package-with-python2 python-guzzle-sphinx-theme))
2384
2385(define-public python-rst.linker
2386 (package
2387 (name "python-rst.linker")
2388 (version "1.10")
2389 (source
2390 (origin
2391 (method url-fetch)
2392 (uri (pypi-uri "rst.linker" version))
2393 (sha256
2394 (base32
2395 "0iqaacp7pj1s8avs4kc0qg0r7dscywaq37y6l9j14glqdikk0wdj"))))
2396 (build-system python-build-system)
2397 (propagated-inputs
2398 `(("python-dateutil" ,python-dateutil)
2399 ("python-six" ,python-six)))
2400 (native-inputs
2401 `(("python-setuptools-scm" ,python-setuptools-scm)))
2402 ;; Test would require path.py, which would introduce a cyclic dependence.
2403 (arguments `(#:tests? #f))
2404 ;; Note: As of version 1.7 the documentation is not worth building.
2405 (home-page "https://github.com/jaraco/rst.linker")
2406 (synopsis "Sphinx plugin to add links and timestamps")
2407 (description "rst.linker allows to automatically replace text by a
2408reStructuredText external reference or timestamps. It's primary purpose is to
2409augment the changelog, but it can be used for other documents, too.")
2410 (license license:expat)))
2411
2412(define-public python2-rst.linker
2413 (package-with-python2 python-rst.linker))
2414
2415(define-public python-feedgenerator
2416 (package
2417 (name "python-feedgenerator")
2418 (version "1.9")
2419 (source
2420 (origin
2421 (method url-fetch)
2422 (uri (pypi-uri "feedgenerator" version))
2423 (sha256
2424 (base32
2425 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
2426 (modules '((guix build utils)))
2427 (snippet
2428 '(begin
2429 ;; Remove pre-compiled .pyc files from source.
2430 (for-each delete-file-recursively
2431 (find-files "." "__pycache__" #:directories? #t))
2432 (for-each delete-file (find-files "." "\\.pyc$"))
2433 #t))))
2434 (build-system python-build-system)
2435 (propagated-inputs
2436 `(("python-pytz" ,python-pytz)
2437 ("python-six" ,python-six)))
2438 (home-page "https://github.com/getpelican/feedgenerator")
2439 (synopsis
2440 "Standalone version of Django's Atom/RSS feed generator")
2441 (description
2442 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2443which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
2444 (license license:bsd-3)))
2445
2446(define-public python2-feedgenerator
2447 (package-with-python2 python-feedgenerator))
2448
2449(define-public python-toml
2450 (package
2451 (name "python-toml")
2452 (version "0.9.4")
2453 (source
2454 (origin
2455 (method url-fetch)
2456 (uri (pypi-uri "toml" version))
2457 (sha256
2458 (base32
2459 "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf"))))
2460 (build-system python-build-system)
2461 (arguments
2462 `(#:tests? #f)) ;no tests suite in release
2463 (home-page "https://github.com/uiri/toml")
2464 (synopsis "Library for TOML")
2465 (description
2466 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
2467Language (TOML) configuration files.")
2468 (license license:expat)))
2469
2470(define-public python-black
2471 (package
2472 (name "python-black")
2473 (version "18.6b4")
2474 (source
2475 (origin
2476 (method url-fetch)
2477 (uri (pypi-uri "black" version))
2478 (sha256
2479 (base32
2480 "0i4sfqgz6w15vd50kbhi7g7rifgqlf8yfr8y78rypd56q64qn592"))))
2481 (build-system python-build-system)
2482 (arguments
2483 `(#:phases
2484 (modify-phases %standard-phases
2485 (add-after 'patch-source-shebangs 'patch-extra-shebangs
2486 (lambda _
2487 (let ((python3 (which "python3")))
2488 (substitute* '("tests/data/fmtonoff.py"
2489 "tests/data/string_prefixes.py"
2490 "tests/data/function.py")
2491 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
2492 (string-append "#!" python3 (if (string? minor-version)
2493 minor-version
2494 ""))))))))))
2495 (propagated-inputs
2496 `(("python-click" ,python-click)
2497 ("python-attrs" ,python-attrs)
2498 ("python-appdirs" ,python-appdirs)
2499 ("python-toml" ,python-toml)))
2500 (home-page "https://github.com/ambv/black")
2501 (synopsis "The uncompromising code formatter")
2502 (description "Black is the uncompromising Python code formatter.")
2503 (license license:expat)))
2504
2505(define-public python-blinker
2506 (package
2507 (name "python-blinker")
2508 (version "1.4")
2509 (source
2510 (origin
2511 (method url-fetch)
2512 (uri (pypi-uri "blinker" version))
2513 (sha256
2514 (base32
2515 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
2516 (build-system python-build-system)
2517 (home-page "http://pythonhosted.org/blinker/")
2518 (synopsis "Fast, simple object-to-object and broadcast signaling")
2519 (description
2520 "Blinker provides a fast dispatching system that allows any number of
2521interested parties to subscribe to events, or \"signals\".")
2522 (license license:expat)))
2523
2524(define-public python2-blinker
2525 (package-with-python2 python-blinker))
2526
2527(define-public pelican
2528 (package
2529 (name "pelican")
2530 (version "3.7.1")
2531 (source
2532 (origin
2533 (method url-fetch)
2534 (uri (pypi-uri "pelican" version))
2535 (sha256
2536 (base32
2537 "12spygavv9b6xpb5pgp7f0p3z0mms60nx6zrpx1yfkj68zz4flra"))))
2538 (build-system python-build-system)
2539 (propagated-inputs
2540 `(("python-feedgenerator" ,python-feedgenerator)
2541 ("python-jinja2" ,python-jinja2)
2542 ("python-pygments" ,python-pygments)
2543 ("python-docutils" ,python-docutils)
2544 ("python-pytz" ,python-pytz)
2545 ("python-blinker" ,python-blinker)
2546 ("python-unidecode" ,python-unidecode)
2547 ("python-six" ,python-six)
2548 ("python-dateutil" ,python-dateutil)
2549 ("python-markdown" ,python-markdown)))
2550 (home-page "https://getpelican.com/")
2551 (arguments
2552 `(;; XXX Requires a lot more packages to do unit tests :P
2553 #:tests? #f
2554 #:phases (modify-phases %standard-phases
2555 (add-before
2556 'install 'adjust-requires
2557 ;; Since feedgenerator is installed from git, it doesn't
2558 ;; conform to the version requirements.
2559 ;;
2560 ;; We *do have* "feedgenerator >= 1.6", but strip off the
2561 ;; version requirement so setuptools doesn't get confused.
2562 (lambda _
2563 (substitute* "setup.py"
2564 (("['\"]feedgenerator.*?['\"]")
2565 "'feedgenerator'")))))))
2566 (synopsis "Python-based static site publishing system")
2567 (description
2568 "Pelican is a tool to generate a static blog from reStructuredText,
2569Markdown input files, and more. Pelican uses Jinja2 for templating
2570and is very extensible.")
2571 (license license:agpl3+)))
2572
2573(define-public python-scikit-image
2574 (package
2575 (name "python-scikit-image")
2576 (version "0.14.1")
2577 (source
2578 (origin
2579 (method url-fetch)
2580 (uri (pypi-uri "scikit-image" version))
2581 (sha256
2582 (base32 "0l1c3rl4s1jyv80i5hns4pgih09zrxfj7lygdc51w8sgyysb7ac6"))))
2583 (build-system python-build-system)
2584 (arguments
2585 ;; TODO: Some tests require running X11 server. Disable them?
2586 '(#:tests? #f))
2587 ;; See DEPENDS.txt for the list of build and run time requiremnts
2588 (propagated-inputs
2589 `(("python-cloudpickle" ,python-cloudpickle)
2590 ("python-dask" ,python-dask)
2591 ("python-matplotlib" ,python-matplotlib)
2592 ("python-networkx" ,python-networkx)
2593 ("python-numpy" ,python-numpy)
2594 ("python-pillow" ,python-pillow)
2595 ("python-pywavelets" ,python-pywavelets)
2596 ("python-scipy" ,python-scipy)
2597 ("python-six" ,python-six)))
2598 (native-inputs
2599 `(("python-cython" ,python-cython)))
2600 (home-page "http://scikit-image.org/")
2601 (synopsis "Image processing in Python")
2602 (description
2603 "Scikit-image is a collection of algorithms for image processing.")
2604 (license license:bsd-3)))
2605
2606(define-public python2-scikit-image
2607 (package-with-python2 python-scikit-image))
2608
2609(define-public python-cython
2610 (package
2611 (name "python-cython")
2612 (version "0.28.4")
2613 (source
2614 (origin
2615 (method url-fetch)
2616 (uri (pypi-uri "Cython" version))
2617 (sha256
2618 (base32
2619 "0imw9s2rbrh32clbl10csnwmig9p3nzkrd2baxxxfmnrsc42pb3n"))))
2620 (build-system python-build-system)
2621 ;; we need the full python package and not just the python-wrapper
2622 ;; because we need libpython3.3m.so
2623 (inputs
2624 `(("python" ,python)))
2625 (arguments
2626 `(#:phases
2627 (modify-phases %standard-phases
2628 (add-before 'check 'set-HOME
2629 ;; some tests require access to "$HOME/.cython"
2630 (lambda _ (setenv "HOME" "/tmp") #t))
2631
2632 ;; FIXME: These tests started failing on armhf after the 0.28 update
2633 ;; (commit c69d11c5930), both with an error such as this:
2634 ;; compiling (cpp) and running dictcomp ...
2635 ;; === C/C++ compiler error output: ===
2636 ;; ‘
2637 ;; dictcomp.cpp:5221: confused by earlier errors, bailing out
2638 ;; See <https://hydra.gnu.org/build/2948724> for logs.
2639 ,@(if (target-arm32?)
2640 `((add-before 'check 'disable-failing-tests
2641 (lambda _
2642 (let ((disabled-tests (open-file "tests/bugs.txt" "a")))
2643 (for-each (lambda (test)
2644 (format disabled-tests "~a\n" test))
2645 '("memslice" "dictcomp"))
2646 (close-port disabled-tests)))))
2647 '())
2648
2649 (replace 'check
2650 (lambda _
2651 ;; The "with_outer_raising" test fails with Python 3.7. See
2652 ;; https://github.com/cython/cython/issues/2454
2653 (delete-file "tests/run/generators_py.py")
2654 (invoke "python" "runtests.py" "-vv"))))))
2655 (home-page "http://cython.org/")
2656 (synopsis "C extensions for Python")
2657 (description "Cython is an optimising static compiler for both the Python
2658programming language and the extended Cython programming language. It makes
2659writing C extensions for Python as easy as Python itself.")
2660 (license license:asl2.0)
2661 (properties `((python2-variant . ,(delay python2-cython))))))
2662
2663(define-public python2-cython
2664 (package (inherit (package-with-python2
2665 (strip-python2-variant python-cython)))
2666 (name "python2-cython")
2667 (inputs
2668 `(("python-2" ,python-2))))) ; this is not automatically changed
2669
2670;; The RPython toolchain currently does not support Python 3.
2671(define-public python2-rpython
2672 (package
2673 (name "python2-rpython")
2674 (version "0.2.1")
2675 (source
2676 (origin
2677 (method url-fetch)
2678 (uri (pypi-uri "rpython" version))
2679 (sha256
2680 (base32
2681 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
2682 (build-system python-build-system)
2683 (arguments `(#:python ,python-2))
2684 (native-inputs
2685 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
2686 (home-page "https://rpython.readthedocs.org")
2687 (synopsis "Framework for implementing interpreters and virtual machines")
2688 (description "RPython is a translation and support framework for
2689producing implementations of dynamic languages, emphasizing a clean separation
2690between language specification and implementation aspects.")
2691 (license license:expat)))
2692
2693;; NOTE: when upgrading numpy please make sure that python-pandas and
2694;; python-scipy still build, as these three packages are often used together.
2695(define-public python-numpy
2696 (package
2697 (name "python-numpy")
2698 (version "1.15.4")
2699 (source
2700 (origin
2701 (method url-fetch)
2702 (uri (string-append
2703 "https://github.com/numpy/numpy/releases/download/v"
2704 version "/numpy-" version ".tar.gz"))
2705 (sha256
2706 (base32
2707 "102vcl2qq4pjbm7a3d67vkkvn4466ngia1d8wi5avqwqh8j0jvkn"))))
2708 (build-system python-build-system)
2709 (inputs
2710 `(("openblas" ,openblas)
2711 ("lapack" ,lapack)))
2712 (native-inputs
2713 `(("python-cython" ,python-cython)
2714 ("python-pytest" ,python-pytest)
2715 ("gfortran" ,gfortran)))
2716 (arguments
2717 `(#:phases
2718 (modify-phases %standard-phases
2719 (add-before 'build 'configure-blas-lapack
2720 (lambda* (#:key inputs #:allow-other-keys)
2721 (call-with-output-file "site.cfg"
2722 (lambda (port)
2723 (format port
2724 "[openblas]
2725libraries = openblas
2726library_dirs = ~a/lib
2727include_dirs = ~a/include
2728
2729# backslash-n to make emacs happy
2730\n[lapack]
2731lapack_libs = lapack
2732library_dirs = ~a/lib
2733include_dirs = ~a/include
2734"
2735 (assoc-ref inputs "openblas")
2736 (assoc-ref inputs "openblas")
2737 (assoc-ref inputs "lapack")
2738 (assoc-ref inputs "lapack"))))
2739 #t))
2740 (add-before 'build 'fix-executable-paths
2741 (lambda* (#:key inputs #:allow-other-keys)
2742 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
2743 ;; instead of /bin/sh.
2744 (substitute* "numpy/distutils/exec_command.py"
2745 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
2746 (string-append match-start (assoc-ref inputs "bash") match-end)))
2747 ;; Use "gcc" executable, not "cc".
2748 (substitute* "numpy/distutils/system_info.py"
2749 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
2750 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
2751 #t))
2752 ;; Tests can only be run after the library has been installed and not
2753 ;; within the source directory.
2754 (delete 'check)
2755 (add-after 'install 'check
2756 (lambda* (#:key outputs inputs #:allow-other-keys)
2757 ;; Make installed package available for running the tests
2758 (add-installed-pythonpath inputs outputs)
2759 ;; Make sure "f2py" etc is found.
2760 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
2761 ":" (getenv "PATH")))
2762 (with-directory-excursion "/tmp"
2763 (invoke "python" "-c"
2764 "import numpy; numpy.test(verbose=2)")))))))
2765 (home-page "http://www.numpy.org/")
2766 (synopsis "Fundamental package for scientific computing with Python")
2767 (description "NumPy is the fundamental package for scientific computing
2768with Python. It contains among other things: a powerful N-dimensional array
2769object, sophisticated (broadcasting) functions, tools for integrating C/C++
2770and Fortran code, useful linear algebra, Fourier transform, and random number
2771capabilities.")
2772 (license license:bsd-3)))
2773
2774(define-public python2-numpy
2775 (package-with-python2 python-numpy))
2776
2777;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
2778;; interest only for legacy code going back to NumPy's predecessor
2779;; Numeric.
2780(define-public python2-numpy-1.8
2781 (package (inherit python2-numpy)
2782 (version "1.8.2")
2783 (source
2784 (origin
2785 (method url-fetch)
2786 (uri (string-append
2787 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
2788 (file-name (string-append "python2-numpy-" version ".tar.gz"))
2789 (sha256
2790 (base32
2791 "0sc20gz1b17xnyrkp5frca3ql5qfalpv916hfg2kqxpwr6jg0f1g"))))
2792 (arguments
2793 (substitute-keyword-arguments (package-arguments python2-numpy)
2794 ((#:phases phases)
2795 `(modify-phases ,phases
2796 (replace 'configure-blas-lapack
2797 (lambda* (#:key inputs #:allow-other-keys)
2798 (call-with-output-file "site.cfg"
2799 (lambda (port)
2800 (format port
2801 "[openblas]
2802libraries = openblas,lapack
2803library_dirs = ~a/lib:~a/lib
2804include_dirs = ~a/include:~a/include
2805"
2806 (assoc-ref inputs "openblas")
2807 (assoc-ref inputs "lapack")
2808 (assoc-ref inputs "openblas")
2809 (assoc-ref inputs "lapack"))))
2810 #t))))))
2811 (native-inputs
2812 `(("python2-nose" ,python2-nose)))
2813 (description "NumPy is the fundamental package for scientific computing
2814with Python. It contains among other things: a powerful N-dimensional array
2815object, sophisticated (broadcasting) functions, tools for integrating C/C++
2816and Fortran code, useful linear algebra, Fourier transform, and random number
2817capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
2818that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
2819Numeric.")
2820 (license license:bsd-3)))
2821
2822(define-public python-munch
2823 (package
2824 (name "python-munch")
2825 (version "2.0.4")
2826 (source
2827 (origin
2828 (method url-fetch)
2829 (uri (pypi-uri "munch" version))
2830 (sha256
2831 (base32
2832 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
2833 (build-system python-build-system)
2834 (home-page "https://github.com/Infinidat/munch")
2835 (synopsis "Dot-accessible dictionary")
2836 (description "Munch is a dot-accessible dictionary similar to JavaScript
2837objects.")
2838 (license license:expat)))
2839
2840(define-public python2-munch
2841 (package-with-python2 python-munch))
2842
2843(define-public python-colormath
2844 (package
2845 (name "python-colormath")
2846 (version "3.0.0")
2847 (source
2848 (origin
2849 (method url-fetch)
2850 (uri (pypi-uri "colormath" version))
2851 (sha256
2852 (base32
2853 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
2854 (build-system python-build-system)
2855 (propagated-inputs
2856 `(("python-networkx" ,python-networkx)
2857 ("python-numpy" ,python-numpy)))
2858 (home-page "https://github.com/gtaylor/python-colormath")
2859 (synopsis "Color math and conversion library")
2860 (description
2861 "This is a Python library for color math and conversions.")
2862 (license license:bsd-3)))
2863
2864(define-public python2-colormath
2865 (package-with-python2 python-colormath))
2866
2867(define-public python-spectra
2868 (package
2869 (name "python-spectra")
2870 (version "0.0.11")
2871 (source
2872 (origin
2873 (method url-fetch)
2874 (uri (pypi-uri "spectra" version))
2875 (sha256
2876 (base32
2877 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
2878 (build-system python-build-system)
2879 (arguments
2880 `(#:phases
2881 (modify-phases %standard-phases
2882 (replace 'check
38ec0f6a 2883 (lambda _ (invoke "nosetests" "-v"))))))
44d10b1f
RW
2884 (propagated-inputs
2885 `(("python-colormath" ,python-colormath)))
2886 (native-inputs
2887 `(("python-nose" ,python-nose)))
2888 (home-page "https://github.com/jsvine/spectra")
2889 (synopsis "Color scales and color conversion")
2890 (description
2891 "This package provides a Python library intended to make color math,
2892color scales, and color space conversion easy. It has support for:
2893
2894@enumerate
2895@item Color scales
2896@item Color ranges
2897@item Color blending
2898@item Brightening/darkening colors
2899@item Saturating/desaturating colors
2900@item Conversion to/from multiple color spaces.
2901@end enumerate\n")
2902 (license license:expat)))
2903
2904(define-public python2-spectra
2905 (package-with-python2 python-spectra))
2906
2907(define-public python-numpy-documentation
2908 (package
2909 (name "python-numpy-documentation")
2910 (version (package-version python-numpy))
2911 (source (package-source python-numpy))
2912 (build-system python-build-system)
2913 (native-inputs
2914 `(("python-matplotlib" ,python-matplotlib)
2915 ("python-numpy" ,python-numpy)
2916 ("pkg-config" ,pkg-config)
2917 ("python-sphinx" ,python-sphinx)
2918 ("python-numpydoc" ,python-numpydoc)
2919 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
2920 texlive-fonts-cm-super
2921 texlive-fonts-ec
2922 texlive-generic-ifxetex
2923 texlive-generic-pdftex
2924 texlive-latex-amsfonts
2925 texlive-latex-capt-of
2926 texlive-latex-cmap
2927 texlive-latex-environ
2928 texlive-latex-eqparbox
2929 texlive-latex-etoolbox
2930 texlive-latex-expdlist
2931 texlive-latex-fancyhdr
2932 texlive-latex-fancyvrb
2933 texlive-latex-fncychap
2934 texlive-latex-float
2935 texlive-latex-framed
2936 texlive-latex-geometry
2937 texlive-latex-graphics
2938 texlive-latex-hyperref
2939 texlive-latex-mdwtools
2940 texlive-latex-multirow
2941 texlive-latex-needspace
2942 texlive-latex-oberdiek
2943 texlive-latex-parskip
2944 texlive-latex-preview
2945 texlive-latex-tabulary
2946 texlive-latex-threeparttable
2947 texlive-latex-titlesec
2948 texlive-latex-trimspaces
2949 texlive-latex-ucs
2950 texlive-latex-upquote
2951 texlive-latex-url
2952 texlive-latex-varwidth
2953 texlive-latex-wrapfig)))
2954 ("texinfo" ,texinfo)
2955 ("perl" ,perl)
2956 ("scipy-sphinx-theme"
2957 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
2958 (method git-fetch)
2959 (uri (git-reference
2960 (url "https://github.com/scipy/scipy-sphinx-theme.git")
2961 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
2962 (sha256
2963 (base32
2964 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
2965 ,@(package-native-inputs python-numpy)))
2966 (arguments
2967 `(#:tests? #f ; we're only generating the documentation
2968 #:phases
2969 (modify-phases %standard-phases
2970 (delete 'build)
2971 (replace 'install
2972 (lambda* (#:key inputs outputs #:allow-other-keys)
2973 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
2974 (doc (string-append
2975 data "/doc/" ,name "-"
2976 ,(package-version python-numpy)))
2977 (info-reader (string-append data "/info"))
2978 (html (string-append doc "/html"))
2979 (scipy-sphinx-theme "scipy-sphinx-theme")
2980 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
2981 (pyver ,(string-append "PYVER=")))
2982
2983 ;; FIXME: this is needed to for texlive-union to generate
2984 ;; fonts, which are not found.
2985 (setenv "HOME" "/tmp")
2986
2987 (with-directory-excursion "doc"
2988 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
2989 (mkdir-p html)
4fc898da
RW
2990 (invoke "make" "html" pyver)
2991 (invoke "make" "latex" "PAPER=a4" pyver)
2992 (invoke "make" "-C" "build/latex"
44d10b1f
RW
2993 "all-pdf" "PAPER=a4" pyver)
2994 ;; FIXME: Generation of the info file fails.
4fc898da 2995 ;; (invoke "make" "info" pyver)
44d10b1f
RW
2996 ;; (mkdir-p info)
2997 ;; (copy-file "build/texinfo/numpy.info"
2998 ;; (string-append info "/numpy.info"))
2999 (for-each (lambda (file)
3000 (copy-file (string-append "build/latex" file)
3001 (string-append doc file)))
3002 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3003 (with-directory-excursion "build/html"
3004 (for-each (lambda (file)
3005 (let* ((dir (dirname file))
3006 (tgt-dir (string-append html "/" dir)))
3007 (unless (equal? "." dir)
3008 (mkdir-p tgt-dir))
3009 (install-file file html)))
3010 (find-files "." ".*")))))
3011 #t)))))
3012 (home-page (package-home-page python-numpy))
3013 (synopsis "Documentation for the python-numpy package")
3014 (description (package-description python-numpy))
3015 (license (package-license python-numpy))))
3016
3017(define-public python2-numpy-documentation
3018 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3019 (package
3020 (inherit numpy-documentation)
3021 (native-inputs `(("python2-functools32" ,python2-functools32)
3022 ,@(package-native-inputs numpy-documentation))))))
3023
3024(define-public python-pygit2
3025 (package
3026 (name "python-pygit2")
3027 (version "0.27.3")
3028 (source
3029 (origin
3030 (method url-fetch)
3031 (uri (pypi-uri "pygit2" version))
3032 (sha256
3033 (base32
3034 "046ahvsb7a20sgvscqfm3cb32sp3sii4gim9vz7zzrkf7yz16xlv"))))
3035 (build-system python-build-system)
3036 (arguments
3037 '(#:phases
3038 (modify-phases %standard-phases
3039 ;; Remove after the next update. See:
3040 ;; https://github.com/libgit2/pygit2/pull/851
3041 (add-after 'unpack 'compile-with-cffi
3042 (lambda _
3043 (substitute* "setup.py"
3044 (("install_requires")
3045 "setup_requires=['cffi'],\n install_requires"))
3046 #t))
3047 (add-after 'unpack 'fix-dependency-versioning
3048 (lambda _
3049 (substitute* "setup.py"
3050 (("<") "<="))
3051 #t)))))
3052 (propagated-inputs
3053 `(("python-six" ,python-six)
3054 ("python-cffi" ,python-cffi)
3055 ("libgit2" ,libgit2)
3056 ("python-tox" ,python-tox)))
3057 (native-inputs
3058 `(("python-pytest" ,python-pytest)))
3059 (home-page "https://github.com/libgit2/pygit2")
3060 (synopsis "Python bindings for libgit2")
3061 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3062library, libgit2 implements Git plumbing.")
3063 ;; GPL2.0 only, with linking exception.
3064 (license license:gpl2)))
3065
3066(define-public python2-pygit2
3067 (package-with-python2 python-pygit2))
3068
3069(define-public python-pyparsing
3070 (package
3071 (name "python-pyparsing")
3072 (version "2.2.1")
3073 (source
3074 (origin
3075 (method url-fetch)
3076 (uri (pypi-uri "pyparsing" version))
3077 (sha256
3078 (base32 "06dgd0iilvf8m0ssmfpcbh8l6jf0zkp8adbb84llksg17crfx4zl"))))
3079 (build-system python-build-system)
3080 (outputs '("out" "doc"))
3081 (arguments
3082 `(#:tests? #f ; no test target
3083 #:phases
3084 (modify-phases %standard-phases
3085 (add-after 'install 'install-doc
3086 (lambda* (#:key outputs #:allow-other-keys)
3087 (let* ((doc (string-append (assoc-ref outputs "doc")
3088 "/share/doc/" ,name "-" ,version))
3089 (html-doc (string-append doc "/html"))
3090 (examples (string-append doc "/examples")))
3091 (mkdir-p html-doc)
3092 (mkdir-p examples)
3093 (for-each
3094 (lambda (dir tgt)
3095 (map (lambda (file)
3096 (install-file file tgt))
3097 (find-files dir ".*")))
3098 (list "docs" "htmldoc" "examples")
3099 (list doc html-doc examples))
3100 #t))))))
3101 (home-page "https://github.com/pyparsing/pyparsing")
3102 (synopsis "Python parsing class library")
3103 (description
3104 "The pyparsing module is an alternative approach to creating and
3105executing simple grammars, vs. the traditional lex/yacc approach, or the use
3106of regular expressions. The pyparsing module provides a library of classes
3107that client code uses to construct the grammar directly in Python code.")
3108 (license license:expat)))
3109
3110(define-public python2-pyparsing
3111 (package-with-python2 python-pyparsing))
3112
3113(define-public python-numpydoc
3114 (package
3115 (name "python-numpydoc")
3116 (version "0.8.0")
3117 (source
3118 (origin
3119 (method url-fetch)
3120 (uri (pypi-uri "numpydoc" version))
3121 (sha256
3122 (base32
3123 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
3124 (build-system python-build-system)
3125 (propagated-inputs
3126 `(("python-sphinx" ,python-sphinx)))
3127 (native-inputs
3128 `(("python-nose" ,python-nose)))
3129 (home-page "https://pypi.python.org/pypi/numpydoc")
3130 (synopsis
3131 "Numpy's Sphinx extensions")
3132 (description
3133 "Sphinx extension to support docstrings in Numpy format.")
3134 (license license:bsd-2)))
3135
3136(define-public python2-numpydoc
3137 (package-with-python2 python-numpydoc))
3138
3139(define-public python-numexpr
3140 (package
3141 (name "python-numexpr")
3142 (version "2.6.5")
3143 (source
3144 (origin
3145 (method url-fetch)
3146 (uri (pypi-uri "numexpr" version))
3147 (sha256
3148 (base32
3149 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3150 (build-system python-build-system)
3151 (arguments `(#:tests? #f)) ; no tests included
3152 (propagated-inputs
3153 `(("python-numpy" ,python-numpy)))
3154 (home-page "https://github.com/pydata/numexpr")
3155 (synopsis "Fast numerical expression evaluator for NumPy")
3156 (description
3157 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3158expressions that operate on arrays are accelerated and use less memory than
3159doing the same calculation in Python. In addition, its multi-threaded
3160capabilities can make use of all your cores, which may accelerate
3161computations, most specially if they are not memory-bounded (e.g. those using
3162transcendental functions).")
3163 (license license:expat)))
3164
3165(define-public python2-numexpr
3166 (package-with-python2 python-numexpr))
3167
3168(define-public python-cycler
3169 (package
3170 (name "python-cycler")
3171 (version "0.10.0")
3172 (source (origin
3173 (method url-fetch)
3174 (uri (pypi-uri "cycler" version))
3175 (sha256
3176 (base32
3177 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3178 (build-system python-build-system)
3179 (arguments
3180 ;; XXX: The current version requires 'coveralls' which we don't have.
3181 ;; Enable this for the next release which uses 'python-pytest'.
3182 '(#:tests? #f))
3183 (propagated-inputs
3184 `(("python-six" ,python-six)))
3185 (home-page "http://matplotlib.org/cycler/")
3186 (synopsis "Composable keyword argument iterator")
3187 (description
3188 "When using @code{matplotlib} and plotting more than one line, it is
3189common to want to be able to want to be able to cycle over one or more artist
3190styles; but the plotting logic can quickly become involved.
3191To address this and enable easy cycling over arbitrary @code{kwargs}, the
3192@code{Cycler} class was developed.")
3193 (license license:bsd-3)))
3194
3195(define-public python2-cycler
3196 (package-with-python2 python-cycler))
3197
3198(define-public python-colorspacious
3199 (package
3200 (name "python-colorspacious")
3201 (version "1.1.0")
3202 (source
3203 (origin
3204 (method url-fetch)
3205 (uri (string-append "https://github.com/njsmith/colorspacious/archive/v"
3206 version ".tar.gz"))
3207 (file-name (string-append name "-" version))
3208 (sha256
3209 (base32 "1vflh5jm32qb0skza2i8pjacv09w6gq84fqpp2nj77s0rbmzgr4k"))))
3210 (build-system python-build-system)
3211 (propagated-inputs
3212 `(("python-numpy" ,python-numpy)))
3213 (native-inputs
3214 `(("python-nose" ,python-nose)))
3215 (arguments
3216 `(#:phases
3217 (modify-phases %standard-phases
3218 (replace 'check
3219 (lambda _
c988afda 3220 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
44d10b1f
RW
3221 (home-page "https://github.com/njsmith/colorspacious")
3222 (synopsis "Python library for colorspace conversions")
3223 (description "@code{colorspacious} is a Python library that lets you
3224convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3225 (license license:expat)))
3226
3227(define-public python2-colorspacious
3228 (package-with-python2 python-colorspacious))
3229
3230(define-public python-matplotlib
3231 (package
3232 (name "python-matplotlib")
3233 (version "2.2.3")
3234 (source
3235 (origin
3236 (method url-fetch)
3237 (uri (pypi-uri "matplotlib" version))
3238 (sha256
3239 (base32
3240 "1rcc7x9ig3hpchkc4cwdvym3y451w74275fxr455zkfagrsvymbk"))))
3241 (build-system python-build-system)
3242 (propagated-inputs ; the following packages are all needed at run time
3243 `(("python-cycler" ,python-cycler)
3244 ("python-kiwisolver" ,python-kiwisolver)
3245 ("python-pyparsing" ,python-pyparsing)
3246 ("python-pygobject" ,python-pygobject)
3247 ("gobject-introspection" ,gobject-introspection)
3248 ("python-tkinter" ,python "tk")
3249 ("python-dateutil" ,python-dateutil)
3250 ("python-numpy" ,python-numpy)
3251 ("python-pillow" ,python-pillow)
3252 ("python-pytz" ,python-pytz)
3253 ("python-six" ,python-six)
3254 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3255 ;; from 'gtk+') provides the required 'typelib' files used by
3256 ;; 'gobject-introspection'. The location of these files is set with the
3257 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3258 ;; is done automatically by a 'native-search-path' procedure. However,
3259 ;; at run-time the user must set this variable as follows:
3260 ;;
3261 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
3262 ("gtk+" ,gtk+)
3263 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3264 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3265 ;; object. For this reason we need to import both libraries.
3266 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3267 ("python-pycairo" ,python-pycairo)
3268 ;; XXX: qtwebkit cannot be built reliably.
3269 ("python-pyqt" ,python-pyqt-without-qtwebkit)
3270 ("python-cairocffi" ,python-cairocffi)))
3271 (inputs
3272 `(("libpng" ,libpng)
3273 ("imagemagick" ,imagemagick)
3274 ("freetype" ,freetype)
3275 ("cairo" ,cairo)
3276 ("glib" ,glib)
3277 ;; FIXME: Add backends when available.
3278 ;("python-wxpython" ,python-wxpython)
3279 ("tcl" ,tcl)
3280 ("tk" ,tk)))
3281 (native-inputs
3282 `(("pkg-config" ,pkg-config)
3283 ("python-nose" ,python-nose)
3284 ("python-mock" ,python-mock)))
3285 (arguments
3286 `(#:phases
3287 (modify-phases %standard-phases
3288 (add-before 'build 'configure-environment
3289 (lambda* (#:key outputs inputs #:allow-other-keys)
3290 (let ((cairo (assoc-ref inputs "cairo"))
3291 (gtk+ (assoc-ref inputs "gtk+")))
3292 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3293 ;; has not effect.
3294 (setenv "LD_LIBRARY_PATH"
3295 (string-append cairo "/lib:" gtk+ "/lib"))
3296 (setenv "HOME" (getcwd))
3297 (call-with-output-file "setup.cfg"
3298 (lambda (port)
3299 (format port "[directories]~%
3300basedirlist = ~a,~a~%
3301 [rc_options]~%
3302backend = TkAgg~%"
3303 (assoc-ref inputs "tcl")
3304 (assoc-ref inputs "tk")))))
3305 #t)))))
3306 (home-page "http://matplotlib.org")
3307 (synopsis "2D plotting library for Python")
3308 (description
3309 "Matplotlib is a Python 2D plotting library which produces publication
3310quality figures in a variety of hardcopy formats and interactive environments
3311across platforms. Matplotlib can be used in Python scripts, the python and
3312ipython shell, web application servers, and six graphical user interface
3313toolkits.")
3314 (license license:psfl)
3315 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3316
3317(define-public python2-matplotlib
3318 (let ((matplotlib (package-with-python2
3319 (strip-python2-variant python-matplotlib))))
3320 (package (inherit matplotlib)
3321 ;; Make sure to use special packages for Python 2 instead
3322 ;; of those automatically rewritten by package-with-python2.
3323 (propagated-inputs
3324 `(("python2-pycairo" ,python2-pycairo)
3325 ("python2-backports-functools-lru-cache"
3326 ,python2-backports-functools-lru-cache)
3327 ("python2-functools32" ,python2-functools32)
3328 ("python2-pygobject-2" ,python2-pygobject-2)
3329 ("python2-subprocess32" ,python2-subprocess32)
3330 ("python2-tkinter" ,python-2 "tk")
3331 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3332 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
3333
3334(define-public python-matplotlib-documentation
3335 (package
3336 (name "python-matplotlib-documentation")
3337 (version (package-version python-matplotlib))
3338 (source (package-source python-matplotlib))
3339 (build-system python-build-system)
3340 (native-inputs
3341 `(("python-matplotlib" ,python-matplotlib)
3342 ("python-colorspacious" ,python-colorspacious)
3343 ("python-sphinx" ,python-sphinx)
3344 ("python-sphinx-gallery" ,python-sphinx-gallery)
3345 ("python-numpydoc" ,python-numpydoc)
3346 ("python-ipython" ,python-ipython)
3347 ("python-mock" ,python-mock)
3348 ("graphviz" ,graphviz)
3349 ("texlive" ,texlive)
3350 ("texinfo" ,texinfo)
3351 ,@(package-native-inputs python-matplotlib)))
3352 (arguments
3353 `(#:tests? #f ; we're only generating documentation
3354 #:phases
3355 (modify-phases %standard-phases
3356 (replace 'build
3357 (lambda _
3358 (chdir "doc")
3359 ;; Produce pdf in 'A4' format.
3360 (substitute* "conf.py"
3361 (("latex_paper_size = 'letter'") "")
3362 ;; latex_paper_size is deprecated -> set paper size using
3363 ;; latex_elements
3364 (("latex_elements\\['pointsize'\\] = '11pt'" match)
3365 ;; insert at a point where latex_elements{} is defined:
3366 (string-append match "\nlatex_elements['papersize'] = 'a4paper'")))
3367 (invoke "make" "SPHINXBUILD=sphinx-build" "html" "latex" "texinfo")))
3368 (replace 'install
3369 (lambda* (#:key inputs outputs #:allow-other-keys)
3370 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3371 (doc (string-append data "/doc/python-matplotlib-" ,version))
3372 (info (string-append data "/info"))
3373 (html (string-append doc "/html")))
3374 (mkdir-p html)
3375 (mkdir-p info)
3376 (copy-recursively "build/html" html)
3377 (symlink (string-append html "/_images")
3378 (string-append info "/matplotlib-figures"))
3379 (with-directory-excursion "build/texinfo"
3380 (substitute* "matplotlib.texi"
3381 (("@image\\{([^,]*)" all file)
3382 (string-append "@image{matplotlib-figures/" file)))
3383 (symlink (string-append html "/_images")
3384 "./matplotlib-figures")
3385 (system* "makeinfo" "--no-split"
3386 "-o" "matplotlib.info" "matplotlib.texi"))
3387 (copy-file "build/texinfo/matplotlib.info"
3388 (string-append info "/matplotlib.info"))
3389 (copy-file "build/latex/Matplotlib.pdf"
3390 (string-append doc "/Matplotlib.pdf")))
3391 #t)))))
3392 (home-page (package-home-page python-matplotlib))
3393 (synopsis "Documentation for the python-matplotlib package")
3394 (description (package-description python-matplotlib))
3395 (license (package-license python-matplotlib))))
3396
3397(define-public python2-matplotlib-documentation
3398 (package-with-python2 python-matplotlib-documentation))
3399
3400(define-public python2-pysnptools
3401 (package
3402 (name "python2-pysnptools")
5d1ade85 3403 (version "0.3.13")
44d10b1f
RW
3404 (source
3405 (origin
3406 (method url-fetch)
5d1ade85 3407 (uri (pypi-uri "pysnptools" version))
44d10b1f
RW
3408 (sha256
3409 (base32
5d1ade85 3410 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
44d10b1f
RW
3411 (build-system python-build-system)
3412 (arguments
5d1ade85
RW
3413 `(#:python ,python-2 ; only Python 2.7 is supported
3414 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
44d10b1f
RW
3415 (propagated-inputs
3416 `(("python2-numpy" ,python2-numpy)
3417 ("python2-scipy" ,python2-scipy)
3418 ("python2-pandas" ,python2-pandas)))
44d10b1f 3419 (native-inputs
5d1ade85 3420 `(("python2-cython" ,python2-cython)))
1b66989b 3421 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
44d10b1f
RW
3422 (synopsis "Library for reading and manipulating genetic data")
3423 (description
3424 "PySnpTools is a library for reading and manipulating genetic data. It
3425can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
3426those files. It can also efficiently manipulate ranges of integers using set
3427operators such as union, intersection, and difference.")
3428 (license license:asl2.0)))
3429
3430(define-public python-scipy
3431 (package
3432 (name "python-scipy")
3433 (version "1.1.0")
3434 (source
3435 (origin
3436 (method url-fetch)
3437 (uri (pypi-uri "scipy" version))
3438 (sha256
3439 (base32
3440 "1lfg686w6vv2m2dfs8v9d0bf2i18z7wz5vgzjnkgmpr4hi0550w7"))))
3441 (build-system python-build-system)
3442 (propagated-inputs
3443 `(("python-numpy" ,python-numpy)
3444 ("python-matplotlib" ,python-matplotlib)
3445 ("python-pyparsing" ,python-pyparsing)))
3446 (inputs
3447 `(("lapack" ,lapack)
3448 ("openblas" ,openblas)))
3449 (native-inputs
3450 `(("python-cython" ,python-cython)
3451 ("python-pytest" ,python-pytest)
3452 ("python-sphinx" ,python-sphinx)
3453 ("python-numpydoc" ,python-numpydoc)
3454 ("gfortran" ,gfortran)
3455 ("perl" ,perl)
3456 ("which" ,which)))
3457 (outputs '("out" "doc"))
3458 (arguments
3459 `(#:phases
3460 (modify-phases %standard-phases
3461 (add-after 'unpack 'disable-broken-tests
3462 (lambda _
3463 (substitute* "scipy/sparse/linalg/dsolve/tests/test_linsolve.py"
3464 (("^( +)def test_threads_parallel\\(self\\):" m indent)
3465 (string-append indent
3466 "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
3467 m)))
3468 (substitute* "scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py"
3469 (("^def test_parallel_threads\\(\\):" m)
3470 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
3471 m)))
3472 #t))
3473 (add-before 'build 'configure-openblas
3474 (lambda* (#:key inputs #:allow-other-keys)
3475 (call-with-output-file "site.cfg"
3476 (lambda (port)
3477 (format port
3478 "[blas]
3479libraries = openblas
3480library_dirs = ~a/lib
3481include_dirs = ~a/include
3482
3483# backslash-n to make emacs happy
3484\n[atlas]
3485library_dirs = ~a/lib
3486atlas_libs = openblas
3487"
3488 (assoc-ref inputs "openblas")
3489 (assoc-ref inputs "openblas")
3490 (assoc-ref inputs "openblas"))))
3491 #t))
3492 (add-after 'install 'install-doc
3493 (lambda* (#:key inputs outputs #:allow-other-keys)
3494 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3495 (doc (string-append data "/doc/" ,name "-" ,version))
3496 (html (string-append doc "/html"))
3497 (pyver ,(string-append "PYVER=" (version-major+minor
3498 (package-version python))))
3499 ;; By default it tries to run sphinx-build through the Python
3500 ;; interpreter which won't work with our shell wrapper.
3501 (sphinxbuild "SPHINXBUILD=LANG=C sphinx-build"))
3502 ;; Make installed package available for building the
3503 ;; documentation
3504 (add-installed-pythonpath inputs outputs)
3505 (with-directory-excursion "doc"
3506 ;; Fix generation of images for mathematical expressions.
3507 (substitute* (find-files "source" "conf\\.py")
3508 (("pngmath_use_preview = True")
3509 "pngmath_use_preview = False"))
3510 (mkdir-p html)
3511 (invoke "make" "html" pyver sphinxbuild)
3512 (with-directory-excursion "build/html"
3513 (for-each (lambda (file)
3514 (let* ((dir (dirname file))
3515 (tgt-dir (string-append html "/" dir)))
3516 (install-file file html)))
3517 (find-files "." ".*")))))
3518 #t))
3519 ;; Tests can only be run after the library has been installed and not
3520 ;; within the source directory.
3521 (delete 'check)
3522 (add-after 'install 'check
3523 (lambda* (#:key inputs outputs #:allow-other-keys)
3524 (add-installed-pythonpath inputs outputs)
3525 (with-directory-excursion "/tmp"
3526 (invoke "python" "-c"
3527 "import scipy; scipy.test(verbose=2)")))))))
3528 (home-page "https://www.scipy.org/")
3529 (synopsis "The Scipy library provides efficient numerical routines")
3530 (description "The SciPy library is one of the core packages that make up
3531the SciPy stack. It provides many user-friendly and efficient numerical
3532routines such as routines for numerical integration and optimization.")
3533 (properties `((python2-variant . ,(delay python2-scipy))))
3534 (license license:bsd-3)))
3535
3536(define-public python2-scipy
3537 (package-with-python2
3538 (strip-python2-variant python-scipy)))
3539
3540(define-public python-socksipy-branch
3541 (package
3542 (name "python-socksipy-branch")
3543 (version "1.01")
3544 (source
3545 (origin
3546 (method url-fetch)
3547 (uri (pypi-uri "SocksiPy-branch" version))
3548 (sha256
3549 (base32
3550 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
3551 (build-system python-build-system)
3552 (arguments
3553 `(#:tests? #f)) ; There are no tests
3554 (home-page "https://code.google.com/archive/p/socksipy-branch/")
3555 (synopsis "Python SOCKS module")
3556 (description
3557 "SocksiPy - A Python SOCKS client module. It provides a
3558socket-like interface that supports connections to any TCP
3559service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
3560The original version was developed by Dan Haim, this is a
3561branch created by Mario Vilas to address some open issues,
3562as the original project seems to have been abandoned circa 2007.")
3563 (license license:bsd-3)))
3564
3565(define-public python2-socksipy-branch
3566 (package-with-python2 python-socksipy-branch))
3567
3568(define-public python-pycodestyle
3569 (package
3570 (name "python-pycodestyle")
3571 (version "2.4.0")
3572 (source
3573 (origin
3574 (method url-fetch)
3575 (uri (pypi-uri "pycodestyle" version))
3576 (sha256
3577 (base32
3578 "0fhy4vnlgpjq4qd1wdnl6pvdw7rah0ypmn8c9mkhz8clsndskz6b"))))
3579 (build-system python-build-system)
3580 (home-page "https://pycodestyle.readthedocs.io/")
3581 (synopsis "Python style guide checker")
3582 (description "@code{pycodestyle} (formerly pep8) is a tool to check
3583Python code against some of the style conventions in
3584@url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
3585 (license license:expat)))
3586
3587(define-public python2-pycodestyle
3588 (package-with-python2 python-pycodestyle))
3589
3590(define-public python-multidict
3591 (package
3592 (name "python-multidict")
3593 (version "4.2.0")
3594 (source
3595 (origin
3596 (method url-fetch)
3597 (uri (pypi-uri "multidict" version))
3598 (sha256
3599 (base32
3600 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
3601 (build-system python-build-system)
3602 (native-inputs
3603 `(("python-pytest" ,python-pytest)
3604 ("python-pytest-runner" ,python-pytest-runner)))
3605 (home-page "https://github.com/aio-libs/multidict/")
3606 (synopsis "Multidict implementation")
3607 (description "Multidict is dict-like collection of key-value pairs
3608where key might be occurred more than once in the container.")
3609 (license license:asl2.0)))
3610
3611(define-public python-orderedmultidict
3612 (package
3613 (name "python-orderedmultidict")
3614 (version "0.7.11")
3615 (source
3616 (origin
3617 (method url-fetch)
3618 (uri (pypi-uri "orderedmultidict" version))
3619 (sha256
3620 (base32
3621 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
3622 (build-system python-build-system)
3623 (arguments
3624 `(#:phases
3625 (modify-phases %standard-phases
3626 (add-after 'unpack 'fix-tests
3627 (lambda _
3628 ;; The package uses nosetest for running the tests.
3629 ;; Adding this initfile allows to run the test suite
3630 ;; without requiring nosetest.
d1c4f329
RW
3631 (with-output-to-file "tests/__init__.py" newline)
3632 #t)))))
44d10b1f
RW
3633 (propagated-inputs
3634 `(("python-six" ,python-six)))
3635 (native-inputs
3636 `(("python-pycodestyle" ,python-pycodestyle)))
3637 (home-page "https://github.com/gruns/orderedmultidict")
3638 (synopsis "Python Ordered Multivalue Dictionary - omdict")
3639 (description "This package contains a library for ordered multivalue
3640dictionaries. A multivalue dictionary is a dictionary that can store
3641multiple values for the same key. An ordered multivalue dictionary is a
3642multivalue dictionary that retains the order of insertions and deletions.")
3643 (license license:unlicense)))
3644
3645(define-public python2-orderedmultidict
3646 (package-with-python2 python-orderedmultidict))
3647
3648(define-public python-autopep8
3649 (package
3650 (name "python-autopep8")
3651 (version "1.3.5")
3652 (source
3653 (origin
3654 (method url-fetch)
3655 (uri (pypi-uri "autopep8" version))
3656 (sha256
3657 (base32
3658 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
3659 (build-system python-build-system)
3660 (propagated-inputs
3661 `(("python-pycodestyle" ,python-pycodestyle)))
3662 (home-page "https://github.com/hhatto/autopep8")
3663 (synopsis "Format Python code according to the PEP 8 style guide")
3664 (description
3665 "@code{autopep8} automatically formats Python code to conform to
3666the PEP 8 style guide. It uses the pycodestyle utility to determine
3667what parts of the code needs to be formatted. @code{autopep8} is
3668capable of fixing most of the formatting issues that can be reported
3669by pycodestyle.")
3670 (license (license:non-copyleft
3671 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
3672
3673(define-public python2-autopep8
3674 (package-with-python2 python-autopep8))
3675
3676(define-public python-distutils-extra
3677 (package
3678 (name "python-distutils-extra")
3679 (version "2.38")
3680 (source
3681 (origin
3682 (method url-fetch)
3683 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
3684 version "/+download/python-distutils-extra-"
3685 version ".tar.gz"))
3686 (sha256
3687 (base32
3688 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
3689 (build-system python-build-system)
3690 (home-page "https://launchpad.net/python-distutils-extra/")
3691 (synopsis "Enhancements to Python's distutils")
3692 (description
3693 "The python-distutils-extra module enables you to easily integrate
3694gettext support, themed icons, and scrollkeeper-based documentation into
3695Python's distutils.")
3696 (license license:gpl2)))
3697
3698(define-public python2-distutils-extra
3699 (package-with-python2 python-distutils-extra))
3700
3701(define-public python2-elib.intl
3702 (package
3703 (name "python2-elib.intl")
3704 (version "0.0.3")
3705 (source
3706 (origin
3707 ;; This project doesn't tag releases or publish tarballs, so we take
3708 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
3709 (method git-fetch)
3710 (uri (git-reference
3711 (url "https://github.com/dieterv/elib.intl.git")
3712 (commit "d09997cfef")))
3713 (file-name (string-append name "-" version "-checkout"))
3714 (sha256
3715 (base32
3716 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
3717 (build-system python-build-system)
3718 (arguments
3719 ;; incompatible with Python 3 (exception syntax)
3720 `(#:python ,python-2
3721 #:tests? #f))
3722 (home-page "https://github.com/dieterv/elib.intl")
3723 (synopsis "Enhanced internationalization for Python")
3724 (description
3725 "The elib.intl module provides enhanced internationalization (I18N)
3726services for your Python modules and applications.")
3727 (license license:lgpl3+)))
3728
3729(define-public python-olefile
3730 (package
3731 (name "python-olefile")
3732 (version "0.45.1")
3733 (source
3734 (origin
3735 (method url-fetch)
3736 (uri (string-append "https://github.com/decalage2/olefile/archive/v"
3737 version ".tar.gz"))
3738 (file-name (string-append name "-" version ".tar.gz"))
3739 (sha256
3740 (base32
3741 "18ai19zwagm6nli14k8bii31ipbab2rp7plrvsm6gmfql551a8ai"))))
3742 (build-system python-build-system)
3743 (home-page
3744 "https://www.decalage.info/python/olefileio")
3745 (synopsis "Read and write Microsoft OLE2 files.")
3746 (description
3747 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
3748Storage or Compound Document, Microsoft Office). It is an improved version of
3749the OleFileIO module from PIL, the Python Image Library.")
3750 (license license:bsd-3)))
3751
3752(define-public python2-olefile
3753 (package-with-python2 python-olefile))
3754
3755(define-public python-pillow
3756 (package
3757 (name "python-pillow")
3758 (version "5.4.1")
3759 (source
3760 (origin
3761 (method url-fetch)
3762 (uri (pypi-uri "Pillow" version))
3763 (sha256
3764 (base32
3765 "17waygkhhzjd75kajlfw9v57mbb41lcpg6cvkdijqd7smm76ccsj"))))
3766 (build-system python-build-system)
3767 (native-inputs
3768 `(("python-pytest" ,python-pytest)))
3769 (inputs
3770 `(("freetype" ,freetype)
3771 ("lcms" ,lcms)
3772 ("zlib" ,zlib)
3773 ("libjpeg" ,libjpeg)
3774 ("openjpeg" ,openjpeg)
3775 ("libtiff" ,libtiff)
3776 ("libwebp" ,libwebp)))
3777 (propagated-inputs
3778 `(("python-olefile" ,python-olefile)))
3779 (arguments
3780 `(#:phases
3781 (modify-phases %standard-phases
3782 (add-after 'unpack 'patch-ldconfig
3783 (lambda _
3784 (substitute* "setup.py"
3785 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
3786 (delete 'check) ; We must run checks after python-pillow is installed.
3787 (add-after 'install 'check-installed
3788 (lambda* (#:key outputs inputs #:allow-other-keys)
3789 (begin
3790 (setenv "HOME" (getcwd))
3791 ;; Make installed package available for running the tests.
3792 (add-installed-pythonpath inputs outputs)
3793 (invoke "python" "selftest.py" "--installed")
3794 (invoke "python" "-m" "pytest" "-vv")))))))
3795 (home-page "https://python-pillow.org")
3796 (synopsis "Fork of the Python Imaging Library")
3797 (description
3798 "The Python Imaging Library adds image processing capabilities to your
3799Python interpreter. This library provides extensive file format support, an
3800efficient internal representation, and fairly powerful image processing
3801capabilities. The core image library is designed for fast access to data
3802stored in a few basic pixel formats. It should provide a solid foundation for
3803a general image processing tool.")
3804 (license (license:x11-style
3805 "http://www.pythonware.com/products/pil/license.htm"
3806 "The PIL Software License"))))
3807
3808(define-public python2-pillow
3809 (package-with-python2 python-pillow))
3810
3811(define-public python-pycparser
3812 (package
3813 (name "python-pycparser")
3814 (version "2.18")
3815 (source
3816 (origin
3817 (method url-fetch)
3818 (uri (pypi-uri "pycparser" version))
3819 (sha256
3820 (base32
3821 "09mjyw82ibqzl449g7swy8bfxnfpmas0815d2rkdjlcqw81wma4r"))))
3822 (outputs '("out" "doc"))
3823 (build-system python-build-system)
3824 (native-inputs
3825 `(("pkg-config" ,pkg-config)))
3826 (arguments
3827 `(#:phases
3828 (modify-phases %standard-phases
3829 (replace 'check
3830 (lambda _
3831 (with-directory-excursion "tests"
acb75c03
RW
3832 (invoke "python" "all_tests.py"))
3833 #t))
44d10b1f
RW
3834 (add-after 'install 'install-doc
3835 (lambda* (#:key outputs #:allow-other-keys)
3836 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3837 (doc (string-append data "/doc/" ,name "-" ,version))
3838 (examples (string-append doc "/examples")))
3839 (mkdir-p examples)
3840 (for-each (lambda (file)
3841 (copy-file (string-append "." file)
3842 (string-append doc file)))
3843 '("/README.rst" "/CHANGES" "/LICENSE"))
3844 (copy-recursively "examples" examples)))))))
3845 (home-page "https://github.com/eliben/pycparser")
3846 (synopsis "C parser in Python")
3847 (description
3848 "Pycparser is a complete parser of the C language, written in pure Python
3849using the PLY parsing library. It parses C code into an AST and can serve as
3850a front-end for C compilers or analysis tools.")
3851 (license license:bsd-3)))
3852
3853(define-public python2-pycparser
3854 (package-with-python2 python-pycparser))
3855
3856(define-public python-pywavelets
3857 (package
3858 (name "python-pywavelets")
3859 (version "1.0.1")
3860 (home-page "https://github.com/PyWavelets/pywt")
3861 (source (origin
3862 (method url-fetch)
3863 (uri (pypi-uri "PyWavelets" version))
3864 (sha256
3865 (base32
3866 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
3867 (build-system python-build-system)
3868 (arguments
3869 '(#:modules ((ice-9 ftw)
3870 (srfi srfi-1)
3871 (srfi srfi-26)
3872 (guix build utils)
3873 (guix build python-build-system))
3874 #:phases (modify-phases %standard-phases
3875 (replace 'check
3876 (lambda _
3877 (let ((cwd (getcwd))
3878 (libdir (find (cut string-prefix? "lib." <>)
3879 (scandir "build"))))
3880 (with-directory-excursion (string-append cwd "/build/" libdir)
3881 (invoke "nosetests" "-v" "."))))))))
3882 (native-inputs
3883 `(("python-matplotlib" ,python-matplotlib) ;for tests
3884 ("python-nose" ,python-nose)))
3885 (propagated-inputs
3886 `(("python-numpy" ,python-numpy)))
3887 (synopsis "Wavelet transforms in Python")
3888 (description
3889 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
3890mathematical basis functions that are localized in both time and frequency.
3891Wavelet transforms are time-frequency transforms employing wavelets. They are
3892similar to Fourier transforms, the difference being that Fourier transforms are
3893localized only in frequency instead of in time and frequency.")
3894 (license license:expat)))
3895
3896(define-public python2-pywavelets
3897 (package-with-python2 python-pywavelets))
3898
3899(define-public python-xcffib
3900 (package
3901 (name "python-xcffib")
3902 (version "0.6.0")
3903 (source
3904 (origin
3905 (method url-fetch)
3906 (uri (pypi-uri "xcffib" version))
3907 (sha256
3908 (base32
3909 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
3910 (build-system python-build-system)
3911 (inputs
3912 `(("libxcb" ,libxcb)))
3913 (propagated-inputs
3914 `(("python-cffi" ,python-cffi) ; used at run time
3915 ("python-six" ,python-six)))
3916 (arguments
3917 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
3918 #:tests? #f
3919 #:phases
3920 (modify-phases %standard-phases
3921 (add-after 'unpack 'fix-libxcb-path
3922 (lambda* (#:key inputs #:allow-other-keys)
3923 (let ((libxcb (assoc-ref inputs "libxcb")))
3924 (substitute* '("xcffib/__init__.py")
3925 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
3926 #t)))
3927 (add-after 'install 'install-doc
3928 (lambda* (#:key outputs #:allow-other-keys)
3929 (let ((doc (string-append (assoc-ref outputs "out") "/share"
3930 "/doc/" ,name "-" ,version)))
3931 (mkdir-p doc)
3932 (copy-file "README.md"
3933 (string-append doc "/README.md"))
3934 #t))))))
3935 (home-page "https://github.com/tych0/xcffib")
3936 (synopsis "XCB Python bindings")
3937 (description
3938 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
3939support for Python 3 and PyPy. It is based on cffi.")
3940 (license license:expat)))
3941
3942(define-public python2-xcffib
3943 (package-with-python2 python-xcffib))
3944
3945(define-public python-cairocffi
3946 (package
3947 (name "python-cairocffi")
3948 (version "0.9.0")
3949 (source
3950 (origin
3951 (method url-fetch)
3952 (uri (pypi-uri "cairocffi" version))
3953 (sha256
3954 (base32
3955 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
3956 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
3957 (build-system python-build-system)
3958 (outputs '("out" "doc"))
3959 (inputs
3960 `(("glib" ,glib)
3961 ("gtk+" ,gtk+)
3962 ("gdk-pixbuf" ,gdk-pixbuf)
3963 ("cairo" ,cairo)
3964 ("pango" ,pango)))
3965 (native-inputs
3966 `(("pkg-config" ,pkg-config)
3967 ("python-pytest" ,python-pytest)
3968 ("python-pytest-cov" ,python-pytest-cov)
3969 ("python-pytest-runner" ,python-pytest-runner)
3970 ("python-sphinx" ,python-sphinx)
3971 ("python-docutils" ,python-docutils)))
3972 (propagated-inputs
3973 `(("python-xcffib" ,python-xcffib))) ; used at run time
3974 (arguments
3975 `(#:phases
3976 (modify-phases %standard-phases
3977 (add-after 'unpack 'patch-paths
3978 (lambda* (#:key inputs outputs #:allow-other-keys)
3979 (substitute* (find-files "." "\\.py$")
3980 (("dlopen\\(ffi, 'cairo'")
3981 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
3982 "/lib/libcairo.so.2'"))
3983 (("dlopen\\(ffi, 'gdk-3'")
3984 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
3985 "/lib/libgtk-3.so.0'"))
3986 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
3987 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
3988 "/lib/libgdk_pixbuf-2.0.so.0'"))
3989 (("dlopen\\(ffi, 'glib-2.0'")
3990 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
3991 "/lib/libglib-2.0.so.0'"))
3992 (("dlopen\\(ffi, 'gobject-2.0'")
3993 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
3994 "/lib/libgobject-2.0.so.0'"))
3995 (("dlopen\\(ffi, 'pangocairo-1.0'")
3996 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
3997 "/lib/libpangocairo-1.0.so.0'"))
3998 (("dlopen\\(ffi, 'pango-1.0'")
3999 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4000 "/lib/libpango-1.0.so.0'")))
4001 #t))
4002 (add-after 'install 'install-doc
4003 (lambda* (#:key inputs outputs #:allow-other-keys)
4004 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4005 (doc (string-append data "/doc/" ,name "-" ,version))
4006 (html (string-append doc "/html")))
4007 (setenv "LD_LIBRARY_PATH"
4008 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4009 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4010 (setenv "LANG" "en_US.UTF-8")
4011 (mkdir-p html)
4012 (for-each (lambda (file)
4013 (copy-file (string-append "." file)
4014 (string-append doc file)))
4015 '("/README.rst" "/CHANGES" "/LICENSE"))
4016 (system* "python" "setup.py" "build_sphinx")
4017 (copy-recursively "docs/_build/html" html)
4018 #t))))))
4019 (home-page "https://github.com/Kozea/cairocffi")
4020 (synopsis "Python bindings and object-oriented API for Cairo")
4021 (description
4022 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4023Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4024graphics library with support for multiple backends including image buffers,
4025PNG, PostScript, PDF, and SVG file output.")
4026 (license license:bsd-3)))
4027
4028(define-public python2-cairocffi
4029 (package-with-python2 python-cairocffi))
4030
4031(define-public python-decorator
4032 (package
4033 (name "python-decorator")
4034 (version "4.3.0")
4035 (source
4036 (origin
4037 (method url-fetch)
4038 (uri (pypi-uri "decorator" version))
4039 (sha256
4040 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
4041 (build-system python-build-system)
4042 (home-page "https://pypi.python.org/pypi/decorator/")
4043 (synopsis "Python module to simplify usage of decorators")
4044 (description
4045 "The aim of the decorator module is to simplify the usage of decorators
4046for the average programmer, and to popularize decorators usage giving examples
4047of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4048etc. The core of this module is a decorator factory.")
4049 (license license:expat)))
4050
4051(define-public python2-decorator
4052 (package-with-python2 python-decorator))
4053
4054(define-public python-drmaa
4055 (package
4056 (name "python-drmaa")
4057 (version "0.7.7")
4058 (source
4059 (origin
4060 (method url-fetch)
4061 (uri (pypi-uri "drmaa" version))
4062 (sha256
4063 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4064 (build-system python-build-system)
4065 ;; The test suite requires libdrmaa which is provided by the cluster
4066 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4067 ;; should be set to the path of the libdrmaa library.
4068 (arguments '(#:tests? #f))
4069 (native-inputs
4070 `(("python-nose" ,python-nose)))
4071 (home-page "https://pypi.python.org/pypi/drmaa")
4072 (synopsis "Python bindings for the DRMAA library")
4073 (description
4074 "A Python package for Distributed Resource Management (DRM) job
4075submission and control. This package is an implementation of the DRMAA 1.0
4076Python language binding specification.")
4077 (license license:bsd-3)))
4078
4079(define-public python2-drmaa
4080 (package-with-python2 python-drmaa))
4081
4082(define-public python-grako
4083 (package
4084 (name "python-grako")
4085 (version "3.99.9")
4086 (source
4087 (origin
4088 (method url-fetch)
4089 (uri
4090 (pypi-uri "grako" version ".zip"))
4091 (sha256
4092 (base32
4093 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4094 (build-system python-build-system)
4095 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4096 (native-inputs
4097 `(("unzip" ,unzip)
4098 ("python-pytest" ,python-pytest)
4099 ("python-pytest-runner" ,python-pytest-runner)))
4100 (home-page "https://bitbucket.org/neogeny/grako")
4101 (synopsis "EBNF parser generator")
4102 (description
4103 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4104memoizing PEG/Packrat parser in Python.")
4105 (license license:bsd-3)))
4106
4107(define-public python2-grako
4108 (package-with-python2 python-grako))
4109
4110(define-public python-gridmap
4111 (package
4112 (name "python-gridmap")
4113 (version "0.13.0")
4114 (source
4115 (origin
4116 (method url-fetch)
4117 (uri (string-append
4118 "https://github.com/pygridtools/gridmap/archive/v"
4119 version ".tar.gz"))
4120 (file-name (string-append name "-" version ".tar.gz"))
4121 (sha256
4122 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
4123 (build-system python-build-system)
4124 (arguments
4125 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4126 (propagated-inputs
4127 `(("python-psutil" ,python-psutil)
4128 ("python-drmaa" ,python-drmaa)
4129 ("python-pyzmq" ,python-pyzmq)))
4130 (home-page "https://github.com/pygridtools/gridmap")
4131 (synopsis "Create jobs on a cluster directly from Python")
4132 (description
4133 "Gridmap is a Python package to allow you to easily create jobs on the
4134cluster directly from Python. You can directly map Python functions onto the
4135cluster without needing to write any wrapper code yourself.")
4136 (license license:gpl3+)))
4137
4138(define-public python2-gridmap
4139 (package-with-python2 python-gridmap))
4140
4141(define-public python-honcho
4142 (package
4143 (name "python-honcho")
4144 (version "1.0.1")
4145 (source
4146 (origin
4147 (method url-fetch)
4148 (uri (string-append
4149 "https://github.com/nickstenning/honcho/archive/v"
4150 version ".tar.gz"))
4151 (file-name (string-append name "-" version ".tar.gz"))
4152 (sha256
4153 (base32 "0zizn61n5z5hq421hkypk9pw8s6fpxw30f4hsg7k4ivwzy3gjw9j"))))
4154 (build-system python-build-system)
4155 (native-inputs
4156 `(("python-pytest" ,python-pytest)
4157 ("python-mock" ,python-mock)
4158 ("python-tox" ,python-tox)
4159 ("which" ,which))) ;for tests
4160 (propagated-inputs
4161 `(("python-jinja2" ,python-jinja2)))
4162 (arguments
4163 `(#:phases
4164 (modify-phases %standard-phases
4165 (delete 'check)
4166 (add-after 'install 'check
4167 (lambda* (#:key outputs inputs #:allow-other-keys)
4168 ;; fix honcho path in testsuite
4169 (substitute* "tests/conftest.py"
4170 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
4171 "/bin/honcho" "'")))
4172 ;; It's easier to run tests after install.
4173 ;; Make installed package available for running the tests
4174 (add-installed-pythonpath inputs outputs)
95b707fb 4175 (invoke "py.test" "-v"))))))
44d10b1f
RW
4176 (home-page "https://github.com/nickstenning/honcho")
4177 (synopsis "Manage Procfile-based applications")
4178 (description
4179 "A Procfile is a file which describes how to run an application
4180consisting of serveral processes. honcho starts all listed processes.
4181The output of all running processes is collected by honcho and
4182displayed.")
4183 (license license:expat)))
4184
4185(define-public python2-honcho
4186 (package-with-python2 python-honcho))
4187
4188(define-public python-pexpect
4189 (package
4190 (name "python-pexpect")
4191 (version "4.6.0")
4192 (source
4193 (origin
4194 (method url-fetch)
4195 (uri (pypi-uri "pexpect" version))
4196 (sha256
4197 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
4198 (build-system python-build-system)
4199 (arguments
4200 `(#:phases
4201 (modify-phases %standard-phases
4202 (add-before 'check 'prepare-tests
4203 (lambda _
4204 (substitute* (find-files "tests")
4205 (("/bin/ls") (which "ls"))
4206 (("/bin/echo") (which "echo"))
4207 (("/bin/which") (which "which"))
4208 ;; Many tests try to use the /bin directory which
4209 ;; is not present in the build environment.
4210 ;; Use one that's non-empty and unlikely to change.
4211 (("/bin'") "/dev'"))
4212 ;; XXX: Socket connection test gets "Connection reset by peer".
4213 ;; Why does it not work? Delete for now.
4214 (delete-file "tests/test_socket.py")
4215 #t))
4216 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
4217 (native-inputs
4218 `(("python-nose" ,python-nose)
4219 ("python-pytest" ,python-pytest)
4220 ("man-db" ,man-db)
4221 ("which" ,which)
4222 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
4223 (propagated-inputs
4224 `(("python-ptyprocess" ,python-ptyprocess)))
4225 (home-page "http://pexpect.readthedocs.org/")
4226 (synopsis "Controlling interactive console applications")
4227 (description
4228 "Pexpect is a pure Python module for spawning child applications;
4229controlling them; and responding to expected patterns in their output.
4230Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4231child application and control it as if a human were typing commands.")
4232 (license license:isc)))
4233
4234(define-public python2-pexpect
4235 (package-with-python2 python-pexpect))
4236
4237(define-public python-setuptools-scm
4238 (package
4239 (name "python-setuptools-scm")
4240 (version "3.1.0")
4241 (source (origin
4242 (method url-fetch)
4243 (uri (pypi-uri "setuptools_scm" version))
4244 (sha256
4245 (base32
4246 "0h4bglwfz8b9prqljv8z3w9rgydfyxzaj05bm1y6zs5m6shz548i"))))
4247 (build-system python-build-system)
4248 (home-page "https://github.com/pypa/setuptools_scm/")
4249 (synopsis "Manage Python package versions in SCM metadata")
4250 (description
4251 "Setuptools_scm handles managing your Python package versions in
4252@dfn{software configuration management} (SCM) metadata instead of declaring
4253them as the version argument or in a SCM managed file.")
4254 (license license:expat)))
4255
4256(define-public python2-setuptools-scm
4257 (package-with-python2 python-setuptools-scm))
4258
4259(define-public python-pathpy
4260 (package
4261 (name "python-pathpy")
4262 (version "11.0.1")
4263 (source
4264 (origin
4265 (method url-fetch)
4266 (uri (pypi-uri "path.py" version))
4267 (sha256
4268 (base32 "07x15v8c7ry9bvycw294c9yq6ky9v2b0dalvgi6rn38ilh69vsz7"))))
4269 ;; (outputs '("out" "doc"))
4270 (build-system python-build-system)
4271 (propagated-inputs
4272 `(("python-appdirs" ,python-appdirs)))
4273 (native-inputs
4274 `(("python-setuptools-scm" ,python-setuptools-scm)
4275 ("python-sphinx" ,python-sphinx)
4276 ("python-rst.linker" ,python-rst.linker)
4277 ("python-pytest" ,python-pytest)
4278 ("python-pytest-runner" ,python-pytest-runner)))
4279 (arguments
4280 ;; FIXME: Documentation and tests require "jaraco.packaging".
4281 `(#:tests? #f))
4282 ;; #:phases
4283 ;; (modify-phases %standard-phases
4284 ;; (add-after 'build 'build-doc
4285 ;; (lambda _
4286 ;; (setenv "LANG" "en_US.UTF-8")
4287 ;; (zero? (system* "python" "setup.py" "build_sphinx"))))
4288 ;; (add-after 'install 'install-doc
4289 ;; (lambda* (#:key outputs #:allow-other-keys)
4290 ;; (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4291 ;; (doc (string-append data "/doc/" ,name "-" ,version))
4292 ;; (html (string-append doc "/html")))
4293 ;; (mkdir-p html)
4294 ;; (for-each (lambda (file)
4295 ;; (copy-file file (string-append doc "/" file)))
4296 ;; '("README.rst" "CHANGES.rst"))
4297 ;; (copy-recursively "build/sphinx/html" html)))))))
4298 (home-page "https://github.com/jaraco/path.py")
4299 (synopsis "Python module wrapper for built-in os.path")
4300 (description
4301 "@code{path.py} implements path objects as first-class entities, allowing
4302common operations on files to be invoked on those path objects directly.")
4303 (license license:expat)))
4304
4305(define-public python2-pathpy
4306 (package-with-python2 python-pathpy))
4307
4308(define-public python-simplegeneric
4309 (package
4310 (name "python-simplegeneric")
4311 (version "0.8.1")
4312 (source
4313 (origin
4314 (method url-fetch)
6c8c3980 4315 (uri (pypi-uri "simplegeneric" version ".zip"))
44d10b1f
RW
4316 (sha256
4317 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
4318 (build-system python-build-system)
4319 (native-inputs
4320 `(("unzip" ,unzip)))
4321 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
4322 (synopsis "Python module for simple generic functions")
4323 (description
4324 "The simplegeneric module lets you define simple single-dispatch generic
4325functions, akin to Python’s built-in generic functions like @code{len()},
4326@code{iter()} and so on. However, instead of using specially-named methods,
4327these generic functions use simple lookup tables, akin to those used by
4328e.g. @code{pickle.dump()} and other generic functions found in the Python
4329standard library.")
4330 (license license:zpl2.1)))
4331
4332(define-public python2-simplegeneric
4333 (package-with-python2 python-simplegeneric))
4334
4335(define-public python-ipython-genutils
4336 ;; TODO: This package is retired, check if can be removed, see description.
4337 (package
4338 (name "python-ipython-genutils")
4339 (version "0.1.0")
4340 (source
4341 (origin
4342 (method url-fetch)
c9671d4b 4343 (uri (pypi-uri "ipython_genutils" version))
44d10b1f
RW
4344 (sha256
4345 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
4346 (build-system python-build-system)
4347 (arguments `(#:tests? #f)) ; no tests
4348 (home-page "https://ipython.org")
4349 (synopsis "Vestigial utilities from IPython")
4350 (description
4351 "This package provides retired utilities from IPython. No packages
4352outside IPython/Jupyter should depend on it.
4353
4354This package shouldn't exist. It contains some common utilities shared by
4355Jupyter and IPython projects during The Big Split. As soon as possible, those
4356packages will remove their dependency on this, and this package will go
4357away.")
4358 (license license:bsd-3)))
4359
4360(define-public python2-ipython-genutils
4361 (package-with-python2 python-ipython-genutils))
4362
4363(define-public python-traitlets
4364 (package
4365 (name "python-traitlets")
4366 (version "4.3.2")
4367 (source
4368 (origin
4369 (method url-fetch)
4370 (uri (pypi-uri "traitlets" version))
4371 (sha256
4372 (base32
4373 "0dbq7sx26xqz5ixs711k5nc88p8a0nqyz6162pwks5dpcz9d4jww"))))
4374 (build-system python-build-system)
4375 (arguments
4376 `(#:phases
4377 (modify-phases %standard-phases
4378 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
4379 (propagated-inputs
4380 `(("python-ipython-genutils" ,python-ipython-genutils)
4381 ("python-decorator" ,python-decorator))) ;not needed for >4.3.2
4382 (native-inputs
4383 `(("python-pytest" ,python-pytest)))
4384 (properties `((python2-variant . ,(delay python2-traitlets))))
4385 (home-page "https://ipython.org")
4386 (synopsis "Configuration system for Python applications")
4387 (description
4388 "Traitlets is a framework that lets Python classes have attributes with
4389type checking, dynamically calculated default values, and ‘on change’
4390callbacks. The package also includes a mechanism to use traitlets for
4391configuration, loading values from files or from command line arguments. This
4392is a distinct layer on top of traitlets, so you can use traitlets in your code
4393without using the configuration machinery.")
4394 (license license:bsd-3)))
4395
4396(define-public python2-traitlets
4397 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
4398 (package
4399 (inherit traitlets)
4400 (propagated-inputs
4401 `(("python2-enum34" ,python2-enum34)
4402 ,@(package-propagated-inputs traitlets))))))
4403
4404(define-public python-jupyter-core
4405 (package
4406 (name "python-jupyter-core")
4407 (version "4.4.0")
4408 (source
4409 (origin
4410 (method url-fetch)
4411 (uri (string-append (pypi-uri "jupyter_core" version)))
4412 (sha256
4413 (base32
4414 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
4415 (build-system python-build-system)
4416 ;; FIXME: not sure how to run the tests
4417 (arguments `(#:tests? #f))
4418 (propagated-inputs
4419 `(("python-traitlets" ,python-traitlets)))
4420 (home-page "http://jupyter.org/")
4421 (synopsis "Jupyter base package")
4422 (description
4423 "Jupyter core is the base package on which Jupyter projects rely.")
4424 (license license:bsd-3)))
4425
4426(define-public python2-jupyter-core
4427 (package-with-python2 python-jupyter-core))
4428
4429(define-public python-jupyter-client
4430 (package
4431 (name "python-jupyter-client")
4432 (version "5.2.4")
4433 (source
4434 (origin
4435 (method url-fetch)
4436 (uri (pypi-uri "jupyter_client" version))
4437 (sha256
4438 (base32
4439 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
4440 (build-system python-build-system)
4441 ;; Tests fail because of missing native python kernel which I assume is
4442 ;; provided by the ipython package, which we cannot use because it would
4443 ;; cause a dependency cycle.
4444 (arguments `(#:tests? #f))
4445 (propagated-inputs
4446 `(("python-pyzmq" ,python-pyzmq)
4447 ("python-traitlets" ,python-traitlets)
4448 ("python-jupyter-core" ,python-jupyter-core)))
4449 (home-page "http://jupyter.org/")
4450 (synopsis "Jupyter protocol implementation and client libraries")
4451 (description
4452 "The @code{jupyter_client} package contains the reference implementation
4453of the Jupyter protocol. It also provides client and kernel management APIs
4454for working with kernels, and the @code{jupyter kernelspec} entrypoint for
4455installing @code{kernelspec}s for use with Jupyter frontends.")
4456 (license license:bsd-3)))
4457
4458(define-public python2-jupyter-client
4459 (package-with-python2 python-jupyter-client))
4460
4461(define-public python-ipykernel
4462 (package
4463 (name "python-ipykernel")
4464 (version "5.1.0")
4465 (source
4466 (origin
4467 (method url-fetch)
4468 (uri (pypi-uri "ipykernel" version))
4469 (sha256
4470 (base32 "0br95qhrd5k65g10djngiy27hs0642301hlf2q142i8djabvzh0g"))))
4471 (build-system python-build-system)
4472 (arguments
4473 `(#:phases
4474 (modify-phases %standard-phases
4475 (replace 'check
4476 (lambda _
4477 (setenv "HOME" "/tmp")
4478 (invoke "pytest" "-v")
4479 #t)))))
4480 (propagated-inputs
4481 `(("python-ipython" ,python-ipython)
4482 ;; imported at runtime during connect
4483 ("python-jupyter-client" ,python-jupyter-client)))
4484 (native-inputs
4485 `(("python-pytest" ,python-pytest)
4486 ("python-nose" ,python-nose)))
4487 (home-page "https://ipython.org")
4488 (synopsis "IPython Kernel for Jupyter")
4489 (description
4490 "This package provides the IPython kernel for Jupyter.")
4491 (license license:bsd-3)))
4492
4493(define-public python2-ipykernel
4494 (package-with-python2 python-ipykernel))
4495
4496(define-public python-send2trash
4497 (package
4498 (name "python-send2trash")
4499 (version "1.5.0")
4500 (source
4501 (origin
4502 (method url-fetch)
4503 (uri (pypi-uri "send2trash" version))
4504 (sha256
4505 (base32
4506 "1ci8vcwjmjlp11ljj1ckrfmml9fkq1mclx2gr53y4zvhgp01q030"))))
4507 (build-system python-build-system)
4508 (home-page "https://github.com/hsoft/send2trash")
4509 (synopsis "Send files to trash")
4510 (description
4511 "This package provides a cross-platform mechanism to send files to the
4512trash.")
4513 (license license:bsd-3)))
4514
4515(define-public python2-send2trash
4516 (package-with-python2 python-send2trash))
4517
4518;; This is the latest release of the LTS version of ipython with support for
4519;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
4520;; dropped support for Python 2.7. We may want to rename this package.
4521(define-public python-ipython
4522 (package
4523 (name "python-ipython")
4524 (version "5.8.0")
4525 (source
4526 (origin
4527 (method url-fetch)
4528 (uri (pypi-uri "ipython" version ".tar.gz"))
4529 (sha256
4530 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
4531 (build-system python-build-system)
4532 (outputs '("out" "doc"))
4533 (propagated-inputs
4534 `(("python-pyzmq" ,python-pyzmq)
4535 ("python-prompt-toolkit" ,python-prompt-toolkit-1)
4536 ("python-terminado" ,python-terminado)
4537 ("python-matplotlib" ,python-matplotlib)
4538 ("python-numpy" ,python-numpy)
4539 ("python-numpydoc" ,python-numpydoc)
4540 ("python-jinja2" ,python-jinja2)
4541 ("python-mistune" ,python-mistune)
4542 ("python-pexpect" ,python-pexpect)
4543 ("python-pickleshare" ,python-pickleshare)
4544 ("python-simplegeneric" ,python-simplegeneric)
4545 ("python-jsonschema" ,python-jsonschema)
4546 ("python-traitlets" ,python-traitlets)
4547 ("python-nbformat" ,python-nbformat)
4548 ("python-pygments" ,python-pygments)))
4549 (inputs
4550 `(("readline" ,readline)
4551 ("which" ,which)))
4552 (native-inputs
4553 `(("graphviz" ,graphviz)
4554 ("pkg-config" ,pkg-config)
4555 ("python-requests" ,python-requests) ;; for tests
4556 ("python-testpath" ,python-testpath)
4557 ("python-nose" ,python-nose)
4558 ("python-sphinx" ,python-sphinx)
4559 ("python-shpinx-rtd-theme" ,python-sphinx-rtd-theme)
4560 ;; FIXME: It's possible that a smaller union would work just as well.
4561 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
4562 texlive-fonts-ec
4563 texlive-generic-ifxetex
4564 texlive-generic-pdftex
4565 texlive-latex-amsfonts
4566 texlive-latex-capt-of
4567 texlive-latex-cmap
4568 texlive-latex-environ
4569 texlive-latex-eqparbox
4570 texlive-latex-etoolbox
4571 texlive-latex-expdlist
4572 texlive-latex-fancyhdr
4573 texlive-latex-fancyvrb
4574 texlive-latex-fncychap
4575 texlive-latex-float
4576 texlive-latex-framed
4577 texlive-latex-geometry
4578 texlive-latex-graphics
4579 texlive-latex-hyperref
4580 texlive-latex-mdwtools
4581 texlive-latex-multirow
4582 texlive-latex-oberdiek
4583 texlive-latex-parskip
4584 texlive-latex-preview
4585 texlive-latex-tabulary
4586 texlive-latex-threeparttable
4587 texlive-latex-titlesec
4588 texlive-latex-trimspaces
4589 texlive-latex-ucs
4590 texlive-latex-upquote
4591 texlive-latex-url
4592 texlive-latex-varwidth
4593 texlive-latex-wrapfig)))
4594 ("texinfo" ,texinfo)))
4595 (arguments
4596 `(#:phases
4597 (modify-phases %standard-phases
4598 (add-after 'install 'install-doc
4599 (lambda* (#:key inputs outputs #:allow-other-keys)
4600 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4601 (doc (string-append data "/doc/" ,name "-" ,version))
4602 (html (string-append doc "/html"))
4603 (man1 (string-append data "/man/man1"))
4604 (info (string-append data "/info"))
4605 (examples (string-append doc "/examples"))
4606 (python-arg (string-append "PYTHON=" (which "python"))))
4607 (setenv "LANG" "en_US.utf8")
4608 ;; Make installed package available for running the tests
4609 (add-installed-pythonpath inputs outputs)
4610 (with-directory-excursion "docs"
4611 ;; FIXME: pdf fails to build
4612 ;;(system* "make" "pdf" "PAPER=a4")
4613 (system* "make" python-arg "html")
4614 (system* "make" python-arg "info"))
4615 (copy-recursively "docs/man" man1)
4616 (copy-recursively "examples" examples)
4617 (copy-recursively "docs/build/html" html)
4618 ;; (copy-file "docs/build/latex/ipython.pdf"
4619 ;; (string-append doc "/ipython.pdf"))
4620 (mkdir-p info)
4621 (copy-file "docs/build/texinfo/ipython.info"
4622 (string-append info "/ipython.info"))
4623 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
4624 #t))
4625 ;; Tests can only be run after the library has been installed and not
4626 ;; within the source directory.
4627 (delete 'check)
4628 (add-after 'install 'check
4629 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
4630 (if tests?
4631 (begin
4632 ;; Make installed package available for running the tests
4633 (add-installed-pythonpath inputs outputs)
4634 (setenv "HOME" "/tmp/") ;; required by a test
4635 ;; We only test the core because one of the other tests
4636 ;; tries to import ipykernel.
4637 (invoke "python" "IPython/testing/iptest.py"
4638 "-v" "IPython/core/tests"))
4639 #t)))
4640 (add-before 'check 'fix-tests
4641 (lambda* (#:key inputs #:allow-other-keys)
4642 (substitute* "./IPython/utils/_process_posix.py"
4643 (("/usr/bin/env', 'which") (which "which")))
4644 (substitute* "./IPython/core/tests/test_inputtransformer.py"
4645 (("#!/usr/bin/env python")
4646 (string-append "#!" (which "python"))))
4647 ;; Disable 1 failing test
4648 (substitute* "./IPython/core/tests/test_magic.py"
4649 (("def test_dirops\\(\\):" all)
4650 (string-append "@dec.skipif(True)\n" all)))
4651 ;; This test introduces a circular dependency on ipykernel
4652 ;; (which depends on ipython).
4653 (delete-file "IPython/core/tests/test_display.py")
4654 ;; These tests throw errors for unknown reasons.
4655 (delete-file "IPython/extensions/tests/test_storemagic.py")
4656 (delete-file "IPython/core/tests/test_displayhook.py")
4657 (delete-file "IPython/core/tests/test_interactiveshell.py")
4658 (delete-file "IPython/core/tests/test_pylabtools.py")
4659 (delete-file "IPython/core/tests/test_paths.py")
4660 #t)))))
4661 (home-page "https://ipython.org")
4662 (synopsis "IPython is a tool for interactive computing in Python")
4663 (description
4664 "IPython provides a rich architecture for interactive computing with:
4665Powerful interactive shells, a browser-based notebook, support for interactive
4666data visualization, embeddable interpreters and tools for parallel
4667computing.")
4668 (license license:bsd-3)
4669 (properties `((python2-variant . ,(delay python2-ipython))))))
4670
4671(define-public python2-ipython
4672 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
4673 (package
4674 (inherit ipython)
4675 ;; FIXME: add pyreadline once available.
4676 (propagated-inputs
4677 `(("python2-backports-shutil-get-terminal-size"
4678 ,python2-backports-shutil-get-terminal-size)
4679 ("python2-pathlib2" ,python2-pathlib2)
4680 ,@(package-propagated-inputs ipython)))
4681 (native-inputs
4682 `(("python2-mock" ,python2-mock)
4683 ,@(package-native-inputs ipython))))))
4684
4685(define-public python-urwid
4686 (package
4687 (name "python-urwid")
4688 (version "2.0.1")
4689 (source
4690 (origin
4691 (method url-fetch)
4692 (uri (pypi-uri "urwid" version))
4693 (sha256
4694 (base32
4695 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
4696 (build-system python-build-system)
4697 (home-page "http://urwid.org")
4698 (synopsis "Console user interface library for Python")
4699 (description
4700 "Urwid is a curses-based UI/widget library for Python. It includes many
4701features useful for text console applications.")
4702 (license license:lgpl2.1+)))
4703
4704(define-public python2-urwid
4705 (package-with-python2 python-urwid))
4706
4707(define-public python-urwidtrees
4708 (package
4709 (name "python-urwidtrees")
4710 (version "1.0.2")
4711 (source
4712 (origin
4713 (method url-fetch)
4714 ;; package author intends on distributing via github rather than pypi:
4715 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
4716 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
4717 version ".tar.gz"))
4718 (file-name (string-append name "-" version ".tar.gz"))
4719 (sha256
4720 (base32
4721 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
4722 (build-system python-build-system)
4723 (arguments
4724 '(#:tests? #f)) ; no tests
4725 (propagated-inputs `(("python-urwid" ,python-urwid)))
4726 (home-page "https://github.com/pazz/urwidtrees")
4727 (synopsis "Tree widgets for urwid")
4728 (description "Urwidtrees is a Widget Container API for the @code{urwid}
4729toolkit. Use it to build trees of widgets.")
4730 (license license:gpl3+)))
4731
4732(define-public python2-urwidtrees
4733 (package-with-python2 python-urwidtrees))
4734
4735(define-public python-ua-parser
4736 (package
4737 (name "python-ua-parser")
4738 (version "0.8.0")
4739 (source
4740 (origin
4741 (method url-fetch)
4742 (uri (pypi-uri "ua-parser" version))
4743 (sha256
4744 (base32
4745 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
4746 (build-system python-build-system)
4747 (arguments
4748 `(#:tests? #f)) ;no test suite in release
4749 (native-inputs
4750 `(("python-pyyaml" ,python-pyyaml)))
4751 (home-page "https://github.com/ua-parser/uap-python")
4752 (synopsis "User agent parser")
4753 (description
4754 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
4755 (license license:asl2.0)))
4756
4757(define-public python2-ua-parser
4758 (package-with-python2 python-ua-parser))
4759
4760(define-public python-user-agents
4761 (package
4762 (name "python-user-agents")
4763 (version "1.1.0")
4764 (source
4765 (origin
4766 (method url-fetch)
4767 (uri (pypi-uri "user-agents" version))
4768 (sha256
4769 (base32
4770 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
4771 (build-system python-build-system)
4772 (arguments
4773 `(#:tests? #f)) ;missing devices.json test file in release
4774 (propagated-inputs
4775 `(("python-ua-parser" ,python-ua-parser)))
4776 (home-page "https://github.com/selwin/python-user-agents")
4777 (synopsis "User Agent strings parsing library")
4778 (description
4779 "A library to identify devices (phones, tablets) and their capabilities by
4780parsing (browser/HTTP) user agent strings.")
4781 (license license:expat)))
4782
4783(define-public python2-user-agents
4784 (package-with-python2 python-user-agents))
4785
4786(define-public python-dbus
4787 (package
4788 (name "python-dbus")
4789 (version "1.2.8")
4790 (source
4791 (origin
4792 (method url-fetch)
4793 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
4794 "dbus-python-" version ".tar.gz"))
4795 (sha256
4796 (base32
4797 "0vvvjmiwnc9cjlks3gcdk43ap7llhlpz7cm1wbw0nc2yfsxjpwdb"))))
4798 (build-system gnu-build-system)
4799 (arguments
4800 '(#:phases
4801 (modify-phases %standard-phases
4802 (add-before
4803 'check 'pre-check
4804 (lambda _
4805 ;; XXX: For the missing '/etc/machine-id'.
4806 (substitute* "test/run-test.sh"
4807 (("DBUS_FATAL_WARNINGS=1")
4808 "DBUS_FATAL_WARNINGS=0"))
4809 #t)))))
4810 (native-inputs
4811 `(("pkg-config" ,pkg-config)))
4812 (inputs
4813 `(("python" ,python-wrapper)
4814 ("dbus-glib" ,dbus-glib)))
4815 (synopsis "Python bindings for D-bus")
4816 (description "python-dbus provides bindings for libdbus, the reference
4817implementation of D-Bus.")
4818 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
4819 (license license:expat)))
4820
4821(define-public python2-dbus
4822 (package (inherit python-dbus)
4823 (name "python2-dbus")
4824 (inputs `(("python" ,python-2)
4825 ,@(alist-delete "python"
4826 (package-inputs python-dbus)
4827 equal?)))
4828 ;; FIXME: on Python 2, the test_utf8 fails with:
4829 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
4830 (arguments `(#:tests? #f))))
4831
4832(define-public python-lxml
4833 (package
4834 (name "python-lxml")
4835 (version "4.2.5")
4836 (source
4837 (origin
4838 (method url-fetch)
4839 (uri (pypi-uri "lxml" version))
4840 (sha256
4841 (base32
4842 "0zw0y9hs0nflxhl9cs6ipwwh53szi3w2x06wl0k9cylyqac0cwin"))))
4843 (build-system python-build-system)
4844 (inputs
4845 `(("libxml2" ,libxml2)
4846 ("libxslt" ,libxslt)))
4847 (home-page "http://lxml.de/")
4848 (synopsis
4849 "Python XML processing library")
4850 (description
4851 "The lxml XML toolkit is a Pythonic binding for the C libraries
4852libxml2 and libxslt.")
4853 (license license:bsd-3))) ; and a few more, see LICENSES.txt
4854
4855(define-public python2-lxml
4856 (package-with-python2 python-lxml))
4857
4858;; beautifulsoup4 has a totally different namespace than 3.x,
4859;; and pypi seems to put it under its own name, so I guess we should too
4860(define-public python-beautifulsoup4
4861 (package
4862 (name "python-beautifulsoup4")
4863 (version "4.6.3")
4864 (source
4865 (origin
4866 (method url-fetch)
4867 (uri (pypi-uri "beautifulsoup4" version))
4868 (sha256
4869 (base32
4870 "041dhalzjciw6qyzzq7a2k4h1yvyk76xigp35hv5ibnn448ydy4h"))))
4871 (build-system python-build-system)
4872 (arguments
4873 `(#:phases
4874 (modify-phases %standard-phases
4875 ;; The Python 2 source is the definitive source of beautifulsoup4. We
4876 ;; must use this conversion script when building with Python 3. The
4877 ;; conversion script also runs the tests.
4878 ;; For more information, see the file 'convert-py3k' in the source
4879 ;; distribution.
4880 (replace 'check
dff0197e 4881 (lambda _ (invoke "./convert-py3k"))))))
44d10b1f
RW
4882 (home-page
4883 "https://www.crummy.com/software/BeautifulSoup/bs4/")
4884 (synopsis
4885 "Python screen-scraping library")
4886 (description
4887 "Beautiful Soup is a Python library designed for rapidly setting up
4888screen-scraping projects. It offers Pythonic idioms for navigating,
4889searching, and modifying a parse tree, providing a toolkit for
4890dissecting a document and extracting what you need. It automatically
4891converts incoming documents to Unicode and outgoing documents to UTF-8.")
4892 (license license:expat)
4893 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
4894
4895(define-public python2-beautifulsoup4
4896 (package
4897 (inherit (package-with-python2
4898 (strip-python2-variant python-beautifulsoup4)))
4899 (arguments `(#:python ,python-2))))
4900
4901(define-public python-netifaces
4902 (package
4903 (name "python-netifaces")
4904 (version "0.10.7")
4905 (source
4906 (origin
4907 (method url-fetch)
4908 (uri (pypi-uri "netifaces" version))
4909 (sha256
4910 (base32
4911 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
4912 (build-system python-build-system)
4913 (home-page "https://github.com/al45tair/netifaces")
4914 (synopsis
4915 "Python module for portable network interface information")
4916 (description
4917 "Netifaces is a Python module providing information on network
4918interfaces in an easy and portable manner.")
4919 (license license:expat)))
4920
4921(define-public python2-netifaces
4922 (package-with-python2 python-netifaces))
4923
4924(define-public python-networkx
4925 (package
4926 (name "python-networkx")
4927 (version "2.2")
4928 (source
4929 (origin
4930 (method url-fetch)
4931 (uri (pypi-uri "networkx" version ".zip"))
4932 (sha256
4933 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
4934 (build-system python-build-system)
4935 ;; python-decorator is needed at runtime.
4936 (propagated-inputs
4937 `(("python-decorator" ,python-decorator)))
4938 (native-inputs
4939 `(("python-nose" ,python-nose)
4940 ("unzip" ,unzip)))
4941 (home-page "https://networkx.github.io/")
4942 (synopsis "Python module for creating and manipulating graphs and networks")
4943 (description
4944 "NetworkX is a Python package for the creation, manipulation, and study
4945of the structure, dynamics, and functions of complex networks.")
4946 (license license:bsd-3)))
4947
4948(define-public python2-networkx
4949 (package-with-python2 python-networkx))
4950
4951(define-public python-datrie
4952 (package
4953 (name "python-datrie")
4954 (version "0.7.1")
4955 (source
4956 (origin
4957 (method url-fetch)
4958 (uri (pypi-uri "datrie" version))
4959 (sha256
4960 (base32
4961 "08r0if7dry2q7p34gf7ffyrlnf4bdvnprxgydlfxgfnvq8f3f4bs"))))
4962 (build-system python-build-system)
4963 (arguments
4964 `(#:phases (modify-phases %standard-phases
4965 (add-before 'build 'cythonize
4966 (lambda _
4967 ;; Regenerate Cython classes to solve ABI issues with Python
4968 ;; 3.7.0. See <https://github.com/pytries/datrie/issues/52>.
4969 (invoke "cython" "src/datrie.pyx" "src/cdatrie.pxd"
4970 "src/stdio_ext.pxd" "-a"))))))
4971 (native-inputs
4972 `(("python-cython" ,python-cython)
4973 ("python-hypothesis" ,python-hypothesis)
4974 ("python-pytest" ,python-pytest)
4975 ("python-pytest-runner" ,python-pytest-runner)))
4976 (home-page "https://github.com/kmike/datrie")
4977 (synopsis "Fast, efficiently stored trie for Python")
4978 (description
4979 "This package provides a fast, efficiently stored trie implementation for
4980Python.")
4981 (license license:lgpl2.1+)))
4982
4983(define-public snakemake
4984 (package
4985 (name "snakemake")
4986 (version "5.2.4")
4987 (source
4988 (origin
4989 (method url-fetch)
4990 (uri (pypi-uri "snakemake" version))
4991 (sha256
4992 (base32 "0gj0xxgiq3mp9qyyrbfzldiaq1giliqw0in64nqiz7vx49myqj7z"))))
4993 (build-system python-build-system)
4994 (arguments
4995 ;; TODO: Package missing test dependencies.
4996 '(#:tests? #f
4997 #:phases
4998 (modify-phases %standard-phases
4999 ;; For cluster execution Snakemake will call Python. Since there is
5000 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
5001 ;; this by calling the snakemake wrapper instead.
5002 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
5003 (lambda* (#:key outputs #:allow-other-keys)
5004 (substitute* "snakemake/executors.py"
5005 (("\\{sys.executable\\} -m snakemake")
5006 (string-append (assoc-ref outputs "out")
5007 "/bin/snakemake")))
5008 #t)))))
5009 (propagated-inputs
5010 `(("python-gitpython" ,python-gitpython)
5011 ("python-wrapt" ,python-wrapt)
5012 ("python-requests" ,python-requests)
5013 ("python-appdirs" ,python-appdirs)
5014 ("python-configargparse" ,python-configargparse)
5015 ("python-datrie" ,python-datrie)
5016 ("python-docutils" ,python-docutils)
5017 ("python-jinja2" ,python-jinja2)
5018 ("python-jsonschema" ,python-jsonschema)
5019 ("python-networkx" ,python-networkx)
5020 ("python-pyyaml" ,python-pyyaml)
5021 ("python-ratelimiter" ,python-ratelimiter)))
5022 (home-page "https://snakemake.readthedocs.io")
5023 (synopsis "Python-based execution environment for make-like workflows")
5024 (description
5025 "Snakemake aims to reduce the complexity of creating workflows by
5026providing a clean and modern domain specific specification language (DSL) in
5027Python style, together with a fast and comfortable execution environment.")
5028 (license license:expat)))
5029
5030;; This is currently needed for the pigx-* packages.
5031(define-public snakemake-4
5032 (package (inherit snakemake)
5033 (version "4.4.0")
5034 (source
5035 (origin
5036 (method url-fetch)
5037 (uri (pypi-uri "snakemake" version))
5038 (sha256
5039 (base32 "0g0paia4z7w3srnqdmavq3hrb2x7qnpf81jx50njl0p7y4y0j8jv"))))
5040 (propagated-inputs
5041 `(("python-wrapt" ,python-wrapt)
5042 ("python-requests" ,python-requests)
5043 ("python-appdirs" ,python-appdirs)
5044 ("python-configargparse" ,python-configargparse)
5045 ("python-pyyaml" ,python-pyyaml)
5046 ("python-ratelimiter" ,python-ratelimiter)))))
5047
5048(define-public python-pyqrcode
5049 (package
5050 (name "python-pyqrcode")
5051 (version "1.2.1")
5052 (source
5053 (origin
5054 (method url-fetch)
5055 (uri (pypi-uri "PyQRCode" version))
5056 (sha256
5057 (base32
5058 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
5059 (build-system python-build-system)
5060 (home-page
5061 "https://github.com/mnooner256/pyqrcode")
5062 (synopsis "QR code generator")
5063 (description
5064 "Pyqrcode is a QR code generator written purely in Python with
5065SVG, EPS, PNG and terminal output.")
5066 (license license:bsd-3)))
5067
5068(define-public python-seaborn
5069 (package
5070 (name "python-seaborn")
5071 (version "0.9.0")
5072 (source
5073 (origin
5074 (method url-fetch)
5075 (uri (pypi-uri "seaborn" version))
5076 (sha256
5077 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))))
5078 (build-system python-build-system)
5079 (arguments
5080 `(#:phases
5081 (modify-phases %standard-phases
5082 (add-before 'check 'start-xserver
5083 (lambda* (#:key inputs #:allow-other-keys)
5084 (let ((xorg-server (assoc-ref inputs "xorg-server")))
5085 ;; There must be a running X server and make check doesn't
5086 ;; start one. Therefore we must do it.
5087 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
5088 (setenv "DISPLAY" ":1")
5089 #t)))
5090 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
5091 (propagated-inputs
5092 `(("python-pandas" ,python-pandas)
5093 ("python-matplotlib" ,python-matplotlib)
5094 ("python-numpy" ,python-numpy)
5095 ("python-scipy" ,python-scipy)))
5096 (native-inputs
5097 `(("python-pytest" ,python-pytest)
5098 ("xorg-server" ,xorg-server)))
5099 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5100 (synopsis "Statistical data visualization")
5101 (description
5102 "Seaborn is a library for making attractive and informative statistical
5103graphics in Python. It is built on top of matplotlib and tightly integrated
5104with the PyData stack, including support for numpy and pandas data structures
5105and statistical routines from scipy and statsmodels.")
5106 (license license:bsd-3)))
5107
5108(define-public python2-seaborn
5109 (package-with-python2 python-seaborn))
5110
5111(define-public python-mpmath
5112 (package
5113 (name "python-mpmath")
5114 (version "0.19")
5115 (source (origin
5116 (method url-fetch)
5117 (uri (string-append "http://mpmath.org/files/mpmath-"
5118 version ".tar.gz"))
5119 (sha256
5120 (base32
5121 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
5122 (build-system python-build-system)
5123 (arguments
5124 '(#:phases
5125 (modify-phases %standard-phases
5126 (replace 'check
5127 (lambda _
5d7a6f1c 5128 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
44d10b1f
RW
5129 (home-page "http://mpmath.org")
5130 (synopsis "Arbitrary-precision floating-point arithmetic in python")
5131 (description
5132 "@code{mpmath} can be used as an arbitrary-precision substitute for
5133Python's float/complex types and math/cmath modules, but also does much
5134more advanced mathematics.")
5135 (license license:bsd-3)))
5136
5137(define-public python2-mpmath
5138 (package-with-python2 python-mpmath))
5139
5140(define-public python-bigfloat
5141 (package
5142 (name "python-bigfloat")
5143 (version "0.3.0")
5144 (source
5145 (origin
5146 (method url-fetch)
5147 (uri (pypi-uri "bigfloat" version))
5148 (sha256
5149 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
5150 (build-system python-build-system)
5151 (inputs
5152 `(("mpfr" ,mpfr)))
5153 (home-page "https://github.com/mdickinson/bigfloat")
5154 (synopsis "Arbitrary precision floating-point arithmetic for Python")
5155 (description
5156 "This packages provides a Python interface to the MPFR library for
5157multiprecision arithmetic.")
5158 (license license:lgpl3+)))
5159
5160(define-public python2-bigfloat
5161 (package-with-python2 python-bigfloat))
5162
5163(define-public python-sympy
5164 (package
5165 (name "python-sympy")
5166 (version "1.1.1")
5167 (source
5168 (origin
5169 (method url-fetch)
5170 (uri (string-append
5171 "https://github.com/sympy/sympy/releases/download/sympy-"
5172 version "/sympy-" version ".tar.gz"))
5173 (sha256
5174 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
5175 (build-system python-build-system)
5176 (arguments
5177 `(#:phases
5178 (modify-phases %standard-phases
5179 ;; Run the core tests after installation. By default it would run
5180 ;; *all* tests, which take a very long time to complete and are known
5181 ;; to be flaky.
5182 (delete 'check)
5183 (add-after 'install 'check
5184 (lambda* (#:key outputs #:allow-other-keys)
5185 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
5186 #t)))))
5187 (propagated-inputs
5188 `(("python-mpmath" ,python-mpmath)))
5189 (home-page "http://www.sympy.org/")
5190 (synopsis "Python library for symbolic mathematics")
5191 (description
5192 "SymPy is a Python library for symbolic mathematics. It aims to become a
5193full-featured computer algebra system (CAS) while keeping the code as simple
5194as possible in order to be comprehensible and easily extensible.")
5195 (license license:bsd-3)))
5196
5197(define-public python2-sympy
5198 (package
5199 (inherit (package-with-python2 python-sympy))
5200 (arguments
5201 `(#:phases
5202 (modify-phases %standard-phases
5203 ;; Run the core tests after installation. By default it would run
5204 ;; *all* tests, which take a very long time to complete and are known
5205 ;; to be flaky.
5206 (delete 'check)
5207 (add-after 'install 'check
5208 (lambda* (#:key outputs #:allow-other-keys)
5209 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
5210 #t)))))))
5211
5212(define-public python-q
5213 (package
5214 (name "python-q")
5215 (version "2.6")
5216 (source
5217 (origin
5218 (method url-fetch)
5219 (uri (pypi-uri "q" version))
5220 (sha256
5221 (base32
5222 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
5223 (build-system python-build-system)
5224 (home-page "https://github.com/zestyping/q")
5225 (synopsis "Quick-and-dirty debugging output for tired programmers")
5226 (description
5227 "q is a Python module for \"print\" style of debugging Python code. It
5228provides convenient short API for print out of values, tracebacks, and
5229falling into the Python interpreter.")
5230 (license license:asl2.0)))
5231
5232(define-public python2-q
5233 (package-with-python2 python-q))
5234
5235(define-public python2-xlib
5236 (package
5237 (name "python2-xlib")
5238 (version "0.14")
5239 (source (origin
5240 (method url-fetch)
5241 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
5242 "/" version "/"
5243 "python-xlib-" version ".tar.gz"))
5244 (sha256
5245 (base32
5246 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
5247 (build-system python-build-system)
5248 (arguments
5249 `(#:python ,python-2 ;Python 2 only
5250 #:tests? #f)) ;no tests
5251 (home-page "http://python-xlib.sourceforge.net/")
5252 (synopsis "Python X11 client library")
5253 (description
5254 "The Python X Library is intended to be a fully functional X client
5255library for Python programs. It is useful to implement low-level X clients.
5256It is written entirely in Python.")
5257 (license license:gpl2+)))
5258
5259(define-public python-singledispatch
5260 (package
5261 (name "python-singledispatch")
5262 (version "3.4.0.3")
5263 (source
5264 (origin
5265 (method url-fetch)
5266 (uri (pypi-uri "singledispatch" version))
5267 (sha256
5268 (base32
5269 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
5270 (build-system python-build-system)
5271 (native-inputs
5272 `(("python-six" ,python-six))) ; required for conversion, not at run-time
5273 (home-page
5274 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
5275 (synopsis "Backport of singledispatch feature from Python 3.4")
5276 (description
5277 "This library brings functools.singledispatch from Python 3.4 to Python
52782.6-3.3.")
5279 (license license:expat)))
5280
5281(define-public python2-singledispatch
5282 (package-with-python2 python-singledispatch))
5283
5284;; the python- version can be removed with python-3.5
5285(define-public python-backports-abc
5286 (package
5287 (name "python-backports-abc")
5288 (version "0.5")
5289 (source
5290 (origin
5291 (method url-fetch)
5292 (uri (pypi-uri "backports_abc" version))
5293 (sha256
5294 (base32
5295 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
5296 (build-system python-build-system)
5297 (home-page "https://github.com/cython/backports_abc")
5298 (synopsis "Backport of additions to the 'collections.abc' module")
5299 (description
5300 "Python-backports-abc provides a backport of additions to the
5301'collections.abc' module in Python-3.5.")
5302 (license license:psfl)))
5303
5304(define-public python2-backports-abc
5305 (package-with-python2 python-backports-abc))
5306
5307(define-public python-backports-csv
5308 (package
5309 (name "python-backports-csv")
5310 (version "1.0.5")
5311 (source
5312 (origin
5313 (method url-fetch)
5314 (uri (pypi-uri "backports.csv" version))
5315 (sha256
5316 (base32
5317 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
5318 (build-system python-build-system)
5319 (home-page "https://github.com/ryanhiebert/backports.csv")
5320 (synopsis "Backport of Python 3's csv module for Python 2")
5321 (description
5322 "Provides a backport of Python 3's @code{csv} module for parsing
5323comma separated values. The API of the @code{csv} module in Python 2
5324is drastically different from the @code{csv} module in Python 3.
5325This is due, for the most part, to the difference between str in
5326Python 2 and Python 3.")
5327 (license license:psfl)))
5328
5329(define-public python2-backports-csv
5330 (package-with-python2 python-backports-csv))
5331
5332(define-public python2-backports-shutil-get-terminal-size
5333 (package
5334 (name "python2-backports-shutil-get-terminal-size")
5335 (version "1.0.0")
5336 (source
5337 (origin
5338 (method url-fetch)
5339 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
5340 (sha256
5341 (base32
5342 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
5343 (build-system python-build-system)
5344 (arguments
5345 `(#:python ,python-2
5346 #:phases
5347 (modify-phases %standard-phases
5348 (replace 'check
5349 (lambda _
4a4a7d9a 5350 (invoke "py.test" "-v"))))))
44d10b1f
RW
5351 (native-inputs
5352 `(("python2-pytest" ,python2-pytest)))
5353 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
5354 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
5355 (description
5356 "This package provides a backport of the @code{get_terminal_size
5357function} from Python 3.3's @code{shutil}.
5358Unlike the original version it is written in pure Python rather than C,
5359so it might be a tiny bit slower.")
5360 (license license:expat)))
5361
5362(define-public python-waf
5363 (package
5364 (name "python-waf")
5365 (version "2.0.11")
5366 (source (origin
5367 (method url-fetch)
5368 (uri (string-append "https://waf.io/"
5369 "waf-" version ".tar.bz2"))
5370 (sha256
5371 (base32
5372 "13zrniwkmfqgsgzi9v5m1367fppp9yzrz6z2ny6hy8dmpb8mj4z4"))))
5373 (build-system python-build-system)
5374 (arguments
5375 '(#:phases
5376 (modify-phases %standard-phases
5377 (replace 'build
5378 (lambda _
5379 (invoke "python" "waf-light" "configure" "build")))
5380 (replace 'check
5381 (lambda _
5382 (invoke "python" "waf" "--version")))
5383 (replace 'install
5384 (lambda* (#:key outputs #:allow-other-keys)
5385 (let ((out (assoc-ref outputs "out")))
5386 (install-file "waf" (string-append out "/bin")))
5387 #t))
5388 ;; waf breaks when it is wrapped.
5389 (delete 'wrap))))
5390 (home-page "https://waf.io/")
5391 (synopsis "Python-based build system")
5392 (description
5393 "Waf is a Python-based framework for configuring, compiling and installing
5394applications.")
5395 (license license:bsd-3)))
5396
5397(define-public python2-waf
5398 (package-with-python2 python-waf))
5399
5400(define-public python-pyzmq
5401 (package
5402 (name "python-pyzmq")
5403 (version "17.1.2")
5404 (source
5405 (origin
5406 (method url-fetch)
5407 (uri (pypi-uri "pyzmq" version))
5408 (sha256
5409 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
5410 (build-system python-build-system)
5411 (arguments
5412 `(#:configure-flags
5413 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
5414 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
5415 ;; --inplace' for 'python setup.py test' to work.
5416 #:tests? #f))
5417 (inputs
5418 `(("zeromq" ,zeromq)))
5419 (native-inputs
5420 `(("pkg-config" ,pkg-config)
5421 ("python-nose" ,python-nose)))
5422 (home-page "https://github.com/zeromq/pyzmq")
5423 (synopsis "Python bindings for 0MQ")
5424 (description
5425 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
5426 (license license:bsd-4)))
5427
5428(define-public python2-pyzmq
5429 (package-with-python2 python-pyzmq))
5430
5431(define-public python-pep8
5432 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
5433 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
5434 ;; some dependents' test suites, and nothing more.
5435 (package
5436 (name "python-pep8")
5437 (version "1.7.0")
5438 (source
5439 (origin
5440 (method url-fetch)
5441 (uri (pypi-uri "pep8" version))
5442 (sha256
5443 (base32
5444 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
5445 (build-system python-build-system)
5446 (home-page "https://pep8.readthedocs.org/")
5447 (synopsis "Python style guide checker")
5448 (description
5449 "This tools checks Python code against some of the style conventions in
5450PEP 8.")
5451 (license license:expat)))
5452
5453(define-public python2-pep8
5454 (package-with-python2 python-pep8))
5455
5456(define-public python-pyflakes
5457 (package
5458 (name "python-pyflakes")
5459 (version "2.0.0")
5460 (source
5461 (origin
5462 (method url-fetch)
5463 (uri (pypi-uri "pyflakes" version))
5464 (sha256
5465 (base32
5466 "0jba28czyvimdc72llms3f17swp3i8jdcabf5w0j00adfbn64xls"))))
5467 (build-system python-build-system)
5468 (home-page
5469 "https://github.com/pyflakes/pyflakes")
5470 (synopsis "Passive checker of Python programs")
5471 (description
5472 "Pyflakes statically checks Python source code for common errors.")
5473 (license license:expat)))
5474
5475(define-public python2-pyflakes
5476 (package-with-python2 python-pyflakes))
5477
5478(define-public python-mccabe
5479 (package
5480 (name "python-mccabe")
5481 (version "0.6.1")
5482 (source
5483 (origin
5484 (method url-fetch)
5485 (uri (pypi-uri "mccabe" version))
5486 (sha256
5487 (base32
5488 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
5489 (build-system python-build-system)
5490 (native-inputs
5491 `(("python-pytest" ,python-pytest-bootstrap)
5492 ("python-pytest-runner" ,python-pytest-runner)))
5493 (home-page "https://github.com/flintwork/mccabe")
5494 (synopsis "McCabe checker, plugin for flake8")
5495 (description
5496 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
5497complexity of Python source code.")
5498 (license license:expat)))
5499
5500(define-public python2-mccabe
5501 (package-with-python2 python-mccabe))
5502
5503(define-public python-mccabe-0.2.1
5504 (package (inherit python-mccabe)
5505 (version "0.2.1")
5506 (source
5507 (origin
5508 (method url-fetch)
5509 (uri (pypi-uri "mccabe" version))
5510 (sha256
5511 (base32
5512 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
5513
5514(define-public python2-mccabe-0.2.1
5515 (package-with-python2 python-mccabe-0.2.1))
5516
5517;; Flake8 2.4.1 requires an older version of pep8.
5518;; This should be removed ASAP.
5519(define-public python-pep8-1.5.7
5520 (package (inherit python-pep8)
5521 (version "1.5.7")
5522 (source
f3576970
RW
5523 (origin
5524 (method url-fetch)
5525 (uri (pypi-uri "pep8" version))
5526 (sha256
5527 (base32
5528 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
44d10b1f
RW
5529 (arguments
5530 ;; XXX Tests not compatible with Python 3.5.
5531 '(#:tests? #f))))
5532
5533(define-public python2-pep8-1.5.7
5534 (package-with-python2 python-pep8-1.5.7))
5535
5536;; Flake8 2.4.1 requires an older version of pyflakes.
5537;; This should be removed ASAP.
5538(define-public python-pyflakes-0.8.1
5539 (package (inherit python-pyflakes)
5540 (version "0.8.1")
5541 (source
5542 (origin
5543 (method url-fetch)
5544 (uri (string-append
5545 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
5546 version
5547 ".tar.gz"))
5548 (sha256
5549 (base32
5550 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
5551 (arguments
5552 ;; XXX Tests not compatible with Python 3.5.
5553 '(#:tests? #f))))
5554
5555(define-public python2-pyflakes-0.8.1
5556 (package-with-python2 python-pyflakes-0.8.1))
5557
5558;; This package is used by hypothesis which has thousands of dependent packages.
5559;; FIXME: Consolidate this with "python-flake8" below in the next rebuild cycle.
5560(define-public python-flake8-3.5
5561 (package
5562 (name "python-flake8")
5563 (version "3.5.0")
5564 (source
5565 (origin
5566 (method url-fetch)
5567 (uri (pypi-uri "flake8" version))
5568 (sha256
5569 (base32
5570 "184b33grvvjmiwlv9kyd7yng9qv5ld24154j70z332xxg9gjclvj"))))
5571 (build-system python-build-system)
5572 (arguments
5573 `(#:phases
5574 (modify-phases %standard-phases
5575 ;; Two errors don't seem to have assigned codes.
5576 (add-after 'unpack 'delete-broken-test
5577 (lambda _ (delete-file "tests/unit/test_pyflakes_codes.py") #t))
5578 (add-after 'unpack 'fix-problem-with-pycodestyle
5579 (lambda _
5580 ;; See https://gitlab.com/pycqa/flake8/merge_requests/230
5581 ;; This should no longer be needed with the next release.
5582 (substitute* "setup.py"
5583 (("PEP8_PLUGIN\\('break_around_binary_operator'\\),")
5584 "PEP8_PLUGIN('break_after_binary_operator'),\
5585PEP8_PLUGIN('break_before_binary_operator'),"))
5586 #t))
5587 (delete 'check)
5588 (add-after 'install 'check
5589 (lambda* (#:key inputs outputs #:allow-other-keys)
5590 (add-installed-pythonpath inputs outputs)
5591 (invoke "pytest" "-v")
5592 #t)))))
5593 (propagated-inputs
5594 `(("python-pycodestyle" ,python-pycodestyle)
5595 ("python-pyflakes" ,python-pyflakes)
5596 ("python-mccabe" ,python-mccabe)))
5597 (native-inputs
5598 `(("python-mock" ,python-mock)
5599 ("python-pytest" ,python-pytest-bootstrap)
5600 ("python-pytest-runner" ,python-pytest-runner)))
5601 (home-page "https://gitlab.com/pycqa/flake8")
5602 (synopsis
5603 "The modular source code checker: pep8, pyflakes and co")
5604 (description
5605 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
5606 (properties `((python2-variant . ,(delay python2-flake8-3.5))))
5607 (license license:expat)))
5608
5609(define-public python2-flake8-3.5
5610 (let ((base (package-with-python2 (strip-python2-variant python-flake8-3.5))))
5611 (package (inherit base)
5612 (propagated-inputs
5613 `(("python2-configparser" ,python2-configparser)
5614 ("python2-enum34" ,python2-enum34)
5615 ,@(package-propagated-inputs base))))))
5616
5617;; Version 3.5.0 has compatibility issues with Pyflakes 2.0, so we need
5618;; this newer version. Keep it as a separate variable for now to avoid
5619;; rebuilding "python-hypothesis"; this should be removed in the next
5620;; rebuild cycle.
5621(define-public python-flake8
5622 (package
5623 (inherit python-flake8-3.5)
5624 (version "3.6.0")
5625 (source (origin
5626 (method url-fetch)
5627 (uri (pypi-uri "flake8" version))
5628 (sha256
5629 (base32
5630 "0w0nprx22rbvrrkbfx9v5jc5gskbm08g219l7r8wai8zfswgadba"))))
5631 (arguments
5632 (substitute-keyword-arguments (package-arguments python-flake8-3.5)
5633 ((#:phases phases)
5634 `(modify-phases ,phases
5635 (delete 'delete-broken-test)
5636 (delete 'fix-problem-with-pycodestyle)))))
5637 (properties `((python2-variant . ,(delay python2-flake8))))))
5638
5639(define-public python2-flake8
5640 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
5641 (package (inherit base)
5642 (propagated-inputs
5643 (package-propagated-inputs python2-flake8-3.5)))))
5644
5645;; python-hacking requires flake8 <2.6.0.
5646(define-public python-flake8-2.5
5647 (package
5648 (inherit python-flake8)
5649 (version "2.5.5")
5650 (source (origin
5651 (method url-fetch)
5652 (uri (pypi-uri "flake8" version))
5653 (sha256
5654 (base32
5655 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
5656 (propagated-inputs
5657 `(("python-pep8" ,python-pep8)
5658 ,@(package-propagated-inputs python-flake8)))
5659 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
5660
5661(define-public python2-flake8-2.5
5662 (package
5663 (inherit python2-flake8)
5664 (version (package-version python-flake8-2.5))
5665 (source (origin
5666 (inherit (package-source python-flake8-2.5))))
5667 (propagated-inputs
5668 `(("python2-pep8" ,python2-pep8)
5669 ,@(package-propagated-inputs python2-flake8)))))
5670
5671(define-public python-flake8-polyfill
5672 (package
5673 (name "python-flake8-polyfill")
5674 (version "1.0.2")
5675 (source
5676 (origin
5677 (method url-fetch)
5678 (uri (pypi-uri "flake8-polyfill" version))
5679 (sha256
5680 (base32
5681 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
5682 (build-system python-build-system)
5683 (arguments
5684 '(#:phases
5685 (modify-phases %standard-phases
5686 (replace 'check
5687 (lambda _
5688 (setenv "PYTHONPATH"
5689 (string-append (getcwd) "/build/lib:"
5690 (getenv "PYTHONPATH")))
4f0a0894 5691 (invoke "py.test" "-v"))))))
44d10b1f
RW
5692 (native-inputs
5693 `(("python-flake8" ,python-flake8)
5694 ("python-mock" ,python-mock)
5695 ("python-pep8" ,python-pep8)
5696 ("python-pycodestyle" ,python-pycodestyle)
5697 ("python-pytest" ,python-pytest)))
5698 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
5699 (synopsis "Polyfill package for Flake8 plugins")
5700 (description
5701 "This package that provides some compatibility helpers for Flake8
5702plugins that intend to support Flake8 2.x and 3.x simultaneously.")
5703 (license license:expat)))
5704
5705(define-public python2-flake8-polyfill
5706 (package-with-python2 python-flake8-polyfill))
5707
5708(define-public python-mistune
5709 (package
5710 (name "python-mistune")
5711 (version "0.8.4")
5712 (source
5713 (origin
5714 (method url-fetch)
5715 (uri (pypi-uri "mistune" version))
5716 (sha256
5717 (base32
5718 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
5719 (build-system python-build-system)
5720 (native-inputs
5721 `(("python-nose" ,python-nose)
5722 ("python-cython" ,python-cython)))
5723 (home-page "https://github.com/lepture/mistune")
5724 (synopsis "Markdown parser in pure Python")
5725 (description "This package provides a fast markdown parser in pure
5726Python.")
5727 (license license:bsd-3)))
5728
5729(define-public python2-mistune
5730 (package-with-python2 python-mistune))
5731
5732(define-public python-markdown
5733 (package
5734 (name "python-markdown")
5735 (version "3.0.1")
5736 (source
5737 (origin
5738 (method url-fetch)
5739 (uri (pypi-uri "Markdown" version))
5740 (sha256
5741 (base32
5742 "0z6v8649sr434d5r5zmrhydka7v7f9yas4bwcgkcs0650jdhybnh"))))
5743 (build-system python-build-system)
5744 (native-inputs
5745 `(("python-nose" ,python-nose)
5746 ("python-pyyaml" ,python-pyyaml)))
5747 (home-page "https://python-markdown.github.io/")
5748 (synopsis "Python implementation of Markdown")
5749 (description
5750 "This package provides a Python implementation of John Gruber's
5751Markdown. The library features international input, various Markdown
5752extensions, and several HTML output formats. A command line wrapper
5753markdown_py is also provided to convert Markdown files to HTML.")
5754 (license license:bsd-3)))
5755
5756(define-public python2-markdown
5757 (package-with-python2 python-markdown))
5758
5759(define-public python-ptyprocess
5760 (package
5761 (name "python-ptyprocess")
5762 (version "0.5.2")
5763 (source
5764 (origin
5765 (method url-fetch)
5766 (uri (pypi-uri "ptyprocess" version))
5767 (sha256
5768 (base32
5769 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
5770 (build-system python-build-system)
5771 (native-inputs
5772 `(("python-nose" ,python-nose)))
5773 (arguments
5774 `(#:phases
5775 (modify-phases %standard-phases
5776 (replace 'check
7904d6fa 5777 (lambda _ (invoke "nosetests"))))))
44d10b1f
RW
5778 (home-page "https://github.com/pexpect/ptyprocess")
5779 (synopsis "Run a subprocess in a pseudo terminal")
5780 (description
5781 "This package provides a Python library used to launch a subprocess in a
5782pseudo terminal (pty), and interact with both the process and its pty.")
5783 (license license:isc)))
5784
5785(define-public python2-ptyprocess
5786 (package-with-python2 python-ptyprocess))
5787
5788(define-public python-cram
5789 (package
5790 (name "python-cram")
5791 (version "0.7")
5792 (home-page "https://bitheap.org/cram/")
5793 (source (origin
5794 (method url-fetch)
5795 (uri (list (string-append home-page "cram-"
5796 version ".tar.gz")
5797 (pypi-uri "cram" version)))
5798 (sha256
5799 (base32
5800 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
5801 (arguments
5802 '(#:phases
5803 (modify-phases %standard-phases
5804 (add-after 'unpack 'patch-source
5805 (lambda _
5806 (substitute* (find-files "cram" ".*\\.py$")
5807 ;; Replace default shell path.
5808 (("/bin/sh") (which "sh")))
5809 (substitute* (find-files "tests" ".*\\.t$")
5810 (("md5") "md5sum")
5811 (("/bin/bash") (which "bash"))
5812 (("/bin/sh") (which "sh")))
5813 (substitute* "cram/_test.py"
5814 ;; This hack works around a bug triggered by substituting
5815 ;; the /bin/sh paths. "tests/usage.t" compares the output of
5816 ;; "cram -h", which breaks the output at 80 characters. This
5817 ;; causes the line showing the default shell to break into two
5818 ;; lines, but the test expects a single line...
5819 (("env\\['COLUMNS'\\] = '80'")
5820 "env['COLUMNS'] = '160'"))
5821 #t))
5822 (delete 'check)
5823 (add-after 'install 'check
5824 ;; The test phase uses the built library and executable.
5825 ;; It's easier to run it after install since the build
5826 ;; directory contains version-specific PATH.
5827 (lambda* (#:key inputs outputs #:allow-other-keys)
5828 (add-installed-pythonpath inputs outputs)
5829 (setenv "PATH" (string-append (getenv "PATH") ":"
5830 (assoc-ref outputs "out") "/bin"))
2d7db192 5831 (invoke "make" "test"))))))
44d10b1f
RW
5832 (build-system python-build-system)
5833 (native-inputs
5834 `(("python-coverage" ,python-coverage)
5835 ("which" ,which)))
5836 (synopsis "Simple testing framework for command line applications")
5837 (description
5838 "Cram is a functional testing framework for command line applications.
5839Cram tests look like snippets of interactive shell sessions. Cram runs each
5840command and compares the command output in the test with the command’s actual
5841output.")
5842 (license license:gpl2+)))
5843
5844(define-public python2-cram
5845 (package-with-python2 python-cram))
5846
5847(define-public python-straight-plugin
5848 (package
5849 (name "python-straight-plugin")
5850 (version "1.4.1")
5851 (source
5852 (origin
5853 (method url-fetch)
5854 (uri (pypi-uri "straight.plugin" version))
5855 (sha256
5856 (base32
5857 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
5858 (build-system python-build-system)
5859 (home-page "https://github.com/ironfroggy/straight.plugin")
5860 (synopsis "Simple namespaced plugin facility")
5861 (description "Straight Plugin provides a type of plugin you can create from
5862almost any existing Python modules, and an easy way for outside developers to
5863add functionality and customization to your projects with their own plugins.")
5864 (license license:expat)))
5865
5866(define-public python2-straight-plugin
5867 (package-with-python2 python-straight-plugin))
5868
5869(define-public python-fonttools
5870 (package
5871 (name "python-fonttools")
5872 (version "3.28.0")
5873 (source (origin
5874 (method url-fetch)
5875 (uri (pypi-uri "fonttools" version ".zip"))
5876 (sha256
5877 (base32
5878 "0vsvjhidpb5kywpjgz1j3fywzkddxkb0afqai18qa3h6lqjyxwpb"))))
5879 (build-system python-build-system)
5880 (native-inputs
5881 `(("unzip" ,unzip)
5882 ("python-pytest" ,python-pytest)
5883 ("python-pytest-runner" ,python-pytest-runner)))
5884 (home-page "https://github.com/behdad/fonttools")
5885 (synopsis "Tools to manipulate font files")
5886 (description
5887 "FontTools/TTX is a library to manipulate font files from Python. It
5888supports reading and writing of TrueType/OpenType fonts, reading and writing
5889of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
5890also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
5891from an XML-based format.")
5892 (license license:expat)))
5893
5894(define-public python2-fonttools
5895 (package-with-python2 python-fonttools))
5896
5897(define-public python-ly
5898 (package
5899 (name "python-ly")
5900 (version "0.9.5")
5901 (source
5902 (origin
5903 (method url-fetch)
5904 (uri (pypi-uri name version))
5905 (sha256
5906 (base32
5907 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
5908 (build-system python-build-system)
5909 (arguments
5910 ;; FIXME: Some tests need network access.
5911 '(#:tests? #f))
5912 (synopsis "Tool and library for manipulating LilyPond files")
5913 (description "This package provides a Python library to parse, manipulate
5914or create documents in LilyPond format. A command line program ly is also
5915provided that can be used to do various manipulations with LilyPond files.")
5916 (home-page "https://pypi.python.org/pypi/python-ly")
5917 (license license:gpl2+)))
5918
5919(define-public python-appdirs
5920 (package
5921 (name "python-appdirs")
5922 (version "1.4.3")
5923 (source
5924 (origin
5925 (method url-fetch)
5926 (uri (pypi-uri "appdirs" version))
5927 (sha256
5928 (base32
5929 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
5930 (build-system python-build-system)
5931 (home-page "https://github.com/ActiveState/appdirs")
5932 (synopsis
5933 "Determine platform-specific dirs, e.g. a \"user data dir\"")
5934 (description
5935 "This module provides a portable way of finding out where user data
5936should be stored on various operating systems.")
5937 (license license:expat)))
5938
5939(define-public python2-appdirs
5940 (package-with-python2 python-appdirs))
5941
5942(define-public python-llfuse
5943 (package
5944 (name "python-llfuse")
5945 (version "1.3.5")
5946 (source (origin
5947 (method url-fetch)
5948 (uri (pypi-uri "llfuse" version ".tar.bz2"))
5949 (sha256
5950 (base32
5951 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
5952 (build-system python-build-system)
5953 (inputs
5954 `(("fuse" ,fuse)
5955 ("attr" ,attr)))
5956 (native-inputs
5957 `(("pkg-config" ,pkg-config)))
5958 (synopsis "Python bindings for FUSE")
5959 (description
5960 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
5961 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
5962 (license license:lgpl2.0+)
5963 (properties `((python2-variant . ,(delay python2-llfuse))))))
5964
5965(define-public python2-llfuse
5966 (package (inherit (package-with-python2
5967 (strip-python2-variant python-llfuse)))
5968 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
5969
5970;; For attic-0.16
5971(define-public python-llfuse-0.41
5972 (package (inherit python-llfuse)
5973 (version "0.41.1")
5974 (source (origin
5975 (method url-fetch)
5976 (uri (string-append
5977 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
5978 "llfuse-" version ".tar.bz2"))
5979 (sha256
5980 (base32
5981 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
5982 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
5983 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
5984 (license (list license:expat license:lgpl2.0+))))
5985
5986(define-public python-msgpack
5987 (package
5988 (name "python-msgpack")
5989 (version "0.5.6")
5990 (source (origin
5991 (method url-fetch)
5992 (uri (pypi-uri "msgpack" version))
5993 (sha256
5994 (base32
5995 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
5996 (build-system python-build-system)
5997 (arguments
5998 `(#:modules ((guix build utils)
5999 (guix build python-build-system)
6000 (ice-9 ftw)
6001 (srfi srfi-1)
6002 (srfi srfi-26))
6003 #:phases
6004 (modify-phases %standard-phases
6005 (replace 'check
6006 (lambda _
6007 (let ((cwd (getcwd)))
6008 (setenv "PYTHONPATH"
6009 (string-append cwd "/build/"
6010 (find (cut string-prefix? "lib" <>)
6011 (scandir (string-append cwd "/build")))
6012 ":"
6013 (getenv "PYTHONPATH")))
6014 (invoke "pytest" "-v" "test")))))))
6015 (native-inputs
6016 `(("python-pytest" ,python-pytest)))
6017 (synopsis "MessagePack (de)serializer")
6018 (description "MessagePack is a fast, compact binary serialization format,
6019suitable for similar data to JSON. This package provides CPython bindings for
6020reading and writing MessagePack data.")
6021 (home-page "https://pypi.python.org/pypi/msgpack/")
6022 (license license:asl2.0)))
6023
6024;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
6025;; release 0.5. Some packages like borg still call it by the old name for now.
6026;; <https://bugs.gnu.org/30662>
6027(define-public python-msgpack-transitional
6028 (package
6029 (inherit python-msgpack)
6030 (name "python-msgpack-transitional")
6031 (arguments
6032 (substitute-keyword-arguments (package-arguments python-msgpack)
6033 ((#:phases phases)
6034 `(modify-phases ,phases
6035 (add-after 'unpack 'configure-transitional
6036 (lambda _
6037 ;; Keep using the old name.
6038 (substitute* "setup.py"
6039 (("TRANSITIONAL = False")
6040 "TRANSITIONAL = 1"))
6041 #t))))))))
6042
6043(define-public python2-msgpack
6044 (package-with-python2 python-msgpack))
6045
6046(define-public python-netaddr
6047 (package
6048 (name "python-netaddr")
6049 (version "0.7.19")
6050 (source
6051 (origin
6052 (method url-fetch)
6053 (uri (pypi-uri "netaddr" version))
6054 (sha256
6055 (base32
6056 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
6057 (build-system python-build-system)
6058 (arguments `(#:tests? #f)) ;; No tests.
6059 (home-page "https://github.com/drkjam/netaddr/")
6060 (synopsis "Pythonic manipulation of network addresses")
6061 (description
6062 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6063and MAC network addresses.")
6064 (license license:bsd-3)))
6065
6066(define-public python2-netaddr
6067 (package-with-python2 python-netaddr))
6068
6069(define-public python-wrapt
6070 (package
6071 (name "python-wrapt")
dddd7a75 6072 (version "1.11.1")
44d10b1f
RW
6073 (source
6074 (origin
6075 (method url-fetch)
6076 (uri (pypi-uri "wrapt" version))
6077 (sha256
6078 (base32
dddd7a75 6079 "0cqmysny1pz01jw26q48q5zasvns6507rwhgm6wcw743f0r01sja"))))
44d10b1f
RW
6080 (build-system python-build-system)
6081 (arguments
6082 ;; Tests are not included in the tarball, they are only available in the
6083 ;; git repository.
6084 `(#:tests? #f))
6085 (home-page "https://github.com/GrahamDumpleton/wrapt")
6086 (synopsis "Module for decorators, wrappers and monkey patching")
6087 (description
6088 "The aim of the wrapt module is to provide a transparent object proxy for
6089 Python, which can be used as the basis for the construction of function
6090 wrappers and decorator functions.")
6091 (license license:bsd-2)))
6092
6093(define-public python2-wrapt
6094 (package-with-python2 python-wrapt))
6095
6096(define-public python-xlrd
6097 (package
6098 (name "python-xlrd")
6099 (version "1.0.0")
6100 (source (origin
6101 (method url-fetch)
6102 (uri (pypi-uri "xlrd" version))
6103 (sha256
6104 (base32
6105 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
6106 (build-system python-build-system)
6107 (arguments
6108 `(#:phases
6109 (modify-phases %standard-phases
6110 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
6111 ;; run tests instead for now.
45fd0081 6112 (replace 'check (lambda _ (invoke "nosetests"))))))
44d10b1f
RW
6113 (native-inputs `(("python-nose" ,python-nose)))
6114 (home-page "http://www.python-excel.org/")
6115 (synopsis "Library for extracting data from Excel files")
6116 (description "This packages provides a library to extract data from
6117spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
6118@samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
6119Unicode-aware. It is not intended as an end-user tool.")
6120 (license license:bsd-3)))
6121
6122(define-public python2-xlrd
6123 (package-with-python2 python-xlrd))
6124
6125(define-public python-prettytable
6126 (package
6127 (name "python-prettytable")
6128 (version "0.7.2")
6129 (source
6130 (origin
6131 (method url-fetch)
6132 (uri (string-append
6133 "https://pypi.python.org/packages/source/P/PrettyTable/"
6134 "prettytable-" version ".tar.bz2"))
6135 (sha256
6136 (base32
6137 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
6138 (build-system python-build-system)
6139 (home-page "http://code.google.com/p/prettytable/")
6140 (synopsis "Display tabular data in an ASCII table format")
6141 (description
6142 "A library designed to represent tabular data in visually appealing ASCII
6143tables. PrettyTable allows for selection of which columns are to be printed,
6144independent alignment of columns (left or right justified or centred) and
6145printing of sub-tables by specifying a row range.")
6146 (license license:bsd-3)))
6147
6148(define-public python2-prettytable
6149 (package-with-python2 python-prettytable))
6150
6151(define-public python-tables
6152 (package
6153 (name "python-tables")
6154 (version "3.4.4")
6155 (source
6156 (origin
6157 (method url-fetch)
6158 (uri (pypi-uri "tables" version))
6159 (sha256
6160 (base32
6161 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
6162 (modules '((guix build utils)))
6163 (snippet
6164 '(begin
6165 ;; Remove pre-compiled .pyc files from source.
6166 (for-each delete-file-recursively
6167 (find-files "." "__pycache__" #:directories? #t))
6168 (for-each delete-file (find-files "." "\\.pyc$"))
6169 #t))))
6170 (build-system python-build-system)
6171 (arguments
6172 `(;; FIXME: python-build-system does not pass configure-flags to "build"
6173 ;; or "check", so we must override the build and check phases.
6174 #:phases
6175 (modify-phases %standard-phases
6176 (add-after 'unpack 'use-gcc
6177 (lambda _
6178 (substitute* "setup.py"
6179 (("compiler = new_compiler\\(\\)" line)
6180 (string-append line
6181 "\ncompiler.set_executables(compiler='gcc',"
6182 "compiler_so='gcc',"
6183 "linker_exe='gcc',"
6184 "linker_so='gcc -shared')")))
6185 #t))
6186 (replace 'build
6187 (lambda* (#:key inputs #:allow-other-keys)
35d79d61
RW
6188 (invoke "python" "setup.py" "build"
6189 (string-append "--hdf5="
6190 (assoc-ref inputs "hdf5")))))
44d10b1f
RW
6191 (replace 'check
6192 (lambda* (#:key inputs #:allow-other-keys)
35d79d61
RW
6193 (invoke "python" "setup.py" "check"
6194 (string-append "--hdf5="
6195 (assoc-ref inputs "hdf5"))))))))
44d10b1f
RW
6196 (propagated-inputs
6197 `(("python-numexpr" ,python-numexpr)
6198 ("python-numpy" ,python-numpy)))
6199 (native-inputs
6200 `(("python-cython" ,python-cython)
6201 ("pkg-config" ,pkg-config)))
6202 (inputs
6203 `(("hdf5" ,hdf5)
6204 ("bzip2" ,bzip2)
6205 ("zlib" ,zlib)))
6206 (home-page "http://www.pytables.org/")
6207 (synopsis "Hierarchical datasets for Python")
6208 (description "PyTables is a package for managing hierarchical datasets and
6209designed to efficiently cope with extremely large amounts of data.")
6210 (license license:bsd-3)))
6211
6212(define-public python2-tables
6213 (package-with-python2 python-tables))
6214
6215(define-public python-pyasn1
6216 (package
6217 (name "python-pyasn1")
6218 (version "0.4.3")
6219 (source
6220 (origin
6221 (method url-fetch)
6222 (uri (pypi-uri "pyasn1" version))
6223 (sha256
6224 (base32
6225 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
6226 (build-system python-build-system)
6227 (home-page "http://pyasn1.sourceforge.net/")
6228 (synopsis "ASN.1 types and codecs")
6229 (description
6230 "This is an implementation of ASN.1 types and codecs in Python. It is
6231suitable for a wide range of protocols based on the ASN.1 specification.")
6232 (license license:bsd-2)))
6233
6234(define-public python2-pyasn1
6235 (package-with-python2 python-pyasn1))
6236
6237(define-public python-pyasn1-modules
6238 (package
6239 (name "python-pyasn1-modules")
6240 (version "0.2.2")
6241 (source
6242 (origin
6243 (method url-fetch)
6244 (uri (pypi-uri "pyasn1-modules" version))
6245 (sha256
6246 (base32
6247 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
6248 (build-system python-build-system)
6249 (propagated-inputs
6250 `(("python-pyasn1" ,python-pyasn1)))
6251 (home-page "https://sourceforge.net/projects/pyasn1/")
6252 (synopsis "ASN.1 codec implementations")
6253 (description
6254 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
6255implementations of ASN.1-based codecs and protocols.")
6256 (license license:bsd-3)))
6257
6258(define-public python2-pyasn1-modules
6259 (package-with-python2 python-pyasn1-modules))
6260
6261(define-public python-ipaddress
6262 (package
6263 (name "python-ipaddress")
6264 (version "1.0.22")
6265 (source (origin
6266 (method url-fetch)
6267 (uri (pypi-uri "ipaddress" version))
6268 (sha256
6269 (base32
6270 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
6271 (build-system python-build-system)
6272 (home-page "https://github.com/phihag/ipaddress")
6273 (synopsis "IP address manipulation library")
6274 (description
6275 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
6276 in Python. This library is used to create, poke at, and manipulate IPv4 and
6277 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
6278 module to older versions of Python.")
6279 (license license:psfl)))
6280
6281(define-public python2-ipaddress
6282 (package-with-python2 python-ipaddress))
6283
6284(define-public python2-ipaddr
6285 (package
6286 (name "python2-ipaddr")
6287 (version "2.1.11")
6288 (source
6289 (origin
6290 (method url-fetch)
6291 (uri (pypi-uri "ipaddr" version))
6292 (sha256
6293 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
6294 (build-system python-build-system)
6295 (arguments
6296 `(#:python ,python-2 ;version 2 only
6297 #:phases
6298 (modify-phases %standard-phases
6299 (replace 'check
40b8c4e3 6300 (lambda _ (invoke "python" "ipaddr_test.py"))))))
44d10b1f
RW
6301 (home-page "https://github.com/google/ipaddr-py")
6302 (synopsis "IP address manipulation library")
6303 (description
6304 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
6305IPv6 addresses and networks.
6306
6307For new implementations you may prefer to use the standard module
6308@code{ipaddress}, which was introduced in Python 3.3 and backported to older
6309versions of Python.")
6310 (license license:asl2.0)))
6311
6312(define-public python-idna
6313 (package
6314 (name "python-idna")
6315 (version "2.7")
6316 (source
6317 (origin
6318 (method url-fetch)
6319 (uri (pypi-uri "idna" version))
6320 (sha256
6321 (base32
6322 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))
6323 (build-system python-build-system)
6324 (home-page "https://github.com/kjd/idna")
6325 (synopsis "Internationalized domain names in applications")
6326 (description
6327 "This is a library to support the Internationalised Domain Names in
6328Applications (IDNA) protocol as specified in RFC 5891. This version of the
6329protocol is often referred to as “IDNA2008” and can produce different results
6330from the earlier standard from 2003. The library is also intended to act as a
6331suitable drop-in replacement for the “encodings.idna” module that comes with
6332the Python standard library but currently only supports the older 2003
6333specification.")
6334 (license license:bsd-4)))
6335
6336(define-public python2-idna
6337 (package-with-python2 python-idna))
6338
6339(define-public python-idna-ssl
6340 (package
6341 (name "python-idna-ssl")
6342 (version "1.0.1")
6343 (source
6344 (origin
6345 (method url-fetch)
6346 (uri (pypi-uri "idna-ssl" version))
6347 (sha256
6348 (base32
6349 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
6350 (build-system python-build-system)
6351 (arguments
6352 `(#:tests? #f)) ;circular dependency with python-aiohttp
6353 (home-page "https://github.com/aio-libs/idna-ssl")
6354 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
6355 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
6356domains support.")
6357 (license license:expat)))
6358
6359(define-public python-pretend
6360 (package
6361 (name "python-pretend")
6362 (version "1.0.9")
6363 (source
6364 (origin
6365 (method url-fetch)
6366 (uri (string-append "https://pypi.python.org/packages/source/p/"
6367 "pretend/pretend-" version ".tar.gz"))
6368 (sha256
6369 (base32
6370 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
6371 (build-system python-build-system)
6372 (home-page "https://github.com/alex/pretend")
6373 (synopsis "Library for stubbing in Python")
6374 (description
6375 "Pretend is a library to make stubbing with Python easier. Stubbing is a
6376technique for writing tests. You may hear the term mixed up with mocks,
6377fakes, or doubles. Basically, a stub is an object that returns pre-canned
6378responses, rather than doing any computation.")
6379 (license license:bsd-3)))
6380
6381(define-public python2-pretend
6382 (package-with-python2 python-pretend))
6383
6384(define-public python-pip
6385 (package
6386 (name "python-pip")
6387 (version "18.1")
6388 (source
6389 (origin
6390 (method url-fetch)
6391 (uri (pypi-uri "pip" version))
6392 (sha256
6393 (base32
6394 "188fclay154s520n43s7cxxlhdaiysvxf19zk8vr1xbyjyyr58n0"))))
6395 (build-system python-build-system)
6396 (arguments
6397 '(#:tests? #f)) ; there are no tests in the pypi archive.
6398 (home-page "https://pip.pypa.io/")
6399 (synopsis "Package manager for Python software")
6400 (description
6401 "Pip is a package manager for Python software, that finds packages on the
6402Python Package Index (PyPI).")
6403 (license license:expat)))
6404
6405(define-public python2-pip
6406 (package-with-python2 python-pip))
6407
6408(define-public python-tlsh
6409 (package
6410 (name "python-tlsh")
6411 (version "3.4.5")
6412 (home-page "https://github.com/trendmicro/tlsh")
6413 (source (origin
6414 (method url-fetch)
6415 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
6416 version ".tar.gz"))
6417 (sha256
6418 (base32
6419 "1x1vahd4zg5kpyr9h9hs3fvh460p25rjy4cclwdnbbw8x3vc30q3"))
6420 (file-name (string-append name "-" version ".tar.gz"))))
6421 (build-system cmake-build-system)
6422 (arguments
6423 '(#:out-of-source? #f
6424 #:phases (modify-phases %standard-phases
6425 (replace
6426 'install
6427 (lambda* (#:key outputs #:allow-other-keys)
6428 ;; Build and install the Python bindings. The underlying
6429 ;; C++ library is apparently not meant to be installed.
6430 (let ((out (assoc-ref outputs "out")))
6431 (with-directory-excursion "py_ext"
6432 (and (system* "python" "setup.py" "build")
6433 (system* "python" "setup.py" "install"
6434 (string-append "--prefix=" out))))))))))
6435 (inputs `(("python" ,python-wrapper))) ;for the bindings
6436 (synopsis "Fuzzy matching library for Python")
6437 (description
6438 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
6439Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
6440value which can be used for similarity comparisons. Similar objects have
6441similar hash values, which allows for the detection of similar objects by
6442comparing their hash values. The byte stream should have a sufficient amount
6443of complexity; for example, a byte stream of identical bytes will not generate
6444a hash value.")
6445 (license license:asl2.0)))
6446
6447(define-public python2-tlsh
6448 (package
6449 (inherit python-tlsh)
6450 (name "python2-tlsh")
6451 (inputs `(("python" ,python-2)))))
6452
6453(define-public python-termcolor
6454 (package
6455 (name "python-termcolor")
6456 (version "1.1.0")
6457 (source
6458 (origin
6459 (method url-fetch)
6460 (uri (pypi-uri "termcolor" version))
6461 (sha256
6462 (base32
6463 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
6464 (build-system python-build-system)
6465 (arguments
6466 ;; There are no tests.
6467 `(#:tests? #f))
6468 (home-page "https://pypi.python.org/pypi/termcolor")
6469 (synopsis "ANSII Color formatting for terminal output")
6470 (description
6471 "This package provides ANSII Color formatting for output in terminals.")
6472 (license license:expat)))
6473
6474(define-public python2-termcolor
6475 (package-with-python2 python-termcolor))
6476
6477(define-public python-libarchive-c
6478 (package
6479 (name "python-libarchive-c")
6480 (version "2.8")
6481 (source (origin
6482 (method url-fetch)
6483 (uri (pypi-uri "libarchive-c" version))
6484 (sha256
6485 (base32
6486 "0qg0v1s9c1xdk9philhnv8k6c6nicvnvfwlc0j9srg90jmdlvm06"))))
6487 (build-system python-build-system)
6488 (arguments
6489 '(#:phases (modify-phases %standard-phases
6490 (add-before
6491 'build 'reference-libarchive
6492 (lambda* (#:key inputs #:allow-other-keys)
6493 ;; Retain the absolute file name of libarchive.so.
6494 (let ((libarchive (assoc-ref inputs "libarchive")))
6495 (substitute* "libarchive/ffi.py"
6496 (("find_library\\('archive'\\)")
6497 (string-append "'" libarchive
6498 "/lib/libarchive.so'"))))))
6499 (replace 'check
6500 (lambda _ (invoke "pytest" "-vv"))))))
6501 (native-inputs
6502 `(("python-mock" ,python-mock)
6503 ("python-pytest" ,python-pytest)))
6504 (inputs
6505 `(("libarchive" ,libarchive)))
6506 (home-page "https://github.com/Changaco/python-libarchive-c")
6507 (synopsis "Python interface to libarchive")
6508 (description
6509 "This package provides Python bindings to libarchive, a C library to
6510access possibly compressed archives in many different formats. It uses
6511Python's @code{ctypes} foreign function interface (FFI).")
6512 (license license:lgpl2.0+)))
6513
6514(define-public python2-libarchive-c
6515 (package-with-python2 python-libarchive-c))
6516
6517(define-public python-file
6518 (package
6519 (inherit file)
6520 (name "python-file")
6521 (build-system python-build-system)
6522 (arguments
6523 '(#:tests? #f ;no tests
6524 #:configure-flags '("--single-version-externally-managed" "--root=/")
6525 #:phases (modify-phases %standard-phases
6526 (add-before 'build 'change-directory
6527 (lambda _
6528 (chdir "python")
6529 #t))
6530 (add-before 'build 'set-library-file-name
6531 (lambda* (#:key inputs #:allow-other-keys)
6532 (let ((file (assoc-ref inputs "file")))
6533 (substitute* "magic.py"
6534 (("find_library\\('magic'\\)")
6535 (string-append "'" file "/lib/libmagic.so'")))
6536 #t))))))
6537 (inputs `(("file" ,file)))
6538 (self-native-input? #f)
6539 (synopsis "Python bindings to the libmagic file type guesser. Note that
6540this module and the python-magic module both provide a \"magic.py\" file;
6541these two modules, which are different and were developed separately, both
6542serve the same purpose: provide Python bindings for libmagic.")))
6543
6544(define-public python2-file
6545 (package-with-python2 python-file))
6546
6547(define-public python-debian
6548 (package
6549 (name "python-debian")
6550 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
6551 (version "0.1.28")
6552 (source
6553 (origin
6554 (method url-fetch)
6555 (uri (pypi-uri name version))
6556 (sha256
6557 (base32
6558 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
6559 (build-system python-build-system)
6560 (propagated-inputs
6561 `(("python-six" ,python-six)))
6562 (synopsis "Debian package related modules")
6563 (description
6564 ;; XXX: Use @enumerate instead of @itemize to work around
6565 ;; <http://bugs.gnu.org/21772>.
6566 "This package provides Python modules that abstract many formats of
6567Debian-related files, such as:
6568
6569@enumerate
6570@item Debtags information;
6571@item @file{debian/changelog} files;
6572@item packages files, pdiffs;
6573@item control files of single or multiple RFC822-style paragraphs---e.g.
6574 @file{debian/control}, @file{.changes}, @file{.dsc};
6575@item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
6576 contained files and meta-information.
6577@end enumerate\n")
6578
6579 ;; Modules are either GPLv2+ or GPLv3+.
6580 (license license:gpl3+)))
6581
6582(define-public python2-debian
6583 (package-with-python2 python-debian))
6584
6585(define-public python-nbformat
6586 (package
6587 (name "python-nbformat")
6588 (version "4.4.0")
6589 (source
6590 (origin
6591 (method url-fetch)
6592 (uri (pypi-uri "nbformat" version))
6593 (sha256
6594 (base32
6595 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
6596 (build-system python-build-system)
6597 (arguments `(#:tests? #f)) ; no test target
6598 (propagated-inputs
6599 `(("python-ipython-genutils" ,python-ipython-genutils)
6600 ("python-jsonschema" ,python-jsonschema)
6601 ("python-jupyter-core" ,python-jupyter-core)
6602 ("python-traitlets" ,python-traitlets)))
6603 (home-page "http://jupyter.org")
6604 (synopsis "Jupyter Notebook format")
6605 (description "This package provides the reference implementation of the
6606Jupyter Notebook format and Python APIs for working with notebooks.")
6607 (license license:bsd-3)))
6608
6609(define-public python2-nbformat
6610 (package-with-python2 python-nbformat))
6611
6612(define-public python-bleach
6613 (package
6614 (name "python-bleach")
6615 (version "1.4.3")
6616 (source
6617 (origin
6618 (method url-fetch)
6619 (uri (pypi-uri "bleach" version))
6620 (sha256
6621 (base32
6622 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
6623 (build-system python-build-system)
6624 (propagated-inputs
6625 `(("python-html5lib" ,python-html5lib-0.9)
6626 ("python-six" ,python-six)))
6627 (native-inputs
6628 `(("python-nose" ,python-nose)))
6629 (home-page "https://github.com/jsocol/bleach")
6630 (synopsis "Whitelist-based HTML-sanitizing tool")
6631 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
6632 (license license:asl2.0)))
6633
6634(define-public python2-bleach
6635 (package-with-python2 python-bleach))
6636
6637(define-public python-entrypoints
6638 (package
6639 (name "python-entrypoints")
a7f1b718 6640 (version "0.3")
44d10b1f
RW
6641 (source
6642 (origin
6643 (method url-fetch)
a7f1b718 6644 (uri (pypi-uri "entrypoints" version))
44d10b1f
RW
6645 (sha256
6646 (base32
a7f1b718 6647 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
44d10b1f
RW
6648 (build-system python-build-system)
6649 ;; The package does not come with a setup.py file, so we have to generate
6650 ;; one ourselves.
6651 (arguments
6652 `(#:tests? #f
6653 #:phases
6654 (modify-phases %standard-phases
6655 (add-after 'unpack 'create-setup.py
6656 (lambda _
6657 (call-with-output-file "setup.py"
6658 (lambda (port)
6659 (format port "\
6660from setuptools import setup
6661setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
6662" ,version))))))))
6663 (home-page "https://github.com/takluyver/entrypoints")
6664 (synopsis "Discover and load entry points from installed Python packages")
6665 (description "Entry points are a way for Python packages to advertise
6666objects with some common interface. The most common examples are
6667@code{console_scripts} entry points, which define shell commands by
6668identifying a Python function to run. The @code{entrypoints} module contains
6669functions to find and load entry points.")
6670 (license license:expat)))
6671
6672(define-public python2-entrypoints
6673 (package-with-python2 python-entrypoints))
6674
6675(define-public python-nbconvert
6676 (package
6677 (name "python-nbconvert")
6678 (version "5.0.0b1")
6679 (source
6680 (origin
6681 (method url-fetch)
6682 (uri (pypi-uri "nbconvert" version))
6683 (sha256
6684 (base32
6685 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
6686 (build-system python-build-system)
6687 (arguments
6688 `(;; The "bdist_egg" target is disabled by default, causing the installation
6689 ;; to fail.
6690 #:configure-flags (list "bdist_egg")
6691 ;; FIXME: 5 failures, 40 errors.
6692 #:tests? #f))
6693 ;; #:phases
6694 ;; (modify-phases %standard-phases
6695 ;; (replace 'check
6696 ;; (lambda _
6697 ;; (zero? (system* "py.test" "-v")))))
6698 (native-inputs
6699 `(("python-pytest" ,python-pytest)))
6700 (propagated-inputs
6701 `(("python-bleach" ,python-bleach)
6702 ("python-entrypoints" ,python-entrypoints)
6703 ("python-jinja2" ,python-jinja2)
6704 ("python-jupyter-core" ,python-jupyter-core)
6705 ("python-mistune" ,python-mistune)
6706 ("python-nbformat" ,python-nbformat)
6707 ("python-pygments" ,python-pygments)
6708 ("python-traitlets" ,python-traitlets)))
6709 (home-page "http://jupyter.org")
6710 (synopsis "Converting Jupyter Notebooks")
6711 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
6712notebooks to various other formats via Jinja templates. It allows you to
6713convert an @code{.ipynb} notebook file into various static formats including:
6714
6715@enumerate
6716@item HTML
6717@item LaTeX
6718@item PDF
6719@item Reveal JS
6720@item Markdown (md)
6721@item ReStructured Text (rst)
6722@item executable script
6723@end enumerate\n")
6724 (license license:bsd-3)))
6725
6726(define-public python2-nbconvert
6727 (package-with-python2 python-nbconvert))
6728
6729(define-public python-prometheus-client
6730 (package
6731 (name "python-prometheus-client")
6732 (version "0.5.0")
6733 (source
6734 (origin
6735 (method url-fetch)
6736 (uri (pypi-uri "prometheus_client" version))
6737 (sha256
6738 (base32
6739 "0g7rpv1pq2lab1nfqdx98z9d3bqwc400alg1j4ynrpjkrbsizhg8"))))
6740 (build-system python-build-system)
6741 (arguments '(#:tests? #f)) ; tests are not included
6742 (propagated-inputs
6743 `(("python-twisted" ,python-twisted)))
6744 (home-page "https://github.com/prometheus/client_python")
6745 (synopsis "Python client for the Prometheus monitoring system")
6746 (description
6747 "This package provides a Python client for the Prometheus monitoring
6748system.")
6749 (license license:asl2.0)))
6750
6751(define-public python2-prometheus-client
6752 (package-with-python2 python-prometheus-client))
6753
6754(define-public python-notebook
6755 (package
6756 (name "python-notebook")
6757 (version "5.7.4")
6758 (source (origin
6759 (method url-fetch)
6760 (uri (pypi-uri "notebook" version))
6761 (sha256
6762 (base32
6763 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
6764 (build-system python-build-system)
6765 (arguments
6766 `(#:phases
6767 (modify-phases %standard-phases
6768 (replace 'check
6769 (lambda _
6770 ;; These tests require a browser
6771 (delete-file-recursively "notebook/tests/selenium")
6772 ;; Some tests need HOME
6773 (setenv "HOME" "/tmp")
6774 ;; This file contains "warningfilters", which are not supported
6775 ;; by this version of nose.
6776 (delete-file "setup.cfg")
6777 (with-directory-excursion "/tmp"
6778 (invoke "nosetests" "-v"))
6779 #t)))))
6780 (propagated-inputs
6781 `(("python-jupyter-core" ,python-jupyter-core)
6782 ("python-nbformat" ,python-nbformat)
6783 ("python-nbconvert" ,python-nbconvert)
6784 ("python-prometheus-client" ,python-prometheus-client)
6785 ("python-send2trash" ,python-send2trash)
6786 ("python-terminado" ,python-terminado)))
6787 (native-inputs
6788 `(("python-nose" ,python-nose)
6789 ("python-sphinx" ,python-sphinx)
6790 ("python-requests" ,python-requests)))
6791 (home-page "http://jupyter.org/")
6792 (synopsis "Web-based notebook environment for interactive computing")
6793 (description
6794 "The Jupyter HTML notebook is a web-based notebook environment for
6795interactive computing.")
6796 (properties `((python2-variant . ,(delay python2-notebook))))
6797 (license license:bsd-3)))
6798
6799(define-public python2-notebook
6800 (let ((base (package-with-python2
6801 (strip-python2-variant python-notebook))))
6802 (package (inherit base)
6803 (native-inputs
6804 `(("python2-mock" ,python2-mock)
6805 ,@(package-native-inputs base)))
6806 (arguments
6807 (substitute-keyword-arguments (package-arguments base)
6808 ((#:phases phases)
6809 `(modify-phases ,phases
6810 (add-before 'check 'disable-test-case
6811 ;; The test requires network access to localhost. Curiously it
6812 ;; fails with Python 2 only. Simply make the test-case return
6813 ;; immediately.
6814 (lambda _
6815 (substitute*
6816 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
6817 (("formats = self.nbconvert_api") "return #")))))))))))
6818
6819(define-public python-widgetsnbextension
6820 (package
6821 (name "python-widgetsnbextension")
6822 (version "3.4.2")
6823 (source
6824 (origin
6825 (method url-fetch)
6826 (uri (pypi-uri "widgetsnbextension" version))
6827 (sha256
6828 (base32
6829 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
6830 (build-system python-build-system)
6831 (propagated-inputs
6832 `(("python-ipykernel" ,python-ipykernel)
6833 ("python-notebook" ,python-notebook)))
6834 (native-inputs
6835 `(("python-certifi" ,python-certifi)
6836 ("python-nose" ,python-nose)))
6837 (home-page "https://ipython.org")
6838 (synopsis "IPython HTML widgets for Jupyter")
6839 (description "This package provides interactive HTML widgets for Jupyter
6840notebooks.")
6841 (license license:bsd-3)))
6842
6843(define-public python2-widgetsnbextension
6844 (package-with-python2 python-widgetsnbextension))
6845
6846(define-public python-ipywidgets
6847 (package
6848 (name "python-ipywidgets")
6849 (version "5.2.2")
6850 (source
6851 (origin
6852 (method url-fetch)
6853 (uri (pypi-uri "ipywidgets" version))
6854 (sha256
6855 (base32
6856 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
6857 (build-system python-build-system)
6858 (propagated-inputs
6859 `(("python-ipython" ,python-ipython)
6860 ("python-traitlets" ,python-traitlets)
6861 ("python-widgetsnbextension" ,python-widgetsnbextension)))
6862 (native-inputs
6863 `(("python-nose" ,python-nose)
6864 ("python-pytest" ,python-pytest)))
6865 (home-page "https://ipython.org")
6866 (synopsis "IPython HTML widgets for Jupyter")
6867 (description "Ipywidgets are interactive HTML widgets for Jupyter
6868notebooks and the IPython kernel. Notebooks come alive when interactive
6869widgets are used. Users gain control of their data and can visualize changes
6870in the data.")
6871 (license license:bsd-3)))
6872
6873(define-public python2-ipywidgets
6874 (package-with-python2 python-ipywidgets))
6875
6876(define-public python-jupyter-console
6877 (package
6878 (name "python-jupyter-console")
6879 (version "5.2.0")
6880 (source
6881 (origin
6882 (method url-fetch)
6883 (uri (pypi-uri "jupyter_console" version))
6884 (sha256
6885 (base32
6886 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
6887 (build-system python-build-system)
6888 ;; Tests only run in an TTY.
6889 (arguments `(#:tests? #f))
6890 (propagated-inputs
6891 `(("python-ipykernel" ,python-ipykernel)
6892 ("python-jupyter-client" ,python-jupyter-client)
6893 ("python-prompt-toolkit" ,python-prompt-toolkit-1)
6894 ("python-pygments" ,python-pygments)))
6895 (native-inputs
6896 `(("python-nose" ,python-nose)))
6897 (home-page "https://jupyter.org")
6898 (synopsis "Jupyter terminal console")
6899 (description "This package provides a terminal-based console frontend for
6900Jupyter kernels. It also allows for console-based interaction with non-Python
6901Jupyter kernels such as IJulia and IRKernel.")
6902 (license license:bsd-3)))
6903
6904(define-public python2-jupyter-console
6905 (package-with-python2 python-jupyter-console))
6906
6907;; The python-ipython and python-jupyter-console require each other. To get
6908;; the functionality in both packages working, strip down the
6909;; python-jupyter-console package when using it as an input to python-ipython.
6910(define python-jupyter-console-minimal
6911 (package
6912 (inherit python-jupyter-console)
6913 (name "python-jupyter-console-minimal")
6914 (arguments
6915 (substitute-keyword-arguments
6916 (package-arguments python-jupyter-console)
6917 ((#:phases phases)
6918 `(modify-phases ,phases
6919 (add-after 'install 'delete-bin
6920 (lambda* (#:key outputs #:allow-other-keys)
6921 ;; Delete the bin files, to avoid conflicts in profiles
6922 ;; where python-ipython and python-jupyter-console are
6923 ;; both present.
6924 (delete-file-recursively
6925 (string-append
6926 (assoc-ref outputs "out") "/bin"))))))))
6927 ;; Remove the python-ipython propagated input, to avoid the cycle
6928 (propagated-inputs
6929 (alist-delete
6930 "python-ipython"
6931 (package-propagated-inputs python-jupyter-console)))))
6932
6933(define-public python-qtconsole
6934 (package
6935 (name "python-qtconsole")
6936 (version "4.4.3")
6937 (source
6938 (origin
6939 (method url-fetch)
6940 (uri (pypi-uri "qtconsole" version))
6941 (sha256
6942 (base32
6943 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
6944 (build-system python-build-system)
6945 (arguments
6946 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
6947 ;; but we only have the LTS version 5.x. This means that there might be
6948 ;; runtime errors, but since this is a dependency of the Jupyter package,
6949 ;; and Jupyter can be used without the qtconsole we can overlook this for
6950 ;; now.
6951 `(#:tests? #f
6952 #:phases
6953 (modify-phases %standard-phases
6954 (add-before 'check 'pre-check
6955 (lambda _
6956 (setenv "QT_QPA_PLATFORM" "offscreen")
6957 #t)))))
6958 (propagated-inputs
6959 `(("python-ipykernel" ,python-ipykernel)
6960 ("python-ipython" ,python-ipython)))
6961 (native-inputs
6962 `(("python-pytest" ,python-pytest)))
6963 (home-page "http://jupyter.org")
6964 (synopsis "Jupyter Qt console")
6965 (description "This package provides a Qt-based console for Jupyter with
6966support for rich media output.")
6967 (license license:bsd-3)))
6968
6969(define-public jupyter
6970 (package
6971 (name "jupyter")
6972 (version "1.0.0")
6973 (source
6974 (origin
6975 (method url-fetch)
6976 (uri (pypi-uri "jupyter" version))
6977 (sha256
6978 (base32
6979 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
6980 (build-system python-build-system)
6981 (arguments '(#:tests? #f)) ; there are none.
6982 (propagated-inputs
6983 `(("python-ipykernel" ,python-ipykernel)
6984 ("python-ipywidgets" ,python-ipywidgets)
6985 ("python-jupyter-console" ,python-jupyter-console)
6986 ("python-nbconvert" ,python-nbconvert)
6987 ("python-notebook" ,python-notebook)
6988 ("python-qtconsole" ,python-qtconsole)))
6989 (native-search-paths
6990 (list (search-path-specification
6991 (variable "JUPYTER_PATH")
6992 (files '("share/jupyter")))))
6993 (home-page "https://jupyter.org")
6994 (synopsis "Web application for interactive documents")
6995 (description
6996 "The Jupyter Notebook is a web application that allows you to create and
6997share documents that contain live code, equations, visualizations and
6998explanatory text. Uses include: data cleaning and transformation, numerical
6999simulation, statistical modeling, machine learning and much more.")
7000 (license license:bsd-3)))
7001
7002(define-public python-chardet
7003 (package
7004 (name "python-chardet")
7005 (version "3.0.4")
7006 (source
7007 (origin
7008 (method url-fetch)
7009 (uri (pypi-uri "chardet" version))
7010 (sha256
7011 (base32
7012 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
7013 (native-inputs
7014 `(("python-hypothesis" ,python-hypothesis)
7015 ("python-pytest" ,python-pytest)
7016 ("python-pytest-runner" ,python-pytest-runner)))
7017 (build-system python-build-system)
7018 (home-page "https://github.com/chardet/chardet")
7019 (synopsis "Universal encoding detector for Python 2 and 3")
7020 (description
7021 "This package provides @code{chardet}, a Python module that can
7022automatically detect a wide range of file encodings.")
7023 (license license:lgpl2.1+)))
7024
7025(define-public python2-chardet
7026 (package-with-python2 python-chardet))
7027
7028(define-public python-docopt
7029 (package
7030 (name "python-docopt")
7031 (version "0.6.2")
7032 (source
7033 (origin
7034 (method url-fetch)
7035 ;; The release on PyPI does not include tests.
7036 (uri (string-append
7037 "https://github.com/docopt/docopt/archive/"
7038 version ".tar.gz"))
7039 (file-name (string-append name "-" version ".tar.gz"))
7040 (sha256
7041 (base32
7042 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
7043 (build-system python-build-system)
7044 (native-inputs
7045 `(("python-pytest" ,python-pytest)))
7046 (arguments
7047 `(#:phases
7048 (modify-phases %standard-phases
7049 (replace 'check
7050 (lambda _ (invoke "py.test"))))))
7051 (home-page "http://docopt.org")
7052 (synopsis "Command-line interface description language for Python")
7053 (description "This library allows the user to define a command-line
7054interface from a program's help message rather than specifying it
7055programatically with command-line parsers like @code{getopt} and
7056@code{argparse}.")
7057 (license license:expat)))
7058
7059(define-public python2-docopt
7060 (package-with-python2 python-docopt))
7061
7062(define-public python-pythondialog
7063 (package
7064 (name "python-pythondialog")
7065 (version "3.4.0")
7066 (source
7067 (origin
7068 (method url-fetch)
7069 (uri (pypi-uri "pythondialog" version))
7070 (sha256
7071 (base32
7072 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
7073 (build-system python-build-system)
7074 (arguments
7075 `(#:phases
7076 (modify-phases %standard-phases
7077 (add-after 'unpack 'patch-path
7078 (lambda* (#:key inputs #:allow-other-keys)
7079 (let* ((dialog (assoc-ref inputs "dialog")))
7080 ;; Since this library really wants to grovel the search path, we
7081 ;; must hardcode dialog's store path into it.
7082 (substitute* "dialog.py"
7083 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
7084 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
7085 #t))))
7086 #:tests? #f)) ; no test suite
7087 (propagated-inputs
7088 `(("dialog" ,dialog)))
7089 (home-page "http://pythondialog.sourceforge.net/")
7090 (synopsis "Python interface to the UNIX dialog utility")
7091 (description "A Python wrapper for the dialog utility. Its purpose is to
7092provide an easy to use, pythonic and comprehensive Python interface to dialog.
7093This allows one to make simple text-mode user interfaces on Unix-like systems")
7094 (license license:lgpl2.1)
7095 (properties `((python2-variant . ,(delay python2-pythondialog))))))
7096
7097(define-public python2-pythondialog
7098 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
7099 (package
7100 (inherit base)
7101 (version (package-version python-pythondialog))
7102 (source (origin
7103 (method url-fetch)
7104 (uri (pypi-uri "python2-pythondialog" version))
7105 (sha256
7106 (base32
7107 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
7108
7109(define-public python-configobj
7110 (package
7111 (name "python-configobj")
7112 (version "5.0.6")
7113 (source (origin
7114 (method url-fetch)
7115 (uri (string-append
7116 "https://pypi.python.org/packages/source/c/configobj/"
7117 "configobj-" version ".tar.gz"))
7118 (sha256
7119 (base32
7120 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
7121 ;; Patch setup.py so it looks for python-setuptools, which is
7122 ;; required to parse the keyword 'install_requires' in setup.py.
7123 (patches (search-patches "python-configobj-setuptools.patch"))))
7124 (build-system python-build-system)
7125 (propagated-inputs
7126 `(("python-six" ,python-six)))
7127 (synopsis "Config file reading, writing and validation")
7128 (description "ConfigObj is a simple but powerful config file reader and
7129writer: an ini file round tripper. Its main feature is that it is very easy to
7130use, with a straightforward programmer’s interface and a simple syntax for
7131config files.")
7132 (home-page "https://github.com/DiffSK/configobj")
7133 (license license:bsd-3)))
7134
7135(define-public python2-configobj
7136 (package-with-python2 python-configobj))
7137
7138(define-public python-configargparse
7139 (package
7140 (name "python-configargparse")
7141 (version "0.12.0")
7142 (source (origin
7143 (method url-fetch)
7144 (uri (pypi-uri "ConfigArgParse" version))
7145 (sha256
7146 (base32
7147 "0fgkiqh6r3rbkdq3k8c48m85g52k96686rw3a6jg4lcncrkpvk98"))))
7148 (build-system python-build-system)
7149 (native-inputs
7150 `(("python-pyyaml" ,python-pyyaml)))
7151 (arguments
7152 `(#:phases
7153 (modify-phases %standard-phases
7154 (replace 'check
7155 (lambda _
7156 ;; Bypass setuptools-shim because one test relies on "setup.py"
7157 ;; being the first argument passed to the python call.
7158 ;;
7159 ;; NOTE: Many tests do not run because they rely on Python's
7160 ;; built-in test.test_argparse, but we remove the unit tests from
7161 ;; our Python installation.
7162 (invoke "python" "setup.py" "test"))))))
7163 (synopsis "Replacement for argparse")
7164 (description "A drop-in replacement for argparse that allows options to also
7165be set via config files and/or environment variables.")
7166 (home-page "https://github.com/bw2/ConfigArgParse")
7167 (license license:expat)))
7168
7169(define-public python2-configargparse
7170 (package-with-python2 python-configargparse))
7171
7172(define-public python-argparse-manpage
7173 (package
7174 (name "python-argparse-manpage")
7175 (version "1.1")
7176 (source
7177 (origin
7178 (method url-fetch)
7179 (uri (pypi-uri "argparse-manpage" version))
7180 (sha256
7181 (base32
7182 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
7183 (build-system python-build-system)
7184 (home-page "https://github.com/praiskup/argparse-manpage")
7185 (synopsis "Build manual page from Python's ArgumentParser object")
7186 (description
7187 "This package provides tools to build manual pages from Python's
7188@code{ArgumentParser} object.")
7189 (license license:asl2.0)))
7190
7191(define-public python2-contextlib2
7192 (package
7193 (name "python2-contextlib2")
7194 (version "0.5.5")
7195 (source
7196 (origin
7197 (method url-fetch)
7198 (uri (pypi-uri "contextlib2" version))
7199 (sha256
7200 (base32
7201 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
7202 (build-system python-build-system)
7203 (arguments
7204 `(#:python ,python-2
7205 #:phases
7206 (modify-phases %standard-phases
7207 (replace 'check
7208 (lambda _ (invoke "python" "test_contextlib2.py" "-v"))))))
7209 (native-inputs
7210 `(("python2-unittest2" ,python2-unittest2)))
7211 (home-page "http://contextlib2.readthedocs.org/")
7212 (synopsis "Tools for decorators and context managers")
7213 (description "This module is primarily a backport of the Python
72143.2 contextlib to earlier Python versions. Like contextlib, it
7215provides utilities for common tasks involving decorators and context
7216managers. It also contains additional features that are not part of
7217the standard library.")
7218 (license license:psfl)))
7219
7220(define-public python-texttable
7221 (package
7222 (name "python-texttable")
7223 (version "0.8.7")
7224 (source
7225 (origin
7226 (method url-fetch)
7227 (uri (pypi-uri "texttable" version))
7228 (sha256
7229 (base32
7230 "1liiiydgkg37i46a418aw19fyf6z3ds51wdwwpyjbs12x0phhf4a"))))
7231 (build-system python-build-system)
7232 (arguments '(#:tests? #f)) ; no tests
7233 (home-page "https://github.com/foutaise/texttable/")
7234 (synopsis "Python module for creating simple ASCII tables")
7235 (description "Texttable is a Python module for creating simple ASCII
7236tables.")
7237 (license license:lgpl2.1+)))
7238
7239(define-public python2-texttable
7240 (package-with-python2 python-texttable))
7241
7242(define-public python-atomicwrites
7243 (package
7244 (name "python-atomicwrites")
7245 (version "1.1.5")
7246 (source (origin
7247 (method url-fetch)
7248 (uri (pypi-uri "atomicwrites" version))
7249 (sha256
7250 (base32
7251 "11bm90fwm2avvf4f3ib8g925w7jr4m11vcsinn1bi6ns4bm32214"))))
7252 (build-system python-build-system)
7253 (synopsis "Atomic file writes in Python")
7254 (description "Library for atomic file writes using platform dependent tools
7255for atomic file system operations.")
7256 (home-page "https://github.com/untitaker/python-atomicwrites")
7257 (license license:expat)))
7258
7259(define-public python2-atomicwrites
7260 (package-with-python2 python-atomicwrites))
7261
7262(define-public python-click-threading
7263 (package
7264 (name "python-click-threading")
7265 (version "0.4.4")
7266 (source (origin
7267 (method url-fetch)
7268 (uri (pypi-uri "click-threading" version))
7269 (sha256
7270 (base32
7271 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
7272 (build-system python-build-system)
7273 (propagated-inputs
7274 `(("python-click" ,python-click)))
7275 (synopsis "Utilities for multithreading in Click")
7276 (description "This package provides utilities for multithreading in Click
7277applications.")
7278 (home-page "https://github.com/click-contrib/click-threading")
7279 (license license:expat)))
7280
7281(define-public python-click-log
7282 (package
7283 (name "python-click-log")
7284 (version "0.3.2")
7285 (source (origin
7286 (method url-fetch)
7287 (uri (pypi-uri "click-log" version))
7288 (sha256
7289 (base32
7290 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
7291 (build-system python-build-system)
7292 (propagated-inputs
7293 `(("python-click" ,python-click)))
7294 (synopsis "Logging for click applications")
7295 (description "This package provides a Python library for logging Click
7296applications.")
7297 (home-page "https://github.com/click-contrib/click-log")
7298 (license license:expat)))
7299
7300(define-public python-apipkg
7301 (package
7302 (name "python-apipkg")
7303 (version "1.4")
7304 (source (origin
7305 (method url-fetch)
7306 (uri (pypi-uri "apipkg" version))
7307 (sha256
7308 (base32
7309 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
7310 (build-system python-build-system)
7311 (native-inputs
7312 `(("python-pytest" ,python-pytest)))
7313 (synopsis "Namespace control and lazy-import mechanism")
7314 (description "With apipkg you can control the exported namespace of a Python
7315package and greatly reduce the number of imports for your users. It is a small
7316pure Python module that works on virtually all Python versions.")
7317 (home-page "https://github.com/pytest-dev/apipkg")
7318 (license license:expat)))
7319
7320(define-public python2-apipkg
7321 (package-with-python2 python-apipkg))
7322
7323(define-public python-execnet
7324 (package
7325 (name "python-execnet")
7326 (version "1.4.1")
7327 (source (origin
7328 (method url-fetch)
7329 (uri (pypi-uri "execnet" version))
7330 (sha256
7331 (base32
7332 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
7333 (build-system python-build-system)
7334 (arguments
7335 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
7336 ;; The two test failures are caused by the lack of an `ssh` executable.
7337 ;; The test suite can be run with pytest after the 'install' phase.
7338 #:tests? #f))
7339 (native-inputs
7340 `(("python-pytest" ,python-pytest)
7341 ("python-setuptools-scm" ,python-setuptools-scm)))
7342 (propagated-inputs
7343 `(("python-apipkg" ,python-apipkg)))
7344 (synopsis "Rapid multi-Python deployment")
7345 (description "Execnet provides a share-nothing model with
7346channel-send/receive communication for distributing execution across many
7347Python interpreters across version, platform and network barriers. It has a
7348minimal and fast API targeting the following uses:
7349@enumerate
7350@item distribute tasks to (many) local or remote CPUs
7351@item write and deploy hybrid multi-process applications
7352@item write scripts to administer multiple environments
7353@end enumerate")
7354 (home-page "http://codespeak.net/execnet/")
7355 (license license:expat)))
7356
7357(define-public python2-execnet
7358 (package-with-python2 python-execnet))
7359
7360(define-public python-icalendar
7361 (package
7362 (name "python-icalendar")
7363 (version "4.0.3")
7364 (source (origin
7365 (method url-fetch)
7366 (uri (pypi-uri "icalendar" version))
7367 (sha256
7368 (base32
7369 "0mk3dk1dxkcm46jy48v27j2w2349iv4sbimqj1yb5js43mx49hh7"))))
7370 (build-system python-build-system)
7371 (propagated-inputs
7372 `(("python-dateutil" ,python-dateutil)
7373 ("python-pytz" ,python-pytz)))
7374 (synopsis "Python library for parsing iCalendar files")
7375 (description "The icalendar package is a parser/generator of iCalendar
7376files for use with Python.")
7377 (home-page "https://github.com/collective/icalendar")
7378 (license license:bsd-2)))
7379
7380(define-public python-sphinxcontrib-newsfeed
7381 (package
7382 (name "python-sphinxcontrib-newsfeed")
7383 (version "0.1.4")
7384 (source (origin
7385 (method url-fetch)
7386 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
7387 (sha256
7388 (base32
7389 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
7390 (arguments '(#:tests? #f)) ; No tests.
7391 (build-system python-build-system)
7392 (propagated-inputs
7393 `(("python-sphinx" ,python-sphinx)))
7394 (synopsis "News Feed extension for Sphinx")
7395 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
7396Blog, News or Announcements section to a Sphinx website.")
7397 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
7398 (license license:bsd-2)))
7399
7400(define-public python-args
7401 (package
7402 (name "python-args")
7403 (version "0.1.0")
7404 (source (origin
7405 (method url-fetch)
7406 (uri (pypi-uri "args" version))
7407 (sha256
7408 (base32
7409 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
7410 (build-system python-build-system)
7411 (home-page "https://github.com/kennethreitz/args")
7412 (synopsis "Command-line argument parser")
7413 (description
7414 "This library provides a Python module to parse command-line arguments.")
7415 (license license:bsd-3)))
7416
7417(define-public python2-args
7418 (package-with-python2 python-args))
7419
7420(define-public python-clint
7421 (package
7422 (name "python-clint")
7423 (version "0.5.1")
7424 (source (origin
7425 (method url-fetch)
7426 (uri (pypi-uri "clint" version))
7427 (sha256
7428 (base32
7429 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
7430 (build-system python-build-system)
7431 (arguments
7432 '(#:phases
7433 (modify-phases %standard-phases
7434 (replace 'check
7435 (lambda _ (invoke "py.test" "-v"))))))
7436 (native-inputs
7437 `(("python-pytest" ,python-pytest)))
7438 (propagated-inputs
7439 `(("python-args" ,python-args)))
7440 (home-page "https://github.com/kennethreitz/clint")
7441 (synopsis "Command-line interface tools")
7442 (description
7443 "Clint is a Python module filled with a set of tools for developing
7444command-line applications, including tools for colored and indented
7445output, progress bar display, and pipes.")
7446 (license license:isc)))
7447
7448(define-public python2-clint
7449 (package-with-python2 python-clint))
7450
7451(define-public python-astor
7452 (package
7453 (name "python-astor")
7454 (version "0.5")
7455 (source (origin
7456 (method url-fetch)
7457 (uri (pypi-uri "astor" version))
7458 (sha256
7459 (base32
7460 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
7461 (build-system python-build-system)
7462 (home-page "https://github.com/berkerpeksag/astor")
7463 (synopsis "Read and write Python ASTs")
7464 (description
7465 "Astor is designed to allow easy manipulation of Python source via the
7466Abstract Syntax Tree.")
7467 (license license:bsd-3)))
7468
7469(define-public python2-astor
7470 (package-with-python2 python-astor))
7471
7472(define-public python-rply
7473 (package
7474 (name "python-rply")
7475 (version "0.7.5")
7476 (source (origin
7477 (method url-fetch)
7478 (uri (pypi-uri "rply" version))
7479 (sha256
7480 (base32
7481 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
7482 (build-system python-build-system)
7483 (propagated-inputs
7484 `(("python-appdirs" ,python-appdirs)))
7485 (home-page "https://github.com/alex/rply")
7486 (synopsis "Parser generator for Python")
7487 (description
7488 "This package provides a pure Python based parser generator, that also
7489works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
7490with a new public API, and RPython support.")
7491 (license license:bsd-3)))
7492
7493(define-public python2-rply
7494 (package-with-python2 python-rply))
7495
7496(define-public python-hy
7497 (package
7498 (name "python-hy")
7499 (version "0.13.0")
7500 (source (origin
7501 (method url-fetch)
7502 (uri (pypi-uri "hy" version))
7503 (sha256
7504 (base32
7505 "19sfymaksx9jhksfnb15ahid46mzrhdfzz6yy2craz2qnzvpmky8"))))
7506 (build-system python-build-system)
7507 (arguments
7508 '(#:phases
7509 (modify-phases %standard-phases
7510 (replace 'check
7511 (lambda _
7512 ;; Tests require write access to HOME.
7513 (setenv "HOME" "/tmp")
7514 (invoke "nosetests"))))))
7515 (native-inputs
7516 `(("python-coverage" ,python-coverage)
7517 ("python-nose" ,python-nose)))
7518 (propagated-inputs
7519 `(("python-astor" ,python-astor)
7520 ("python-clint" ,python-clint)
7521 ("python-rply" ,python-rply)))
7522 (home-page "http://hylang.org/")
7523 (synopsis "Lisp frontend to Python")
7524 (description
7525 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
7526its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
7527Python at your fingertips, in Lisp form.")
7528 (license license:expat)))
7529
7530(define-public python2-hy
7531 (package-with-python2 python-hy))
7532
7533(define-public python2-functools32
7534 (package
7535 (name "python2-functools32")
7536 (version "3.2.3-2")
7537 (source
7538 (origin
7539 (method url-fetch)
7540 (uri (pypi-uri "functools32" version))
7541 (sha256
7542 (base32
7543 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
7544 (build-system python-build-system)
7545 (arguments
7546 `(#:python ,python-2
7547 #:tests? #f)) ; no test target
7548 (home-page "https://github.com/MiCHiLU/python-functools32")
7549 (synopsis
7550 "Backport of the functools module from Python 3.2.3")
7551 (description
7552 "This package is a backport of the @code{functools} module from Python
75533.2.3 for use with older versions of Python and PyPy.")
7554 (license license:expat)))
7555
7556(define-public python2-subprocess32
7557 (package
7558 (name "python2-subprocess32")
7559 (version "3.2.7")
7560 (source (origin
7561 (method url-fetch)
7562 (uri (pypi-uri "subprocess32" version))
7563 (sha256
7564 (base32
7565 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
7566 (patches
7567 (search-patches "python2-subprocess32-disable-input-test.patch"))))
7568 (build-system python-build-system)
7569 (arguments
7570 `(#:python ,python-2
7571 ;; The test suite fails with Python > 2.7.13:
7572 ;; import test.support
7573 ;; ImportError: No module named support
7574 #:tests? #f
7575 #:phases
7576 (modify-phases %standard-phases
7577 (add-after 'unpack 'patch-/bin/sh
7578 (lambda _
7579 (substitute* '("subprocess32.py"
7580 "test_subprocess32.py")
7581 (("/bin/sh") (which "sh")))
7582 #t)))))
7583 (home-page "https://github.com/google/python-subprocess32")
7584 (synopsis "Backport of the subprocess module from Python 3.2")
7585 (description
7586 "This is a backport of the @code{subprocess} standard library module
7587from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
7588new features. On POSIX systems it is guaranteed to be reliable when used
7589in threaded applications. It includes timeout support from Python 3.3 but
7590otherwise matches 3.2’s API.")
7591 (license license:psfl)))
7592
7593(define-public python2-futures
7594 (package
7595 (name "python2-futures")
7596 (version "3.2.0")
7597 (source
7598 (origin
7599 (method url-fetch)
7600 (uri (pypi-uri "futures" version))
7601 (sha256
7602 (base32
7603 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
7604 (build-system python-build-system)
7605 (arguments `(#:python ,python-2
7606 ;; FIXME: Python 2.7.14 moved the test.support library,
7607 ;; but our package has not yet been adjusted. Enable
7608 ;; tests when the python2 package has been fixed.
7609 #:tests? #f))
7610 (home-page "https://github.com/agronholm/pythonfutures")
7611 (synopsis
7612 "Backport of the concurrent.futures package from Python 3.2")
7613 (description
7614 "The concurrent.futures module provides a high-level interface for
7615asynchronously executing callables. This package backports the
7616concurrent.futures package from Python 3.2")
7617 (license license:bsd-3)))
7618
7619(define-public python-promise
7620 (package
7621 (name "python-promise")
7622 (version "0.4.2")
7623 (source
7624 (origin
7625 (method url-fetch)
7626 (uri (pypi-uri "promise" version))
7627 (sha256
7628 (base32
7629 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
7630 (build-system python-build-system)
7631 ;; Tests wants python-futures, which is a python2 only program, and
7632 ;; can't be found by python-promise at test time.
7633 (arguments `(#:tests? #f))
7634 (home-page "https://github.com/syrusakbary/promise")
7635 (synopsis "Promises/A+ implementation for Python")
7636 (description
7637 "Promises/A+ implementation for Python")
7638 (properties `((python2-variant . ,(delay python2-promise))))
7639 (license license:expat)))
7640
7641(define-public python2-promise
7642 (let ((promise (package-with-python2
7643 (strip-python2-variant python-promise))))
7644 (package (inherit promise)
7645 (arguments (substitute-keyword-arguments (package-arguments promise)
7646 ((#:tests? _) #t)))
7647 (native-inputs
7648 `(("python2-futures" ,python2-futures)
7649 ("python2-pytest" ,python2-pytest)
7650 ,@(package-native-inputs promise))))))
7651
7652(define-public python-colorama
7653 (package
7654 (name "python-colorama")
7655 (version "0.3.9")
7656 (source
7657 (origin
7658 (method url-fetch)
7659 (uri (pypi-uri "colorama" version))
7660 (sha256
7661 (base32
7662 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
7663 (build-system python-build-system)
7664 (synopsis "Colored terminal text rendering for Python")
7665 (description "Colorama is a Python library for rendering colored terminal
7666text.")
7667 (home-page "https://pypi.python.org/pypi/colorama")
7668 (license license:bsd-3)))
7669
7670(define-public python2-colorama
7671 (package-with-python2 python-colorama))
7672
7673(define-public python-rsa
7674 (package
7675 (name "python-rsa")
7676 (version "3.4.2")
7677 (source
7678 (origin
7679 (method url-fetch)
7680 (uri (pypi-uri "rsa" version))
7681 (sha256
7682 (base32
7683 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
7684 (build-system python-build-system)
7685 (propagated-inputs
7686 `(("python-pyasn1" ,python-pyasn1)))
7687 (synopsis "Pure-Python RSA implementation")
7688 (description "Python-RSA is a pure-Python RSA implementation. It supports
7689encryption and decryption, signing and verifying signatures, and key
7690generation according to PKCS#1 version 1.5. It can be used as a Python
7691library as well as on the command line.")
7692 (home-page "https://stuvel.eu/rsa")
7693 (license license:asl2.0)))
7694
7695(define-public python2-rsa
7696 (package-with-python2 python-rsa))
7697
7698(define-public python-pluggy
7699 (package
7700 (name "python-pluggy")
7701 (version "0.7.1")
7702 (source
7703 (origin
7704 (method url-fetch)
7705 (uri (pypi-uri "pluggy" version))
7706 (sha256
7707 (base32
7708 "1qbn70mksmr03hac6jgp6fiqc4l7859z8dchx2x950vhlij87swm"))))
7709 (build-system python-build-system)
7710 (native-inputs
7711 `(("python-setuptools-scm" ,python-setuptools-scm)))
7712 (synopsis "Plugin and hook calling mechanism for Python")
7713 (description "Pluggy is an extraction of the plugin manager as used by
7714Pytest but stripped of Pytest specific details.")
7715 (home-page "https://pypi.python.org/pypi/pluggy")
7716 (license license:expat)))
7717
7718(define-public python2-pluggy
7719 (package-with-python2 python-pluggy))
7720
7721(define-public python-tox
7722 (package
7723 (name "python-tox")
7724 (version "2.8.1")
7725 (source
7726 (origin
7727 (method url-fetch)
7728 (uri (pypi-uri "tox" version))
7729 (sha256
7730 (base32
7731 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
7732 (build-system python-build-system)
7733 (arguments
7734 ;; FIXME: Tests require pytest-timeout, which itself requires
7735 ;; pytest>=2.8.0 for installation.
7736 '(#:tests? #f))
7737 (propagated-inputs
7738 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
7739 ("python-py" ,python-py)
7740 ("python-virtualenv" ,python-virtualenv)))
7741 (native-inputs
7742 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
7743 ("python-pytest" ,python-pytest) ; >= 2.3.5
7744 ("python-setuptools-scm" ,python-setuptools-scm)))
7745 (home-page "http://tox.testrun.org/")
7746 (synopsis "Virtualenv-based automation of test activities")
7747 (description "Tox is a generic virtualenv management and test command line
7748tool. It can be used to check that a package installs correctly with
7749different Python versions and interpreters, or run tests in each type of
7750supported environment, or act as a frontend to continuous integration
7751servers.")
7752 (license license:expat)))
7753
7754(define-public python2-tox
7755 (package-with-python2 python-tox))
7756
7757(define-public python-jmespath
7758 (package
7759 (name "python-jmespath")
7760 (version "0.9.3")
7761 (source
7762 (origin
7763 (method url-fetch)
7764 (uri (pypi-uri "jmespath" version))
7765 (sha256
7766 (base32
7767 "0r7wc7fsxmlwzxx9j1j7rms06c6xs6d4sysirdhz1jk2mb4x90ba"))))
7768 (build-system python-build-system)
7769 (native-inputs
7770 `(("python-nose" ,python-nose)))
7771 (synopsis "JSON Matching Expressions")
7772 (description "JMESPath (pronounced “james path”) is a Python library that
7773allows one to declaratively specify how to extract elements from a JSON
7774document.")
7775 (home-page "https://github.com/jmespath/jmespath.py")
7776 (license license:expat)))
7777
7778(define-public python2-jmespath
7779 (package-with-python2 python-jmespath))
7780
7781(define-public python-botocore
7782 (package
7783 (name "python-botocore")
7784 (version "1.8.43")
7785 (source
7786 (origin
7787 (method url-fetch)
7788 (uri (pypi-uri "botocore" version))
7789 (sha256
7790 (base32
7791 "12cqpbnz3vfv41mp9admvciw7bc7hz57sjpqs2bxaw9wnfmbw5lg"))))
7792 (build-system python-build-system)
7793 (arguments
7794 ;; FIXME: Many tests are failing.
7795 '(#:tests? #f))
7796 (propagated-inputs
7797 `(("python-dateutil" ,python-dateutil)
7798 ("python-docutils" ,python-docutils)
7799 ("python-jmespath" ,python-jmespath)))
7800 (native-inputs
7801 `(("python-mock" ,python-mock)
7802 ("python-nose" ,python-nose)
7803 ("behave" ,behave)
7804 ("python-tox" ,python-tox)
7805 ("python-wheel" ,python-wheel)))
7806 (home-page "https://github.com/boto/botocore")
7807 (synopsis "Low-level interface to AWS")
7808 (description "Botocore is a Python library that provides a low-level
7809interface to the Amazon Web Services (AWS) API.")
7810 (license license:asl2.0)))
7811
7812(define-public python2-botocore
7813 (package-with-python2 python-botocore))
7814
7815(define-public python-xdo
7816 (package
7817 (name "python-xdo")
7818 (version "0.3")
7819 (source (origin
7820 (method url-fetch)
7821 (uri (string-append
7822 "http://http.debian.net/debian/pool/main/p/python-xdo/"
7823 "python-xdo_" version ".orig.tar.gz"))
7824 (sha256
7825 (base32
7826 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
7827 (build-system python-build-system)
7828 (arguments
7829 '(#:phases
7830 (modify-phases %standard-phases
7831 (add-before 'install 'patch-libxdo-path
7832 ;; Hardcode the path of dynamically loaded libxdo library.
7833 (lambda* (#:key inputs #:allow-other-keys)
7834 (let ((libxdo (string-append
7835 (assoc-ref inputs "xdotool")
7836 "/lib/libxdo.so")))
7837 (substitute* "xdo/_xdo.py"
7838 (("find_library\\(\"xdo\"\\)")
7839 (simple-format #f "\"~a\"" libxdo)))
7840 #t))))
7841 #:tests? #f)) ; no tests provided
7842 (propagated-inputs
7843 `(("python-six" ,python-six)))
7844 (inputs
7845 `(("xdotool" ,xdotool)
7846 ("libX11" ,libx11)))
7847 (home-page "https://tracker.debian.org/pkg/python-xdo")
7848 (synopsis "Python library for simulating X11 keyboard/mouse input")
7849 (description "Provides bindings to libxdo for manipulating X11 via simulated
7850input. (Note that this is mostly a legacy library; you may wish to look at
7851python-xdo for newer bindings.)")
7852 (license license:bsd-3)))
7853
7854(define-public python2-xdo
7855 (package-with-python2 python-xdo))
7856
7857(define-public python-mako
7858 (package
7859 (name "python-mako")
7860 (version "1.0.7")
7861 (source
7862 (origin
7863 (method url-fetch)
7864 (uri (pypi-uri "Mako" version))
7865 (sha256
7866 (base32
7867 "1bi5gnr8r8dva06qpyx4kgjc6spm2k1y908183nbbaylggjzs0jf"))))
7868 (build-system python-build-system)
7869 (propagated-inputs
7870 `(("python-markupsafe" ,python-markupsafe)))
7871 (native-inputs
7872 `(("python-mock" ,python-mock)
7873 ("python-nose" ,python-nose)
7874 ("python-pytest" ,python-pytest)))
7875 (home-page "http://www.makotemplates.org/")
7876 (synopsis "Templating language for Python")
7877 (description "Mako is a templating language for Python that compiles
7878templates into Python modules.")
7879 (license license:expat)))
7880
7881(define-public python2-mako
7882 (package-with-python2 python-mako))
7883
7884(define-public python-waitress
7885 (package
7886 (name "python-waitress")
7887 (version "1.1.0")
7888 (source
7889 (origin
7890 (method url-fetch)
7891 (uri (pypi-uri "waitress" version))
7892 (patches (search-patches "python-waitress-fix-tests.patch"))
7893 (sha256
7894 (base32
7895 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
7896 (build-system python-build-system)
7897 (home-page "https://github.com/Pylons/waitress")
7898 (synopsis "Waitress WSGI server")
7899 (description "Waitress is meant to be a production-quality pure-Python WSGI
7900server with very acceptable performance.")
7901 (license license:zpl2.1)))
7902
7903(define-public python2-waitress
7904 (package-with-python2 python-waitress))
7905
7906(define-public python-pyquery
7907 (package
7908 (name "python-pyquery")
7909 (version "1.2.17")
7910 (source
7911 (origin
7912 (method url-fetch)
7913 (uri (pypi-uri "pyquery" version))
7914 (sha256
7915 (base32
7916 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
7917 (build-system python-build-system)
7918 (native-inputs
7919 `(("python-webob" ,python-webob)
7920 ("python-webtest" ,python-webtest)))
7921 (propagated-inputs
7922 `(("python-lxml" ,python-lxml)
7923 ("python-cssselect" ,python-cssselect)))
7924 (home-page "https://github.com/gawel/pyquery")
7925 (synopsis "Make jQuery-like queries on xml documents")
7926 (description "pyquery allows you to make jQuery queries on xml documents.
7927The API is as much as possible the similar to jQuery. pyquery uses lxml for
7928fast xml and html manipulation.")
7929 (license license:bsd-3)))
7930
7931(define-public python2-pyquery
7932 (package-with-python2 python-pyquery))
7933
7934(define-public python-anyjson
7935 (package
7936 (name "python-anyjson")
7937 (version "0.3.3")
7938 (source
7939 (origin
7940 (method url-fetch)
7941 (uri (pypi-uri "anyjson" version))
7942 (sha256
7943 (base32
7944 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
7945 (build-system python-build-system)
7946 (arguments
7947 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
7948 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
7949 ;; whatever) so this transformation needs to be done before the tests
7950 ;; can be run. Maybe we could add a build step to transform beforehand
7951 ;; but it could be annoying/difficult.
7952 ;; We can enable tests for the Python 2 version, though, and do below.
7953 #:tests? #f))
7954 (home-page "https://bitbucket.org/runeh/anyjson/")
7955 (synopsis
7956 "Wraps best available JSON implementation in a common interface")
7957 (description
7958 "Anyjson loads whichever is the fastest JSON module installed
7959and provides a uniform API regardless of which JSON implementation is used.")
7960 (license license:bsd-3)
7961 (properties `((python2-variant . ,(delay python2-anyjson))))))
7962
7963(define-public python2-anyjson
7964 (let ((anyjson (package-with-python2
7965 (strip-python2-variant python-anyjson))))
7966 (package
7967 (inherit anyjson)
7968 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
7969 #:tests? #t
7970 ,@(package-arguments anyjson)))
7971 (native-inputs `(("python2-nose" ,python2-nose))))))
7972
7973(define-public python-amqp
7974 (package
7975 (name "python-amqp")
7976 (version "2.3.2")
7977 (source
7978 (origin
7979 (method url-fetch)
7980 (uri (pypi-uri "amqp" version))
7981 (sha256
7982 (base32
7983 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
7984 (build-system python-build-system)
7985 (native-inputs
7986 `(("python-case" ,python-case)
7987 ("python-pytest-sugar" ,python-pytest-sugar)
7988 ("python-mock" ,python-mock)))
7989 (propagated-inputs
7990 `(("python-vine" ,python-vine)))
7991 (home-page "https://github.com/celery/py-amqp")
7992 (synopsis
7993 "Low-level AMQP client for Python (fork of amqplib)")
7994 (description
7995 "This is a fork of amqplib which was originally written by Barry Pederson.
7996It is maintained by the Celery project, and used by kombu as a pure python
7997alternative when librabbitmq is not available.")
7998 (license license:lgpl2.1+)
7999 (properties `((python2-variant . ,(delay python2-amqp))))))
8000
8001(define-public python2-amqp
8002 (let ((amqp (package-with-python2
8003 (strip-python2-variant python-amqp))))
8004 (package
8005 (inherit amqp)
8006 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
8007 ;; unmaintained. Weirdly, does not do this on the python 3
8008 ;; version?
8009 #:tests? #f
8010 ,@(package-arguments amqp))))))
8011
8012(define-public python-txamqp
8013 (package
8014 (name "python-txamqp")
8015 (version "0.8.2")
8016 (source
8017 (origin
8018 (method url-fetch)
8019 (uri (pypi-uri "txAMQP" version))
8020 (sha256
8021 (base32
8022 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
8023 (build-system python-build-system)
8024 (propagated-inputs
8025 `(("python-six" ,python-six)
8026 ("python-twisted" ,python-twisted)))
8027 (home-page "https://github.com/txamqp/txamqp")
8028 (synopsis "Communicate with AMQP peers and brokers using Twisted")
8029 (description
8030 "This package provides a Python library for communicating with AMQP peers
8031and brokers using the asynchronous networking framework Twisted. It contains
8032all the necessary code to connect, send and receive messages to/from an
8033AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
8034also includes support for using Thrift RPC over AMQP in Twisted
8035applications.")
8036 (license license:asl2.0)))
8037
8038(define-public python2-txamqp
8039 (package-with-python2 python-txamqp))
8040
8041(define-public python-kombu
8042 (package
8043 (name "python-kombu")
8044 (version "4.2.2")
8045 (source
8046 (origin
8047 (method url-fetch)
8048 (uri (pypi-uri "kombu" version))
8049 (sha256
8050 (base32
8051 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
8052 (build-system python-build-system)
8053 (native-inputs
8054 `(("python-mock" ,python-mock)
8055 ("python-case" ,python-case)
8056 ("python-pyro4" ,python-pyro4)
8057 ("python-pytest-sugar" ,python-pytest-sugar)
8058 ("python-pytz" ,python-pytz)))
8059 (propagated-inputs
8060 `(("python-anyjson" ,python-anyjson)
8061 ("python-amqp" ,python-amqp)
8062 ("python-redis" ,python-redis)))
8063 (home-page "https://kombu.readthedocs.io")
8064 (synopsis "Message passing library for Python")
8065 (description "The aim of Kombu is to make messaging in Python as easy as
8066possible by providing an idiomatic high-level interface for the AMQ protocol,
8067and also provide proven and tested solutions to common messaging problems.
8068AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
8069message orientation, queuing, routing, reliability and security, for which the
8070RabbitMQ messaging server is the most popular implementation.")
8071 (license license:bsd-3)
8072 (properties `((python2-variant . ,(delay python2-kombu))))))
8073
8074(define-public python2-kombu
8075 (let ((kombu (package-with-python2
8076 (strip-python2-variant python-kombu))))
8077 (package
8078 (inherit kombu)
8079 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
8080 ;; It works fine on the python3 variant.
8081 #:tests? #f
8082 ,@(package-arguments kombu)))
8083 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8084 ,@(package-native-inputs kombu))))))
8085
8086(define-public python-billiard
8087 (package
8088 (name "python-billiard")
8089 (version "3.5.0.5")
8090 (source
8091 (origin
8092 (method url-fetch)
8093 (uri (pypi-uri "billiard" version))
8094 (sha256
8095 (base32
8096 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
8097 (build-system python-build-system)
8098 (native-inputs
8099 `(("python-case" ,python-case)
8100 ("python-pytest" ,python-pytest)))
8101 (home-page "https://github.com/celery/billiard")
8102 (synopsis
8103 "Python multiprocessing fork with improvements and bugfixes")
8104 (description
8105 "Billiard is a fork of the Python 2.7 multiprocessing package. The
8106multiprocessing package itself is a renamed and updated version of R Oudkerk's
8107pyprocessing package. This standalone variant is intended to be compatible with
8108Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
8109 (license license:bsd-3)
8110 (properties `((python2-variant . ,(delay python2-billiard))))))
8111
8112(define-public python2-billiard
8113 (let ((billiard (package-with-python2
8114 (strip-python2-variant python-billiard))))
8115 (package
8116 (inherit billiard)
8117 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8118 ("python2-mock" ,python2-mock)
8119 ,@(package-native-inputs billiard))))))
8120
8121(define-public python-celery
8122 (package
8123 (name "python-celery")
8124 (version "4.2.1")
8125 (source
8126 (origin
8127 (method url-fetch)
8128 (uri (pypi-uri "celery" version))
8129 (sha256
8130 (base32
8131 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
8132 (build-system python-build-system)
8133 (arguments
8134 '(;; TODO The tests fail with Python 3.7
8135 ;; https://github.com/celery/celery/issues/4849
8136 #:tests? #f
8137 #:phases
8138 (modify-phases %standard-phases
8139 (add-after 'unpack 'patch-requirements
8140 (lambda _
8141 (substitute* "requirements/test.txt"
8142 (("pytest>=3\\.0,<3\\.3")
8143 "pytest>=3.0"))
8144 #t)))))
8145 (native-inputs
8146 `(("python-case" ,python-case)
8147 ("python-pytest" ,python-pytest)))
8148 (propagated-inputs
8149 `(("python-pytz" ,python-pytz)
8150 ("python-billiard" ,python-billiard)
8151 ("python-kombu" ,python-kombu)))
8152 (home-page "https://celeryproject.org")
8153 (synopsis "Distributed Task Queue")
8154 (description "Celery is an asynchronous task queue/job queue based on
8155distributed message passing. It is focused on real-time operation, but
8156supports scheduling as well. The execution units, called tasks, are executed
8157concurrently on a single or more worker servers using multiprocessing,
8158Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
8159synchronously (wait until ready).")
8160 (license license:bsd-3)
8161 (properties `((python2-variant . ,(delay python2-celery))))))
8162
8163(define-public python2-celery
8164 (let ((celery (package-with-python2
8165 (strip-python2-variant python-celery))))
8166 (package
8167 (inherit celery)
8168 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8169 ("python2-mock" ,python2-mock)
8170 ,@(package-native-inputs celery))))))
8171
8172(define-public python-translitcodec
8173 (package
8174 (name "python-translitcodec")
8175 (version "0.4.0")
8176 (source
8177 (origin
8178 (method url-fetch)
8179 (uri (pypi-uri "translitcodec" version))
8180 (sha256
8181 (base32
8182 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
8183 (build-system python-build-system)
8184 (arguments
8185 `(#:tests? #f)) ; no tests provided
8186 (home-page
8187 "https://github.com/claudep/translitcodec")
8188 (synopsis
8189 "Unicode to 8-bit charset transliteration codec")
8190 (description
8191 "This package contains codecs for transliterating ISO 10646 texts into
8192best-effort representations using smaller coded character sets (ASCII,
8193ISO 8859, etc.).")
8194 (license license:expat)))
8195
8196(define-public python2-translitcodec
8197 (package-with-python2 python-translitcodec))
8198
8199(define-public python-editor
8200 (package
8201 (name "python-editor")
8202 (version "0.5")
8203 (source
8204 (origin
8205 (method url-fetch)
8206 (uri (pypi-uri "python-editor" version))
8207 (sha256
8208 (base32
8209 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
8210 (build-system python-build-system)
8211 (home-page
8212 "https://github.com/fmoo/python-editor")
8213 (synopsis
8214 "Programmatically open an editor, capture the result")
8215 (description
8216 "python-editor is a library that provides the editor module for
8217programmatically interfacing with your system's $EDITOR.")
8218 (license license:asl2.0)))
8219
8220(define-public python2-editor
8221 (package-with-python2 python-editor))
8222
8223(define-public python-sphinxcontrib-programoutput
8224 (package
8225 (name "python-sphinxcontrib-programoutput")
8226 (version "0.10")
8227 (source (origin
8228 (method url-fetch)
8229 (uri (pypi-uri "sphinxcontrib-programoutput" version))
8230 (sha256
8231 (base32
8232 "153hhnlbx4688zj9wd64819ps5znc2jlyp5crkgzvn5hxgy99vpx"))))
8233 (build-system python-build-system)
8234 (arguments
8235 ;; FIXME: Many tests are failing and the upstream is gone.
8236 '(#:tests? #f))
8237 (propagated-inputs
8238 `(("python-sphinx" ,python-sphinx)))
8239 (synopsis "Sphinx extension to include program output")
8240 (description "A Sphinx extension to literally insert the output of arbitrary
8241commands into documents, helping you to keep your command examples up to date.")
8242 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
8243 (license license:bsd-2)))
8244
8245(define-public python2-sphinxcontrib-programoutput
8246 (package-with-python2 python-sphinxcontrib-programoutput))
8247
8248(define-public python-sphinx-repoze-autointerface
8249 (package
8250 (name "python-sphinx-repoze-autointerface")
8251 (version "0.8")
8252 (source (origin
8253 (method url-fetch)
8254 (uri (pypi-uri "repoze.sphinx.autointerface" version))
8255 (sha256
8256 (base32
8257 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
8258 (build-system python-build-system)
8259 (arguments '(#:tests? #f)) ; No tests.
8260 (propagated-inputs
8261 `(("python-sphinx" ,python-sphinx)
8262 ("python-zope-interface" ,python-zope-interface)))
8263 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
8264 (description "This package defines an extension for the Sphinx documentation
8265system. The extension allows generation of API documentation by
8266introspection of @code{zope.interface} instances in code.")
8267 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
8268 (license license:repoze)))
8269
8270(define-public python2-sphinx-repoze-autointerface
8271 (package-with-python2 python-sphinx-repoze-autointerface))
8272
8273(define-public python-vobject
8274 (package
8275 (name "python-vobject")
8276 (version "0.9.5")
8277 (source (origin
8278 (method url-fetch)
8279 (uri (pypi-uri "vobject" version))
8280 (sha256
8281 (base32
8282 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
8283 (build-system python-build-system)
8284 (arguments
8285 '(;; The test suite relies on some non-portable Windows interfaces.
8286 #:tests? #f))
8287 (propagated-inputs
8288 `(("python-dateutil" ,python-dateutil)
8289 ("python-pyicu" ,python-pyicu)))
8290 (synopsis "Parse and generate vCard and vCalendar files")
8291 (description "Vobject is intended to be a full featured Python package for
8292parsing and generating vCard and vCalendar files. Currently, iCalendar files
8293are supported and well tested. vCard 3.0 files are supported, and all data
8294should be imported, but only a few components are understood in a sophisticated
8295way.")
8296 (home-page "http://eventable.github.io/vobject/")
8297 (license license:asl2.0)))
8298
8299(define-public python2-vobject
8300 (package-with-python2 python-vobject))
8301
8302(define-public python-munkres
8303 (package
8304 (name "python-munkres")
8305 (version "1.0.8")
8306 (source (origin
8307 (method url-fetch)
8308 (uri (pypi-uri "munkres" version))
8309 (sha256
8310 (base32
8311 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
8312 (build-system python-build-system)
8313 (arguments
8314 '(#:tests? #f)) ; no test suite
8315 (home-page "http://software.clapper.org/munkres/")
8316 (synopsis "Implementation of the Munkres algorithm")
8317 (description "The Munkres module provides an implementation of the Munkres
8318algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
8319useful for solving the Assignment Problem.")
8320 (license license:bsd-3)))
8321
8322(define-public python2-munkres
8323 (package-with-python2 python-munkres))
8324
8325(define-public python-whoosh
8326 (package
8327 (name "python-whoosh")
8328 (version "2.7.4")
8329 (source
8330 (origin
8331 (method url-fetch)
8332 (uri (pypi-uri "Whoosh" version))
8333 (sha256
8334 (base32
8335 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
8336 (build-system python-build-system)
8337 (native-inputs
8338 `(("python-pytest" ,python-pytest)))
8339 (home-page "https://bitbucket.org/mchaput/whoosh")
8340 (synopsis "Full text indexing, search, and spell checking library")
8341 (description
8342 "Whoosh is a fast, pure-Python full text indexing, search, and spell
8343checking library.")
8344 (license license:bsd-2)))
8345
8346(define-public python2-whoosh
8347 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
8348 (package (inherit whoosh)
8349 (propagated-inputs
8350 `(("python2-backport-ssl-match-hostname"
8351 ,python2-backport-ssl-match-hostname)
8352 ,@(package-propagated-inputs whoosh))))))
8353
8354(define-public python-pathlib
8355 (package
8356 (name "python-pathlib")
8357 (version "1.0.1")
8358 (source (origin
8359 (method url-fetch)
8360 (uri (pypi-uri "pathlib" version))
8361 (sha256
8362 (base32
8363 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
8364 (build-system python-build-system)
8365 ;; The tests depend on the internal "test" module, which does not provide
8366 ;; a stable interface.
8367 (arguments `(#:tests? #f))
8368 (home-page "https://pathlib.readthedocs.org/")
8369 (synopsis "Object-oriented file system paths")
8370 (description "Pathlib offers a set of classes to handle file system paths.
8371It offers the following advantages over using string objects:
8372
8373@enumerate
8374@item No more cumbersome use of os and os.path functions. Everything can
8375be done easily through operators, attribute accesses, and method calls.
8376@item Embodies the semantics of different path types. For example,
8377comparing Windows paths ignores casing.
8378@item Well-defined semantics, eliminating any inconsistencies or
8379ambiguities (forward vs. backward slashes, etc.).
8380@end enumerate
8381
8382Note: In Python 3.4, pathlib is now part of the standard library. For other
8383Python versions please consider python-pathlib2 instead, which tracks the
8384standard library module. This module (python-pathlib) isn't maintained
8385anymore.")
8386 (license license:expat)))
8387
8388(define-public python2-pathlib
8389 (package-with-python2 python-pathlib))
8390
8391(define-public python2-pathlib2
8392 (package
8393 (name "python2-pathlib2")
8394 (version "2.3.2")
8395 (source (origin
8396 (method url-fetch)
8397 (uri (pypi-uri "pathlib2" version))
8398 (sha256
8399 (base32
8400 "10yb0iv5x2hs631rcppkhbddx799d3h8pcwmkbh2a66ns3w71ccf"))))
8401 (build-system python-build-system)
8402 ;; We only need the the Python 2 variant, since for Python 3 our minimum
8403 ;; version is 3.4 which already includes this package as part of the
8404 ;; standard library.
8405 (arguments
8406 `(#:python ,python-2))
8407 (propagated-inputs
8408 `(("python2-scandir" ,python2-scandir)
8409 ("python2-six" ,python2-six)))
8410 (home-page "https://pypi.python.org/pypi/pathlib2/")
8411 (synopsis "Object-oriented file system paths - backport of standard
8412pathlib module")
8413 (description "The goal of pathlib2 is to provide a backport of standard
8414pathlib module which tracks the standard library module, so all the newest
8415features of the standard pathlib can be used also on older Python versions.
8416
8417Pathlib offers a set of classes to handle file system paths. It offers the
8418following advantages over using string objects:
8419
8420@enumerate
8421@item No more cumbersome use of os and os.path functions. Everything can
8422be done easily through operators, attribute accesses, and method calls.
8423@item Embodies the semantics of different path types. For example,
8424comparing Windows paths ignores casing.
8425@item Well-defined semantics, eliminating any inconsistencies or
8426ambiguities (forward vs. backward slashes, etc.).
8427@end enumerate")
8428 (license license:expat)))
8429
8430(define-public python2-pathlib2-bootstrap
8431 (hidden-package
8432 (package
8433 (inherit python2-pathlib2)
8434 (name "python2-pathlib2-bootstrap")
8435 (propagated-inputs
8436 `(("python2-scandir" ,python2-scandir)
8437 ("python2-six" ,python2-six-bootstrap))))))
8438
8439(define-public python-jellyfish
8440 (package
8441 (name "python-jellyfish")
8442 (version "0.5.6")
8443 (source (origin
8444 (method url-fetch)
8445 (uri (pypi-uri "jellyfish" version))
8446 (sha256
8447 (base32
8448 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
8449 (build-system python-build-system)
8450 (native-inputs
8451 `(("python-pytest" ,python-pytest)))
8452 (home-page "https://github.com/jamesturk/jellyfish")
8453 (synopsis "Approximate and phonetic matching of strings")
8454 (description "Jellyfish uses a variety of string comparison and phonetic
8455encoding algorithms to do fuzzy string matching.")
8456 (license license:bsd-2)
8457 (properties `((python2-variant . ,(delay python2-jellyfish))))))
8458
8459(define-public python2-jellyfish
8460 (let ((jellyfish (package-with-python2
8461 (strip-python2-variant python-jellyfish))))
8462 (package (inherit jellyfish)
8463 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
8464 ,@(package-native-inputs jellyfish))))))
8465
8466(define-public python2-unicodecsv
8467 (package
8468 (name "python2-unicodecsv")
8469 (version "0.14.1")
8470 (source (origin
8471 (method url-fetch)
8472 ;; The test suite is not included in the PyPi release.
8473 ;; https://github.com/jdunck/python-unicodecsv/issues/19
8474 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
8475 "archive/" version ".tar.gz"))
8476 (file-name (string-append name "-" version ".tar.gz"))
8477 (sha256
8478 (base32
8479 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
8480 (build-system python-build-system)
8481 (arguments
8482 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
8483 #:python ,python-2))
8484 (native-inputs
8485 `(("python2-unittest2" ,python2-unittest2)))
8486 (home-page "https://github.com/jdunck/python-unicodecsv")
8487 (synopsis "Unicode CSV module for Python 2")
8488 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
8489module, adding support for Unicode strings.")
8490 (license license:bsd-2)))
8491
8492(define-public python-rarfile
8493 (package
8494 (name "python-rarfile")
8495 (version "2.8")
8496 (source (origin
8497 (method url-fetch)
8498 (uri (pypi-uri "rarfile" version))
8499 (sha256
8500 (base32
8501 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
8502 (build-system python-build-system)
8503 (arguments
8504 '(#:phases
8505 (modify-phases %standard-phases
8506 (replace 'check
8507 ;; Many tests fail, but the installation proceeds.
e59dd341 8508 (lambda _ (invoke "make" "-C" "test" "test"))))))
44d10b1f
RW
8509 (native-inputs
8510 `(("which" ,which))) ; required for tests
8511 (propagated-inputs
8512 `(("libarchive" ,libarchive)))
8513 (home-page "https://github.com/markokr/rarfile")
8514 (synopsis "RAR archive reader for Python")
8515 (description "This is Python module for RAR archive reading. The interface
8516is made as zipfile like as possible.")
8517 (license license:isc)))
8518
8519(define-public python2-rarfile
8520 (package-with-python2 python-rarfile))
8521
8522(define-public python-magic
8523 (package
8524 (name "python-magic")
8525 (version "0.4.15")
8526 (source
8527 (origin
8528 (method url-fetch)
8529 (uri (pypi-uri "python-magic" version))
8530 (sha256
8531 (base32
8532 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
8533 (file-name (string-append name "-" version "-checkout"))))
8534 (build-system python-build-system)
8535 (arguments
8536 ;; The tests are unreliable, so don't run them. The tests fail
8537 ;; under Python3 because they were written for Python2 and
8538 ;; contain import statements that do not work in Python3. One of
8539 ;; the tests fails under Python2 because its assertions are
8540 ;; overly stringent; it relies on comparing output strings which
8541 ;; are brittle and can change depending on the version of
8542 ;; libmagic being used and the system on which the test is
8543 ;; running. In my case, under GuixSD 0.10.0, only one test
8544 ;; failed, and it seems to have failed only because the version
8545 ;; of libmagic that is packaged in Guix outputs a slightly
8546 ;; different (but not wrong) string than the one that the test
8547 ;; expected.
8548 '(#:tests? #f
8549 #:phases (modify-phases %standard-phases
8550 ;; Replace a specific method call with a hard-coded
8551 ;; path to the necessary libmagic.so file in the
8552 ;; store. If we don't do this, then the method call
8553 ;; will fail to find the libmagic.so file, which in
8554 ;; turn will cause any application using
8555 ;; python-magic to fail.
8556 (add-before 'build 'hard-code-path-to-libmagic
8557 (lambda* (#:key inputs #:allow-other-keys)
8558 (let ((file (assoc-ref inputs "file")))
8559 (substitute* "magic.py"
8560 (("ctypes.util.find_library\\('magic'\\)")
8561 (string-append "'" file "/lib/libmagic.so'")))
8562 #t)))
8563 (add-before 'install 'disable-egg-compression
8564 (lambda _
8565 (let ((port (open-file "setup.cfg" "a")))
8566 (display "\n[easy_install]\nzip_ok = 0\n"
8567 port)
8568 (close-port port)
8569 #t))))))
8570 (inputs
8571 ;; python-magic needs to be able to find libmagic.so.
8572 `(("file" ,file)))
8573 (home-page
8574 "https://github.com/ahupp/python-magic")
8575 (synopsis
8576 "File type identification using libmagic")
8577 (description
8578 "This module uses ctypes to access the libmagic file type
8579identification library. It makes use of the local magic database and
8580supports both textual and MIME-type output. Note that this module and
8581the python-file module both provide a \"magic.py\" file; these two
8582modules, which are different and were developed separately, both serve
8583the same purpose: to provide Python bindings for libmagic.")
8584 (license license:expat)))
8585
8586(define-public python2-magic
8587 (package-with-python2 python-magic))
8588
8589(define-public python2-s3cmd
8590 (package
8591 (name "python2-s3cmd")
8592 (version "1.6.1")
8593 (source
8594 (origin
8595 (method url-fetch)
8596 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
8597 "s3cmd-" version ".tar.gz"))
8598 (sha256
8599 (base32
8600 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
8601 (build-system python-build-system)
8602 (arguments
8603 ;; s3cmd is written for python2 only and contains no tests.
8604 `(#:python ,python-2
8605 #:tests? #f))
8606 (propagated-inputs
8607 `(("python2-dateutil" ,python2-dateutil)
8608 ;; The python-file package also provides a magic.py module.
8609 ;; This is an unfortunate state of affairs; however, s3cmd
8610 ;; fails to install if it cannot find specifically the
8611 ;; python-magic package. Thus we include it, instead of using
8612 ;; python-file. Ironically, s3cmd sometimes works better
8613 ;; without libmagic bindings at all:
8614 ;; https://github.com/s3tools/s3cmd/issues/198
8615 ("python2-magic" ,python2-magic)))
8616 (home-page "http://s3tools.org/s3cmd")
8617 (synopsis "Command line tool for S3-compatible storage services")
8618 (description
8619 "S3cmd is a command line tool for uploading, retrieving and managing data
8620in storage services that are compatible with the Amazon Simple Storage
8621Service (S3) protocol, including S3 itself. It supports rsync-like backup,
8622GnuPG encryption, and more. It also supports management of Amazon's
8623CloudFront content delivery network.")
8624 (license license:gpl2+)))
8625
8626(define-public python-pkgconfig
8627 (package
8628 (name "python-pkgconfig")
8629 (version "1.3.1")
8630 (source
8631 (origin
8632 (method url-fetch)
8633 (uri (pypi-uri "pkgconfig" version))
8634 (sha256
8635 (base32
8636 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
8637 (build-system python-build-system)
8638 (native-inputs
8639 `(("python-nose" ,python-nose)))
8640 (inputs
8641 `(("pkg-config" ,pkg-config)))
8642 (arguments
8643 `(#:phases
8644 (modify-phases %standard-phases
8645 (add-before 'build 'patch
8646 ;; Hard-code the path to pkg-config.
8647 (lambda _
8648 (substitute* "pkgconfig/pkgconfig.py"
8649 (("cmd = 'pkg-config")
8650 (string-append "cmd = '" (which "pkg-config"))))
8651 #t))
8652 (replace 'check
8653 (lambda _
8654 (invoke "nosetests" "test.py"))))))
8655 (home-page "https://github.com/matze/pkgconfig")
8656 (synopsis "Python interface for pkg-config")
8657 (description "This module provides a Python interface to pkg-config. It
8658can be used to find all pkg-config packages, check if a package exists,
8659check if a package meets certain version requirements, query CFLAGS and
8660LDFLAGS and parse the output to build extensions with setup.py.")
8661 (license license:expat)))
8662
8663(define-public python2-pkgconfig
8664 (package-with-python2 python-pkgconfig))
8665
8666(define-public python-bz2file
8667 (package
8668 (name "python-bz2file")
8669 (version "0.98")
8670 (source
8671 (origin
8672 (method url-fetch)
8673 (uri (pypi-uri "bz2file" version))
8674 (sha256
8675 (base32
8676 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
8677 (build-system python-build-system)
8678 (arguments
8679 `(#:tests? #f)) ; Tests use deprecated python modules.
8680 (home-page "https://github.com/nvawda/bz2file")
8681 (synopsis "Read and write bzip2-compressed files")
8682 (description
8683 "Bz2file is a Python library for reading and writing bzip2-compressed
8684files. It contains a drop-in replacement for the I/O interface in the
8685standard library's @code{bz2} module, including features from the latest
8686development version of CPython that are not available in older releases.")
8687 (license license:asl2.0)))
8688
8689(define-public python2-bz2file
8690 (package-with-python2 python-bz2file))
8691
8692(define-public python-future
8693 (package
8694 (name "python-future")
8695 (version "0.16.0")
8696 (source
8697 (origin
8698 (method url-fetch)
8699 (uri (pypi-uri "future" version))
8700 (sha256
8701 (base32
8702 "1nzy1k4m9966sikp0qka7lirh8sqrsyainyf8rk97db7nwdfv773"))))
8703 (build-system python-build-system)
8704 ;; Many tests connect to the network or are otherwise flawed.
8705 ;; https://github.com/PythonCharmers/python-future/issues/210
8706 (arguments
8707 `(#:tests? #f))
8708 (home-page "http://python-future.org")
8709 (synopsis "Single-source support for Python 3 and 2")
8710 (description
8711 "@code{python-future} is the missing compatibility layer between Python 2 and
8712Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
8713to support both Python 2 and Python 3 with minimal overhead.")
8714 (license license:expat)))
8715
8716(define-public python2-future
8717 (package-with-python2 python-future))
8718
8719(define-public python-cysignals
8720 (package
8721 (name "python-cysignals")
8e3e51df 8722 (version "1.9.0")
44d10b1f
RW
8723 (source
8724 (origin
8725 (method url-fetch)
8e3e51df 8726 (uri (pypi-uri "cysignals" version))
44d10b1f
RW
8727 (sha256
8728 (base32
8e3e51df 8729 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
44d10b1f
RW
8730 (build-system python-build-system)
8731 (native-inputs
8732 `(("python-cython" ,python-cython)
8733 ("python-sphinx" ,python-sphinx)))
8734 (inputs
8735 `(("pari-gp" ,pari-gp)))
8736 (arguments
8737 `(#:modules ((guix build python-build-system)
8738 ((guix build gnu-build-system) #:prefix gnu:)
8739 (guix build utils))
8740 ;; FIXME: Tests are executed after installation and currently fail
8741 ;; when not installing into standard locations; the author is working
8742 ;; on a fix.
8743 #:tests? #f
8744 #:phases
8745 (modify-phases %standard-phases
8746 (add-before
8747 'build 'configure
8748 (assoc-ref gnu:%standard-phases 'configure)))))
8749 (home-page
8750 "https://github.com/sagemath/cysignals")
8751 (synopsis
8752 "Handling of interrupts and signals for Cython")
8753 (description
8754 "The cysignals package provides mechanisms to handle interrupts (and
8755other signals and errors) in Cython code, using two related approaches,
8756for mixed Cython/Python code or external C libraries and pure Cython code,
8757respectively.")
8758 (license license:lgpl3+)))
8759
8760(define-public python2-cysignals
8761 (package-with-python2 python-cysignals))
8762
8763(define-public python2-shedskin
8764 (package
8765 (name "python2-shedskin")
8766 (version "0.9.4")
8767 (source
8768 (origin
8769 (method url-fetch)
8770 (uri (string-append "https://github.com/shedskin/shedskin/"
8771 "releases/download/v" version
8772 "/shedskin-" version ".tgz"))
8773 (sha256
8774 (base32
8775 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
8776 (build-system python-build-system)
8777 (arguments
8778 `(#:python ,python-2
8779 #:phases (modify-phases %standard-phases
8780 (add-after 'unpack 'fix-resulting-include-libs
8781 (lambda* (#:key inputs #:allow-other-keys)
8782 (let ((libgc (assoc-ref inputs "libgc"))
8783 (pcre (assoc-ref inputs "pcre")))
8784 (substitute* "shedskin/makefile.py"
8785 (("variable == 'CCFLAGS':[ ]*")
8786 (string-append "variable == 'CCFLAGS':\n"
8787 " line += ' -I " pcre "/include"
8788 " -I " libgc "/include'"))
8789 (("variable == 'LFLAGS':[ ]*")
8790 (string-append "variable == 'LFLAGS':\n"
8791 " line += ' -L" pcre "/lib"
8792 " -L " libgc "/lib'")))
8793 #t))))))
8794 (inputs `(("pcre" ,pcre)
8795 ("libgc" ,libgc)))
8796 (home-page "https://shedskin.github.io/")
8797 (synopsis "Experimental Python-2 to C++ Compiler")
8798 (description (string-append "This is an experimental compiler for a subset of
8799Python. It generates C++ code and a Makefile."))
8800 (license (list license:gpl3 license:bsd-3 license:expat))))
8801
8802(define-public python2-rope
8803 (package
8804 (name "python2-rope")
8805 (version "0.10.3")
8806 (source
8807 (origin
8808 (method url-fetch)
8809 (uri (pypi-uri "rope" version))
8810 (sha256
8811 (base32
8812 "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
8813 (arguments
8814 ;; Rope is currently python-2 only.
8815 ;; https://github.com/python-rope/rope/issues/57
8816 `(#:python ,python-2))
8817 (build-system python-build-system)
8818 (native-inputs
8819 `(("python2-unittest2" ,python2-unittest2)))
8820 (home-page "https://github.com/python-rope/rope")
8821 (synopsis "Refactoring library for Python")
8822 (description "Rope is a refactoring library for Python. It facilitates
8823the renaming, moving and extracting of attributes, functions, modules, fields
8824and parameters in Python 2 source code. These refactorings can also be applied
8825to occurrences in strings and comments.")
8826 (license license:gpl2)))
8827
8828(define-public python-py3status
8829 (package
8830 (name "python-py3status")
8831 (version "3.7")
8832 (source
8833 (origin
8834 (method url-fetch)
8835 (uri (pypi-uri "py3status" version))
8836 (sha256
8837 (base32
8838 "0shxcfz4wcczj0mhwp4w0dvwd2fdd9bgprq8slim1519iiqzgwhq"))))
8839 (build-system python-build-system)
8840 (inputs
8841 `(("file" ,file)))
8842 (arguments
8843 '(#:phases
8844 (modify-phases %standard-phases
8845 ;; 'file' is used for detection of configuration file encoding
8846 ;; let's make link the dependency to particular input
8847 (add-before 'build 'patch-file-path
8848 (lambda* (#:key inputs #:allow-other-keys)
8849 (let ((file-path (assoc-ref inputs "file")))
8850 (substitute* "py3status/parse_config.py"
8851 (("\\['file', '-b'")
8852 (string-append "['" file-path "/bin/file', '-b'")))
8853 #t))))
8854 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
8855 (home-page "https://github.com/ultrabug/py3status")
8856 (synopsis "Extensible i3status wrapper written in Python")
8857 (description "py3status is an i3status wrapper which extends i3status
8858functionality in a modular way, allowing you to extend your panel with your
8859own code, responding to click events and updating clock every second.")
8860 (license license:bsd-3)))
8861
8862(define-public python-tblib
8863 (package
8864 (name "python-tblib")
8865 (version "1.3.2")
8866 (source (origin
8867 (method url-fetch)
8868 (uri (pypi-uri "tblib" version))
8869 (sha256 (base32
8870 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
8871 (build-system python-build-system)
8872 (arguments
8873 `(#:phases
8874 (modify-phases %standard-phases
8875 (add-before 'check 'adjust-tests
8876 (lambda _
8877 (when (which "python3")
8878 ;; Adjust the example output to match that of Python 3.7:
8879 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
8880 (substitute* "README.rst"
8881 (("Exception\\('fail',") "Exception('fail'"))
8882 #t)))
8883 (replace 'check
8884 (lambda _
8885 ;; Upstream runs tests after installation and the package itself
8886 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
8887 ;; found.
8888 (setenv "PYTHONPATH"
8889 (string-append (getcwd) "/build/lib:"
8890 (getenv "PYTHONPATH")))
8891 (invoke "py.test" "-vv" "tests" "README.rst"))))))
8892 (native-inputs
8893 `(("python-pytest" ,python-pytest)
8894 ("python-six" ,python-six)))
8895 (home-page "https://github.com/ionelmc/python-tblib")
8896 (synopsis "Traceback serialization library")
8897 (description
8898 "Traceback serialization allows you to:
8899
8900@enumerate
8901@item Pickle tracebacks and raise exceptions with pickled tracebacks in
8902different processes. This allows better error handling when running code over
8903multiple processes (imagine multiprocessing, billiard, futures, celery etc).
8904
8905@item Parse traceback strings and raise with the parsed tracebacks.
8906@end enumerate\n")
8907 (license license:bsd-3)))
8908
8909(define-public python2-tblib
8910 (package-with-python2 python-tblib))
8911
8912(define-public python-greenlet
8913 (package
8914 (name "python-greenlet")
8915 (version "0.4.15")
8916 (source (origin
8917 (method url-fetch)
8918 (uri (pypi-uri "greenlet" version))
8919 (sha256
8920 (base32
8921 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
8922 (build-system python-build-system)
8923 (home-page "https://greenlet.readthedocs.io/")
8924 (synopsis "Lightweight in-process concurrent programming")
8925 (description
8926 "Greenlet package is a spin-off of Stackless, a version of CPython
8927that supports micro-threads called \"tasklets\". Tasklets run
8928pseudo-concurrently (typically in a single or a few OS-level threads) and
8929are synchronized with data exchanges on \"channels\".")
8930 (license (list license:psfl license:expat))))
8931
8932(define-public python2-greenlet
8933 (package-with-python2 python-greenlet))
8934
8935(define-public python-objgraph
8936 (package
8937 (name "python-objgraph")
8938 (version "3.4.0")
8939 (source
8940 (origin
8941 (method url-fetch)
8942 (uri (pypi-uri "objgraph" version))
8943 (sha256
8944 (base32
8945 "184m09am5gpbqfaiy7l0hwh476mczbrly1dffs0rw2p1d1i2q32a"))))
8946 (build-system python-build-system)
8947 (propagated-inputs
8948 `(("python-graphviz" ,python-graphviz)))
8949 (native-inputs
8950 `(("python-mock" ,python-mock)
8951 ("graphviz" ,graphviz)))
8952 (home-page "https://mg.pov.lt/objgraph/")
8953 (synopsis "Draw Python object reference graphs with graphviz")
8954 (description
8955 "This package provides tools to draw Python object reference graphs with
8956graphviz.")
8957 (license license:expat)))
8958
8959(define-public python-gevent
8960 (package
8961 (name "python-gevent")
8962 (version "1.3.7")
8963 (source (origin
8964 (method url-fetch)
8965 (uri (pypi-uri "gevent" version))
8966 (sha256
8967 (base32
8968 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
8969 (modules '((guix build utils)))
8970 (snippet
8971 '(begin
8972 ;; unbunding libev and c-ares
8973 (delete-file-recursively "deps")
8974 #t))))
8975 (build-system python-build-system)
8976 (arguments
8977 `(#:modules ((ice-9 ftw)
8978 (ice-9 match)
8979 (srfi srfi-26)
8980 (guix build utils)
8981 (guix build python-build-system))
8982 #:phases (modify-phases %standard-phases
8983 (add-after 'unpack 'unpack-libev
8984 (lambda* (#:key inputs #:allow-other-keys)
8985 (mkdir-p "deps/libev")
8986 ;; FIXME: gevent requires building libev, even though
8987 ;; it only links against the proper one.
8988 (invoke "tar" "-xf" (assoc-ref inputs "libev-source")
8989 "--strip-components=1" "-C" "deps/libev")))
8990 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
8991 (lambda _
8992 (substitute* "src/gevent/subprocess.py"
8993 (("/bin/sh") (which "sh")))
8994 (for-each (lambda (file)
8995 (substitute* file
8996 (("/bin/sh") (which "sh"))
8997 (("/bin/true") (which "true"))))
8998 (find-files "src/greentest" "\\.py$"))
8999 #t))
9000 (add-before 'build 'do-not-use-bundled-sources
9001 (lambda* (#:key inputs #:allow-other-keys)
9002 (setenv "CONFIG_SHELL" (which "bash"))
9003 (setenv "LIBEV_EMBED" "false")
9004 (setenv "CARES_EMBED" "false")
9005 (setenv "EMBED" "false")
9006
9007 (let ((greenlet (string-append
9008 (assoc-ref inputs "python-greenlet")
9009 "/include")))
9010 (match (scandir greenlet
9011 (lambda (item)
9012 (string-prefix? "python" item)))
9013 ((python)
9014 (setenv "CPATH"
9015 (string-append greenlet "/" python)))))
9016 #t))
9017 (add-before 'check 'skip-timer-test
9018 (lambda _
9019 ;; XXX: Skip 'TestTimerResolution', which appears to be
9020 ;; unreliable.
9021 (substitute* "src/greentest/test__core_timer.py"
9022 (("not greentest.RUNNING_ON_CI") "False"))
9023 #t))
9024 (replace 'check
9025 (lambda _
9026 ;; Make sure the build directory is on PYTHONPATH.
9027 (setenv "PYTHONPATH"
9028 (string-append
9029 (getenv "PYTHONPATH") ":"
9030 (getcwd) "/build/"
9031 (car (scandir "build" (cut string-prefix? "lib." <>)))))
9032 (with-directory-excursion "src/greentest"
9033 ;; XXX: Many tests require network access. Instead we only
9034 ;; run known-good tests. Unfortunately we cannot use
9035 ;; recursion here since this directory also contains
9036 ;; Python-version-specific subfolders.
9037 (apply invoke "python" "testrunner.py" "--config"
9038 "known_failures.py"
9039 (scandir "." (cut regexp-exec
9040 (make-regexp "test_+(subprocess|core)")
9041 <>)))))))))
9042 (propagated-inputs
9043 `(("python-greenlet" ,python-greenlet)
9044 ("python-objgraph" ,python-objgraph)))
9045 (native-inputs
9046 `(("libev-source" ,(package-source libev))
9047 ("python-six" ,python-six)))
9048 (inputs
9049 `(("c-ares" ,c-ares)
9050 ("libev" ,libev)))
9051 (home-page "http://www.gevent.org/")
9052 (synopsis "Coroutine-based network library")
9053 (description
9054 "gevent is a coroutine-based Python networking library that uses greenlet
9055to provide a high-level synchronous API on top of the libev event loop.")
9056 (license license:expat)
9057 (properties `((python2-variant . ,(delay python2-gevent))))))
9058
9059(define-public python2-gevent
9060 (let ((base (package-with-python2
9061 (strip-python2-variant python-gevent))))
9062 (package
9063 (inherit base)
9064 (native-inputs `(,@(package-native-inputs python-gevent)
9065 ("python-mock" ,python2-mock))))))
9066
9067(define-public python-fastimport
9068 (package
9069 (name "python-fastimport")
9070 (version "0.9.6")
9071 (source
9072 (origin
9073 (method url-fetch)
9074 (uri (pypi-uri "fastimport" version))
9075 (sha256
9076 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
9077 (build-system python-build-system)
9078 (home-page "https://github.com/jelmer/python-fastimport")
9079 (synopsis "VCS fastimport parser and generator in Python")
9080 (description "This package provides a parser for and generator of the Git
9081@url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
9082format.")
9083 (license license:gpl2+)))
9084
9085(define-public python2-fastimport
9086 (package-with-python2 python-fastimport))
9087
9088(define-public python-twisted
9089 (package
9090 (name "python-twisted")
9091 (version "17.1.0")
9092 (source (origin
9093 (method url-fetch)
9094 (uri (pypi-uri "Twisted" version ".tar.bz2"))
9095 (sha256
9096 (base32
9097 "1p245mg15hkxp7hy5cyq2fgvlgjkb4cg0gwkwd148nzy1bbi3wnv"))))
9098 (build-system python-build-system)
9099 (arguments
9100 '(#:tests? #f)) ; FIXME: Some tests are failing.
9101 ;; #:phases
9102 ;; (modify-phases %standard-phases
9103 ;; (replace 'check
9104 ;; (lambda _
9105 ;; (zero? (system* "./bin/trial" "twisted")))))
9106 (propagated-inputs
9107 `(("python-zope-interface" ,python-zope-interface)
9108 ("python-incremental" ,python-incremental)
9109 ("python-constantly" ,python-constantly)
9110 ("python-automat" ,python-automat)))
9111 (home-page "https://twistedmatrix.com/")
9112 (synopsis "Asynchronous networking framework written in Python")
9113 (description
9114 "Twisted is an extensible framework for Python programming, with special
9115focus on event-based network programming and multiprotocol integration.")
9116 (license license:expat)))
9117
9118(define-public python2-twisted
9119 (package-with-python2 python-twisted))
9120
9121(define-public python-pika
9122 (package
9123 (name "python-pika")
9124 (version "0.12.0")
9125 (source
9126 (origin
9127 (method url-fetch)
9128 (uri (pypi-uri "pika" version))
9129 (sha256
9130 (base32
9131 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
9132 (build-system python-build-system)
9133 (native-inputs
9134 `(("python-pyev" ,python-pyev)
9135 ("python-tornado" ,python-tornado)
9136 ("python-twisted" ,python-twisted)))
9137 (home-page "https://pika.readthedocs.org")
9138 (synopsis "Pure Python AMQP Client Library")
9139 (description
9140 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
9141Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
9142network support library.")
9143 (license license:bsd-3)))
9144
9145(define-public python2-pika
9146 (package-with-python2 python-pika))
9147
9148(define-public python-ply
9149 (package
9150 (name "python-ply")
9151 (version "3.10")
9152 (source
9153 (origin
9154 (method url-fetch)
9155 (uri (pypi-uri "ply" version))
9156 (sha256
9157 (base32
9158 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
9159 (build-system python-build-system)
9160 (home-page "http://www.dabeaz.com/ply/")
9161 (synopsis "Python Lex & Yacc")
9162 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
9163It uses LR parsing and does extensive error checking.")
9164 (license license:bsd-3)))
9165
9166(define-public python2-ply
9167 (package-with-python2 python-ply))
9168
9169(define-public python-tabulate
9170 (package
9171 (name "python-tabulate")
9172 (version "0.7.7")
9173 (source (origin
9174 (method url-fetch)
9175 (uri (pypi-uri "tabulate" version))
9176 (sha256
9177 (base32
9178 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
9179 (build-system python-build-system)
9180 (arguments
9181 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
9182 ;; and the latest release is not tagged in the upstream repository.
9183 '(#:tests? #f))
9184 (home-page "https://bitbucket.org/astanin/python-tabulate")
9185 (synopsis "Pretty-print tabular data")
9186 (description
9187 "Tabulate is a library and command-line utility to pretty-print tabular
9188data in Python.")
9189 (license license:expat)))
9190
9191(define-public python2-tabulate
9192 (package-with-python2 python-tabulate))
9193
9194(define-public python-kazoo
9195 (package
9196 (name "python-kazoo")
9197 (version "2.4.0")
9198 (source
9199 (origin
9200 (method url-fetch)
9201 (uri (pypi-uri "kazoo" version))
9202 (sha256
9203 (base32
9204 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
9205 (build-system python-build-system)
9206 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
9207 (propagated-inputs
9208 `(("python-six" ,python-six)))
9209 (home-page "https://kazoo.readthedocs.org")
9210 (synopsis "High-level Zookeeper client library")
9211 (description
9212 "Kazoo is a Python client library for the Apache Zookeeper distributed
9213application service. It is designed to be easy to use and to avoid common
9214programming errors.")
9215 (license license:asl2.0)))
9216
9217(define-public python2-kazoo
9218 (package-with-python2 python-kazoo))
9219
9220(define-public python-pykafka
9221 (package
9222 (name "python-pykafka")
9223 (version "2.4.0")
9224 (source (origin
9225 (method url-fetch)
9226 (uri (string-append
9227 "https://pypi.python.org/packages/8b/3e/"
9228 "384eeff406b06315738b62483fd2126c6e4f544167116b17cc04ea7d2a59/"
9229 "pykafka-" version ".tar.gz"))
9230 (sha256
9231 (base32
9232 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
9233 (build-system python-build-system)
9234 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
9235 (propagated-inputs
9236 `(("python-gevent" ,python-gevent)
9237 ("python-kazoo" ,python-kazoo)
9238 ("python-tabulate" ,python-tabulate)))
9239 (inputs
9240 `(("librdkafka" ,librdkafka)))
9241 (home-page "https://pykafka.readthedocs.io/")
9242 (synopsis "Apache Kafka client for Python")
9243 (description
9244 "PyKafka is a client for the Apache Kafka distributed messaging system.
9245It includes Python implementations of Kafka producers and consumers, which
9246are optionally backed by a C extension built on librdkafka.")
9247 (license license:asl2.0)))
9248
9249(define-public python2-pykafka
9250 (package-with-python2 python-pykafka))
9251
9252(define-public python-wcwidth
9253 (package
9254 (name "python-wcwidth")
9255 (version "0.1.7")
9256 (source
9257 (origin
9258 (method url-fetch)
9259 (uri (pypi-uri "wcwidth" version))
9260 (sha256
9261 (base32
9262 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
9263 (build-system python-build-system)
9264 (home-page "https://github.com/jquast/wcwidth")
9265 (synopsis "Measure number of terminal column cells of wide-character codes")
9266 (description "Wcwidth measures the number of terminal column cells of
9267wide-character codes. It is useful for those implementing a terminal emulator,
9268or programs that carefully produce output to be interpreted by one. It is a
9269Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
9270specified in POSIX.1-2001 and POSIX.1-2008.")
9271 (license license:expat)))
9272
9273(define-public python2-wcwidth
9274 (package-with-python2 python-wcwidth))
9275
9276(define-public python2-jsonrpclib
9277 (package
9278 (name "python2-jsonrpclib")
9279 (version "0.1.7")
9280 (source (origin
9281 (method url-fetch)
9282 (uri (string-append
9283 "https://pypi.python.org/packages/source/j/jsonrpclib/"
9284 "jsonrpclib-" version ".tar.gz"))
9285 (sha256
9286 (base32
9287 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
9288 (build-system python-build-system)
9289 (arguments
9290 `(#:tests? #f
9291 #:python ,python-2))
9292 (home-page "https://github.com/joshmarshall/jsonrpclib/")
9293 (synopsis "Implementation of JSON-RPC specification for Python")
9294 (description
9295 "This library is an implementation of the JSON-RPC specification.
9296It supports both the original 1.0 specification, as well as the
9297new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
9298etc.")
9299 (license license:asl2.0)))
9300
9301(define-public python-chai
9302 (package
9303 (name "python-chai")
9304 (version "1.1.2")
9305 (source (origin
9306 (method url-fetch)
9307 (uri (pypi-uri "chai" version))
9308 (sha256
9309 (base32
9310 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
9311 (build-system python-build-system)
9312 (home-page "https://github.com/agoragames/chai")
9313 (synopsis "Mocking framework for Python")
9314 (description
9315 "Chai provides an api for mocking, stubbing and spying your python
9316objects, patterned after the Mocha library for Ruby.")
9317 (license license:bsd-3)))
9318
9319(define-public python2-chai
9320 (package-with-python2 python-chai))
9321
9322(define-public python-inflection
9323 (package
9324 (name "python-inflection")
9325 (version "0.3.1")
9326 (source
9327 (origin (method url-fetch)
9328 (uri (pypi-uri "inflection" version))
9329 (sha256
9330 (base32
9331 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
9332 (build-system python-build-system)
9333 (native-inputs
9334 `(("python-pytest" ,python-pytest)))
9335 (home-page "https://github.com/jpvanhal/inflection")
9336 (synopsis "Python string transformation library")
9337 (description
9338 "Inflection is a string transformation library. It singularizes
9339and pluralizes English words, and transforms strings from CamelCase to
9340underscored string.")
9341 (license license:expat)))
9342
9343(define-public python2-inflection
9344 (package-with-python2 python-inflection))
9345
9346(define-public python-pylev
9347 (package
9348 (name "python-pylev")
9349 (version "1.3.0")
9350 (source (origin
9351 (method url-fetch)
9352 (uri (pypi-uri "pylev" version))
9353 (sha256
9354 (base32
9355 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
9356 (build-system python-build-system)
9357 (home-page "https://github.com/toastdriven/pylev")
9358 (synopsis "Levenshtein distance implementation in Python")
9359 (description "Pure Python Levenshtein implementation, based off the
9360Wikipedia code samples at
9361@url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
9362 (license license:bsd-3)))
9363
9364(define-public python2-pylev
9365 (package-with-python2 python-pylev))
9366
9367(define-public python-cleo
9368 (package
9369 (name "python-cleo")
9370 (version "0.6.1")
9371 (source (origin
9372 (method url-fetch)
9373 (uri (pypi-uri "cleo" version))
9374 (sha256
9375 (base32
9376 "0q1cf0szr0d54am4pypzwdnm74zpladdsinad94c2fz5i06fdpf7"))))
9377 (build-system python-build-system)
9378 (native-inputs
9379 `(;; For testing
9380 ("python-mock" ,python-mock)
9381 ("python-pytest-mock" ,python-pytest-mock)
9382 ("python-pytest" ,python-pytest)))
9383 (propagated-inputs
9384 `(("python-backpack" ,python-backpack)
9385 ("python-pastel" ,python-pastel)
9386 ("python-pylev" ,python-pylev)))
9387 (home-page "https://github.com/sdispater/cleo")
9388 (synopsis "Command-line arguments library for Python")
9389 (description
9390 "Cleo allows you to create command-line commands with signature in
9391docstring and colored output.")
9392 (license license:expat)))
9393
9394(define-public python2-cleo
9395 (package-with-python2 python-cleo))
9396
9397(define-public python-lazy-object-proxy
9398 (package
9399 (name "python-lazy-object-proxy")
9400 (version "1.3.1")
9401 (source (origin
9402 (method url-fetch)
9403 (uri (pypi-uri "lazy-object-proxy" version))
9404 (sha256
9405 (base32
9406 "0yha7q9bhw857fwaby785d63mffhngl9npwzlk9i0pwlkwvbx4gb"))))
9407 (build-system python-build-system)
9408 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
9409 (synopsis "Lazy object proxy for python")
9410 (description
9411 "Lazy object proxy is an object that wraps a callable but defers the call
9412until the object is actually required, and caches the result of said call.")
9413 (license license:bsd-2)))
9414
9415(define-public python2-lazy-object-proxy
9416 (package-with-python2 python-lazy-object-proxy))
9417
9418(define-public python-dnspython
9419 (package
9420 (name "python-dnspython")
9421 (version "1.15.0")
9422 (source (origin
9423 (method url-fetch)
9424 (uri (string-append "http://www.dnspython.org/kits/"
9425 version "/dnspython-" version ".tar.gz"))
9426 (sha256
9427 (base32
9428 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
9429 (build-system python-build-system)
9430 (arguments '(#:tests? #f)) ; XXX: requires internet access
9431 (home-page "http://www.dnspython.org")
9432 (synopsis "DNS toolkit for Python")
9433 (description
9434 "dnspython is a DNS toolkit for Python. It supports almost all record
9435types. It can be used for queries, zone transfers, and dynamic updates.
9436It supports TSIG authenticated messages and EDNS0.")
9437 (license license:expat)))
9438
9439(define-public python2-dnspython
9440 (package-with-python2 python-dnspython))
9441
9442(define-public python-email-validator
9443 (package
9444 (name "python-email-validator")
9445 (version "1.0.2")
9446 (source
9447 (origin (method url-fetch)
9448 (uri (pypi-uri "email_validator" version))
9449 (sha256
9450 (base32
9451 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
9452 (build-system python-build-system)
9453 (arguments
9454 '(#:phases
9455 (modify-phases %standard-phases
9456 (add-before 'build 'use-dnspython
9457 (lambda _
9458 (substitute* "setup.py"
9459 (("dnspython3") "dnspython"))
9460 #t)))))
9461 (propagated-inputs
9462 `(("python-dnspython" ,python-dnspython)
9463 ("python-idna" ,python-idna)))
9464 (home-page "https://github.com/JoshData/python-email-validator")
9465 (synopsis "Email address validation library for Python")
9466 (description
9467 "This library validates email address syntax and deliverability.")
9468 (license license:cc0)))
9469
9470(define-public python2-email-validator
9471 (package-with-python2 python-email-validator))
9472
9473(define-public python-ukpostcodeparser
9474 (package
9475 (name "python-ukpostcodeparser")
9476 (version "1.0.3")
9477 (source (origin
9478 (method url-fetch)
9479 (uri (pypi-uri "UkPostcodeParser" version))
9480 (sha256
9481 (base32
9482 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
9483 (build-system python-build-system)
9484 (home-page "https://github.com/hamstah/ukpostcodeparser")
9485 (synopsis "UK Postcode parser for Python")
9486 (description
9487 "This library provides the @code{parse_uk_postcode} function for
9488parsing UK postcodes.")
9489 (license license:expat)))
9490
9491(define-public python2-ukpostcodeparser
9492 (package-with-python2 python-ukpostcodeparser))
9493
9494(define-public python-faker
9495 (package
9496 (name "python-faker")
9497 (version "0.7.9")
9498 (source (origin
9499 (method url-fetch)
9500 (uri (pypi-uri "Faker" version))
9501 (sha256
9502 (base32
9503 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
9504 (patches
9505 (search-patches "python-faker-fix-build-32bit.patch"))
9506 (modules '((guix build utils)))
9507 (snippet
9508 '(begin
9509 (for-each delete-file (find-files "." "\\.pyc$"))
9510 #t))))
9511 (build-system python-build-system)
9512 (arguments
9513 '(#:phases
9514 (modify-phases %standard-phases
9515 (replace 'check
49ff8827 9516 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
44d10b1f
RW
9517 (native-inputs
9518 `(;; For testing
9519 ("python-email-validator" ,python-email-validator)
9520 ("python-mock" ,python-mock)
9521 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
9522 (propagated-inputs
9523 `(("python-dateutil" ,python-dateutil)
9524 ("python-six" ,python-six)))
9525 (home-page "https://github.com/joke2k/faker")
9526 (synopsis "Python package that generates fake data")
9527 (description
9528 "Faker is a Python package that generates fake data such as names,
9529addresses, and phone numbers.")
9530 (license license:expat)
9531 (properties `((python2-variant . ,(delay python2-faker))))))
9532
9533(define-public python2-faker
9534 (let ((base (package-with-python2 (strip-python2-variant
9535 python-faker))))
9536 (package
9537 (inherit base)
9538 (propagated-inputs
9539 `(("python2-ipaddress" ,python2-ipaddress)
9540 ,@(package-propagated-inputs base))))))
9541
9542(define-public python-pyaml
9543 (package
9544 (name "python-pyaml")
9545 (version "18.11.0")
9546 (source (origin
9547 (method url-fetch)
9548 (uri (pypi-uri "pyaml" version))
9549 (sha256
9550 (base32
9551 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
9552 (build-system python-build-system)
9553 (native-inputs
9554 `(("python-unidecode" ,python-unidecode)))
9555 (propagated-inputs
9556 `(("python-pyyaml" ,python-pyyaml)))
9557 (home-page "https://github.com/mk-fg/pretty-yaml")
9558 (synopsis "YAML pretty-print library for Python")
9559 (description
9560 "pyaml is a PyYAML based python module to produce pretty and readable
9561YAML-serialized data.")
9562 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
9563
9564(define-public python2-pyaml
9565 (package-with-python2 python-pyaml))
9566
9567(define-public python-backpack
9568 (package
9569 (name "python-backpack")
9570 (version "0.1")
9571 (source
9572 (origin
9573 (method url-fetch)
9574 (uri (pypi-uri "backpack" version))
9575 (sha256
9576 (base32
9577 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
9578 (build-system python-build-system)
9579 (native-inputs
9580 `(("python-pytest" ,python-pytest)
9581 ("python-nose" ,python-nose)))
9582 (propagated-inputs
9583 `(("python-simplejson" ,python-simplejson)))
9584 (home-page "https://github.com/sdispater/backpack")
9585 (synopsis "Utilities for working with Python collections")
9586 (description "Backpack provides some useful utilities for working with
9587collections of data.")
9588 (license license:expat)))
9589
9590(define-public python2-backpack
9591 (package-with-python2 python-backpack))
9592
9593(define-public python-prompt-toolkit
9594 (package
9595 (name "python-prompt-toolkit")
9596 (version "2.0.7")
9597 (source
9598 (origin
9599 (method url-fetch)
9600 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
9601 (sha256
9602 (base32
9603 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
9604 (build-system python-build-system)
9605 (arguments
9606 `(#:phases
9607 (modify-phases %standard-phases
9608 (delete 'check)
9609 (add-after 'install 'post-install-check
9610 (lambda* (#:key inputs outputs #:allow-other-keys)
9611 ;; HOME is needed for the test
9612 ;; "test_pathcompleter_can_expanduser".
9613 (setenv "HOME" "/tmp")
9614 (add-installed-pythonpath inputs outputs)
9615 (invoke "py.test"))))))
9616 (propagated-inputs
9617 `(("python-wcwidth" ,python-wcwidth)
9618 ("python-six" ,python-six)
9619 ("python-pygments" ,python-pygments)))
9620 (native-inputs
9621 `(("python-pytest" ,python-pytest)))
9622 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
9623 (synopsis "Library for building command line interfaces in Python")
9624 (description
9625 "Prompt-Toolkit is a library for building interactive command line
9626interfaces in Python. It's like GNU Readline but it also features syntax
9627highlighting while typing, out-of-the-box multi-line input editing, advanced
9628code completion, incremental search, support for Chinese double-width
9629characters, mouse support, and auto suggestions.")
9630 (license license:bsd-3)))
9631
9632(define-public python2-prompt-toolkit
9633 (package-with-python2 python-prompt-toolkit))
9634
9635(define-public python-prompt-toolkit-1
9636 (package (inherit python-prompt-toolkit)
9637 (version "1.0.15")
9638 (source
9639 (origin
9640 (method url-fetch)
9641 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
9642 (sha256
9643 (base32
9644 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
9645
9646(define-public python2-prompt-toolkit-1
9647 (package-with-python2 python-prompt-toolkit-1))
9648
9649(define-public python-jedi
9650 (package
9651 (name "python-jedi")
40bd0aa3 9652 (version "0.13.2")
44d10b1f
RW
9653 (source
9654 (origin
9655 (method url-fetch)
9656 (uri (pypi-uri "jedi" version))
9657 (sha256
9658 (base32
40bd0aa3 9659 "1za944msp0f8x36qa8l309jhv0kzlsdh7r9nj3z12y8npnsh45sp"))))
44d10b1f
RW
9660 (build-system python-build-system)
9661 (arguments
40bd0aa3 9662 `( ;; Many tests are failing with Python 3.7.x as of version 0.13.2 (see:
44d10b1f
RW
9663 ;; https://github.com/davidhalter/jedi/issues/1263)
9664 #:tests? #f
9665 #:phases
9666 (modify-phases %standard-phases
9667 (replace 'check
9668 (lambda* (#:key tests? #:allow-other-keys)
9669 (when tests?
9670 (invoke "py.test" "-vv")))))))
9671 (native-inputs
9672 `(("python-pytest" ,python-pytest)
9673 ("python-docopt" ,python-docopt)))
9674 (propagated-inputs
9675 `(("python-parso" ,python-parso)))
9676 (home-page "https://github.com/davidhalter/jedi")
9677 (synopsis "Autocompletion and static analysis library for Python")
9678 (description
9679 "Jedi is a static analysis tool for Python that can be used in Integrated
9680Development Environments (@dfn{IDE}s) and text editors. It understands Python
9681on a deeper level than many other static analysis frameworks for Python.
9682
9683Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
9684well.")
9685 (license license:expat)))
9686
9687(define-public python2-jedi
9688 (package-with-python2 python-jedi))
9689
9690(define-public ptpython
9691 (package
9692 (name "ptpython")
9693 (version "0.34")
9694 (source (origin
9695 (method url-fetch)
9696 (uri (pypi-uri "ptpython" version))
9697 (sha256
9698 (base32
9699 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
9700 (build-system python-build-system)
9701 (arguments
9702 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
9703 (propagated-inputs
9704 `(("python-docopt" ,python-docopt)
9705 ("python-jedi" ,python-jedi)
9706 ("python-prompt-toolkit" ,python-prompt-toolkit)
9707 ("python-pygments" ,python-pygments)))
9708 (home-page "https://github.com/jonathanslenders/ptpython")
9709 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
9710 (description
9711 "ptpython is a Python read-eval-print loop with IDE-like features.
9712It supports syntax highlighting, multiline editing, autocompletion, mouse,
9713color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
9714etc.")
9715 (license license:bsd-3)
9716 (properties `((python2-variant . ,(delay ptpython-2))))))
9717
9718(define-public ptpython-2
9719 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
9720 (package
9721 (inherit base)
9722 (name "ptpython2"))))
9723
9724(define-public python-stem
9725 (package
9726 (name "python-stem")
9727 (version "1.7.0")
9728 (source
9729 (origin
9730 (method url-fetch)
9731 (uri (pypi-uri "stem" version))
9732 (sha256
9733 (base32
9734 "1awiglfiajnx2hva9aqpj3fmdvdb4qg7cwnlfyih827m68y3cq8v"))))
9735 (build-system python-build-system)
9736 (arguments
9737 `(#:phases
9738 (modify-phases %standard-phases
9739 (replace 'check
9740 (lambda _
9741 (invoke "./run_tests.py" "--unit")
9742 #t)))))
9743 (native-inputs
9744 `(("python-mock" ,python-mock)
9745 ("python-pycodestyle" ,python-pycodestyle)
9746 ("python-pyflakes" ,python-pyflakes)))
9747 (home-page "https://stem.torproject.org/")
9748 (synopsis
9749 "Python controller library that allows applications to interact with Tor")
9750 (description
9751 "Stem is a Python controller library for Tor. With it you can use Tor's
9752control protocol to script against the Tor process and read descriptor data
9753relays publish about themselves.")
9754 (license license:lgpl3)))
9755
9756(define-public python2-stem
9757 (package-with-python2 python-stem))
9758
9759(define-public python-pyserial
9760 (package
9761 (name "python-pyserial")
9762 (version "3.1.1")
9763 (source
9764 (origin
9765 (method url-fetch)
9766 (uri (pypi-uri "pyserial" version))
9767 (sha256
9768 (base32
9769 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
9770 (build-system python-build-system)
9771 (arguments
9772 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
9773 ;; #:phases
9774 ;; (modify-phases %standard-phases
9775 ;; (replace 'check
9776 ;; (lambda _
9777 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
9778 (home-page
9779 "https://github.com/pyserial/pyserial")
9780 (synopsis "Python Serial Port Bindings")
9781 (description "@code{pyserial} provide serial port bindings for Python. It
9782supports different byte sizes, stop bits, parity and flow control with RTS/CTS
9783and/or Xon/Xoff. The port is accessed in RAW mode.")
9784 (license license:bsd-3)))
9785
9786(define-public python2-pyserial
9787 (package-with-python2 python-pyserial))
9788
9789(define-public python-kivy
9790 (package
9791 (name "python-kivy")
9792 (version "1.10.1")
9793 (source
9794 (origin
9795 (method url-fetch)
9796 (uri (pypi-uri "Kivy" version))
9797 (file-name (string-append name "-" version ".tar.gz"))
9798 (sha256
9799 (base32
9800 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
9801 (build-system python-build-system)
9802 (arguments
9803 `(#:tests? #f ; Tests require many optional packages
9804 #:phases
9805 (modify-phases %standard-phases
9806 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
9807 (lambda* (#:key inputs #:allow-other-keys)
9808 (setenv "KIVY_SDL2_PATH"
9809 (string-append (assoc-ref inputs "sdl-union")
9810 "/include/SDL2"))
9811 #t)))))
9812 (native-inputs
9813 `(("git" ,git)
9814 ("pkg-config" ,pkg-config)
9815 ("python-cython" ,python-cython)))
9816 (inputs
9817 `(("gstreamer" ,gstreamer)
9818 ("mesa" ,mesa)
9819 ("sdl-union"
9820 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
9821 (home-page "http://kivy.org")
9822 (synopsis
9823 "Multitouch application framework")
9824 (description
9825 "A software library for rapid development of
9826hardware-accelerated multitouch applications.")
9827 (license license:expat)))
9828
9829(define-public python2-kivy
9830 (package-with-python2 python-kivy))
9831
9832(define-public python-kivy-next
9833 (deprecated-package "python-kivy-next" python-kivy))
9834
9835(define-public python2-kivy-next
9836 (deprecated-package "python2-kivy-next" python2-kivy))
9837
9838(define-public python-binaryornot
9839 (package
9840 (name "python-binaryornot")
9841 (version "0.4.4")
9842 (source (origin
9843 (method url-fetch)
9844 (uri (pypi-uri "binaryornot" version))
9845 (sha256
9846 (base32
9847 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
9848 (build-system python-build-system)
9849 (propagated-inputs
9850 `(("python-chardet" ,python-chardet)
9851 ("python-hypothesis" ,python-hypothesis)))
9852 (home-page "https://github.com/audreyr/binaryornot")
9853 (synopsis "Package to check if a file is binary or text")
9854 (description "Ultra-lightweight pure Python package to check if a file is
9855binary or text.")
9856 (license license:bsd-3)
9857 (properties `((python2-variant . ,(delay python2-binaryornot))))))
9858
9859(define-public python2-binaryornot
9860 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
9861 (package (inherit base)
9862 (propagated-inputs
9863 `(("python2-enum34" ,python2-enum34)
9864 ,@(package-propagated-inputs base))))))
9865
9866(define-public python-nltk
9867 (package
9868 (name "python-nltk")
9869 (version "3.2.1")
9870 (source (origin
9871 (method url-fetch)
9872 (uri (pypi-uri "nltk" version))
9873 (sha256
9874 (base32
9875 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
9876 (build-system python-build-system)
9877 (arguments
9878 '(;; The tests require some extra resources to be downloaded.
9879 ;; TODO Try packaging these resources.
9880 #:tests? #f))
9881 (home-page "http://nltk.org/")
9882 (synopsis "Natural Language Toolkit")
9883 (description "It provides interfaces to over 50 corpora and lexical
9884resources such as WordNet, along with a suite of text processing libraries
9885for classification, tokenization, stemming, tagging, parsing, and semantic
9886reasoning, wrappers for natural language processing libraries.")
9887 (license license:asl2.0)))
9888
9889(define-public python2-nltk
9890 (package-with-python2 python-nltk))
9891
9892(define-public python-pymongo
9893 (package
9894 (name "python-pymongo")
9895 (version "3.7.2")
9896 (source (origin
9897 (method url-fetch)
9898 (uri (pypi-uri "pymongo" version))
9899 (sha256
9900 (base32
9901 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
9902 (build-system python-build-system)
9903 (propagated-inputs
9904 `(("python-certifi" ,python-certifi)))
9905 (home-page "https://github.com/mongodb/mongo-python-driver")
9906 (synopsis "Python driver for MongoDB")
9907 (description "Python driver for MongoDB.")
9908 (license license:asl2.0)))
9909
9910(define-public python2-pymongo
9911 (package-with-python2 python-pymongo))
9912
9913(define-public python-sh
9914 (package
9915 (name "python-sh")
9916 (version "1.11")
9917 (source (origin
9918 (method url-fetch)
9919 (uri (pypi-uri "sh" version))
9920 (sha256
9921 (base32
9922 "192r0mpv6dmkysjzhc43ddffiwb5g7c76bgr1mb1z2xz9awbj3sr"))))
9923 (build-system python-build-system)
9924 (arguments
9925 `(#:tests? #f)) ; no tests
9926 (home-page "https://github.com/amoffat/sh")
9927 (synopsis "Python subprocess interface")
9928 (description "Abstracts process invocation by providing a function
9929interface for programs.")
9930 (license license:expat)))
9931
9932(define-public python2-sh
9933 (package-with-python2 python-sh))
9934
9935(define-public python-consul
9936 (package
9937 (name "python-consul")
9938 (version "0.6.1")
9939 (source
9940 (origin
9941 (method url-fetch)
9942 (uri (pypi-uri "python-consul" version))
9943 (sha256
9944 (base32
9945 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
9946 (build-system python-build-system)
9947 (arguments
9948 '(#:tests? #f)) ; The tests are not distributed
9949 (propagated-inputs
9950 `(("python-requests" ,python-requests)
9951 ("python-six" ,python-six)))
9952 (home-page "https://github.com/cablehead/python-consul")
9953 (synopsis "Python client for Consul")
9954 (description
9955 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
9956discovery, monitoring and configuration.")
9957 (license license:expat)))
9958
9959(define-public python2-consul
9960 (package-with-python2 python-consul))
9961
9962(define-public python-schematics
9963 (package
9964 (name "python-schematics")
9965 (version "1.1.1")
9966 (source
9967 (origin
9968 (method url-fetch)
9969 (uri (string-append
9970 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
9971 (file-name (string-append name "-" version ".tar.gz"))
9972 (sha256
9973 (base32
9974 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
9975 (build-system python-build-system)
9976 (propagated-inputs
9977 `(("python-six" ,python-six)))
9978 (arguments
9979 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
9980 ; version requirements (eg python-coveralls)
9981 (home-page "https://github.com/schematics/schematics")
9982 (synopsis "Python Data Structures for Humans")
9983 (description "Python Data Structures for Humans.")
9984 (license license:bsd-3)))
9985
9986(define-public python2-schematics
9987 (package-with-python2 python-schematics))
9988
9989(define-public python-odfpy
9990 (package
9991 (name "python-odfpy")
9992 (version "1.3.3")
9993 (source (origin
9994 (method url-fetch)
9995 (uri (pypi-uri "odfpy" version))
9996 (sha256
9997 (base32
9998 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
9999 (arguments
10000 `(#:modules ((srfi srfi-1)
10001 (guix build python-build-system)
10002 (guix build utils))
10003 #:phases
10004 (modify-phases %standard-phases
10005 (replace 'check
10006 ;; The test runner invokes python2 and python3 for test*.py.
10007 ;; To avoid having both in inputs, we replicate it here.
10008 (lambda _
21ccc01d
RW
10009 (for-each (lambda (test-file) (invoke "python" test-file))
10010 (find-files "tests" "^test.*\\.py$"))
10011 #t)))))
44d10b1f
RW
10012 (build-system python-build-system)
10013 (home-page "https://github.com/eea/odfpy")
10014 (synopsis "Python API and tools to manipulate OpenDocument files")
10015 (description "Collection of libraries and utility programs written in
10016Python to manipulate OpenDocument 1.2 files.")
10017 (license
10018 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
10019 ;; number of files with other licenses.
10020 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
10021
10022(define-public python2-odfpy
10023 (package-with-python2 python-odfpy))
10024
10025(define-public python-natsort
10026 (package
10027 (name "python-natsort")
10028 (version "5.4.1")
10029 (source (origin
10030 (method url-fetch)
10031 (uri (pypi-uri "natsort" version))
10032 (sha256
10033 (base32
10034 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
10035 (build-system python-build-system)
10036 (arguments
10037 `(#:modules ((guix build utils)
10038 (guix build python-build-system)
10039 (srfi srfi-1)
10040 (srfi srfi-26)
10041 (ice-9 ftw))
10042 #:phases
10043 (modify-phases %standard-phases
10044 (add-before 'check 'set-cachedir
10045 ;; Tests require write access to $HOME by default
10046 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
10047 (replace 'check
10048 (lambda _
10049 (let ((cwd (getcwd)))
10050 (setenv "PYTHONPATH"
10051 (string-append
10052 cwd "/build/"
10053 (find (cut string-prefix? "lib" <>)
10054 (scandir (string-append cwd "/build")))
10055 ":"
10056 (getenv "PYTHONPATH")))
10057 (invoke "pytest" "-v")))))))
10058 (native-inputs
10059 `(("python-hypothesis" ,python-hypothesis)
10060 ("python-pytest-cov" ,python-pytest-cov)
10061 ("python-pytest-mock" ,python-pytest-mock)
10062 ("python-pytest" ,python-pytest)))
10063 (propagated-inputs ; TODO: Add python-fastnumbers.
10064 `(("python-pyicu" ,python-pyicu)))
10065 (home-page "https://github.com/SethMMorton/natsort")
10066 (synopsis "Natural sorting for python and shell")
10067 (description
10068 "Natsort lets you apply natural sorting on lists instead of
10069lexicographical. If you use the built-in @code{sorted} method in python
10070on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
10071returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
10072function @code{natsorted} that identifies numbers and sorts them separately
10073from strings. It can also sort version numbers, real numbers, mixed types
10074and more, and comes with a shell command @command{natsort} that exposes this
10075functionality in the command line.")
10076 (license license:expat)
10077 (properties `((python2-variant . ,(delay python2-natsort))))))
10078
10079(define-public python2-natsort
10080 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
10081 (package (inherit base)
10082 (native-inputs
10083 `(("python2-pathlib" ,python2-pathlib)
10084 ,@(package-native-inputs base))))))
10085
10086(define-public python-glances
10087 (package
10088 (name "python-glances")
10089 (version "3.0.2")
10090 (source
10091 (origin
10092 (method url-fetch)
10093 (uri (pypi-uri "Glances" version))
10094 (sha256
10095 (base32
10096 "09fxysfp1n16csqvzvawy74qm6a94nvwjf3vcf5gkqp4i6k4vjjy"))))
10097 (build-system python-build-system)
10098 (propagated-inputs
10099 `(("python-psutil" ,python-psutil)))
10100 (home-page
10101 "https://github.com/nicolargo/glances")
10102 (synopsis
10103 "A cross-platform curses-based monitoring tool")
10104 (description
10105 "Glances is a curses-based monitoring tool for a wide variety of platforms.
10106Glances uses the PsUtil library to get information from your system. It monitors
10107CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
10108 (license license:lgpl3+)))
10109
10110(define-public python2-glances
10111 (package-with-python2 python-glances))
10112
10113(define-public python-graphql-core
10114 (package
10115 (name "python-graphql-core")
10116 (version "0.5.3")
10117 (source
10118 (origin
10119 (method url-fetch)
10120 (uri (pypi-uri "graphql-core" version))
10121 (sha256
10122 (base32
10123 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
10124 (build-system python-build-system)
10125 (arguments
10126 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
10127 #:phases
10128 (modify-phases %standard-phases
10129 (add-after 'unpack 'patch-hardcoded-version
10130 (lambda _ (substitute*
10131 "setup.py"
10132 (("'gevent==1.1rc1'") "'gevent'"))
10133 #t)))))
10134 (native-inputs
10135 `(("python-gevent" ,python-gevent)
10136 ("python-mock" ,python-mock)
10137 ("python-pytest-mock" ,python-pytest-mock)))
10138 (propagated-inputs
10139 `(("python-promise" ,python-promise)
10140 ("python-six" ,python-six)))
10141 (home-page "https://github.com/graphql-python/graphql-core")
10142 (synopsis "GraphQL implementation for Python")
10143 (description
10144 "GraphQL implementation for Python. GraphQL is a data query language and
10145runtime designed and used to request and deliver data to mobile and web apps.
10146This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
10147to Python.")
10148 (license license:expat)))
10149
10150(define-public python2-graphql-core
10151 (package-with-python2 python-graphql-core))
10152
10153(define-public python-graphql-relay
10154 (package
10155 (name "python-graphql-relay")
10156 (version "0.4.5")
10157 (source
10158 (origin
10159 (method url-fetch)
10160 (uri (pypi-uri "graphql-relay" version))
10161 (sha256
10162 (base32
10163 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
10164 (build-system python-build-system)
10165 (arguments
10166 '(#:tests? #f)) ; The tests are not distributed
10167 (propagated-inputs
10168 `(("python-graphql-core" ,python-graphql-core)
10169 ("python-promise" ,python-promise)
10170 ("python-six" ,python-six)))
10171 (home-page "https://github.com/graphql-python/graphql-relay-py")
10172 (synopsis "Relay implementation for Python")
10173 (description
10174 "This is a library to allow the easy creation of Relay-compliant servers
10175using the GraphQL Python reference implementation of a GraphQL server. It
10176should be noted that the code is a exact port of the original
10177@url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
10178from Facebook.")
10179 (license license:expat)))
10180
10181(define-public python2-graphql-relay
10182 (package-with-python2 python-graphql-relay))
10183
10184(define-public python-graphene
10185 (package
10186 (name "python-graphene")
10187 (version "0.10.2")
10188 (source
10189 (origin
10190 (method url-fetch)
10191 (uri (pypi-uri "graphene" version))
10192 (sha256
10193 (base32
10194 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
10195 (build-system python-build-system)
10196 (propagated-inputs
10197 `(("python-graphql-core" ,python-graphql-core)
10198 ("python-graphql-relay" ,python-graphql-relay)
10199 ("python-iso8601" ,python-iso8601)
10200 ("python-promise" ,python-promise)
10201 ("python-six" ,python-six)))
10202 (arguments
10203 `(#:tests? #f)) ; no tests/ in the PyPI tarball
10204 (home-page "http://graphene-python.org/")
10205 (synopsis "GraphQL Framework for Python")
10206 (description
10207 "Graphene is a Python library for building GraphQL schemas/types.
10208A GraphQL schema describes your data model, and provides a GraphQL server
10209with an associated set of resolve methods that know how to fetch data.")
10210 (properties `((python2-variant . ,(delay python2-graphene))))
10211 (license license:expat)))
10212
10213(define-public python2-graphene
10214 (let ((base (package-with-python2
10215 (strip-python2-variant python-graphene))))
10216 (package (inherit base)
10217 (native-inputs
10218 `(("python2-sqlalchemy" ,python2-sqlalchemy)
10219 ,@(package-native-inputs base))))))
10220
10221(define-public python-nautilus
10222 (package
10223 (name "python-nautilus")
10224 (version "0.4.9")
10225 (source
10226 (origin
10227 (method url-fetch)
10228 (uri (pypi-uri "nautilus" version))
10229 (sha256
10230 (base32
10231 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
10232 (build-system python-build-system)
10233 (arguments `(#:tests? #f)) ; fails to import test modules
10234 (propagated-inputs
10235 `(("python-bcrypt" ,python-bcrypt)
10236 ("python-click" ,python-click)
10237 ("python-consul" ,python-consul)
10238 ("python-graphene" ,python-graphene)
10239 ("python-jinja2" ,python-jinja2)
10240 ("python-peewee" ,python-peewee)
10241 ("python-pika" ,python-pika)
10242 ("python-tornado" ,python-tornado)
10243 ("python-wtforms" ,python-wtforms)))
10244 (native-inputs
10245 `(("python-nose2" ,python-nose2)))
10246 (home-page "https://github.com/AlecAivazis/nautilus")
10247 (synopsis "Library for creating microservice applications")
10248 (description
10249 "Nautilus is a framework for flux based microservices that looks to
10250provide extendible implementations of common aspects of a cloud so that you can
10251focus on building massively scalable web applications.")
10252 (license license:expat)))
10253
10254(define-public python-snowballstemmer
10255 (package
10256 (name "python-snowballstemmer")
10257 (version "1.2.1")
10258 (source (origin
10259 (method url-fetch)
10260 (uri (pypi-uri "snowballstemmer" version))
10261 (sha256
10262 (base32
10263 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
10264 (build-system python-build-system)
10265 (arguments
10266 `(;; No tests exist
10267 #:tests? #f))
10268 (home-page "https://github.com/shibukawa/snowball_py")
10269 (synopsis "Snowball stemming library collection for Python")
10270 (description "This package provides 16 word stemmer algorithms generated
10271from Snowball algorithms. It includes the 15 original ones plus the Poerter
10272English stemmer.")
10273 (license license:bsd-3)))
10274
10275(define-public python2-snowballstemmer
10276 (package-with-python2 python-snowballstemmer))
10277
10278(define-public python-sphinx-cloud-sptheme
10279 (package
10280 (name "python-sphinx-cloud-sptheme")
10281 (version "1.8.0")
10282 (source (origin
10283 (method url-fetch)
10284 (uri (pypi-uri "cloud_sptheme" version))
10285 (sha256
10286 (base32
10287 "1dniqb6a39yh786f86c4jn666rwnyi1jvzn4616zhcchb7sfdshd"))))
10288 (build-system python-build-system)
10289 ;; FIXME: The 'pypi' release archive does not contain tests.
10290 (arguments '(#:tests? #f))
10291 (native-inputs
10292 `(("python-sphinx" ,python-sphinx)))
10293 (home-page "https://bitbucket.org/ecollins/cloud_sptheme")
10294 (synopsis "'Cloud' theme for Sphinx documenter")
10295 (description "This package contains the \"Cloud\" theme for Sphinx and some
10296related extensions.")
10297 (license license:bsd-3)))
10298
10299(define-public python2-sphinx-cloud-sptheme
10300 (package-with-python2 python-sphinx-cloud-sptheme))
10301
10302(define-public python-sphinx-alabaster-theme
10303 (package
10304 (name "python-sphinx-alabaster-theme")
10305 (version "0.7.12")
10306 (source (origin
10307 (method url-fetch)
10308 (uri (pypi-uri "alabaster" version))
10309 (sha256
10310 (base32
10311 "00nwwjj2d2ym4s2kk217x7jkx1hnczc3fvm8yxbqmsp6b0nxfqd6"))))
10312 (build-system python-build-system)
10313 (propagated-inputs
10314 `(("python-pygments" ,python-pygments)))
10315 (home-page "https://alabaster.readthedocs.io/")
10316 (synopsis "Configurable sidebar-enabled Sphinx theme")
10317 (description "Alabaster is a visually (c)lean, responsive, configurable
10318theme for the Sphinx documentation system. It's the default theme of Sphinx.")
10319 (license license:bsd-3)))
10320
10321(define-public python2-sphinx-alabaster-theme
10322 (package-with-python2 python-sphinx-alabaster-theme))
10323
10324(define-public python-setproctitle
10325(package
10326 (name "python-setproctitle")
10327 (version "1.1.10")
10328 (source
10329 (origin
10330 (method url-fetch)
10331 (uri (pypi-uri "setproctitle" version))
10332 (sha256
10333 (base32
10334 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
10335 (build-system python-build-system)
10336 (arguments
10337 '(#:phases
10338 (modify-phases %standard-phases
10339 (add-before 'check 'patch-Makefile
10340 ;; Stricly this is only required for the python2 variant.
10341 ;; But adding a phase in an inherited package seems to be
10342 ;; cumbersum. So we patch even for python3.
10343 (lambda _
10344 (let ((nose (assoc-ref %build-inputs "python2-nose")))
10345 (when nose
10346 (substitute* "Makefile"
10347 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
10348 (string-append nose "/bin/nosetests "))))
10349 #t)))
10350 (replace 'check
10351 (lambda _
10352 (setenv "PYTHON" (or (which "python3") (which "python")))
10353 (setenv "PYCONFIG" (or (which "python3-config")
10354 (which "python-config")))
10355 (setenv "CC" "gcc")
10356 ;; No need to extend PYTHONPATH to find the built package, since
10357 ;; the Makefile will build anyway
10358 (invoke "make" "check"))))))
10359 (native-inputs
10360 `(("procps" ,procps))) ; required for tests
10361 (home-page
10362 "https://github.com/dvarrazzo/py-setproctitle")
10363 (synopsis
10364 "Setproctitle implementation for Python to customize the process title")
10365 (description "The library allows a process to change its title (as displayed
10366by system tools such as ps and top).
10367
10368Changing the title is mostly useful in multi-process systems, for
10369example when a master process is forked: changing the children's title
10370allows to identify the task each process is busy with. The technique
10371is used by PostgreSQL and the OpenSSH Server for example.")
10372 (license license:bsd-3)
10373 (properties `((python2-variant . ,(delay python2-setproctitle))))))
10374
10375(define-public python2-setproctitle
10376 (let ((base (package-with-python2
10377 (strip-python2-variant python-setproctitle))))
10378 (package
10379 (inherit base)
10380 (native-inputs `(("python2-nose" ,python2-nose)
10381 ,@(package-native-inputs base))))))
10382
10383(define-public python-validictory
10384 (package
10385 (name "python-validictory")
10386 (version "1.0.1")
10387 (source
10388 (origin
10389 (method url-fetch)
10390 (uri (pypi-uri "validictory" version))
10391 (sha256
10392 (base32
10393 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
10394 (build-system python-build-system)
10395 (arguments
10396 '(#:phases
10397 (modify-phases %standard-phases
10398 (add-after 'unpack 'bootstrap
10399 ;; Move the tests out of the package directory to avoid
10400 ;; packaging them.
10401 (lambda* _
10402 (rename-file "validictory/tests" "tests")
10403 (delete-file "tests/__init__.py")))
10404 (replace 'check
10405 (lambda _
10406 ;; Extend PYTHONPATH so the built package will be found.
10407 (setenv "PYTHONPATH"
10408 (string-append (getcwd) "/build/lib:"
10409 (getenv "PYTHONPATH")))
6568bd5d 10410 (invoke "py.test" "-vv" ))))))
44d10b1f
RW
10411 (native-inputs
10412 `(("python-pytest" ,python-pytest)))
10413 (home-page
10414 "https://github.com/jamesturk/validictory")
10415 (synopsis "General purpose Python data validator")
10416 (description "It allows validation of arbitrary Python data structures.
10417
10418The schema format is based on the JSON Schema
10419proposal (http://json-schema.org), so combined with json the library is also
10420useful as a validator for JSON data.")
10421 (license license:expat)))
10422
10423(define-public python2-validictory
10424 (package-with-python2 python-validictory))
10425
10426(define-public python-pyelftools
10427 (package
10428 (name "python-pyelftools")
10429 (version "0.25")
10430 (source
10431 (origin
10432 (method url-fetch)
10433 (uri (pypi-uri "pyelftools" version))
10434 (sha256
10435 (base32
10436 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
10437 (build-system python-build-system)
10438 (arguments
10439 `(#:phases
10440 (modify-phases %standard-phases
10441 (add-before 'check 'set-pythonpath
10442 (lambda _
10443 (setenv "PYTHONPATH"
10444 (string-append
10445 (getcwd) "/test/"
10446 ":" (getenv "PYTHONPATH")))
10447 #t)))))
10448 (home-page
10449 "https://github.com/eliben/pyelftools")
10450 (synopsis
10451 "Analyze binary and library file information")
10452 (description "This Python library provides interfaces for parsing and
10453analyzing two binary and library file formats; the Executable and Linking
10454Format (ELF), and debugging information in the Debugging With Attributed
10455Record Format (DWARF).")
10456 (license license:public-domain)))
10457
10458(define-public python-pyev
10459 (package
10460 (name "python-pyev")
10461 (version "0.9.0")
10462 (source
10463 (origin
10464 (method url-fetch)
10465 (uri (pypi-uri "pyev" version))
10466 (sha256
10467 (base32
10468 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
10469 (build-system python-build-system)
10470 (arguments
10471 `(#:tests? #f ; no test suite
10472 #:phases
10473 (modify-phases %standard-phases
10474 (add-after 'unpack 'patch
10475 (lambda* (#:key inputs #:allow-other-keys)
10476 (let ((libev (string-append (assoc-ref inputs "libev")
10477 "/lib/libev.so.4")))
10478 (substitute* "setup.py"
10479 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
10480 (string-append "libev_dll_name = \"" libev "\"")))))))))
10481 (inputs
10482 `(("libev" ,libev)))
10483 (home-page "http://pythonhosted.org/pyev/")
10484 (synopsis "Python libev interface")
10485 (description "Pyev provides a Python interface to libev.")
10486 (license license:gpl3)))
10487
10488(define-public python2-pyev
10489 (package-with-python2 python-pyev))
10490
10491(define-public python-imagesize
10492 (package
10493 (name "python-imagesize")
10494 (version "1.1.0")
10495 (source
10496 (origin
10497 (method url-fetch)
10498 (uri (pypi-uri "imagesize" version))
10499 (sha256
10500 (base32
10501 "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk"))))
10502 (build-system python-build-system)
10503 (home-page "https://github.com/shibukawa/imagesize_py")
10504 (synopsis "Gets image size of files in various formats in Python")
10505 (description
10506 "This package allows determination of image size from
10507PNG, JPEG, JPEG2000 and GIF files in pure Python.")
10508 (license license:expat)))
10509
10510(define-public python2-imagesize
10511 (package-with-python2 python-imagesize))
10512
10513(define-public python-termstyle
10514 (package
10515 (name "python-termstyle")
10516 (version "0.1.11")
10517 (source
10518 (origin
10519 (method url-fetch)
10520 (uri (pypi-uri "termstyle" version))
10521 (sha256
10522 (base32
10523 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
10524 (build-system python-build-system)
10525 (arguments
10526 '(#:phases
10527 (modify-phases %standard-phases
10528 (replace 'check
10529 (lambda _
831080a6 10530 (invoke "python" "test3.py"))))))
44d10b1f
RW
10531 (home-page "https://github.com/gfxmonk/termstyle")
10532 (synopsis "Console text coloring for Python")
10533 (description "This package provides console text coloring for Python.")
10534 (license license:bsd-3)))
10535
10536(define-public python-argcomplete
10537 (package
10538 (name "python-argcomplete")
10539 (version "1.7.0")
10540 (source
10541 (origin
10542 (method url-fetch)
10543 (uri (pypi-uri "argcomplete" version))
10544 (sha256
10545 (base32
10546 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
10547 (build-system python-build-system)
10548 (native-inputs
10549 `(("python-pexpect" ,python-pexpect)
10550 ("tcsh" ,tcsh)
10551 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
10552 (home-page "https://github.com/kislyuk/argcomplete")
10553 (synopsis "Shell tab completion for Python argparse")
10554 (description "argcomplete provides extensible command line tab completion
10555of arguments and options for Python scripts using @code{argparse}. It's
10556particularly useful for programs with many options or sub-parsers that can
10557dynamically suggest completions; for example, when browsing resources over the
10558network.")
10559 (license license:asl2.0)))
10560
10561(define-public python2-argcomplete
10562 (package-with-python2 python-argcomplete))
10563
10564(define-public python-xopen
10565 (package
10566 (name "python-xopen")
10567 (version "0.3.3")
10568 (source
10569 (origin
10570 (method url-fetch)
10571 (uri (pypi-uri "xopen" version))
10572 (sha256
10573 (base32
10574 "1a0wbil552wsmklwd89ssmgz3pjd86qa9i7jh8wqb9wslc8a2qjr"))
10575 (file-name (string-append name "-" version ".tar.gz"))))
10576 (build-system python-build-system)
10577 (home-page "https://github.com/marcelm/xopen/")
10578 (synopsis "Open compressed files transparently")
10579 (description "This module provides an @code{xopen} function that works like
10580Python's built-in @code{open} function, but can also deal with compressed files.
10581Supported compression formats are gzip, bzip2 and, xz, and are automatically
10582recognized by their file extensions. The focus is on being as efficient as
10583possible on all supported Python versions.")
10584 (license license:expat)))
10585
10586(define-public python2-xopen
10587 (let ((base (package-with-python2
10588 (strip-python2-variant python-xopen))))
10589 (package
10590 (inherit base)
10591 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
10592 ,@(package-propagated-inputs base))))))
10593
10594(define-public python-cheetah
10595 (package
10596 (name "python-cheetah")
10597 (version "3.1.0")
10598 (source
10599 (origin
10600 (method url-fetch)
10601 (uri (pypi-uri "Cheetah3" version))
10602 (sha256
10603 (base32
10604 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
10605 (build-system python-build-system)
10606 (arguments
10607 `(#:modules ((guix build utils)
10608 (guix build python-build-system)
10609 (ice-9 ftw)
10610 (srfi srfi-1)
10611 (srfi srfi-26))
10612 #:phases (modify-phases %standard-phases
10613 (add-after 'unpack 'use-absolute-python
10614 (lambda _
10615 (substitute* "Cheetah/CheetahWrapper.py"
10616 (("#!/usr/bin/env python")
10617 (string-append "#!" (which "python"))))
10618 #t))
10619 (replace 'check
10620 (lambda _
10621 (let ((cwd (getcwd)))
10622 (setenv "PYTHONPATH"
10623 (string-append
10624 cwd "/build/"
10625 (find (cut string-prefix? "lib" <>)
10626 (scandir (string-append cwd "/build")))
10627 ":" (getenv "PYTHONPATH")))
10628 (setenv "PATH"
10629 (string-append (getenv "PATH")
10630 ":" cwd "/bin"))
10631 (setenv "TMPDIR" "/tmp")
10632
10633 (substitute* "Cheetah/Tests/Test.py"
10634 (("unittest.TextTestRunner\\(\\)")
10635 "unittest.TextTestRunner(verbosity=2)"))
10636
10637 (invoke "python" "Cheetah/Tests/Test.py")))))))
10638 (propagated-inputs
10639 `(("python-markdown" ,python-markdown))) ;optional
10640 (home-page "http://cheetahtemplate.org/")
10641 (synopsis "Template engine")
10642 (description "Cheetah is a text-based template engine and Python code
10643generator.
10644
10645Cheetah can be used as a standalone templating utility or referenced as
10646a library from other Python applications. It has many potential uses,
10647but web developers looking for a viable alternative to ASP, JSP, PHP and
10648PSP are expected to be its principle user group.
10649
10650Features:
10651@enumerate
10652@item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
10653 text-based format.
10654@item Cleanly separates content, graphic design, and program code.
10655@item Blends the power and flexibility of Python with a simple template language
10656 that non-programmers can understand.
10657@item Gives template writers full access to any Python data structure, module,
10658 function, object, or method in their templates.
10659@item Makes code reuse easy by providing an object-orientated interface to
10660 templates that is accessible from Python code or other Cheetah templates.
10661 One template can subclass another and selectively reimplement sections of it.
10662@item Provides a simple, yet powerful, caching mechanism that can dramatically
10663 improve the performance of a dynamic website.
10664@item Compiles templates into optimized, yet readable, Python code.
10665@end enumerate")
10666 (license (license:x11-style "file://LICENSE"))))
10667
10668(define-public python2-cheetah
10669 (package-with-python2 python-cheetah))
10670
10671(define-public python-dulwich
10672 (package
10673 (name "python-dulwich")
10674 (version "0.18.6")
10675 (source
10676 (origin
10677 (method url-fetch)
10678 (uri (list (string-append "https://www.dulwich.io/releases/"
10679 "dulwich-" version ".tar.gz")
10680 (pypi-uri "dulwich" version)))
10681 (sha256
10682 (base32
10683 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
10684 (build-system python-build-system)
10685 (arguments
10686 `(#:phases
10687 (modify-phases %standard-phases
10688 (add-before 'check 'fix-tests
10689 (lambda* (#:key inputs #:allow-other-keys)
10690 ;; The tests use Popen with a custom environment which doesn't
10691 ;; include PATH.
10692 (substitute* "dulwich/tests/compat/utils.py"
10693 (("'git'") (string-append "'"
10694 (which "git")
10695 "'")))
10696 (substitute* '("dulwich/tests/test_repository.py"
10697 "dulwich/tests/test_hooks.py")
10698 (("#!/bin/sh") (string-append "#!" (which "sh"))))
10699 (setenv "TEST_RUNNER" "unittest")
10700 (setenv "PYTHONHASHSEED" "random")
10701 #t)))))
10702 (propagated-inputs
10703 `(("python-fastimport" ,python-fastimport)))
10704 (native-inputs
10705 `(("python-mock" ,python-mock)
10706 ("python-geventhttpclient" ,python-geventhttpclient)
10707 ("git" ,git)))
10708 (home-page "https://www.dulwich.io/")
10709 (synopsis "Git implementation in Python")
10710 (description "Dulwich is an implementation of the Git file formats and
10711protocols written in pure Python.")
10712 ;; Can be used with either license.
10713 (license (list license:asl2.0 license:gpl2+))))
10714
10715(define-public python2-dulwich
10716 (package-with-python2 python-dulwich))
10717
10718(define-public python-pbkdf2
10719 (package
10720 (name "python-pbkdf2")
10721 (version "1.3")
10722 (source
10723 (origin
10724 (method url-fetch)
10725 (uri (pypi-uri "pbkdf2" version))
10726 (sha256
10727 (base32
10728 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
10729 (build-system python-build-system)
10730 (arguments
10731 '(#:phases
10732 (modify-phases %standard-phases
10733 (replace 'check
10734 (lambda _
10735 (setenv "PYTHONPATH"
10736 (string-append (getcwd) "/build/lib:"
10737 (getenv "PYTHONPATH")))
ee2bb944 10738 (invoke "python" "test/test_pbkdf2.py"))))))
44d10b1f
RW
10739 (propagated-inputs
10740 `(("python-pycrypto" ,python-pycrypto))) ; optional
10741 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
10742 (synopsis "Password-based key derivation")
10743 (description "This module implements the password-based key derivation
10744function, PBKDF2, specified in RSA PKCS#5 v2.0.
10745
10746PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
10747is part of the RSA Public Key Cryptography Standards series. The provided
10748implementation takes a password or a passphrase and a salt value (and
10749optionally a iteration count, a digest module, and a MAC module) and provides
10750a file-like object from which an arbitrarly-sized key can be read.")
10751 (license license:expat)))
10752
10753(define-public python2-pbkdf2
10754 (package-with-python2 python-pbkdf2))
10755
10756(define-public python-qrcode
10757 (package
10758 (name "python-qrcode")
10759 (version "6.0")
10760 (source
10761 (origin
10762 (method url-fetch)
10763 (uri (pypi-uri "qrcode" version))
10764 (sha256
10765 (base32
10766 "1gz1g2n9kqwqkak78aavr354z1v3yyiksk7q6xp5hi1zr6s0syq3"))))
10767 (build-system python-build-system)
10768 (arguments
10769 ;; FIXME: Tests require packaging 'pymaging'.
10770 '(#:tests? #f))
10771 (propagated-inputs
10772 `(("python-lxml" ,python-lxml) ; for SVG output
10773 ("python-pillow" ,python-pillow) ; for PNG output
10774 ("python-six" ,python-six)))
10775 (inputs
10776 `(;; The setup.cfg file needs to be used, and support for this requires
10777 ;; at least version 30.3.0 of setuptools
10778 ("python-setuptools" ,python-setuptools)))
10779 (home-page "https://github.com/lincolnloop/python-qrcode")
10780 (synopsis "QR Code image generator")
10781 (description "This package provides a pure Python QR Code generator
10782module. It uses the Python Imaging Library (PIL) to allow for the generation
10783of QR Codes.
10784
10785In addition this package provides a command line tool to generate QR codes and
10786either write these QR codes to a file or do the output as ascii art at the
10787console.")
10788 (license license:bsd-3)))
10789
10790(define-public python2-qrcode
10791 (package-with-python2 python-qrcode))
10792
10793(define-public python-rst2ansi
10794 (package
10795 (name "python-rst2ansi")
10796 (version "0.1.5")
10797 (source
10798 (origin
10799 (method url-fetch)
10800 (uri (pypi-uri "rst2ansi" version))
10801 (sha256
10802 (base32
10803 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
10804 (build-system python-build-system)
10805 (propagated-inputs
10806 `(("python-docutils" ,python-docutils)))
10807 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
10808 (synopsis "Convert RST to ANSI-decorated console output")
10809 (description
10810 "Python module dedicated to rendering RST (reStructuredText) documents
10811to ansi-escaped strings suitable for display in a terminal.")
10812 (license license:expat)))
10813
10814(define-public python-ansi2html
10815 (package
10816 (name "python-ansi2html")
10817 (version "1.2.0")
10818 (source
10819 (origin
10820 (method url-fetch)
10821 (uri (pypi-uri "ansi2html" version))
10822 (sha256
10823 (base32
10824 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
10825 (build-system python-build-system)
10826 (native-inputs
10827 `(("python-mock" ,python-mock)
10828 ("python-nose" ,python-nose)))
10829 (propagated-inputs
10830 `(("python-six" ,python-six)))
10831 (home-page "https://github.com/ralphbean/ansi2html")
10832 (synopsis "Convert ANSI-decorated console output to HTML")
10833 (description
10834 "@command{ansi2html} is a Python library and command line utility for
10835convering text with ANSI color codes to HTML or LaTeX.")
10836 (license license:gpl3+)))
10837
10838(define-public python2-ansi2html
10839 (package-with-python2 python-ansi2html))
10840
10841(define-public python-ddt
10842 (package
10843 (name "python-ddt")
10844 (version "1.1.3")
10845 (source
10846 (origin
10847 (method url-fetch)
10848 (uri (pypi-uri "ddt" version))
10849 (sha256
10850 (base32
10851 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
10852 (build-system python-build-system)
10853 (native-inputs
10854 `(("python-mock" ,python-mock)
10855 ("python-nose" ,python-nose)))
10856 (propagated-inputs
10857 `(("python-six" ,python-six)
10858 ("python-pyyaml" ,python-pyyaml)))
10859 (home-page "https://github.com/txels/ddt")
10860 (synopsis "Data-Driven Tests")
10861 (description
10862 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
10863running it with different test data, and make it appear as multiple test
10864cases.")
10865 (license license:expat)))
10866
10867(define-public python2-ddt
10868 (package-with-python2 python-ddt))
10869
10870(define-public python-pycountry
10871 (package
10872 (name "python-pycountry")
10873 (version "18.5.26")
10874 (source
10875 (origin
10876 (method url-fetch)
10877 (uri (pypi-uri "pycountry" version))
10878 (sha256
10879 (base32
10880 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
10881 (build-system python-build-system)
10882 (home-page "https://bitbucket.org/flyingcircus/pycountry")
10883 (synopsis "ISO databases for languages, countries, currencies, etc.")
10884 (description
10885 "@code{pycountry} provides the ISO databases for the standards:
10886@enumerate
10887@item 639-3 (Languages)
10888@item 3166 (Countries)
10889@item 3166-3 (Deleted Countries)
10890@item 3166-2 (Subdivisions of countries)
10891@item 4217 (Currencies)
10892@item 15924 (Scripts)
10893@end enumerate
10894It includes a copy from Debian’s pkg-isocodes and makes the data accessible
10895through a Python API.")
10896 (license license:lgpl2.1+)))
10897
10898(define-public python2-pycountry
10899 (package-with-python2 python-pycountry))
10900
10901(define-public python-pycosat
10902 (package
10903 (name "python-pycosat")
10904 (version "0.6.1")
10905 (source
10906 (origin
10907 (method url-fetch)
10908 (uri (pypi-uri "pycosat" version))
10909 (sha256
10910 (base32
10911 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
10912 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
10913 (build-system python-build-system)
10914 (home-page "https://github.com/ContinuumIO/pycosat")
10915 (synopsis "Bindings to picosat (a SAT solver)")
10916 (description
10917 "This package provides efficient Python bindings to @code{picosat} on
10918the C level. When importing pycosat, the @code{picosat} solver becomes part
10919of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
10920Problem} (SAT) solver.")
10921 (license license:expat)))
10922
10923(define-public python2-pycosat
10924 (package-with-python2 python-pycosat))
10925
10926(define-public python2-ruamel.ordereddict
10927 (package
10928 (name "python2-ruamel.ordereddict")
10929 (version "0.4.9")
10930 (source
10931 (origin
10932 (method url-fetch)
10933 (uri (pypi-uri "ruamel.ordereddict" version))
10934 (sha256
10935 (base32
10936 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
10937 (build-system python-build-system)
10938 (arguments
10939 `(#:python ,python-2
10940 #:phases
10941 (modify-phases %standard-phases
10942 (delete 'check)
10943 (add-after 'install 'check
10944 (lambda* (#:key inputs outputs #:allow-other-keys)
10945 (add-installed-pythonpath inputs outputs)
f987ac30 10946 (invoke "python" "test/testordereddict.py"))))))
44d10b1f
RW
10947 (home-page "https://bitbucket.org/ruamel/ordereddict")
10948 (synopsis "Version of dict that keeps keys in insertion order")
10949 (description
10950 "This is an implementation of an ordered dictionary with @dfn{Key
10951Insertion Order} (KIO: updates of values do not affect the position of the
10952key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
10953removed and put at the back). The standard library module @code{OrderedDict},
10954implemented later, implements a subset of @code{ordereddict} functionality.
10955Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
10956Order} (KSO, no sorting function can be specified, but a transform can be
10957specified to apply on the key before comparison (e.g. @code{string.lower})).")
10958 (license license:expat)))
10959
10960(define-public python-pypeg2
10961 (package
10962 (name "python-pypeg2")
10963 (version "2.15.2")
10964 (source
10965 (origin
10966 (method url-fetch)
10967 (uri (pypi-uri "pyPEG2" version))
10968 (sha256
10969 (base32
10970 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
10971 (build-system python-build-system)
10972 (propagated-inputs `(("python-lxml" ,python-lxml)))
10973 (arguments
10974 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
10975 '(#:tests? #f))
10976 (home-page "https://fdik.org/pyPEG/")
10977 (synopsis "Parsering Expression Grammars in Python")
10978 (description "PyPEG is an intrinsic parser interpreter framework for
10979Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
10980parse many formal languages.")
10981 (license license:gpl2)))
10982
10983(define-public python-incremental
10984 (package
10985 (name "python-incremental")
10986 (version "17.5.0")
10987 (source
10988 (origin
10989 (method url-fetch)
10990 (uri (pypi-uri "incremental" version))
10991 (sha256
10992 (base32
10993 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
10994 (build-system python-build-system)
10995 (home-page "https://github.com/hawkowl/incremental")
10996 (synopsis "Library for versioning Python projects")
10997 (description "Incremental is a small library that versions your Python
10998projects.")
10999 (license license:expat)))
11000
11001(define-public python2-incremental
11002 (package-with-python2 python-incremental))
11003
11004(define-public python-invoke
11005 (package
11006 (name "python-invoke")
11007 (home-page "http://www.pyinvoke.org/")
11008 (version "1.1.0")
11009 (source (origin
11010 (method url-fetch)
11011 (uri (pypi-uri "invoke" version))
11012 (sha256
11013 (base32
11014 "0aiy1xvk1f91246zxd1zqrm679vdvd10h843a2na41cqr3cflpi6"))))
11015 (build-system python-build-system)
11016 (arguments
11017 ;; XXX: Requires many dependencies that are not yet in Guix.
11018 `(#:tests? #f))
11019 (synopsis "Pythonic task execution")
11020 (description
11021 "Invoke is a Python task execution tool and library, drawing inspiration
11022from various sources to arrive at a powerful and clean feature set. It is
11023evolved from the Fabric project, but focuses on local and abstract concerns
11024instead of servers and network commands.")
11025 (license license:bsd-3)))
11026
11027(define-public python2-invoke
11028 (package-with-python2 python-invoke))
11029
11030(define-public python-automat
11031 (package
11032 (name "python-automat")
11033 (version "0.6.0")
11034 (source (origin
11035 (method url-fetch)
11036 (uri (pypi-uri "Automat" version))
11037 (sha256
11038 (base32
11039 "1a7nsrljysfmdqmpn2apfa1gg6rfah4y9sizvns8gb08rx7d07rw"))))
11040 (build-system python-build-system)
11041 ;; We disable the tests because they require python-twisted, while
11042 ;; python-twisted depends on python-automat. Twisted is optional, but the
11043 ;; tests fail if it is not available. Also see
11044 ;; <https://github.com/glyph/automat/issues/71>.
11045 (arguments '(#:tests? #f))
11046 (native-inputs
11047 `(("python-m2r" ,python-m2r)
11048 ("python-setuptools-scm" ,python-setuptools-scm)
11049 ("python-graphviz" ,python-graphviz)))
11050 (propagated-inputs
11051 `(("python-six" ,python-six)
11052 ("python-attrs" ,python-attrs)))
11053 (home-page "https://github.com/glyph/Automat")
11054 (synopsis "Self-service finite-state machines")
11055 (description "Automat is a library for concise, idiomatic Python
11056expression of finite-state automata (particularly deterministic finite-state
11057transducers).")
11058 (license license:expat)))
11059
11060(define-public python2-automat
11061 (package-with-python2 python-automat))
11062
11063(define-public python-m2r
11064 (package
11065 (name "python-m2r")
11066 (version "0.1.12")
11067 (source (origin
11068 (method url-fetch)
11069 (uri (pypi-uri "m2r" version))
11070 (sha256
11071 (base32
11072 "1axrwnf425sz4qz3c0qc7yhhki4myzb8rki7pczcsgzznzmqdyxd"))))
11073 (build-system python-build-system)
11074 (propagated-inputs
11075 `(("python-docutils" ,python-docutils)
11076 ("python-mistune" ,python-mistune)))
11077 (native-inputs
11078 `(("python-pygments" ,python-pygments)
11079 ("python-mock" ,python-mock)))
11080 (home-page "https://github.com/miyakogi/m2r")
11081 (synopsis "Markdown to reStructuredText converter")
11082 (description "M2R converts a markdown file including reST markups to valid
11083reST format.")
11084 (license license:expat)))
11085
11086(define-public python2-m2r
11087 (package-with-python2 python-m2r))
11088
11089(define-public python-constantly
11090 (package
11091 (name "python-constantly")
11092 (version "15.1.0")
11093 (source (origin
11094 (method url-fetch)
11095 (uri (pypi-uri "constantly" version))
11096 (sha256
11097 (base32
11098 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
11099 (build-system python-build-system)
11100 (home-page "https://github.com/twisted/constantly")
11101 (synopsis "Symbolic constants in Python")
11102 (description "Constantly is a Python library that provides symbolic
11103constant support. It includes collections and constants with text, numeric,
11104and bit flag values.")
11105 (license license:expat)))
11106
11107(define-public python2-constantly
11108 (package-with-python2 python-constantly))
11109
11110(define-public python-attrs
11111 (package
11112 (name "python-attrs")
11113 (version "18.2.0")
11114 (source (origin
11115 (method url-fetch)
11116 (uri (pypi-uri "attrs" version))
11117 (sha256
11118 (base32
11119 "0s9ydh058wmmf5v391pym877x4ahxg45dw6a0w4c7s5wgpigdjqh"))))
11120 (build-system python-build-system)
11121 (arguments
11122 `(#:modules ((guix build utils)
11123 (guix build python-build-system)
11124 (ice-9 ftw)
11125 (srfi srfi-1)
11126 (srfi srfi-26))
11127 #:phases (modify-phases %standard-phases
11128 (replace 'check
11129 (lambda _
11130 (let ((cwd (getcwd)))
11131 (setenv "PYTHONPATH"
11132 (string-append
11133 cwd "/build/"
11134 (find (cut string-prefix? "lib" <>)
11135 (scandir (string-append cwd "/build")))
11136 ":"
11137 (getenv "PYTHONPATH")))
11138 (invoke "python" "-m" "pytest")))))))
11139 (native-inputs
11140 `(("python-coverage" ,python-coverage)
11141 ("python-hypothesis" ,python-hypothesis)
11142 ("python-pympler" ,python-pympler)
11143 ("python-pytest" ,python-pytest)
11144 ("python-six" ,python-six)
11145 ("python-sphinx" ,python-sphinx)
11146 ("python-zope-interface" ,python-zope-interface)))
11147 (home-page "https://github.com/python-attrs/attrs/")
11148 (synopsis "Attributes without boilerplate")
11149 (description "@code{attrs} is a Python package with class decorators that
11150ease the chores of implementing the most common attribute-related object
11151protocols.")
11152 (license license:expat)))
11153
11154(define-public python2-attrs
11155 (package-with-python2 python-attrs))
11156
11157(define-public python-attrs-bootstrap
11158 (package
11159 (inherit python-attrs)
11160 (name "python-attrs-bootstrap")
11161 ;; Keep this on a fixed version so python-attrs can be updated without
11162 ;; triggering a mass-rebuild. FIXME: Update this in the next rebuild cycle.
11163 (version "17.4.0")
11164 (source (origin
11165 (method url-fetch)
11166 (uri (pypi-uri "attrs" version))
11167 (sha256
11168 (base32
11169 "1jafnn1kzd6qhxgprhx6y6ik1r5m2rilx25syzcmq03azp660y8w"))))
11170 (native-inputs `())
11171 (arguments `(#:tests? #f))))
11172
11173(define-public python2-attrs-bootstrap
11174 (package-with-python2 python-attrs-bootstrap))
11175
11176(define-public python2-cliapp
11177 (package
11178 (name "python2-cliapp")
11179 (version "1.20170823")
11180 (source
11181 (origin
11182 (method url-fetch)
11183 (uri (string-append
11184 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
11185 version ".tar.gz"))
11186 (sha256
11187 (base32
11188 "1i9gik0xrj6jmi95s5w988jl1y265baz5xm5pbqdyvsh8h9ln6yq"))))
11189 (build-system python-build-system)
11190 (arguments
11191 `(#:python ,python-2
11192 #:phases
11193 (modify-phases %standard-phases
11194 ;; check phase needs to be run before the build phase. If not,
11195 ;; coverage-test-runner looks for tests for the built source files,
11196 ;; and fails.
11197 (delete 'check)
11198 (add-before 'build 'check
11199 (lambda _
11200 ;; Disable python3 tests
11201 (substitute* "check"
11202 (("python3") "# python3"))
6c826d32 11203 (invoke "./check"))))))
44d10b1f
RW
11204 (native-inputs
11205 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
11206 ("python2-pep8" ,python2-pep8)))
11207 (propagated-inputs
11208 `(("python2-pyaml" ,python2-pyaml)))
11209 (home-page "https://liw.fi/cliapp/")
11210 (synopsis "Python framework for command line programs")
11211 (description "@code{python2-cliapp} is a python framework for
11212command line programs. It contains the typical stuff such programs
11213need to do, such as parsing the command line for options, and
11214iterating over input files.")
11215 (license license:gpl2+)))
11216
11217(define-public python2-ttystatus
11218 (package
11219 (name "python2-ttystatus")
11220 (version "0.35")
11221 (source
11222 (origin
11223 (method url-fetch)
11224 (uri (string-append
11225 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
11226 version ".tar.gz"))
11227 (sha256
11228 (base32
11229 "0vivqbw7ddhsq1zj3g9cvvv4f0phl0pis2smsnwcr2szz2fk3hl6"))))
11230 (build-system python-build-system)
11231 (native-inputs
11232 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
11233 ("python2-pep8" ,python2-pep8)))
11234 (arguments
11235 `(#:python ,python-2
11236 #:phases
11237 (modify-phases %standard-phases
11238 ;; check phase needs to be run before the build phase. If not,
11239 ;; coverage-test-runner looks for tests for the built source files,
11240 ;; and fails.
11241 (delete 'check)
11242 (add-before 'build 'check
cbeee881 11243 (lambda _ (invoke "make" "check"))))))
44d10b1f
RW
11244 (home-page "https://liw.fi/ttystatus/")
11245 (synopsis "Python library for showing progress reporting and
11246status updates on terminals")
11247 (description "@code{python2-ttystatus} is a python library for
11248showing progress reporting and status updates on terminals, for
11249command line programs. Output is automatically adapted to the width
11250of the terminal: truncated if it does not fit, and resized if the
11251terminal size changes.")
11252 (license license:gpl3+)))
11253
11254(define-public python2-tracing
11255 (package
11256 (name "python2-tracing")
11257 (version "0.10")
11258 (source
11259 (origin
11260 (method url-fetch)
11261 (uri (string-append
11262 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
11263 version ".tar.gz"))
11264 (sha256
11265 (base32
11266 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
11267 (build-system python-build-system)
11268 (arguments
11269 `(#:python ,python-2))
11270 (home-page "https://liw.fi/tracing/")
11271 (synopsis "Python debug logging helper")
11272 (description "@code{python2-tracing} is a python library for
11273logging debug messages. It provides a way to turn debugging messages
11274on and off, based on the filename they occur in. It is much faster
11275than using @code{logging.Filter} to accomplish the same thing, which
11276matters when code is run in production mode. The actual logging still
11277happens using the @code{logging} library.")
11278 (license license:gpl3+)))
11279
11280(define-public python2-larch
11281 (package
11282 (name "python2-larch")
11283 (version "1.20151025")
11284 (source
11285 (origin
11286 (method url-fetch)
11287 (uri (string-append
11288 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
11289 version ".tar.gz"))
11290 (patches (search-patches
11291 "python2-larch-coverage-4.0a6-compatibility.patch"))
11292 (sha256
11293 (base32
11294 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
11295 (build-system python-build-system)
11296 (arguments
11297 `(#:python ,python-2
11298 #:phases
11299 (modify-phases %standard-phases
11300 ;; check phase needs to be run before the build phase. If not,
11301 ;; coverage-test-runner looks for tests for the built source files,
11302 ;; and fails.
11303 (delete 'check)
11304 (add-before 'build 'check
204ad455 11305 (lambda _ (invoke "make" "check"))))))
44d10b1f
RW
11306 (native-inputs
11307 `(("cmdtest" ,cmdtest)
11308 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
11309 (propagated-inputs
11310 `(("python2-tracing" ,python2-tracing)))
11311 (home-page "https://liw.fi/larch/")
11312 (synopsis "Python copy-on-write B-tree library")
11313 (description "@code{python2-larch} is an implementation of
11314particular kind of B-tree, based on research by Ohad Rodeh. See
11315@url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
11316on the data structure.
11317
11318The distinctive feature of this B-tree is that a node is never
11319(conceptually) modified. Instead, all updates are done by
11320copy-on-write. This makes it easy to clone a tree, and modify only the
11321clone, while other processes access the original tree.")
11322 (license license:gpl3+)))
11323
11324(define-public python-astroid
11325 (package
11326 (name "python-astroid")
11327 (version "2.1.0")
11328 (source
11329 (origin
11330 (method url-fetch)
11331 (uri (pypi-uri "astroid" version))
11332 (sha256
11333 (base32
11334 "08hz675knh4294bancdapql392fmbjyimhbyrmfkz1ka7l035c1m"))))
11335 (build-system python-build-system)
11336 (propagated-inputs
11337 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
11338 ("python-six" ,python-six)
11339 ("python-wrapt" ,python-wrapt)))
11340 (native-inputs
11341 `(("python-dateutil" ,python-dateutil)
11342 ("python-nose" ,python-nose)
11343 ("python-pytest" ,python-pytest)
11344 ("python-pytest-runner" ,python-pytest-runner)))
11345 (arguments
11346 `(#:phases
11347 (modify-phases %standard-phases
11348 (add-after 'unpack 'remove-spurious-test
11349 (lambda _
11350 ;; This can be removed after upgrading from python-3.7
11351 ;; https://github.com/PyCQA/astroid/issues/593
11352 ;; https://bugs.python.org/issue34056
11353 (delete-file "astroid/tests/unittest_modutils.py")
11354 #t))
11355 (replace 'check
11356 (lambda _
11357 (invoke "pytest" "astroid"))))))
11358 (home-page "https://github.com/PyCQA/astroid")
11359 (synopsis "Common base representation of python source code for pylint and
11360other projects")
11361 (description "@code{python-astroid} provides a common base representation
11362of python source code for projects such as pychecker, pyreverse, pylint, etc.
11363
11364It provides a compatible representation which comes from the _ast module. It
11365rebuilds the tree generated by the builtin _ast module by recursively walking
11366down the AST and building an extended ast. The new node classes have
11367additional methods and attributes for different usages. They include some
11368support for static inference and local name scopes. Furthermore, astroid
11369builds partial trees by inspecting living objects.")
11370 (license license:lgpl2.1+)
11371 (properties `((python2-variant . ,(delay python2-astroid))))))
11372
11373(define-public python2-astroid
11374 (let ((base (package-with-python2
11375 (strip-python2-variant python-astroid))))
11376 (package (inherit base)
11377 ;; Version 2.x removes python2 support.
11378 (version "1.6.5")
11379 (source
11380 (origin
11381 (method url-fetch)
11382 (uri (pypi-uri "astroid" version))
11383 (sha256
11384 (base32
11385 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
11386 (arguments
11387 (substitute-keyword-arguments (package-arguments base)
11388 ((#:phases phases)
11389 `(modify-phases ,phases
11390 (add-after 'unpack 'remove-spurious-test
11391 (lambda _
11392 ;; https://github.com/PyCQA/astroid/issues/276
11393 (delete-file "astroid/tests/unittest_brain.py")
11394 #t))
11395 (replace 'check
11396 (lambda _
11397 (invoke"python" "-m" "unittest" "discover"
11398 "-p" "unittest*.py")))))))
11399 (native-inputs `())
11400 (propagated-inputs
11401 `(("python2-backports-functools-lru-cache"
11402 ,python2-backports-functools-lru-cache)
11403 ("python2-enum34" ,python2-enum34)
11404 ("python2-singledispatch" ,python2-singledispatch)
11405 ,@(package-propagated-inputs base))))))
11406
11407(define-public python-isort
11408 (package
11409 (name "python-isort")
e2227b6a 11410 (version "4.3.4")
44d10b1f
RW
11411 (source
11412 (origin
e2227b6a
EF
11413 (method git-fetch)
11414 (uri (git-reference
11415 ;; Tests pass only from the Github sources
11416 (url "https://github.com/timothycrosley/isort")
11417 (commit version)))
11418 (file-name (git-file-name name version))
44d10b1f
RW
11419 (sha256
11420 (base32
e2227b6a 11421 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
44d10b1f
RW
11422 (build-system python-build-system)
11423 (native-inputs
11424 `(("python-mock" ,python-mock)
11425 ("python-pytest" ,python-pytest)))
11426 (home-page "https://github.com/timothycrosley/isort")
11427 (synopsis "Python utility/library to sort python imports")
11428 (description "@code{python-isort} is a python utility/library to sort
11429imports alphabetically, and automatically separated into sections. It
11430provides a command line utility, a python library and plugins for various
11431editors.")
e2227b6a
EF
11432 (license license:expat)
11433 (properties `((python2-variant . ,(delay python2-isort))))))
44d10b1f
RW
11434
11435(define-public python2-isort
e2227b6a
EF
11436 (let ((base (package-with-python2
11437 (strip-python2-variant python-isort))))
11438 (package (inherit base)
11439 (native-inputs
11440 `(("python2-futures" ,python2-futures)
11441 ,@(package-native-inputs base))))))
44d10b1f
RW
11442
11443(define-public python2-backports-functools-lru-cache
11444 (package
11445 (name "python2-backports-functools-lru-cache")
11446 (version "1.5")
11447 (source
11448 (origin
11449 (method url-fetch)
11450 ;; only the pypi tarballs contain the necessary metadata
11451 (uri (pypi-uri "backports.functools_lru_cache" version))
11452 (sha256
11453 (base32
11454 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
11455 (build-system python-build-system)
11456 (native-inputs
11457 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
11458 (arguments
11459 `(#:python ,python-2))
11460 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
11461 (synopsis "Backport of functools.lru_cache from Python 3.3")
11462 (description "@code{python2-backports-functools-lru-cache} is a backport
11463of @code{functools.lru_cache} from python 3.3.")
11464 (license license:expat)))
11465
11466(define-public python-configparser
11467 (package
11468 (name "python-configparser")
11469 (version "3.5.0")
11470 (source
11471 (origin
11472 (method url-fetch)
11473 (uri (string-append
11474 "https://bitbucket.org/ambv/configparser/get/"
11475 version ".tar.bz2"))
11476 (file-name (string-append name "-" version ".tar.gz"))
11477 (sha256
11478 (base32
11479 "0waq40as14abwzbb321hfz4vr1fi363nscy32ga14qvfygrg96wa"))))
11480 (build-system python-build-system)
11481 (home-page "http://docs.python.org/py3k/library/configparser.html")
11482 (synopsis "Backport of configparser from python 3.5")
11483 (description "@code{python-configparser} is a backport of
11484@code{configparser} from Python 3.5 so that it can be used directly
11485in other versions.")
11486 (license license:expat)))
11487
11488(define-public python2-configparser
11489 (package-with-python2 python-configparser))
11490
11491(define-public python-mando
11492 (package
11493 (name "python-mando")
11494 (version "0.6.4")
11495 (source (origin
11496 (method url-fetch)
11497 (uri (pypi-uri "mando" version))
11498 (sha256
11499 (base32
11500 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
11501 (build-system python-build-system)
11502 (propagated-inputs
11503 `(("python-rst2ansi" ,python-rst2ansi)
11504 ("python-six" ,python-six)))
11505 (native-inputs
11506 `(("python-pytest" ,python-pytest)))
11507 (home-page "https://mando.readthedocs.org/")
11508 (synopsis
11509 "Wrapper around argparse, allowing creation of complete CLI applications")
11510 (description
11511 "This package is a wrapper around argparse, allowing you to write complete CLI
11512applications in seconds while maintaining all the flexibility.")
11513 (license license:expat)))
11514
11515(define-public python2-mando
11516 (package-with-python2 python-mando))
11517
11518(define-public python-fudge
11519 (package
11520 (name "python-fudge")
11521 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
11522 ;; package, which is currently the only use of this package.
11523 (version "0.9.6")
11524 (source
11525 (origin
11526 (method url-fetch)
11527 (uri (pypi-uri "fudge" version))
11528 (sha256
11529 (base32
11530 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
11531 (build-system python-build-system)
11532 (arguments
11533 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
11534 (home-page "https://github.com/fudge-py/fudge")
11535 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
11536 (description
11537 "Fudge is a Python module for using fake objects (mocks and stubs) to
11538test real ones.
11539
11540In readable Python code, you declare the methods available on your fake object
11541and how they should be called. Then you inject that into your application and
11542start testing. This declarative approach means you don’t have to record and
11543playback actions and you don’t have to inspect your fakes after running code.
11544If the fake object was used incorrectly then you’ll see an informative
11545exception message with a traceback that points to the culprit.")
11546 (license license:expat)))
11547
11548(define-public python2-fudge
11549 (package-with-python2 python-fudge))
11550
11551(define-public python-mwclient
11552 (package
11553 (name "python-mwclient")
11554 (version "0.8.4")
11555 (source
11556 (origin
11557 (method url-fetch)
11558 ;; The PyPI version wouldn't contain tests.
11559 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
11560 "v" version ".tar.gz"))
11561 (file-name (string-append name "-" version ".tar.gz"))
11562 (sha256
11563 (base32
11564 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
11565 (build-system python-build-system)
11566 (propagated-inputs
11567 `(("python-requests" ,python-requests)
11568 ("python-requests-oauthlib"
11569 ,python-requests-oauthlib)
11570 ("python-six" ,python-six)))
11571 (native-inputs
11572 `(("python-mock" ,python-mock)
11573 ("python-pytest" ,python-pytest)
11574 ("python-pytest-pep8" ,python-pytest-pep8)
11575 ("python-pytest-cache" ,python-pytest-cache)
11576 ("python-pytest-cov" ,python-pytest-cov)
11577 ("python-responses" ,python-responses)))
11578 (home-page "https://github.com/btongminh/mwclient")
11579 (synopsis "MediaWiki API client")
11580 (description "This package provides a MediaWiki API client.")
11581 (license license:expat)))
11582
11583(define-public python2-mwclient
11584 (package-with-python2 python-mwclient))
11585
11586(define-public python-utils
11587 (package
11588 (name "python-utils")
11589 (version "2.1.0")
11590 (source (origin
11591 (method url-fetch)
11592 (uri (pypi-uri "python-utils" version))
11593 (sha256
11594 (base32
11595 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
11596 (build-system python-build-system)
11597 (native-inputs
11598 `(("pytest-runner" ,python-pytest-runner)
11599 ("pytest" ,python-pytest)
11600 ("six" ,python-six)))
11601 (home-page "https://github.com/WoLpH/python-utils")
11602 (synopsis "Convenient utilities not included with the standard Python install")
11603 (description
11604 "Python Utils is a collection of small Python functions and classes which
11605make common patterns shorter and easier.")
11606 (license license:bsd-2)))
11607
11608(define-public python2-utils
11609 (package-with-python2 python-utils))
11610
11611(define-public python-sphinx-me
11612 (package
11613 (name "python-sphinx-me")
11614 (version "0.3")
11615 (source
11616 (origin
11617 (method url-fetch)
11618 (uri (pypi-uri "sphinx-me" version))
11619 (sha256
11620 (base32
11621 "06jzgp213zihnvpcy2y5jy3ykid3apc2ncp2pg6a2g05lhiziglq"))))
11622 (build-system python-build-system)
11623 (home-page "https://github.com/stephenmcd/sphinx-me")
11624 (synopsis "Create a Sphinx documentation shell")
11625 (description
11626 "Create a Sphinx documentation shell for your project and include the
11627README file as the documentation index. It handles extracting the required
11628meta data such as the project name, author and version from your project for
11629use in your Sphinx docs.")
11630 (license license:bsd-2)))
11631
11632(define-public python2-sphinx-me
11633 (package-with-python2 python-sphinx-me))
11634
11635(define-public python-diff-match-patch
11636 (package
11637 (name "python-diff-match-patch")
11638 (version "20121119")
11639 (source
11640 (origin
11641 (method url-fetch)
11642 (uri (pypi-uri "diff-match-patch" version))
11643 (sha256
11644 (base32
11645 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
11646 (build-system python-build-system)
11647 (home-page "https://code.google.com/p/google-diff-match-patch")
11648 (synopsis "Synchronize plain text")
11649 (description "Diff Match and Patch libraries offer robust algorithms to
11650perform the operations required for synchronizing plain text.")
11651 (license license:asl2.0)))
11652
11653(define-public python2-diff-match-patch
11654 (package-with-python2 python-diff-match-patch))
11655
11656(define-public python-dirsync
11657 (package
11658 (name "python-dirsync")
11659 (version "2.2.3")
11660 (source
11661 (origin
11662 (method url-fetch)
11663 (uri (pypi-uri "dirsync" version))
11664 (sha256
11665 (base32
11666 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
11667 (build-system python-build-system)
11668 (propagated-inputs
11669 `(("six" ,python-six)))
11670 (home-page "https://bitbucket.org/tkhyn/dirsync")
11671 (synopsis "Advanced directory tree synchronisation tool")
11672 (description "Advanced directory tree synchronisation tool.")
11673 (license license:expat)))
11674
11675(define-public python2-dirsync
11676 (package-with-python2 python-dirsync))
11677
11678(define-public python-levenshtein
11679 (package
11680 (name "python-levenshtein")
11681 (version "0.12.0")
11682 (source
11683 (origin
11684 (method url-fetch)
11685 (uri (pypi-uri "python-Levenshtein" version))
11686 (sha256
11687 (base32
11688 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
11689 (build-system python-build-system)
11690 (home-page "https://github.com/ztane/python-Levenshtein")
11691 (synopsis "Fast computation of Levenshtein distance and string similarity")
11692 (description
11693 "The Levenshtein Python C extension module contains functions for fast computation of
11694@enumerate
11695@item Levenshtein (edit) distance, and edit operations
11696@item string similarity
11697@item approximate median strings, and generally string averaging
11698@item string sequence and set similarity
11699@end enumerate
11700It supports both normal and Unicode strings.")
11701 (license license:gpl2+)))
11702
11703(define-public python2-levenshtein
11704 (package-with-python2 python-levenshtein))
11705
11706(define-public python-scandir
11707 (package
11708 (name "python-scandir")
11709 (version "1.9.0")
11710 (source
11711 (origin
11712 (method url-fetch)
11713 (uri (pypi-uri "scandir" version))
11714 (sha256
11715 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
11716 (build-system python-build-system)
11717 (arguments
11718 `(#:phases (modify-phases %standard-phases
11719 (replace 'check
11720 (lambda _
11721 (invoke "python" "test/run_tests.py"))))))
11722 (home-page "https://github.com/benhoyt/scandir")
11723 (synopsis "Directory iteration function")
11724 (description
11725 "Directory iteration function like os.listdir(), except that instead of
11726returning a list of bare filenames, it yields DirEntry objects that include
11727file type and stat information along with the name. Using scandir() increases
11728the speed of os.walk() by 2-20 times (depending on the platform and file
11729system) by avoiding unnecessary calls to os.stat() in most cases.
11730
11731This package is part of the Python standard library since version 3.5.")
11732 (license license:bsd-3)))
11733
11734(define-public python2-scandir
11735 (package-with-python2 python-scandir))
11736
11737(define-public python2-stemming
11738 (package
11739 (name "python2-stemming")
11740 (version "1.0.1")
11741 (source
11742 (origin
11743 (method url-fetch)
11744 (uri (pypi-uri "stemming" version))
11745 (sha256
11746 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
11747 (build-system python-build-system)
11748 (arguments
11749 `(#:python ,python-2))
11750 (home-page "https://bitbucket.org/mchaput/stemming/overview")
11751 (synopsis "Python implementations of various stemming algorithms")
11752 (description
11753 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
11754stemming algorithms for English. These implementations are straightforward and
11755efficient, unlike some Python versions of the same algorithms available on the
11756Web. This package is an extraction of the stemming code included in the Whoosh
11757search engine.")
11758 (license license:public-domain)))
11759
11760(define-public python-factory-boy
11761 (package
11762 (name "python-factory-boy")
11763 (version "2.8.1")
11764 (source
11765 (origin
11766 (method url-fetch)
11767 (uri (pypi-uri "factory_boy" version))
11768 (sha256
11769 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
11770 (build-system python-build-system)
11771 (arguments
11772 ;; Tests are not included in the tarball.
11773 `(#:tests? #f))
11774 (propagated-inputs
11775 `(("faker" ,python-faker)))
11776 (home-page "https://github.com/benhoyt/scandir")
11777 (synopsis "Versatile test fixtures replacement")
11778 (description
11779 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
11780
11781As a fixtures replacement tool, it aims to replace static, hard to maintain
11782fixtures with easy-to-use factories for complex object.
11783
11784Instead of building an exhaustive test setup with every possible combination
11785of corner cases, factory_boy allows you to use objects customized for the
11786current test, while only declaring the test-specific fields")
11787 (license license:expat)))
11788
11789(define-public python2-factory-boy
11790 (package-with-python2 python-factory-boy))
11791
11792(define-public python-translate-toolkit
11793 (package
11794 (name "python-translate-toolkit")
11795 (version "2.1.0")
11796 (source
11797 (origin
11798 (method url-fetch)
11799 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
11800 (sha256
11801 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
11802 (build-system python-build-system)
11803 (native-inputs
11804 `(("python-pytest" ,python-pytest)
11805 ("python-sphinx" ,python-sphinx)))
11806 (propagated-inputs
11807 `(("python-babel" ,python-babel)
11808 ("python-beautifulsoup4" ,python-beautifulsoup4)
11809 ("python-chardet" ,python-chardet)
11810 ("python-diff-match-patch" ,python-diff-match-patch)
11811 ("python-levenshtein" ,python-levenshtein)
11812 ("python-lxml" ,python-lxml)
11813 ("python-six" ,python-six)
11814 ("python-vobject" ,python-vobject)
11815 ("python-pyyaml" ,python-pyyaml)))
11816 (arguments
11817 ;; TODO: tests are not run, because they end with
11818 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
11819 ;; 'parse_funcs'
11820 ;; during test setup.
11821 `(#:tests? #f))
11822 (home-page "http://toolkit.translatehouse.org")
11823 (synopsis "Tools and API for translation and localization engineering")
11824 (description
11825 "Tools and API for translation and localization engineering. It contains
11826several utilities, as well as an API for building localization tools.")
11827 (license license:gpl2+)))
11828
11829(define-public python2-translate-toolkit
11830 (package-with-python2 python-translate-toolkit))
11831
11832(define-public python-packaging
11833 (package
11834 (name "python-packaging")
11835 (version "18.0")
11836 (source
11837 (origin
11838 (method url-fetch)
11839 (uri (pypi-uri "packaging" version))
11840 (sha256
11841 (base32
11842 "01wq9c53ix5rz6qg2c98gy8n4ff768rmanifm8m5jpjiaizj51h8"))))
11843 (build-system python-build-system)
11844 (arguments
11845 `(#:phases (modify-phases %standard-phases
11846 (replace 'check
11847 (lambda _ (invoke "py.test" "-vv"))))))
11848 (native-inputs
11849 `(("python-pretend" ,python-pretend)
11850 ("python-pytest" ,python-pytest)))
11851 (propagated-inputs
11852 `(("python-pyparsing" ,python-pyparsing)
11853 ("python-six" ,python-six)))
11854 (home-page "https://github.com/pypa/packaging")
11855 (synopsis "Core utilities for Python packages")
11856 (description "Packaging is a Python module for dealing with Python packages.
11857It offers an interface for working with package versions, names, and dependency
11858information.")
11859 ;; From 'LICENSE': This software is made available under the terms of
11860 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
11861 ;; Contributions to this software is made under the terms of *both* these
11862 ;; licenses.
11863 (license (list license:asl2.0 license:bsd-2))))
11864
11865(define-public python2-packaging
11866 (package-with-python2 python-packaging))
11867
11868(define-public python-relatorio
11869 (package
11870 (name "python-relatorio")
11871 (version "0.8.0")
11872 (source
11873 (origin
11874 (method url-fetch)
11875 (uri (pypi-uri "relatorio" version))
11876 (sha256
11877 (base32
11878 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
11879 (build-system python-build-system)
11880 (propagated-inputs
11881 `(("python-lxml" ,python-lxml)
11882 ("python-genshi" ,python-genshi)))
11883 (native-inputs
11884 `(("python-magic" ,python-magic)))
11885 (home-page "https://relatorio.tryton.org/")
11886 (synopsis "Templating library able to output ODT and PDF files")
11887 (description "Relatorio is a templating library which provides a way to
11888easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
11889for more filetypes can be easily added by creating plugins for them.")
11890 (license license:gpl3+)))
11891
11892(define-public python2-relatorio
11893 (package-with-python2 python-relatorio))
11894
11895(define-public python-radon
11896 (package
11897 (name "python-radon")
11898 (version "2.2.0")
11899 (source
11900 (origin
11901 (method url-fetch)
11902 (uri (pypi-uri "radon" version))
11903 (sha256
11904 (base32
11905 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
11906 (build-system python-build-system)
11907 (arguments
11908 `(#:phases (modify-phases %standard-phases
11909 (replace 'check
11910 (lambda _
11911 (invoke "python" "radon/tests/run.py"))))))
11912 (propagated-inputs
11913 `(("python-colorama" ,python-colorama)
11914 ("python-flake8-polyfill" ,python-flake8-polyfill)
11915 ("python-mando" ,python-mando)))
11916 (native-inputs
11917 `(("python-pytest" ,python-pytest)
11918 ("python-pytest-mock" ,python-pytest-mock)))
11919 (home-page "https://radon.readthedocs.org/")
11920 (synopsis "Code Metrics in Python")
11921 (description "Radon is a Python tool which computes various code metrics.
11922Supported metrics are:
11923@itemize @bullet
11924@item raw metrics: SLOC, comment lines, blank lines, &c.
11925@item Cyclomatic Complexity (i.e. McCabe’s Complexity)
11926@item Halstead metrics (all of them)
11927@item the Maintainability Index (a Visual Studio metric)
11928@end itemize")
11929 (license license:expat)))
11930
11931(define-public python2-radon
11932 (package-with-python2 python-radon))
11933
11934(define-public python-sure
11935 (package
11936 (name "python-sure")
11937 (version "1.4.11")
11938 (source
11939 (origin
11940 (method url-fetch)
11941 (uri (pypi-uri "sure" version))
11942 (sha256
11943 (base32
11944 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
11945 (build-system python-build-system)
11946 (propagated-inputs
11947 `(("python-mock" ,python-mock)
11948 ("python-six" ,python-six)))
11949 (native-inputs
11950 `(("python-nose" ,python-nose)))
11951 (home-page "https://github.com/gabrielfalcao/sure")
11952 (synopsis "Automated testing library in python for python")
11953 (description
11954 "Sure is a python library that leverages a DSL for writing assertions.
11955Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
11956 (license license:gpl3+)))
11957
11958(define-public python2-sure
11959 (package-with-python2 python-sure))
11960
11961(define-public python2-couleur
11962 ;; This package does not seem to support python3 at all, hence,
11963 ;; only the python2 variant definition is provided.
11964 (package
11965 (name "python2-couleur")
11966 (version "0.6.2")
11967 (source
11968 (origin
11969 (method url-fetch)
11970 (uri (pypi-uri "couleur" version))
11971 (sha256
11972 (base32
11973 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
11974 (build-system python-build-system)
11975 (arguments
11976 `(#:python ,python-2))
11977 (home-page "https://github.com/gabrielfalcao/couleur")
11978 (synopsis
11979 "ANSI terminal tool for python, colored shell and other handy fancy features")
11980 (description
11981 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
11982terminal such as coloured output in the shell, overwriting output, indentation, etc.")
11983 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
11984 ;; https://github.com/gabrielfalcao/couleur/issues/11
11985 (license license:lgpl3+)))
11986
11987(define-public python-misaka
11988 (package
11989 (name "python-misaka")
11990 (version "2.1.0")
11991 (source
11992 (origin
11993 (method url-fetch)
11994 (uri (pypi-uri "misaka" version))
11995 (sha256
11996 (base32
11997 "1yqrq3a5rracirmvk52n28nn6ckdaz897gnigv89a9gmyn87sqw7"))))
11998 (build-system python-build-system)
11999 (arguments
12000 `(;; Line 37 of setup.py calls self.run_command('develop')
12001 ;; in the 'check' phase. This command seems to be trying
12002 ;; to write to
12003 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
12004 ;; for which it does not have the permission to write.
12005 #:tests? #f))
12006 (propagated-inputs
12007 `(("python-cffi" ,python-cffi)))
12008 (home-page "https://github.com/FSX/misaka")
12009 (synopsis "Python binding for Hoedown")
12010 (description
12011 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
12012library written in C. It features a fast HTML renderer and functionality to make custom
12013renderers (e.g. man pages or LaTeX).")
12014 (license license:expat)))
12015
12016(define-public python2-misaka
12017 (package-with-python2 python-misaka))
12018
12019(define-public python2-steadymark
12020 ;; This is forced into being a python2 only variant
12021 ;; due to its dependence on couleur that has no support
12022 ;; for python3
12023 (package
12024 (name "python2-steadymark")
12025 (version "0.7.3")
12026 (source
12027 (origin
12028 (method url-fetch)
12029 (uri (pypi-uri "steadymark" version))
12030 (sha256
12031 (base32
12032 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
12033 (build-system python-build-system)
12034 (native-inputs
12035 `(("python-couleur" ,python2-couleur)
12036 ("python-sure" ,python2-sure)
12037 ("python-misaka" ,python2-misaka)))
12038 (arguments
12039 `(#:python ,python-2
12040 #:phases
12041 (modify-phases %standard-phases
12042 (add-before 'build 'patch-setup-py
12043 (lambda _
12044 ;; Update requirements from dependency==version
12045 ;; to dependency>=version
12046 (substitute* "setup.py"
12047 (("==") ">="))
12048 #t)))))
12049 (home-page "https://github.com/gabrielfalcao/steadymark")
12050 (synopsis "Markdown-based test runner for python")
12051 (description
12052 "@code{Steadymark} allows documentation to be written in github-flavoured
12053markdown. The documentation may contain snippets of code surrounded by python
12054code blocks and @code{Steadymark} will find these snippets and run them, making
12055sure that there are no old malfunctional examples in the documentation examples.")
12056 (license license:expat)))
12057
12058(define-public python-jsonpointer
12059 (package
12060 (name "python-jsonpointer")
12061 (version "1.10")
12062 (source
12063 (origin
12064 (method url-fetch)
12065 (uri (pypi-uri "jsonpointer" version))
12066 (sha256
12067 (base32
12068 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
12069 (build-system python-build-system)
12070 (home-page "https://github.com/stefankoegl/python-json-pointer")
12071 (synopsis "Identify specific nodes in a JSON document")
12072 (description "@code{jsonpointer} allows you to access specific nodes
12073by path in a JSON document (see RFC 6901).")
12074 (license license:bsd-3)))
12075
12076(define-public python2-jsonpointer
12077 (package-with-python2 python-jsonpointer))
12078
12079(define-public python-jsonpatch
12080 (package
12081 (name "python-jsonpatch")
12082 (version "1.16")
12083 (source
12084 (origin
12085 (method url-fetch)
12086 ;; pypi version lacks tests.js
12087 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12088 "archive/v" version ".tar.gz"))
12089 (file-name (string-append name "-" version ".tar.gz"))
12090 (sha256
12091 (base32
12092 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
12093 (build-system python-build-system)
12094 (native-inputs
12095 `(("python-jsonpointer" ,python-jsonpointer)))
12096 (home-page "https://github.com/stefankoegl/python-json-patch")
12097 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
12098 (description "@code{jsonpatch} is a library and program that allows
12099applying JSON Patches according to RFC 6902.")
12100 (license license:bsd-3)))
12101
12102(define-public python2-jsonpatch
12103 (package-with-python2 python-jsonpatch))
12104
12105(define-public python-jsonpatch-0.4
12106 (package (inherit python-jsonpatch)
12107 (name "python-jsonpatch")
12108 (version "0.4")
12109 (source
12110 (origin
12111 (method url-fetch)
12112 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12113 "archive/v" version ".tar.gz"))
12114 (file-name (string-append name "-" version ".tar.gz"))
12115 (sha256
12116 (base32
12117 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
12118
12119(define-public python2-jsonpatch-0.4
12120 (package-with-python2 python-jsonpatch-0.4))
12121
12122(define-public python-rfc3986
12123 (package
12124 (name "python-rfc3986")
12125 (version "1.1.0")
12126 (source (origin
12127 (method url-fetch)
12128 (uri (pypi-uri "rfc3986" version))
12129 (sha256
12130 (base32
12131 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
12132 (build-system python-build-system)
12133 (arguments
12134 `(#:modules ((guix build utils)
12135 (guix build python-build-system)
12136 (ice-9 ftw)
12137 (srfi srfi-1)
12138 (srfi srfi-26))
12139 #:phases
12140 (modify-phases %standard-phases
12141 (replace 'check
12142 (lambda _
12143 (let ((cwd (getcwd)))
12144 (setenv "PYTHONPATH"
12145 (string-append cwd "/build/"
12146 (find (cut string-prefix? "lib" <>)
12147 (scandir (string-append cwd "/build")))
12148 ":"
12149 (getenv "PYTHONPATH")))
12150 (invoke "pytest" "-v")))))))
12151 (native-inputs
12152 `(("python-pytest" ,python-pytest)))
12153 (home-page "https://rfc3986.readthedocs.io/")
12154 (synopsis "Parse and validate URI references")
12155 (description
12156 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
12157validation and authority parsing. This module also supports RFC@tie{}6874
12158which adds support for zone identifiers to IPv6 addresses.")
12159 (license license:asl2.0)))
12160
12161(define-public python2-rfc3986
12162 (package-with-python2 python-rfc3986))
12163
12164(define-public python-rfc3987
12165 (package
12166 (name "python-rfc3987")
12167 (version "1.3.7")
12168 (source
12169 (origin
12170 (method url-fetch)
12171 (uri (pypi-uri "rfc3987" version))
12172 (sha256
12173 (base32
12174 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
12175 (build-system python-build-system)
12176 (home-page "https://pypi.python.org/pypi/rfc3987")
12177 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
12178 (description "@code{rfc3987} provides routines for parsing and
12179validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
12180 (license license:gpl3+)))
12181
12182(define-public python2-rfc3987
12183 (package-with-python2 python-rfc3987))
12184
12185(define-public python-validate-email
12186 (package
12187 (name "python-validate-email")
12188 (version "1.3")
12189 (source
12190 (origin
12191 (method url-fetch)
12192 (uri (pypi-uri "validate_email" version))
12193 (sha256
12194 (base32
12195 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
12196 (build-system python-build-system)
12197 (home-page "https://github.com/syrusakbary/validate_email")
12198 (synopsis "Verifies if an email address is valid and really exists")
12199 (description "@code{validate_email} can be used to verify if an email
12200address is valid and really exists.")
12201 (license license:lgpl3+)))
12202
12203(define-public python2-validate-email
12204 (package-with-python2 python-validate-email))
12205
12206(define-public python-flex
12207 (package
12208 (name "python-flex")
12209 (version "6.10.0")
12210 (source
12211 (origin
12212 (method url-fetch)
12213 (uri (pypi-uri "flex" version))
12214 (sha256
12215 (base32
12216 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
12217 (build-system python-build-system)
12218 (propagated-inputs
12219 `(("python-click" ,python-click)
12220 ("python-iso8601" ,python-iso8601)
12221 ("python-jsonpointer" ,python-jsonpointer)
12222 ("python-pyyaml" ,python-pyyaml)
12223 ("python-requests" ,python-requests)
12224 ("python-rfc3987" ,python-rfc3987)
12225 ("python-six" ,python-six)
12226 ("python-validate-email" ,python-validate-email)))
12227 (home-page "https://github.com/pipermerriam/flex")
12228 (synopsis "Validates Swagger schemata")
12229 (description "@code{flex} can be used to validate Swagger schemata.")
12230 (license license:bsd-3)))
12231
12232(define-public python2-flex
12233 (package-with-python2 python-flex))
12234
12235(define-public python-marshmallow
12236 (package
12237 (name "python-marshmallow")
12238 (version "3.0.0b14")
12239 (source
12240 (origin
12241 (method url-fetch)
12242 (uri (pypi-uri "marshmallow" version))
12243 (sha256
12244 (base32
12245 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
12246 (build-system python-build-system)
12247 (propagated-inputs
12248 `(("python-dateutil" ,python-dateutil)
12249 ("python-simplejson" ,python-simplejson)))
12250 (native-inputs
12251 `(("python-pytest" ,python-pytest)
12252 ("python-pytz" ,python-pytz)))
12253 (home-page "https://github.com/marshmallow-code/marshmallow")
12254 (synopsis "Convert complex datatypes to and from native
12255Python datatypes.")
12256 (description "@code{marshmallow} provides a library for converting
12257complex datatypes to and from native Python datatypes.")
12258 (license license:expat)))
12259
12260(define-public python2-marshmallow
12261 (package-with-python2 python-marshmallow))
12262
12263(define-public python-apispec
12264 (package
12265 (name "python-apispec")
12266 (version "0.25.3")
12267 (source
12268 (origin
12269 (method url-fetch)
12270 (uri (pypi-uri "apispec" version))
12271 (sha256
12272 (base32
12273 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
12274 (build-system python-build-system)
12275 (propagated-inputs
12276 `(("python-pyyaml" ,python-pyyaml)))
12277 (native-inputs
12278 `(("python-pytest" ,python-pytest)
12279 ("python-flask" ,python-flask)
12280 ("python-marshmallow" ,python-marshmallow)
12281 ("python-tornado" ,python-tornado)
12282 ("python-bottle" ,python-bottle)
12283 ("python-mock" ,python-mock)))
12284 (home-page "https://github.com/marshmallow-code/apispec")
12285 (synopsis "Swagger 2.0 API specification generator")
12286 (description "@code{python-apispec} is a pluggable API specification
12287generator. Currently supports the OpenAPI specification (f.k.a.
12288Swagger 2.0).")
12289 (license license:expat)))
12290
12291(define-public python2-apispec
12292 (package-with-python2 python-apispec))
12293
12294(define-public python-flasgger
12295 (package
12296 (name "python-flasgger")
12297 (version "0.6.3")
12298 (source
12299 (origin
12300 (method url-fetch)
12301 (uri (string-append "https://github.com/rochacbruno/flasgger/archive/"
12302 version ".tar.gz"))
12303 (file-name (string-append name "-" version ".tar.gz"))
12304 (sha256
12305 (base32
12306 "1gqzlm0rb55fdpsy5ipkganlx9cnpi454fqyycr03jm22zql14ay"))))
12307 (build-system python-build-system)
12308 (arguments
12309 `(#:phases
12310 (modify-phases %standard-phases
12311 (replace 'check
12312 (lambda* (#:key inputs outputs #:allow-other-keys)
12313 (substitute* "Makefile"
12314 (("flake8 flasgger --ignore=F403")
12315 "flake8 flasgger --ignore=E731,F403"))
12316 (setenv "PYTHONPATH" (string-append (getcwd)
12317 ":"
12318 (getenv "PYTHONPATH")))
ac599a09 12319 (invoke "py.test"))))))
44d10b1f
RW
12320 (propagated-inputs
12321 `(("python-flask" ,python-flask)
12322 ("python-pyyaml" ,python-pyyaml)
12323 ("python-jsonschema" ,python-jsonschema)
12324 ("python-mistune" ,python-mistune)
12325 ("python-six" ,python-six)))
12326 (native-inputs
12327 `(("python-decorator" ,python-decorator)
12328 ("python-flake8" ,python-flake8)
12329 ("python-flask-restful" ,python-flask-restful)
12330 ("python-flex" ,python-flex)
12331 ("python-pytest" ,python-pytest)
12332 ("python-pytest-cov" ,python-pytest-cov)
12333 ("python-marshmallow" ,python-marshmallow)
12334 ("python-apispec" ,python-apispec)))
12335 (home-page "https://github.com/rochacbruno/flasgger/")
12336 (synopsis "Extract Swagger specs from your Flask project")
12337 (description "@code{python-flasgger} allows extracting Swagger specs
12338from your Flask project. It is a fork of Flask-Swagger.")
12339 (license license:expat)))
12340
12341(define-public python2-flasgger
12342 (package-with-python2 python-flasgger))
12343
12344(define-public python-swagger-spec-validator
12345 (package
12346 (name "python-swagger-spec-validator")
12347 (version "2.1.0")
12348 (source
12349 (origin
12350 (method url-fetch)
12351 (uri (pypi-uri "swagger-spec-validator" version))
12352 (sha256
12353 (base32
12354 "13hkpn2lycwr0468yqhjb3kwszqf7hjwlq61w7vdxq1caz31k4nw"))))
12355 (build-system python-build-system)
12356 (propagated-inputs
12357 `(("python-jsonschema" ,python-jsonschema)
12358 ("python-six" ,python-six)))
12359 (home-page
12360 "https://github.com/Yelp/swagger_spec_validator")
12361 (synopsis "Validation of Swagger specifications")
12362 (description "@code{swagger_spec_validator} provides a library for
12363validating Swagger API specifications.")
12364 (license license:asl2.0)))
12365
12366(define-public python2-swagger-spec-validator
12367 (package-with-python2 python-swagger-spec-validator))
12368
12369(define-public python-apache-libcloud
12370 (package
12371 (name "python-apache-libcloud")
12372 (version "2.4.0")
12373 (source
12374 (origin
12375 (method url-fetch)
12376 (uri (pypi-uri "apache-libcloud" version))
12377 (sha256
12378 (base32
12379 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
12380 (build-system python-build-system)
12381 (arguments
12382 `(#:phases
12383 (modify-phases %standard-phases
12384 (add-after 'unpack 'patch-ssh
12385 (lambda* (#:key inputs #:allow-other-keys)
12386 (substitute* "libcloud/compute/ssh.py"
12387 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
12388 "/bin/ssh" "'")))
12389 #t))
12390 (add-after 'unpack 'patch-tests
12391 (lambda _
12392 (substitute* "./libcloud/test/test_file_fixtures.py"
12393 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
12394 (("def _ascii") "def _raw_data(self, method, url, body, headers):
12395 return (httplib.OK,
12396 \"1234abcd\",
12397 {\"test\": \"value\"},
12398 httplib.responses[httplib.OK])
12399 def _ascii"))
12400 (substitute* "libcloud/test/compute/test_ssh_client.py"
12401 (("class ShellOutSSHClientTests")
12402 "@unittest.skip(\"Guix container doesn't have ssh service\")
12403class ShellOutSSHClientTests")
12404 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
12405 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
12406 (("'.xF0', '.x90', '.x8D', '.x88'")
12407 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
12408 #t))
12409 (add-before 'check 'copy-secret
12410 (lambda _
12411 (copy-file "libcloud/test/secrets.py-dist"
12412 "libcloud/test/secrets.py")
12413 #t)))))
12414 (inputs
12415 `(("openssh" ,openssh)))
12416 (propagated-inputs
12417 `(("python-paramiko" ,python-paramiko)
12418 ("python-requests" ,python-requests)))
12419 (native-inputs
12420 `(("python-lockfile" ,python-lockfile)
12421 ("python-mock" ,python-mock)
12422 ("python-pytest" ,python-pytest)
12423 ("python-pytest-runner" ,python-pytest-runner)
12424 ("python-requests-mock" ,python-requests-mock)))
12425 (home-page "https://libcloud.apache.org/")
12426 (synopsis "Unified Cloud API")
12427 (description "@code{libcloud} is a Python library for interacting with
12428many of the popular cloud service providers using a unified API.")
12429 (license license:asl2.0)))
12430
12431(define-public python2-apache-libcloud
12432 (package-with-python2 python-apache-libcloud))
12433
12434(define-public python-smmap2
12435 (package
12436 (name "python-smmap2")
12437 (version "2.0.3")
12438 (source
12439 (origin
12440 (method url-fetch)
12441 (uri (pypi-uri "smmap2" version))
12442 (sha256
12443 (base32
12444 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
12445 (build-system python-build-system)
12446 (native-inputs
12447 `(("python-nosexcover" ,python-nosexcover)))
12448 (home-page "https://github.com/Byron/smmap")
12449 (synopsis "Python sliding window memory map manager")
12450 (description "@code{smmap2} is a pure Python implementation of a sliding
12451window memory map manager.")
12452 (license license:bsd-3)))
12453
12454(define-public python2-smmap2
12455 (package-with-python2 python-smmap2))
12456
12457(define-public python-regex
12458 (package
12459 (name "python-regex")
12460 (version "2017.06.07")
12461 (source (origin
12462 (method url-fetch)
12463 (uri (pypi-uri "regex" version))
12464 (sha256
12465 (base32
12466 "06r6b7yigikbj3a72whl85r2b64pj1r0ypmw9yalmkm0wnxq8mz4"))))
12467 (build-system python-build-system)
12468 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
12469 (synopsis "Alternative regular expression module")
12470 (description "This regular expression implementation is backwards-
12471compatible with the standard @code{re} module, but offers additional
12472functionality like full case-folding for case-insensitive matches in Unicode.")
12473 (license license:psfl)))
12474
12475(define-public python2-regex
12476 (package-with-python2 python-regex))
12477
12478(define-public python2-pyopengl
12479 (package
12480 (name "python2-pyopengl")
12481 (version "3.1.0")
12482 (source
12483 (origin
12484 (method url-fetch)
12485 (uri (pypi-uri "PyOpenGL" version))
12486 (sha256
12487 (base32
12488 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
12489 (arguments
12490 `(#:python ,python-2))
12491 (build-system python-build-system)
12492 (home-page "http://pyopengl.sourceforge.net")
12493 (synopsis "Standard OpenGL bindings for Python")
12494 (description
12495 "PyOpenGL is the most common cross platform Python binding to OpenGL and
12496related APIs. The binding is created using the standard @code{ctypes}
12497library.")
12498 (license license:bsd-3)))
12499
12500(define-public python2-pyopengl-accelerate
12501 (package
12502 (inherit python2-pyopengl)
12503 (name "python2-pyopengl-accelerate")
12504 (version "3.1.0")
12505 (source
12506 (origin
12507 (method url-fetch)
12508 (uri (pypi-uri "PyOpenGL-accelerate" version))
12509 (sha256
12510 (base32
12511 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
12512 (synopsis "Acceleration code for PyOpenGL")
12513 (description
12514 "This is the Cython-coded accelerator module for PyOpenGL.")))
12515
12516(define-public python-rencode
12517 (package
12518 (name "python-rencode")
12519 (version "1.0.5")
12520 (source
12521 (origin
12522 (method url-fetch)
12523 (uri (pypi-uri "rencode" version))
12524 (sha256
12525 (base32
12526 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
12527 (build-system python-build-system)
12528 (arguments
12529 `(#:phases
12530 (modify-phases %standard-phases
12531 (add-before 'check 'delete-bogus-test
12532 ;; This test requires /home/aresch/Downloads, which is not provided by
12533 ;; the build environment.
12534 (lambda _
12535 (delete-file "rencode/t.py")
12536 #t)))))
12537 (native-inputs `(("pkg-config" ,pkg-config)
12538 ("python-cython" ,python-cython)))
12539 (home-page "https://github.com/aresch/rencode")
12540 (synopsis "Serialization of heterogeneous data structures")
12541 (description
12542 "The @code{rencode} module is a data structure serialization library,
12543similar to @code{bencode} from the BitTorrent project. For complex,
12544heterogeneous data structures with many small elements, r-encoding stake up
12545significantly less space than b-encodings. This version of rencode is a
12546complete rewrite in Cython to attempt to increase the performance over the
12547pure Python module.")
12548 (license license:bsd-3)))
12549
12550(define-public python2-rencode
12551 (package-with-python2 python-rencode))
12552
12553(define-public python-xenon
12554 (package
12555 (name "python-xenon")
12556 (version "0.5.4")
12557 (source
12558 (origin
12559 (method url-fetch)
12560 (uri (pypi-uri "xenon" version))
12561 (sha256
12562 (base32
12563 "029cbhysg2vr5n4jz8gpg2793f8wkwnqpr1qgv6c1dn685vy31mc"))))
12564 (build-system python-build-system)
12565 (native-inputs
12566 `(("python-pyyaml" ,python-pyyaml)
12567 ("python-radon" ,python-radon)
12568 ("python-requests" ,python-requests)
12569 ("python-flake8" ,python-flake8)
12570 ("python-tox" ,python-tox)))
12571 (arguments
12572 `(#:phases
12573 (modify-phases %standard-phases
12574 (add-before 'build 'patch-test-requirements
12575 (lambda _
12576 ;; Remove httpretty dependency for tests.
12577 (substitute* "setup.py"
12578 (("httpretty") ""))
12579 #t)))))
12580 (home-page "https://xenon.readthedocs.org/")
12581 (synopsis "Monitor code metrics for Python on your CI server")
12582 (description
12583 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
12584Ideally, @code{xenon} is run every time code is committed. Through command
12585line options, various thresholds can be set for the complexity of code. It
12586will fail (i.e. it will exit with a non-zero exit code) when any of these
12587requirements is not met.")
12588 (license license:expat)))
12589
12590(define-public python2-xenon
12591 (package-with-python2 python-xenon))
12592
12593(define-public python-pysocks
12594 (package
12595 (name "python-pysocks")
12596 (version "1.6.8")
12597 (source
12598 (origin
12599 (method url-fetch)
12600 (uri (pypi-uri "PySocks" version))
12601 (sha256
12602 (base32
12603 "0wn6xafwy9c1gamwljw3fyvih5w19qy9xp39zmv8c90ai5ajrr9z"))))
12604 (build-system python-build-system)
12605 (arguments `(#:tests? #f))
12606 (home-page "https://github.com/Anorov/PySocks")
12607 (synopsis "SOCKS client module")
12608 (description "@code{pysocks} is an updated and semi-actively maintained
12609version of @code{SocksiPy} with bug fixes and extra features.")
12610 (license license:bsd-3)))
12611
12612(define-public python2-pysocks
12613 (package-with-python2 python-pysocks))
12614
12615(define-public python-pydiff
12616 (package
12617 (name "python-pydiff")
12618 (version "0.2")
12619 (source
12620 (origin
12621 (method url-fetch)
12622 (uri (pypi-uri "pydiff" version))
12623 (sha256
12624 (base32
12625 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
12626 (build-system python-build-system)
12627 (home-page "https://github.com/myint/pydiff")
12628 (synopsis "Library to diff two Python files at the bytecode level")
12629 (description
12630 "@code{pydiff} makes it easy to look for actual code changes while
12631ignoring formatting changes.")
12632 (license license:expat)))
12633
12634(define-public python2-pydiff
12635 (package-with-python2 python-pydiff))
12636
12637(define-public python-tqdm
12638 (package
12639 (name "python-tqdm")
12640 (version "4.19.6")
12641 (source
12642 (origin
12643 (method url-fetch)
12644 (uri (pypi-uri "tqdm" version))
12645 (sha256
12646 (base32
12647 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
12648 (build-system python-build-system)
12649 (native-inputs
12650 `(("python-flake8" ,python-flake8)
12651 ("python-nose" ,python-nose)
12652 ("python-coverage" ,python-coverage)))
12653 (home-page "https://github.com/tqdm/tqdm")
12654 (synopsis "Fast, extensible progress meter")
12655 (description
12656 "Make loops show a progress bar on the console by just wrapping any
12657iterable with @code{|tqdm(iterable)|}. Offers many options to define
12658design and layout.")
12659 (license (list license:mpl2.0 license:expat))))
12660
12661(define-public python2-tqdm
12662 (package-with-python2 python-tqdm))
12663
12664(define-public python-pkginfo
12665 (package
12666 (name "python-pkginfo")
12667 (version "1.4.2")
12668 (source
12669 (origin
12670 (method url-fetch)
12671 (uri (pypi-uri "pkginfo" version))
12672 (sha256
12673 (base32
12674 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
12675 (build-system python-build-system)
12676 (arguments
12677 ;; The tests are broken upstream.
12678 '(#:tests? #f))
12679 (home-page
12680 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
12681 (synopsis
12682 "Query metadatdata from sdists, bdists, and installed packages")
12683 (description
12684 "API to query the distutils metadata written in @file{PKG-INFO} inside a
12685source distriubtion (an sdist) or a binary distribution (e.g., created by
12686running bdist_egg). It can also query the EGG-INFO directory of an installed
12687distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
12688created by running @code{python setup.py develop}).")
12689 (license license:expat)))
12690
12691(define-public python2-pkginfo
12692 (package-with-python2 python-pkginfo))
12693
12694(define-public python-twine
12695 (package
12696 (name "python-twine")
12697 (version "1.9.1")
12698 (source
12699 (origin
12700 (method url-fetch)
12701 (uri (pypi-uri "twine" version))
12702 (sha256
12703 (base32
12704 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
12705 (build-system python-build-system)
12706 (propagated-inputs
12707 `(("python-tqdm" ,python-tqdm)
12708 ("python-pkginfo" ,python-pkginfo)
12709 ("python-requests" ,python-requests)
12710 ("python-requests-toolbelt" ,python-requests-toolbelt)))
12711 (home-page "https://github.com/pypa/twine")
12712 (synopsis "Collection of utilities for interacting with PyPI")
12713 (description
12714 "@code{twine} currently supports registering projects and uploading
12715distributions. It authenticates the user over HTTPS, allows them to pre-sign
12716their files and supports any packaging format (including wheels).")
12717 (license license:asl2.0)))
12718
12719(define-public python2-twine
12720 (package-with-python2 python-twine))
12721
12722(define-public python-linecache2
12723 (package
12724 (name "python-linecache2")
12725 (version "1.0.0")
12726 (source
12727 (origin
12728 (method url-fetch)
12729 (uri (pypi-uri "linecache2" version))
12730 (sha256
12731 (base32
12732 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
12733 (build-system python-build-system)
12734 (arguments
12735 `(;; The tests depend on unittest2, and our version is a bit too old.
12736 #:tests? #f))
12737 (native-inputs
12738 `(("python-pbr" ,python-pbr-minimal)))
12739 (home-page
12740 "https://github.com/testing-cabal/linecache2")
12741 (synopsis "Backports of the linecache module")
12742 (description
12743 "The linecache module allows one to get any line from any file, while
12744attempting to optimize internally, using a cache, the common case where many
12745lines are read from a single file.")
12746 (license license:psfl)))
12747
12748(define-public python2-linecache2
12749 (package-with-python2 python-linecache2))
12750
12751(define-public python-traceback2
12752 (package
12753 (name "python-traceback2")
12754 (version "1.4.0")
12755 (source
12756 (origin
12757 (method url-fetch)
12758 (uri (pypi-uri "traceback2" version))
12759 (sha256
12760 (base32
12761 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
12762 (build-system python-build-system)
12763 (arguments
12764 `(;; python-traceback2 and python-unittest2 depend on one another.
12765 #:tests? #f))
12766 (native-inputs
12767 `(("python-pbr" ,python-pbr-minimal)))
12768 (propagated-inputs
12769 `(("python-linecache2" ,python-linecache2)))
12770 (home-page
12771 "https://github.com/testing-cabal/traceback2")
12772 (synopsis "Backports of the traceback module")
12773 (description
12774 "This module provides a standard interface to extract, format and print
12775stack traces of Python programs. It exactly mimics the behavior of the Python
12776interpreter when it prints a stack trace.")
12777 (license license:psfl)))
12778
12779(define-public python2-traceback2
12780 (package-with-python2 python-traceback2))
12781
12782(define-public python-ratelimiter
12783 (package
12784 (name "python-ratelimiter")
12785 (version "1.2.0")
12786 (source
12787 (origin
12788 (method url-fetch)
12789 (uri (pypi-uri "ratelimiter" version))
12790 (sha256
12791 (base32
12792 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
12793 (build-system python-build-system)
12794 (arguments
12795 '(#:tests? #f)) ; There are no tests in the pypi archive.
12796 (home-page "https://github.com/RazerM/ratelimiter")
12797 (synopsis "Simple rate limiting object")
12798 (description
12799 "The @code{ratelimiter} module ensures that an operation will not be
12800executed more than a given number of times during a given period.")
12801 (license license:asl2.0)))
12802
12803(define-public python2-ratelimiter
12804 (package-with-python2 python-ratelimiter))
12805
12806(define-public python-dukpy
12807 (package
12808 (name "python-dukpy")
12809 (version "0.3")
12810 (source
12811 (origin
12812 (method url-fetch)
12813 (uri (string-append "https://github.com/kovidgoyal/dukpy/archive/v"
12814 version ".tar.gz"))
12815 (file-name (string-append name "-" version ".tar.gz"))
12816 (sha256
12817 (base32
12818 "0pj39rfwlzivqm5hkrsza7gssg6ggpxlq5ivc8f3h7x5pfgc6y6c"))))
12819 (build-system python-build-system)
12820 (home-page "https://github.com/kovidgoyal/dukpy")
12821 (synopsis "Run JavaScript in python")
12822 (description
12823 "dukpy is a JavaScript runtime environment for Python using the duktape
12824embeddable JavaScript engine.")
12825 ;; Dukpy is licensed under MIT like the embedded duktape library,
12826 ;; with 'errors.c' as GPL3.
12827 (license (list license:expat license:gpl3))))
12828
12829(define-public python2-dukpy
12830 (package-with-python2 python-dukpy))
12831
12832(define-public python-jsonrpclib-pelix
12833 (package
12834 (name "python-jsonrpclib-pelix")
12835 (version "0.3.2")
12836 (source
12837 (origin
12838 (method url-fetch)
12839 (uri (pypi-uri "jsonrpclib-pelix" version))
12840 (sha256
12841 (base32
12842 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
12843 (build-system python-build-system)
12844 (arguments
12845 `(#:tests? #f)) ; no tests in PyPI tarball
12846 (home-page "https://github.com/tcalmant/jsonrpclib/")
12847 (synopsis "JSON-RPC 2.0 client library for Python")
12848 (description
12849 "This library implements the JSON-RPC v2.0
12850specification (backwards-compatible) as a client library for Python. This
12851version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
12852services.")
12853 (license license:asl2.0)))
12854
12855(define-public python2-jsonrpclib-pelix
12856 (package-with-python2 python-jsonrpclib-pelix))
12857
12858(define-public python-setuptools-scm-git-archive
12859 (package
12860 (name "python-setuptools-scm-git-archive")
12861 (version "1.0")
12862 (source
12863 (origin
12864 (method url-fetch)
12865 (uri (pypi-uri "setuptools_scm_git_archive" version))
12866 (sha256
12867 (base32
12868 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
12869 (build-system python-build-system)
12870 (native-inputs
12871 `(("python-pytest" ,python-pytest)))
12872 (propagated-inputs
12873 `(("python-setuptools-scm" ,python-setuptools-scm)))
12874 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
12875 (synopsis "Setuptools_scm plugin for git archives")
12876 (description
12877 "The setuptools_scm_git_archive package is a plugin to
12878setuptools_scm, which supports obtaining versions from git archives that
12879belong to tagged versions.")
12880 (license license:expat)))
12881
12882(define-public python2-setuptools-scm-git-archive
12883 (package-with-python2 python-setuptools-scm-git-archive))
12884
12885(define-public python-pyclipper
12886 (package
12887 (name "python-pyclipper")
12888 (version "1.1.0.post1")
12889 (source
12890 (origin
12891 (method url-fetch)
12892 (uri (pypi-uri "pyclipper" version ".zip"))
12893 (sha256
12894 (base32
12895 "0ldbkbnx94an4zzrwb1sxmg6k0jgk4cwmvcdyy8y5k1zslc612wa"))
12896 (modules '((guix build utils)))
12897 (snippet
12898 '(begin
12899 ;; This file is generated by Cython.
12900 (delete-file "pyclipper/pyclipper.cpp") #t))))
12901 (build-system python-build-system)
12902 (arguments
12903 `(#:phases
12904 (modify-phases %standard-phases
12905 (add-before 'build 'cythonize-sources
12906 (lambda _
12907 (with-directory-excursion "pyclipper"
12908 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
12909 (propagated-inputs
12910 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
12911 (native-inputs
12912 `(("python-cython" ,python-cython)
12913 ("python-pytest" ,python-pytest)
12914 ("python-pytest-runner" ,python-pytest-runner)
12915 ("python-unittest2" ,python-unittest2)
12916 ("unzip" ,unzip)))
12917 (home-page "https://github.com/greginvm/pyclipper")
12918 (synopsis "Wrapper for Angus Johnson's Clipper library")
12919 (description
12920 "Pyclipper is a Cython wrapper for the C++ translation of the
12921Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
12922 (license license:expat)))
12923
12924(define-public python2-pyclipper
12925 (package-with-python2 python-pyclipper))
12926
12927(define-public python2-booleanoperations
12928 (package
12929 (name "python2-booleanoperations")
12930 (version "0.7.1")
12931 (source
12932 (origin
12933 (method url-fetch)
12934 (uri (pypi-uri "booleanOperations" version ".zip"))
12935 (sha256
12936 (base32
12937 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
12938 (build-system python-build-system)
12939 (arguments
12940 `(#:python ,python-2))
12941 (native-inputs
12942 `(("unzip" ,unzip)
12943 ("python2-pytest" ,python2-pytest)
12944 ("python2-pytest-runner" ,python2-pytest-runner)))
12945 (propagated-inputs
12946 `(("python-fonttools" ,python2-fonttools)
12947 ("python-pyclipper" ,python2-pyclipper)
12948 ("python-ufolib" ,python2-ufolib)))
12949 (home-page "https://github.com/typemytype/booleanOperations")
12950 (synopsis "Boolean operations on paths")
12951 (description
12952 "BooleanOperations provides a Python library that enables
12953boolean operations on paths.")
12954 (license license:expat)))
12955
12956(define-public python-tempdir
12957 (package
12958 (name "python-tempdir")
12959 (version "0.7.1")
12960 (source
12961 (origin
12962 (method url-fetch)
12963 (uri (pypi-uri "tempdir" version))
12964 (sha256
12965 (base32
12966 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
12967 (build-system python-build-system)
12968 (home-page "https://pypi.org/project/tempdir/")
12969 (arguments
12970 ;; the package has no tests
12971 '(#:tests? #f))
12972 (synopsis "Python library for managing temporary directories")
12973 (description
12974 "This library manages temporary directories that are automatically
12975deleted with all their contents when they are no longer needed. It is
12976particularly convenient for use in tests.")
12977 (license license:expat)))
12978
12979(define-public python2-tempdir
12980 (package-with-python2 python-tempdir))
12981
12982(define-public python-activepapers
12983 (package
12984 (name "python-activepapers")
12985 (version "0.2.2")
12986 (source
12987 (origin
12988 (method url-fetch)
12989 (uri (pypi-uri "ActivePapers.Py" version))
12990 (sha256
12991 (base32
12992 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
12993 (build-system python-build-system)
12994 (arguments
12995 `(#:modules ((ice-9 ftw)
12996 (srfi srfi-1)
12997 (guix build utils)
12998 (guix build python-build-system))
12999
13000 #:phases
13001 (modify-phases %standard-phases
13002 (add-after 'unpack 'delete-python2-code
13003 (lambda _
13004 (for-each delete-file
13005 '("lib/activepapers/builtins2.py"
13006 "lib/activepapers/standardlib2.py"
13007 "lib/activepapers/utility2.py"))))
13008 (replace 'check
13009 (lambda _
13010 ;; Deactivate the test cases that download files
13011 (setenv "NO_NETWORK_ACCESS" "1")
13012 ;; For some strange reason, some tests fail if nosetests runs all
13013 ;; test modules in a single execution. They pass if each test
13014 ;; module is run individually.
13015 (for-each (lambda (filename)
13016 (invoke "nosetests"
13017 (string-append "tests/" filename)))
13018 (scandir "tests"
13019 (lambda (filename)
13020 (string-suffix? ".py" filename)))))))))
13021 (native-inputs
13022 `(("python-tempdir" ,python-tempdir)
13023 ("python-nose" ,python-nose)))
13024 (propagated-inputs
13025 `(("python-h5py" ,python-h5py)))
13026 (home-page "http://www.activepapers.org/")
13027 (synopsis "Executable papers for scientific computing")
13028 (description
13029 "ActivePapers is a tool for working with executable papers, which
13030combine data, code, and documentation in single-file packages,
13031suitable for publication as supplementary material or on repositories
13032such as figshare or Zenodo.")
13033 (properties `((python2-variant . ,(delay python2-activepapers))))
13034 (license license:bsd-3)))
13035
13036(define-public python2-activepapers
13037 (let ((base (package-with-python2
13038 (strip-python2-variant python-activepapers))))
13039 (package
13040 (inherit base)
13041 (arguments
13042 (substitute-keyword-arguments (package-arguments base)
13043 ((#:phases phases)
13044 `(modify-phases ,phases
13045 (delete 'delete-python2-code)
13046 (add-after 'unpack 'delete-python3-code
13047 (lambda _
13048 (for-each delete-file
13049 '("lib/activepapers/builtins3.py"
13050 "lib/activepapers/standardlib3.py"
13051 "lib/activepapers/utility3.py")))))))))))
13052
13053(define-public python-semver
13054 (package
13055 (name "python-semver")
13056 (version "2.7.9")
13057 (source
13058 (origin
13059 (method url-fetch)
13060 (uri (pypi-uri "semver" version))
13061 (sha256
13062 (base32
13063 "0hhgqppchv59rqj0yzi1prdg2nfsywqmjsqy2rycyxm0hvxmbyqz"))))
13064 (build-system python-build-system)
13065 (arguments
13066 `(#:phases
13067 (modify-phases %standard-phases
13068 (add-after 'unpack 'patch-test-requirements
13069 (lambda _
13070 (substitute* "setup.py"
13071 ;; Our Python is new enough.
13072 (("'virtualenv<14\\.0\\.0'") "'virtualenv'"))
13073 #t)))))
13074 (native-inputs
13075 `(("python-tox" ,python-tox)
13076 ("python-virtualenv" ,python-virtualenv)))
13077 (home-page "https://github.com/k-bx/python-semver")
13078 (synopsis "Python helper for Semantic Versioning")
13079 (description "This package provides a Python library for
13080@url{Semantic Versioning, http://semver.org/}.")
13081 (license license:bsd-3)))
13082
13083(define-public python2-semver
13084 (package-with-python2 python-semver))
13085
13086(define-public python-pyro4
13087 (package
13088 (name "python-pyro4")
13089 (version "4.74")
13090 (source
13091 (origin
13092 (method url-fetch)
13093 (uri (pypi-uri "Pyro4" version))
13094 (sha256
13095 (base32
13096 "0pzp7c6q3vvkxq0wy9lr6wd5wky40sajz69g697i5rb2q497pvc9"))))
13097 (build-system python-build-system)
13098 (propagated-inputs
13099 `(("python-serpent" ,python-serpent)))
13100 (home-page "https://pyro4.readthedocs.io")
13101 (synopsis "Distributed object middleware for Python")
13102 (description
13103 "Pyro enables you to build applications in which objects can talk to each
13104other over the network. You can just use normal Python method calls to call
13105objects on other machines, also known as remote procedure calls (RPC).")
13106 (license license:expat)))
13107
13108(define-public python2-pyro
13109 (package
13110 (name "python2-pyro")
13111 (version "3.16")
13112 (source
13113 (origin
13114 (method url-fetch)
13115 (uri (pypi-uri "Pyro" version))
13116 (file-name (string-append "Pyro-" version ".tar.gz"))
13117 (sha256
13118 (base32
13119 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
13120 (build-system python-build-system)
13121 (arguments
13122 ;; Pyro is not compatible with Python 3
13123 `(#:python ,python-2
13124 ;; Pyro has no test cases for automatic execution
13125 #:tests? #f))
13126 (home-page "http://pythonhosted.org/Pyro/")
13127 (synopsis "Distributed object manager for Python")
13128 (description "Pyro is a Distributed Object Technology system
13129written in Python that is designed to be easy to use. It resembles
13130Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
13131which is a system and language independent Distributed Object Technology
13132and has much more to offer than Pyro or RMI. Pyro 3.x is no
13133longer maintained. New projects should use Pyro4 instead, which
13134is the new Pyro version that is actively developed.")
13135 (license license:expat)))
13136
13137(define-public python2-scientific
13138 (package
13139 (name "python2-scientific")
13140 (version "2.9.4")
13141 (source
13142 (origin
13143 (method url-fetch)
13144 (uri (string-append "https://bitbucket.org/khinsen/"
13145 "scientificpython/downloads/ScientificPython-"
13146 version ".tar.gz"))
13147 (file-name (string-append "ScientificPython-" version ".tar.gz"))
13148 (sha256
13149 (base32
13150 "0fc69zhlsn9d2jvbzyjl9ah53vj598h84nkq230c83ahfvgzx5y3"))))
13151 (build-system python-build-system)
13152 (inputs
13153 `(("netcdf" ,netcdf)))
13154 (propagated-inputs
13155 `(("python-numpy" ,python2-numpy-1.8)
13156 ("python-pyro" ,python2-pyro)))
13157 (arguments
13158 ;; ScientificPython is not compatible with Python 3
13159 `(#:python ,python-2
13160 #:tests? #f ; No test suite
13161 #:phases
13162 (modify-phases %standard-phases
13163 (replace 'build
13164 (lambda* (#:key inputs #:allow-other-keys)
77e61e25
RW
13165 (invoke "python" "setup.py" "build"
13166 (string-append "--netcdf_prefix="
13167 (assoc-ref inputs "netcdf"))))))))
44d10b1f
RW
13168 (home-page "https://bitbucket.org/khinsen/scientificpython")
13169 (synopsis "Python modules for scientific computing")
13170 (description "ScientificPython is a collection of Python modules that are
13171useful for scientific computing. Most modules are rather general (Geometry,
13172physical units, automatic derivatives, ...) whereas others are more
13173domain-specific (e.g. netCDF and PDB support). The library is currently
13174not actively maintained and works only with Python 2 and NumPy < 1.9.")
13175 (license license:cecill-c)))
13176
13177(define-public python2-mmtk
13178 (package
13179 (name "python2-mmtk")
13180 (version "2.7.11")
13181 (source
13182 (origin
13183 (method url-fetch)
13184 (uri (string-append "https://bitbucket.org/khinsen/"
13185 "mmtk/downloads/MMTK-" version ".tar.gz"))
13186 (file-name (string-append "MMTK-" version ".tar.gz"))
13187 (sha256
13188 (base32
13189 "1d0nnjx4lwsvh8f99vv1r6gi50d93yba0adkz8b4zgv4za4c5862"))))
13190 (build-system python-build-system)
13191 (native-inputs
13192 `(("netcdf" ,netcdf)))
13193 (propagated-inputs
13194 `(("python-scientific" ,python2-scientific)
13195 ("python-tkinter" ,python-2 "tk")))
13196 (arguments
13197 `(#:python ,python-2
13198 #:tests? #f
13199 #:phases
13200 (modify-phases %standard-phases
13201 (add-before 'build 'includes-from-scientific
13202 (lambda* (#:key inputs #:allow-other-keys)
13203 (mkdir-p "Include/Scientific")
13204 (copy-recursively
13205 (string-append
13206 (assoc-ref inputs "python-scientific")
13207 "/include/python2.7/Scientific")
13208 "Include/Scientific"))))))
13209 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
13210 (synopsis "Python library for molecular simulation")
13211 (description "MMTK is a library for molecular simulations with an emphasis
13212on biomolecules. It provides widely used methods such as Molecular Dynamics
13213and normal mode analysis, but also basic routines for implementing new methods
13214for simulation and analysis. The library is currently not actively maintained
13215and works only with Python 2 and NumPy < 1.9.")
13216 (license license:cecill-c)))
13217
13218(define-public python-phonenumbers
13219 (package
13220 (name "python-phonenumbers")
13221 (version "8.9.1")
13222 (source
13223 (origin
13224 (method url-fetch)
13225 (uri (pypi-uri "phonenumbers" version))
13226 (sha256
13227 (base32
13228 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
13229 (build-system python-build-system)
13230 (home-page
13231 "https://github.com/daviddrysdale/python-phonenumbers")
13232 (synopsis
13233 "Python library for dealing with international phone numbers")
13234 (description
13235 "This package provides a Python port of Google's libphonenumber library.")
13236 (license license:asl2.0)))
13237
13238(define-public python2-phonenumbers
13239 (package-with-python2 python-phonenumbers))
13240
13241(define-public python-send2trash
13242 (package
13243 (name "python-send2trash")
13244 (version "1.4.2")
13245 (source
13246 (origin (method url-fetch)
13247 ;; Source tarball on PyPI doesn't include tests.
13248 (uri (string-append "https://github.com/hsoft/send2trash/archive/"
13249 version ".tar.gz"))
13250 (file-name (string-append name "-" version ".tar.gz"))
13251 (sha256
13252 (base32
13253 "0ffyhwjyx61slkdy38iwjc4gmj7fj9gs2q58f075gwvq630pzm9z"))))
13254 (build-system python-build-system)
13255 (arguments
13256 '(#:phases
13257 (modify-phases %standard-phases
13258 (add-before 'check 'pre-check
13259 (lambda _
13260 (mkdir-p "/tmp/foo")
13261 (setenv "HOME" "/tmp/foo")
13262 #t)))))
13263 (home-page "https://github.com/hsoft/send2trash")
13264 (synopsis "Send files to the user's @file{~/Trash} directory")
13265 (description "This package provides a Python library to send files to the
13266user's @file{~/Trash} directory.")
13267 (license license:bsd-3)))
13268
13269(define-public python2-send2trash
13270 (package
13271 (inherit (package-with-python2 python-send2trash))
13272 (arguments
13273 (substitute-keyword-arguments (package-arguments python-send2trash)
13274 ((#:phases phases)
13275 `(modify-phases ,phases
13276 (add-before 'check 'setenv
13277 (lambda _
13278 (setenv "PYTHONPATH"
13279 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
13280 #t))))))
13281 (properties `((python2-variant . ,(delay python-send2trash))))))
13282
13283(define-public python-yapf
13284 (package
13285 (name "python-yapf")
13286 (version "0.24.0")
13287 (source
13288 (origin
13289 (method url-fetch)
13290 (uri (pypi-uri "yapf" version))
13291 (sha256
13292 (base32
13293 "0anwby0ydmyzcsgjc5dn1ryddwvii4dq61vck447q0n96npnzfyf"))))
13294 (build-system python-build-system)
13295 (home-page "https://github.com/google/yapf")
13296 (synopsis "Formatter for Python code")
13297 (description "YAPF is a formatter for Python code. It's based off of
13298@dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
13299takes the code and reformats it to the best formatting that conforms to the
13300style guide, even if the original code didn't violate the style guide.")
13301 (license license:asl2.0)))
13302
13303(define-public python2-yapf
13304 (package-with-python2 python-yapf))
13305
13306(define-public python-gyp
13307 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
13308 (revision "0"))
13309 (package
13310 (name "python-gyp")
13311 ;; Google does not release versions,
13312 ;; based on second most recent commit date.
13313 (version (git-version "0.0.0" revision commit))
13314 (source
13315 (origin
13316 ;; Google does not release tarballs,
13317 ;; git checkout is needed.
13318 (method git-fetch)
13319 (uri (git-reference
13320 (url "https://chromium.googlesource.com/external/gyp")
13321 (commit commit)))
13322 (file-name (git-file-name name version))
13323 (sha256
13324 (base32
13325 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
13326 (build-system python-build-system)
13327 (home-page "https://gyp.gsrc.io/")
13328 (synopsis "GYP is a Meta-Build system")
13329 (description
13330 "GYP builds build systems for large, cross platform applications.
13331It can be used to generate XCode projects, Visual Studio projects, Ninja build
13332files, and Makefiles.")
13333 (license license:bsd-3))))
13334
13335(define-public python2-gyp
13336 (package-with-python2 python-gyp))
13337
13338(define-public python-whatever
13339 (package
13340 (name "python-whatever")
13341 (version "0.5")
13342 (source
13343 (origin
13344 (method url-fetch)
13345 (uri (string-append "https://github.com/Suor/whatever/archive/" version
13346 ".tar.gz"))
13347 (sha256
13348 (base32
13349 "1iqvnaf0zpc6b4rvbqq4xy45mszcscyzpzknv8wg6j84pbp22sap"))
13350 (file-name (string-append name "-" version ".tar.gz"))))
13351 (build-system python-build-system)
13352 (arguments
13353 `(#:phases
13354 (modify-phases %standard-phases
13355 (replace 'check
13356 (lambda _
13357 (invoke "py.test"))))))
13358 (native-inputs
13359 `(("python-pytest" ,python-pytest)))
13360 (home-page "http://github.com/Suor/whatever")
13361 (synopsis "Make anonymous functions by partial application of operators")
13362 (description "@code{whatever} provides an easy way to make anonymous
13363functions by partial application of operators.")
13364 (license license:bsd-3)))
13365
13366(define-public python2-whatever
13367 (package-with-python2 python-whatever))
13368
13369(define-public python-funcy
13370 (package
13371 (name "python-funcy")
13372 (version "1.10")
13373 (source
13374 (origin
13375 (method url-fetch)
13376 (uri (string-append "https://github.com/Suor/funcy/archive/" version
13377 ".tar.gz"))
13378 (sha256
13379 (base32
13380 "1fanxivsip29vgarw6dn39xym3q4pbxcpa11plpp548lvxajpahz"))
13381 (file-name (string-append name "-" version ".tar.gz"))))
13382 (build-system python-build-system)
13383 (arguments
13384 `(#:phases
13385 (modify-phases %standard-phases
13386 (replace 'check
13387 (lambda _
13388 (invoke "py.test"))))))
13389 (native-inputs
13390 `(("python-pytest" ,python-pytest)
13391 ("python-whatever" ,python-whatever)))
13392 (home-page "http://github.com/Suor/funcy")
13393 (synopsis "Functional tools")
13394 (description "@code{funcy} is a library that provides functional tools.
13395Examples are:
13396@enumerate
13397@item merge - Merges collections of the same type
13398@item walk - Type-preserving map
13399@item select - Selects a part of a collection
13400@item take - Takes the first n items of a collection
13401@item first - Takes the first item of a collection
13402@item remove - Predicated-removes items of a collection
13403@item concat - Concatenates two collections
13404@item flatten - Flattens a collection with subcollections
13405@item distinct - Returns only distinct items
13406@item split - Predicated-splits a collection
13407@item split_at - Splits a collection at a given item
13408@item group_by - Groups items by group
13409@item pairwise - Pairs off adjacent items
13410@item partial - Partially-applies a function
13411@item curry - Curries a function
13412@item compose - Composes functions
13413@item complement - Complements a predicate
13414@item all_fn - \"all\" with predicate
13415@end enumerate")
13416 (license license:bsd-3)))
13417
13418(define-public python2-funcy
13419 (package-with-python2 python-funcy))
13420
13421(define-public python-isoweek
13422 (package
13423 (name "python-isoweek")
13424 (version "1.3.3")
13425 (source
13426 (origin
13427 (method url-fetch)
13428 (uri (pypi-uri "isoweek" version))
13429 (sha256
13430 (base32
13431 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
13432 (build-system python-build-system)
13433 (home-page "https://github.com/gisle/isoweek")
13434 (synopsis "Objects representing a week")
13435 (description "The @code{isoweek} module provide the class Week that
13436implements the week definition of ISO 8601. This standard also defines
13437a notation for identifying weeks; yyyyWww (where the W is a literal).
13438Week instances stringify to this form.")
13439 (license license:bsd-3)))
13440
13441(define-public python2-isoweek
13442 (package-with-python2 python-isoweek))
13443
13444(define-public python-tokenize-rt
13445 (package
13446 (name "python-tokenize-rt")
13447 (version "2.0.1")
13448 (source
13449 (origin
13450 (method url-fetch)
13451 (uri (pypi-uri "tokenize-rt" version))
13452 (sha256
13453 (base32
13454 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
13455 (build-system python-build-system)
13456 (home-page "https://github.com/asottile/tokenize-rt")
13457 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
13458 (description
13459 "This Python library is a wrapper around @code{tokenize} from the Python
13460standard library. It provides two additional tokens @code{ESCAPED_NL} and
13461@code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
13462and @code{tokens_to_src} to roundtrip.")
13463 (license license:expat)))
13464
13465(define-public python-future-fstrings
13466 (package
13467 (name "python-future-fstrings")
13468 (version "0.4.1")
13469 (source
13470 (origin
13471 (method url-fetch)
13472 (uri (pypi-uri "future_fstrings" version))
13473 (sha256
13474 (base32
13475 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
13476 (build-system python-build-system)
13477 (propagated-inputs
13478 `(("python-tokenize-rt" ,python-tokenize-rt)))
13479 (home-page "https://github.com/asottile/future-fstrings")
13480 (synopsis "Backport of fstrings to Python < 3.6")
13481 (description
13482 "This package provides a UTF-8 compatible encoding
13483@code{future_fstrings}, which performs source manipulation. It decodes the
13484source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
13485@code{f} strings.")
13486 (license license:expat)))
13487
13488(define-public python-typing
13489 (package
13490 (name "python-typing")
13491 (version "3.6.6")
13492 (source
13493 (origin
13494 (method url-fetch)
13495 (uri (pypi-uri "typing" version))
13496 (sha256
13497 (base32
13498 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
13499 (build-system python-build-system)
13500 (home-page "https://docs.python.org/3/library/typing.html")
13501 (synopsis "Type hints for Python")
13502 (description "This is a backport of the standard library @code{typing}
13503module to Python versions older than 3.5. Typing defines a standard notation
13504for Python function and variable type annotations. The notation can be used
13505for documenting code in a concise, standard format, and it has been designed
13506to also be used by static and runtime type checkers, static analyzers, IDEs
13507and other tools.")
13508 (license license:psfl)))
13509
13510(define-public python2-typing
13511 (package-with-python2 python-typing))
13512
13513(define-public bpython
13514 (package
13515 (name "bpython")
13516 (version "0.17.1")
13517 (source
13518 (origin
13519 (method url-fetch)
13520 (uri (pypi-uri "bpython" version))
13521 (sha256
13522 (base32
13523 "0bxhxi5zxdkrf8b4gwn0d363kdz3qnypjwhm1aydki53ph8ca1w9"))))
13524 (build-system python-build-system)
13525 (arguments
13526 `(#:phases
13527 (modify-phases %standard-phases
13528 (add-after 'unpack 'remove-failing-test
13529 (lambda _
13530 ;; Remove failing test. FIXME: make it pass
13531 (delete-file "bpython/test/test_args.py")
13532 #t))
13533 (add-after 'wrap 'add-aliases
13534 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
13535 (lambda* (#:key outputs #:allow-other-keys)
13536 (let ((out (assoc-ref outputs "out")))
13537 (for-each
13538 (lambda (old new)
13539 (symlink old (string-append out "/bin/" new)))
13540 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
13541 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
13542 #t)))))
13543 (propagated-inputs
13544 `(("python-pygments" ,python-pygments)
13545 ("python-requests" ,python-requests)
13546 ("python-babel" ,python-babel) ; optional, for internationalization
13547 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
13548 ("python-greenlet" ,python-greenlet)
13549 ("python-urwid" ,python-urwid) ; for bpython-urwid only
13550 ("python-six" ,python-six)))
13551 (native-inputs
13552 `(("python-sphinx" ,python-sphinx)
13553 ("python-mock" ,python-mock)))
13554 (home-page "https://bpython-interpreter.org/")
13555 (synopsis "Fancy interface to the Python interpreter")
13556 (description "Bpython is a fancy interface to the Python
13557interpreter. bpython's main features are
13558
13559@enumerate
13560@item in-line syntax highlighting,
13561@item readline-like autocomplete with suggestions displayed as you type,
13562@item expected parameter list for any Python function,
13563@item \"rewind\" function to pop the last line of code from memory and
13564 re-evaluate,
13565@item send the code you've entered off to a pastebin,
13566@item save the code you've entered to a file, and
13567@item auto-indentation.
13568@end enumerate")
13569 (license license:expat)))
13570
13571(define-public bpython2
13572 (let ((base (package-with-python2
13573 (strip-python2-variant bpython))))
13574 (package (inherit base)
13575 (name "bpython2")
13576 (arguments
13577 `(#:python ,python-2
13578 #:phases
13579 (modify-phases %standard-phases
13580 (add-after 'unpack 'remove-failing-test
13581 (lambda _
13582 ;; Remove failing test. FIXME: make it pass
13583 (delete-file "bpython/test/test_args.py")
13584 ;; Disable failing test-cases (renaming inhibits they are
13585 ;; discovered)
13586 (substitute* "bpython/test/test_curtsies_repl.py"
13587 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
13588 (string-append a "xxx_off_" b))
13589 (("^(\\s*def )(test_complex\\W)" _ a b)
13590 (string-append a "xxx_off_" b)))
13591 #t))
13592 (add-before 'build 'rename-scripts
13593 ;; rename the scripts to bypthon2, bpdb2, etc.
13594 (lambda _
13595 (substitute* "setup.py"
13596 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
13597 (string-append name "2" rest "\n"))
13598 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
13599 (string-append name "2" (or sub "") rest "\n")))
13600 #t))))))))
13601
13602(define-public python-pyinotify
13603 (package
13604 (name "python-pyinotify")
13605 (version "0.9.6")
13606 (source (origin
13607 (method url-fetch)
13608 (uri (pypi-uri "pyinotify" version))
13609 (sha256
13610 (base32
13611 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
13612 (build-system python-build-system)
13613 (arguments `(#:tests? #f)) ;no tests
13614 (home-page "https://github.com/seb-m/pyinotify")
13615 (synopsis "Python library for monitoring inotify events")
13616 (description
13617 "@code{pyinotify} provides a Python interface for monitoring
13618file system events on Linux.")
13619 (license license:expat)))
13620
13621(define-public python2-pyinotify
13622 (package-with-python2 python-pyinotify))
13623
13624;; Ada parser uses this version.
13625(define-public python2-quex-0.67.3
13626 (package
13627 (name "python2-quex")
13628 (version "0.67.3")
13629 (source
13630 (origin
13631 (method url-fetch)
13632 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
13633 (version-major+minor version)
13634 "/quex-" version ".zip"))
13635 (sha256
13636 (base32
13637 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
13638 (build-system python-build-system)
13639 (native-inputs
13640 `(("unzip" ,unzip)))
13641 (arguments
13642 `(#:python ,python-2
13643 #:tests? #f
13644 #:phases
13645 (modify-phases %standard-phases
13646 (delete 'configure)
13647 (delete 'build)
13648 (replace 'install
13649 (lambda* (#:key outputs #:allow-other-keys)
13650 (let* ((out (assoc-ref outputs "out"))
13651 (share/quex (string-append out "/share/quex"))
13652 (bin (string-append out "/bin")))
13653 (copy-recursively "." share/quex)
13654 (mkdir-p bin)
13655 (symlink (string-append share/quex "/quex-exe.py")
13656 (string-append bin "/quex"))
13657 #t))))))
13658 (native-search-paths
13659 (list (search-path-specification
13660 (variable "QUEX_PATH")
13661 (files '("share/quex")))))
13662 (home-page "http://quex.sourceforge.net/")
13663 (synopsis "Lexical analyzer generator in Python")
13664 (description "@code{quex} is a lexical analyzer generator in Python.")
13665 (license license:lgpl2.1+))) ; Non-military
13666
13667(define-public python2-quex
13668 (package (inherit python2-quex-0.67.3)
13669 (name "python2-quex")
13670 (version "0.68.1")
13671 (source
13672 (origin
13673 (method url-fetch)
13674 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
13675 (sha256
13676 (base32
13677 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
13678 (file-name (string-append name "-" version ".tar.gz"))))))
13679
13680(define-public python-more-itertools
13681 (package
13682 (name "python-more-itertools")
13683 (version "4.3.0")
13684 (source
13685 (origin
13686 (method url-fetch)
13687 (uri (pypi-uri "more-itertools" version))
13688 (sha256
13689 (base32
13690 "17h3na0rdh8xq30w4b9pizgkdxmm51896bxw600x84jflg9vaxn4"))))
13691 (build-system python-build-system)
13692 (arguments
13693 `(,@(if (any (cute string-prefix? <> (or (%current-system)
13694 (%current-target-system)))
13695 '("armhf" "i686"))
13696 '(#:phases
13697 (modify-phases %standard-phases
13698 ;; This is required for 32-bit hardware.
13699 ;; TODO: Try to remove this when upgrading.
13700 (add-after 'unpack 'patch-test
13701 (lambda _
13702 (substitute* "more_itertools/tests/test_more.py"
13703 (("10 \\*\\* 10") "9 ** 9"))
13704 #t))))
13705 '())))
13706 (propagated-inputs
13707 `(("python-six" ,python-six-bootstrap)))
13708 (home-page "https://github.com/erikrose/more-itertools")
13709 (synopsis "More routines for operating on iterables, beyond itertools")
13710 (description "Python's built-in @code{itertools} module implements a
13711number of iterator building blocks inspired by constructs from APL, Haskell,
13712and SML. @code{more-itertools} includes additional building blocks for
13713working with iterables.")
13714 (license license:expat)))
13715
13716(define-public python2-more-itertools
13717 (package-with-python2 python-more-itertools))
13718
13719(define-public python-latexcodec
13720 (package
13721 (name "python-latexcodec")
13722 (version "1.0.5")
13723 (source
13724 (origin
13725 (method url-fetch)
13726 (uri (pypi-uri "latexcodec" version))
13727 (sha256
13728 (base32
13729 "0zdd1gf24i83ykadx0y30n3001j43scqr2saql3vckk5c39dj1wn"))))
13730 (build-system python-build-system)
13731 (inputs
13732 `(("python-six" ,python-six)))
13733 (home-page "https://readthedocs.org/projects/latexcodec/")
13734 (synopsis "Work with LaTeX code in Python")
13735 (description "Lexer and codec to work with LaTeX code in Python.")
13736 (license license:expat)))
13737
13738(define-public python-pybtex
13739 (package
13740 (name "python-pybtex")
13741 (version "0.21")
13742 (source
13743 (origin
13744 (method url-fetch)
13745 (uri (pypi-uri "pybtex" version))
13746 (sha256
13747 (base32
13748 "00300j8dn5pxq4ndxmfmbmycg2znawkqs49val2x6jlmfiy6r2mg"))))
13749 (build-system python-build-system)
13750 (native-inputs
13751 `(("python-nose" ,python-nose)))
13752 (inputs
13753 `(("python-latexcodec" ,python-latexcodec)
13754 ("python-pyyaml" ,python-pyyaml)
13755 ("python-six" ,python-six)))
13756 (arguments
13757 `(#:test-target "nosetests"))
13758 (home-page "https://pybtex.org/")
13759 (synopsis "BibTeX-compatible bibliography processor")
13760 (description "Pybtex is a BibTeX-compatible bibliography processor written
13761in Python. You can simply type pybtex instead of bibtex.")
13762 (license license:expat)))
13763
13764(define-public python-onetimepass
13765 (package
13766 (name "python-onetimepass")
13767 (version "1.0.1")
13768 (source
13769 (origin
13770 (method url-fetch)
13771 (uri (pypi-uri "onetimepass" version))
13772 (sha256
13773 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
13774 (build-system python-build-system)
13775 (propagated-inputs `(("python-six" ,python-six)))
13776 (home-page "https://github.com/tadeck/onetimepass/")
13777 (synopsis "One-time password library")
13778 (description "Python one-time password library for HMAC-based (HOTP) and
13779time-based (TOTP) passwords.")
13780 (license license:expat)))
13781
13782(define-public python-parso
13783 (package
13784 (name "python-parso")
13785 (version "0.3.1")
13786 (source
13787 (origin
13788 (method url-fetch)
13789 (uri (pypi-uri "parso" version))
13790 (sha256
13791 (base32
13792 "18p89iwcm8mnf380f92g9w0bhx5km8wxp392vvjcq4y1ld1llw1m"))))
13793 (native-inputs
13794 `(("python-pytest" ,python-pytest)))
13795 (build-system python-build-system)
13796 (home-page "https://github.com/davidhalter/parso")
13797 (synopsis "Python Parser")
13798 (description "Parso is a Python parser that supports error recovery and
13799round-trip parsing for different Python versions (in multiple Python versions).
13800Parso is also able to list multiple syntax errors in your Python file.")
13801 (license license:expat)))
13802
13803(define-public python2-parso
13804 (package-with-python2 python-parso))
13805
13806(define-public python-async-generator
13807 (package
13808 (name "python-async-generator")
13809 (version "1.9")
13810 (source
13811 (origin
13812 (method url-fetch)
13813 (uri (pypi-uri "async_generator" version))
13814 (sha256
13815 (base32
13816 "0wc3hidz1q85cja93k5pzybn0fprfnqyrv4qlkdqdzklc5f4dmdp"))))
13817 (build-system python-build-system)
13818 (native-inputs
13819 `(("python-pytest" ,python-pytest)))
13820 (home-page "https://github.com/python-trio/async_generator")
13821 (synopsis "Async generators and context managers for Python 3.5+")
13822 (description "@code{async_generator} back-ports Python 3.6's native async
13823generators and Python 3.7's context managers into Python 3.5.")
13824 ;; Dual licensed.
13825 (license (list license:expat license:asl2.0))))
13826
13827(define-public python-async-timeout
13828 (package
13829 (name "python-async-timeout")
13830 (version "3.0.1")
13831 (source
13832 (origin
13833 (method url-fetch)
13834 (uri (pypi-uri "async-timeout" version))
13835 (sha256
13836 (base32
13837 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
13838 (build-system python-build-system)
13839 (home-page "https://github.com/aio-libs/async_timeout/")
13840 (synopsis "Timeout context manager for asyncio programs")
13841 (description "@code{async-timeout} provides a timeout timeout context
13842manager compatible with @code{asyncio}.")
13843 (license license:asl2.0)))
13844
13845(define-public python-glob2
13846 (package
13847 (name "python-glob2")
13848 (version "0.6")
13849 (source (origin
13850 (method url-fetch)
13851 (uri (string-append
13852 "https://github.com/miracle2k/python-glob2/archive/"
13853 version
13854 ".tar.gz"))
13855 (sha256
13856 (base32
13857 "0ja168f0dz4kbz4m06dm0rd3acaypk6hjx2km541pw22y9s40mag"))
13858 (file-name (string-append name "-" version ".tar.gz"))))
13859 (build-system python-build-system)
13860 (home-page "https://github.com/miracle2k/python-glob2/")
13861 (synopsis "Extended Version of the python buildin glob module")
13862 (description "This is an extended version of the Python
13863@url{http://docs.python.org/library/glob.html, built-in glob module} which
13864adds:
13865
13866@itemize
13867@item The ability to capture the text matched by glob patterns, and return
13868those matches alongside the file names.
13869@item A recursive @code{**} globbing syntax, akin for example to the
13870@code{globstar} option of Bash.
13871@item The ability to replace the file system functions used, in order to glob
13872on virtual file systems.
13873@item Compatible with Python 2 and Python 3 (tested with 3.3).
13874@end itemize
13875
13876Glob2 currently based on the glob code from Python 3.3.1.")
13877 (license license:bsd-2)))
13878
13879(define-public python2-glob2
13880 (package-with-python2 python-glob2))
13881
13882(define-public python-gipc
13883 (package
13884 (name "python-gipc")
13885 (version "0.6.0")
13886 (source
13887 (origin
13888 (method url-fetch)
13889 (uri (pypi-uri "gipc" version ".zip"))
13890 (sha256
13891 (base32
13892 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
13893 (build-system python-build-system)
13894 (native-inputs
13895 `(("unzip" ,unzip)))
13896 (propagated-inputs
13897 `(("python-gevent" ,python-gevent)))
13898 (home-page "http://gehrcke.de/gipc")
13899 (synopsis "Child process management in the context of gevent")
13900 (description "Usage of Python's multiprocessing package in a
13901gevent-powered application may raise problems. With @code{gipc},
13902process-based child processes can safely be created anywhere within a
13903gevent-powered application.")
13904 (license license:expat)))
13905
13906(define-public python2-gipc
13907 (package-with-python2 python-gipc))
13908
13909(define-public python-fusepy
13910 (package
13911 (name "python-fusepy")
13912 (version "2.0.4")
13913 (source
13914 (origin
13915 (method url-fetch)
13916 (uri (pypi-uri "fusepy" version))
13917 (sha256
13918 (base32
13919 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
13920 (build-system python-build-system)
13921 (arguments
13922 `(#:phases
13923 (modify-phases %standard-phases
13924 (add-before 'build 'set-library-file-name
13925 (lambda* (#:key inputs #:allow-other-keys)
13926 (let ((fuse (assoc-ref inputs "fuse")))
13927 (substitute* "fuse.py"
13928 (("find_library\\('fuse'\\)")
13929 (string-append "'" fuse "/lib/libfuse.so'")))
13930 #t))))))
13931 (propagated-inputs
13932 `(("fuse" ,fuse)))
13933 (home-page "https://github.com/fusepy/fusepy")
13934 (synopsis "Simple ctypes bindings for FUSE")
13935 (description "Python module that provides a simple interface to FUSE and
13936MacFUSE. The binding is created using the standard @code{ctypes} library.")
13937 (license license:isc)))
13938
13939(define-public python2-fusepy
13940 (package-with-python2 python-fusepy))
13941
13942(define-public python2-gdrivefs
13943 (package
13944 (name "python2-gdrivefs")
13945 (version "0.14.9")
13946 (source
13947 (origin
13948 (method url-fetch)
13949 (uri (pypi-uri "gdrivefs" version))
13950 (sha256
13951 (base32
13952 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
13953 (build-system python-build-system)
13954 (arguments
13955 `(#:python ,python-2
13956 #:phases
13957 (modify-phases %standard-phases
13958 (add-before 'build 'patch-setup-py
13959 (lambda _
13960 ;; Update requirements from dependency==version
13961 ;; to dependency>=version
13962 (substitute* "gdrivefs/resources/requirements.txt"
13963 (("==") ">="))
13964 #t)))))
13965 (native-inputs
13966 `(("python2-gipc" ,python2-gipc)
13967 ("python2-gevent" ,python2-gevent)
13968 ("python2-greenlet" ,python2-greenlet)
13969 ("python2-httplib2" ,python2-httplib2)
13970 ("python2-uritemplate" ,python2-uritemplate)
13971 ("python2-oauth2client" ,python2-oauth2client)
13972 ("python2-six" ,python2-six)))
13973 (propagated-inputs
13974 `(("python2-dateutil" ,python2-dateutil)
13975 ("python2-fusepy" ,python2-fusepy)
13976 ("python2-google-api-client" ,python2-google-api-client)))
13977 (home-page "https://github.com/dsoprea/GDriveFS")
13978 (synopsis "Mount Google Drive as a local file system")
13979 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
13980under Python 2.7.")
13981 (license license:gpl2)))
13982
13983(define-public pybind11
13984 (package
13985 (name "pybind11")
13986 (version "2.2.4")
13987 (source (origin
13988 (method git-fetch)
13989 (uri (git-reference
13990 (url "https://github.com/pybind/pybind11.git")
13991 (commit (string-append "v" version))))
13992 (sha256
13993 (base32
13994 "0pa79ymcasv8br5ifbx7878id5py2jpjac3i20cqxr6gs9l6ivlv"))
13995 (file-name (git-file-name name version))))
13996 (build-system cmake-build-system)
13997 (native-inputs
13998 `(("python" ,python)
13999 ("python-pytest" ,python-pytest)))
14000 (arguments
14001 `(#:test-target "check"))
14002 (home-page "https://github.com/pybind/pybind11/")
14003 (synopsis "Seamless operability between C++11 and Python")
14004 (description "pybind11 is a lightweight header-only library that exposes
14005C++ types in Python and vice versa, mainly to create Python bindings of
14006existing C++ code. Its goals and syntax are similar to the excellent
14007Boost.Python library by David Abrahams: to minimize boilerplate code in
14008traditional extension modules by inferring type information using compile-time
14009introspection.")
14010 (license license:expat)))
14011
14012(define-public python-fasteners
14013 (package
14014 (name "python-fasteners")
14015 (version "0.14.1")
14016 (source
14017 (origin
14018 (method url-fetch)
14019 (uri (pypi-uri "fasteners" version))
14020 (sha256
14021 (base32
14022 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
14023 (build-system python-build-system)
14024 (propagated-inputs
14025 `(("python-monotonic" ,python-monotonic)
14026 ("python-six" ,python-six)
14027 ("python-testtools" ,python-testtools)))
14028 (home-page "https://github.com/harlowja/fasteners")
14029 (synopsis "Python package that provides useful locks")
14030 (description
14031 "This package provides a Python program that provides following locks:
14032
14033@itemize
14034@item Locking decorator
14035@item Reader-writer locks
14036@item Inter-process locks
14037@item Generic helpers
14038@end itemize\n")
14039 (properties `((python2-variant . ,(delay python2-fasteners))))
14040 (license license:asl2.0)))
14041
14042(define-public python2-fasteners
14043 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
14044 (package
14045 (inherit base)
14046 (propagated-inputs
14047 `(("python2-futures" ,python2-futures)
14048 ,@(package-propagated-inputs base))))))
14049
14050(define-public python-requests-file
14051 (package
14052 (name "python-requests-file")
14053 (version "1.4.3")
14054 (source
14055 (origin
14056 (method url-fetch)
14057 (uri (pypi-uri "requests-file" version))
14058 (sha256
14059 (base32
14060 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
14061 (build-system python-build-system)
14062 (propagated-inputs
14063 `(("python-requests" ,python-requests)
14064 ("python-six" ,python-six)))
14065 (home-page
14066 "https://github.com/dashea/requests-file")
14067 (synopsis "File transport adapter for Requests")
14068 (description
14069 "Requests-File is a transport adapter for use with the Requests Python
14070library to allow local filesystem access via file:// URLs.")
14071 (license license:asl2.0)))
14072
14073(define-public python2-requests-file
14074 (package-with-python2 python-requests-file))
14075
14076(define-public python-tldextract
14077 (package
14078 (name "python-tldextract")
14079 (version "2.2.0")
14080 (source
14081 (origin
14082 (method url-fetch)
14083 (uri (pypi-uri "tldextract" version))
14084 (sha256
14085 (base32
14086 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
14087 (build-system python-build-system)
14088 (native-inputs
14089 `(("python-pytest" ,python-pytest)
14090 ("python-responses" ,python-responses)))
14091 (propagated-inputs
14092 `(("python-idna" ,python-idna)
14093 ("python-requests" ,python-requests)
14094 ("python-requests-file" ,python-requests-file)))
14095 (home-page
14096 "https://github.com/john-kurkowski/tldextract")
14097 (synopsis
14098 "Separate the TLD from the registered domain and subdomains of a URL")
14099 (description
14100 "TLDExtract accurately separates the TLD from the registered domain and
14101subdomains of a URL, using the Public Suffix List. By default, this includes
14102the public ICANN TLDs and their exceptions. It can optionally support the
14103Public Suffix List's private domains as well.")
14104 (license license:bsd-3)))
14105
14106(define-public python2-tldextract
14107 (package-with-python2 python-tldextract))
14108
14109(define-public python-pynamecheap
14110 (package
14111 (name "python-pynamecheap")
14112 (version "0.0.3")
14113 (source
14114 (origin
14115 (method url-fetch)
14116 (uri (pypi-uri "PyNamecheap" version))
14117 (sha256
14118 (base32
14119 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
14120 (build-system python-build-system)
14121 (propagated-inputs
14122 `(("python-requests" ,python-requests)))
14123 (home-page
14124 "https://github.com/Bemmu/PyNamecheap")
14125 (synopsis
14126 "Namecheap API client in Python")
14127 (description
14128 "PyNamecheap is a Namecheap API client in Python.")
14129 (license license:expat)))
14130
14131(define-public python2-pynamecheap
14132 (package-with-python2 python-pynamecheap))
14133
14134(define-public python-dns-lexicon
14135 (package
14136 (name "python-dns-lexicon")
14137 (version "2.4.0")
14138 (source
14139 (origin
14140 (method url-fetch)
14141 (uri (pypi-uri "dns-lexicon" version))
14142 (sha256
14143 (base32
14144 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
14145 (build-system python-build-system)
14146 (arguments
14147 `(#:tests? #f)) ;requires internet access
14148 (propagated-inputs
14149 `(("python-future" ,python-future)
14150 ("python-pynamecheap" ,python-pynamecheap)
14151 ("python-requests" ,python-requests)
14152 ("python-tldextract" ,python-tldextract)
14153 ("python-urllib3" ,python-urllib3)))
14154 (home-page "https://github.com/AnalogJ/lexicon")
14155 (synopsis
14156 "Manipulate DNS records on various DNS providers")
14157 (description
14158 "Lexicon provides a way to manipulate DNS records on multiple DNS
14159providers in a standardized way. It has a CLI but it can also be used as a
14160Python library. It was designed to be used in automation, specifically with
14161Let's Encrypt.")
14162 (license license:expat)))
14163
14164(define-public python2-dns-lexicon
14165 (package-with-python2 python-dns-lexicon))
14166
14167(define-public python-commandlines
14168 (package
14169 (name "python-commandlines")
14170 (version "0.4.1")
14171 (source
14172 (origin
14173 (method url-fetch)
14174 (uri (pypi-uri "commandlines" version))
14175 (sha256
14176 (base32
14177 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
14178 (build-system python-build-system)
14179 (home-page "https://github.com/chrissimpkins/commandlines")
14180 (synopsis "Command line argument to object parsing library")
14181 (description
14182 "@code{Commandlines} is a Python library for command line application
14183development that supports command line argument parsing, command string
14184validation testing and application logic.")
14185 (license license:expat)))
14186
14187;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
14188;; python-numba. They have a very unflexible relationship.
14189(define-public python-numba
14190 (package
14191 (name "python-numba")
14192 (version "0.39.0")
14193 (source
14194 (origin
14195 (method url-fetch)
14196 (uri (pypi-uri "numba" version))
14197 (sha256
14198 (base32
14199 "1bibvkwga1v8293i9ivl469d8bzgabn3vgr2ig7c1i68v8frsx07"))))
14200 (build-system python-build-system)
14201 (arguments
14202 `(#:modules ((guix build utils)
14203 (guix build python-build-system)
14204 (ice-9 ftw)
14205 (srfi srfi-1)
14206 (srfi srfi-26))
14207 #:phases
14208 (modify-phases %standard-phases
14209 (add-after 'unpack 'disable-proprietary-features
14210 (lambda _
14211 (setenv "NUMBA_DISABLE_HSA" "1")
14212 (setenv "NUMBA_DISABLE_CUDA" "1")
14213 #t))
14214 (add-after 'unpack 'remove-failing-tests
14215 (lambda _
14216 ;; FIXME: these tests fail for unknown reasons:
14217 ;; test_non_writable_pycache, test_non_creatable_pycache, and
14218 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
14219 (substitute* "numba/tests/test_dispatcher.py"
14220 (("def test(_non_writable_pycache)" _ m)
14221 (string-append "def guix_skip" m))
14222 (("def test(_non_creatable_pycache)" _ m)
14223 (string-append "def guix_skip" m))
14224 (("def test(_frozen)" _ m)
14225 (string-append "def guix_skip" m)))
14226
14227 ;; These tests fail because we don't run the tests from the build
14228 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
14229 ;; They ar in numba.tests.test_pycc.TestDistutilsSupport.
14230 (substitute* "numba/tests/test_pycc.py"
14231 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
14232 (string-append "def guix_skip" m)))
14233 #t))
14234 (replace 'check
14235 (lambda _
14236 (let ((cwd (getcwd)))
14237 (setenv "PYTHONPATH"
14238 (string-append cwd "/build/"
14239 (find (cut string-prefix? "lib" <>)
14240 (scandir (string-append cwd "/build")))
14241 ":"
14242 (getenv "PYTHONPATH")))
14243 ;; Something is wrong with the PYTHONPATH when running the
14244 ;; tests from the build directory, as it complains about not being
14245 ;; able to import certain modules.
14246 (with-directory-excursion "/tmp"
14247 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
14248 #t)))))
14249 (propagated-inputs
14250 `(("python-llvmlite" ,python-llvmlite)
14251 ("python-numpy" ,python-numpy)
14252 ("python-singledispatch" ,python-singledispatch)))
14253 ;; Needed for tests.
14254 (inputs
14255 `(("python-jinja2" ,python-jinja2)
14256 ("python-pygments" ,python-pygments)))
14257 (home-page "https://numba.pydata.org")
14258 (synopsis "Compile Python code using LLVM")
14259 (description "Numba gives you the power to speed up your applications with
14260high performance functions written directly in Python. With a few
14261annotations, array-oriented and math-heavy Python code can be just-in-time
14262compiled to native machine instructions, similar in performance to C, C++ and
14263Fortran, without having to switch languages or Python interpreters.
14264
14265Numba works by generating optimized machine code using the LLVM compiler
14266infrastructure at import time, runtime, or statically (using the included pycc
14267tool).")
14268 (license license:bsd-3)))
14269
14270(define-public python-anndata
14271 (package
14272 (name "python-anndata")
14273 (version "0.6.9")
14274 (source
14275 (origin
14276 (method url-fetch)
14277 (uri (pypi-uri "anndata" version))
14278 (sha256
14279 (base32
14280 "1fh461xyyc7pcrjfgd013bdc2alf53r46ss3gfw3431mbb1gappi"))))
14281 (build-system python-build-system)
14282 (propagated-inputs
14283 `(("python-h5py" ,python-h5py)
14284 ("python-natsort" ,python-natsort)
14285 ("python-pandas" ,python-pandas)
14286 ("python-scipy" ,python-scipy)))
14287 (home-page "https://github.com/theislab/anndata")
14288 (synopsis "Annotated data for data analysis pipelines")
14289 (description "Anndata is a package for simple (functional) high-level APIs
14290for data analysis pipelines. In this context, it provides an efficient,
14291scalable way of keeping track of data together with learned annotations and
14292reduces the code overhead typically encountered when using a mostly
14293object-oriented library such as @code{scikit-learn}.")
14294 (license license:bsd-3)))
14295
14296(define-public python-dill
14297 (package
14298 (name "python-dill")
14299 (version "0.2.8.2")
14300 (source
14301 (origin
14302 (method url-fetch)
14303 (uri (pypi-uri "dill" version))
14304 (sha256
14305 (base32
14306 "1cymzn9fxwdy33h21zkk4gqgzvd25110hh3zdqnvnwa3p52c4kb2"))))
14307 (build-system python-build-system)
14308 ;; FIXME: The check phase fails with "don't know how to make test".
14309 (arguments '(#:tests? #f))
14310 (home-page "https://pypi.org/project/dill")
14311 (synopsis "Serialize all of Python")
14312 (description "Dill extends Python's @code{pickle} module for serializing
14313and de-serializing Python objects to the majority of the built-in Python
14314types. Dill provides the user the same interface as the @code{pickle} module,
14315and also includes some additional features. In addition to pickling Python
14316objects, @code{dill} provides the ability to save the state of an interpreter
14317session in a single command. Hence, it would be feasable to save a
14318interpreter session, close the interpreter, ship the pickled file to another
14319computer, open a new interpreter, unpickle the session and thus continue from
14320the saved state of the original interpreter session.")
14321 (license license:bsd-3)))
14322
14323(define-public python-multiprocess
14324 (package
14325 (name "python-multiprocess")
14326 (version "0.70.6.1")
14327 (source
14328 (origin
14329 (method url-fetch)
14330 (uri (pypi-uri "multiprocess" version))
14331 (sha256
14332 (base32
14333 "1ip5caz67b3q0553mr8gm8xwsb8x500jn8ml0gihgyfy52m2ypcq"))))
14334 (build-system python-build-system)
14335 (propagated-inputs
14336 `(("python-dill" ,python-dill)))
14337 (home-page "https://pypi.org/project/multiprocess")
14338 (synopsis "Multiprocessing and multithreading in Python")
14339 (description
14340 "This package is a fork of the multiprocessing Python package, a package
14341which supports the spawning of processes using the API of the standard
14342library's @code{threading} module.")
14343 (license license:bsd-3)))
14344
14345(define-public python-toolz
14346 (package
14347 (name "python-toolz")
14348 (version "0.9.0")
14349 (source
14350 (origin
14351 (method url-fetch)
14352 (uri (pypi-uri "toolz" version))
14353 (sha256
14354 (base32
14355 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
14356 (build-system python-build-system)
14357 ;; FIXME: tests cannot be computed: "Can't perform this operation for
14358 ;; unregistered loader type"
14359 (arguments '(#:tests? #f))
14360 (home-page "https://github.com/pytoolz/toolz/")
14361 (synopsis "List processing tools and functional utilities")
14362 (description
14363 "This package provides a set of utility functions for iterators,
14364functions, and dictionaries.")
14365 (license license:bsd-3)))
14366
14367(define-public python2-toolz
14368 (package-with-python2 python-toolz))
14369
14370(define-public python-cytoolz
14371 (package
14372 (name "python-cytoolz")
14373 (version "0.9.0.1")
14374 (source
14375 (origin
14376 (method url-fetch)
14377 (uri (pypi-uri "cytoolz" version))
14378 (sha256
14379 (base32
14380 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
14381 (build-system python-build-system)
14382 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
14383 ;; 'exceptions'"
14384 (arguments '(#:tests? #f))
14385 (propagated-inputs
14386 `(("python-toolz" ,python-toolz)))
14387 (native-inputs
14388 `(("python-cython" ,python-cython)))
14389 (home-page "https://github.com/pytoolz/cytoolz")
14390 (synopsis "High performance functional utilities")
14391 (description
14392 "The cytoolz package implements the same API as provided by toolz. The
14393main differences are that @code{cytoolz} is faster and cytoolz offers a C API
14394that is accessible to other projects developed in Cython.")
14395 (license license:bsd-3)))
14396
14397(define-public python-sortedcontainers
14398 (package
14399 (name "python-sortedcontainers")
14400 (version "2.0.4")
14401 (source
14402 (origin
14403 (method url-fetch)
14404 (uri (pypi-uri "sortedcontainers" version))
14405 (sha256
14406 (base32
14407 "10hrk2k0hbf9x78vd3f0lj277m1yzfhzzxr0hja718liwb398wk0"))))
14408 (build-system python-build-system)
14409 (native-inputs
14410 `(("python-tox" ,python-tox)))
14411 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
14412 (synopsis "Sorted List, Sorted Dict, Sorted Set")
14413 (description
14414 "This package provides a sorted collections library, written in
14415pure-Python.")
14416 (license license:asl2.0)))
14417
14418(define-public python-cloudpickle
14419 (package
14420 (name "python-cloudpickle")
14421 (version "0.6.1")
14422 (source
14423 (origin
14424 (method url-fetch)
14425 (uri (pypi-uri "cloudpickle" version))
14426 (sha256
14427 (base32
14428 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
14429 (build-system python-build-system)
14430 ;; FIXME: there are 5 errors in 122 tests:
14431 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
14432 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
14433 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
14434 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
14435 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
14436 ;; TypeError: cannot serialize '_io.BufferedRandom' object
14437 (arguments '(#:tests? #f))
14438 (native-inputs
14439 `(("python-pytest" ,python-pytest)
14440 ("python-mock" ,python-mock)
14441 ("python-tornado" ,python-tornado)))
14442 (home-page "https://github.com/cloudpipe/cloudpickle")
14443 (synopsis "Extended pickling support for Python objects")
14444 (description
14445 "Cloudpickle makes it possible to serialize Python constructs not
14446supported by the default pickle module from the Python standard library. It
14447is especially useful for cluster computing where Python expressions are
14448shipped over the network to execute on remote hosts, possibly close to the
14449data.")
14450 (license license:bsd-3)))
14451
14452(define-public python2-cloudpickle
14453 (package-with-python2 python-cloudpickle))
14454
14455(define-public python-locket
14456 (package
14457 (name "python-locket")
14458 (version "0.2.0")
14459 (source
14460 (origin
14461 (method url-fetch)
14462 (uri (pypi-uri "locket" version))
14463 (sha256
14464 (base32
14465 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
14466 (build-system python-build-system)
14467 (home-page "https://github.com/mwilliamson/locket.py")
14468 (synopsis "File-based locks for Python")
14469 (description
14470 "Locket implements a lock that can be used by multiple processes provided
14471they use the same path.")
14472 (license license:bsd-2)))
14473
14474(define-public python2-locket
14475 (package-with-python2 python-locket))
14476
14477(define-public python-blosc
14478 (package
14479 (name "python-blosc")
14480 (version "1.5.1")
14481 (source
14482 (origin
14483 (method url-fetch)
14484 (uri (pypi-uri "blosc" version))
14485 (sha256
14486 (base32
14487 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
14488 (build-system python-build-system)
14489 ;; FIXME: all tests pass, but then this error is printed:
14490 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
14491 (arguments '(#:tests? #f))
14492 (propagated-inputs
14493 `(("python-numpy" ,python-numpy)))
14494 (home-page "https://github.com/blosc/python-blosc")
14495 (synopsis "Python wrapper for the Blosc data compressor library")
14496 (description "Blosc is a high performance compressor optimized for binary
14497data. It has been designed to transmit data to the processor cache faster
14498than the traditional, non-compressed, direct memory fetch approach via a
14499@code{memcpy()} system call.
14500
14501Blosc works well for compressing numerical arrays that contains data with
14502relatively low entropy, like sparse data, time series, grids with
14503regular-spaced values, etc.
14504
14505This Python package wraps the Blosc library.")
14506 (license license:bsd-3)))
14507
14508(define-public python2-blosc
14509 (package-with-python2 python-blosc))
14510
14511(define-public python-partd
14512 (package
14513 (name "python-partd")
14514 (version "0.3.9")
14515 (source
14516 (origin
14517 (method url-fetch)
14518 (uri (pypi-uri "partd" version))
14519 (sha256
14520 (base32
14521 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
14522 (build-system python-build-system)
14523 (propagated-inputs
14524 `(("python-blosc" ,python-blosc)
14525 ("python-locket" ,python-locket)
14526 ("python-numpy" ,python-numpy)
14527 ("python-pandas" ,python-pandas)
14528 ("python-pyzmq" ,python-pyzmq)
14529 ("python-toolz" ,python-toolz)))
14530 (home-page "https://github.com/dask/partd/")
14531 (synopsis "Appendable key-value storage")
14532 (description "Partd stores key-value pairs. Values are raw bytes. We
14533append on old values. Partd excels at shuffling operations.")
14534 (license license:bsd-3)))
14535
14536(define-public python2-partd
14537 (package-with-python2 python-partd))
14538
14539(define-public python-dask
14540 (package
14541 (name "python-dask")
14542 (version "1.0.0")
14543 (source
14544 (origin
14545 (method url-fetch)
14546 (uri (pypi-uri "dask" version))
14547 (sha256
14548 (base32
14549 "1xwz8h020ipwav2p5gcq9pskya1cvzd6hjyvd06dvr3w5lxlmym1"))))
14550 (build-system python-build-system)
14551 ;; A single test out of 5000+ fails. This test is marked as xfail when
14552 ;; pytest-xdist is used.
14553 (arguments
14554 `(#:phases
14555 (modify-phases %standard-phases
14556 (add-after 'unpack 'disable-broken-test
14557 (lambda _
14558 (substitute* "dask/tests/test_threaded.py"
14559 (("def test_interrupt\\(\\)" m)
14560 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
14561 m)))
14562 (when (which "python2")
14563 ;; This test fails with recent Pandas:
14564 ;; <https://github.com/dask/dask/issues/3794>.
14565 (substitute* "dask/dataframe/tests/test_dataframe.py"
14566 (("def test_info\\(\\)" m)
14567 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
14568 m))))
14569 #t))
14570 (replace 'check
14571 (lambda _ (invoke "pytest" "-vv"))))))
14572 (propagated-inputs
14573 `(("python-cloudpickle" ,python-cloudpickle)
14574 ("python-numpy" ,python-numpy)
14575 ("python-pandas" ,python-pandas)
14576 ("python-partd" ,python-partd)
14577 ("python-toolz" ,python-toolz)
14578 ("python-pyyaml" ,python-pyyaml)))
14579 (native-inputs
14580 `(("python-pytest" ,python-pytest)
14581 ("python-pytest-runner" ,python-pytest-runner)))
14582 (home-page "https://github.com/dask/dask/")
14583 (synopsis "Parallel computing with task scheduling")
14584 (description
14585 "Dask is a flexible parallel computing library for analytics. It
14586consists of two components: dynamic task scheduling optimized for computation,
14587and large data collections like parallel arrays, dataframes, and lists that
14588extend common interfaces like NumPy, Pandas, or Python iterators to
14589larger-than-memory or distributed environments. These parallel collections
14590run on top of the dynamic task schedulers. ")
14591 (license license:bsd-3)))
14592
14593(define-public python2-dask
14594 (package-with-python2 python-dask))
14595
14596(define-public python-ilinkedlist
14597 (package
14598 (name "python-ilinkedlist")
14599 (version "0.4.0")
14600 (source
14601 (origin
14602 (method url-fetch)
14603 (uri (pypi-uri "ilinkedlist" version))
14604 (sha256
14605 (base32
14606 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
14607 (build-system python-build-system)
14608 (native-inputs `(("python-pytest" ,python-pytest)))
14609 (inputs `(("python" ,python)))
14610 (home-page "https://github.com/luther9/ilinkedlist-py")
14611 (synopsis "Immutable linked list library")
14612 (description
14613 "This is a implementation of immutable linked lists for Python. It
14614contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
14615Since a linked list is treated as immutable, it is hashable, and its length
14616can be retrieved in constant time. Some of the terminology is inspired by
14617LISP. It is possible to create an improper list by creating a @code{Pair}
14618with a non-list @code{cdr}.")
14619 (license license:gpl3+)))
14620
14621(define-public python-readlike
14622 (package
14623 (name "python-readlike")
14624 (version "0.1.3")
14625 (source
14626 (origin
14627 (method url-fetch)
14628 (uri (pypi-uri "readlike" version))
14629 (sha256
14630 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
14631 (build-system python-build-system)
14632 (home-page "https://github.com/jangler/readlike")
14633 (synopsis "GNU Readline-like line editing module")
14634 (description
14635 "This Python module provides line editing functions similar to the default
14636Emacs-style ones of GNU Readline. Unlike the Python standard library's
14637@code{readline} package, this one allows access to those capabilties in settings
14638outside of a standard command-line interface. It is especially well-suited to
14639interfacing with Urwid, due to a shared syntax for describing key inputs.
14640
14641Currently, all stateless Readline commands are implemented. Yanking and history
14642are not supported.")
14643 (license license:expat)))
14644
14645(define-public python2-readlike
14646 (package-with-python2 python-readlike))
14647
14648(define-public python-reparser
14649 (package
14650 (name "python-reparser")
14651 (version "1.4.3")
14652 (source
14653 (origin
14654 (method url-fetch)
14655 (uri (pypi-uri "ReParser" version))
14656 (sha256
14657 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
14658 (build-system python-build-system)
14659 (home-page "https://github.com/xmikos/reparser")
14660 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
14661 (description
14662 "This Python library provides a simple lexer/parser for inline markup based
14663on regular expressions.")
14664 (license license:expat)))
14665
14666(define-public python2-reparser
14667 (let ((reparser (package-with-python2
14668 (strip-python2-variant python-reparser))))
14669 (package (inherit reparser)
14670 (propagated-inputs
14671 `(("python2-enum34" ,python2-enum34)
14672 ,@(package-propagated-inputs reparser))))))
14673
14674(define-public python-precis-i18n
14675 (package
14676 (name "python-precis-i18n")
14677 (version "1.0.0")
14678 (source
14679 (origin
14680 (method url-fetch)
14681 (uri (pypi-uri "precis_i18n" version))
14682 (sha256
14683 (base32
14684 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
14685 (build-system python-build-system)
14686 (home-page "https://github.com/byllyfish/precis_i18n")
14687 (synopsis "Implementation of the PRECIS framework")
14688 (description
14689 "This module implements the PRECIS Framework as described in RFC 8264,
14690RFC 8265 and RFC 8266.")
14691 (license license:expat)))
14692
d0446c4b
RW
14693(define-public python-absl-py
14694 (package
14695 (name "python-absl-py")
14696 (version "0.6.1")
14697 (source
14698 (origin
14699 (method url-fetch)
14700 (uri (pypi-uri "absl-py" version))
14701 (sha256
14702 (base32
14703 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
14704 (build-system python-build-system)
14705 (propagated-inputs
14706 `(("python-six" ,python-six)))
14707 (home-page "https://github.com/abseil/abseil-py")
14708 (synopsis "Abseil Python common libraries")
14709 (description
14710 "This package provides the Abseil Python Common Libraries, a collection
14711of Python libraries for building Python applications.")
14712 (license license:asl2.0)))
14713
81bed4e9
RW
14714(define-public python-astor
14715 (package
14716 (name "python-astor")
14717 (version "0.7.1")
14718 (source
14719 (origin
14720 (method url-fetch)
14721 (uri (pypi-uri "astor" version))
14722 (sha256
14723 (base32
14724 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
14725 (build-system python-build-system)
14726 ;; FIXME: There are two errors and two test failures.
14727 (arguments `(#:tests? #f))
14728 (home-page "https://github.com/berkerpeksag/astor")
14729 (synopsis "Read/rewrite/write Python ASTs")
14730 (description "Astor is designed to allow easy manipulation of Python
14731source via the AST.")
14732 (license license:bsd-3)))
14733
22e623ae
RW
14734(define-public python-grpcio
14735 (package
14736 (name "python-grpcio")
14737 (version "1.17.1")
14738 (source
14739 (origin
14740 (method url-fetch)
14741 (uri (pypi-uri "grpcio" version))
14742 (sha256
14743 (base32
14744 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
14745 (build-system python-build-system)
14746 (propagated-inputs
14747 `(("python-six" ,python-six)))
14748 (home-page "https://grpc.io")
14749 (synopsis "HTTP/2-based RPC framework")
14750 (description "This package provides a Python library for communicating
14751with the HTTP/2-based RPC framework gRPC.")
14752 (license license:asl2.0)))
14753
79869f80
RW
14754(define-public python-astunparse
14755 (package
14756 (name "python-astunparse")
14757 (version "1.6.1")
14758 (source
14759 (origin
14760 (method url-fetch)
14761 (uri (pypi-uri "astunparse" version))
14762 (sha256
14763 (base32
14764 "1jhidwyrqn17avqh9xnnm3wd7q7aahaq009cba67g86y6gxicyyj"))))
14765 (build-system python-build-system)
14766 (arguments '(#:tests? #f)) ; there are none
14767 (propagated-inputs
14768 `(("python-six" ,python-six)
14769 ("python-wheel" ,python-wheel)))
14770 (home-page "https://github.com/simonpercivall/astunparse")
14771 (synopsis "AST unparser for Python")
14772 (description "This package provides an AST unparser for Python. It is a
14773factored out version of @code{unparse} found in the Python source
14774distribution.")
14775 (license license:bsd-3)))
14776
2884aac0
RW
14777(define-public python-gast
14778 (package
14779 (name "python-gast")
14780 (version "0.2.0")
14781 (source
14782 (origin
14783 (method url-fetch)
14784 (uri (pypi-uri "gast" version))
14785 (sha256
14786 (base32
14787 "0c296xm1vz9x4w4inmdl0k8mnc0i9arw94si2i7pglpc461r0s3h"))))
14788 (build-system python-build-system)
14789 (propagated-inputs
14790 `(("python-astunparse" ,python-astunparse)))
14791 (home-page "https://pypi.org/project/gast/")
14792 (synopsis "Generic Python AST that abstracts the underlying Python version")
14793 (description
14794 "GAST provides a compatibility layer between the AST of various Python
14795versions, as produced by @code{ast.parse} from the standard @code{ast}
14796module.")
14797 (license license:bsd-3)))
14798
44d10b1f
RW
14799(define-public python-wikidata
14800 (package
14801 (name "python-wikidata")
14802 (version "0.6.1")
14803 (source
14804 (origin
14805 (method url-fetch)
14806 (uri (pypi-uri "Wikidata" version))
14807 (sha256
14808 (base32
14809 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
14810 (build-system python-build-system)
14811 (propagated-inputs
14812 `(("python-babel" ,python-babel)))
14813 (home-page "https://github.com/dahlia/wikidata")
14814 (synopsis "Wikidata client library")
14815 (description
14816 "This package provides a Python interface to
14817@url{https://www.wikidata.org/, Wikidata}.")
14818 (properties '((upstream-name . "Wikidata")))
14819 (license license:gpl3+)))
14820
14821(define-public python-doctest-ignore-unicode
14822 (package
14823 (name "python-doctest-ignore-unicode")
14824 (version "0.1.2")
14825 (source
14826 (origin
14827 (method url-fetch)
14828 (uri (pypi-uri "doctest-ignore-unicode" version))
14829 (sha256
14830 (base32
14831 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
14832 (build-system python-build-system)
14833 (native-inputs
14834 `(("python-nose" ,python-nose)))
14835 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
14836 (synopsis "Ignore Unicode literal prefixes in doctests")
14837 (description
14838 "This package adds support for a flag to ignore Unicode literal prefixes
14839in doctests.")
14840 (license license:asl2.0)))
14841
14842(define-public python-attr
14843 (package
14844 (name "python-attr")
14845 (version "0.3.1")
14846 (source
14847 (origin
14848 (method url-fetch)
14849 (uri (pypi-uri "attr" version))
14850 (sha256
14851 (base32
14852 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
14853 (build-system python-build-system)
14854 (home-page "https://github.com/denis-ryzhkov/attr")
14855 (synopsis "Decorator for attributes of target function or class")
14856 (description "Simple decorator to set attributes of target function or
14857class in a @acronym{DRY, Don't Repeat Yourself} way.")
14858 (license license:expat)))