gnu: python-keepkey: Update to 6.0.2.
[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>
a9ba0a31 60;;; Copyright © 2019 Brett Gilio <brettg@posteo.net>
44d10b1f
RW
61;;;
62;;; This file is part of GNU Guix.
63;;;
64;;; GNU Guix is free software; you can redistribute it and/or modify it
65;;; under the terms of the GNU General Public License as published by
66;;; the Free Software Foundation; either version 3 of the License, or (at
67;;; your option) any later version.
68;;;
69;;; GNU Guix is distributed in the hope that it will be useful, but
70;;; WITHOUT ANY WARRANTY; without even the implied warranty of
71;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
72;;; GNU General Public License for more details.
73;;;
74;;; You should have received a copy of the GNU General Public License
75;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
76
77(define-module (gnu packages python-xyz)
78 #:use-module ((guix licenses) #:prefix license:)
79 #:use-module (gnu packages)
80 #:use-module (gnu packages algebra)
81 #:use-module (gnu packages adns)
82 #:use-module (gnu packages attr)
83 #:use-module (gnu packages backup)
84 #:use-module (gnu packages bash)
85 #:use-module (gnu packages check)
86 #:use-module (gnu packages compression)
87 #:use-module (gnu packages crypto)
88 #:use-module (gnu packages databases)
89 #:use-module (gnu packages file)
90 #:use-module (gnu packages fontutils)
91 #:use-module (gnu packages gcc)
92 #:use-module (gnu packages geo)
93 #:use-module (gnu packages ghostscript)
94 #:use-module (gnu packages gl)
95 #:use-module (gnu packages glib)
96 #:use-module (gnu packages graphviz)
97 #:use-module (gnu packages graphics)
98 #:use-module (gnu packages gstreamer)
99 #:use-module (gnu packages gtk)
100 #:use-module (gnu packages icu4c)
101 #:use-module (gnu packages image)
102 #:use-module (gnu packages imagemagick)
103 #:use-module (gnu packages libevent)
104 #:use-module (gnu packages libffi)
105 #:use-module (gnu packages linux)
106 #:use-module (gnu packages llvm)
107 #:use-module (gnu packages man)
108 #:use-module (gnu packages maths)
42f0b0c2 109 #:use-module (gnu packages monitoring)
44d10b1f
RW
110 #:use-module (gnu packages multiprecision)
111 #:use-module (gnu packages networking)
112 #:use-module (gnu packages ncurses)
113 #:use-module (gnu packages openstack)
114 #:use-module (gnu packages pcre)
115 #:use-module (gnu packages perl)
116 #:use-module (gnu packages pkg-config)
117 #:use-module (gnu packages python)
d362b11d 118 #:use-module (gnu packages python-check)
44d10b1f
RW
119 #:use-module (gnu packages python-crypto)
120 #:use-module (gnu packages python-web)
121 #:use-module (gnu packages qt)
122 #:use-module (gnu packages readline)
123 #:use-module (gnu packages sdl)
124 #:use-module (gnu packages search)
125 #:use-module (gnu packages shells)
126 #:use-module (gnu packages ssh)
127 #:use-module (gnu packages terminals)
128 #:use-module (gnu packages tex)
129 #:use-module (gnu packages texinfo)
130 #:use-module (gnu packages time)
131 #:use-module (gnu packages tls)
132 #:use-module (gnu packages version-control)
133 #:use-module (gnu packages video)
134 #:use-module (gnu packages web)
135 #:use-module (gnu packages base)
136 #:use-module (gnu packages xml)
137 #:use-module (gnu packages xorg)
138 #:use-module (gnu packages xdisorg)
139 #:use-module (gnu packages tcl)
140 #:use-module (gnu packages bdw-gc)
141 #:use-module (guix packages)
142 #:use-module (guix download)
143 #:use-module (guix git-download)
144 #:use-module (guix utils)
145 #:use-module (guix build-system gnu)
146 #:use-module (guix build-system cmake)
147 #:use-module (guix build-system python)
148 #:use-module (guix build-system trivial)
149 #:use-module (srfi srfi-1)
150 #:use-module (srfi srfi-26))
151
152(define-public python-psutil
153 (package
154 (name "python-psutil")
155 (version "5.4.3")
156 (source
157 (origin
158 (method url-fetch)
159 (uri (pypi-uri "psutil" version))
160 (sha256
161 (base32
162 "063v69x7spyclyaxrd3gmzj3p16q5ayg97xqhwb1kyn22a9pwip2"))))
163 (build-system python-build-system)
164 (arguments
165 ;; FIXME: some tests does not return and times out.
166 '(#:tests? #f))
167 (home-page "https://www.github.com/giampaolo/psutil")
168 (synopsis "Library for retrieving information on running processes")
169 (description
170 "psutil (Python system and process utilities) is a library for retrieving
171information on running processes and system utilization (CPU, memory, disks,
172network) in Python. It is useful mainly for system monitoring, profiling and
173limiting process resources and management of running processes. It implements
174many functionalities offered by command line tools such as: ps, top, lsof,
175netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
176pidof, tty, taskset, pmap.")
177 (properties `((python2-variant . ,(delay python2-psutil))))
178 (license license:bsd-3)))
179
180(define-public python2-psutil
181 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
182 (package
183 (inherit base)
184 (propagated-inputs
185 `(("python2-enum34" ,python2-enum34) ;optional
186 ,@(package-propagated-inputs base))))))
187
188(define-public python-shapely
189 (package
190 (name "python-shapely")
191 (version "1.6.3")
192 (source
193 (origin
194 (method url-fetch)
195 (uri (pypi-uri "Shapely" version))
196 (sha256
197 (base32
198 "0svc58dzcw9gj92b4sgq35sdxkf85z0qwlzxarkzq4bp3h8jy58l"))))
199 (build-system python-build-system)
200 (native-inputs
201 `(("python-cython" ,python-cython)
202 ("python-matplotlib" ,python-matplotlib)
203 ("python-pytest" ,python-pytest)
204 ("python-pytest-cov" ,python-pytest-cov)))
205 (inputs
206 `(("geos" ,geos)))
207 (propagated-inputs
208 `(("python-numpy" ,python-numpy)))
209 (arguments
210 `(#:phases
211 (modify-phases %standard-phases
212 (add-after 'unpack 'patch-geos-path
213 (lambda* (#:key inputs #:allow-other-keys)
214 (let ((geos (assoc-ref inputs "geos"))
215 (glibc (assoc-ref inputs ,(if (%current-target-system)
216 "cross-libc" "libc"))))
217 (substitute* "shapely/geos.py"
218 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
219 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
220 geos "/lib/libgeos_c.so'])"))
221 (("free = load_dll\\('c'\\)\\.free")
222 (string-append "free = load_dll('c', fallbacks=['"
223 glibc "/lib/libc.so.6']).free"))))
224 #t)))))
225 (home-page "https://github.com/Toblerity/Shapely")
226 (synopsis "Library for the manipulation and analysis of geometric objects")
227 (description "Shapely is a Python package for manipulation and analysis of
228planar geometric objects. It is based on the @code{GEOS} library.")
229 (license license:bsd-3)))
230
231(define-public python-logwrap
232 (package
233 (name "python-logwrap")
234 (version "3.2.1")
235 (source
236 (origin
237 (method url-fetch)
238 (uri (pypi-uri "logwrap" version ".zip"))
239 (sha256
240 (base32
241 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
242 (build-system python-build-system)
243 (propagated-inputs
244 `(("python-six" ,python-six)
245 ("python-typing" ,python-typing)))
246 (native-inputs
247 `(("unzip" ,unzip)
248 ("python-cython" ,python-cython)
249 ("python-pytest" ,python-pytest)
250 ("python-pytest-cov" ,python-pytest-cov)
251 ("python-pytest-runner" ,python-pytest-runner)))
252 (home-page "https://github.com/penguinolog/logwrap")
253 (synopsis "Decorator for logging function arguments")
254 (description "This package provides a decorator to log function arguments
255and function call return values in a human-readable way.")
256 (license license:asl2.0)))
257
258(define-public python2-shapely
259 (package-with-python2 python-shapely))
260
261(define-public python-clyent
262 (package
263 (name "python-clyent")
264 (version "1.2.1")
265 (source
266 (origin
267 (method url-fetch)
268 (uri (pypi-uri "clyent" version))
269 (sha256
270 (base32
271 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
272 (build-system python-build-system)
273 (native-inputs
274 `(("python-mock" ,python-mock)))
275 (home-page "https://github.com/binstar/clyent")
276 (synopsis "Command line client library")
277 (description "Clyent is a Python command line utiliy library. It is used
278by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
279 (license license:bsd-3)))
280
281(define-public python2-clyent
282 (package-with-python2 python-clyent))
283
284(define-public python-babel
285 (package
286 (name "python-babel")
287 (version "2.6.0")
288 (source
289 (origin
290 (method url-fetch)
291 (uri (pypi-uri "Babel" version))
292 (sha256
293 (base32
294 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))
295 (build-system python-build-system)
296 (native-inputs
297 `(("python-freezegun" ,python-freezegun)
298 ("python-pytest" ,python-pytest)))
299 (propagated-inputs
300 `(("python-pytz" ,python-pytz)))
301 (arguments
302 `(#:phases (modify-phases %standard-phases
303 (replace 'check
304 (lambda _ (invoke "pytest" "-vv"))))))
305 (home-page "http://babel.pocoo.org/")
306 (synopsis
307 "Tools for internationalizing Python applications")
308 (description
309 "Babel is composed of two major parts:
310- tools to build and work with gettext message catalogs
311- a Python interface to the CLDR (Common Locale Data Repository), providing
312access to various locale display names, localized number and date formatting,
313etc. ")
314 (license license:bsd-3)))
315
316(define-public python2-babel
317 (package-with-python2 python-babel))
318
319(define-public python2-backport-ssl-match-hostname
320 (package
321 (name "python2-backport-ssl-match-hostname")
322 (version "3.5.0.1")
323 (source
324 (origin
325 (method url-fetch)
2c1f0d09 326 (uri (pypi-uri "backports.ssl_match_hostname" version))
44d10b1f
RW
327 (sha256
328 (base32
329 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
330 (build-system python-build-system)
331 (arguments
332 `(#:python ,python-2
333 #:tests? #f)) ; no test target
334 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
335 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
336 (description
337 "This backport brings the ssl.match_hostname() function to users of
338earlier versions of Python. The function checks the hostname in the
339certificate returned by the server to which a connection has been established,
340and verifies that it matches the intended target hostname.")
341 (license license:psfl)))
342
343(define-public python-hdf4
344 (package
345 (name "python-hdf4")
346 (version "0.9")
347 (source
348 (origin
349 (method url-fetch)
350 (uri (pypi-uri name version))
351 (sha256
352 (base32
353 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
354 (build-system python-build-system)
355 (native-inputs `(("nose" ,python-nose)))
356 (propagated-inputs `(("numpy" ,python-numpy)))
357 (inputs
358 `(("hdf4" ,hdf4)
359 ("libjpeg" ,libjpeg)
360 ("zlib" ,zlib)))
361 (arguments
362 `(#:phases
363 (modify-phases %standard-phases
364 (replace 'check
365 (lambda _
366 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
367 ;; on to import numpy. Somehow this works on their CI system.
368 ;; Let's just manage PYTHONPATH here instead.
369 (substitute* "runexamples.sh"
370 (("export PYTHONPATH=.*") ""))
371 (setenv "PYTHONPATH"
372 (string-append (getcwd) ":"
373 (getenv "PYTHONPATH")))
374 (invoke "./runexamples.sh")
375 (invoke "nosetests" "-v"))))))
376 (home-page "https://github.com/fhs/python-hdf4")
377 (synopsis "Python interface to the NCSA HDF4 library")
378 (description
379 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
380which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
381NetCDF files can also be read and modified. Python-HDF4 is a fork of
382@url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
383 (license license:expat)))
384
385(define-public python2-hdf4
386 (package-with-python2 python-hdf4))
387
388(define-public python-h5py
389 (package
390 (name "python-h5py")
391 (version "2.8.0")
392 (source
393 (origin
394 (method url-fetch)
395 (uri (pypi-uri "h5py" version))
396 (sha256
397 (base32
398 "0mdr6wrq02ac93m1aqx9kad0ppfzmm4imlxqgyy1x4l7hmdcc9p6"))))
399 (build-system python-build-system)
400 (arguments
401 `(#:tests? #f ; no test target
402 #:phases
403 (modify-phases %standard-phases
404 (add-after 'unpack 'fix-hdf5-paths
405 (lambda* (#:key inputs #:allow-other-keys)
406 (let ((prefix (assoc-ref inputs "hdf5")))
407 (substitute* "setup_build.py"
408 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
409 (string-append "['" prefix "/lib" "']"))
410 (("'/opt/local/include', '/usr/local/include'")
411 (string-append "'" prefix "/include" "'")))
412 (substitute* "setup_configure.py"
413 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
414 (string-append "['" prefix "/lib" "']")))
415 #t))))))
416 (propagated-inputs
417 `(("python-six" ,python-six)
418 ("python-numpy" ,python-numpy)))
419 (inputs
420 `(("hdf5" ,hdf5)))
421 (native-inputs
422 `(("python-cython" ,python-cython)
423 ("python-pkgconfig" ,python-pkgconfig)))
424 (home-page "http://www.h5py.org/")
425 (synopsis "Read and write HDF5 files from Python")
426 (description
427 "The h5py package provides both a high- and low-level interface to the
428HDF5 library from Python. The low-level interface is intended to be a
429complete wrapping of the HDF5 API, while the high-level component supports
430access to HDF5 files, datasets and groups using established Python and NumPy
431concepts.")
432 (license license:bsd-3)))
433
434(define-public python2-h5py
435 (package-with-python2 python-h5py))
436
8b89dedc
RW
437(define-public python-sh
438 (package
439 (name "python-sh")
440 (version "1.12.14")
441 (source
442 (origin
443 (method url-fetch)
444 (uri (pypi-uri "sh" version))
445 (sha256
446 (base32
447 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
448 (build-system python-build-system)
fd3638d8
EF
449 (arguments
450 '(#:phases
451 (modify-phases %standard-phases
452 (replace 'check
453 (lambda _
454 (invoke "python" "sh.py" "test"))))))
455 (native-inputs
456 `(("python-coverage" ,python-coverage)))
8b89dedc
RW
457 (home-page "https://github.com/amoffat/sh")
458 (synopsis "Python subprocess replacement")
459 (description "This package provides a replacement for Python's
460@code{subprocess} feature.")
461 (license license:expat)))
462
3869effd
RW
463(define-public python2-sh
464 (package-with-python2 python-sh))
465
d362b11d
RW
466(define-public python-cftime
467 (package
468 (name "python-cftime")
469 (version "1.0.3.4")
470 (source
471 (origin
472 (method url-fetch)
473 (uri (pypi-uri "cftime" version))
474 (sha256
475 (base32
476 "0362dhxbzk593walyjz30dll6y2y79wialik647cbwdsf3ad0x6x"))))
477 (build-system python-build-system)
478 (propagated-inputs
479 `(("python-numpy" ,python-numpy)))
480 (native-inputs
481 `(("python-coveralls" ,python-coveralls)
482 ("python-cython" ,python-cython)
483 ("python-pytest-cov" ,python-pytest-cov)))
484 (home-page "https://github.com/Unidata/cftime")
485 (synopsis "Library for time handling")
486 (description
487 "This package provides time-handling functionality that used to be part
488of the netcdf4 package before.")
489 ;; This package claims to include code under the GPLv3 but is released
490 ;; under ISC.
491 (license (list license:isc license:gpl3+))))
492
44d10b1f
RW
493(define-public python-netcdf4
494 (package
495 (name "python-netcdf4")
93e7b209 496 (version "1.4.2")
44d10b1f
RW
497 (source
498 (origin
499 (method url-fetch)
500 (uri (pypi-uri "netCDF4" version))
501 (sha256
502 (base32
93e7b209 503 "0c0sklgrmv15ygliin8qq0hp7vanmbi74m6zpi0r1ksr0hssyd5r"))))
44d10b1f 504 (build-system python-build-system)
93e7b209
RW
505 (arguments
506 '(#:phases
507 (modify-phases %standard-phases
508 (add-after 'unpack 'configure-locations
509 (lambda* (#:key inputs #:allow-other-keys)
510 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
511 #t)))))
44d10b1f
RW
512 (native-inputs
513 `(("python-cython" ,python-cython)))
514 (propagated-inputs
93e7b209
RW
515 `(("python-numpy" ,python-numpy)
516 ("python-cftime" ,python-cftime)))
44d10b1f
RW
517 (inputs
518 `(("netcdf" ,netcdf)
519 ("hdf4" ,hdf4)
520 ("hdf5" ,hdf5)))
93e7b209 521 (home-page "https://github.com/Unidata/netcdf4-python")
44d10b1f
RW
522 (synopsis "Python/numpy interface to the netCDF library")
523 (description "Netcdf4-python is a Python interface to the netCDF C
524library. netCDF version 4 has many features not found in earlier
525versions of the library and is implemented on top of HDF5. This module
526can read and write files in both the new netCDF 4 and the old netCDF 3
527format, and can create files that are readable by HDF5 clients. The
528API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
529to users of that module.")
530 ;; The software is mainly ISC, but includes some files covered
531 ;; by the Expat license.
532 (license (list license:isc license:expat))))
533
534(define-public python2-netcdf4
535 (package-with-python2 python-netcdf4))
536
537(define-public python-lockfile
538 (package
539 (name "python-lockfile")
540 (version "0.12.2")
541 (source
542 (origin
543 (method url-fetch)
8318bf07 544 (uri (pypi-uri "lockfile" version))
44d10b1f
RW
545 (sha256
546 (base32
547 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
548 (build-system python-build-system)
549 (arguments '(#:test-target "check"))
550 (native-inputs
551 `(("python-pbr" ,python-pbr)))
552 (home-page "https://launchpad.net/pylockfile")
553 (synopsis "Platform-independent file locking module")
554 (description
555 "The lockfile package exports a LockFile class which provides a simple
556API for locking files.")
557 (license license:expat)))
558
559(define-public python2-lockfile
560 (package-with-python2 python-lockfile))
561
562(define-public python-semantic-version
563 (package
564 (name "python-semantic-version")
565 (version "2.6.0")
566 (source
567 (origin
568 (method url-fetch)
569 (uri (pypi-uri "semantic_version" version))
570 (sha256
571 (base32
572 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
573 (build-system python-build-system)
574 (arguments
575 `(#:tests? #f)) ; PyPI tarball lacks tests
576 (home-page "https://github.com/rbarrois/python-semanticversion")
577 (synopsis "Semantic versioning module for Python")
578 (description
579 "The @code{semantic_version} class is a small library for handling
580@uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
581
582It can compare versions, generate a new version that represents a bump in one of
583the version levels, and check whether any given string is a proper semantic
584version identifier.")
585 (license license:bsd-3)))
586
587(define-public python2-semantic-version
588 (package-with-python2 python-semantic-version))
589
590(define-public python-serpent
591 (package
592 (name "python-serpent")
593 (version "1.27")
594 (source
595 (origin
596 (method url-fetch)
597 (uri (pypi-uri "serpent" version))
598 (sha256
599 (base32
600 "04p9dsrm5pv8vhk3flvih55kgvlzpi38hlaykdiakddmgwqw93bg"))))
601 (build-system python-build-system)
602 (home-page "https://github.com/irmen/Serpent")
603 (synopsis "Serializer for literal Python expressions")
604 (description
605 "Serpent provides ast.literal_eval() compatible object tree
606serialization. It serializes an object tree into bytes (utf-8 encoded string)
607that can be decoded and then passed as-is to ast.literal_eval() to rebuild it
608as the original object tree. As such it is safe to send serpent data to other
609machines over the network for instance (because only safe literals are
610encoded).")
611 (license license:expat)))
612
613(define-public python-setuptools
614 (package
615 (name "python-setuptools")
616 (version "40.0.0")
617 (source
618 (origin
619 (method url-fetch)
620 (uri (pypi-uri "setuptools" version ".zip"))
621 (sha256
622 (base32
623 "0pq116lr14gnc62v76nk0npkm6krb2mpp7p9ab369zgv4n7dnah1"))
624 (modules '((guix build utils)))
625 (snippet
626 '(begin
627 ;; Remove included binaries which are used to build self-extracting
628 ;; installers for Windows.
629 ;; TODO: Find some way to build them ourself so we can include them.
630 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
631 #t))))
632 (build-system python-build-system)
633 ;; FIXME: Tests require pytest, which itself relies on setuptools.
634 ;; One could bootstrap with an internal untested setuptools.
635 (arguments
636 `(#:tests? #f))
637 (home-page "https://pypi.python.org/pypi/setuptools")
638 (synopsis
639 "Library designed to facilitate packaging Python projects")
640 (description
641 "Setuptools is a fully-featured, stable library designed to facilitate
642packaging Python projects, where packaging includes:
643Python package and module definitions,
644distribution package metadata,
645test hooks,
646project installation,
647platform-specific details,
648Python 3 support.")
649 ;; TODO: setuptools now bundles the following libraries:
650 ;; packaging, pyparsing, six and appdirs. How to unbundle?
651 (license (list license:psfl ; setuptools itself
652 license:expat ; six, appdirs, pyparsing
653 license:asl2.0 ; packaging is dual ASL2/BSD-2
654 license:bsd-2))))
655
656(define-public python2-setuptools
657 (package-with-python2 python-setuptools))
658
659(define-public python-uniseg
660 (package
661 (name "python-uniseg")
662 (version "0.7.1")
663 (source
664 (origin
665 (method url-fetch)
666 (uri (pypi-uri "uniseg" version ".zip"))
667 (sha256
668 (base32
669 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
670 (build-system python-build-system)
671 (arguments
672 '(#:tests? #f)) ; The test suite requires network access.
673 (native-inputs
674 `(("unzip" ,unzip)))
675 (home-page
676 "https://bitbucket.org/emptypage/uniseg-python")
677 (synopsis
678 "Python library to determine Unicode text segmentations")
679 (description
680 "Uniseg is a Python package used to determine Unicode text segmentations.
681Supported segmentations include:
682@enumerate
683@item @dfn{Code point} (any value in the Unicode codespace)
684@item @dfn{Grapheme cluster} (user-perceived character made of a single or
685multiple Unicode code points, e.g. \"G\" + acute-accent)
686@item Word break
687@item Sentence break
688@item Line break
689@end enumerate")
690 (license license:expat)))
691
692(define-public python2-uniseg
693 (package-with-python2 python-uniseg))
694
695(define-public python-humanfriendly
696 (package
697 (name "python-humanfriendly")
698 (version "4.4.1")
699 (source
700 (origin
701 (method url-fetch)
702 (uri (pypi-uri "humanfriendly" version))
703 (sha256
704 (base32
705 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
706 (build-system python-build-system)
707 (arguments
708 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
709 #:tests? #f))
710 (propagated-inputs
711 `(("python-monotonic" ,python-monotonic)))
712 (home-page "https://humanfriendly.readthedocs.io")
713 (synopsis "Human-friendly input and output in Python")
714 (description
715 "The functions and classes in @code{humanfriendly} can be used to make
716text interfaces more user-friendly. It includes tools to parse and format
717numbers, file sizes, and timespans, timers for long-running operations, menus
718to allow the user to choose from a list of options, and terminal interaction
719helpers.")
720 (license license:expat)))
721
722(define-public python2-humanfriendly
723 (package-with-python2 python-humanfriendly))
724
725(define-public python-capturer
726 (package
727 (name "python-capturer")
728 (version "2.4")
729 (source
730 (origin
731 (method url-fetch)
732 (uri (pypi-uri "capturer" version))
733 (sha256
734 (base32
735 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
736 (build-system python-build-system)
737 (arguments
738 `(#:tests? #f))
739 (propagated-inputs
740 `(("python-humanfriendly" ,python-humanfriendly)))
741 (home-page "https://capturer.readthedocs.io")
742 (synopsis "Capture stdout and stderr streams of the current process")
743 (description
744 "The capturer package makes it easy to capture the stdout and stderr
745streams of the current process and subprocesses. Output can be relayed
746to the terminal in real time but is also available to the Python program
747for additional processing.")
748 (license license:expat)))
749
750(define-public python2-capturer
751 (package-with-python2 python-capturer))
752
753(define-public python-case
754 (package
755 (name "python-case")
756 (version "1.5.3")
757 (source
758 (origin
759 (method url-fetch)
760 (uri (pypi-uri "case" version))
761 (sha256
762 (base32
763 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
764 (build-system python-build-system)
765 (propagated-inputs
766 `(("python-mock" ,python-mock)
767 ("python-nose" ,python-nose)
768 ("python-six" ,python-six)
769 ("python-unittest2" ,python-unittest2)))
770 (native-inputs
771 `(("python-coverage" ,python-coverage)))
772 (home-page "https://github.com/celery/case")
773 (synopsis "Unittest utilities and convenience methods")
774 (description
775 "The @code{case} package provides utilities on top of unittest, including
776some helpful Python 2 compatibility convenience methods.")
777 (license license:bsd-3)))
778
779(define-public python-verboselogs
780 (package
781 (name "python-verboselogs")
782 (version "1.7")
783 (source
784 (origin
785 (method url-fetch)
786 (uri (pypi-uri "verboselogs" version))
787 (sha256
788 (base32
789 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
790 (build-system python-build-system)
791 (native-inputs
792 `(("python-mock" ,python-mock)
793 ("python-astroid" ,python-astroid)
794 ("python-pylint" ,python-pylint)))
795 (home-page "https://verboselogs.readthedocs.io")
796 (synopsis "Verbose logging level for Python's logging module")
797 (description
798 "The @code{verboselogs} package extends Python's @code{logging} module to
799add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
800 (license license:expat)))
801
802(define-public python2-verboselogs
803 (package-with-python2 python-verboselogs))
804
805(define-public python-coloredlogs
806 (package
807 (name "python-coloredlogs")
808 (version "7.3")
809 (source
810 (origin
811 (method url-fetch)
812 (uri (pypi-uri "coloredlogs" version))
813 (sha256
814 (base32
815 "1blcann6dyg5dhps9pg12rn0q0rjrlajpmmil0gy0j4cbvnl2il9"))))
816 (build-system python-build-system)
817 (arguments
818 `(;Tests require some updated modules
819 #:tests? #f))
820 (propagated-inputs
821 `(("python-capturer" ,python-capturer)))
822 (home-page "https://coloredlogs.readthedocs.io")
823 (synopsis "Colored stream handler for Python's logging module")
824 (description
825 "The @code{coloredlogs} package enables colored terminal output for
826Python's logging module. The @code{ColoredFormatter} class inherits from
827@code{logging.Formatter} and uses ANSI escape sequences to render your logging
828messages in color.")
829 (license license:expat)))
830
831(define-public python2-coloredlogs
832 (package-with-python2 python-coloredlogs))
833
834(define-public python-eventlet
835 (package
836 (name "python-eventlet")
837 (version "0.20.1")
838 (source
839 (origin
840 (method url-fetch)
841 (uri (pypi-uri "eventlet" version))
842 (sha256
843 (base32
844 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
845 (build-system python-build-system)
846 (propagated-inputs
847 `(("python-greenlet" ,python-greenlet)))
848 (arguments
849 ;; TODO: Requires unpackaged 'enum-compat'.
850 '(#:tests? #f))
851 (home-page "http://eventlet.net")
852 (synopsis "Concurrent networking library for Python")
853 (description
854 "Eventlet is a concurrent networking library for Python that
855allows you to change how you run your code, not how you write it.
856It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
857Coroutines ensure that the developer uses a blocking style of programming
858that is similar to threading, but provide the benefits of non-blocking I/O.
859The event dispatch is implicit, which means you can easily use @code{Eventlet}
860from the Python interpreter, or as a small part of a larger application.")
861 (license license:expat)))
862
863(define-public python2-eventlet
864 (let ((base (package-with-python2
865 (strip-python2-variant python-eventlet))))
866 (package (inherit base)
867 (propagated-inputs
868 `(("python2-enum34" ,python2-enum34)
869 ,@(package-propagated-inputs base))))))
870
871(define-public python-six
872 (package
873 (name "python-six")
874 (version "1.11.0")
875 (source
876 (origin
877 (method url-fetch)
878 (uri (pypi-uri "six" version))
879 (sha256
880 (base32
881 "1scqzwc51c875z23phj48gircqjgnn3af8zy2izjwmnlxrxsgs3h"))))
882 (build-system python-build-system)
883 (arguments
884 `(#:phases
885 (modify-phases %standard-phases
886 (replace 'check
887 (lambda _
888 (invoke "py.test" "-v"))))))
889 (native-inputs
890 `(("python-py" ,python-py)
891 ("python-pytest" ,python-pytest-bootstrap)))
892 (home-page "https://pypi.python.org/pypi/six/")
893 (synopsis "Python 2 and 3 compatibility utilities")
894 (description
895 "Six is a Python 2 and 3 compatibility library. It provides utility
896functions for smoothing over the differences between the Python versions with
897the goal of writing Python code that is compatible on both Python versions.
898Six supports every Python version since 2.5. It is contained in only one
899Python file, so it can be easily copied into your project.")
900 (license license:x11)))
901
902(define-public python2-six
903 (package-with-python2 python-six))
904
905(define-public python-six-bootstrap
906 (package
907 (inherit python-six)
908 (name "python-six-bootstrap")
909 (native-inputs `())
910 (arguments `(#:tests? #f))))
911
912(define-public python2-six-bootstrap
913 (package-with-python2 python-six-bootstrap))
914
915(define-public python-schedule
916 (package
917 (name "python-schedule")
918 (version "0.4.3")
919 (source
920 (origin
921 (method url-fetch)
922 (uri (pypi-uri "schedule" version))
923 (sha256
924 (base32
925 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
926 (build-system python-build-system)
927 (native-inputs
928 `(("python-pytest" ,python-pytest)
929 ("python-mock" ,python-mock)))
930 (home-page "https://github.com/dbader/schedule")
931 (synopsis "Schedule periodic function calls in Python")
932 (description
933 "Schedule is an in-process scheduler for periodic jobs that uses the
934builder pattern for configuration. Schedule lets you run Python functions (or
935any other callable) periodically at pre-determined intervals using a simple,
936human-friendly syntax.")
937 (license license:expat)))
938
939(define-public python2-schedule
940 (package-with-python2 python-schedule))
941
942(define-public python-pandas
943 (package
944 (name "python-pandas")
945 (version "0.23.4")
946 (source
947 (origin
948 (method url-fetch)
949 (uri (pypi-uri "pandas" version))
950 (sha256
951 (base32 "1x54pd7hr3y7qahx6b5bf2wzj54xvl8r3s1h4pl254pnmi3wl92v"))))
952 (build-system python-build-system)
953 (arguments
954 `(#:modules ((guix build utils)
955 (guix build python-build-system)
956 (ice-9 ftw)
957 (srfi srfi-26))
958 #:phases (modify-phases %standard-phases
959 (replace 'check
960 (lambda _
961 (let ((build-directory
962 (string-append
963 (getcwd) "/build/"
964 (car (scandir "build"
965 (cut string-prefix? "lib." <>))))))
966 ;; Disable the "strict data files" option which causes
967 ;; the build to error out if required data files are not
968 ;; available (as is the case with PyPI archives).
969 (substitute* "setup.cfg"
970 (("addopts = --strict-data-files") "addopts = "))
971 (with-directory-excursion build-directory
972 ;; Delete tests that require "moto" which is not yet in Guix.
973 (for-each delete-file
974 '("pandas/tests/io/conftest.py"
975 "pandas/tests/io/json/test_compression.py"
976 "pandas/tests/io/parser/test_network.py"
977 "pandas/tests/io/test_excel.py"
978 "pandas/tests/io/test_parquet.py"))
979 (invoke "pytest" "-vv" "pandas" "--skip-slow"
980 "--skip-network" "-k"
981 ;; XXX: Due to the deleted tests above.
982 "not test_read_s3_jsonl"))))))))
983 (propagated-inputs
984 `(("python-numpy" ,python-numpy)
985 ("python-pytz" ,python-pytz)
986 ("python-dateutil" ,python-dateutil)))
987 (native-inputs
988 `(("python-cython" ,python-cython)
989 ("python-beautifulsoup4" ,python-beautifulsoup4)
990 ("python-lxml" ,python-lxml)
991 ("python-html5lib" ,python-html5lib)
992 ("python-nose" ,python-nose)
993 ("python-pytest" ,python-pytest)))
994 (home-page "https://pandas.pydata.org")
995 (synopsis "Data structures for data analysis, time series, and statistics")
996 (description
997 "Pandas is a Python package providing fast, flexible, and expressive data
998structures designed to make working with structured (tabular,
999multidimensional, potentially heterogeneous) and time series data both easy
1000and intuitive. It aims to be the fundamental high-level building block for
1001doing practical, real world data analysis in Python.")
1002 (license license:bsd-3)))
1003
1004(define-public python2-pandas
1005 (package-with-python2 python-pandas))
1006
1007(define-public python2-mechanize
1008 (package
1009 (name "python2-mechanize")
1010 (version "0.2.5")
1011 (source
1012 (origin
1013 (method url-fetch)
1cc184e6 1014 (uri (pypi-uri "mechanize" version))
44d10b1f
RW
1015 (sha256
1016 (base32
1017 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1018 (build-system python-build-system)
1019 (arguments
1020 `(#:python ,python-2 ; apparently incompatible with Python 3
1021 #:tests? #f))
1022 ;; test fails with message
1023 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1024 ;; (python-3.3.2) or
1025 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1026 ;; (python-2.7.5).
1027 ;; The source code is from March 2011 and probably not up-to-date
1028 ;; with respect to python unit tests.
1029 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1030 (synopsis
1031 "Stateful programmatic web browsing in Python")
1032 (description
1033 "Mechanize implements stateful programmatic web browsing in Python,
1034after Andy Lester’s Perl module WWW::Mechanize.")
1035 (license (license:non-copyleft
1036 "file://COPYING"
1037 "See COPYING in the distribution."))))
1038
1039
1040(define-public python-simplejson
1041 (package
1042 (name "python-simplejson")
1043 (version "3.14.0")
1044 (source
1045 (origin
1046 (method url-fetch)
1047 (uri (pypi-uri "simplejson" version))
1048 (sha256
1049 (base32
1050 "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy"))))
1051 (build-system python-build-system)
1052 (home-page "http://simplejson.readthedocs.org/en/latest/")
1053 (synopsis
1054 "Json library for Python")
1055 (description
1056 "JSON (JavaScript Object Notation) is a subset of JavaScript
1057syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1058format.
1059
1060Simplejson exposes an API familiar to users of the standard library marshal
1061and pickle modules. It is the externally maintained version of the json
1062library contained in Python 2.6, but maintains compatibility with Python 2.5
1063and (currently) has significant performance advantages, even without using
1064the optional C extension for speedups. Simplejson is also supported on
1065Python 3.3+.")
1066 (license license:x11)))
1067
1068(define-public python2-simplejson
1069 (package-with-python2 python-simplejson))
1070
1071
1072(define-public python-pyicu
1073 (package
1074 (name "python-pyicu")
1075 (version "2.2")
1076 (source
1077 (origin
1078 (method url-fetch)
1079 (uri (pypi-uri "PyICU" version))
1080 (sha256
1081 (base32
1082 "0wq9y5fi1ighgf5aws9nr87vi1w44p7q1k83rx2y3qj5d2xyhspa"))))
1083 (build-system python-build-system)
1084 (inputs
1085 `(("icu4c" ,icu4c)))
1086 (native-inputs
1087 `(("python-pytest" ,python-pytest)
1088 ("python-six" ,python-six)))
1089 (home-page "https://github.com/ovalhub/pyicu")
1090 (synopsis "Python extension wrapping the ICU C++ API")
1091 (description
1092 "PyICU is a python extension wrapping the ICU C++ API.")
1093 (properties `((python2-variant . ,(delay python2-pyicu))))
1094 (license license:x11)))
1095
1096(define-public python2-pyicu
1097 (let ((base (package-with-python2
1098 (strip-python2-variant python-pyicu))))
1099 (package
1100 (inherit base)
1101 (arguments
1102 `(,@(package-arguments base)
1103 #:phases
1104 (modify-phases %standard-phases
1105 (add-before 'check 'delete-failing-test
1106 (λ _
1107 ;; XXX: This fails due to Unicode issues unique to Python 2,
1108 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1109 (delete-file "test/test_Script.py")
1110 #t))))))))
1111
1112(define-public python2-dogtail
1113 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1114 ;; spaces in indentation" with Python 3.
1115 (package
1116 (name "python2-dogtail")
1117 (version "0.9.9")
1118 (source (origin
1119 (method url-fetch)
1120 (uri (pypi-uri "dogtail" version))
1121 (sha256
1122 (base32
1123 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1124 (build-system python-build-system)
1125 (arguments `(#:python ,python-2
1126 #:tests? #f)) ; invalid command "test"
1127 ;; Currently no offical homepage.
1128 (home-page "https://pypi.python.org/pypi/dogtail/")
1129 (synopsis "GUI test tool and automation framework written in Python")
1130 (description
1131 "Dogtail is a GUI test tool and automation framework written in Python.
1132It uses Accessibility (a11y) technologies to communicate with desktop
1133applications. dogtail scripts are written in Python and executed like any
1134other Python program.")
1135 (license license:gpl2+)))
1136
1137(define-public python-empy
1138 (package
1139 (name "python-empy")
1140 (version "3.3")
1141 (source (origin
1142 (method url-fetch)
1143 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1144 version ".tar.gz"))
1145 (sha256
1146 (base32
1147 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1148 (build-system python-build-system)
1149 (arguments
1150 `(#:tests? #f)) ;python2 only
1151 (home-page "http://www.alcyone.com/software/empy/")
1152 (synopsis "Templating system for Python")
1153 (description
1154 "EmPy is a system for embedding Python expressions and statements in
1155template text; it takes an EmPy source file, processes it, and produces
1156output. This is accomplished via expansions, which are special signals to the
1157EmPy system and are set off by a special prefix (by default the at sign, @@).
1158EmPy can expand arbitrary Python expressions and statements in this way, as
1159well as a variety of special forms. Textual data not explicitly delimited in
1160this way is sent unaffected to the output, allowing Python to be used in
1161effect as a markup language. Also supported are callbacks via hooks,
1162recording and playback via diversions, and dynamic, chainable filters. The
1163system is highly configurable via command line options and embedded
1164commands.")
1165 (license license:lgpl2.1+)))
1166
1167(define-public python2-empy
1168 (package-with-python2 python-empy))
1169
1170(define-public python2-element-tree
1171 (package
1172 (name "python2-element-tree")
1173 (version "1.2.6")
1174 (source (origin
1175 (method url-fetch)
1176 (uri (string-append
1177 "http://effbot.org/media/downloads/elementtree-"
1178 version "-20050316.tar.gz"))
1179 (sha256
1180 (base32
1181 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1182 (build-system python-build-system)
1183 (arguments
1184 `(#:python ,python-2 ; seems to be part of Python 3
1185 #:tests? #f)) ; no 'test' sub-command
1186 (synopsis "Toolkit for XML processing in Python")
1187 (description
1188 "ElementTree is a Python library supporting lightweight XML processing.")
1189 (home-page "http://effbot.org/zone/element-index.htm")
1190 (license (license:x11-style
1191 "http://docs.python.org/2/license.html"
1192 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1193
1194(define-public python2-pybugz
1195 (package
1196 (name "python2-pybugz")
1197 (version "0.6.11")
1198 (source (origin
1199 (method url-fetch)
1200 (uri (string-append
1201 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1202 version ".tar.gz"))
1203 (sha256
1204 (base32
1205 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1206 (patches (search-patches "pybugz-stty.patch"
1207 "pybugz-encode-error.patch"))))
1208 (build-system python-build-system)
1209 (arguments
1210 `(#:python ,python-2 ; SyntaxError with Python 3
1211 #:tests? #f)) ; no 'test' sub-command
1212 (propagated-inputs
1213 `(("element-tree" ,python2-element-tree)))
1214 (synopsis "Python and command-line interface to Bugzilla")
1215 (description
1216 "PyBugz is a Python library and command-line tool to query the Bugzilla
1217bug tracking system. It is meant as an aid to speed up interaction with the
1218bug tracker.")
1219 (home-page "http://www.liquidx.net/pybugz/")
1220 (license license:gpl2)))
1221
1222(define-public python2-enum
1223 (package
1224 (name "python2-enum")
1225 (version "0.4.6")
1226 (source (origin
1227 (method url-fetch)
1228 (uri (pypi-uri "enum" version))
1229 (sha256
1230 (base32
1231 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1232 (build-system python-build-system)
1233 (arguments
1234 `(#:python ,python-2))
1235 (home-page "http://pypi.python.org/pypi/enum/")
1236 (synopsis "Robust enumerated type support in Python")
1237 (description
1238 "This provides a module for robust enumerations in Python. It has
1239been superseded by the Python standard library and is provided only for
1240compatibility.")
1241 ;; Choice of either license.
1242 (license (list license:gpl3+ license:psfl))))
1243
1244(define-public python-enum34
1245 (package
1246 (name "python-enum34")
1247 (version "1.1.6")
1248 (source
1249 (origin
1250 (method url-fetch)
1251 (uri (pypi-uri "enum34" version))
1252 (sha256
1253 (base32
1254 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1255 (build-system python-build-system)
1256 (home-page "https://pypi.python.org/pypi/enum34")
1257 (synopsis "Backported Python 3.4 Enum")
1258 (description
1259 "Enum34 is the new Python stdlib enum module available in Python 3.4
1260backported for previous versions of Python from 2.4 to 3.3.")
1261 (license license:bsd-3)))
1262
1263(define-public python2-enum34
1264 (package-with-python2 python-enum34))
1265
1266(define-public python-parse-type
1267 (package
1268 (name "python-parse-type")
1269 (version "0.4.2")
1270 (source
1271 (origin
1272 (method url-fetch)
1273 (uri (pypi-uri "parse_type" version))
1274 (sha256
1275 (base32
1276 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1277 (build-system python-build-system)
1278 (propagated-inputs
1279 `(("python-six" ,python-six)
1280 ("python-parse" ,python-parse)))
1281 (native-inputs
1282 `(("python-pytest" ,python-pytest)
1283 ("python-pytest-runner" ,python-pytest-runner)))
1284 (home-page "https://github.com/jenisys/parse_type")
1285 (synopsis "Extended parse module")
1286 (description
1287 "Parse_type extends the python parse module.")
1288 (properties
1289 `((python2-variant . ,(delay python2-parse-type))))
1290 (license license:bsd-3)))
1291
1292(define-public python2-parse-type
1293 (let ((base (package-with-python2
1294 (strip-python2-variant python-parse-type))))
1295 (package (inherit base)
1296 (propagated-inputs
1297 `(("python2-enum34" ,python2-enum34)
1298 ,@(package-propagated-inputs base))))))
1299
1300(define-public python-parse
1301 (package
1302 (name "python-parse")
1303 (version "1.8.4")
1304 (source
1305 (origin
1306 (method url-fetch)
1307 (uri (pypi-uri "parse" version))
1308 (sha256
1309 (base32
1310 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
1311 (build-system python-build-system)
1312 (arguments
1313 `(#:phases
1314 (modify-phases %standard-phases
1315 (replace 'check
1316 (lambda _ (invoke "python" "test_parse.py"))))))
1317 (home-page "https://github.com/r1chardj0n3s/parse")
1318 (synopsis "Parse strings")
1319 (description
1320 "Parse strings using a specification based on the Python @code{format()}
1321syntax.")
1322 (license license:x11)))
1323
1324(define-public python-polib
1325 (package
1326 (name "python-polib")
1327 (version "1.0.8")
1328 (source (origin
1329 (method url-fetch)
1330 (uri (pypi-uri "polib" version))
1331 (sha256
1332 (base32
1333 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1334 (build-system python-build-system)
1335 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1336 (synopsis "Manipulate, create and modify gettext files")
1337 (description "Polib can manipulate any gettext format (po, pot and mo)
1338files. It can be used to create po files from scratch or to modify
1339existing ones.")
1340 (license license:expat)))
1341
1342(define-public python2-polib
1343 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1344 (package
1345 (inherit base)
1346 (arguments `(,@(package-arguments base)
1347 ;; Tests don't work with python2.
1348 #:tests? #f)))))
1349
1350(define-public scons
1351 (package
1352 (name "scons")
ad34338d 1353 (version "3.0.3")
44d10b1f 1354 (source (origin
ad34338d
RW
1355 (method git-fetch)
1356 (uri (git-reference
1357 (url "https://github.com/SCons/scons.git")
1358 (commit version)))
1359 (file-name (git-file-name name version))
44d10b1f
RW
1360 (sha256
1361 (base32
ad34338d 1362 "1xizkjgrvydkjhpv7i5rx0mdkp3618sis7jsckjh57nxcynlk5dc"))))
44d10b1f
RW
1363 (build-system python-build-system)
1364 (arguments
1365 `(#:use-setuptools? #f ; still relies on distutils
ad34338d
RW
1366 #:tests? #f ; no 'python setup.py test' command
1367 #:phases
1368 (modify-phases %standard-phases
1369 (add-before 'build 'bootstrap
1370 (lambda _
1371 (substitute* "src/engine/SCons/compat/__init__.py"
1372 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
1373 "sys.modules[new] = __import__(old)"))
1374 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
1375 (chdir "build/scons")
1376 #t)))))
44d10b1f
RW
1377 (home-page "http://scons.org/")
1378 (synopsis "Software construction tool written in Python")
1379 (description
1380 "SCons is a software construction tool. Think of SCons as an improved,
1381cross-platform substitute for the classic Make utility with integrated
1382functionality similar to autoconf/automake and compiler caches such as ccache.
1383In short, SCons is an easier, more reliable and faster way to build
1384software.")
1385 (license license:x11)))
1386
1387(define-public scons-python2
1388 (package
1389 (inherit (package-with-python2 scons))
1390 (name "scons-python2")))
1391
1392(define-public python-extras
1393 (package
1394 (name "python-extras")
1395 (version "1.0.0")
1396 (source
1397 (origin
1398 (method url-fetch)
1399 (uri (pypi-uri "extras" version))
1400 (sha256
1401 (base32
1402 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1403 (build-system python-build-system)
1404 (arguments
1405 ;; FIXME: Circular dependency on testtools.
1406 '(#:tests? #f))
1407 (home-page "https://github.com/testing-cabal/extras")
1408 (synopsis "Useful extensions to the Python standard library")
1409 (description
1410 "Extras is a set of extensions to the Python standard library.")
1411 (license license:expat)))
1412
1413(define-public python2-extras
1414 (package-with-python2 python-extras))
1415
1416(define-public python-mimeparse
1417 (package
1418 (name "python-mimeparse")
1419 (version "1.6.0")
1420 (source
1421 (origin
1422 (method url-fetch)
89bf667c 1423 (uri (pypi-uri "python-mimeparse" version))
44d10b1f
RW
1424 (sha256
1425 (base32
1426 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
1427 (build-system python-build-system)
1428 (arguments
1429 '(#:phases
1430 (modify-phases %standard-phases
1431 (replace 'check
1432 (lambda _
1433 (invoke "./mimeparse_test.py"))))))
1434 (home-page
1435 "https://github.com/dbtsai/python-mimeparse")
1436 (synopsis "Python library for parsing MIME types")
1437 (description
1438 "Mimeparse provides basic functions for parsing MIME type names and
1439matching them against a list of media-ranges.")
1440 (license license:expat)))
1441
1442(define-public python2-mimeparse
1443 (package-with-python2 python-mimeparse))
1444
1445(define-public python-miniboa
1446 (package
1447 (name "python-miniboa")
1448 (version "1.0.7")
1449 (source
1450 (origin
1451 (method url-fetch)
1452 (uri (pypi-uri "miniboa" version))
1453 (sha256
1454 (base32
1455 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
1456 (build-system python-build-system)
1457 (home-page "https://github.com/shmup/miniboa")
1458 (synopsis "Simple, single-threaded Telnet server")
1459 (description
1460 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
1461server.")
1462 (license license:asl2.0)))
1463
1464(define-public python2-miniboa
1465 (package-with-python2 python-miniboa))
1466
1467(define-public python-pafy
1468 (package
1469 (name "python-pafy")
1470 (version "0.5.3.1")
1471 (source
1472 (origin
1473 (method url-fetch)
1474 (uri (pypi-uri "pafy" version))
1475 (sha256
1476 (base32
1477 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1478 (build-system python-build-system)
1479 (arguments
1480 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1481 (propagated-inputs
1482 ;; Youtube-dl is a python package which is imported in the file
1483 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1484 `(("youtube-dl" ,youtube-dl)))
1485 (home-page "https://np1.github.io/pafy/")
1486 (synopsis "Retrieve YouTube content and metadata")
1487 (description
1488 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1489 (license license:lgpl3+)))
1490
1491(define-public python2-funcsigs
1492 (package
1493 (name "python2-funcsigs")
1494 (version "1.0.2")
1495 (source (origin
1496 (method url-fetch)
1497 (uri (pypi-uri "funcsigs" version))
1498 (sha256
1499 (base32
1500 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1501 (build-system python-build-system)
1502 (arguments
1503 `(#:python ,python-2))
1504 (native-inputs
1505 `(("python2-unittest2" ,python2-unittest2)))
1506 (home-page "http://funcsigs.readthedocs.org")
1507 (synopsis "Python function signatures from PEP362")
1508 (description
1509 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1510 (license license:asl2.0)))
1511
1512(define-public python2-funcsigs-bootstrap
1513 (package
1514 (inherit python2-funcsigs)
1515 (name "python2-funcsigs-bootstrap")
1516 (native-inputs `())
1517 (arguments
1518 `(#:tests? #f
1519 ,@(package-arguments python2-funcsigs)))))
1520
1521(define-public python-py
1522 (package
1523 (name "python-py")
1524 (version "1.5.4")
1525 (source
1526 (origin
1527 (method url-fetch)
1528 (uri (pypi-uri "py" version))
1529 (sha256
1530 (base32
1531 "1xxvwfn82457djf55f5n2c94699rfqnk43br8fif2r2q8gvrmm9z"))))
1532 (build-system python-build-system)
1533 (arguments
1534 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1535 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1536 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1537 ;; Is this module globally installed?"
1538 '(#:tests? #f))
1539 (native-inputs
1540 `(("python-setuptools-scm" ,python-setuptools-scm)))
1541 (home-page "https://github.com/pytest-dev/py")
1542 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1543 (description
1544 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1545code introspection, and logging.")
1546 (license license:expat)))
1547
1548(define-public python2-py
1549 (package-with-python2 python-py))
1550
1551;; Recent versions of python-fixtures and python-testrepository need
1552;; python-pbr for packaging, which itself needs these two packages for
1553;; testing.
1554;; To fix this circular dependency, we use a build of python-pbr, based on the
1555;; same source, just without any test dependencies and with tests disabled.
1556;; python-pbr-minmal is then used to package python-fixtures and
1557;; python-testrepository.
1558;; Strictly speaking we currently could remove the test-requirements from the
1559;; normal python-pbr package (and save this package) since test are disabled
1560;; there anyway. But this may change in future.
1561(define-public python-pbr-minimal
1562 (package
1563 (name "python-pbr-minimal")
1564 (version "3.0.1")
1565 (source
1566 (origin
1567 (method url-fetch)
1568 (uri (pypi-uri "pbr" version))
1569 (sha256
1570 (base32
1571 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
1572 (build-system python-build-system)
1573 (arguments
1574 `(#:tests? #f))
1575 (home-page "http://docs.openstack.org/developer/pbr/")
1576 (synopsis "Minimal build of python-pbr used for bootstrapping")
1577 (description
1578 "Used only for bootstrapping python2-pbr, you should not need this.")
1579 (license license:asl2.0)))
1580
1581(define-public python2-pbr-minimal
1582 (package-with-python2 python-pbr-minimal))
1583
1584(define-public python-pbr
1585 (package
1586 (inherit python-pbr-minimal)
1587 (name "python-pbr")
1588 (arguments
1589 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1590 (propagated-inputs
1591 `(("git" ,git))) ;; pbr actually uses the "git" binary.
1592 (native-inputs
1593 `(("python-fixtures" ,python-fixtures-bootstrap)
1594 ;; discover, coverage, hacking, subunit
1595 ("python-mock" ,python-mock)
1596 ("python-six" ,python-six)
1597 ("python-sphinx" ,python-sphinx)
1598 ("python-testrepository" ,python-testrepository-bootstrap)
1599 ("python-testresources" ,python-testresources-bootstrap)
1600 ("python-testscenarios" ,python-testscenarios-bootstrap)
1601 ("python-testtools" ,python-testtools-bootstrap)
1602 ("python-virtualenv" ,python-virtualenv)))
1603 (synopsis "Enhance the default behavior of Python’s setuptools")
1604 (description
1605 "Python Build Reasonableness (PBR) is a library that injects some useful
1606and sensible default behaviors into your setuptools run. It will set
1607versions, process requirements files and generate AUTHORS and ChangeLog file
1608from git information.
1609")))
1610
1611(define-public python2-pbr
1612 (package-with-python2 python-pbr))
1613
1614(define-public python-exif-read
1615 (package
1616 (name "python-exif-read")
1617 (version "2.1.2")
1618 (source (origin
1619 (method url-fetch)
1620 (uri (pypi-uri "ExifRead" version))
1621 (sha256
1622 (base32
1623 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
1624 (build-system python-build-system)
1625 (arguments `(#:tests? #f)) ; no tests
1626 (home-page "https://github.com/ianare/exif-py")
1627 (synopsis "Python library to extract EXIF data from image files")
1628 (description
1629 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1630files.")
1631 (license license:bsd-3)))
1632
1633(define-public python2-exif-read
1634 (package-with-python2 python-exif-read))
1635
1636(define-public python-pyld
1637 (package
1638 (name "python-pyld")
1639 (version "1.0.3")
1640 (source (origin
1641 (method url-fetch)
1642 (uri (pypi-uri "PyLD" version))
1643 (sha256
1644 (base32
1645 "12i2g6xdj30k7xxcibg3sc5y76snwq8l6n8fy9lyi577kgy0h2pm"))))
1646 (build-system python-build-system)
1647 (home-page "https://github.com/digitalbazaar/pyld")
1648 (synopsis "Python implementation of the JSON-LD specification")
1649 (description
1650 "PyLD is an implementation of the JSON-LD specification.")
1651 (license license:bsd-3)))
1652
1653(define-public python2-pyld
1654 (package-with-python2 python-pyld))
1655
1656(define-public python-click
1657 (package
1658 (name "python-click")
61984855 1659 (version "7.0")
44d10b1f
RW
1660 (source
1661 (origin
1662 (method url-fetch)
1663 (uri (pypi-uri "click" version))
1664 (sha256
1665 (base32
61984855 1666 "1mzjixd4vjbjvzb6vylki9w1556a9qmdh35kzmq6cign46av952v"))))
44d10b1f
RW
1667 (build-system python-build-system)
1668 (arguments
8d7e7ca6 1669 `(#:phases
44d10b1f
RW
1670 (modify-phases %standard-phases
1671 (add-after 'unpack 'fix-paths
1672 (lambda* (#:key inputs #:allow-other-keys)
1673 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
1674 "cross-libc" "libc"))))
1675 (substitute* "click/_unicodefun.py"
1676 (("'locale'")
1677 (string-append "'" glibc "/bin/locale'"))))
8d7e7ca6
EF
1678 #t))
1679 (replace 'check
1680 (lambda _
1681 (invoke "python" "-m" "pytest"))))))
44d10b1f
RW
1682 (native-inputs
1683 `(("python-pytest" ,python-pytest)))
61984855 1684 (home-page "https://palletsprojects.com/p/click/")
44d10b1f
RW
1685 (synopsis "Command line library for Python")
1686 (description
1687 "Click is a Python package for creating command line interfaces in a
1688composable way with as little code as necessary. Its name stands for
1689\"Command Line Interface Creation Kit\". It's highly configurable but comes
1690with sensible defaults out of the box.")
1691 (license license:bsd-3)))
1692
1693(define-public python2-click
1694 (package-with-python2 python-click))
1695
1696(define-public python-wheel
1697 (package
1698 (name "python-wheel")
746c074b 1699 (version "0.32.3")
44d10b1f
RW
1700 (source
1701 (origin
1702 (method url-fetch)
1703 (uri (pypi-uri "wheel" version))
1704 (sha256
1705 (base32
746c074b 1706 "1dhxl1bf18bx9szmqcnxbg6204hp3im8089q3hkwh5jfa6zh75q2"))))
44d10b1f
RW
1707 (build-system python-build-system)
1708 (native-inputs
1709 `(("python-jsonschema" ,python-jsonschema)
1710 ("python-pytest-cov" ,python-pytest-cov)))
1711 (home-page "https://bitbucket.org/pypa/wheel/")
1712 (synopsis "Format for built Python packages")
1713 (description
1714 "A wheel is a ZIP-format archive with a specially formatted filename and
1715the @code{.whl} extension. It is designed to contain all the files for a PEP
1716376 compatible install in a way that is very close to the on-disk format. Many
1717packages will be properly installed with only the @code{Unpack} step and the
1718unpacked archive preserves enough information to @code{Spread} (copy data and
1719scripts to their final locations) at any later time. Wheel files can be
1720installed with a newer @code{pip} or with wheel's own command line utility.")
1721 (license license:expat)
1722 (properties `((python2-variant . ,(delay python2-wheel))))))
1723
1724(define-public python2-wheel
1725 (let ((wheel (package-with-python2
1726 (strip-python2-variant python-wheel))))
1727 (package (inherit wheel)
1728 (native-inputs `(("python2-functools32" ,python2-functools32)
1729 ,@(package-native-inputs wheel))))))
1730
1731(define-public python-vcversioner
1732 (package
1733 (name "python-vcversioner")
1734 (version "2.16.0.0")
1735 (source
1736 (origin
1737 (method url-fetch)
1738 (uri (pypi-uri "vcversioner" version))
1739 (sha256
1740 (base32
1741 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
1742 (build-system python-build-system)
1743 (synopsis "Python library for version number discovery")
1744 (description "Vcversioner is a Python library that inspects tagging
1745information in a variety of version control systems in order to discover
1746version numbers.")
1747 (home-page "https://github.com/habnabit/vcversioner")
1748 (license license:isc)))
1749
1750(define-public python2-vcversioner
1751 (package-with-python2 python-vcversioner))
1752
1753(define-public python-jsonschema
1754 (package
1755 (name "python-jsonschema")
1756 (version "2.6.0")
1757 (source (origin
1758 (method url-fetch)
786ccb87 1759 (uri (pypi-uri "jsonschema" version))
44d10b1f
RW
1760 (sha256
1761 (base32
1762 "00kf3zmpp9ya4sydffpifn0j0mzm342a2vzh82p6r0vh10cg7xbg"))))
1763 (build-system python-build-system)
1764 (arguments
1765 '(#:phases
1766 (modify-phases %standard-phases
8d466799 1767 (replace 'check (lambda _ (invoke "nosetests"))))))
44d10b1f
RW
1768 (native-inputs
1769 `(("python-nose" ,python-nose)
1770 ("python-vcversioner" ,python-vcversioner)))
1771 (home-page "https://github.com/Julian/jsonschema")
1772 (synopsis "Implementation of JSON Schema for Python")
1773 (description
1774 "Jsonschema is an implementation of JSON Schema for Python.")
1775 (license license:expat)
1776 (properties `((python2-variant . ,(delay python2-jsonschema))))))
1777
1778(define-public python2-jsonschema
1779 (let ((jsonschema (package-with-python2
1780 (strip-python2-variant python-jsonschema))))
1781 (package (inherit jsonschema)
1782 (native-inputs
1783 `(("python2-mock" ,python2-mock)
1784 ,@(package-native-inputs jsonschema)))
1785 (propagated-inputs
1786 `(("python2-functools32" ,python2-functools32))))))
1787
1788(define-public python-schema
1789 (package
1790 (name "python-schema")
1791 (version "0.6.6")
1792 (source
1793 (origin
1794 (method url-fetch)
1795 (uri (pypi-uri "schema" version))
1796 (sha256
1797 (base32
1798 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
1799 (build-system python-build-system)
1800 (native-inputs
1801 `(("python-pytest" ,python-pytest)))
1802 (home-page "https://github.com/keleshev/schema")
1803 (synopsis "Simple data validation library")
1804 (description
1805 "@code{python-schema} is a library for validating Python data
1806structures, such as those obtained from config-files, forms, external
1807services or command-line parsing, converted from JSON/YAML (or
1808something else) to Python data-types.")
1809 (license license:psfl)))
1810
1811(define-public python2-schema
1812 (package-with-python2 python-schema))
1813
1814(define-public python-schema-0.5
1815 (package (inherit python-schema)
1816 (version "0.5.0")
1817 (source
1818 (origin
1819 (method url-fetch)
1820 (uri (pypi-uri "schema" version))
1821 (sha256
1822 (base32
1823 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
1824
1825(define-public python2-schema-0.5
1826 (package-with-python2 python-schema-0.5))
1827
1828(define-public python-kitchen
1829 (package
1830 (name "python-kitchen")
1831 (version "1.2.5")
1832 (source
1833 (origin
1834 (method url-fetch)
1835 (uri (pypi-uri "kitchen" version))
1836 (sha256
1837 (base32
1838 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
1839 (build-system python-build-system)
1840 (propagated-inputs
1841 `(("python-chardet" ,python-chardet)))
1842 (home-page "https://github.com/fedora-infra/kitchen")
1843 (synopsis "Python API for snippets")
1844 (description "@code{kitchen} module provides a python API for all sorts of
1845little useful snippets of code that everybody ends up writing for their projects
1846but never seem big enough to build an independent release. Use kitchen and stop
1847cutting and pasting that code over and over.")
1848 (license (list license:lgpl2.1+
1849 ;; subprocess.py, test_subprocess.py,
1850 ;; kitchen/pycompat25/defaultdict.py:
1851 license:psfl))))
1852
1853(define-public python2-kitchen
1854 (package-with-python2 python-kitchen))
1855
1856(define-public python-unidecode
1857 (package
1858 (name "python-unidecode")
1859 (version "1.0.23")
1860 (source (origin
1861 (method url-fetch)
1862 (uri (pypi-uri "Unidecode" version))
1863 (sha256
1864 (base32
1865 "1ysjbr3nqfqj97h8zyj3v9pya413vkv7a1mzml80w37xx15kb1cb"))))
1866 (build-system python-build-system)
1867 (home-page "https://pypi.python.org/pypi/Unidecode")
1868 (synopsis "ASCII transliterations of Unicode text")
1869 (description
1870 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
1871useful when integrating with legacy code that doesn't support Unicode, or for
1872ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
1873machine identifiers from human-readable Unicode strings that should still be
1874somewhat intelligible.")
1875 (license license:gpl2+)))
1876
1877(define-public python2-unidecode
1878 (package-with-python2 python-unidecode))
1879
1880(define-public python-pyjwt
1881 (package
1882 (name "python-pyjwt")
1883 (version "1.5.3")
1884 (source
1885 (origin
1886 (method url-fetch)
1887 (uri (pypi-uri "PyJWT" version))
1888 (sha256
1889 (base32
1890 "1rxsg14i33vm2i6lz0my628108c81k43v10n4h3p0gx62xdyf2sh"))
1891 (modules '((guix build utils)))
1892 (snippet
1893 '(begin
1894 (for-each delete-file-recursively
1895 (find-files "." "\\.pyc$"))
1896 #t))))
1897 (build-system python-build-system)
1898 (native-inputs
1899 `(("python-pytest" ,python-pytest)
1900 ("python-pytest-cov" ,python-pytest-cov)
1901 ("python-pytest-runner" ,python-pytest-runner)))
1902 (home-page "https://github.com/progrium/pyjwt")
1903 (synopsis "JSON Web Token implementation in Python")
1904 (description
1905 "PyJWT is a JSON Web Token implementation written in Python.")
1906 (license license:expat)))
1907
1908(define-public python2-pyjwt
1909 (package-with-python2 python-pyjwt))
1910
1911(define-public python-pykka
1912 (package
1913 (name "python-pykka")
1914 (version "1.2.1")
1915 (source
1916 (origin
1917 (method url-fetch)
1918 (uri (pypi-uri "Pykka" version))
1919 (sha256
1920 (base32
1921 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
1922 (build-system python-build-system)
1923 (native-inputs
1924 `(("python-mock" ,python-mock)
1925 ("python-nose" ,python-nose)
1926 ("python-gevent" ,python-gevent)
1927 ("python-eventlet" ,python-eventlet)))
1928 (home-page "https://www.pykka.org/")
1929 (synopsis "Pykka is a Python implementation of the actor model")
1930 (description
1931 "Pykka is a Python implementation of the actor model.
1932The actor model introduces some simple rules to control the sharing
1933of state and cooperation between execution units, which makes it
1934easier to build concurrent applications.")
1935 (license license:asl2.0)))
1936
1937(define-public python2-pykka
1938 (package-with-python2 python-pykka))
1939
1940(define-public python-pympler
1941 (package
1942 (name "python-pympler")
1943 (home-page "https://pythonhosted.org/Pympler/")
1944 (version "0.5")
1945 (source (origin
1946 (method url-fetch)
1947 (uri (pypi-uri "Pympler" version))
1948 (sha256
1949 (base32
1950 "03qwsbilqgvnbl3a1jmpgixbr2kq6m3fvdlzyr3wdp01bwlc85kx"))))
1951 (build-system python-build-system)
1952 (arguments
1953 `(#:phases (modify-phases %standard-phases
1954 (delete 'check)
1955 (add-after 'install 'check
1956 (lambda* (#:key inputs outputs #:allow-other-keys)
1957 (add-installed-pythonpath inputs outputs)
1958 (invoke "python" "setup.py" "test"))))))
1959 (synopsis "Measure, monitor and analyze memory behavior")
1960 (description
1961 "Pympler is a development tool to measure, monitor and analyze
1962the memory behavior of Python objects in a running Python application.
1963
1964By pympling a Python application, detailed insight in the size and the
1965lifetime of Python objects can be obtained. Undesirable or unexpected
1966runtime behavior like memory bloat and other @samp{pymples} can easily
1967be identified.
1968
1969A web profiling frontend exposes process statistics, garbage
1970visualisation and class tracker statistics.")
1971 (license license:asl2.0)))
1972
1973(define-public python2-pympler
1974 (package-with-python2 python-pympler))
1975
1976(define-public python-itsdangerous
1977 (package
1978 (name "python-itsdangerous")
acfcf2ed 1979 (version "1.1.0")
44d10b1f
RW
1980 (source
1981 (origin
1982 (method url-fetch)
acfcf2ed 1983 (uri (pypi-uri "itsdangerous" version))
44d10b1f
RW
1984 (sha256
1985 (base32
acfcf2ed 1986 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
44d10b1f 1987 (build-system python-build-system)
acfcf2ed 1988 (home-page "https://palletsprojects.com/p/itsdangerous/")
44d10b1f
RW
1989 (synopsis "Python library for passing data to/from untrusted environments")
1990 (description
1991 "Itsdangerous provides various helpers to pass trusted data to untrusted
1992environments and back.")
1993 (license license:bsd-3)))
1994
1995(define-public python2-itsdangerous
1996 (package-with-python2 python-itsdangerous))
1997
1998(define-public python-pyyaml
1999 (package
2000 (name "python-pyyaml")
2001 (version "3.13")
2002 (source
2003 (origin
2004 (method url-fetch)
2005 (uri (pypi-uri "PyYAML" version))
2006 (sha256
2007 (base32
2008 "1gx603g484z46cb74j9rzr6sjlh2vndxayicvlyhxdz98lhhkwry"))))
2009 (build-system python-build-system)
2010 (inputs
2011 `(("libyaml" ,libyaml)))
2012 (home-page "http://pyyaml.org/wiki/PyYAML")
2013 (synopsis "YAML parser and emitter for Python")
2014 (description
2015 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2016complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2017API, and sensible error messages. PyYAML supports standard YAML tags and
2018provides Python-specific tags that allow to represent an arbitrary Python
2019object.")
2020 (license license:expat)))
2021
2022(define-public python2-pyyaml
2023 (package-with-python2 python-pyyaml))
2024
2025(define-public python-vine
2026 (package
2027 (name "python-vine")
2028 (version "1.1.4")
2029 (source
2030 (origin
2031 (method url-fetch)
2032 (uri (pypi-uri "vine" version))
2033 (sha256
2034 (base32
2035 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
2036 (build-system python-build-system)
2037 (native-inputs
2038 `(("python-pytest" ,python-pytest)
2039 ("python-case" ,python-case)))
2040 (home-page "https://github.com/celery/vine")
2041 (synopsis "Promises for Python")
2042 (description
2043 "@code{vine} provides a special implementation of promises in that it can
2044be used both for \"promise of a value\" and lazy evaluation. The biggest
2045upside for this is that everything in a promise can also be a promise,
2046e.g. filters, callbacks and errbacks can all be promises.")
2047 (license license:bsd-3)))
2048
2049(define-public python-virtualenv
2050 (package
2051 (name "python-virtualenv")
2782bd51 2052 (version "16.1.0")
44d10b1f
RW
2053 (source
2054 (origin
2055 (method url-fetch)
2056 (uri (pypi-uri "virtualenv" version))
2057 (sha256
2058 (base32
2782bd51 2059 "0242cg3hdq3qdvx5flyrki8lpwlgwf5k45c21ks5049fv7ygm6gq"))))
44d10b1f
RW
2060 (build-system python-build-system)
2061 (arguments
2062 `(#:phases
2063 (modify-phases %standard-phases
2782bd51 2064 (add-before 'check 'disable-failing-test
44d10b1f
RW
2065 (lambda _
2066 ;; Disable failing test. See upstream bug report
2067 ;; https://github.com/pypa/virtualenv/issues/957
2068 (substitute* "tests/test_virtualenv.py"
2069 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2782bd51 2070 #t)))))
44d10b1f
RW
2071 (native-inputs
2072 `(("python-mock" ,python-mock)
2073 ("python-pytest" ,python-pytest)))
2074 (home-page "https://virtualenv.pypa.io/")
2075 (synopsis "Virtual Python environment builder")
2076 (description
2077 "Virtualenv is a tool to create isolated Python environments.")
2078 (license license:expat)))
2079
2080(define-public python2-virtualenv
2081 (package-with-python2 python-virtualenv))
2082
2083(define-public python-markupsafe
2084 (package
2085 (name "python-markupsafe")
2086 (version "1.0")
2087 (source
2088 (origin
2089 (method url-fetch)
5182927c 2090 (uri (pypi-uri "MarkupSafe" version))
44d10b1f
RW
2091 (sha256
2092 (base32
2093 "0rdn1s8x9ni7ss8rfiacj7x1085lx8mh2zdwqslnw8xc3l4nkgm6"))))
2094 (build-system python-build-system)
2095 (home-page "https://github.com/mitsuhiko/markupsafe")
2096 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2097 (description
2098 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2099for Python.")
2100 (license license:bsd-3)))
2101
2102(define-public python2-markupsafe
2103 (package-with-python2 python-markupsafe))
2104
2105(define-public python-jinja2
2106 (package
2107 (name "python-jinja2")
2108 (version "2.10")
2109 (source
2110 (origin
2111 (method url-fetch)
2112 (uri (pypi-uri "Jinja2" version))
2113 (sha256
2114 (base32
2115 "190l36hfw3wb2n3n68yacjabxyb1pnxwn7vjx96cmjj002xy2jzq"))))
2116 (build-system python-build-system)
2117 (propagated-inputs
2118 `(("python-markupsafe" ,python-markupsafe)))
2119 (home-page "http://jinja.pocoo.org/")
2120 (synopsis "Python template engine")
2121 (description
2122 "Jinja2 is a small but fast and easy to use stand-alone template engine
2123written in pure Python.")
2124 (license license:bsd-3)))
2125
2126(define-public python2-jinja2
2127 (package-with-python2 python-jinja2))
2128
2129(define-public python-pystache
2130 (package
2131 (name "python-pystache")
2132 (version "0.5.4")
2133 (source (origin
2134 (method url-fetch)
2135 (uri (pypi-uri "pystache" version))
2136 (sha256
2137 (base32
2138 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2139 (build-system python-build-system)
2140 (arguments
2141 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2142 (home-page "http://defunkt.io/pystache/")
2143 (synopsis "Python logic-less template engine")
2144 (description
2145 "Pystache is a Python implementation of the framework agnostic,
2146logic-free templating system Mustache.")
2147 (license license:expat)
2148 (properties `((python2-variant . ,(delay python2-pystache))))))
2149
2150(define-public python2-pystache
2151 (package (inherit (package-with-python2
2152 (strip-python2-variant python-pystache)))
2153 (arguments
2154 `(#:python ,python-2
2155 #:phases
2156 (modify-phases %standard-phases
2157 (replace 'check
2158 (lambda _
dfafc29b 2159 (invoke "python" "test_pystache.py"))))))))
44d10b1f
RW
2160
2161(define-public python-joblib
2162 (package
2163 (name "python-joblib")
2164 (version "0.13.0")
2165 (source (origin
2166 (method url-fetch)
2167 (uri (pypi-uri "joblib" version))
2168 (sha256
2169 (base32
2170 "0612nazad8dxmn3xghfrmjax6456l4xy6hn9cngs7vydi14ds7v5"))))
2171 (build-system python-build-system)
2172 (arguments
2173 `(#:phases
2174 (modify-phases %standard-phases
2175 (replace 'check
2176 (lambda _ (invoke "pytest" "-v" "joblib"))))))
2177 (native-inputs
2178 `(("python-pytest" ,python-pytest)))
2179 (home-page "https://joblib.readthedocs.io/")
2180 (synopsis "Using Python functions as pipeline jobs")
2181 (description
2182 "Joblib is a set of tools to provide lightweight pipelining in Python.
2183In particular, joblib offers: transparent disk-caching of the output values
2184and lazy re-evaluation (memoize pattern), easy simple parallel computing
2185logging and tracing of the execution.")
2186 (license license:bsd-3)))
2187
2188(define-public python2-joblib
2189 (package-with-python2 python-joblib))
2190
2191(define-public python-docutils
2192 (package
2193 (name "python-docutils")
2194 (version "0.14")
2195 (source
2196 (origin
2197 (method url-fetch)
2198 (uri (pypi-uri "docutils" version))
2199 (sha256
2200 (base32
2201 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
2202 (build-system python-build-system)
2203 (arguments
2204 '(#:tests? #f)) ; no setup.py test command
2205 (home-page "http://docutils.sourceforge.net/")
2206 (synopsis "Python Documentation Utilities")
2207 (description
2208 "Docutils is a modular system for processing documentation into useful
2209formats, such as HTML, XML, and LaTeX. For input Docutils supports
2210reStructuredText.")
2211 ;; Most of the source code is public domain, but some source files are
2212 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2213 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2214
2215(define-public python2-docutils
2216 (package-with-python2 python-docutils))
2217
2218(define-public python-pygments
2219 (package
2220 (name "python-pygments")
2221 (version "2.2.0")
2222 (source
2223 (origin
2224 (method url-fetch)
2225 (uri (pypi-uri "Pygments" version))
2226 (sha256
2227 (base32
2228 "1k78qdvir1yb1c634nkv6rbga8wv4289xarghmsbbvzhvr311bnv"))))
2229 (build-system python-build-system)
2230 (arguments
2231 ;; FIXME: Tests require sphinx, which depends on this.
2232 '(#:tests? #f))
2233 (home-page "http://pygments.org/")
2234 (synopsis "Syntax highlighting")
2235 (description
2236 "Pygments is a syntax highlighting package written in Python.")
2237 (license license:bsd-2)))
2238
2239(define-public python2-pygments
2240 (package-with-python2 python-pygments))
2241
2242(define-public python-sphinxcontrib-websupport
2243 (package
2244 (name "python-sphinxcontrib-websupport")
2245 (version "1.1.0")
2246 (source (origin
2247 (method url-fetch)
2248 (uri (pypi-uri "sphinxcontrib-websupport" version))
2249 (sha256
2250 (base32
2251 "1ff3ix76xi1y6m99qxhaq5161ix9swwzydilvdya07mgbcvpzr4x"))))
2252 (build-system python-build-system)
2253 (arguments
2254 ;; FIXME: Tests depend on Sphinx, which depends on this.
2255 `(#:tests? #f))
2256 (home-page "http://sphinx-doc.org/")
2257 (synopsis "Sphinx API for web applications")
2258 (description "This package provides a Python API to easily integrate
2259Sphinx documentation into your web application. It provides tools to
2260integrate Sphinx documents in web templates and to handle searches.")
2261 (license license:bsd-3)))
2262
2263(define-public python2-sphinxcontrib-websupport
2264 (package-with-python2 python-sphinxcontrib-websupport))
2265
2266(define-public python-sphinx
2267 (package
2268 (name "python-sphinx")
2269 (version "1.7.7")
2270 (source
2271 (origin
2272 (method url-fetch)
2273 (uri (pypi-uri "Sphinx" version))
2274 (sha256
2275 (base32
2276 "0pkkbfj7cl157q550gcs45am5y78ps0h7q6455d64s1zmw01jlvi"))))
2277 (build-system python-build-system)
2278 (arguments
2279 `(#:phases
2280 (modify-phases %standard-phases
2281 (replace 'check
2282 (lambda _
2283 ;; Requires Internet access.
2284 (delete-file "tests/test_build_linkcheck.py")
2285 (substitute* "tests/test_build_latex.py"
2286 (("@pytest.mark.sphinx\\('latex', testroot='images'\\)")
2287 "@pytest.mark.skip()"))
2288 (when (which "python")
2289 ;; XXX: These tests are broken when using Python2:
2290 ;; <https://github.com/sphinx-doc/sphinx/issues/4710>.
2291 (delete-file "tests/test_api_translator.py")
2292 (delete-file "tests/test_setup_command.py"))
2293 (invoke "make" "test"))))))
2294 (propagated-inputs
2295 `(("python-imagesize" ,python-imagesize)
2296 ("python-sphinx-alabaster-theme"
2297 ,python-sphinx-alabaster-theme)
2298 ("python-babel" ,python-babel)
2299 ("python-snowballstemmer" ,python-snowballstemmer)
2300 ("python-docutils" ,python-docutils)
2301 ("python-jinja2" ,python-jinja2)
2302 ("python-packaging" ,python-packaging)
2303 ("python-pygments" ,python-pygments)
2304 ("python-requests" ,python-requests)
2305 ("python-six" ,python-six)
2306 ("python-sphinxcontrib-websupport" ,python-sphinxcontrib-websupport)))
2307 (native-inputs
2308 `(("graphviz" ,graphviz)
2309 ("imagemagick" ,imagemagick) ;for "convert"
2310 ("python-html5lib" ,python-html5lib)
2311 ("python-mock" ,python-mock)
2312 ("python-nose" ,python-nose)
2313 ("python-pytest" ,python-pytest)))
2314 (home-page "http://sphinx-doc.org/")
2315 (synopsis "Python documentation generator")
2316 (description "Sphinx is a tool that makes it easy to create documentation
2317for Python projects or other documents consisting of multiple reStructuredText
2318sources.")
2319 (license license:bsd-3)
2320 (properties `((python2-variant . ,(delay python2-sphinx))))))
2321
2322(define-public python2-sphinx
2323 (let ((base (package-with-python2 (strip-python2-variant python-sphinx))))
2324 (package
2325 (inherit base)
2326 (native-inputs `(("python2-mock" ,python2-mock)
2327 ("python2-enum34" ,python2-enum34)
2328 ,@(package-native-inputs base)))
2329 (propagated-inputs `(("python2-pytz" ,python2-pytz)
2330 ("python2-typing" ,python2-typing)
2331 ,@(package-propagated-inputs base))))))
2332
2333(define-public python-sphinx-gallery
2334 (package
2335 (name "python-sphinx-gallery")
2336 (version "0.1.13")
2337 (source (origin
2338 (method url-fetch)
2339 (uri (string-append "https://github.com/sphinx-gallery/sphinx-gallery"
2340 "/archive/v" version ".tar.gz"))
2341 (file-name (string-append name "-" version ".tar.gz"))
2342 (sha256
2343 (base32
2344 "03fs99mcb1r7qp0xixqv07vcz98sk21yq19ffdysi0infdcpzfkd"))))
2345 (build-system python-build-system)
2346 (arguments
2347 ;; FIXME: Tests attempt to download <https://docs.python.org/3/objects.inv>,
2348 ;; <https://docs.scipy.org/doc/numpy/objects.inv>, and
2349 ;; <https://matplotlib.org/objects.inv>.
2350 `(#:tests? #f))
2351 (native-inputs
2352 `(("python-pytest-runner" ,python-pytest-runner)))
2353 (home-page "https://sphinx-gallery.github.io/")
2354 (synopsis "Generate an examples gallery automatically")
2355 (description
2356 "@code{sphinx_gallery} is a Sphinx extension that builds an HTML version
2357from any set of Python scripts and puts it into an examples gallery.")
2358 (license license:bsd-3)))
2359
2360(define-public python2-sphinx-gallery
2361 (package-with-python2 python-sphinx-gallery))
2362
2363(define-public python-sphinx-rtd-theme
2364 (package
2365 (name "python-sphinx-rtd-theme")
2366 (version "0.2.4")
2367 (source
2368 (origin
2369 (method url-fetch)
2370 (uri (pypi-uri "sphinx_rtd_theme" version))
2371 (sha256
2372 (base32
2373 "05rlhjzdyapr2w74jjs7mrm8hi69qskcr5vya9f9drpsys7lpxrd"))))
2374 (build-system python-build-system)
2375 (arguments '(#:tests? #f)) ; No tests.
2376 (propagated-inputs
2377 `(("python-sphinx" ,python-sphinx)))
2378 (home-page "https://github.com/snide/sphinx_rtd_theme/")
2379 (synopsis "ReadTheDocs.org theme for Sphinx")
2380 (description "A theme for Sphinx used by ReadTheDocs.org.")
2381 (license license:expat)))
2382
2383(define-public python2-sphinx-rtd-theme
2384 (package-with-python2 python-sphinx-rtd-theme))
2385
2386(define-public python-guzzle-sphinx-theme
2387 (package
2388 (name "python-guzzle-sphinx-theme")
2389 (version "0.7.11")
2390 (source
2391 (origin
2392 (method url-fetch)
2393 (uri (pypi-uri "guzzle_sphinx_theme" version))
2394 (sha256
2395 (base32
2396 "1rnkzrrsbnifn3vsb4pfaia3nlvgvw6ndpxp7lzjrh23qcwid34v"))))
2397 (build-system python-build-system)
2398 (propagated-inputs
2399 `(("python-sphinx" ,python-sphinx)))
2400 (home-page "https://github.com/guzzle/guzzle_sphinx_theme")
2401 (synopsis "Sphinx theme used by Guzzle")
2402 (description "This package provides guzzle_sphinx_theme, a theme for the
2403Sphinx documentation system, used by @uref{http://docs.guzzlephp.org, Guzzle}
2404and several other projects.")
2405 (license license:expat)))
2406
2407(define-public python2-guzzle-sphinx-theme
2408 (package-with-python2 python-guzzle-sphinx-theme))
2409
2410(define-public python-rst.linker
2411 (package
2412 (name "python-rst.linker")
2413 (version "1.10")
2414 (source
2415 (origin
2416 (method url-fetch)
2417 (uri (pypi-uri "rst.linker" version))
2418 (sha256
2419 (base32
2420 "0iqaacp7pj1s8avs4kc0qg0r7dscywaq37y6l9j14glqdikk0wdj"))))
2421 (build-system python-build-system)
2422 (propagated-inputs
2423 `(("python-dateutil" ,python-dateutil)
2424 ("python-six" ,python-six)))
2425 (native-inputs
2426 `(("python-setuptools-scm" ,python-setuptools-scm)))
2427 ;; Test would require path.py, which would introduce a cyclic dependence.
2428 (arguments `(#:tests? #f))
2429 ;; Note: As of version 1.7 the documentation is not worth building.
2430 (home-page "https://github.com/jaraco/rst.linker")
2431 (synopsis "Sphinx plugin to add links and timestamps")
2432 (description "rst.linker allows to automatically replace text by a
2433reStructuredText external reference or timestamps. It's primary purpose is to
2434augment the changelog, but it can be used for other documents, too.")
2435 (license license:expat)))
2436
2437(define-public python2-rst.linker
2438 (package-with-python2 python-rst.linker))
2439
2440(define-public python-feedgenerator
2441 (package
2442 (name "python-feedgenerator")
2443 (version "1.9")
2444 (source
2445 (origin
2446 (method url-fetch)
2447 (uri (pypi-uri "feedgenerator" version))
2448 (sha256
2449 (base32
2450 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
2451 (modules '((guix build utils)))
2452 (snippet
2453 '(begin
2454 ;; Remove pre-compiled .pyc files from source.
2455 (for-each delete-file-recursively
2456 (find-files "." "__pycache__" #:directories? #t))
2457 (for-each delete-file (find-files "." "\\.pyc$"))
2458 #t))))
2459 (build-system python-build-system)
2460 (propagated-inputs
2461 `(("python-pytz" ,python-pytz)
2462 ("python-six" ,python-six)))
2463 (home-page "https://github.com/getpelican/feedgenerator")
2464 (synopsis
2465 "Standalone version of Django's Atom/RSS feed generator")
2466 (description
2467 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2468which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
2469 (license license:bsd-3)))
2470
2471(define-public python2-feedgenerator
2472 (package-with-python2 python-feedgenerator))
2473
2474(define-public python-toml
2475 (package
2476 (name "python-toml")
2477 (version "0.9.4")
2478 (source
2479 (origin
2480 (method url-fetch)
2481 (uri (pypi-uri "toml" version))
2482 (sha256
2483 (base32
2484 "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf"))))
2485 (build-system python-build-system)
2486 (arguments
2487 `(#:tests? #f)) ;no tests suite in release
2488 (home-page "https://github.com/uiri/toml")
2489 (synopsis "Library for TOML")
2490 (description
2491 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
2492Language (TOML) configuration files.")
2493 (license license:expat)))
2494
2495(define-public python-black
2496 (package
2497 (name "python-black")
2498 (version "18.6b4")
2499 (source
2500 (origin
2501 (method url-fetch)
2502 (uri (pypi-uri "black" version))
2503 (sha256
2504 (base32
2505 "0i4sfqgz6w15vd50kbhi7g7rifgqlf8yfr8y78rypd56q64qn592"))))
2506 (build-system python-build-system)
2507 (arguments
2508 `(#:phases
2509 (modify-phases %standard-phases
2510 (add-after 'patch-source-shebangs 'patch-extra-shebangs
2511 (lambda _
2512 (let ((python3 (which "python3")))
2513 (substitute* '("tests/data/fmtonoff.py"
2514 "tests/data/string_prefixes.py"
2515 "tests/data/function.py")
2516 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
2517 (string-append "#!" python3 (if (string? minor-version)
2518 minor-version
2519 ""))))))))))
2520 (propagated-inputs
2521 `(("python-click" ,python-click)
2522 ("python-attrs" ,python-attrs)
2523 ("python-appdirs" ,python-appdirs)
2524 ("python-toml" ,python-toml)))
2525 (home-page "https://github.com/ambv/black")
2526 (synopsis "The uncompromising code formatter")
2527 (description "Black is the uncompromising Python code formatter.")
2528 (license license:expat)))
2529
2530(define-public python-blinker
2531 (package
2532 (name "python-blinker")
2533 (version "1.4")
2534 (source
2535 (origin
2536 (method url-fetch)
2537 (uri (pypi-uri "blinker" version))
2538 (sha256
2539 (base32
2540 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
2541 (build-system python-build-system)
2542 (home-page "http://pythonhosted.org/blinker/")
2543 (synopsis "Fast, simple object-to-object and broadcast signaling")
2544 (description
2545 "Blinker provides a fast dispatching system that allows any number of
2546interested parties to subscribe to events, or \"signals\".")
2547 (license license:expat)))
2548
2549(define-public python2-blinker
2550 (package-with-python2 python-blinker))
2551
2552(define-public pelican
2553 (package
2554 (name "pelican")
2555 (version "3.7.1")
2556 (source
2557 (origin
2558 (method url-fetch)
2559 (uri (pypi-uri "pelican" version))
2560 (sha256
2561 (base32
2562 "12spygavv9b6xpb5pgp7f0p3z0mms60nx6zrpx1yfkj68zz4flra"))))
2563 (build-system python-build-system)
2564 (propagated-inputs
2565 `(("python-feedgenerator" ,python-feedgenerator)
2566 ("python-jinja2" ,python-jinja2)
2567 ("python-pygments" ,python-pygments)
2568 ("python-docutils" ,python-docutils)
2569 ("python-pytz" ,python-pytz)
2570 ("python-blinker" ,python-blinker)
2571 ("python-unidecode" ,python-unidecode)
2572 ("python-six" ,python-six)
2573 ("python-dateutil" ,python-dateutil)
2574 ("python-markdown" ,python-markdown)))
2575 (home-page "https://getpelican.com/")
2576 (arguments
2577 `(;; XXX Requires a lot more packages to do unit tests :P
2578 #:tests? #f
2579 #:phases (modify-phases %standard-phases
2580 (add-before
2581 'install 'adjust-requires
2582 ;; Since feedgenerator is installed from git, it doesn't
2583 ;; conform to the version requirements.
2584 ;;
2585 ;; We *do have* "feedgenerator >= 1.6", but strip off the
2586 ;; version requirement so setuptools doesn't get confused.
2587 (lambda _
2588 (substitute* "setup.py"
2589 (("['\"]feedgenerator.*?['\"]")
2590 "'feedgenerator'")))))))
2591 (synopsis "Python-based static site publishing system")
2592 (description
2593 "Pelican is a tool to generate a static blog from reStructuredText,
2594Markdown input files, and more. Pelican uses Jinja2 for templating
2595and is very extensible.")
2596 (license license:agpl3+)))
2597
2598(define-public python-scikit-image
2599 (package
2600 (name "python-scikit-image")
2601 (version "0.14.1")
2602 (source
2603 (origin
2604 (method url-fetch)
2605 (uri (pypi-uri "scikit-image" version))
2606 (sha256
2607 (base32 "0l1c3rl4s1jyv80i5hns4pgih09zrxfj7lygdc51w8sgyysb7ac6"))))
2608 (build-system python-build-system)
2609 (arguments
2610 ;; TODO: Some tests require running X11 server. Disable them?
2611 '(#:tests? #f))
2612 ;; See DEPENDS.txt for the list of build and run time requiremnts
2613 (propagated-inputs
2614 `(("python-cloudpickle" ,python-cloudpickle)
2615 ("python-dask" ,python-dask)
2616 ("python-matplotlib" ,python-matplotlib)
2617 ("python-networkx" ,python-networkx)
2618 ("python-numpy" ,python-numpy)
2619 ("python-pillow" ,python-pillow)
2620 ("python-pywavelets" ,python-pywavelets)
2621 ("python-scipy" ,python-scipy)
2622 ("python-six" ,python-six)))
2623 (native-inputs
2624 `(("python-cython" ,python-cython)))
2625 (home-page "http://scikit-image.org/")
2626 (synopsis "Image processing in Python")
2627 (description
2628 "Scikit-image is a collection of algorithms for image processing.")
2629 (license license:bsd-3)))
2630
2631(define-public python2-scikit-image
2632 (package-with-python2 python-scikit-image))
2633
2634(define-public python-cython
2635 (package
2636 (name "python-cython")
2637 (version "0.28.4")
2638 (source
2639 (origin
2640 (method url-fetch)
2641 (uri (pypi-uri "Cython" version))
2642 (sha256
2643 (base32
2644 "0imw9s2rbrh32clbl10csnwmig9p3nzkrd2baxxxfmnrsc42pb3n"))))
2645 (build-system python-build-system)
2646 ;; we need the full python package and not just the python-wrapper
2647 ;; because we need libpython3.3m.so
2648 (inputs
2649 `(("python" ,python)))
2650 (arguments
2651 `(#:phases
2652 (modify-phases %standard-phases
2653 (add-before 'check 'set-HOME
2654 ;; some tests require access to "$HOME/.cython"
2655 (lambda _ (setenv "HOME" "/tmp") #t))
2656
2657 ;; FIXME: These tests started failing on armhf after the 0.28 update
2658 ;; (commit c69d11c5930), both with an error such as this:
2659 ;; compiling (cpp) and running dictcomp ...
2660 ;; === C/C++ compiler error output: ===
2661 ;; ‘
2662 ;; dictcomp.cpp:5221: confused by earlier errors, bailing out
2663 ;; See <https://hydra.gnu.org/build/2948724> for logs.
2664 ,@(if (target-arm32?)
2665 `((add-before 'check 'disable-failing-tests
2666 (lambda _
2667 (let ((disabled-tests (open-file "tests/bugs.txt" "a")))
2668 (for-each (lambda (test)
2669 (format disabled-tests "~a\n" test))
2670 '("memslice" "dictcomp"))
2671 (close-port disabled-tests)))))
2672 '())
2673
2674 (replace 'check
2675 (lambda _
2676 ;; The "with_outer_raising" test fails with Python 3.7. See
2677 ;; https://github.com/cython/cython/issues/2454
2678 (delete-file "tests/run/generators_py.py")
2679 (invoke "python" "runtests.py" "-vv"))))))
2680 (home-page "http://cython.org/")
2681 (synopsis "C extensions for Python")
2682 (description "Cython is an optimising static compiler for both the Python
2683programming language and the extended Cython programming language. It makes
2684writing C extensions for Python as easy as Python itself.")
2685 (license license:asl2.0)
2686 (properties `((python2-variant . ,(delay python2-cython))))))
2687
2688(define-public python2-cython
2689 (package (inherit (package-with-python2
2690 (strip-python2-variant python-cython)))
2691 (name "python2-cython")
2692 (inputs
2693 `(("python-2" ,python-2))))) ; this is not automatically changed
2694
2695;; The RPython toolchain currently does not support Python 3.
2696(define-public python2-rpython
2697 (package
2698 (name "python2-rpython")
2699 (version "0.2.1")
2700 (source
2701 (origin
2702 (method url-fetch)
2703 (uri (pypi-uri "rpython" version))
2704 (sha256
2705 (base32
2706 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
2707 (build-system python-build-system)
2708 (arguments `(#:python ,python-2))
2709 (native-inputs
2710 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
2711 (home-page "https://rpython.readthedocs.org")
2712 (synopsis "Framework for implementing interpreters and virtual machines")
2713 (description "RPython is a translation and support framework for
2714producing implementations of dynamic languages, emphasizing a clean separation
2715between language specification and implementation aspects.")
2716 (license license:expat)))
2717
2718;; NOTE: when upgrading numpy please make sure that python-pandas and
2719;; python-scipy still build, as these three packages are often used together.
2720(define-public python-numpy
2721 (package
2722 (name "python-numpy")
2723 (version "1.15.4")
2724 (source
2725 (origin
2726 (method url-fetch)
2727 (uri (string-append
2728 "https://github.com/numpy/numpy/releases/download/v"
2729 version "/numpy-" version ".tar.gz"))
2730 (sha256
2731 (base32
2732 "102vcl2qq4pjbm7a3d67vkkvn4466ngia1d8wi5avqwqh8j0jvkn"))))
2733 (build-system python-build-system)
2734 (inputs
2735 `(("openblas" ,openblas)
2736 ("lapack" ,lapack)))
2737 (native-inputs
2738 `(("python-cython" ,python-cython)
2739 ("python-pytest" ,python-pytest)
2740 ("gfortran" ,gfortran)))
2741 (arguments
2742 `(#:phases
2743 (modify-phases %standard-phases
2744 (add-before 'build 'configure-blas-lapack
2745 (lambda* (#:key inputs #:allow-other-keys)
2746 (call-with-output-file "site.cfg"
2747 (lambda (port)
2748 (format port
2749 "[openblas]
2750libraries = openblas
2751library_dirs = ~a/lib
2752include_dirs = ~a/include
2753
2754# backslash-n to make emacs happy
2755\n[lapack]
2756lapack_libs = lapack
2757library_dirs = ~a/lib
2758include_dirs = ~a/include
2759"
2760 (assoc-ref inputs "openblas")
2761 (assoc-ref inputs "openblas")
2762 (assoc-ref inputs "lapack")
2763 (assoc-ref inputs "lapack"))))
2764 #t))
2765 (add-before 'build 'fix-executable-paths
2766 (lambda* (#:key inputs #:allow-other-keys)
2767 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
2768 ;; instead of /bin/sh.
2769 (substitute* "numpy/distutils/exec_command.py"
2770 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
2771 (string-append match-start (assoc-ref inputs "bash") match-end)))
2772 ;; Use "gcc" executable, not "cc".
2773 (substitute* "numpy/distutils/system_info.py"
2774 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
2775 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
2776 #t))
2777 ;; Tests can only be run after the library has been installed and not
2778 ;; within the source directory.
2779 (delete 'check)
2780 (add-after 'install 'check
2781 (lambda* (#:key outputs inputs #:allow-other-keys)
2782 ;; Make installed package available for running the tests
2783 (add-installed-pythonpath inputs outputs)
2784 ;; Make sure "f2py" etc is found.
2785 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
2786 ":" (getenv "PATH")))
2787 (with-directory-excursion "/tmp"
2788 (invoke "python" "-c"
2789 "import numpy; numpy.test(verbose=2)")))))))
2790 (home-page "http://www.numpy.org/")
2791 (synopsis "Fundamental package for scientific computing with Python")
2792 (description "NumPy is the fundamental package for scientific computing
2793with Python. It contains among other things: a powerful N-dimensional array
2794object, sophisticated (broadcasting) functions, tools for integrating C/C++
2795and Fortran code, useful linear algebra, Fourier transform, and random number
2796capabilities.")
2797 (license license:bsd-3)))
2798
2799(define-public python2-numpy
2800 (package-with-python2 python-numpy))
2801
2802;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
2803;; interest only for legacy code going back to NumPy's predecessor
2804;; Numeric.
2805(define-public python2-numpy-1.8
2806 (package (inherit python2-numpy)
2807 (version "1.8.2")
2808 (source
2809 (origin
2810 (method url-fetch)
2811 (uri (string-append
2812 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
2813 (file-name (string-append "python2-numpy-" version ".tar.gz"))
2814 (sha256
2815 (base32
2816 "0sc20gz1b17xnyrkp5frca3ql5qfalpv916hfg2kqxpwr6jg0f1g"))))
2817 (arguments
2818 (substitute-keyword-arguments (package-arguments python2-numpy)
2819 ((#:phases phases)
2820 `(modify-phases ,phases
2821 (replace 'configure-blas-lapack
2822 (lambda* (#:key inputs #:allow-other-keys)
2823 (call-with-output-file "site.cfg"
2824 (lambda (port)
2825 (format port
2826 "[openblas]
2827libraries = openblas,lapack
2828library_dirs = ~a/lib:~a/lib
2829include_dirs = ~a/include:~a/include
2830"
2831 (assoc-ref inputs "openblas")
2832 (assoc-ref inputs "lapack")
2833 (assoc-ref inputs "openblas")
2834 (assoc-ref inputs "lapack"))))
2835 #t))))))
2836 (native-inputs
2837 `(("python2-nose" ,python2-nose)))
2838 (description "NumPy is the fundamental package for scientific computing
2839with Python. It contains among other things: a powerful N-dimensional array
2840object, sophisticated (broadcasting) functions, tools for integrating C/C++
2841and Fortran code, useful linear algebra, Fourier transform, and random number
2842capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
2843that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
2844Numeric.")
2845 (license license:bsd-3)))
2846
2847(define-public python-munch
2848 (package
2849 (name "python-munch")
2850 (version "2.0.4")
2851 (source
2852 (origin
2853 (method url-fetch)
2854 (uri (pypi-uri "munch" version))
2855 (sha256
2856 (base32
2857 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
2858 (build-system python-build-system)
2859 (home-page "https://github.com/Infinidat/munch")
2860 (synopsis "Dot-accessible dictionary")
2861 (description "Munch is a dot-accessible dictionary similar to JavaScript
2862objects.")
2863 (license license:expat)))
2864
2865(define-public python2-munch
2866 (package-with-python2 python-munch))
2867
2868(define-public python-colormath
2869 (package
2870 (name "python-colormath")
2871 (version "3.0.0")
2872 (source
2873 (origin
2874 (method url-fetch)
2875 (uri (pypi-uri "colormath" version))
2876 (sha256
2877 (base32
2878 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
2879 (build-system python-build-system)
2880 (propagated-inputs
2881 `(("python-networkx" ,python-networkx)
2882 ("python-numpy" ,python-numpy)))
2883 (home-page "https://github.com/gtaylor/python-colormath")
2884 (synopsis "Color math and conversion library")
2885 (description
2886 "This is a Python library for color math and conversions.")
2887 (license license:bsd-3)))
2888
2889(define-public python2-colormath
2890 (package-with-python2 python-colormath))
2891
2892(define-public python-spectra
2893 (package
2894 (name "python-spectra")
2895 (version "0.0.11")
2896 (source
2897 (origin
2898 (method url-fetch)
2899 (uri (pypi-uri "spectra" version))
2900 (sha256
2901 (base32
2902 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
2903 (build-system python-build-system)
2904 (arguments
2905 `(#:phases
2906 (modify-phases %standard-phases
2907 (replace 'check
38ec0f6a 2908 (lambda _ (invoke "nosetests" "-v"))))))
44d10b1f
RW
2909 (propagated-inputs
2910 `(("python-colormath" ,python-colormath)))
2911 (native-inputs
2912 `(("python-nose" ,python-nose)))
2913 (home-page "https://github.com/jsvine/spectra")
2914 (synopsis "Color scales and color conversion")
2915 (description
2916 "This package provides a Python library intended to make color math,
2917color scales, and color space conversion easy. It has support for:
2918
2919@enumerate
2920@item Color scales
2921@item Color ranges
2922@item Color blending
2923@item Brightening/darkening colors
2924@item Saturating/desaturating colors
2925@item Conversion to/from multiple color spaces.
2926@end enumerate\n")
2927 (license license:expat)))
2928
2929(define-public python2-spectra
2930 (package-with-python2 python-spectra))
2931
2932(define-public python-numpy-documentation
2933 (package
2934 (name "python-numpy-documentation")
2935 (version (package-version python-numpy))
2936 (source (package-source python-numpy))
2937 (build-system python-build-system)
2938 (native-inputs
2939 `(("python-matplotlib" ,python-matplotlib)
2940 ("python-numpy" ,python-numpy)
2941 ("pkg-config" ,pkg-config)
2942 ("python-sphinx" ,python-sphinx)
2943 ("python-numpydoc" ,python-numpydoc)
2944 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
2945 texlive-fonts-cm-super
2946 texlive-fonts-ec
2947 texlive-generic-ifxetex
2948 texlive-generic-pdftex
2949 texlive-latex-amsfonts
2950 texlive-latex-capt-of
2951 texlive-latex-cmap
2952 texlive-latex-environ
2953 texlive-latex-eqparbox
2954 texlive-latex-etoolbox
2955 texlive-latex-expdlist
2956 texlive-latex-fancyhdr
2957 texlive-latex-fancyvrb
2958 texlive-latex-fncychap
2959 texlive-latex-float
2960 texlive-latex-framed
2961 texlive-latex-geometry
2962 texlive-latex-graphics
2963 texlive-latex-hyperref
2964 texlive-latex-mdwtools
2965 texlive-latex-multirow
2966 texlive-latex-needspace
2967 texlive-latex-oberdiek
2968 texlive-latex-parskip
2969 texlive-latex-preview
2970 texlive-latex-tabulary
2971 texlive-latex-threeparttable
2972 texlive-latex-titlesec
2973 texlive-latex-trimspaces
2974 texlive-latex-ucs
2975 texlive-latex-upquote
2976 texlive-latex-url
2977 texlive-latex-varwidth
2978 texlive-latex-wrapfig)))
2979 ("texinfo" ,texinfo)
2980 ("perl" ,perl)
2981 ("scipy-sphinx-theme"
2982 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
2983 (method git-fetch)
2984 (uri (git-reference
2985 (url "https://github.com/scipy/scipy-sphinx-theme.git")
2986 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
2987 (sha256
2988 (base32
2989 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
2990 ,@(package-native-inputs python-numpy)))
2991 (arguments
2992 `(#:tests? #f ; we're only generating the documentation
2993 #:phases
2994 (modify-phases %standard-phases
2995 (delete 'build)
2996 (replace 'install
2997 (lambda* (#:key inputs outputs #:allow-other-keys)
2998 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
2999 (doc (string-append
3000 data "/doc/" ,name "-"
3001 ,(package-version python-numpy)))
3002 (info-reader (string-append data "/info"))
3003 (html (string-append doc "/html"))
3004 (scipy-sphinx-theme "scipy-sphinx-theme")
3005 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3006 (pyver ,(string-append "PYVER=")))
3007
3008 ;; FIXME: this is needed to for texlive-union to generate
3009 ;; fonts, which are not found.
3010 (setenv "HOME" "/tmp")
3011
3012 (with-directory-excursion "doc"
3013 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3014 (mkdir-p html)
4fc898da
RW
3015 (invoke "make" "html" pyver)
3016 (invoke "make" "latex" "PAPER=a4" pyver)
3017 (invoke "make" "-C" "build/latex"
44d10b1f
RW
3018 "all-pdf" "PAPER=a4" pyver)
3019 ;; FIXME: Generation of the info file fails.
4fc898da 3020 ;; (invoke "make" "info" pyver)
44d10b1f
RW
3021 ;; (mkdir-p info)
3022 ;; (copy-file "build/texinfo/numpy.info"
3023 ;; (string-append info "/numpy.info"))
3024 (for-each (lambda (file)
3025 (copy-file (string-append "build/latex" file)
3026 (string-append doc file)))
3027 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3028 (with-directory-excursion "build/html"
3029 (for-each (lambda (file)
3030 (let* ((dir (dirname file))
3031 (tgt-dir (string-append html "/" dir)))
3032 (unless (equal? "." dir)
3033 (mkdir-p tgt-dir))
3034 (install-file file html)))
3035 (find-files "." ".*")))))
3036 #t)))))
3037 (home-page (package-home-page python-numpy))
3038 (synopsis "Documentation for the python-numpy package")
3039 (description (package-description python-numpy))
3040 (license (package-license python-numpy))))
3041
3042(define-public python2-numpy-documentation
3043 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3044 (package
3045 (inherit numpy-documentation)
3046 (native-inputs `(("python2-functools32" ,python2-functools32)
3047 ,@(package-native-inputs numpy-documentation))))))
3048
3049(define-public python-pygit2
3050 (package
3051 (name "python-pygit2")
3052 (version "0.27.3")
3053 (source
3054 (origin
3055 (method url-fetch)
3056 (uri (pypi-uri "pygit2" version))
3057 (sha256
3058 (base32
3059 "046ahvsb7a20sgvscqfm3cb32sp3sii4gim9vz7zzrkf7yz16xlv"))))
3060 (build-system python-build-system)
3061 (arguments
3062 '(#:phases
3063 (modify-phases %standard-phases
3064 ;; Remove after the next update. See:
3065 ;; https://github.com/libgit2/pygit2/pull/851
3066 (add-after 'unpack 'compile-with-cffi
3067 (lambda _
3068 (substitute* "setup.py"
3069 (("install_requires")
3070 "setup_requires=['cffi'],\n install_requires"))
3071 #t))
3072 (add-after 'unpack 'fix-dependency-versioning
3073 (lambda _
3074 (substitute* "setup.py"
3075 (("<") "<="))
3076 #t)))))
3077 (propagated-inputs
3078 `(("python-six" ,python-six)
3079 ("python-cffi" ,python-cffi)
3080 ("libgit2" ,libgit2)
3081 ("python-tox" ,python-tox)))
3082 (native-inputs
3083 `(("python-pytest" ,python-pytest)))
3084 (home-page "https://github.com/libgit2/pygit2")
3085 (synopsis "Python bindings for libgit2")
3086 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3087library, libgit2 implements Git plumbing.")
3088 ;; GPL2.0 only, with linking exception.
3089 (license license:gpl2)))
3090
3091(define-public python2-pygit2
3092 (package-with-python2 python-pygit2))
3093
3094(define-public python-pyparsing
3095 (package
3096 (name "python-pyparsing")
3097 (version "2.2.1")
3098 (source
3099 (origin
3100 (method url-fetch)
3101 (uri (pypi-uri "pyparsing" version))
3102 (sha256
3103 (base32 "06dgd0iilvf8m0ssmfpcbh8l6jf0zkp8adbb84llksg17crfx4zl"))))
3104 (build-system python-build-system)
3105 (outputs '("out" "doc"))
3106 (arguments
3107 `(#:tests? #f ; no test target
3108 #:phases
3109 (modify-phases %standard-phases
3110 (add-after 'install 'install-doc
3111 (lambda* (#:key outputs #:allow-other-keys)
3112 (let* ((doc (string-append (assoc-ref outputs "doc")
3113 "/share/doc/" ,name "-" ,version))
3114 (html-doc (string-append doc "/html"))
3115 (examples (string-append doc "/examples")))
3116 (mkdir-p html-doc)
3117 (mkdir-p examples)
3118 (for-each
3119 (lambda (dir tgt)
3120 (map (lambda (file)
3121 (install-file file tgt))
3122 (find-files dir ".*")))
3123 (list "docs" "htmldoc" "examples")
3124 (list doc html-doc examples))
3125 #t))))))
3126 (home-page "https://github.com/pyparsing/pyparsing")
3127 (synopsis "Python parsing class library")
3128 (description
3129 "The pyparsing module is an alternative approach to creating and
3130executing simple grammars, vs. the traditional lex/yacc approach, or the use
3131of regular expressions. The pyparsing module provides a library of classes
3132that client code uses to construct the grammar directly in Python code.")
3133 (license license:expat)))
3134
3135(define-public python2-pyparsing
3136 (package-with-python2 python-pyparsing))
3137
3138(define-public python-numpydoc
3139 (package
3140 (name "python-numpydoc")
3141 (version "0.8.0")
3142 (source
3143 (origin
3144 (method url-fetch)
3145 (uri (pypi-uri "numpydoc" version))
3146 (sha256
3147 (base32
3148 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
3149 (build-system python-build-system)
3150 (propagated-inputs
3151 `(("python-sphinx" ,python-sphinx)))
3152 (native-inputs
3153 `(("python-nose" ,python-nose)))
3154 (home-page "https://pypi.python.org/pypi/numpydoc")
3155 (synopsis
3156 "Numpy's Sphinx extensions")
3157 (description
3158 "Sphinx extension to support docstrings in Numpy format.")
3159 (license license:bsd-2)))
3160
3161(define-public python2-numpydoc
3162 (package-with-python2 python-numpydoc))
3163
3164(define-public python-numexpr
3165 (package
3166 (name "python-numexpr")
3167 (version "2.6.5")
3168 (source
3169 (origin
3170 (method url-fetch)
3171 (uri (pypi-uri "numexpr" version))
3172 (sha256
3173 (base32
3174 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3175 (build-system python-build-system)
3176 (arguments `(#:tests? #f)) ; no tests included
3177 (propagated-inputs
3178 `(("python-numpy" ,python-numpy)))
3179 (home-page "https://github.com/pydata/numexpr")
3180 (synopsis "Fast numerical expression evaluator for NumPy")
3181 (description
3182 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3183expressions that operate on arrays are accelerated and use less memory than
3184doing the same calculation in Python. In addition, its multi-threaded
3185capabilities can make use of all your cores, which may accelerate
3186computations, most specially if they are not memory-bounded (e.g. those using
3187transcendental functions).")
3188 (license license:expat)))
3189
3190(define-public python2-numexpr
3191 (package-with-python2 python-numexpr))
3192
3193(define-public python-cycler
3194 (package
3195 (name "python-cycler")
3196 (version "0.10.0")
3197 (source (origin
3198 (method url-fetch)
3199 (uri (pypi-uri "cycler" version))
3200 (sha256
3201 (base32
3202 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3203 (build-system python-build-system)
3204 (arguments
3205 ;; XXX: The current version requires 'coveralls' which we don't have.
3206 ;; Enable this for the next release which uses 'python-pytest'.
3207 '(#:tests? #f))
3208 (propagated-inputs
3209 `(("python-six" ,python-six)))
3210 (home-page "http://matplotlib.org/cycler/")
3211 (synopsis "Composable keyword argument iterator")
3212 (description
3213 "When using @code{matplotlib} and plotting more than one line, it is
3214common to want to be able to want to be able to cycle over one or more artist
3215styles; but the plotting logic can quickly become involved.
3216To address this and enable easy cycling over arbitrary @code{kwargs}, the
3217@code{Cycler} class was developed.")
3218 (license license:bsd-3)))
3219
3220(define-public python2-cycler
3221 (package-with-python2 python-cycler))
3222
3223(define-public python-colorspacious
3224 (package
3225 (name "python-colorspacious")
3226 (version "1.1.0")
3227 (source
3228 (origin
3229 (method url-fetch)
3230 (uri (string-append "https://github.com/njsmith/colorspacious/archive/v"
3231 version ".tar.gz"))
3232 (file-name (string-append name "-" version))
3233 (sha256
3234 (base32 "1vflh5jm32qb0skza2i8pjacv09w6gq84fqpp2nj77s0rbmzgr4k"))))
3235 (build-system python-build-system)
3236 (propagated-inputs
3237 `(("python-numpy" ,python-numpy)))
3238 (native-inputs
3239 `(("python-nose" ,python-nose)))
3240 (arguments
3241 `(#:phases
3242 (modify-phases %standard-phases
3243 (replace 'check
3244 (lambda _
c988afda 3245 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
44d10b1f
RW
3246 (home-page "https://github.com/njsmith/colorspacious")
3247 (synopsis "Python library for colorspace conversions")
3248 (description "@code{colorspacious} is a Python library that lets you
3249convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3250 (license license:expat)))
3251
3252(define-public python2-colorspacious
3253 (package-with-python2 python-colorspacious))
3254
3255(define-public python-matplotlib
3256 (package
3257 (name "python-matplotlib")
3258 (version "2.2.3")
3259 (source
3260 (origin
3261 (method url-fetch)
3262 (uri (pypi-uri "matplotlib" version))
3263 (sha256
3264 (base32
3265 "1rcc7x9ig3hpchkc4cwdvym3y451w74275fxr455zkfagrsvymbk"))))
3266 (build-system python-build-system)
3267 (propagated-inputs ; the following packages are all needed at run time
3268 `(("python-cycler" ,python-cycler)
3269 ("python-kiwisolver" ,python-kiwisolver)
3270 ("python-pyparsing" ,python-pyparsing)
3271 ("python-pygobject" ,python-pygobject)
3272 ("gobject-introspection" ,gobject-introspection)
3273 ("python-tkinter" ,python "tk")
3274 ("python-dateutil" ,python-dateutil)
3275 ("python-numpy" ,python-numpy)
3276 ("python-pillow" ,python-pillow)
3277 ("python-pytz" ,python-pytz)
3278 ("python-six" ,python-six)
3279 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3280 ;; from 'gtk+') provides the required 'typelib' files used by
3281 ;; 'gobject-introspection'. The location of these files is set with the
3282 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3283 ;; is done automatically by a 'native-search-path' procedure. However,
3284 ;; at run-time the user must set this variable as follows:
3285 ;;
3286 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
3287 ("gtk+" ,gtk+)
3288 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3289 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3290 ;; object. For this reason we need to import both libraries.
3291 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3292 ("python-pycairo" ,python-pycairo)
3293 ;; XXX: qtwebkit cannot be built reliably.
3294 ("python-pyqt" ,python-pyqt-without-qtwebkit)
3295 ("python-cairocffi" ,python-cairocffi)))
3296 (inputs
3297 `(("libpng" ,libpng)
3298 ("imagemagick" ,imagemagick)
3299 ("freetype" ,freetype)
3300 ("cairo" ,cairo)
3301 ("glib" ,glib)
3302 ;; FIXME: Add backends when available.
3303 ;("python-wxpython" ,python-wxpython)
3304 ("tcl" ,tcl)
3305 ("tk" ,tk)))
3306 (native-inputs
3307 `(("pkg-config" ,pkg-config)
3308 ("python-nose" ,python-nose)
3309 ("python-mock" ,python-mock)))
3310 (arguments
3311 `(#:phases
3312 (modify-phases %standard-phases
3313 (add-before 'build 'configure-environment
3314 (lambda* (#:key outputs inputs #:allow-other-keys)
3315 (let ((cairo (assoc-ref inputs "cairo"))
3316 (gtk+ (assoc-ref inputs "gtk+")))
3317 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3318 ;; has not effect.
3319 (setenv "LD_LIBRARY_PATH"
3320 (string-append cairo "/lib:" gtk+ "/lib"))
3321 (setenv "HOME" (getcwd))
3322 (call-with-output-file "setup.cfg"
3323 (lambda (port)
3324 (format port "[directories]~%
3325basedirlist = ~a,~a~%
3326 [rc_options]~%
3327backend = TkAgg~%"
3328 (assoc-ref inputs "tcl")
3329 (assoc-ref inputs "tk")))))
3330 #t)))))
3331 (home-page "http://matplotlib.org")
3332 (synopsis "2D plotting library for Python")
3333 (description
3334 "Matplotlib is a Python 2D plotting library which produces publication
3335quality figures in a variety of hardcopy formats and interactive environments
3336across platforms. Matplotlib can be used in Python scripts, the python and
3337ipython shell, web application servers, and six graphical user interface
3338toolkits.")
3339 (license license:psfl)
3340 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3341
3342(define-public python2-matplotlib
3343 (let ((matplotlib (package-with-python2
3344 (strip-python2-variant python-matplotlib))))
3345 (package (inherit matplotlib)
3346 ;; Make sure to use special packages for Python 2 instead
3347 ;; of those automatically rewritten by package-with-python2.
3348 (propagated-inputs
3349 `(("python2-pycairo" ,python2-pycairo)
3350 ("python2-backports-functools-lru-cache"
3351 ,python2-backports-functools-lru-cache)
3352 ("python2-functools32" ,python2-functools32)
3353 ("python2-pygobject-2" ,python2-pygobject-2)
3354 ("python2-subprocess32" ,python2-subprocess32)
3355 ("python2-tkinter" ,python-2 "tk")
3356 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3357 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
3358
3359(define-public python-matplotlib-documentation
3360 (package
3361 (name "python-matplotlib-documentation")
3362 (version (package-version python-matplotlib))
3363 (source (package-source python-matplotlib))
3364 (build-system python-build-system)
3365 (native-inputs
3366 `(("python-matplotlib" ,python-matplotlib)
3367 ("python-colorspacious" ,python-colorspacious)
3368 ("python-sphinx" ,python-sphinx)
3369 ("python-sphinx-gallery" ,python-sphinx-gallery)
3370 ("python-numpydoc" ,python-numpydoc)
3371 ("python-ipython" ,python-ipython)
3372 ("python-mock" ,python-mock)
3373 ("graphviz" ,graphviz)
3374 ("texlive" ,texlive)
3375 ("texinfo" ,texinfo)
3376 ,@(package-native-inputs python-matplotlib)))
3377 (arguments
3378 `(#:tests? #f ; we're only generating documentation
3379 #:phases
3380 (modify-phases %standard-phases
3381 (replace 'build
3382 (lambda _
3383 (chdir "doc")
3384 ;; Produce pdf in 'A4' format.
3385 (substitute* "conf.py"
3386 (("latex_paper_size = 'letter'") "")
3387 ;; latex_paper_size is deprecated -> set paper size using
3388 ;; latex_elements
3389 (("latex_elements\\['pointsize'\\] = '11pt'" match)
3390 ;; insert at a point where latex_elements{} is defined:
3391 (string-append match "\nlatex_elements['papersize'] = 'a4paper'")))
3392 (invoke "make" "SPHINXBUILD=sphinx-build" "html" "latex" "texinfo")))
3393 (replace 'install
3394 (lambda* (#:key inputs outputs #:allow-other-keys)
3395 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3396 (doc (string-append data "/doc/python-matplotlib-" ,version))
3397 (info (string-append data "/info"))
3398 (html (string-append doc "/html")))
3399 (mkdir-p html)
3400 (mkdir-p info)
3401 (copy-recursively "build/html" html)
3402 (symlink (string-append html "/_images")
3403 (string-append info "/matplotlib-figures"))
3404 (with-directory-excursion "build/texinfo"
3405 (substitute* "matplotlib.texi"
3406 (("@image\\{([^,]*)" all file)
3407 (string-append "@image{matplotlib-figures/" file)))
3408 (symlink (string-append html "/_images")
3409 "./matplotlib-figures")
3410 (system* "makeinfo" "--no-split"
3411 "-o" "matplotlib.info" "matplotlib.texi"))
3412 (copy-file "build/texinfo/matplotlib.info"
3413 (string-append info "/matplotlib.info"))
3414 (copy-file "build/latex/Matplotlib.pdf"
3415 (string-append doc "/Matplotlib.pdf")))
3416 #t)))))
3417 (home-page (package-home-page python-matplotlib))
3418 (synopsis "Documentation for the python-matplotlib package")
3419 (description (package-description python-matplotlib))
3420 (license (package-license python-matplotlib))))
3421
3422(define-public python2-matplotlib-documentation
3423 (package-with-python2 python-matplotlib-documentation))
3424
3425(define-public python2-pysnptools
3426 (package
3427 (name "python2-pysnptools")
5d1ade85 3428 (version "0.3.13")
44d10b1f
RW
3429 (source
3430 (origin
3431 (method url-fetch)
5d1ade85 3432 (uri (pypi-uri "pysnptools" version))
44d10b1f
RW
3433 (sha256
3434 (base32
5d1ade85 3435 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
44d10b1f
RW
3436 (build-system python-build-system)
3437 (arguments
5d1ade85
RW
3438 `(#:python ,python-2 ; only Python 2.7 is supported
3439 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
44d10b1f
RW
3440 (propagated-inputs
3441 `(("python2-numpy" ,python2-numpy)
3442 ("python2-scipy" ,python2-scipy)
3443 ("python2-pandas" ,python2-pandas)))
44d10b1f 3444 (native-inputs
5d1ade85 3445 `(("python2-cython" ,python2-cython)))
1b66989b 3446 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
44d10b1f
RW
3447 (synopsis "Library for reading and manipulating genetic data")
3448 (description
3449 "PySnpTools is a library for reading and manipulating genetic data. It
3450can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
3451those files. It can also efficiently manipulate ranges of integers using set
3452operators such as union, intersection, and difference.")
3453 (license license:asl2.0)))
3454
3455(define-public python-scipy
3456 (package
3457 (name "python-scipy")
3458 (version "1.1.0")
3459 (source
3460 (origin
3461 (method url-fetch)
3462 (uri (pypi-uri "scipy" version))
3463 (sha256
3464 (base32
3465 "1lfg686w6vv2m2dfs8v9d0bf2i18z7wz5vgzjnkgmpr4hi0550w7"))))
3466 (build-system python-build-system)
3467 (propagated-inputs
3468 `(("python-numpy" ,python-numpy)
3469 ("python-matplotlib" ,python-matplotlib)
3470 ("python-pyparsing" ,python-pyparsing)))
3471 (inputs
3472 `(("lapack" ,lapack)
3473 ("openblas" ,openblas)))
3474 (native-inputs
3475 `(("python-cython" ,python-cython)
3476 ("python-pytest" ,python-pytest)
3477 ("python-sphinx" ,python-sphinx)
3478 ("python-numpydoc" ,python-numpydoc)
3479 ("gfortran" ,gfortran)
3480 ("perl" ,perl)
3481 ("which" ,which)))
3482 (outputs '("out" "doc"))
3483 (arguments
3484 `(#:phases
3485 (modify-phases %standard-phases
3486 (add-after 'unpack 'disable-broken-tests
3487 (lambda _
3488 (substitute* "scipy/sparse/linalg/dsolve/tests/test_linsolve.py"
3489 (("^( +)def test_threads_parallel\\(self\\):" m indent)
3490 (string-append indent
3491 "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
3492 m)))
3493 (substitute* "scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py"
3494 (("^def test_parallel_threads\\(\\):" m)
3495 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
3496 m)))
3497 #t))
3498 (add-before 'build 'configure-openblas
3499 (lambda* (#:key inputs #:allow-other-keys)
3500 (call-with-output-file "site.cfg"
3501 (lambda (port)
3502 (format port
3503 "[blas]
3504libraries = openblas
3505library_dirs = ~a/lib
3506include_dirs = ~a/include
3507
3508# backslash-n to make emacs happy
3509\n[atlas]
3510library_dirs = ~a/lib
3511atlas_libs = openblas
3512"
3513 (assoc-ref inputs "openblas")
3514 (assoc-ref inputs "openblas")
3515 (assoc-ref inputs "openblas"))))
3516 #t))
3517 (add-after 'install 'install-doc
3518 (lambda* (#:key inputs outputs #:allow-other-keys)
3519 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3520 (doc (string-append data "/doc/" ,name "-" ,version))
3521 (html (string-append doc "/html"))
3522 (pyver ,(string-append "PYVER=" (version-major+minor
3523 (package-version python))))
3524 ;; By default it tries to run sphinx-build through the Python
3525 ;; interpreter which won't work with our shell wrapper.
3526 (sphinxbuild "SPHINXBUILD=LANG=C sphinx-build"))
3527 ;; Make installed package available for building the
3528 ;; documentation
3529 (add-installed-pythonpath inputs outputs)
3530 (with-directory-excursion "doc"
3531 ;; Fix generation of images for mathematical expressions.
3532 (substitute* (find-files "source" "conf\\.py")
3533 (("pngmath_use_preview = True")
3534 "pngmath_use_preview = False"))
3535 (mkdir-p html)
3536 (invoke "make" "html" pyver sphinxbuild)
3537 (with-directory-excursion "build/html"
3538 (for-each (lambda (file)
3539 (let* ((dir (dirname file))
3540 (tgt-dir (string-append html "/" dir)))
3541 (install-file file html)))
3542 (find-files "." ".*")))))
3543 #t))
3544 ;; Tests can only be run after the library has been installed and not
3545 ;; within the source directory.
3546 (delete 'check)
3547 (add-after 'install 'check
3548 (lambda* (#:key inputs outputs #:allow-other-keys)
3549 (add-installed-pythonpath inputs outputs)
3550 (with-directory-excursion "/tmp"
3551 (invoke "python" "-c"
3552 "import scipy; scipy.test(verbose=2)")))))))
3553 (home-page "https://www.scipy.org/")
3554 (synopsis "The Scipy library provides efficient numerical routines")
3555 (description "The SciPy library is one of the core packages that make up
3556the SciPy stack. It provides many user-friendly and efficient numerical
3557routines such as routines for numerical integration and optimization.")
3558 (properties `((python2-variant . ,(delay python2-scipy))))
3559 (license license:bsd-3)))
3560
3561(define-public python2-scipy
3562 (package-with-python2
3563 (strip-python2-variant python-scipy)))
3564
3565(define-public python-socksipy-branch
3566 (package
3567 (name "python-socksipy-branch")
3568 (version "1.01")
3569 (source
3570 (origin
3571 (method url-fetch)
3572 (uri (pypi-uri "SocksiPy-branch" version))
3573 (sha256
3574 (base32
3575 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
3576 (build-system python-build-system)
3577 (arguments
3578 `(#:tests? #f)) ; There are no tests
3579 (home-page "https://code.google.com/archive/p/socksipy-branch/")
3580 (synopsis "Python SOCKS module")
3581 (description
3582 "SocksiPy - A Python SOCKS client module. It provides a
3583socket-like interface that supports connections to any TCP
3584service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
3585The original version was developed by Dan Haim, this is a
3586branch created by Mario Vilas to address some open issues,
3587as the original project seems to have been abandoned circa 2007.")
3588 (license license:bsd-3)))
3589
3590(define-public python2-socksipy-branch
3591 (package-with-python2 python-socksipy-branch))
3592
3593(define-public python-pycodestyle
3594 (package
3595 (name "python-pycodestyle")
3596 (version "2.4.0")
3597 (source
3598 (origin
3599 (method url-fetch)
3600 (uri (pypi-uri "pycodestyle" version))
3601 (sha256
3602 (base32
3603 "0fhy4vnlgpjq4qd1wdnl6pvdw7rah0ypmn8c9mkhz8clsndskz6b"))))
3604 (build-system python-build-system)
3605 (home-page "https://pycodestyle.readthedocs.io/")
3606 (synopsis "Python style guide checker")
3607 (description "@code{pycodestyle} (formerly pep8) is a tool to check
3608Python code against some of the style conventions in
3609@url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
3610 (license license:expat)))
3611
3612(define-public python2-pycodestyle
3613 (package-with-python2 python-pycodestyle))
3614
3615(define-public python-multidict
3616 (package
3617 (name "python-multidict")
3618 (version "4.2.0")
3619 (source
3620 (origin
3621 (method url-fetch)
3622 (uri (pypi-uri "multidict" version))
3623 (sha256
3624 (base32
3625 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
3626 (build-system python-build-system)
3627 (native-inputs
3628 `(("python-pytest" ,python-pytest)
3629 ("python-pytest-runner" ,python-pytest-runner)))
3630 (home-page "https://github.com/aio-libs/multidict/")
3631 (synopsis "Multidict implementation")
3632 (description "Multidict is dict-like collection of key-value pairs
3633where key might be occurred more than once in the container.")
3634 (license license:asl2.0)))
3635
3636(define-public python-orderedmultidict
3637 (package
3638 (name "python-orderedmultidict")
3639 (version "0.7.11")
3640 (source
3641 (origin
3642 (method url-fetch)
3643 (uri (pypi-uri "orderedmultidict" version))
3644 (sha256
3645 (base32
3646 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
3647 (build-system python-build-system)
3648 (arguments
3649 `(#:phases
3650 (modify-phases %standard-phases
3651 (add-after 'unpack 'fix-tests
3652 (lambda _
3653 ;; The package uses nosetest for running the tests.
3654 ;; Adding this initfile allows to run the test suite
3655 ;; without requiring nosetest.
d1c4f329
RW
3656 (with-output-to-file "tests/__init__.py" newline)
3657 #t)))))
44d10b1f
RW
3658 (propagated-inputs
3659 `(("python-six" ,python-six)))
3660 (native-inputs
3661 `(("python-pycodestyle" ,python-pycodestyle)))
3662 (home-page "https://github.com/gruns/orderedmultidict")
3663 (synopsis "Python Ordered Multivalue Dictionary - omdict")
3664 (description "This package contains a library for ordered multivalue
3665dictionaries. A multivalue dictionary is a dictionary that can store
3666multiple values for the same key. An ordered multivalue dictionary is a
3667multivalue dictionary that retains the order of insertions and deletions.")
3668 (license license:unlicense)))
3669
3670(define-public python2-orderedmultidict
3671 (package-with-python2 python-orderedmultidict))
3672
3673(define-public python-autopep8
3674 (package
3675 (name "python-autopep8")
3676 (version "1.3.5")
3677 (source
3678 (origin
3679 (method url-fetch)
3680 (uri (pypi-uri "autopep8" version))
3681 (sha256
3682 (base32
3683 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
3684 (build-system python-build-system)
3685 (propagated-inputs
3686 `(("python-pycodestyle" ,python-pycodestyle)))
3687 (home-page "https://github.com/hhatto/autopep8")
3688 (synopsis "Format Python code according to the PEP 8 style guide")
3689 (description
3690 "@code{autopep8} automatically formats Python code to conform to
3691the PEP 8 style guide. It uses the pycodestyle utility to determine
3692what parts of the code needs to be formatted. @code{autopep8} is
3693capable of fixing most of the formatting issues that can be reported
3694by pycodestyle.")
3695 (license (license:non-copyleft
3696 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
3697
3698(define-public python2-autopep8
3699 (package-with-python2 python-autopep8))
3700
3701(define-public python-distutils-extra
3702 (package
3703 (name "python-distutils-extra")
3704 (version "2.38")
3705 (source
3706 (origin
3707 (method url-fetch)
3708 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
3709 version "/+download/python-distutils-extra-"
3710 version ".tar.gz"))
3711 (sha256
3712 (base32
3713 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
3714 (build-system python-build-system)
3715 (home-page "https://launchpad.net/python-distutils-extra/")
3716 (synopsis "Enhancements to Python's distutils")
3717 (description
3718 "The python-distutils-extra module enables you to easily integrate
3719gettext support, themed icons, and scrollkeeper-based documentation into
3720Python's distutils.")
3721 (license license:gpl2)))
3722
3723(define-public python2-distutils-extra
3724 (package-with-python2 python-distutils-extra))
3725
3726(define-public python2-elib.intl
3727 (package
3728 (name "python2-elib.intl")
3729 (version "0.0.3")
3730 (source
3731 (origin
3732 ;; This project doesn't tag releases or publish tarballs, so we take
3733 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
3734 (method git-fetch)
3735 (uri (git-reference
3736 (url "https://github.com/dieterv/elib.intl.git")
3737 (commit "d09997cfef")))
3738 (file-name (string-append name "-" version "-checkout"))
3739 (sha256
3740 (base32
3741 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
3742 (build-system python-build-system)
3743 (arguments
3744 ;; incompatible with Python 3 (exception syntax)
3745 `(#:python ,python-2
3746 #:tests? #f))
3747 (home-page "https://github.com/dieterv/elib.intl")
3748 (synopsis "Enhanced internationalization for Python")
3749 (description
3750 "The elib.intl module provides enhanced internationalization (I18N)
3751services for your Python modules and applications.")
3752 (license license:lgpl3+)))
3753
3754(define-public python-olefile
3755 (package
3756 (name "python-olefile")
3757 (version "0.45.1")
3758 (source
3759 (origin
3760 (method url-fetch)
3761 (uri (string-append "https://github.com/decalage2/olefile/archive/v"
3762 version ".tar.gz"))
3763 (file-name (string-append name "-" version ".tar.gz"))
3764 (sha256
3765 (base32
3766 "18ai19zwagm6nli14k8bii31ipbab2rp7plrvsm6gmfql551a8ai"))))
3767 (build-system python-build-system)
3768 (home-page
3769 "https://www.decalage.info/python/olefileio")
3770 (synopsis "Read and write Microsoft OLE2 files.")
3771 (description
3772 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
3773Storage or Compound Document, Microsoft Office). It is an improved version of
3774the OleFileIO module from PIL, the Python Image Library.")
3775 (license license:bsd-3)))
3776
3777(define-public python2-olefile
3778 (package-with-python2 python-olefile))
3779
3780(define-public python-pillow
3781 (package
3782 (name "python-pillow")
3783 (version "5.4.1")
3784 (source
3785 (origin
3786 (method url-fetch)
3787 (uri (pypi-uri "Pillow" version))
3788 (sha256
3789 (base32
3790 "17waygkhhzjd75kajlfw9v57mbb41lcpg6cvkdijqd7smm76ccsj"))))
3791 (build-system python-build-system)
3792 (native-inputs
3793 `(("python-pytest" ,python-pytest)))
3794 (inputs
3795 `(("freetype" ,freetype)
3796 ("lcms" ,lcms)
3797 ("zlib" ,zlib)
3798 ("libjpeg" ,libjpeg)
3799 ("openjpeg" ,openjpeg)
3800 ("libtiff" ,libtiff)
3801 ("libwebp" ,libwebp)))
3802 (propagated-inputs
3803 `(("python-olefile" ,python-olefile)))
3804 (arguments
3805 `(#:phases
3806 (modify-phases %standard-phases
3807 (add-after 'unpack 'patch-ldconfig
3808 (lambda _
3809 (substitute* "setup.py"
3810 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
3811 (delete 'check) ; We must run checks after python-pillow is installed.
3812 (add-after 'install 'check-installed
3813 (lambda* (#:key outputs inputs #:allow-other-keys)
3814 (begin
3815 (setenv "HOME" (getcwd))
3816 ;; Make installed package available for running the tests.
3817 (add-installed-pythonpath inputs outputs)
3818 (invoke "python" "selftest.py" "--installed")
3819 (invoke "python" "-m" "pytest" "-vv")))))))
3820 (home-page "https://python-pillow.org")
3821 (synopsis "Fork of the Python Imaging Library")
3822 (description
3823 "The Python Imaging Library adds image processing capabilities to your
3824Python interpreter. This library provides extensive file format support, an
3825efficient internal representation, and fairly powerful image processing
3826capabilities. The core image library is designed for fast access to data
3827stored in a few basic pixel formats. It should provide a solid foundation for
3828a general image processing tool.")
3829 (license (license:x11-style
3830 "http://www.pythonware.com/products/pil/license.htm"
3831 "The PIL Software License"))))
3832
3833(define-public python2-pillow
3834 (package-with-python2 python-pillow))
3835
3836(define-public python-pycparser
3837 (package
3838 (name "python-pycparser")
3839 (version "2.18")
3840 (source
3841 (origin
3842 (method url-fetch)
3843 (uri (pypi-uri "pycparser" version))
3844 (sha256
3845 (base32
3846 "09mjyw82ibqzl449g7swy8bfxnfpmas0815d2rkdjlcqw81wma4r"))))
3847 (outputs '("out" "doc"))
3848 (build-system python-build-system)
3849 (native-inputs
3850 `(("pkg-config" ,pkg-config)))
3851 (arguments
3852 `(#:phases
3853 (modify-phases %standard-phases
3854 (replace 'check
3855 (lambda _
3856 (with-directory-excursion "tests"
acb75c03
RW
3857 (invoke "python" "all_tests.py"))
3858 #t))
44d10b1f
RW
3859 (add-after 'install 'install-doc
3860 (lambda* (#:key outputs #:allow-other-keys)
3861 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3862 (doc (string-append data "/doc/" ,name "-" ,version))
3863 (examples (string-append doc "/examples")))
3864 (mkdir-p examples)
3865 (for-each (lambda (file)
3866 (copy-file (string-append "." file)
3867 (string-append doc file)))
3868 '("/README.rst" "/CHANGES" "/LICENSE"))
3869 (copy-recursively "examples" examples)))))))
3870 (home-page "https://github.com/eliben/pycparser")
3871 (synopsis "C parser in Python")
3872 (description
3873 "Pycparser is a complete parser of the C language, written in pure Python
3874using the PLY parsing library. It parses C code into an AST and can serve as
3875a front-end for C compilers or analysis tools.")
3876 (license license:bsd-3)))
3877
3878(define-public python2-pycparser
3879 (package-with-python2 python-pycparser))
3880
3881(define-public python-pywavelets
3882 (package
3883 (name "python-pywavelets")
3884 (version "1.0.1")
3885 (home-page "https://github.com/PyWavelets/pywt")
3886 (source (origin
3887 (method url-fetch)
3888 (uri (pypi-uri "PyWavelets" version))
3889 (sha256
3890 (base32
3891 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
3892 (build-system python-build-system)
3893 (arguments
3894 '(#:modules ((ice-9 ftw)
3895 (srfi srfi-1)
3896 (srfi srfi-26)
3897 (guix build utils)
3898 (guix build python-build-system))
3899 #:phases (modify-phases %standard-phases
3900 (replace 'check
3901 (lambda _
3902 (let ((cwd (getcwd))
3903 (libdir (find (cut string-prefix? "lib." <>)
3904 (scandir "build"))))
3905 (with-directory-excursion (string-append cwd "/build/" libdir)
3906 (invoke "nosetests" "-v" "."))))))))
3907 (native-inputs
3908 `(("python-matplotlib" ,python-matplotlib) ;for tests
3909 ("python-nose" ,python-nose)))
3910 (propagated-inputs
3911 `(("python-numpy" ,python-numpy)))
3912 (synopsis "Wavelet transforms in Python")
3913 (description
3914 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
3915mathematical basis functions that are localized in both time and frequency.
3916Wavelet transforms are time-frequency transforms employing wavelets. They are
3917similar to Fourier transforms, the difference being that Fourier transforms are
3918localized only in frequency instead of in time and frequency.")
3919 (license license:expat)))
3920
3921(define-public python2-pywavelets
3922 (package-with-python2 python-pywavelets))
3923
3924(define-public python-xcffib
3925 (package
3926 (name "python-xcffib")
3927 (version "0.6.0")
3928 (source
3929 (origin
3930 (method url-fetch)
3931 (uri (pypi-uri "xcffib" version))
3932 (sha256
3933 (base32
3934 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
3935 (build-system python-build-system)
3936 (inputs
3937 `(("libxcb" ,libxcb)))
3938 (propagated-inputs
3939 `(("python-cffi" ,python-cffi) ; used at run time
3940 ("python-six" ,python-six)))
3941 (arguments
3942 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
3943 #:tests? #f
3944 #:phases
3945 (modify-phases %standard-phases
3946 (add-after 'unpack 'fix-libxcb-path
3947 (lambda* (#:key inputs #:allow-other-keys)
3948 (let ((libxcb (assoc-ref inputs "libxcb")))
3949 (substitute* '("xcffib/__init__.py")
3950 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
3951 #t)))
3952 (add-after 'install 'install-doc
3953 (lambda* (#:key outputs #:allow-other-keys)
3954 (let ((doc (string-append (assoc-ref outputs "out") "/share"
3955 "/doc/" ,name "-" ,version)))
3956 (mkdir-p doc)
3957 (copy-file "README.md"
3958 (string-append doc "/README.md"))
3959 #t))))))
3960 (home-page "https://github.com/tych0/xcffib")
3961 (synopsis "XCB Python bindings")
3962 (description
3963 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
3964support for Python 3 and PyPy. It is based on cffi.")
3965 (license license:expat)))
3966
3967(define-public python2-xcffib
3968 (package-with-python2 python-xcffib))
3969
3970(define-public python-cairocffi
3971 (package
3972 (name "python-cairocffi")
3973 (version "0.9.0")
3974 (source
3975 (origin
3976 (method url-fetch)
3977 (uri (pypi-uri "cairocffi" version))
3978 (sha256
3979 (base32
3980 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
3981 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
3982 (build-system python-build-system)
3983 (outputs '("out" "doc"))
3984 (inputs
3985 `(("glib" ,glib)
3986 ("gtk+" ,gtk+)
3987 ("gdk-pixbuf" ,gdk-pixbuf)
3988 ("cairo" ,cairo)
3989 ("pango" ,pango)))
3990 (native-inputs
3991 `(("pkg-config" ,pkg-config)
3992 ("python-pytest" ,python-pytest)
3993 ("python-pytest-cov" ,python-pytest-cov)
3994 ("python-pytest-runner" ,python-pytest-runner)
3995 ("python-sphinx" ,python-sphinx)
3996 ("python-docutils" ,python-docutils)))
3997 (propagated-inputs
3998 `(("python-xcffib" ,python-xcffib))) ; used at run time
3999 (arguments
4000 `(#:phases
4001 (modify-phases %standard-phases
4002 (add-after 'unpack 'patch-paths
4003 (lambda* (#:key inputs outputs #:allow-other-keys)
4004 (substitute* (find-files "." "\\.py$")
4005 (("dlopen\\(ffi, 'cairo'")
4006 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
4007 "/lib/libcairo.so.2'"))
4008 (("dlopen\\(ffi, 'gdk-3'")
4009 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
4010 "/lib/libgtk-3.so.0'"))
4011 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
4012 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
4013 "/lib/libgdk_pixbuf-2.0.so.0'"))
4014 (("dlopen\\(ffi, 'glib-2.0'")
4015 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4016 "/lib/libglib-2.0.so.0'"))
4017 (("dlopen\\(ffi, 'gobject-2.0'")
4018 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4019 "/lib/libgobject-2.0.so.0'"))
4020 (("dlopen\\(ffi, 'pangocairo-1.0'")
4021 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4022 "/lib/libpangocairo-1.0.so.0'"))
4023 (("dlopen\\(ffi, 'pango-1.0'")
4024 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4025 "/lib/libpango-1.0.so.0'")))
4026 #t))
4027 (add-after 'install 'install-doc
4028 (lambda* (#:key inputs outputs #:allow-other-keys)
4029 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4030 (doc (string-append data "/doc/" ,name "-" ,version))
4031 (html (string-append doc "/html")))
4032 (setenv "LD_LIBRARY_PATH"
4033 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4034 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4035 (setenv "LANG" "en_US.UTF-8")
4036 (mkdir-p html)
4037 (for-each (lambda (file)
4038 (copy-file (string-append "." file)
4039 (string-append doc file)))
4040 '("/README.rst" "/CHANGES" "/LICENSE"))
4041 (system* "python" "setup.py" "build_sphinx")
4042 (copy-recursively "docs/_build/html" html)
4043 #t))))))
4044 (home-page "https://github.com/Kozea/cairocffi")
4045 (synopsis "Python bindings and object-oriented API for Cairo")
4046 (description
4047 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4048Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4049graphics library with support for multiple backends including image buffers,
4050PNG, PostScript, PDF, and SVG file output.")
4051 (license license:bsd-3)))
4052
4053(define-public python2-cairocffi
4054 (package-with-python2 python-cairocffi))
4055
4056(define-public python-decorator
4057 (package
4058 (name "python-decorator")
4059 (version "4.3.0")
4060 (source
4061 (origin
4062 (method url-fetch)
4063 (uri (pypi-uri "decorator" version))
4064 (sha256
4065 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
4066 (build-system python-build-system)
4067 (home-page "https://pypi.python.org/pypi/decorator/")
4068 (synopsis "Python module to simplify usage of decorators")
4069 (description
4070 "The aim of the decorator module is to simplify the usage of decorators
4071for the average programmer, and to popularize decorators usage giving examples
4072of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4073etc. The core of this module is a decorator factory.")
4074 (license license:expat)))
4075
4076(define-public python2-decorator
4077 (package-with-python2 python-decorator))
4078
4079(define-public python-drmaa
4080 (package
4081 (name "python-drmaa")
4082 (version "0.7.7")
4083 (source
4084 (origin
4085 (method url-fetch)
4086 (uri (pypi-uri "drmaa" version))
4087 (sha256
4088 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4089 (build-system python-build-system)
4090 ;; The test suite requires libdrmaa which is provided by the cluster
4091 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4092 ;; should be set to the path of the libdrmaa library.
4093 (arguments '(#:tests? #f))
4094 (native-inputs
4095 `(("python-nose" ,python-nose)))
4096 (home-page "https://pypi.python.org/pypi/drmaa")
4097 (synopsis "Python bindings for the DRMAA library")
4098 (description
4099 "A Python package for Distributed Resource Management (DRM) job
4100submission and control. This package is an implementation of the DRMAA 1.0
4101Python language binding specification.")
4102 (license license:bsd-3)))
4103
4104(define-public python2-drmaa
4105 (package-with-python2 python-drmaa))
4106
4107(define-public python-grako
4108 (package
4109 (name "python-grako")
4110 (version "3.99.9")
4111 (source
4112 (origin
4113 (method url-fetch)
4114 (uri
4115 (pypi-uri "grako" version ".zip"))
4116 (sha256
4117 (base32
4118 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4119 (build-system python-build-system)
4120 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4121 (native-inputs
4122 `(("unzip" ,unzip)
4123 ("python-pytest" ,python-pytest)
4124 ("python-pytest-runner" ,python-pytest-runner)))
4125 (home-page "https://bitbucket.org/neogeny/grako")
4126 (synopsis "EBNF parser generator")
4127 (description
4128 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4129memoizing PEG/Packrat parser in Python.")
4130 (license license:bsd-3)))
4131
4132(define-public python2-grako
4133 (package-with-python2 python-grako))
4134
4135(define-public python-gridmap
4136 (package
4137 (name "python-gridmap")
4138 (version "0.13.0")
4139 (source
4140 (origin
4141 (method url-fetch)
4142 (uri (string-append
4143 "https://github.com/pygridtools/gridmap/archive/v"
4144 version ".tar.gz"))
4145 (file-name (string-append name "-" version ".tar.gz"))
4146 (sha256
4147 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
4148 (build-system python-build-system)
4149 (arguments
4150 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4151 (propagated-inputs
4152 `(("python-psutil" ,python-psutil)
4153 ("python-drmaa" ,python-drmaa)
4154 ("python-pyzmq" ,python-pyzmq)))
4155 (home-page "https://github.com/pygridtools/gridmap")
4156 (synopsis "Create jobs on a cluster directly from Python")
4157 (description
4158 "Gridmap is a Python package to allow you to easily create jobs on the
4159cluster directly from Python. You can directly map Python functions onto the
4160cluster without needing to write any wrapper code yourself.")
4161 (license license:gpl3+)))
4162
4163(define-public python2-gridmap
4164 (package-with-python2 python-gridmap))
4165
4166(define-public python-honcho
4167 (package
4168 (name "python-honcho")
4169 (version "1.0.1")
4170 (source
4171 (origin
4172 (method url-fetch)
4173 (uri (string-append
4174 "https://github.com/nickstenning/honcho/archive/v"
4175 version ".tar.gz"))
4176 (file-name (string-append name "-" version ".tar.gz"))
4177 (sha256
4178 (base32 "0zizn61n5z5hq421hkypk9pw8s6fpxw30f4hsg7k4ivwzy3gjw9j"))))
4179 (build-system python-build-system)
4180 (native-inputs
4181 `(("python-pytest" ,python-pytest)
4182 ("python-mock" ,python-mock)
4183 ("python-tox" ,python-tox)
4184 ("which" ,which))) ;for tests
4185 (propagated-inputs
4186 `(("python-jinja2" ,python-jinja2)))
4187 (arguments
4188 `(#:phases
4189 (modify-phases %standard-phases
4190 (delete 'check)
4191 (add-after 'install 'check
4192 (lambda* (#:key outputs inputs #:allow-other-keys)
4193 ;; fix honcho path in testsuite
4194 (substitute* "tests/conftest.py"
4195 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
4196 "/bin/honcho" "'")))
4197 ;; It's easier to run tests after install.
4198 ;; Make installed package available for running the tests
4199 (add-installed-pythonpath inputs outputs)
95b707fb 4200 (invoke "py.test" "-v"))))))
44d10b1f
RW
4201 (home-page "https://github.com/nickstenning/honcho")
4202 (synopsis "Manage Procfile-based applications")
4203 (description
4204 "A Procfile is a file which describes how to run an application
4205consisting of serveral processes. honcho starts all listed processes.
4206The output of all running processes is collected by honcho and
4207displayed.")
4208 (license license:expat)))
4209
4210(define-public python2-honcho
4211 (package-with-python2 python-honcho))
4212
4213(define-public python-pexpect
4214 (package
4215 (name "python-pexpect")
4216 (version "4.6.0")
4217 (source
4218 (origin
4219 (method url-fetch)
4220 (uri (pypi-uri "pexpect" version))
4221 (sha256
4222 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
4223 (build-system python-build-system)
4224 (arguments
4225 `(#:phases
4226 (modify-phases %standard-phases
4227 (add-before 'check 'prepare-tests
4228 (lambda _
4229 (substitute* (find-files "tests")
4230 (("/bin/ls") (which "ls"))
4231 (("/bin/echo") (which "echo"))
4232 (("/bin/which") (which "which"))
4233 ;; Many tests try to use the /bin directory which
4234 ;; is not present in the build environment.
4235 ;; Use one that's non-empty and unlikely to change.
4236 (("/bin'") "/dev'"))
4237 ;; XXX: Socket connection test gets "Connection reset by peer".
4238 ;; Why does it not work? Delete for now.
4239 (delete-file "tests/test_socket.py")
4240 #t))
4241 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
4242 (native-inputs
4243 `(("python-nose" ,python-nose)
4244 ("python-pytest" ,python-pytest)
4245 ("man-db" ,man-db)
4246 ("which" ,which)
4247 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
4248 (propagated-inputs
4249 `(("python-ptyprocess" ,python-ptyprocess)))
4250 (home-page "http://pexpect.readthedocs.org/")
4251 (synopsis "Controlling interactive console applications")
4252 (description
4253 "Pexpect is a pure Python module for spawning child applications;
4254controlling them; and responding to expected patterns in their output.
4255Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4256child application and control it as if a human were typing commands.")
4257 (license license:isc)))
4258
4259(define-public python2-pexpect
4260 (package-with-python2 python-pexpect))
4261
4262(define-public python-setuptools-scm
4263 (package
4264 (name "python-setuptools-scm")
4265 (version "3.1.0")
4266 (source (origin
4267 (method url-fetch)
4268 (uri (pypi-uri "setuptools_scm" version))
4269 (sha256
4270 (base32
4271 "0h4bglwfz8b9prqljv8z3w9rgydfyxzaj05bm1y6zs5m6shz548i"))))
4272 (build-system python-build-system)
4273 (home-page "https://github.com/pypa/setuptools_scm/")
4274 (synopsis "Manage Python package versions in SCM metadata")
4275 (description
4276 "Setuptools_scm handles managing your Python package versions in
4277@dfn{software configuration management} (SCM) metadata instead of declaring
4278them as the version argument or in a SCM managed file.")
4279 (license license:expat)))
4280
4281(define-public python2-setuptools-scm
4282 (package-with-python2 python-setuptools-scm))
4283
4284(define-public python-pathpy
4285 (package
4286 (name "python-pathpy")
4287 (version "11.0.1")
4288 (source
4289 (origin
4290 (method url-fetch)
4291 (uri (pypi-uri "path.py" version))
4292 (sha256
4293 (base32 "07x15v8c7ry9bvycw294c9yq6ky9v2b0dalvgi6rn38ilh69vsz7"))))
4294 ;; (outputs '("out" "doc"))
4295 (build-system python-build-system)
4296 (propagated-inputs
4297 `(("python-appdirs" ,python-appdirs)))
4298 (native-inputs
4299 `(("python-setuptools-scm" ,python-setuptools-scm)
4300 ("python-sphinx" ,python-sphinx)
4301 ("python-rst.linker" ,python-rst.linker)
4302 ("python-pytest" ,python-pytest)
4303 ("python-pytest-runner" ,python-pytest-runner)))
4304 (arguments
4305 ;; FIXME: Documentation and tests require "jaraco.packaging".
4306 `(#:tests? #f))
4307 ;; #:phases
4308 ;; (modify-phases %standard-phases
4309 ;; (add-after 'build 'build-doc
4310 ;; (lambda _
4311 ;; (setenv "LANG" "en_US.UTF-8")
4312 ;; (zero? (system* "python" "setup.py" "build_sphinx"))))
4313 ;; (add-after 'install 'install-doc
4314 ;; (lambda* (#:key outputs #:allow-other-keys)
4315 ;; (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4316 ;; (doc (string-append data "/doc/" ,name "-" ,version))
4317 ;; (html (string-append doc "/html")))
4318 ;; (mkdir-p html)
4319 ;; (for-each (lambda (file)
4320 ;; (copy-file file (string-append doc "/" file)))
4321 ;; '("README.rst" "CHANGES.rst"))
4322 ;; (copy-recursively "build/sphinx/html" html)))))))
4323 (home-page "https://github.com/jaraco/path.py")
4324 (synopsis "Python module wrapper for built-in os.path")
4325 (description
4326 "@code{path.py} implements path objects as first-class entities, allowing
4327common operations on files to be invoked on those path objects directly.")
4328 (license license:expat)))
4329
4330(define-public python2-pathpy
4331 (package-with-python2 python-pathpy))
4332
4333(define-public python-simplegeneric
4334 (package
4335 (name "python-simplegeneric")
4336 (version "0.8.1")
4337 (source
4338 (origin
4339 (method url-fetch)
6c8c3980 4340 (uri (pypi-uri "simplegeneric" version ".zip"))
44d10b1f
RW
4341 (sha256
4342 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
4343 (build-system python-build-system)
4344 (native-inputs
4345 `(("unzip" ,unzip)))
4346 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
4347 (synopsis "Python module for simple generic functions")
4348 (description
4349 "The simplegeneric module lets you define simple single-dispatch generic
4350functions, akin to Python’s built-in generic functions like @code{len()},
4351@code{iter()} and so on. However, instead of using specially-named methods,
4352these generic functions use simple lookup tables, akin to those used by
4353e.g. @code{pickle.dump()} and other generic functions found in the Python
4354standard library.")
4355 (license license:zpl2.1)))
4356
4357(define-public python2-simplegeneric
4358 (package-with-python2 python-simplegeneric))
4359
4360(define-public python-ipython-genutils
4361 ;; TODO: This package is retired, check if can be removed, see description.
4362 (package
4363 (name "python-ipython-genutils")
4364 (version "0.1.0")
4365 (source
4366 (origin
4367 (method url-fetch)
c9671d4b 4368 (uri (pypi-uri "ipython_genutils" version))
44d10b1f
RW
4369 (sha256
4370 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
4371 (build-system python-build-system)
4372 (arguments `(#:tests? #f)) ; no tests
4373 (home-page "https://ipython.org")
4374 (synopsis "Vestigial utilities from IPython")
4375 (description
4376 "This package provides retired utilities from IPython. No packages
4377outside IPython/Jupyter should depend on it.
4378
4379This package shouldn't exist. It contains some common utilities shared by
4380Jupyter and IPython projects during The Big Split. As soon as possible, those
4381packages will remove their dependency on this, and this package will go
4382away.")
4383 (license license:bsd-3)))
4384
4385(define-public python2-ipython-genutils
4386 (package-with-python2 python-ipython-genutils))
4387
4388(define-public python-traitlets
4389 (package
4390 (name "python-traitlets")
4391 (version "4.3.2")
4392 (source
4393 (origin
4394 (method url-fetch)
4395 (uri (pypi-uri "traitlets" version))
4396 (sha256
4397 (base32
4398 "0dbq7sx26xqz5ixs711k5nc88p8a0nqyz6162pwks5dpcz9d4jww"))))
4399 (build-system python-build-system)
4400 (arguments
4401 `(#:phases
4402 (modify-phases %standard-phases
4403 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
4404 (propagated-inputs
4405 `(("python-ipython-genutils" ,python-ipython-genutils)
4406 ("python-decorator" ,python-decorator))) ;not needed for >4.3.2
4407 (native-inputs
4408 `(("python-pytest" ,python-pytest)))
4409 (properties `((python2-variant . ,(delay python2-traitlets))))
4410 (home-page "https://ipython.org")
4411 (synopsis "Configuration system for Python applications")
4412 (description
4413 "Traitlets is a framework that lets Python classes have attributes with
4414type checking, dynamically calculated default values, and ‘on change’
4415callbacks. The package also includes a mechanism to use traitlets for
4416configuration, loading values from files or from command line arguments. This
4417is a distinct layer on top of traitlets, so you can use traitlets in your code
4418without using the configuration machinery.")
4419 (license license:bsd-3)))
4420
4421(define-public python2-traitlets
4422 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
4423 (package
4424 (inherit traitlets)
4425 (propagated-inputs
4426 `(("python2-enum34" ,python2-enum34)
4427 ,@(package-propagated-inputs traitlets))))))
4428
4429(define-public python-jupyter-core
4430 (package
4431 (name "python-jupyter-core")
4432 (version "4.4.0")
4433 (source
4434 (origin
4435 (method url-fetch)
4436 (uri (string-append (pypi-uri "jupyter_core" version)))
4437 (sha256
4438 (base32
4439 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
4440 (build-system python-build-system)
4441 ;; FIXME: not sure how to run the tests
4442 (arguments `(#:tests? #f))
4443 (propagated-inputs
4444 `(("python-traitlets" ,python-traitlets)))
4445 (home-page "http://jupyter.org/")
4446 (synopsis "Jupyter base package")
4447 (description
4448 "Jupyter core is the base package on which Jupyter projects rely.")
4449 (license license:bsd-3)))
4450
4451(define-public python2-jupyter-core
4452 (package-with-python2 python-jupyter-core))
4453
4454(define-public python-jupyter-client
4455 (package
4456 (name "python-jupyter-client")
4457 (version "5.2.4")
4458 (source
4459 (origin
4460 (method url-fetch)
4461 (uri (pypi-uri "jupyter_client" version))
4462 (sha256
4463 (base32
4464 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
4465 (build-system python-build-system)
4466 ;; Tests fail because of missing native python kernel which I assume is
4467 ;; provided by the ipython package, which we cannot use because it would
4468 ;; cause a dependency cycle.
4469 (arguments `(#:tests? #f))
4470 (propagated-inputs
4471 `(("python-pyzmq" ,python-pyzmq)
4472 ("python-traitlets" ,python-traitlets)
4473 ("python-jupyter-core" ,python-jupyter-core)))
4474 (home-page "http://jupyter.org/")
4475 (synopsis "Jupyter protocol implementation and client libraries")
4476 (description
4477 "The @code{jupyter_client} package contains the reference implementation
4478of the Jupyter protocol. It also provides client and kernel management APIs
4479for working with kernels, and the @code{jupyter kernelspec} entrypoint for
4480installing @code{kernelspec}s for use with Jupyter frontends.")
4481 (license license:bsd-3)))
4482
4483(define-public python2-jupyter-client
4484 (package-with-python2 python-jupyter-client))
4485
4486(define-public python-ipykernel
4487 (package
4488 (name "python-ipykernel")
4489 (version "5.1.0")
4490 (source
4491 (origin
4492 (method url-fetch)
4493 (uri (pypi-uri "ipykernel" version))
4494 (sha256
4495 (base32 "0br95qhrd5k65g10djngiy27hs0642301hlf2q142i8djabvzh0g"))))
4496 (build-system python-build-system)
4497 (arguments
4498 `(#:phases
4499 (modify-phases %standard-phases
4500 (replace 'check
4501 (lambda _
4502 (setenv "HOME" "/tmp")
4503 (invoke "pytest" "-v")
4504 #t)))))
4505 (propagated-inputs
4506 `(("python-ipython" ,python-ipython)
4507 ;; imported at runtime during connect
4508 ("python-jupyter-client" ,python-jupyter-client)))
4509 (native-inputs
4510 `(("python-pytest" ,python-pytest)
4511 ("python-nose" ,python-nose)))
4512 (home-page "https://ipython.org")
4513 (synopsis "IPython Kernel for Jupyter")
4514 (description
4515 "This package provides the IPython kernel for Jupyter.")
4516 (license license:bsd-3)))
4517
4518(define-public python2-ipykernel
4519 (package-with-python2 python-ipykernel))
4520
44d10b1f
RW
4521;; This is the latest release of the LTS version of ipython with support for
4522;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
4523;; dropped support for Python 2.7. We may want to rename this package.
4524(define-public python-ipython
4525 (package
4526 (name "python-ipython")
4527 (version "5.8.0")
4528 (source
4529 (origin
4530 (method url-fetch)
4531 (uri (pypi-uri "ipython" version ".tar.gz"))
4532 (sha256
4533 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
4534 (build-system python-build-system)
4535 (outputs '("out" "doc"))
4536 (propagated-inputs
4537 `(("python-pyzmq" ,python-pyzmq)
4538 ("python-prompt-toolkit" ,python-prompt-toolkit-1)
4539 ("python-terminado" ,python-terminado)
4540 ("python-matplotlib" ,python-matplotlib)
4541 ("python-numpy" ,python-numpy)
4542 ("python-numpydoc" ,python-numpydoc)
4543 ("python-jinja2" ,python-jinja2)
4544 ("python-mistune" ,python-mistune)
4545 ("python-pexpect" ,python-pexpect)
4546 ("python-pickleshare" ,python-pickleshare)
4547 ("python-simplegeneric" ,python-simplegeneric)
4548 ("python-jsonschema" ,python-jsonschema)
4549 ("python-traitlets" ,python-traitlets)
4550 ("python-nbformat" ,python-nbformat)
4551 ("python-pygments" ,python-pygments)))
4552 (inputs
4553 `(("readline" ,readline)
4554 ("which" ,which)))
4555 (native-inputs
4556 `(("graphviz" ,graphviz)
4557 ("pkg-config" ,pkg-config)
4558 ("python-requests" ,python-requests) ;; for tests
4559 ("python-testpath" ,python-testpath)
4560 ("python-nose" ,python-nose)
4561 ("python-sphinx" ,python-sphinx)
4562 ("python-shpinx-rtd-theme" ,python-sphinx-rtd-theme)
4563 ;; FIXME: It's possible that a smaller union would work just as well.
4564 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
4565 texlive-fonts-ec
4566 texlive-generic-ifxetex
4567 texlive-generic-pdftex
4568 texlive-latex-amsfonts
4569 texlive-latex-capt-of
4570 texlive-latex-cmap
4571 texlive-latex-environ
4572 texlive-latex-eqparbox
4573 texlive-latex-etoolbox
4574 texlive-latex-expdlist
4575 texlive-latex-fancyhdr
4576 texlive-latex-fancyvrb
4577 texlive-latex-fncychap
4578 texlive-latex-float
4579 texlive-latex-framed
4580 texlive-latex-geometry
4581 texlive-latex-graphics
4582 texlive-latex-hyperref
4583 texlive-latex-mdwtools
4584 texlive-latex-multirow
4585 texlive-latex-oberdiek
4586 texlive-latex-parskip
4587 texlive-latex-preview
4588 texlive-latex-tabulary
4589 texlive-latex-threeparttable
4590 texlive-latex-titlesec
4591 texlive-latex-trimspaces
4592 texlive-latex-ucs
4593 texlive-latex-upquote
4594 texlive-latex-url
4595 texlive-latex-varwidth
4596 texlive-latex-wrapfig)))
4597 ("texinfo" ,texinfo)))
4598 (arguments
4599 `(#:phases
4600 (modify-phases %standard-phases
4601 (add-after 'install 'install-doc
4602 (lambda* (#:key inputs outputs #:allow-other-keys)
4603 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4604 (doc (string-append data "/doc/" ,name "-" ,version))
4605 (html (string-append doc "/html"))
4606 (man1 (string-append data "/man/man1"))
4607 (info (string-append data "/info"))
4608 (examples (string-append doc "/examples"))
4609 (python-arg (string-append "PYTHON=" (which "python"))))
4610 (setenv "LANG" "en_US.utf8")
4611 ;; Make installed package available for running the tests
4612 (add-installed-pythonpath inputs outputs)
4613 (with-directory-excursion "docs"
4614 ;; FIXME: pdf fails to build
4615 ;;(system* "make" "pdf" "PAPER=a4")
4616 (system* "make" python-arg "html")
4617 (system* "make" python-arg "info"))
4618 (copy-recursively "docs/man" man1)
4619 (copy-recursively "examples" examples)
4620 (copy-recursively "docs/build/html" html)
4621 ;; (copy-file "docs/build/latex/ipython.pdf"
4622 ;; (string-append doc "/ipython.pdf"))
4623 (mkdir-p info)
4624 (copy-file "docs/build/texinfo/ipython.info"
4625 (string-append info "/ipython.info"))
4626 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
4627 #t))
4628 ;; Tests can only be run after the library has been installed and not
4629 ;; within the source directory.
4630 (delete 'check)
4631 (add-after 'install 'check
4632 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
4633 (if tests?
4634 (begin
4635 ;; Make installed package available for running the tests
4636 (add-installed-pythonpath inputs outputs)
4637 (setenv "HOME" "/tmp/") ;; required by a test
4638 ;; We only test the core because one of the other tests
4639 ;; tries to import ipykernel.
4640 (invoke "python" "IPython/testing/iptest.py"
4641 "-v" "IPython/core/tests"))
4642 #t)))
4643 (add-before 'check 'fix-tests
4644 (lambda* (#:key inputs #:allow-other-keys)
4645 (substitute* "./IPython/utils/_process_posix.py"
4646 (("/usr/bin/env', 'which") (which "which")))
4647 (substitute* "./IPython/core/tests/test_inputtransformer.py"
4648 (("#!/usr/bin/env python")
4649 (string-append "#!" (which "python"))))
4650 ;; Disable 1 failing test
4651 (substitute* "./IPython/core/tests/test_magic.py"
4652 (("def test_dirops\\(\\):" all)
4653 (string-append "@dec.skipif(True)\n" all)))
4654 ;; This test introduces a circular dependency on ipykernel
4655 ;; (which depends on ipython).
4656 (delete-file "IPython/core/tests/test_display.py")
4657 ;; These tests throw errors for unknown reasons.
4658 (delete-file "IPython/extensions/tests/test_storemagic.py")
4659 (delete-file "IPython/core/tests/test_displayhook.py")
4660 (delete-file "IPython/core/tests/test_interactiveshell.py")
4661 (delete-file "IPython/core/tests/test_pylabtools.py")
4662 (delete-file "IPython/core/tests/test_paths.py")
4663 #t)))))
4664 (home-page "https://ipython.org")
4665 (synopsis "IPython is a tool for interactive computing in Python")
4666 (description
4667 "IPython provides a rich architecture for interactive computing with:
4668Powerful interactive shells, a browser-based notebook, support for interactive
4669data visualization, embeddable interpreters and tools for parallel
4670computing.")
4671 (license license:bsd-3)
4672 (properties `((python2-variant . ,(delay python2-ipython))))))
4673
4674(define-public python2-ipython
4675 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
4676 (package
4677 (inherit ipython)
4678 ;; FIXME: add pyreadline once available.
4679 (propagated-inputs
4680 `(("python2-backports-shutil-get-terminal-size"
4681 ,python2-backports-shutil-get-terminal-size)
4682 ("python2-pathlib2" ,python2-pathlib2)
4683 ,@(package-propagated-inputs ipython)))
4684 (native-inputs
4685 `(("python2-mock" ,python2-mock)
4686 ,@(package-native-inputs ipython))))))
4687
4688(define-public python-urwid
4689 (package
4690 (name "python-urwid")
4691 (version "2.0.1")
4692 (source
4693 (origin
4694 (method url-fetch)
4695 (uri (pypi-uri "urwid" version))
4696 (sha256
4697 (base32
4698 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
4699 (build-system python-build-system)
4700 (home-page "http://urwid.org")
4701 (synopsis "Console user interface library for Python")
4702 (description
4703 "Urwid is a curses-based UI/widget library for Python. It includes many
4704features useful for text console applications.")
4705 (license license:lgpl2.1+)))
4706
4707(define-public python2-urwid
4708 (package-with-python2 python-urwid))
4709
4710(define-public python-urwidtrees
4711 (package
4712 (name "python-urwidtrees")
4713 (version "1.0.2")
4714 (source
4715 (origin
4716 (method url-fetch)
4717 ;; package author intends on distributing via github rather than pypi:
4718 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
4719 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
4720 version ".tar.gz"))
4721 (file-name (string-append name "-" version ".tar.gz"))
4722 (sha256
4723 (base32
4724 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
4725 (build-system python-build-system)
4726 (arguments
4727 '(#:tests? #f)) ; no tests
4728 (propagated-inputs `(("python-urwid" ,python-urwid)))
4729 (home-page "https://github.com/pazz/urwidtrees")
4730 (synopsis "Tree widgets for urwid")
4731 (description "Urwidtrees is a Widget Container API for the @code{urwid}
4732toolkit. Use it to build trees of widgets.")
4733 (license license:gpl3+)))
4734
4735(define-public python2-urwidtrees
4736 (package-with-python2 python-urwidtrees))
4737
4738(define-public python-ua-parser
4739 (package
4740 (name "python-ua-parser")
4741 (version "0.8.0")
4742 (source
4743 (origin
4744 (method url-fetch)
4745 (uri (pypi-uri "ua-parser" version))
4746 (sha256
4747 (base32
4748 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
4749 (build-system python-build-system)
4750 (arguments
4751 `(#:tests? #f)) ;no test suite in release
4752 (native-inputs
4753 `(("python-pyyaml" ,python-pyyaml)))
4754 (home-page "https://github.com/ua-parser/uap-python")
4755 (synopsis "User agent parser")
4756 (description
4757 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
4758 (license license:asl2.0)))
4759
4760(define-public python2-ua-parser
4761 (package-with-python2 python-ua-parser))
4762
4763(define-public python-user-agents
4764 (package
4765 (name "python-user-agents")
4766 (version "1.1.0")
4767 (source
4768 (origin
4769 (method url-fetch)
4770 (uri (pypi-uri "user-agents" version))
4771 (sha256
4772 (base32
4773 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
4774 (build-system python-build-system)
4775 (arguments
4776 `(#:tests? #f)) ;missing devices.json test file in release
4777 (propagated-inputs
4778 `(("python-ua-parser" ,python-ua-parser)))
4779 (home-page "https://github.com/selwin/python-user-agents")
4780 (synopsis "User Agent strings parsing library")
4781 (description
4782 "A library to identify devices (phones, tablets) and their capabilities by
4783parsing (browser/HTTP) user agent strings.")
4784 (license license:expat)))
4785
4786(define-public python2-user-agents
4787 (package-with-python2 python-user-agents))
4788
4789(define-public python-dbus
4790 (package
4791 (name "python-dbus")
4792 (version "1.2.8")
4793 (source
4794 (origin
4795 (method url-fetch)
4796 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
4797 "dbus-python-" version ".tar.gz"))
4798 (sha256
4799 (base32
4800 "0vvvjmiwnc9cjlks3gcdk43ap7llhlpz7cm1wbw0nc2yfsxjpwdb"))))
4801 (build-system gnu-build-system)
4802 (arguments
4803 '(#:phases
4804 (modify-phases %standard-phases
4805 (add-before
4806 'check 'pre-check
4807 (lambda _
4808 ;; XXX: For the missing '/etc/machine-id'.
4809 (substitute* "test/run-test.sh"
4810 (("DBUS_FATAL_WARNINGS=1")
4811 "DBUS_FATAL_WARNINGS=0"))
4812 #t)))))
4813 (native-inputs
4814 `(("pkg-config" ,pkg-config)))
4815 (inputs
4816 `(("python" ,python-wrapper)
4817 ("dbus-glib" ,dbus-glib)))
4818 (synopsis "Python bindings for D-bus")
4819 (description "python-dbus provides bindings for libdbus, the reference
4820implementation of D-Bus.")
4821 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
4822 (license license:expat)))
4823
4824(define-public python2-dbus
4825 (package (inherit python-dbus)
4826 (name "python2-dbus")
4827 (inputs `(("python" ,python-2)
4828 ,@(alist-delete "python"
4829 (package-inputs python-dbus)
4830 equal?)))
4831 ;; FIXME: on Python 2, the test_utf8 fails with:
4832 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
4833 (arguments `(#:tests? #f))))
4834
4835(define-public python-lxml
4836 (package
4837 (name "python-lxml")
4838 (version "4.2.5")
4839 (source
4840 (origin
4841 (method url-fetch)
4842 (uri (pypi-uri "lxml" version))
4843 (sha256
4844 (base32
4845 "0zw0y9hs0nflxhl9cs6ipwwh53szi3w2x06wl0k9cylyqac0cwin"))))
4846 (build-system python-build-system)
4847 (inputs
4848 `(("libxml2" ,libxml2)
4849 ("libxslt" ,libxslt)))
4850 (home-page "http://lxml.de/")
4851 (synopsis
4852 "Python XML processing library")
4853 (description
4854 "The lxml XML toolkit is a Pythonic binding for the C libraries
4855libxml2 and libxslt.")
4856 (license license:bsd-3))) ; and a few more, see LICENSES.txt
4857
4858(define-public python2-lxml
4859 (package-with-python2 python-lxml))
4860
4861;; beautifulsoup4 has a totally different namespace than 3.x,
4862;; and pypi seems to put it under its own name, so I guess we should too
4863(define-public python-beautifulsoup4
4864 (package
4865 (name "python-beautifulsoup4")
4866 (version "4.6.3")
4867 (source
4868 (origin
4869 (method url-fetch)
4870 (uri (pypi-uri "beautifulsoup4" version))
4871 (sha256
4872 (base32
4873 "041dhalzjciw6qyzzq7a2k4h1yvyk76xigp35hv5ibnn448ydy4h"))))
4874 (build-system python-build-system)
4875 (arguments
4876 `(#:phases
4877 (modify-phases %standard-phases
4878 ;; The Python 2 source is the definitive source of beautifulsoup4. We
4879 ;; must use this conversion script when building with Python 3. The
4880 ;; conversion script also runs the tests.
4881 ;; For more information, see the file 'convert-py3k' in the source
4882 ;; distribution.
4883 (replace 'check
dff0197e 4884 (lambda _ (invoke "./convert-py3k"))))))
44d10b1f
RW
4885 (home-page
4886 "https://www.crummy.com/software/BeautifulSoup/bs4/")
4887 (synopsis
4888 "Python screen-scraping library")
4889 (description
4890 "Beautiful Soup is a Python library designed for rapidly setting up
4891screen-scraping projects. It offers Pythonic idioms for navigating,
4892searching, and modifying a parse tree, providing a toolkit for
4893dissecting a document and extracting what you need. It automatically
4894converts incoming documents to Unicode and outgoing documents to UTF-8.")
4895 (license license:expat)
4896 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
4897
4898(define-public python2-beautifulsoup4
4899 (package
4900 (inherit (package-with-python2
4901 (strip-python2-variant python-beautifulsoup4)))
4902 (arguments `(#:python ,python-2))))
4903
4904(define-public python-netifaces
4905 (package
4906 (name "python-netifaces")
4907 (version "0.10.7")
4908 (source
4909 (origin
4910 (method url-fetch)
4911 (uri (pypi-uri "netifaces" version))
4912 (sha256
4913 (base32
4914 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
4915 (build-system python-build-system)
4916 (home-page "https://github.com/al45tair/netifaces")
4917 (synopsis
4918 "Python module for portable network interface information")
4919 (description
4920 "Netifaces is a Python module providing information on network
4921interfaces in an easy and portable manner.")
4922 (license license:expat)))
4923
4924(define-public python2-netifaces
4925 (package-with-python2 python-netifaces))
4926
4927(define-public python-networkx
4928 (package
4929 (name "python-networkx")
4930 (version "2.2")
4931 (source
4932 (origin
4933 (method url-fetch)
4934 (uri (pypi-uri "networkx" version ".zip"))
4935 (sha256
4936 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
4937 (build-system python-build-system)
4938 ;; python-decorator is needed at runtime.
4939 (propagated-inputs
4940 `(("python-decorator" ,python-decorator)))
4941 (native-inputs
4942 `(("python-nose" ,python-nose)
4943 ("unzip" ,unzip)))
4944 (home-page "https://networkx.github.io/")
4945 (synopsis "Python module for creating and manipulating graphs and networks")
4946 (description
4947 "NetworkX is a Python package for the creation, manipulation, and study
4948of the structure, dynamics, and functions of complex networks.")
4949 (license license:bsd-3)))
4950
4951(define-public python2-networkx
4952 (package-with-python2 python-networkx))
4953
4954(define-public python-datrie
4955 (package
4956 (name "python-datrie")
4957 (version "0.7.1")
4958 (source
4959 (origin
4960 (method url-fetch)
4961 (uri (pypi-uri "datrie" version))
4962 (sha256
4963 (base32
4964 "08r0if7dry2q7p34gf7ffyrlnf4bdvnprxgydlfxgfnvq8f3f4bs"))))
4965 (build-system python-build-system)
4966 (arguments
4967 `(#:phases (modify-phases %standard-phases
4968 (add-before 'build 'cythonize
4969 (lambda _
4970 ;; Regenerate Cython classes to solve ABI issues with Python
4971 ;; 3.7.0. See <https://github.com/pytries/datrie/issues/52>.
4972 (invoke "cython" "src/datrie.pyx" "src/cdatrie.pxd"
4973 "src/stdio_ext.pxd" "-a"))))))
4974 (native-inputs
4975 `(("python-cython" ,python-cython)
4976 ("python-hypothesis" ,python-hypothesis)
4977 ("python-pytest" ,python-pytest)
4978 ("python-pytest-runner" ,python-pytest-runner)))
4979 (home-page "https://github.com/kmike/datrie")
4980 (synopsis "Fast, efficiently stored trie for Python")
4981 (description
4982 "This package provides a fast, efficiently stored trie implementation for
4983Python.")
4984 (license license:lgpl2.1+)))
4985
4986(define-public snakemake
4987 (package
4988 (name "snakemake")
4989 (version "5.2.4")
4990 (source
4991 (origin
4992 (method url-fetch)
4993 (uri (pypi-uri "snakemake" version))
4994 (sha256
4995 (base32 "0gj0xxgiq3mp9qyyrbfzldiaq1giliqw0in64nqiz7vx49myqj7z"))))
4996 (build-system python-build-system)
4997 (arguments
4998 ;; TODO: Package missing test dependencies.
4999 '(#:tests? #f
5000 #:phases
5001 (modify-phases %standard-phases
5002 ;; For cluster execution Snakemake will call Python. Since there is
5003 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
5004 ;; this by calling the snakemake wrapper instead.
5005 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
5006 (lambda* (#:key outputs #:allow-other-keys)
5007 (substitute* "snakemake/executors.py"
5008 (("\\{sys.executable\\} -m snakemake")
5009 (string-append (assoc-ref outputs "out")
5010 "/bin/snakemake")))
5011 #t)))))
5012 (propagated-inputs
5013 `(("python-gitpython" ,python-gitpython)
5014 ("python-wrapt" ,python-wrapt)
5015 ("python-requests" ,python-requests)
5016 ("python-appdirs" ,python-appdirs)
5017 ("python-configargparse" ,python-configargparse)
5018 ("python-datrie" ,python-datrie)
5019 ("python-docutils" ,python-docutils)
5020 ("python-jinja2" ,python-jinja2)
5021 ("python-jsonschema" ,python-jsonschema)
5022 ("python-networkx" ,python-networkx)
5023 ("python-pyyaml" ,python-pyyaml)
5024 ("python-ratelimiter" ,python-ratelimiter)))
5025 (home-page "https://snakemake.readthedocs.io")
5026 (synopsis "Python-based execution environment for make-like workflows")
5027 (description
5028 "Snakemake aims to reduce the complexity of creating workflows by
5029providing a clean and modern domain specific specification language (DSL) in
5030Python style, together with a fast and comfortable execution environment.")
5031 (license license:expat)))
5032
5033;; This is currently needed for the pigx-* packages.
5034(define-public snakemake-4
5035 (package (inherit snakemake)
5036 (version "4.4.0")
5037 (source
5038 (origin
5039 (method url-fetch)
5040 (uri (pypi-uri "snakemake" version))
5041 (sha256
5042 (base32 "0g0paia4z7w3srnqdmavq3hrb2x7qnpf81jx50njl0p7y4y0j8jv"))))
5043 (propagated-inputs
5044 `(("python-wrapt" ,python-wrapt)
5045 ("python-requests" ,python-requests)
5046 ("python-appdirs" ,python-appdirs)
5047 ("python-configargparse" ,python-configargparse)
5048 ("python-pyyaml" ,python-pyyaml)
5049 ("python-ratelimiter" ,python-ratelimiter)))))
5050
5051(define-public python-pyqrcode
5052 (package
5053 (name "python-pyqrcode")
5054 (version "1.2.1")
5055 (source
5056 (origin
5057 (method url-fetch)
5058 (uri (pypi-uri "PyQRCode" version))
5059 (sha256
5060 (base32
5061 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
5062 (build-system python-build-system)
5063 (home-page
5064 "https://github.com/mnooner256/pyqrcode")
5065 (synopsis "QR code generator")
5066 (description
5067 "Pyqrcode is a QR code generator written purely in Python with
5068SVG, EPS, PNG and terminal output.")
5069 (license license:bsd-3)))
5070
5071(define-public python-seaborn
5072 (package
5073 (name "python-seaborn")
5074 (version "0.9.0")
5075 (source
5076 (origin
5077 (method url-fetch)
5078 (uri (pypi-uri "seaborn" version))
5079 (sha256
5080 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))))
5081 (build-system python-build-system)
5082 (arguments
5083 `(#:phases
5084 (modify-phases %standard-phases
5085 (add-before 'check 'start-xserver
5086 (lambda* (#:key inputs #:allow-other-keys)
5087 (let ((xorg-server (assoc-ref inputs "xorg-server")))
5088 ;; There must be a running X server and make check doesn't
5089 ;; start one. Therefore we must do it.
5090 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
5091 (setenv "DISPLAY" ":1")
5092 #t)))
5093 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
5094 (propagated-inputs
5095 `(("python-pandas" ,python-pandas)
5096 ("python-matplotlib" ,python-matplotlib)
5097 ("python-numpy" ,python-numpy)
5098 ("python-scipy" ,python-scipy)))
5099 (native-inputs
5100 `(("python-pytest" ,python-pytest)
5101 ("xorg-server" ,xorg-server)))
5102 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5103 (synopsis "Statistical data visualization")
5104 (description
5105 "Seaborn is a library for making attractive and informative statistical
5106graphics in Python. It is built on top of matplotlib and tightly integrated
5107with the PyData stack, including support for numpy and pandas data structures
5108and statistical routines from scipy and statsmodels.")
5109 (license license:bsd-3)))
5110
5111(define-public python2-seaborn
5112 (package-with-python2 python-seaborn))
5113
5114(define-public python-mpmath
5115 (package
5116 (name "python-mpmath")
5117 (version "0.19")
5118 (source (origin
5119 (method url-fetch)
5120 (uri (string-append "http://mpmath.org/files/mpmath-"
5121 version ".tar.gz"))
5122 (sha256
5123 (base32
5124 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
5125 (build-system python-build-system)
5126 (arguments
5127 '(#:phases
5128 (modify-phases %standard-phases
5129 (replace 'check
5130 (lambda _
5d7a6f1c 5131 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
44d10b1f
RW
5132 (home-page "http://mpmath.org")
5133 (synopsis "Arbitrary-precision floating-point arithmetic in python")
5134 (description
5135 "@code{mpmath} can be used as an arbitrary-precision substitute for
5136Python's float/complex types and math/cmath modules, but also does much
5137more advanced mathematics.")
5138 (license license:bsd-3)))
5139
5140(define-public python2-mpmath
5141 (package-with-python2 python-mpmath))
5142
5143(define-public python-bigfloat
5144 (package
5145 (name "python-bigfloat")
5146 (version "0.3.0")
5147 (source
5148 (origin
5149 (method url-fetch)
5150 (uri (pypi-uri "bigfloat" version))
5151 (sha256
5152 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
5153 (build-system python-build-system)
5154 (inputs
5155 `(("mpfr" ,mpfr)))
5156 (home-page "https://github.com/mdickinson/bigfloat")
5157 (synopsis "Arbitrary precision floating-point arithmetic for Python")
5158 (description
5159 "This packages provides a Python interface to the MPFR library for
5160multiprecision arithmetic.")
5161 (license license:lgpl3+)))
5162
5163(define-public python2-bigfloat
5164 (package-with-python2 python-bigfloat))
5165
5166(define-public python-sympy
5167 (package
5168 (name "python-sympy")
5169 (version "1.1.1")
5170 (source
5171 (origin
5172 (method url-fetch)
5173 (uri (string-append
5174 "https://github.com/sympy/sympy/releases/download/sympy-"
5175 version "/sympy-" version ".tar.gz"))
5176 (sha256
5177 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
5178 (build-system python-build-system)
5179 (arguments
5180 `(#:phases
5181 (modify-phases %standard-phases
5182 ;; Run the core tests after installation. By default it would run
5183 ;; *all* tests, which take a very long time to complete and are known
5184 ;; to be flaky.
5185 (delete 'check)
5186 (add-after 'install 'check
5187 (lambda* (#:key outputs #:allow-other-keys)
5188 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
5189 #t)))))
5190 (propagated-inputs
5191 `(("python-mpmath" ,python-mpmath)))
5192 (home-page "http://www.sympy.org/")
5193 (synopsis "Python library for symbolic mathematics")
5194 (description
5195 "SymPy is a Python library for symbolic mathematics. It aims to become a
5196full-featured computer algebra system (CAS) while keeping the code as simple
5197as possible in order to be comprehensible and easily extensible.")
5198 (license license:bsd-3)))
5199
5200(define-public python2-sympy
5201 (package
5202 (inherit (package-with-python2 python-sympy))
5203 (arguments
5204 `(#:phases
5205 (modify-phases %standard-phases
5206 ;; Run the core tests after installation. By default it would run
5207 ;; *all* tests, which take a very long time to complete and are known
5208 ;; to be flaky.
5209 (delete 'check)
5210 (add-after 'install 'check
5211 (lambda* (#:key outputs #:allow-other-keys)
5212 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
5213 #t)))))))
5214
5215(define-public python-q
5216 (package
5217 (name "python-q")
5218 (version "2.6")
5219 (source
5220 (origin
5221 (method url-fetch)
5222 (uri (pypi-uri "q" version))
5223 (sha256
5224 (base32
5225 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
5226 (build-system python-build-system)
5227 (home-page "https://github.com/zestyping/q")
5228 (synopsis "Quick-and-dirty debugging output for tired programmers")
5229 (description
5230 "q is a Python module for \"print\" style of debugging Python code. It
5231provides convenient short API for print out of values, tracebacks, and
5232falling into the Python interpreter.")
5233 (license license:asl2.0)))
5234
5235(define-public python2-q
5236 (package-with-python2 python-q))
5237
5238(define-public python2-xlib
5239 (package
5240 (name "python2-xlib")
5241 (version "0.14")
5242 (source (origin
5243 (method url-fetch)
5244 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
5245 "/" version "/"
5246 "python-xlib-" version ".tar.gz"))
5247 (sha256
5248 (base32
5249 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
5250 (build-system python-build-system)
5251 (arguments
5252 `(#:python ,python-2 ;Python 2 only
5253 #:tests? #f)) ;no tests
5254 (home-page "http://python-xlib.sourceforge.net/")
5255 (synopsis "Python X11 client library")
5256 (description
5257 "The Python X Library is intended to be a fully functional X client
5258library for Python programs. It is useful to implement low-level X clients.
5259It is written entirely in Python.")
5260 (license license:gpl2+)))
5261
5262(define-public python-singledispatch
5263 (package
5264 (name "python-singledispatch")
5265 (version "3.4.0.3")
5266 (source
5267 (origin
5268 (method url-fetch)
5269 (uri (pypi-uri "singledispatch" version))
5270 (sha256
5271 (base32
5272 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
5273 (build-system python-build-system)
5274 (native-inputs
5275 `(("python-six" ,python-six))) ; required for conversion, not at run-time
5276 (home-page
5277 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
5278 (synopsis "Backport of singledispatch feature from Python 3.4")
5279 (description
5280 "This library brings functools.singledispatch from Python 3.4 to Python
52812.6-3.3.")
5282 (license license:expat)))
5283
5284(define-public python2-singledispatch
5285 (package-with-python2 python-singledispatch))
5286
5287;; the python- version can be removed with python-3.5
5288(define-public python-backports-abc
5289 (package
5290 (name "python-backports-abc")
5291 (version "0.5")
5292 (source
5293 (origin
5294 (method url-fetch)
5295 (uri (pypi-uri "backports_abc" version))
5296 (sha256
5297 (base32
5298 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
5299 (build-system python-build-system)
5300 (home-page "https://github.com/cython/backports_abc")
5301 (synopsis "Backport of additions to the 'collections.abc' module")
5302 (description
5303 "Python-backports-abc provides a backport of additions to the
5304'collections.abc' module in Python-3.5.")
5305 (license license:psfl)))
5306
5307(define-public python2-backports-abc
5308 (package-with-python2 python-backports-abc))
5309
5310(define-public python-backports-csv
5311 (package
5312 (name "python-backports-csv")
5313 (version "1.0.5")
5314 (source
5315 (origin
5316 (method url-fetch)
5317 (uri (pypi-uri "backports.csv" version))
5318 (sha256
5319 (base32
5320 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
5321 (build-system python-build-system)
5322 (home-page "https://github.com/ryanhiebert/backports.csv")
5323 (synopsis "Backport of Python 3's csv module for Python 2")
5324 (description
5325 "Provides a backport of Python 3's @code{csv} module for parsing
5326comma separated values. The API of the @code{csv} module in Python 2
5327is drastically different from the @code{csv} module in Python 3.
5328This is due, for the most part, to the difference between str in
5329Python 2 and Python 3.")
5330 (license license:psfl)))
5331
5332(define-public python2-backports-csv
5333 (package-with-python2 python-backports-csv))
5334
5335(define-public python2-backports-shutil-get-terminal-size
5336 (package
5337 (name "python2-backports-shutil-get-terminal-size")
5338 (version "1.0.0")
5339 (source
5340 (origin
5341 (method url-fetch)
5342 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
5343 (sha256
5344 (base32
5345 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
5346 (build-system python-build-system)
5347 (arguments
5348 `(#:python ,python-2
5349 #:phases
5350 (modify-phases %standard-phases
5351 (replace 'check
5352 (lambda _
4a4a7d9a 5353 (invoke "py.test" "-v"))))))
44d10b1f
RW
5354 (native-inputs
5355 `(("python2-pytest" ,python2-pytest)))
5356 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
5357 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
5358 (description
5359 "This package provides a backport of the @code{get_terminal_size
5360function} from Python 3.3's @code{shutil}.
5361Unlike the original version it is written in pure Python rather than C,
5362so it might be a tiny bit slower.")
5363 (license license:expat)))
5364
5365(define-public python-waf
5366 (package
5367 (name "python-waf")
5368 (version "2.0.11")
5369 (source (origin
5370 (method url-fetch)
5371 (uri (string-append "https://waf.io/"
5372 "waf-" version ".tar.bz2"))
5373 (sha256
5374 (base32
5375 "13zrniwkmfqgsgzi9v5m1367fppp9yzrz6z2ny6hy8dmpb8mj4z4"))))
5376 (build-system python-build-system)
5377 (arguments
5378 '(#:phases
5379 (modify-phases %standard-phases
5380 (replace 'build
5381 (lambda _
5382 (invoke "python" "waf-light" "configure" "build")))
5383 (replace 'check
5384 (lambda _
5385 (invoke "python" "waf" "--version")))
5386 (replace 'install
5387 (lambda* (#:key outputs #:allow-other-keys)
5388 (let ((out (assoc-ref outputs "out")))
5389 (install-file "waf" (string-append out "/bin")))
5390 #t))
5391 ;; waf breaks when it is wrapped.
5392 (delete 'wrap))))
5393 (home-page "https://waf.io/")
5394 (synopsis "Python-based build system")
5395 (description
5396 "Waf is a Python-based framework for configuring, compiling and installing
5397applications.")
5398 (license license:bsd-3)))
5399
5400(define-public python2-waf
5401 (package-with-python2 python-waf))
5402
5403(define-public python-pyzmq
5404 (package
5405 (name "python-pyzmq")
5406 (version "17.1.2")
5407 (source
5408 (origin
5409 (method url-fetch)
5410 (uri (pypi-uri "pyzmq" version))
5411 (sha256
5412 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
5413 (build-system python-build-system)
5414 (arguments
5415 `(#:configure-flags
5416 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
5417 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
5418 ;; --inplace' for 'python setup.py test' to work.
5419 #:tests? #f))
5420 (inputs
5421 `(("zeromq" ,zeromq)))
5422 (native-inputs
5423 `(("pkg-config" ,pkg-config)
5424 ("python-nose" ,python-nose)))
5425 (home-page "https://github.com/zeromq/pyzmq")
5426 (synopsis "Python bindings for 0MQ")
5427 (description
5428 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
5429 (license license:bsd-4)))
5430
5431(define-public python2-pyzmq
5432 (package-with-python2 python-pyzmq))
5433
5434(define-public python-pep8
5435 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
5436 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
5437 ;; some dependents' test suites, and nothing more.
5438 (package
5439 (name "python-pep8")
5440 (version "1.7.0")
5441 (source
5442 (origin
5443 (method url-fetch)
5444 (uri (pypi-uri "pep8" version))
5445 (sha256
5446 (base32
5447 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
5448 (build-system python-build-system)
5449 (home-page "https://pep8.readthedocs.org/")
5450 (synopsis "Python style guide checker")
5451 (description
5452 "This tools checks Python code against some of the style conventions in
5453PEP 8.")
5454 (license license:expat)))
5455
5456(define-public python2-pep8
5457 (package-with-python2 python-pep8))
5458
5459(define-public python-pyflakes
5460 (package
5461 (name "python-pyflakes")
5462 (version "2.0.0")
5463 (source
5464 (origin
5465 (method url-fetch)
5466 (uri (pypi-uri "pyflakes" version))
5467 (sha256
5468 (base32
5469 "0jba28czyvimdc72llms3f17swp3i8jdcabf5w0j00adfbn64xls"))))
5470 (build-system python-build-system)
5471 (home-page
5472 "https://github.com/pyflakes/pyflakes")
5473 (synopsis "Passive checker of Python programs")
5474 (description
5475 "Pyflakes statically checks Python source code for common errors.")
5476 (license license:expat)))
5477
5478(define-public python2-pyflakes
5479 (package-with-python2 python-pyflakes))
5480
5481(define-public python-mccabe
5482 (package
5483 (name "python-mccabe")
5484 (version "0.6.1")
5485 (source
5486 (origin
5487 (method url-fetch)
5488 (uri (pypi-uri "mccabe" version))
5489 (sha256
5490 (base32
5491 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
5492 (build-system python-build-system)
5493 (native-inputs
5494 `(("python-pytest" ,python-pytest-bootstrap)
5495 ("python-pytest-runner" ,python-pytest-runner)))
5496 (home-page "https://github.com/flintwork/mccabe")
5497 (synopsis "McCabe checker, plugin for flake8")
5498 (description
5499 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
5500complexity of Python source code.")
5501 (license license:expat)))
5502
5503(define-public python2-mccabe
5504 (package-with-python2 python-mccabe))
5505
5506(define-public python-mccabe-0.2.1
5507 (package (inherit python-mccabe)
5508 (version "0.2.1")
5509 (source
5510 (origin
5511 (method url-fetch)
5512 (uri (pypi-uri "mccabe" version))
5513 (sha256
5514 (base32
5515 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
5516
5517(define-public python2-mccabe-0.2.1
5518 (package-with-python2 python-mccabe-0.2.1))
5519
5520;; Flake8 2.4.1 requires an older version of pep8.
5521;; This should be removed ASAP.
5522(define-public python-pep8-1.5.7
5523 (package (inherit python-pep8)
5524 (version "1.5.7")
5525 (source
f3576970
RW
5526 (origin
5527 (method url-fetch)
5528 (uri (pypi-uri "pep8" version))
5529 (sha256
5530 (base32
5531 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
44d10b1f
RW
5532 (arguments
5533 ;; XXX Tests not compatible with Python 3.5.
5534 '(#:tests? #f))))
5535
5536(define-public python2-pep8-1.5.7
5537 (package-with-python2 python-pep8-1.5.7))
5538
5539;; Flake8 2.4.1 requires an older version of pyflakes.
5540;; This should be removed ASAP.
5541(define-public python-pyflakes-0.8.1
5542 (package (inherit python-pyflakes)
5543 (version "0.8.1")
5544 (source
8c4dffb5
RW
5545 (origin
5546 (method url-fetch)
5547 (uri (pypi-uri "pyflakes" version))
5548 (sha256
5549 (base32
5550 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
44d10b1f
RW
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)
337c3a1e 6132 (uri (pypi-uri "prettytable" version ".tar.bz2"))
44d10b1f
RW
6133 (sha256
6134 (base32
6135 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
6136 (build-system python-build-system)
6137 (home-page "http://code.google.com/p/prettytable/")
6138 (synopsis "Display tabular data in an ASCII table format")
6139 (description
6140 "A library designed to represent tabular data in visually appealing ASCII
6141tables. PrettyTable allows for selection of which columns are to be printed,
6142independent alignment of columns (left or right justified or centred) and
6143printing of sub-tables by specifying a row range.")
6144 (license license:bsd-3)))
6145
6146(define-public python2-prettytable
6147 (package-with-python2 python-prettytable))
6148
6149(define-public python-tables
6150 (package
6151 (name "python-tables")
6152 (version "3.4.4")
6153 (source
6154 (origin
6155 (method url-fetch)
6156 (uri (pypi-uri "tables" version))
6157 (sha256
6158 (base32
6159 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
6160 (modules '((guix build utils)))
6161 (snippet
6162 '(begin
6163 ;; Remove pre-compiled .pyc files from source.
6164 (for-each delete-file-recursively
6165 (find-files "." "__pycache__" #:directories? #t))
6166 (for-each delete-file (find-files "." "\\.pyc$"))
6167 #t))))
6168 (build-system python-build-system)
6169 (arguments
6170 `(;; FIXME: python-build-system does not pass configure-flags to "build"
6171 ;; or "check", so we must override the build and check phases.
6172 #:phases
6173 (modify-phases %standard-phases
6174 (add-after 'unpack 'use-gcc
6175 (lambda _
6176 (substitute* "setup.py"
6177 (("compiler = new_compiler\\(\\)" line)
6178 (string-append line
6179 "\ncompiler.set_executables(compiler='gcc',"
6180 "compiler_so='gcc',"
6181 "linker_exe='gcc',"
6182 "linker_so='gcc -shared')")))
6183 #t))
6184 (replace 'build
6185 (lambda* (#:key inputs #:allow-other-keys)
35d79d61
RW
6186 (invoke "python" "setup.py" "build"
6187 (string-append "--hdf5="
6188 (assoc-ref inputs "hdf5")))))
44d10b1f
RW
6189 (replace 'check
6190 (lambda* (#:key inputs #:allow-other-keys)
35d79d61
RW
6191 (invoke "python" "setup.py" "check"
6192 (string-append "--hdf5="
6193 (assoc-ref inputs "hdf5"))))))))
44d10b1f
RW
6194 (propagated-inputs
6195 `(("python-numexpr" ,python-numexpr)
6196 ("python-numpy" ,python-numpy)))
6197 (native-inputs
6198 `(("python-cython" ,python-cython)
6199 ("pkg-config" ,pkg-config)))
6200 (inputs
6201 `(("hdf5" ,hdf5)
6202 ("bzip2" ,bzip2)
6203 ("zlib" ,zlib)))
6204 (home-page "http://www.pytables.org/")
6205 (synopsis "Hierarchical datasets for Python")
6206 (description "PyTables is a package for managing hierarchical datasets and
6207designed to efficiently cope with extremely large amounts of data.")
6208 (license license:bsd-3)))
6209
6210(define-public python2-tables
6211 (package-with-python2 python-tables))
6212
6213(define-public python-pyasn1
6214 (package
6215 (name "python-pyasn1")
6216 (version "0.4.3")
6217 (source
6218 (origin
6219 (method url-fetch)
6220 (uri (pypi-uri "pyasn1" version))
6221 (sha256
6222 (base32
6223 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
6224 (build-system python-build-system)
6225 (home-page "http://pyasn1.sourceforge.net/")
6226 (synopsis "ASN.1 types and codecs")
6227 (description
6228 "This is an implementation of ASN.1 types and codecs in Python. It is
6229suitable for a wide range of protocols based on the ASN.1 specification.")
6230 (license license:bsd-2)))
6231
6232(define-public python2-pyasn1
6233 (package-with-python2 python-pyasn1))
6234
6235(define-public python-pyasn1-modules
6236 (package
6237 (name "python-pyasn1-modules")
6238 (version "0.2.2")
6239 (source
6240 (origin
6241 (method url-fetch)
6242 (uri (pypi-uri "pyasn1-modules" version))
6243 (sha256
6244 (base32
6245 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
6246 (build-system python-build-system)
6247 (propagated-inputs
6248 `(("python-pyasn1" ,python-pyasn1)))
6249 (home-page "https://sourceforge.net/projects/pyasn1/")
6250 (synopsis "ASN.1 codec implementations")
6251 (description
6252 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
6253implementations of ASN.1-based codecs and protocols.")
6254 (license license:bsd-3)))
6255
6256(define-public python2-pyasn1-modules
6257 (package-with-python2 python-pyasn1-modules))
6258
6259(define-public python-ipaddress
6260 (package
6261 (name "python-ipaddress")
6262 (version "1.0.22")
6263 (source (origin
6264 (method url-fetch)
6265 (uri (pypi-uri "ipaddress" version))
6266 (sha256
6267 (base32
6268 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
6269 (build-system python-build-system)
6270 (home-page "https://github.com/phihag/ipaddress")
6271 (synopsis "IP address manipulation library")
6272 (description
6273 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
6274 in Python. This library is used to create, poke at, and manipulate IPv4 and
6275 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
6276 module to older versions of Python.")
6277 (license license:psfl)))
6278
6279(define-public python2-ipaddress
6280 (package-with-python2 python-ipaddress))
6281
6282(define-public python2-ipaddr
6283 (package
6284 (name "python2-ipaddr")
6285 (version "2.1.11")
6286 (source
6287 (origin
6288 (method url-fetch)
6289 (uri (pypi-uri "ipaddr" version))
6290 (sha256
6291 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
6292 (build-system python-build-system)
6293 (arguments
6294 `(#:python ,python-2 ;version 2 only
6295 #:phases
6296 (modify-phases %standard-phases
6297 (replace 'check
40b8c4e3 6298 (lambda _ (invoke "python" "ipaddr_test.py"))))))
44d10b1f
RW
6299 (home-page "https://github.com/google/ipaddr-py")
6300 (synopsis "IP address manipulation library")
6301 (description
6302 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
6303IPv6 addresses and networks.
6304
6305For new implementations you may prefer to use the standard module
6306@code{ipaddress}, which was introduced in Python 3.3 and backported to older
6307versions of Python.")
6308 (license license:asl2.0)))
6309
6310(define-public python-idna
6311 (package
6312 (name "python-idna")
6313 (version "2.7")
6314 (source
6315 (origin
6316 (method url-fetch)
6317 (uri (pypi-uri "idna" version))
6318 (sha256
6319 (base32
6320 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))
6321 (build-system python-build-system)
6322 (home-page "https://github.com/kjd/idna")
6323 (synopsis "Internationalized domain names in applications")
6324 (description
6325 "This is a library to support the Internationalised Domain Names in
6326Applications (IDNA) protocol as specified in RFC 5891. This version of the
6327protocol is often referred to as “IDNA2008” and can produce different results
6328from the earlier standard from 2003. The library is also intended to act as a
6329suitable drop-in replacement for the “encodings.idna” module that comes with
6330the Python standard library but currently only supports the older 2003
6331specification.")
6332 (license license:bsd-4)))
6333
6334(define-public python2-idna
6335 (package-with-python2 python-idna))
6336
6337(define-public python-idna-ssl
6338 (package
6339 (name "python-idna-ssl")
6340 (version "1.0.1")
6341 (source
6342 (origin
6343 (method url-fetch)
6344 (uri (pypi-uri "idna-ssl" version))
6345 (sha256
6346 (base32
6347 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
6348 (build-system python-build-system)
6349 (arguments
6350 `(#:tests? #f)) ;circular dependency with python-aiohttp
6351 (home-page "https://github.com/aio-libs/idna-ssl")
6352 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
6353 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
6354domains support.")
6355 (license license:expat)))
6356
6357(define-public python-pretend
6358 (package
6359 (name "python-pretend")
6360 (version "1.0.9")
6361 (source
6362 (origin
6363 (method url-fetch)
9f1f22ee 6364 (uri (pypi-uri "pretend" version))
44d10b1f
RW
6365 (sha256
6366 (base32
6367 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
6368 (build-system python-build-system)
6369 (home-page "https://github.com/alex/pretend")
6370 (synopsis "Library for stubbing in Python")
6371 (description
6372 "Pretend is a library to make stubbing with Python easier. Stubbing is a
6373technique for writing tests. You may hear the term mixed up with mocks,
6374fakes, or doubles. Basically, a stub is an object that returns pre-canned
6375responses, rather than doing any computation.")
6376 (license license:bsd-3)))
6377
6378(define-public python2-pretend
6379 (package-with-python2 python-pretend))
6380
6381(define-public python-pip
6382 (package
6383 (name "python-pip")
6384 (version "18.1")
6385 (source
6386 (origin
6387 (method url-fetch)
6388 (uri (pypi-uri "pip" version))
6389 (sha256
6390 (base32
6391 "188fclay154s520n43s7cxxlhdaiysvxf19zk8vr1xbyjyyr58n0"))))
6392 (build-system python-build-system)
6393 (arguments
6394 '(#:tests? #f)) ; there are no tests in the pypi archive.
6395 (home-page "https://pip.pypa.io/")
6396 (synopsis "Package manager for Python software")
6397 (description
6398 "Pip is a package manager for Python software, that finds packages on the
6399Python Package Index (PyPI).")
6400 (license license:expat)))
6401
6402(define-public python2-pip
6403 (package-with-python2 python-pip))
6404
6405(define-public python-tlsh
6406 (package
6407 (name "python-tlsh")
6408 (version "3.4.5")
6409 (home-page "https://github.com/trendmicro/tlsh")
6410 (source (origin
6411 (method url-fetch)
6412 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
6413 version ".tar.gz"))
6414 (sha256
6415 (base32
6416 "1x1vahd4zg5kpyr9h9hs3fvh460p25rjy4cclwdnbbw8x3vc30q3"))
6417 (file-name (string-append name "-" version ".tar.gz"))))
6418 (build-system cmake-build-system)
6419 (arguments
6420 '(#:out-of-source? #f
6421 #:phases (modify-phases %standard-phases
6422 (replace
6423 'install
6424 (lambda* (#:key outputs #:allow-other-keys)
6425 ;; Build and install the Python bindings. The underlying
6426 ;; C++ library is apparently not meant to be installed.
6427 (let ((out (assoc-ref outputs "out")))
6428 (with-directory-excursion "py_ext"
6429 (and (system* "python" "setup.py" "build")
6430 (system* "python" "setup.py" "install"
6431 (string-append "--prefix=" out))))))))))
6432 (inputs `(("python" ,python-wrapper))) ;for the bindings
6433 (synopsis "Fuzzy matching library for Python")
6434 (description
6435 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
6436Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
6437value which can be used for similarity comparisons. Similar objects have
6438similar hash values, which allows for the detection of similar objects by
6439comparing their hash values. The byte stream should have a sufficient amount
6440of complexity; for example, a byte stream of identical bytes will not generate
6441a hash value.")
6442 (license license:asl2.0)))
6443
6444(define-public python2-tlsh
6445 (package
6446 (inherit python-tlsh)
6447 (name "python2-tlsh")
6448 (inputs `(("python" ,python-2)))))
6449
6450(define-public python-termcolor
6451 (package
6452 (name "python-termcolor")
6453 (version "1.1.0")
6454 (source
6455 (origin
6456 (method url-fetch)
6457 (uri (pypi-uri "termcolor" version))
6458 (sha256
6459 (base32
6460 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
6461 (build-system python-build-system)
6462 (arguments
6463 ;; There are no tests.
6464 `(#:tests? #f))
6465 (home-page "https://pypi.python.org/pypi/termcolor")
6466 (synopsis "ANSII Color formatting for terminal output")
6467 (description
6468 "This package provides ANSII Color formatting for output in terminals.")
6469 (license license:expat)))
6470
6471(define-public python2-termcolor
6472 (package-with-python2 python-termcolor))
6473
6474(define-public python-libarchive-c
6475 (package
6476 (name "python-libarchive-c")
6477 (version "2.8")
6478 (source (origin
6479 (method url-fetch)
6480 (uri (pypi-uri "libarchive-c" version))
6481 (sha256
6482 (base32
6483 "0qg0v1s9c1xdk9philhnv8k6c6nicvnvfwlc0j9srg90jmdlvm06"))))
6484 (build-system python-build-system)
6485 (arguments
6486 '(#:phases (modify-phases %standard-phases
6487 (add-before
6488 'build 'reference-libarchive
6489 (lambda* (#:key inputs #:allow-other-keys)
6490 ;; Retain the absolute file name of libarchive.so.
6491 (let ((libarchive (assoc-ref inputs "libarchive")))
6492 (substitute* "libarchive/ffi.py"
6493 (("find_library\\('archive'\\)")
6494 (string-append "'" libarchive
6495 "/lib/libarchive.so'"))))))
6496 (replace 'check
6497 (lambda _ (invoke "pytest" "-vv"))))))
6498 (native-inputs
6499 `(("python-mock" ,python-mock)
6500 ("python-pytest" ,python-pytest)))
6501 (inputs
6502 `(("libarchive" ,libarchive)))
6503 (home-page "https://github.com/Changaco/python-libarchive-c")
6504 (synopsis "Python interface to libarchive")
6505 (description
6506 "This package provides Python bindings to libarchive, a C library to
6507access possibly compressed archives in many different formats. It uses
6508Python's @code{ctypes} foreign function interface (FFI).")
6509 (license license:lgpl2.0+)))
6510
6511(define-public python2-libarchive-c
6512 (package-with-python2 python-libarchive-c))
6513
6514(define-public python-file
6515 (package
6516 (inherit file)
6517 (name "python-file")
6518 (build-system python-build-system)
6519 (arguments
6520 '(#:tests? #f ;no tests
6521 #:configure-flags '("--single-version-externally-managed" "--root=/")
6522 #:phases (modify-phases %standard-phases
6523 (add-before 'build 'change-directory
6524 (lambda _
6525 (chdir "python")
6526 #t))
6527 (add-before 'build 'set-library-file-name
6528 (lambda* (#:key inputs #:allow-other-keys)
6529 (let ((file (assoc-ref inputs "file")))
6530 (substitute* "magic.py"
6531 (("find_library\\('magic'\\)")
6532 (string-append "'" file "/lib/libmagic.so'")))
6533 #t))))))
6534 (inputs `(("file" ,file)))
6535 (self-native-input? #f)
6536 (synopsis "Python bindings to the libmagic file type guesser. Note that
6537this module and the python-magic module both provide a \"magic.py\" file;
6538these two modules, which are different and were developed separately, both
6539serve the same purpose: provide Python bindings for libmagic.")))
6540
6541(define-public python2-file
6542 (package-with-python2 python-file))
6543
6544(define-public python-debian
6545 (package
6546 (name "python-debian")
6547 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
6548 (version "0.1.28")
6549 (source
6550 (origin
6551 (method url-fetch)
6552 (uri (pypi-uri name version))
6553 (sha256
6554 (base32
6555 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
6556 (build-system python-build-system)
6557 (propagated-inputs
6558 `(("python-six" ,python-six)))
6559 (synopsis "Debian package related modules")
6560 (description
6561 ;; XXX: Use @enumerate instead of @itemize to work around
6562 ;; <http://bugs.gnu.org/21772>.
6563 "This package provides Python modules that abstract many formats of
6564Debian-related files, such as:
6565
6566@enumerate
6567@item Debtags information;
6568@item @file{debian/changelog} files;
6569@item packages files, pdiffs;
6570@item control files of single or multiple RFC822-style paragraphs---e.g.
6571 @file{debian/control}, @file{.changes}, @file{.dsc};
6572@item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
6573 contained files and meta-information.
6574@end enumerate\n")
6575
6576 ;; Modules are either GPLv2+ or GPLv3+.
6577 (license license:gpl3+)))
6578
6579(define-public python2-debian
6580 (package-with-python2 python-debian))
6581
6582(define-public python-nbformat
6583 (package
6584 (name "python-nbformat")
6585 (version "4.4.0")
6586 (source
6587 (origin
6588 (method url-fetch)
6589 (uri (pypi-uri "nbformat" version))
6590 (sha256
6591 (base32
6592 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
6593 (build-system python-build-system)
6594 (arguments `(#:tests? #f)) ; no test target
6595 (propagated-inputs
6596 `(("python-ipython-genutils" ,python-ipython-genutils)
6597 ("python-jsonschema" ,python-jsonschema)
6598 ("python-jupyter-core" ,python-jupyter-core)
6599 ("python-traitlets" ,python-traitlets)))
6600 (home-page "http://jupyter.org")
6601 (synopsis "Jupyter Notebook format")
6602 (description "This package provides the reference implementation of the
6603Jupyter Notebook format and Python APIs for working with notebooks.")
6604 (license license:bsd-3)))
6605
6606(define-public python2-nbformat
6607 (package-with-python2 python-nbformat))
6608
6609(define-public python-bleach
6610 (package
6611 (name "python-bleach")
6612 (version "1.4.3")
6613 (source
6614 (origin
6615 (method url-fetch)
6616 (uri (pypi-uri "bleach" version))
6617 (sha256
6618 (base32
6619 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
6620 (build-system python-build-system)
6621 (propagated-inputs
6622 `(("python-html5lib" ,python-html5lib-0.9)
6623 ("python-six" ,python-six)))
6624 (native-inputs
6625 `(("python-nose" ,python-nose)))
6626 (home-page "https://github.com/jsocol/bleach")
6627 (synopsis "Whitelist-based HTML-sanitizing tool")
6628 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
6629 (license license:asl2.0)))
6630
6631(define-public python2-bleach
6632 (package-with-python2 python-bleach))
6633
6634(define-public python-entrypoints
6635 (package
6636 (name "python-entrypoints")
a7f1b718 6637 (version "0.3")
44d10b1f
RW
6638 (source
6639 (origin
6640 (method url-fetch)
a7f1b718 6641 (uri (pypi-uri "entrypoints" version))
44d10b1f
RW
6642 (sha256
6643 (base32
a7f1b718 6644 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
44d10b1f
RW
6645 (build-system python-build-system)
6646 ;; The package does not come with a setup.py file, so we have to generate
6647 ;; one ourselves.
6648 (arguments
6649 `(#:tests? #f
6650 #:phases
6651 (modify-phases %standard-phases
6652 (add-after 'unpack 'create-setup.py
6653 (lambda _
6654 (call-with-output-file "setup.py"
6655 (lambda (port)
6656 (format port "\
6657from setuptools import setup
6658setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
6659" ,version))))))))
6660 (home-page "https://github.com/takluyver/entrypoints")
6661 (synopsis "Discover and load entry points from installed Python packages")
6662 (description "Entry points are a way for Python packages to advertise
6663objects with some common interface. The most common examples are
6664@code{console_scripts} entry points, which define shell commands by
6665identifying a Python function to run. The @code{entrypoints} module contains
6666functions to find and load entry points.")
6667 (license license:expat)))
6668
6669(define-public python2-entrypoints
6670 (package-with-python2 python-entrypoints))
6671
6672(define-public python-nbconvert
6673 (package
6674 (name "python-nbconvert")
6675 (version "5.0.0b1")
6676 (source
6677 (origin
6678 (method url-fetch)
6679 (uri (pypi-uri "nbconvert" version))
6680 (sha256
6681 (base32
6682 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
6683 (build-system python-build-system)
6684 (arguments
6685 `(;; The "bdist_egg" target is disabled by default, causing the installation
6686 ;; to fail.
6687 #:configure-flags (list "bdist_egg")
6688 ;; FIXME: 5 failures, 40 errors.
6689 #:tests? #f))
6690 ;; #:phases
6691 ;; (modify-phases %standard-phases
6692 ;; (replace 'check
6693 ;; (lambda _
6694 ;; (zero? (system* "py.test" "-v")))))
6695 (native-inputs
6696 `(("python-pytest" ,python-pytest)))
6697 (propagated-inputs
6698 `(("python-bleach" ,python-bleach)
6699 ("python-entrypoints" ,python-entrypoints)
6700 ("python-jinja2" ,python-jinja2)
6701 ("python-jupyter-core" ,python-jupyter-core)
6702 ("python-mistune" ,python-mistune)
6703 ("python-nbformat" ,python-nbformat)
6704 ("python-pygments" ,python-pygments)
6705 ("python-traitlets" ,python-traitlets)))
6706 (home-page "http://jupyter.org")
6707 (synopsis "Converting Jupyter Notebooks")
6708 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
6709notebooks to various other formats via Jinja templates. It allows you to
6710convert an @code{.ipynb} notebook file into various static formats including:
6711
6712@enumerate
6713@item HTML
6714@item LaTeX
6715@item PDF
6716@item Reveal JS
6717@item Markdown (md)
6718@item ReStructured Text (rst)
6719@item executable script
6720@end enumerate\n")
6721 (license license:bsd-3)))
6722
6723(define-public python2-nbconvert
6724 (package-with-python2 python-nbconvert))
6725
44d10b1f
RW
6726(define-public python-notebook
6727 (package
6728 (name "python-notebook")
6729 (version "5.7.4")
6730 (source (origin
6731 (method url-fetch)
6732 (uri (pypi-uri "notebook" version))
6733 (sha256
6734 (base32
6735 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
6736 (build-system python-build-system)
6737 (arguments
6738 `(#:phases
6739 (modify-phases %standard-phases
6740 (replace 'check
6741 (lambda _
6742 ;; These tests require a browser
6743 (delete-file-recursively "notebook/tests/selenium")
6744 ;; Some tests need HOME
6745 (setenv "HOME" "/tmp")
6746 ;; This file contains "warningfilters", which are not supported
6747 ;; by this version of nose.
6748 (delete-file "setup.cfg")
6749 (with-directory-excursion "/tmp"
6750 (invoke "nosetests" "-v"))
6751 #t)))))
6752 (propagated-inputs
6753 `(("python-jupyter-core" ,python-jupyter-core)
6754 ("python-nbformat" ,python-nbformat)
6755 ("python-nbconvert" ,python-nbconvert)
6756 ("python-prometheus-client" ,python-prometheus-client)
6757 ("python-send2trash" ,python-send2trash)
6758 ("python-terminado" ,python-terminado)))
6759 (native-inputs
6760 `(("python-nose" ,python-nose)
6761 ("python-sphinx" ,python-sphinx)
6762 ("python-requests" ,python-requests)))
6763 (home-page "http://jupyter.org/")
6764 (synopsis "Web-based notebook environment for interactive computing")
6765 (description
6766 "The Jupyter HTML notebook is a web-based notebook environment for
6767interactive computing.")
6768 (properties `((python2-variant . ,(delay python2-notebook))))
6769 (license license:bsd-3)))
6770
6771(define-public python2-notebook
6772 (let ((base (package-with-python2
6773 (strip-python2-variant python-notebook))))
6774 (package (inherit base)
6775 (native-inputs
6776 `(("python2-mock" ,python2-mock)
6777 ,@(package-native-inputs base)))
6778 (arguments
6779 (substitute-keyword-arguments (package-arguments base)
6780 ((#:phases phases)
6781 `(modify-phases ,phases
6782 (add-before 'check 'disable-test-case
6783 ;; The test requires network access to localhost. Curiously it
6784 ;; fails with Python 2 only. Simply make the test-case return
6785 ;; immediately.
6786 (lambda _
6787 (substitute*
6788 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
6789 (("formats = self.nbconvert_api") "return #")))))))))))
6790
6791(define-public python-widgetsnbextension
6792 (package
6793 (name "python-widgetsnbextension")
6794 (version "3.4.2")
6795 (source
6796 (origin
6797 (method url-fetch)
6798 (uri (pypi-uri "widgetsnbextension" version))
6799 (sha256
6800 (base32
6801 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
6802 (build-system python-build-system)
6803 (propagated-inputs
6804 `(("python-ipykernel" ,python-ipykernel)
6805 ("python-notebook" ,python-notebook)))
6806 (native-inputs
6807 `(("python-certifi" ,python-certifi)
6808 ("python-nose" ,python-nose)))
6809 (home-page "https://ipython.org")
6810 (synopsis "IPython HTML widgets for Jupyter")
6811 (description "This package provides interactive HTML widgets for Jupyter
6812notebooks.")
6813 (license license:bsd-3)))
6814
6815(define-public python2-widgetsnbextension
6816 (package-with-python2 python-widgetsnbextension))
6817
6818(define-public python-ipywidgets
6819 (package
6820 (name "python-ipywidgets")
6821 (version "5.2.2")
6822 (source
6823 (origin
6824 (method url-fetch)
6825 (uri (pypi-uri "ipywidgets" version))
6826 (sha256
6827 (base32
6828 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
6829 (build-system python-build-system)
6830 (propagated-inputs
6831 `(("python-ipython" ,python-ipython)
6832 ("python-traitlets" ,python-traitlets)
6833 ("python-widgetsnbextension" ,python-widgetsnbextension)))
6834 (native-inputs
6835 `(("python-nose" ,python-nose)
6836 ("python-pytest" ,python-pytest)))
6837 (home-page "https://ipython.org")
6838 (synopsis "IPython HTML widgets for Jupyter")
6839 (description "Ipywidgets are interactive HTML widgets for Jupyter
6840notebooks and the IPython kernel. Notebooks come alive when interactive
6841widgets are used. Users gain control of their data and can visualize changes
6842in the data.")
6843 (license license:bsd-3)))
6844
6845(define-public python2-ipywidgets
6846 (package-with-python2 python-ipywidgets))
6847
6848(define-public python-jupyter-console
6849 (package
6850 (name "python-jupyter-console")
6851 (version "5.2.0")
6852 (source
6853 (origin
6854 (method url-fetch)
6855 (uri (pypi-uri "jupyter_console" version))
6856 (sha256
6857 (base32
6858 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
6859 (build-system python-build-system)
6860 ;; Tests only run in an TTY.
6861 (arguments `(#:tests? #f))
6862 (propagated-inputs
6863 `(("python-ipykernel" ,python-ipykernel)
6864 ("python-jupyter-client" ,python-jupyter-client)
6865 ("python-prompt-toolkit" ,python-prompt-toolkit-1)
6866 ("python-pygments" ,python-pygments)))
6867 (native-inputs
6868 `(("python-nose" ,python-nose)))
6869 (home-page "https://jupyter.org")
6870 (synopsis "Jupyter terminal console")
6871 (description "This package provides a terminal-based console frontend for
6872Jupyter kernels. It also allows for console-based interaction with non-Python
6873Jupyter kernels such as IJulia and IRKernel.")
6874 (license license:bsd-3)))
6875
6876(define-public python2-jupyter-console
6877 (package-with-python2 python-jupyter-console))
6878
6879;; The python-ipython and python-jupyter-console require each other. To get
6880;; the functionality in both packages working, strip down the
6881;; python-jupyter-console package when using it as an input to python-ipython.
6882(define python-jupyter-console-minimal
6883 (package
6884 (inherit python-jupyter-console)
6885 (name "python-jupyter-console-minimal")
6886 (arguments
6887 (substitute-keyword-arguments
6888 (package-arguments python-jupyter-console)
6889 ((#:phases phases)
6890 `(modify-phases ,phases
6891 (add-after 'install 'delete-bin
6892 (lambda* (#:key outputs #:allow-other-keys)
6893 ;; Delete the bin files, to avoid conflicts in profiles
6894 ;; where python-ipython and python-jupyter-console are
6895 ;; both present.
6896 (delete-file-recursively
6897 (string-append
6898 (assoc-ref outputs "out") "/bin"))))))))
6899 ;; Remove the python-ipython propagated input, to avoid the cycle
6900 (propagated-inputs
6901 (alist-delete
6902 "python-ipython"
6903 (package-propagated-inputs python-jupyter-console)))))
6904
6905(define-public python-qtconsole
6906 (package
6907 (name "python-qtconsole")
6908 (version "4.4.3")
6909 (source
6910 (origin
6911 (method url-fetch)
6912 (uri (pypi-uri "qtconsole" version))
6913 (sha256
6914 (base32
6915 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
6916 (build-system python-build-system)
6917 (arguments
6918 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
6919 ;; but we only have the LTS version 5.x. This means that there might be
6920 ;; runtime errors, but since this is a dependency of the Jupyter package,
6921 ;; and Jupyter can be used without the qtconsole we can overlook this for
6922 ;; now.
6923 `(#:tests? #f
6924 #:phases
6925 (modify-phases %standard-phases
6926 (add-before 'check 'pre-check
6927 (lambda _
6928 (setenv "QT_QPA_PLATFORM" "offscreen")
6929 #t)))))
6930 (propagated-inputs
6931 `(("python-ipykernel" ,python-ipykernel)
6932 ("python-ipython" ,python-ipython)))
6933 (native-inputs
6934 `(("python-pytest" ,python-pytest)))
6935 (home-page "http://jupyter.org")
6936 (synopsis "Jupyter Qt console")
6937 (description "This package provides a Qt-based console for Jupyter with
6938support for rich media output.")
6939 (license license:bsd-3)))
6940
6941(define-public jupyter
6942 (package
6943 (name "jupyter")
6944 (version "1.0.0")
6945 (source
6946 (origin
6947 (method url-fetch)
6948 (uri (pypi-uri "jupyter" version))
6949 (sha256
6950 (base32
6951 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
6952 (build-system python-build-system)
6953 (arguments '(#:tests? #f)) ; there are none.
6954 (propagated-inputs
6955 `(("python-ipykernel" ,python-ipykernel)
6956 ("python-ipywidgets" ,python-ipywidgets)
6957 ("python-jupyter-console" ,python-jupyter-console)
6958 ("python-nbconvert" ,python-nbconvert)
6959 ("python-notebook" ,python-notebook)
6960 ("python-qtconsole" ,python-qtconsole)))
6961 (native-search-paths
6962 (list (search-path-specification
6963 (variable "JUPYTER_PATH")
6964 (files '("share/jupyter")))))
6965 (home-page "https://jupyter.org")
6966 (synopsis "Web application for interactive documents")
6967 (description
6968 "The Jupyter Notebook is a web application that allows you to create and
6969share documents that contain live code, equations, visualizations and
6970explanatory text. Uses include: data cleaning and transformation, numerical
6971simulation, statistical modeling, machine learning and much more.")
6972 (license license:bsd-3)))
6973
6974(define-public python-chardet
6975 (package
6976 (name "python-chardet")
6977 (version "3.0.4")
6978 (source
6979 (origin
6980 (method url-fetch)
6981 (uri (pypi-uri "chardet" version))
6982 (sha256
6983 (base32
6984 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
6985 (native-inputs
6986 `(("python-hypothesis" ,python-hypothesis)
6987 ("python-pytest" ,python-pytest)
6988 ("python-pytest-runner" ,python-pytest-runner)))
6989 (build-system python-build-system)
6990 (home-page "https://github.com/chardet/chardet")
6991 (synopsis "Universal encoding detector for Python 2 and 3")
6992 (description
6993 "This package provides @code{chardet}, a Python module that can
6994automatically detect a wide range of file encodings.")
6995 (license license:lgpl2.1+)))
6996
6997(define-public python2-chardet
6998 (package-with-python2 python-chardet))
6999
7000(define-public python-docopt
7001 (package
7002 (name "python-docopt")
7003 (version "0.6.2")
7004 (source
7005 (origin
7006 (method url-fetch)
7007 ;; The release on PyPI does not include tests.
7008 (uri (string-append
7009 "https://github.com/docopt/docopt/archive/"
7010 version ".tar.gz"))
7011 (file-name (string-append name "-" version ".tar.gz"))
7012 (sha256
7013 (base32
7014 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
7015 (build-system python-build-system)
7016 (native-inputs
7017 `(("python-pytest" ,python-pytest)))
7018 (arguments
7019 `(#:phases
7020 (modify-phases %standard-phases
7021 (replace 'check
7022 (lambda _ (invoke "py.test"))))))
7023 (home-page "http://docopt.org")
7024 (synopsis "Command-line interface description language for Python")
7025 (description "This library allows the user to define a command-line
7026interface from a program's help message rather than specifying it
7027programatically with command-line parsers like @code{getopt} and
7028@code{argparse}.")
7029 (license license:expat)))
7030
7031(define-public python2-docopt
7032 (package-with-python2 python-docopt))
7033
7034(define-public python-pythondialog
7035 (package
7036 (name "python-pythondialog")
7037 (version "3.4.0")
7038 (source
7039 (origin
7040 (method url-fetch)
7041 (uri (pypi-uri "pythondialog" version))
7042 (sha256
7043 (base32
7044 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
7045 (build-system python-build-system)
7046 (arguments
7047 `(#:phases
7048 (modify-phases %standard-phases
7049 (add-after 'unpack 'patch-path
7050 (lambda* (#:key inputs #:allow-other-keys)
7051 (let* ((dialog (assoc-ref inputs "dialog")))
7052 ;; Since this library really wants to grovel the search path, we
7053 ;; must hardcode dialog's store path into it.
7054 (substitute* "dialog.py"
7055 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
7056 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
7057 #t))))
7058 #:tests? #f)) ; no test suite
7059 (propagated-inputs
7060 `(("dialog" ,dialog)))
7061 (home-page "http://pythondialog.sourceforge.net/")
7062 (synopsis "Python interface to the UNIX dialog utility")
7063 (description "A Python wrapper for the dialog utility. Its purpose is to
7064provide an easy to use, pythonic and comprehensive Python interface to dialog.
7065This allows one to make simple text-mode user interfaces on Unix-like systems")
7066 (license license:lgpl2.1)
7067 (properties `((python2-variant . ,(delay python2-pythondialog))))))
7068
7069(define-public python2-pythondialog
7070 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
7071 (package
7072 (inherit base)
7073 (version (package-version python-pythondialog))
7074 (source (origin
7075 (method url-fetch)
7076 (uri (pypi-uri "python2-pythondialog" version))
7077 (sha256
7078 (base32
7079 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
7080
7081(define-public python-configobj
7082 (package
7083 (name "python-configobj")
7084 (version "5.0.6")
7085 (source (origin
7086 (method url-fetch)
b0758fbb 7087 (uri (pypi-uri "configobj" version))
44d10b1f
RW
7088 (sha256
7089 (base32
7090 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
7091 ;; Patch setup.py so it looks for python-setuptools, which is
7092 ;; required to parse the keyword 'install_requires' in setup.py.
7093 (patches (search-patches "python-configobj-setuptools.patch"))))
7094 (build-system python-build-system)
7095 (propagated-inputs
7096 `(("python-six" ,python-six)))
7097 (synopsis "Config file reading, writing and validation")
7098 (description "ConfigObj is a simple but powerful config file reader and
7099writer: an ini file round tripper. Its main feature is that it is very easy to
7100use, with a straightforward programmer’s interface and a simple syntax for
7101config files.")
7102 (home-page "https://github.com/DiffSK/configobj")
7103 (license license:bsd-3)))
7104
7105(define-public python2-configobj
7106 (package-with-python2 python-configobj))
7107
7108(define-public python-configargparse
7109 (package
7110 (name "python-configargparse")
86ae491f 7111 (version "0.14.0")
44d10b1f
RW
7112 (source (origin
7113 (method url-fetch)
7114 (uri (pypi-uri "ConfigArgParse" version))
7115 (sha256
7116 (base32
86ae491f 7117 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
44d10b1f
RW
7118 (build-system python-build-system)
7119 (native-inputs
7120 `(("python-pyyaml" ,python-pyyaml)))
7121 (arguments
7122 `(#:phases
7123 (modify-phases %standard-phases
7124 (replace 'check
7125 (lambda _
7126 ;; Bypass setuptools-shim because one test relies on "setup.py"
7127 ;; being the first argument passed to the python call.
7128 ;;
7129 ;; NOTE: Many tests do not run because they rely on Python's
7130 ;; built-in test.test_argparse, but we remove the unit tests from
7131 ;; our Python installation.
7132 (invoke "python" "setup.py" "test"))))))
7133 (synopsis "Replacement for argparse")
7134 (description "A drop-in replacement for argparse that allows options to also
7135be set via config files and/or environment variables.")
7136 (home-page "https://github.com/bw2/ConfigArgParse")
7137 (license license:expat)))
7138
7139(define-public python2-configargparse
7140 (package-with-python2 python-configargparse))
7141
7142(define-public python-argparse-manpage
7143 (package
7144 (name "python-argparse-manpage")
7145 (version "1.1")
7146 (source
7147 (origin
7148 (method url-fetch)
7149 (uri (pypi-uri "argparse-manpage" version))
7150 (sha256
7151 (base32
7152 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
7153 (build-system python-build-system)
7154 (home-page "https://github.com/praiskup/argparse-manpage")
7155 (synopsis "Build manual page from Python's ArgumentParser object")
7156 (description
7157 "This package provides tools to build manual pages from Python's
7158@code{ArgumentParser} object.")
7159 (license license:asl2.0)))
7160
7161(define-public python2-contextlib2
7162 (package
7163 (name "python2-contextlib2")
7164 (version "0.5.5")
7165 (source
7166 (origin
7167 (method url-fetch)
7168 (uri (pypi-uri "contextlib2" version))
7169 (sha256
7170 (base32
7171 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
7172 (build-system python-build-system)
7173 (arguments
7174 `(#:python ,python-2
7175 #:phases
7176 (modify-phases %standard-phases
7177 (replace 'check
7178 (lambda _ (invoke "python" "test_contextlib2.py" "-v"))))))
7179 (native-inputs
7180 `(("python2-unittest2" ,python2-unittest2)))
7181 (home-page "http://contextlib2.readthedocs.org/")
7182 (synopsis "Tools for decorators and context managers")
7183 (description "This module is primarily a backport of the Python
71843.2 contextlib to earlier Python versions. Like contextlib, it
7185provides utilities for common tasks involving decorators and context
7186managers. It also contains additional features that are not part of
7187the standard library.")
7188 (license license:psfl)))
7189
7190(define-public python-texttable
7191 (package
7192 (name "python-texttable")
7193 (version "0.8.7")
7194 (source
7195 (origin
7196 (method url-fetch)
7197 (uri (pypi-uri "texttable" version))
7198 (sha256
7199 (base32
7200 "1liiiydgkg37i46a418aw19fyf6z3ds51wdwwpyjbs12x0phhf4a"))))
7201 (build-system python-build-system)
7202 (arguments '(#:tests? #f)) ; no tests
7203 (home-page "https://github.com/foutaise/texttable/")
7204 (synopsis "Python module for creating simple ASCII tables")
7205 (description "Texttable is a Python module for creating simple ASCII
7206tables.")
7207 (license license:lgpl2.1+)))
7208
7209(define-public python2-texttable
7210 (package-with-python2 python-texttable))
7211
7212(define-public python-atomicwrites
7213 (package
7214 (name "python-atomicwrites")
7215 (version "1.1.5")
7216 (source (origin
7217 (method url-fetch)
7218 (uri (pypi-uri "atomicwrites" version))
7219 (sha256
7220 (base32
7221 "11bm90fwm2avvf4f3ib8g925w7jr4m11vcsinn1bi6ns4bm32214"))))
7222 (build-system python-build-system)
7223 (synopsis "Atomic file writes in Python")
7224 (description "Library for atomic file writes using platform dependent tools
7225for atomic file system operations.")
7226 (home-page "https://github.com/untitaker/python-atomicwrites")
7227 (license license:expat)))
7228
7229(define-public python2-atomicwrites
7230 (package-with-python2 python-atomicwrites))
7231
7232(define-public python-click-threading
7233 (package
7234 (name "python-click-threading")
7235 (version "0.4.4")
7236 (source (origin
7237 (method url-fetch)
7238 (uri (pypi-uri "click-threading" version))
7239 (sha256
7240 (base32
7241 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
7242 (build-system python-build-system)
7243 (propagated-inputs
7244 `(("python-click" ,python-click)))
7245 (synopsis "Utilities for multithreading in Click")
7246 (description "This package provides utilities for multithreading in Click
7247applications.")
7248 (home-page "https://github.com/click-contrib/click-threading")
7249 (license license:expat)))
7250
7251(define-public python-click-log
7252 (package
7253 (name "python-click-log")
7254 (version "0.3.2")
7255 (source (origin
7256 (method url-fetch)
7257 (uri (pypi-uri "click-log" version))
7258 (sha256
7259 (base32
7260 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
7261 (build-system python-build-system)
7262 (propagated-inputs
7263 `(("python-click" ,python-click)))
7264 (synopsis "Logging for click applications")
7265 (description "This package provides a Python library for logging Click
7266applications.")
7267 (home-page "https://github.com/click-contrib/click-log")
7268 (license license:expat)))
7269
7270(define-public python-apipkg
7271 (package
7272 (name "python-apipkg")
7273 (version "1.4")
7274 (source (origin
7275 (method url-fetch)
7276 (uri (pypi-uri "apipkg" version))
7277 (sha256
7278 (base32
7279 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
7280 (build-system python-build-system)
7281 (native-inputs
7282 `(("python-pytest" ,python-pytest)))
7283 (synopsis "Namespace control and lazy-import mechanism")
7284 (description "With apipkg you can control the exported namespace of a Python
7285package and greatly reduce the number of imports for your users. It is a small
7286pure Python module that works on virtually all Python versions.")
7287 (home-page "https://github.com/pytest-dev/apipkg")
7288 (license license:expat)))
7289
7290(define-public python2-apipkg
7291 (package-with-python2 python-apipkg))
7292
7293(define-public python-execnet
7294 (package
7295 (name "python-execnet")
7296 (version "1.4.1")
7297 (source (origin
7298 (method url-fetch)
7299 (uri (pypi-uri "execnet" version))
7300 (sha256
7301 (base32
7302 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
7303 (build-system python-build-system)
7304 (arguments
7305 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
7306 ;; The two test failures are caused by the lack of an `ssh` executable.
7307 ;; The test suite can be run with pytest after the 'install' phase.
7308 #:tests? #f))
7309 (native-inputs
7310 `(("python-pytest" ,python-pytest)
7311 ("python-setuptools-scm" ,python-setuptools-scm)))
7312 (propagated-inputs
7313 `(("python-apipkg" ,python-apipkg)))
7314 (synopsis "Rapid multi-Python deployment")
7315 (description "Execnet provides a share-nothing model with
7316channel-send/receive communication for distributing execution across many
7317Python interpreters across version, platform and network barriers. It has a
7318minimal and fast API targeting the following uses:
7319@enumerate
7320@item distribute tasks to (many) local or remote CPUs
7321@item write and deploy hybrid multi-process applications
7322@item write scripts to administer multiple environments
7323@end enumerate")
7324 (home-page "http://codespeak.net/execnet/")
7325 (license license:expat)))
7326
7327(define-public python2-execnet
7328 (package-with-python2 python-execnet))
7329
7330(define-public python-icalendar
7331 (package
7332 (name "python-icalendar")
7333 (version "4.0.3")
7334 (source (origin
7335 (method url-fetch)
7336 (uri (pypi-uri "icalendar" version))
7337 (sha256
7338 (base32
7339 "0mk3dk1dxkcm46jy48v27j2w2349iv4sbimqj1yb5js43mx49hh7"))))
7340 (build-system python-build-system)
7341 (propagated-inputs
7342 `(("python-dateutil" ,python-dateutil)
7343 ("python-pytz" ,python-pytz)))
7344 (synopsis "Python library for parsing iCalendar files")
7345 (description "The icalendar package is a parser/generator of iCalendar
7346files for use with Python.")
7347 (home-page "https://github.com/collective/icalendar")
7348 (license license:bsd-2)))
7349
7350(define-public python-sphinxcontrib-newsfeed
7351 (package
7352 (name "python-sphinxcontrib-newsfeed")
7353 (version "0.1.4")
7354 (source (origin
7355 (method url-fetch)
7356 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
7357 (sha256
7358 (base32
7359 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
7360 (arguments '(#:tests? #f)) ; No tests.
7361 (build-system python-build-system)
7362 (propagated-inputs
7363 `(("python-sphinx" ,python-sphinx)))
7364 (synopsis "News Feed extension for Sphinx")
7365 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
7366Blog, News or Announcements section to a Sphinx website.")
7367 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
7368 (license license:bsd-2)))
7369
7370(define-public python-args
7371 (package
7372 (name "python-args")
7373 (version "0.1.0")
7374 (source (origin
7375 (method url-fetch)
7376 (uri (pypi-uri "args" version))
7377 (sha256
7378 (base32
7379 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
7380 (build-system python-build-system)
7381 (home-page "https://github.com/kennethreitz/args")
7382 (synopsis "Command-line argument parser")
7383 (description
7384 "This library provides a Python module to parse command-line arguments.")
7385 (license license:bsd-3)))
7386
7387(define-public python2-args
7388 (package-with-python2 python-args))
7389
7390(define-public python-clint
7391 (package
7392 (name "python-clint")
7393 (version "0.5.1")
7394 (source (origin
7395 (method url-fetch)
7396 (uri (pypi-uri "clint" version))
7397 (sha256
7398 (base32
7399 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
7400 (build-system python-build-system)
7401 (arguments
7402 '(#:phases
7403 (modify-phases %standard-phases
7404 (replace 'check
7405 (lambda _ (invoke "py.test" "-v"))))))
7406 (native-inputs
7407 `(("python-pytest" ,python-pytest)))
7408 (propagated-inputs
7409 `(("python-args" ,python-args)))
7410 (home-page "https://github.com/kennethreitz/clint")
7411 (synopsis "Command-line interface tools")
7412 (description
7413 "Clint is a Python module filled with a set of tools for developing
7414command-line applications, including tools for colored and indented
7415output, progress bar display, and pipes.")
7416 (license license:isc)))
7417
7418(define-public python2-clint
7419 (package-with-python2 python-clint))
7420
44d10b1f
RW
7421(define-public python-rply
7422 (package
7423 (name "python-rply")
7424 (version "0.7.5")
7425 (source (origin
7426 (method url-fetch)
7427 (uri (pypi-uri "rply" version))
7428 (sha256
7429 (base32
7430 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
7431 (build-system python-build-system)
7432 (propagated-inputs
7433 `(("python-appdirs" ,python-appdirs)))
7434 (home-page "https://github.com/alex/rply")
7435 (synopsis "Parser generator for Python")
7436 (description
7437 "This package provides a pure Python based parser generator, that also
7438works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
7439with a new public API, and RPython support.")
7440 (license license:bsd-3)))
7441
7442(define-public python2-rply
7443 (package-with-python2 python-rply))
7444
7445(define-public python-hy
7446 (package
7447 (name "python-hy")
7448 (version "0.13.0")
7449 (source (origin
7450 (method url-fetch)
7451 (uri (pypi-uri "hy" version))
7452 (sha256
7453 (base32
7454 "19sfymaksx9jhksfnb15ahid46mzrhdfzz6yy2craz2qnzvpmky8"))))
7455 (build-system python-build-system)
7456 (arguments
7457 '(#:phases
7458 (modify-phases %standard-phases
7459 (replace 'check
7460 (lambda _
7461 ;; Tests require write access to HOME.
7462 (setenv "HOME" "/tmp")
7463 (invoke "nosetests"))))))
7464 (native-inputs
7465 `(("python-coverage" ,python-coverage)
7466 ("python-nose" ,python-nose)))
7467 (propagated-inputs
7468 `(("python-astor" ,python-astor)
7469 ("python-clint" ,python-clint)
7470 ("python-rply" ,python-rply)))
7471 (home-page "http://hylang.org/")
7472 (synopsis "Lisp frontend to Python")
7473 (description
7474 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
7475its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
7476Python at your fingertips, in Lisp form.")
7477 (license license:expat)))
7478
7479(define-public python2-hy
7480 (package-with-python2 python-hy))
7481
7482(define-public python2-functools32
7483 (package
7484 (name "python2-functools32")
7485 (version "3.2.3-2")
7486 (source
7487 (origin
7488 (method url-fetch)
7489 (uri (pypi-uri "functools32" version))
7490 (sha256
7491 (base32
7492 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
7493 (build-system python-build-system)
7494 (arguments
7495 `(#:python ,python-2
7496 #:tests? #f)) ; no test target
7497 (home-page "https://github.com/MiCHiLU/python-functools32")
7498 (synopsis
7499 "Backport of the functools module from Python 3.2.3")
7500 (description
7501 "This package is a backport of the @code{functools} module from Python
75023.2.3 for use with older versions of Python and PyPy.")
7503 (license license:expat)))
7504
7505(define-public python2-subprocess32
7506 (package
7507 (name "python2-subprocess32")
7508 (version "3.2.7")
7509 (source (origin
7510 (method url-fetch)
7511 (uri (pypi-uri "subprocess32" version))
7512 (sha256
7513 (base32
7514 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
7515 (patches
7516 (search-patches "python2-subprocess32-disable-input-test.patch"))))
7517 (build-system python-build-system)
7518 (arguments
7519 `(#:python ,python-2
7520 ;; The test suite fails with Python > 2.7.13:
7521 ;; import test.support
7522 ;; ImportError: No module named support
7523 #:tests? #f
7524 #:phases
7525 (modify-phases %standard-phases
7526 (add-after 'unpack 'patch-/bin/sh
7527 (lambda _
7528 (substitute* '("subprocess32.py"
7529 "test_subprocess32.py")
7530 (("/bin/sh") (which "sh")))
7531 #t)))))
7532 (home-page "https://github.com/google/python-subprocess32")
7533 (synopsis "Backport of the subprocess module from Python 3.2")
7534 (description
7535 "This is a backport of the @code{subprocess} standard library module
7536from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
7537new features. On POSIX systems it is guaranteed to be reliable when used
7538in threaded applications. It includes timeout support from Python 3.3 but
7539otherwise matches 3.2’s API.")
7540 (license license:psfl)))
7541
7542(define-public python2-futures
7543 (package
7544 (name "python2-futures")
7545 (version "3.2.0")
7546 (source
7547 (origin
7548 (method url-fetch)
7549 (uri (pypi-uri "futures" version))
7550 (sha256
7551 (base32
7552 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
7553 (build-system python-build-system)
7554 (arguments `(#:python ,python-2
7555 ;; FIXME: Python 2.7.14 moved the test.support library,
7556 ;; but our package has not yet been adjusted. Enable
7557 ;; tests when the python2 package has been fixed.
7558 #:tests? #f))
7559 (home-page "https://github.com/agronholm/pythonfutures")
7560 (synopsis
7561 "Backport of the concurrent.futures package from Python 3.2")
7562 (description
7563 "The concurrent.futures module provides a high-level interface for
7564asynchronously executing callables. This package backports the
7565concurrent.futures package from Python 3.2")
7566 (license license:bsd-3)))
7567
7568(define-public python-promise
7569 (package
7570 (name "python-promise")
7571 (version "0.4.2")
7572 (source
7573 (origin
7574 (method url-fetch)
7575 (uri (pypi-uri "promise" version))
7576 (sha256
7577 (base32
7578 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
7579 (build-system python-build-system)
7580 ;; Tests wants python-futures, which is a python2 only program, and
7581 ;; can't be found by python-promise at test time.
7582 (arguments `(#:tests? #f))
7583 (home-page "https://github.com/syrusakbary/promise")
7584 (synopsis "Promises/A+ implementation for Python")
7585 (description
7586 "Promises/A+ implementation for Python")
7587 (properties `((python2-variant . ,(delay python2-promise))))
7588 (license license:expat)))
7589
7590(define-public python2-promise
7591 (let ((promise (package-with-python2
7592 (strip-python2-variant python-promise))))
7593 (package (inherit promise)
7594 (arguments (substitute-keyword-arguments (package-arguments promise)
7595 ((#:tests? _) #t)))
7596 (native-inputs
7597 `(("python2-futures" ,python2-futures)
7598 ("python2-pytest" ,python2-pytest)
7599 ,@(package-native-inputs promise))))))
7600
7601(define-public python-colorama
7602 (package
7603 (name "python-colorama")
7604 (version "0.3.9")
7605 (source
7606 (origin
7607 (method url-fetch)
7608 (uri (pypi-uri "colorama" version))
7609 (sha256
7610 (base32
7611 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
7612 (build-system python-build-system)
7613 (synopsis "Colored terminal text rendering for Python")
7614 (description "Colorama is a Python library for rendering colored terminal
7615text.")
7616 (home-page "https://pypi.python.org/pypi/colorama")
7617 (license license:bsd-3)))
7618
7619(define-public python2-colorama
7620 (package-with-python2 python-colorama))
7621
7622(define-public python-rsa
7623 (package
7624 (name "python-rsa")
7625 (version "3.4.2")
7626 (source
7627 (origin
7628 (method url-fetch)
7629 (uri (pypi-uri "rsa" version))
7630 (sha256
7631 (base32
7632 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
7633 (build-system python-build-system)
7634 (propagated-inputs
7635 `(("python-pyasn1" ,python-pyasn1)))
7636 (synopsis "Pure-Python RSA implementation")
7637 (description "Python-RSA is a pure-Python RSA implementation. It supports
7638encryption and decryption, signing and verifying signatures, and key
7639generation according to PKCS#1 version 1.5. It can be used as a Python
7640library as well as on the command line.")
7641 (home-page "https://stuvel.eu/rsa")
7642 (license license:asl2.0)))
7643
7644(define-public python2-rsa
7645 (package-with-python2 python-rsa))
7646
7647(define-public python-pluggy
7648 (package
7649 (name "python-pluggy")
7650 (version "0.7.1")
7651 (source
7652 (origin
7653 (method url-fetch)
7654 (uri (pypi-uri "pluggy" version))
7655 (sha256
7656 (base32
7657 "1qbn70mksmr03hac6jgp6fiqc4l7859z8dchx2x950vhlij87swm"))))
7658 (build-system python-build-system)
7659 (native-inputs
7660 `(("python-setuptools-scm" ,python-setuptools-scm)))
7661 (synopsis "Plugin and hook calling mechanism for Python")
7662 (description "Pluggy is an extraction of the plugin manager as used by
7663Pytest but stripped of Pytest specific details.")
7664 (home-page "https://pypi.python.org/pypi/pluggy")
7665 (license license:expat)))
7666
7667(define-public python2-pluggy
7668 (package-with-python2 python-pluggy))
7669
7670(define-public python-tox
7671 (package
7672 (name "python-tox")
7673 (version "2.8.1")
7674 (source
7675 (origin
7676 (method url-fetch)
7677 (uri (pypi-uri "tox" version))
7678 (sha256
7679 (base32
7680 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
7681 (build-system python-build-system)
7682 (arguments
7683 ;; FIXME: Tests require pytest-timeout, which itself requires
7684 ;; pytest>=2.8.0 for installation.
7685 '(#:tests? #f))
7686 (propagated-inputs
7687 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
7688 ("python-py" ,python-py)
7689 ("python-virtualenv" ,python-virtualenv)))
7690 (native-inputs
7691 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
7692 ("python-pytest" ,python-pytest) ; >= 2.3.5
7693 ("python-setuptools-scm" ,python-setuptools-scm)))
7694 (home-page "http://tox.testrun.org/")
7695 (synopsis "Virtualenv-based automation of test activities")
7696 (description "Tox is a generic virtualenv management and test command line
7697tool. It can be used to check that a package installs correctly with
7698different Python versions and interpreters, or run tests in each type of
7699supported environment, or act as a frontend to continuous integration
7700servers.")
7701 (license license:expat)))
7702
7703(define-public python2-tox
7704 (package-with-python2 python-tox))
7705
7706(define-public python-jmespath
7707 (package
7708 (name "python-jmespath")
7709 (version "0.9.3")
7710 (source
7711 (origin
7712 (method url-fetch)
7713 (uri (pypi-uri "jmespath" version))
7714 (sha256
7715 (base32
7716 "0r7wc7fsxmlwzxx9j1j7rms06c6xs6d4sysirdhz1jk2mb4x90ba"))))
7717 (build-system python-build-system)
7718 (native-inputs
7719 `(("python-nose" ,python-nose)))
7720 (synopsis "JSON Matching Expressions")
7721 (description "JMESPath (pronounced “james path”) is a Python library that
7722allows one to declaratively specify how to extract elements from a JSON
7723document.")
7724 (home-page "https://github.com/jmespath/jmespath.py")
7725 (license license:expat)))
7726
7727(define-public python2-jmespath
7728 (package-with-python2 python-jmespath))
7729
7730(define-public python-botocore
7731 (package
7732 (name "python-botocore")
7733 (version "1.8.43")
7734 (source
7735 (origin
7736 (method url-fetch)
7737 (uri (pypi-uri "botocore" version))
7738 (sha256
7739 (base32
7740 "12cqpbnz3vfv41mp9admvciw7bc7hz57sjpqs2bxaw9wnfmbw5lg"))))
7741 (build-system python-build-system)
7742 (arguments
7743 ;; FIXME: Many tests are failing.
7744 '(#:tests? #f))
7745 (propagated-inputs
7746 `(("python-dateutil" ,python-dateutil)
7747 ("python-docutils" ,python-docutils)
7748 ("python-jmespath" ,python-jmespath)))
7749 (native-inputs
7750 `(("python-mock" ,python-mock)
7751 ("python-nose" ,python-nose)
7752 ("behave" ,behave)
7753 ("python-tox" ,python-tox)
7754 ("python-wheel" ,python-wheel)))
7755 (home-page "https://github.com/boto/botocore")
7756 (synopsis "Low-level interface to AWS")
7757 (description "Botocore is a Python library that provides a low-level
7758interface to the Amazon Web Services (AWS) API.")
7759 (license license:asl2.0)))
7760
7761(define-public python2-botocore
7762 (package-with-python2 python-botocore))
7763
7764(define-public python-xdo
7765 (package
7766 (name "python-xdo")
7767 (version "0.3")
7768 (source (origin
7769 (method url-fetch)
7770 (uri (string-append
7771 "http://http.debian.net/debian/pool/main/p/python-xdo/"
7772 "python-xdo_" version ".orig.tar.gz"))
7773 (sha256
7774 (base32
7775 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
7776 (build-system python-build-system)
7777 (arguments
7778 '(#:phases
7779 (modify-phases %standard-phases
7780 (add-before 'install 'patch-libxdo-path
7781 ;; Hardcode the path of dynamically loaded libxdo library.
7782 (lambda* (#:key inputs #:allow-other-keys)
7783 (let ((libxdo (string-append
7784 (assoc-ref inputs "xdotool")
7785 "/lib/libxdo.so")))
7786 (substitute* "xdo/_xdo.py"
7787 (("find_library\\(\"xdo\"\\)")
7788 (simple-format #f "\"~a\"" libxdo)))
7789 #t))))
7790 #:tests? #f)) ; no tests provided
7791 (propagated-inputs
7792 `(("python-six" ,python-six)))
7793 (inputs
7794 `(("xdotool" ,xdotool)
7795 ("libX11" ,libx11)))
7796 (home-page "https://tracker.debian.org/pkg/python-xdo")
7797 (synopsis "Python library for simulating X11 keyboard/mouse input")
7798 (description "Provides bindings to libxdo for manipulating X11 via simulated
7799input. (Note that this is mostly a legacy library; you may wish to look at
7800python-xdo for newer bindings.)")
7801 (license license:bsd-3)))
7802
7803(define-public python2-xdo
7804 (package-with-python2 python-xdo))
7805
7806(define-public python-mako
7807 (package
7808 (name "python-mako")
7809 (version "1.0.7")
7810 (source
7811 (origin
7812 (method url-fetch)
7813 (uri (pypi-uri "Mako" version))
7814 (sha256
7815 (base32
7816 "1bi5gnr8r8dva06qpyx4kgjc6spm2k1y908183nbbaylggjzs0jf"))))
7817 (build-system python-build-system)
7818 (propagated-inputs
7819 `(("python-markupsafe" ,python-markupsafe)))
7820 (native-inputs
7821 `(("python-mock" ,python-mock)
7822 ("python-nose" ,python-nose)
7823 ("python-pytest" ,python-pytest)))
7824 (home-page "http://www.makotemplates.org/")
7825 (synopsis "Templating language for Python")
7826 (description "Mako is a templating language for Python that compiles
7827templates into Python modules.")
7828 (license license:expat)))
7829
7830(define-public python2-mako
7831 (package-with-python2 python-mako))
7832
7833(define-public python-waitress
7834 (package
7835 (name "python-waitress")
7836 (version "1.1.0")
7837 (source
7838 (origin
7839 (method url-fetch)
7840 (uri (pypi-uri "waitress" version))
7841 (patches (search-patches "python-waitress-fix-tests.patch"))
7842 (sha256
7843 (base32
7844 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
7845 (build-system python-build-system)
7846 (home-page "https://github.com/Pylons/waitress")
7847 (synopsis "Waitress WSGI server")
7848 (description "Waitress is meant to be a production-quality pure-Python WSGI
7849server with very acceptable performance.")
7850 (license license:zpl2.1)))
7851
7852(define-public python2-waitress
7853 (package-with-python2 python-waitress))
7854
7855(define-public python-pyquery
7856 (package
7857 (name "python-pyquery")
7858 (version "1.2.17")
7859 (source
7860 (origin
7861 (method url-fetch)
7862 (uri (pypi-uri "pyquery" version))
7863 (sha256
7864 (base32
7865 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
7866 (build-system python-build-system)
7867 (native-inputs
7868 `(("python-webob" ,python-webob)
7869 ("python-webtest" ,python-webtest)))
7870 (propagated-inputs
7871 `(("python-lxml" ,python-lxml)
7872 ("python-cssselect" ,python-cssselect)))
7873 (home-page "https://github.com/gawel/pyquery")
7874 (synopsis "Make jQuery-like queries on xml documents")
7875 (description "pyquery allows you to make jQuery queries on xml documents.
7876The API is as much as possible the similar to jQuery. pyquery uses lxml for
7877fast xml and html manipulation.")
7878 (license license:bsd-3)))
7879
7880(define-public python2-pyquery
7881 (package-with-python2 python-pyquery))
7882
7883(define-public python-anyjson
7884 (package
7885 (name "python-anyjson")
7886 (version "0.3.3")
7887 (source
7888 (origin
7889 (method url-fetch)
7890 (uri (pypi-uri "anyjson" version))
7891 (sha256
7892 (base32
7893 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
7894 (build-system python-build-system)
7895 (arguments
7896 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
7897 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
7898 ;; whatever) so this transformation needs to be done before the tests
7899 ;; can be run. Maybe we could add a build step to transform beforehand
7900 ;; but it could be annoying/difficult.
7901 ;; We can enable tests for the Python 2 version, though, and do below.
7902 #:tests? #f))
7903 (home-page "https://bitbucket.org/runeh/anyjson/")
7904 (synopsis
7905 "Wraps best available JSON implementation in a common interface")
7906 (description
7907 "Anyjson loads whichever is the fastest JSON module installed
7908and provides a uniform API regardless of which JSON implementation is used.")
7909 (license license:bsd-3)
7910 (properties `((python2-variant . ,(delay python2-anyjson))))))
7911
7912(define-public python2-anyjson
7913 (let ((anyjson (package-with-python2
7914 (strip-python2-variant python-anyjson))))
7915 (package
7916 (inherit anyjson)
7917 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
7918 #:tests? #t
7919 ,@(package-arguments anyjson)))
7920 (native-inputs `(("python2-nose" ,python2-nose))))))
7921
7922(define-public python-amqp
7923 (package
7924 (name "python-amqp")
7925 (version "2.3.2")
7926 (source
7927 (origin
7928 (method url-fetch)
7929 (uri (pypi-uri "amqp" version))
7930 (sha256
7931 (base32
7932 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
7933 (build-system python-build-system)
7934 (native-inputs
7935 `(("python-case" ,python-case)
7936 ("python-pytest-sugar" ,python-pytest-sugar)
7937 ("python-mock" ,python-mock)))
7938 (propagated-inputs
7939 `(("python-vine" ,python-vine)))
7940 (home-page "https://github.com/celery/py-amqp")
7941 (synopsis
7942 "Low-level AMQP client for Python (fork of amqplib)")
7943 (description
7944 "This is a fork of amqplib which was originally written by Barry Pederson.
7945It is maintained by the Celery project, and used by kombu as a pure python
7946alternative when librabbitmq is not available.")
7947 (license license:lgpl2.1+)
7948 (properties `((python2-variant . ,(delay python2-amqp))))))
7949
7950(define-public python2-amqp
7951 (let ((amqp (package-with-python2
7952 (strip-python2-variant python-amqp))))
7953 (package
7954 (inherit amqp)
7955 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
7956 ;; unmaintained. Weirdly, does not do this on the python 3
7957 ;; version?
7958 #:tests? #f
7959 ,@(package-arguments amqp))))))
7960
7961(define-public python-txamqp
7962 (package
7963 (name "python-txamqp")
7964 (version "0.8.2")
7965 (source
7966 (origin
7967 (method url-fetch)
7968 (uri (pypi-uri "txAMQP" version))
7969 (sha256
7970 (base32
7971 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
7972 (build-system python-build-system)
7973 (propagated-inputs
7974 `(("python-six" ,python-six)
7975 ("python-twisted" ,python-twisted)))
7976 (home-page "https://github.com/txamqp/txamqp")
7977 (synopsis "Communicate with AMQP peers and brokers using Twisted")
7978 (description
7979 "This package provides a Python library for communicating with AMQP peers
7980and brokers using the asynchronous networking framework Twisted. It contains
7981all the necessary code to connect, send and receive messages to/from an
7982AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
7983also includes support for using Thrift RPC over AMQP in Twisted
7984applications.")
7985 (license license:asl2.0)))
7986
7987(define-public python2-txamqp
7988 (package-with-python2 python-txamqp))
7989
7990(define-public python-kombu
7991 (package
7992 (name "python-kombu")
7993 (version "4.2.2")
7994 (source
7995 (origin
7996 (method url-fetch)
7997 (uri (pypi-uri "kombu" version))
7998 (sha256
7999 (base32
8000 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
8001 (build-system python-build-system)
8002 (native-inputs
8003 `(("python-mock" ,python-mock)
8004 ("python-case" ,python-case)
8005 ("python-pyro4" ,python-pyro4)
8006 ("python-pytest-sugar" ,python-pytest-sugar)
8007 ("python-pytz" ,python-pytz)))
8008 (propagated-inputs
8009 `(("python-anyjson" ,python-anyjson)
8010 ("python-amqp" ,python-amqp)
8011 ("python-redis" ,python-redis)))
8012 (home-page "https://kombu.readthedocs.io")
8013 (synopsis "Message passing library for Python")
8014 (description "The aim of Kombu is to make messaging in Python as easy as
8015possible by providing an idiomatic high-level interface for the AMQ protocol,
8016and also provide proven and tested solutions to common messaging problems.
8017AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
8018message orientation, queuing, routing, reliability and security, for which the
8019RabbitMQ messaging server is the most popular implementation.")
8020 (license license:bsd-3)
8021 (properties `((python2-variant . ,(delay python2-kombu))))))
8022
8023(define-public python2-kombu
8024 (let ((kombu (package-with-python2
8025 (strip-python2-variant python-kombu))))
8026 (package
8027 (inherit kombu)
8028 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
8029 ;; It works fine on the python3 variant.
8030 #:tests? #f
8031 ,@(package-arguments kombu)))
8032 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8033 ,@(package-native-inputs kombu))))))
8034
8035(define-public python-billiard
8036 (package
8037 (name "python-billiard")
8038 (version "3.5.0.5")
8039 (source
8040 (origin
8041 (method url-fetch)
8042 (uri (pypi-uri "billiard" version))
8043 (sha256
8044 (base32
8045 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
8046 (build-system python-build-system)
8047 (native-inputs
8048 `(("python-case" ,python-case)
8049 ("python-pytest" ,python-pytest)))
8050 (home-page "https://github.com/celery/billiard")
8051 (synopsis
8052 "Python multiprocessing fork with improvements and bugfixes")
8053 (description
8054 "Billiard is a fork of the Python 2.7 multiprocessing package. The
8055multiprocessing package itself is a renamed and updated version of R Oudkerk's
8056pyprocessing package. This standalone variant is intended to be compatible with
8057Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
8058 (license license:bsd-3)
8059 (properties `((python2-variant . ,(delay python2-billiard))))))
8060
8061(define-public python2-billiard
8062 (let ((billiard (package-with-python2
8063 (strip-python2-variant python-billiard))))
8064 (package
8065 (inherit billiard)
8066 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8067 ("python2-mock" ,python2-mock)
8068 ,@(package-native-inputs billiard))))))
8069
8070(define-public python-celery
8071 (package
8072 (name "python-celery")
8073 (version "4.2.1")
8074 (source
8075 (origin
8076 (method url-fetch)
8077 (uri (pypi-uri "celery" version))
8078 (sha256
8079 (base32
8080 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
8081 (build-system python-build-system)
8082 (arguments
8083 '(;; TODO The tests fail with Python 3.7
8084 ;; https://github.com/celery/celery/issues/4849
8085 #:tests? #f
8086 #:phases
8087 (modify-phases %standard-phases
8088 (add-after 'unpack 'patch-requirements
8089 (lambda _
8090 (substitute* "requirements/test.txt"
8091 (("pytest>=3\\.0,<3\\.3")
8092 "pytest>=3.0"))
8093 #t)))))
8094 (native-inputs
8095 `(("python-case" ,python-case)
8096 ("python-pytest" ,python-pytest)))
8097 (propagated-inputs
8098 `(("python-pytz" ,python-pytz)
8099 ("python-billiard" ,python-billiard)
8100 ("python-kombu" ,python-kombu)))
8101 (home-page "https://celeryproject.org")
8102 (synopsis "Distributed Task Queue")
8103 (description "Celery is an asynchronous task queue/job queue based on
8104distributed message passing. It is focused on real-time operation, but
8105supports scheduling as well. The execution units, called tasks, are executed
8106concurrently on a single or more worker servers using multiprocessing,
8107Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
8108synchronously (wait until ready).")
8109 (license license:bsd-3)
8110 (properties `((python2-variant . ,(delay python2-celery))))))
8111
8112(define-public python2-celery
8113 (let ((celery (package-with-python2
8114 (strip-python2-variant python-celery))))
8115 (package
8116 (inherit celery)
8117 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8118 ("python2-mock" ,python2-mock)
8119 ,@(package-native-inputs celery))))))
8120
8121(define-public python-translitcodec
8122 (package
8123 (name "python-translitcodec")
8124 (version "0.4.0")
8125 (source
8126 (origin
8127 (method url-fetch)
8128 (uri (pypi-uri "translitcodec" version))
8129 (sha256
8130 (base32
8131 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
8132 (build-system python-build-system)
8133 (arguments
8134 `(#:tests? #f)) ; no tests provided
8135 (home-page
8136 "https://github.com/claudep/translitcodec")
8137 (synopsis
8138 "Unicode to 8-bit charset transliteration codec")
8139 (description
8140 "This package contains codecs for transliterating ISO 10646 texts into
8141best-effort representations using smaller coded character sets (ASCII,
8142ISO 8859, etc.).")
8143 (license license:expat)))
8144
8145(define-public python2-translitcodec
8146 (package-with-python2 python-translitcodec))
8147
8148(define-public python-editor
8149 (package
8150 (name "python-editor")
8151 (version "0.5")
8152 (source
8153 (origin
8154 (method url-fetch)
8155 (uri (pypi-uri "python-editor" version))
8156 (sha256
8157 (base32
8158 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
8159 (build-system python-build-system)
8160 (home-page
8161 "https://github.com/fmoo/python-editor")
8162 (synopsis
8163 "Programmatically open an editor, capture the result")
8164 (description
8165 "python-editor is a library that provides the editor module for
8166programmatically interfacing with your system's $EDITOR.")
8167 (license license:asl2.0)))
8168
8169(define-public python2-editor
8170 (package-with-python2 python-editor))
8171
8172(define-public python-sphinxcontrib-programoutput
8173 (package
8174 (name "python-sphinxcontrib-programoutput")
8175 (version "0.10")
8176 (source (origin
8177 (method url-fetch)
8178 (uri (pypi-uri "sphinxcontrib-programoutput" version))
8179 (sha256
8180 (base32
8181 "153hhnlbx4688zj9wd64819ps5znc2jlyp5crkgzvn5hxgy99vpx"))))
8182 (build-system python-build-system)
8183 (arguments
8184 ;; FIXME: Many tests are failing and the upstream is gone.
8185 '(#:tests? #f))
8186 (propagated-inputs
8187 `(("python-sphinx" ,python-sphinx)))
8188 (synopsis "Sphinx extension to include program output")
8189 (description "A Sphinx extension to literally insert the output of arbitrary
8190commands into documents, helping you to keep your command examples up to date.")
8191 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
8192 (license license:bsd-2)))
8193
8194(define-public python2-sphinxcontrib-programoutput
8195 (package-with-python2 python-sphinxcontrib-programoutput))
8196
8197(define-public python-sphinx-repoze-autointerface
8198 (package
8199 (name "python-sphinx-repoze-autointerface")
8200 (version "0.8")
8201 (source (origin
8202 (method url-fetch)
8203 (uri (pypi-uri "repoze.sphinx.autointerface" version))
8204 (sha256
8205 (base32
8206 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
8207 (build-system python-build-system)
8208 (arguments '(#:tests? #f)) ; No tests.
8209 (propagated-inputs
8210 `(("python-sphinx" ,python-sphinx)
8211 ("python-zope-interface" ,python-zope-interface)))
8212 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
8213 (description "This package defines an extension for the Sphinx documentation
8214system. The extension allows generation of API documentation by
8215introspection of @code{zope.interface} instances in code.")
8216 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
8217 (license license:repoze)))
8218
8219(define-public python2-sphinx-repoze-autointerface
8220 (package-with-python2 python-sphinx-repoze-autointerface))
8221
8222(define-public python-vobject
8223 (package
8224 (name "python-vobject")
8225 (version "0.9.5")
8226 (source (origin
8227 (method url-fetch)
8228 (uri (pypi-uri "vobject" version))
8229 (sha256
8230 (base32
8231 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
8232 (build-system python-build-system)
8233 (arguments
8234 '(;; The test suite relies on some non-portable Windows interfaces.
8235 #:tests? #f))
8236 (propagated-inputs
8237 `(("python-dateutil" ,python-dateutil)
8238 ("python-pyicu" ,python-pyicu)))
8239 (synopsis "Parse and generate vCard and vCalendar files")
8240 (description "Vobject is intended to be a full featured Python package for
8241parsing and generating vCard and vCalendar files. Currently, iCalendar files
8242are supported and well tested. vCard 3.0 files are supported, and all data
8243should be imported, but only a few components are understood in a sophisticated
8244way.")
8245 (home-page "http://eventable.github.io/vobject/")
8246 (license license:asl2.0)))
8247
8248(define-public python2-vobject
8249 (package-with-python2 python-vobject))
8250
8251(define-public python-munkres
8252 (package
8253 (name "python-munkres")
8254 (version "1.0.8")
8255 (source (origin
8256 (method url-fetch)
8257 (uri (pypi-uri "munkres" version))
8258 (sha256
8259 (base32
8260 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
8261 (build-system python-build-system)
8262 (arguments
8263 '(#:tests? #f)) ; no test suite
8264 (home-page "http://software.clapper.org/munkres/")
8265 (synopsis "Implementation of the Munkres algorithm")
8266 (description "The Munkres module provides an implementation of the Munkres
8267algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
8268useful for solving the Assignment Problem.")
8269 (license license:bsd-3)))
8270
8271(define-public python2-munkres
8272 (package-with-python2 python-munkres))
8273
8274(define-public python-whoosh
8275 (package
8276 (name "python-whoosh")
8277 (version "2.7.4")
8278 (source
8279 (origin
8280 (method url-fetch)
8281 (uri (pypi-uri "Whoosh" version))
8282 (sha256
8283 (base32
8284 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
8285 (build-system python-build-system)
8286 (native-inputs
8287 `(("python-pytest" ,python-pytest)))
8288 (home-page "https://bitbucket.org/mchaput/whoosh")
8289 (synopsis "Full text indexing, search, and spell checking library")
8290 (description
8291 "Whoosh is a fast, pure-Python full text indexing, search, and spell
8292checking library.")
8293 (license license:bsd-2)))
8294
8295(define-public python2-whoosh
8296 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
8297 (package (inherit whoosh)
8298 (propagated-inputs
8299 `(("python2-backport-ssl-match-hostname"
8300 ,python2-backport-ssl-match-hostname)
8301 ,@(package-propagated-inputs whoosh))))))
8302
8303(define-public python-pathlib
8304 (package
8305 (name "python-pathlib")
8306 (version "1.0.1")
8307 (source (origin
8308 (method url-fetch)
8309 (uri (pypi-uri "pathlib" version))
8310 (sha256
8311 (base32
8312 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
8313 (build-system python-build-system)
8314 ;; The tests depend on the internal "test" module, which does not provide
8315 ;; a stable interface.
8316 (arguments `(#:tests? #f))
8317 (home-page "https://pathlib.readthedocs.org/")
8318 (synopsis "Object-oriented file system paths")
8319 (description "Pathlib offers a set of classes to handle file system paths.
8320It offers the following advantages over using string objects:
8321
8322@enumerate
8323@item No more cumbersome use of os and os.path functions. Everything can
8324be done easily through operators, attribute accesses, and method calls.
8325@item Embodies the semantics of different path types. For example,
8326comparing Windows paths ignores casing.
8327@item Well-defined semantics, eliminating any inconsistencies or
8328ambiguities (forward vs. backward slashes, etc.).
8329@end enumerate
8330
8331Note: In Python 3.4, pathlib is now part of the standard library. For other
8332Python versions please consider python-pathlib2 instead, which tracks the
8333standard library module. This module (python-pathlib) isn't maintained
8334anymore.")
8335 (license license:expat)))
8336
8337(define-public python2-pathlib
8338 (package-with-python2 python-pathlib))
8339
8340(define-public python2-pathlib2
8341 (package
8342 (name "python2-pathlib2")
8343 (version "2.3.2")
8344 (source (origin
8345 (method url-fetch)
8346 (uri (pypi-uri "pathlib2" version))
8347 (sha256
8348 (base32
8349 "10yb0iv5x2hs631rcppkhbddx799d3h8pcwmkbh2a66ns3w71ccf"))))
8350 (build-system python-build-system)
8351 ;; We only need the the Python 2 variant, since for Python 3 our minimum
8352 ;; version is 3.4 which already includes this package as part of the
8353 ;; standard library.
8354 (arguments
8355 `(#:python ,python-2))
8356 (propagated-inputs
8357 `(("python2-scandir" ,python2-scandir)
8358 ("python2-six" ,python2-six)))
8359 (home-page "https://pypi.python.org/pypi/pathlib2/")
8360 (synopsis "Object-oriented file system paths - backport of standard
8361pathlib module")
8362 (description "The goal of pathlib2 is to provide a backport of standard
8363pathlib module which tracks the standard library module, so all the newest
8364features of the standard pathlib can be used also on older Python versions.
8365
8366Pathlib offers a set of classes to handle file system paths. It offers the
8367following advantages over using string objects:
8368
8369@enumerate
8370@item No more cumbersome use of os and os.path functions. Everything can
8371be done easily through operators, attribute accesses, and method calls.
8372@item Embodies the semantics of different path types. For example,
8373comparing Windows paths ignores casing.
8374@item Well-defined semantics, eliminating any inconsistencies or
8375ambiguities (forward vs. backward slashes, etc.).
8376@end enumerate")
8377 (license license:expat)))
8378
8379(define-public python2-pathlib2-bootstrap
8380 (hidden-package
8381 (package
8382 (inherit python2-pathlib2)
8383 (name "python2-pathlib2-bootstrap")
8384 (propagated-inputs
8385 `(("python2-scandir" ,python2-scandir)
8386 ("python2-six" ,python2-six-bootstrap))))))
8387
8388(define-public python-jellyfish
8389 (package
8390 (name "python-jellyfish")
8391 (version "0.5.6")
8392 (source (origin
8393 (method url-fetch)
8394 (uri (pypi-uri "jellyfish" version))
8395 (sha256
8396 (base32
8397 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
8398 (build-system python-build-system)
8399 (native-inputs
8400 `(("python-pytest" ,python-pytest)))
8401 (home-page "https://github.com/jamesturk/jellyfish")
8402 (synopsis "Approximate and phonetic matching of strings")
8403 (description "Jellyfish uses a variety of string comparison and phonetic
8404encoding algorithms to do fuzzy string matching.")
8405 (license license:bsd-2)
8406 (properties `((python2-variant . ,(delay python2-jellyfish))))))
8407
8408(define-public python2-jellyfish
8409 (let ((jellyfish (package-with-python2
8410 (strip-python2-variant python-jellyfish))))
8411 (package (inherit jellyfish)
8412 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
8413 ,@(package-native-inputs jellyfish))))))
8414
8415(define-public python2-unicodecsv
8416 (package
8417 (name "python2-unicodecsv")
8418 (version "0.14.1")
8419 (source (origin
8420 (method url-fetch)
8421 ;; The test suite is not included in the PyPi release.
8422 ;; https://github.com/jdunck/python-unicodecsv/issues/19
8423 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
8424 "archive/" version ".tar.gz"))
8425 (file-name (string-append name "-" version ".tar.gz"))
8426 (sha256
8427 (base32
8428 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
8429 (build-system python-build-system)
8430 (arguments
8431 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
8432 #:python ,python-2))
8433 (native-inputs
8434 `(("python2-unittest2" ,python2-unittest2)))
8435 (home-page "https://github.com/jdunck/python-unicodecsv")
8436 (synopsis "Unicode CSV module for Python 2")
8437 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
8438module, adding support for Unicode strings.")
8439 (license license:bsd-2)))
8440
8441(define-public python-rarfile
8442 (package
8443 (name "python-rarfile")
8444 (version "2.8")
8445 (source (origin
8446 (method url-fetch)
8447 (uri (pypi-uri "rarfile" version))
8448 (sha256
8449 (base32
8450 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
8451 (build-system python-build-system)
8452 (arguments
8453 '(#:phases
8454 (modify-phases %standard-phases
8455 (replace 'check
8456 ;; Many tests fail, but the installation proceeds.
e59dd341 8457 (lambda _ (invoke "make" "-C" "test" "test"))))))
44d10b1f
RW
8458 (native-inputs
8459 `(("which" ,which))) ; required for tests
8460 (propagated-inputs
8461 `(("libarchive" ,libarchive)))
8462 (home-page "https://github.com/markokr/rarfile")
8463 (synopsis "RAR archive reader for Python")
8464 (description "This is Python module for RAR archive reading. The interface
8465is made as zipfile like as possible.")
8466 (license license:isc)))
8467
8468(define-public python2-rarfile
8469 (package-with-python2 python-rarfile))
8470
8471(define-public python-magic
8472 (package
8473 (name "python-magic")
8474 (version "0.4.15")
8475 (source
8476 (origin
8477 (method url-fetch)
8478 (uri (pypi-uri "python-magic" version))
8479 (sha256
8480 (base32
8481 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
8482 (file-name (string-append name "-" version "-checkout"))))
8483 (build-system python-build-system)
8484 (arguments
8485 ;; The tests are unreliable, so don't run them. The tests fail
8486 ;; under Python3 because they were written for Python2 and
8487 ;; contain import statements that do not work in Python3. One of
8488 ;; the tests fails under Python2 because its assertions are
8489 ;; overly stringent; it relies on comparing output strings which
8490 ;; are brittle and can change depending on the version of
8491 ;; libmagic being used and the system on which the test is
8492 ;; running. In my case, under GuixSD 0.10.0, only one test
8493 ;; failed, and it seems to have failed only because the version
8494 ;; of libmagic that is packaged in Guix outputs a slightly
8495 ;; different (but not wrong) string than the one that the test
8496 ;; expected.
8497 '(#:tests? #f
8498 #:phases (modify-phases %standard-phases
8499 ;; Replace a specific method call with a hard-coded
8500 ;; path to the necessary libmagic.so file in the
8501 ;; store. If we don't do this, then the method call
8502 ;; will fail to find the libmagic.so file, which in
8503 ;; turn will cause any application using
8504 ;; python-magic to fail.
8505 (add-before 'build 'hard-code-path-to-libmagic
8506 (lambda* (#:key inputs #:allow-other-keys)
8507 (let ((file (assoc-ref inputs "file")))
8508 (substitute* "magic.py"
8509 (("ctypes.util.find_library\\('magic'\\)")
8510 (string-append "'" file "/lib/libmagic.so'")))
8511 #t)))
8512 (add-before 'install 'disable-egg-compression
8513 (lambda _
8514 (let ((port (open-file "setup.cfg" "a")))
8515 (display "\n[easy_install]\nzip_ok = 0\n"
8516 port)
8517 (close-port port)
8518 #t))))))
8519 (inputs
8520 ;; python-magic needs to be able to find libmagic.so.
8521 `(("file" ,file)))
8522 (home-page
8523 "https://github.com/ahupp/python-magic")
8524 (synopsis
8525 "File type identification using libmagic")
8526 (description
8527 "This module uses ctypes to access the libmagic file type
8528identification library. It makes use of the local magic database and
8529supports both textual and MIME-type output. Note that this module and
8530the python-file module both provide a \"magic.py\" file; these two
8531modules, which are different and were developed separately, both serve
8532the same purpose: to provide Python bindings for libmagic.")
8533 (license license:expat)))
8534
8535(define-public python2-magic
8536 (package-with-python2 python-magic))
8537
8538(define-public python2-s3cmd
8539 (package
8540 (name "python2-s3cmd")
8541 (version "1.6.1")
8542 (source
8543 (origin
8544 (method url-fetch)
8545 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
8546 "s3cmd-" version ".tar.gz"))
8547 (sha256
8548 (base32
8549 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
8550 (build-system python-build-system)
8551 (arguments
8552 ;; s3cmd is written for python2 only and contains no tests.
8553 `(#:python ,python-2
8554 #:tests? #f))
8555 (propagated-inputs
8556 `(("python2-dateutil" ,python2-dateutil)
8557 ;; The python-file package also provides a magic.py module.
8558 ;; This is an unfortunate state of affairs; however, s3cmd
8559 ;; fails to install if it cannot find specifically the
8560 ;; python-magic package. Thus we include it, instead of using
8561 ;; python-file. Ironically, s3cmd sometimes works better
8562 ;; without libmagic bindings at all:
8563 ;; https://github.com/s3tools/s3cmd/issues/198
8564 ("python2-magic" ,python2-magic)))
8565 (home-page "http://s3tools.org/s3cmd")
8566 (synopsis "Command line tool for S3-compatible storage services")
8567 (description
8568 "S3cmd is a command line tool for uploading, retrieving and managing data
8569in storage services that are compatible with the Amazon Simple Storage
8570Service (S3) protocol, including S3 itself. It supports rsync-like backup,
8571GnuPG encryption, and more. It also supports management of Amazon's
8572CloudFront content delivery network.")
8573 (license license:gpl2+)))
8574
8575(define-public python-pkgconfig
8576 (package
8577 (name "python-pkgconfig")
8578 (version "1.3.1")
8579 (source
8580 (origin
8581 (method url-fetch)
8582 (uri (pypi-uri "pkgconfig" version))
8583 (sha256
8584 (base32
8585 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
8586 (build-system python-build-system)
8587 (native-inputs
8588 `(("python-nose" ,python-nose)))
8589 (inputs
8590 `(("pkg-config" ,pkg-config)))
8591 (arguments
8592 `(#:phases
8593 (modify-phases %standard-phases
8594 (add-before 'build 'patch
8595 ;; Hard-code the path to pkg-config.
8596 (lambda _
8597 (substitute* "pkgconfig/pkgconfig.py"
8598 (("cmd = 'pkg-config")
8599 (string-append "cmd = '" (which "pkg-config"))))
8600 #t))
8601 (replace 'check
8602 (lambda _
8603 (invoke "nosetests" "test.py"))))))
8604 (home-page "https://github.com/matze/pkgconfig")
8605 (synopsis "Python interface for pkg-config")
8606 (description "This module provides a Python interface to pkg-config. It
8607can be used to find all pkg-config packages, check if a package exists,
8608check if a package meets certain version requirements, query CFLAGS and
8609LDFLAGS and parse the output to build extensions with setup.py.")
8610 (license license:expat)))
8611
8612(define-public python2-pkgconfig
8613 (package-with-python2 python-pkgconfig))
8614
8615(define-public python-bz2file
8616 (package
8617 (name "python-bz2file")
8618 (version "0.98")
8619 (source
8620 (origin
8621 (method url-fetch)
8622 (uri (pypi-uri "bz2file" version))
8623 (sha256
8624 (base32
8625 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
8626 (build-system python-build-system)
8627 (arguments
8628 `(#:tests? #f)) ; Tests use deprecated python modules.
8629 (home-page "https://github.com/nvawda/bz2file")
8630 (synopsis "Read and write bzip2-compressed files")
8631 (description
8632 "Bz2file is a Python library for reading and writing bzip2-compressed
8633files. It contains a drop-in replacement for the I/O interface in the
8634standard library's @code{bz2} module, including features from the latest
8635development version of CPython that are not available in older releases.")
8636 (license license:asl2.0)))
8637
8638(define-public python2-bz2file
8639 (package-with-python2 python-bz2file))
8640
8641(define-public python-future
8642 (package
8643 (name "python-future")
8644 (version "0.16.0")
8645 (source
8646 (origin
8647 (method url-fetch)
8648 (uri (pypi-uri "future" version))
8649 (sha256
8650 (base32
8651 "1nzy1k4m9966sikp0qka7lirh8sqrsyainyf8rk97db7nwdfv773"))))
8652 (build-system python-build-system)
8653 ;; Many tests connect to the network or are otherwise flawed.
8654 ;; https://github.com/PythonCharmers/python-future/issues/210
8655 (arguments
8656 `(#:tests? #f))
8657 (home-page "http://python-future.org")
8658 (synopsis "Single-source support for Python 3 and 2")
8659 (description
8660 "@code{python-future} is the missing compatibility layer between Python 2 and
8661Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
8662to support both Python 2 and Python 3 with minimal overhead.")
8663 (license license:expat)))
8664
8665(define-public python2-future
8666 (package-with-python2 python-future))
8667
8668(define-public python-cysignals
8669 (package
8670 (name "python-cysignals")
8e3e51df 8671 (version "1.9.0")
44d10b1f
RW
8672 (source
8673 (origin
8674 (method url-fetch)
8e3e51df 8675 (uri (pypi-uri "cysignals" version))
44d10b1f
RW
8676 (sha256
8677 (base32
8e3e51df 8678 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
44d10b1f
RW
8679 (build-system python-build-system)
8680 (native-inputs
8681 `(("python-cython" ,python-cython)
8682 ("python-sphinx" ,python-sphinx)))
8683 (inputs
8684 `(("pari-gp" ,pari-gp)))
8685 (arguments
8686 `(#:modules ((guix build python-build-system)
8687 ((guix build gnu-build-system) #:prefix gnu:)
8688 (guix build utils))
8689 ;; FIXME: Tests are executed after installation and currently fail
8690 ;; when not installing into standard locations; the author is working
8691 ;; on a fix.
8692 #:tests? #f
8693 #:phases
8694 (modify-phases %standard-phases
8695 (add-before
8696 'build 'configure
8697 (assoc-ref gnu:%standard-phases 'configure)))))
8698 (home-page
8699 "https://github.com/sagemath/cysignals")
8700 (synopsis
8701 "Handling of interrupts and signals for Cython")
8702 (description
8703 "The cysignals package provides mechanisms to handle interrupts (and
8704other signals and errors) in Cython code, using two related approaches,
8705for mixed Cython/Python code or external C libraries and pure Cython code,
8706respectively.")
8707 (license license:lgpl3+)))
8708
8709(define-public python2-cysignals
8710 (package-with-python2 python-cysignals))
8711
8712(define-public python2-shedskin
8713 (package
8714 (name "python2-shedskin")
8715 (version "0.9.4")
8716 (source
8717 (origin
8718 (method url-fetch)
8719 (uri (string-append "https://github.com/shedskin/shedskin/"
8720 "releases/download/v" version
8721 "/shedskin-" version ".tgz"))
8722 (sha256
8723 (base32
8724 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
8725 (build-system python-build-system)
8726 (arguments
8727 `(#:python ,python-2
8728 #:phases (modify-phases %standard-phases
8729 (add-after 'unpack 'fix-resulting-include-libs
8730 (lambda* (#:key inputs #:allow-other-keys)
8731 (let ((libgc (assoc-ref inputs "libgc"))
8732 (pcre (assoc-ref inputs "pcre")))
8733 (substitute* "shedskin/makefile.py"
8734 (("variable == 'CCFLAGS':[ ]*")
8735 (string-append "variable == 'CCFLAGS':\n"
8736 " line += ' -I " pcre "/include"
8737 " -I " libgc "/include'"))
8738 (("variable == 'LFLAGS':[ ]*")
8739 (string-append "variable == 'LFLAGS':\n"
8740 " line += ' -L" pcre "/lib"
8741 " -L " libgc "/lib'")))
8742 #t))))))
8743 (inputs `(("pcre" ,pcre)
8744 ("libgc" ,libgc)))
8745 (home-page "https://shedskin.github.io/")
8746 (synopsis "Experimental Python-2 to C++ Compiler")
8747 (description (string-append "This is an experimental compiler for a subset of
8748Python. It generates C++ code and a Makefile."))
8749 (license (list license:gpl3 license:bsd-3 license:expat))))
8750
8751(define-public python2-rope
8752 (package
8753 (name "python2-rope")
a9ba0a31 8754 (version "0.11.0")
44d10b1f
RW
8755 (source
8756 (origin
8757 (method url-fetch)
8758 (uri (pypi-uri "rope" version))
8759 (sha256
8760 (base32
a9ba0a31 8761 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
44d10b1f
RW
8762 (arguments
8763 ;; Rope is currently python-2 only.
8764 ;; https://github.com/python-rope/rope/issues/57
8765 `(#:python ,python-2))
8766 (build-system python-build-system)
8767 (native-inputs
8768 `(("python2-unittest2" ,python2-unittest2)))
8769 (home-page "https://github.com/python-rope/rope")
8770 (synopsis "Refactoring library for Python")
8771 (description "Rope is a refactoring library for Python. It facilitates
8772the renaming, moving and extracting of attributes, functions, modules, fields
8773and parameters in Python 2 source code. These refactorings can also be applied
8774to occurrences in strings and comments.")
8775 (license license:gpl2)))
8776
8777(define-public python-py3status
8778 (package
8779 (name "python-py3status")
8780 (version "3.7")
8781 (source
8782 (origin
8783 (method url-fetch)
8784 (uri (pypi-uri "py3status" version))
8785 (sha256
8786 (base32
8787 "0shxcfz4wcczj0mhwp4w0dvwd2fdd9bgprq8slim1519iiqzgwhq"))))
8788 (build-system python-build-system)
8789 (inputs
8790 `(("file" ,file)))
8791 (arguments
8792 '(#:phases
8793 (modify-phases %standard-phases
8794 ;; 'file' is used for detection of configuration file encoding
8795 ;; let's make link the dependency to particular input
8796 (add-before 'build 'patch-file-path
8797 (lambda* (#:key inputs #:allow-other-keys)
8798 (let ((file-path (assoc-ref inputs "file")))
8799 (substitute* "py3status/parse_config.py"
8800 (("\\['file', '-b'")
8801 (string-append "['" file-path "/bin/file', '-b'")))
8802 #t))))
8803 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
8804 (home-page "https://github.com/ultrabug/py3status")
8805 (synopsis "Extensible i3status wrapper written in Python")
8806 (description "py3status is an i3status wrapper which extends i3status
8807functionality in a modular way, allowing you to extend your panel with your
8808own code, responding to click events and updating clock every second.")
8809 (license license:bsd-3)))
8810
8811(define-public python-tblib
8812 (package
8813 (name "python-tblib")
8814 (version "1.3.2")
8815 (source (origin
8816 (method url-fetch)
8817 (uri (pypi-uri "tblib" version))
8818 (sha256 (base32
8819 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
8820 (build-system python-build-system)
8821 (arguments
8822 `(#:phases
8823 (modify-phases %standard-phases
8824 (add-before 'check 'adjust-tests
8825 (lambda _
8826 (when (which "python3")
8827 ;; Adjust the example output to match that of Python 3.7:
8828 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
8829 (substitute* "README.rst"
8830 (("Exception\\('fail',") "Exception('fail'"))
8831 #t)))
8832 (replace 'check
8833 (lambda _
8834 ;; Upstream runs tests after installation and the package itself
8835 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
8836 ;; found.
8837 (setenv "PYTHONPATH"
8838 (string-append (getcwd) "/build/lib:"
8839 (getenv "PYTHONPATH")))
8840 (invoke "py.test" "-vv" "tests" "README.rst"))))))
8841 (native-inputs
8842 `(("python-pytest" ,python-pytest)
8843 ("python-six" ,python-six)))
8844 (home-page "https://github.com/ionelmc/python-tblib")
8845 (synopsis "Traceback serialization library")
8846 (description
8847 "Traceback serialization allows you to:
8848
8849@enumerate
8850@item Pickle tracebacks and raise exceptions with pickled tracebacks in
8851different processes. This allows better error handling when running code over
8852multiple processes (imagine multiprocessing, billiard, futures, celery etc).
8853
8854@item Parse traceback strings and raise with the parsed tracebacks.
8855@end enumerate\n")
8856 (license license:bsd-3)))
8857
8858(define-public python2-tblib
8859 (package-with-python2 python-tblib))
8860
8861(define-public python-greenlet
8862 (package
8863 (name "python-greenlet")
8864 (version "0.4.15")
8865 (source (origin
8866 (method url-fetch)
8867 (uri (pypi-uri "greenlet" version))
8868 (sha256
8869 (base32
8870 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
8871 (build-system python-build-system)
8872 (home-page "https://greenlet.readthedocs.io/")
8873 (synopsis "Lightweight in-process concurrent programming")
8874 (description
8875 "Greenlet package is a spin-off of Stackless, a version of CPython
8876that supports micro-threads called \"tasklets\". Tasklets run
8877pseudo-concurrently (typically in a single or a few OS-level threads) and
8878are synchronized with data exchanges on \"channels\".")
8879 (license (list license:psfl license:expat))))
8880
8881(define-public python2-greenlet
8882 (package-with-python2 python-greenlet))
8883
8884(define-public python-objgraph
8885 (package
8886 (name "python-objgraph")
8887 (version "3.4.0")
8888 (source
8889 (origin
8890 (method url-fetch)
8891 (uri (pypi-uri "objgraph" version))
8892 (sha256
8893 (base32
8894 "184m09am5gpbqfaiy7l0hwh476mczbrly1dffs0rw2p1d1i2q32a"))))
8895 (build-system python-build-system)
8896 (propagated-inputs
8897 `(("python-graphviz" ,python-graphviz)))
8898 (native-inputs
8899 `(("python-mock" ,python-mock)
8900 ("graphviz" ,graphviz)))
8901 (home-page "https://mg.pov.lt/objgraph/")
8902 (synopsis "Draw Python object reference graphs with graphviz")
8903 (description
8904 "This package provides tools to draw Python object reference graphs with
8905graphviz.")
8906 (license license:expat)))
8907
8908(define-public python-gevent
8909 (package
8910 (name "python-gevent")
8911 (version "1.3.7")
8912 (source (origin
8913 (method url-fetch)
8914 (uri (pypi-uri "gevent" version))
8915 (sha256
8916 (base32
8917 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
8918 (modules '((guix build utils)))
8919 (snippet
8920 '(begin
8921 ;; unbunding libev and c-ares
8922 (delete-file-recursively "deps")
8923 #t))))
8924 (build-system python-build-system)
8925 (arguments
8926 `(#:modules ((ice-9 ftw)
8927 (ice-9 match)
8928 (srfi srfi-26)
8929 (guix build utils)
8930 (guix build python-build-system))
8931 #:phases (modify-phases %standard-phases
8932 (add-after 'unpack 'unpack-libev
8933 (lambda* (#:key inputs #:allow-other-keys)
8934 (mkdir-p "deps/libev")
8935 ;; FIXME: gevent requires building libev, even though
8936 ;; it only links against the proper one.
8937 (invoke "tar" "-xf" (assoc-ref inputs "libev-source")
8938 "--strip-components=1" "-C" "deps/libev")))
8939 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
8940 (lambda _
8941 (substitute* "src/gevent/subprocess.py"
8942 (("/bin/sh") (which "sh")))
8943 (for-each (lambda (file)
8944 (substitute* file
8945 (("/bin/sh") (which "sh"))
8946 (("/bin/true") (which "true"))))
8947 (find-files "src/greentest" "\\.py$"))
8948 #t))
8949 (add-before 'build 'do-not-use-bundled-sources
8950 (lambda* (#:key inputs #:allow-other-keys)
8951 (setenv "CONFIG_SHELL" (which "bash"))
8952 (setenv "LIBEV_EMBED" "false")
8953 (setenv "CARES_EMBED" "false")
8954 (setenv "EMBED" "false")
8955
8956 (let ((greenlet (string-append
8957 (assoc-ref inputs "python-greenlet")
8958 "/include")))
8959 (match (scandir greenlet
8960 (lambda (item)
8961 (string-prefix? "python" item)))
8962 ((python)
8963 (setenv "CPATH"
8964 (string-append greenlet "/" python)))))
8965 #t))
8966 (add-before 'check 'skip-timer-test
8967 (lambda _
8968 ;; XXX: Skip 'TestTimerResolution', which appears to be
8969 ;; unreliable.
8970 (substitute* "src/greentest/test__core_timer.py"
8971 (("not greentest.RUNNING_ON_CI") "False"))
8972 #t))
8973 (replace 'check
8974 (lambda _
8975 ;; Make sure the build directory is on PYTHONPATH.
8976 (setenv "PYTHONPATH"
8977 (string-append
8978 (getenv "PYTHONPATH") ":"
8979 (getcwd) "/build/"
8980 (car (scandir "build" (cut string-prefix? "lib." <>)))))
8981 (with-directory-excursion "src/greentest"
8982 ;; XXX: Many tests require network access. Instead we only
8983 ;; run known-good tests. Unfortunately we cannot use
8984 ;; recursion here since this directory also contains
8985 ;; Python-version-specific subfolders.
8986 (apply invoke "python" "testrunner.py" "--config"
8987 "known_failures.py"
8988 (scandir "." (cut regexp-exec
8989 (make-regexp "test_+(subprocess|core)")
8990 <>)))))))))
8991 (propagated-inputs
8992 `(("python-greenlet" ,python-greenlet)
8993 ("python-objgraph" ,python-objgraph)))
8994 (native-inputs
8995 `(("libev-source" ,(package-source libev))
8996 ("python-six" ,python-six)))
8997 (inputs
8998 `(("c-ares" ,c-ares)
8999 ("libev" ,libev)))
9000 (home-page "http://www.gevent.org/")
9001 (synopsis "Coroutine-based network library")
9002 (description
9003 "gevent is a coroutine-based Python networking library that uses greenlet
9004to provide a high-level synchronous API on top of the libev event loop.")
9005 (license license:expat)
9006 (properties `((python2-variant . ,(delay python2-gevent))))))
9007
9008(define-public python2-gevent
9009 (let ((base (package-with-python2
9010 (strip-python2-variant python-gevent))))
9011 (package
9012 (inherit base)
9013 (native-inputs `(,@(package-native-inputs python-gevent)
9014 ("python-mock" ,python2-mock))))))
9015
9016(define-public python-fastimport
9017 (package
9018 (name "python-fastimport")
9019 (version "0.9.6")
9020 (source
9021 (origin
9022 (method url-fetch)
9023 (uri (pypi-uri "fastimport" version))
9024 (sha256
9025 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
9026 (build-system python-build-system)
9027 (home-page "https://github.com/jelmer/python-fastimport")
9028 (synopsis "VCS fastimport parser and generator in Python")
9029 (description "This package provides a parser for and generator of the Git
9030@url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
9031format.")
9032 (license license:gpl2+)))
9033
9034(define-public python2-fastimport
9035 (package-with-python2 python-fastimport))
9036
9037(define-public python-twisted
9038 (package
9039 (name "python-twisted")
9040 (version "17.1.0")
9041 (source (origin
9042 (method url-fetch)
9043 (uri (pypi-uri "Twisted" version ".tar.bz2"))
9044 (sha256
9045 (base32
9046 "1p245mg15hkxp7hy5cyq2fgvlgjkb4cg0gwkwd148nzy1bbi3wnv"))))
9047 (build-system python-build-system)
9048 (arguments
9049 '(#:tests? #f)) ; FIXME: Some tests are failing.
9050 ;; #:phases
9051 ;; (modify-phases %standard-phases
9052 ;; (replace 'check
9053 ;; (lambda _
9054 ;; (zero? (system* "./bin/trial" "twisted")))))
9055 (propagated-inputs
9056 `(("python-zope-interface" ,python-zope-interface)
9057 ("python-incremental" ,python-incremental)
9058 ("python-constantly" ,python-constantly)
9059 ("python-automat" ,python-automat)))
9060 (home-page "https://twistedmatrix.com/")
9061 (synopsis "Asynchronous networking framework written in Python")
9062 (description
9063 "Twisted is an extensible framework for Python programming, with special
9064focus on event-based network programming and multiprotocol integration.")
9065 (license license:expat)))
9066
9067(define-public python2-twisted
9068 (package-with-python2 python-twisted))
9069
9070(define-public python-pika
9071 (package
9072 (name "python-pika")
9073 (version "0.12.0")
9074 (source
9075 (origin
9076 (method url-fetch)
9077 (uri (pypi-uri "pika" version))
9078 (sha256
9079 (base32
9080 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
9081 (build-system python-build-system)
9082 (native-inputs
9083 `(("python-pyev" ,python-pyev)
9084 ("python-tornado" ,python-tornado)
9085 ("python-twisted" ,python-twisted)))
9086 (home-page "https://pika.readthedocs.org")
9087 (synopsis "Pure Python AMQP Client Library")
9088 (description
9089 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
9090Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
9091network support library.")
9092 (license license:bsd-3)))
9093
9094(define-public python2-pika
9095 (package-with-python2 python-pika))
9096
9097(define-public python-ply
9098 (package
9099 (name "python-ply")
9100 (version "3.10")
9101 (source
9102 (origin
9103 (method url-fetch)
9104 (uri (pypi-uri "ply" version))
9105 (sha256
9106 (base32
9107 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
9108 (build-system python-build-system)
9109 (home-page "http://www.dabeaz.com/ply/")
9110 (synopsis "Python Lex & Yacc")
9111 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
9112It uses LR parsing and does extensive error checking.")
9113 (license license:bsd-3)))
9114
9115(define-public python2-ply
9116 (package-with-python2 python-ply))
9117
9118(define-public python-tabulate
9119 (package
9120 (name "python-tabulate")
9121 (version "0.7.7")
9122 (source (origin
9123 (method url-fetch)
9124 (uri (pypi-uri "tabulate" version))
9125 (sha256
9126 (base32
9127 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
9128 (build-system python-build-system)
9129 (arguments
9130 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
9131 ;; and the latest release is not tagged in the upstream repository.
9132 '(#:tests? #f))
9133 (home-page "https://bitbucket.org/astanin/python-tabulate")
9134 (synopsis "Pretty-print tabular data")
9135 (description
9136 "Tabulate is a library and command-line utility to pretty-print tabular
9137data in Python.")
9138 (license license:expat)))
9139
9140(define-public python2-tabulate
9141 (package-with-python2 python-tabulate))
9142
9143(define-public python-kazoo
9144 (package
9145 (name "python-kazoo")
9146 (version "2.4.0")
9147 (source
9148 (origin
9149 (method url-fetch)
9150 (uri (pypi-uri "kazoo" version))
9151 (sha256
9152 (base32
9153 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
9154 (build-system python-build-system)
9155 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
9156 (propagated-inputs
9157 `(("python-six" ,python-six)))
9158 (home-page "https://kazoo.readthedocs.org")
9159 (synopsis "High-level Zookeeper client library")
9160 (description
9161 "Kazoo is a Python client library for the Apache Zookeeper distributed
9162application service. It is designed to be easy to use and to avoid common
9163programming errors.")
9164 (license license:asl2.0)))
9165
9166(define-public python2-kazoo
9167 (package-with-python2 python-kazoo))
9168
9169(define-public python-pykafka
9170 (package
9171 (name "python-pykafka")
9172 (version "2.4.0")
9173 (source (origin
9174 (method url-fetch)
0ca1d040 9175 (uri (pypi-uri "pykafka" version))
44d10b1f
RW
9176 (sha256
9177 (base32
9178 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
9179 (build-system python-build-system)
9180 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
9181 (propagated-inputs
9182 `(("python-gevent" ,python-gevent)
9183 ("python-kazoo" ,python-kazoo)
9184 ("python-tabulate" ,python-tabulate)))
9185 (inputs
9186 `(("librdkafka" ,librdkafka)))
9187 (home-page "https://pykafka.readthedocs.io/")
9188 (synopsis "Apache Kafka client for Python")
9189 (description
9190 "PyKafka is a client for the Apache Kafka distributed messaging system.
9191It includes Python implementations of Kafka producers and consumers, which
9192are optionally backed by a C extension built on librdkafka.")
9193 (license license:asl2.0)))
9194
9195(define-public python2-pykafka
9196 (package-with-python2 python-pykafka))
9197
9198(define-public python-wcwidth
9199 (package
9200 (name "python-wcwidth")
9201 (version "0.1.7")
9202 (source
9203 (origin
9204 (method url-fetch)
9205 (uri (pypi-uri "wcwidth" version))
9206 (sha256
9207 (base32
9208 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
9209 (build-system python-build-system)
9210 (home-page "https://github.com/jquast/wcwidth")
9211 (synopsis "Measure number of terminal column cells of wide-character codes")
9212 (description "Wcwidth measures the number of terminal column cells of
9213wide-character codes. It is useful for those implementing a terminal emulator,
9214or programs that carefully produce output to be interpreted by one. It is a
9215Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
9216specified in POSIX.1-2001 and POSIX.1-2008.")
9217 (license license:expat)))
9218
9219(define-public python2-wcwidth
9220 (package-with-python2 python-wcwidth))
9221
9222(define-public python2-jsonrpclib
9223 (package
9224 (name "python2-jsonrpclib")
9225 (version "0.1.7")
9226 (source (origin
9227 (method url-fetch)
6571bba0 9228 (uri (pypi-uri "jsonrpclib" version))
44d10b1f
RW
9229 (sha256
9230 (base32
9231 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
9232 (build-system python-build-system)
9233 (arguments
9234 `(#:tests? #f
9235 #:python ,python-2))
9236 (home-page "https://github.com/joshmarshall/jsonrpclib/")
9237 (synopsis "Implementation of JSON-RPC specification for Python")
9238 (description
9239 "This library is an implementation of the JSON-RPC specification.
9240It supports both the original 1.0 specification, as well as the
9241new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
9242etc.")
9243 (license license:asl2.0)))
9244
9245(define-public python-chai
9246 (package
9247 (name "python-chai")
9248 (version "1.1.2")
9249 (source (origin
9250 (method url-fetch)
9251 (uri (pypi-uri "chai" version))
9252 (sha256
9253 (base32
9254 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
9255 (build-system python-build-system)
9256 (home-page "https://github.com/agoragames/chai")
9257 (synopsis "Mocking framework for Python")
9258 (description
9259 "Chai provides an api for mocking, stubbing and spying your python
9260objects, patterned after the Mocha library for Ruby.")
9261 (license license:bsd-3)))
9262
9263(define-public python2-chai
9264 (package-with-python2 python-chai))
9265
9266(define-public python-inflection
9267 (package
9268 (name "python-inflection")
9269 (version "0.3.1")
9270 (source
9271 (origin (method url-fetch)
9272 (uri (pypi-uri "inflection" version))
9273 (sha256
9274 (base32
9275 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
9276 (build-system python-build-system)
9277 (native-inputs
9278 `(("python-pytest" ,python-pytest)))
9279 (home-page "https://github.com/jpvanhal/inflection")
9280 (synopsis "Python string transformation library")
9281 (description
9282 "Inflection is a string transformation library. It singularizes
9283and pluralizes English words, and transforms strings from CamelCase to
9284underscored string.")
9285 (license license:expat)))
9286
9287(define-public python2-inflection
9288 (package-with-python2 python-inflection))
9289
9290(define-public python-pylev
9291 (package
9292 (name "python-pylev")
9293 (version "1.3.0")
9294 (source (origin
9295 (method url-fetch)
9296 (uri (pypi-uri "pylev" version))
9297 (sha256
9298 (base32
9299 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
9300 (build-system python-build-system)
9301 (home-page "https://github.com/toastdriven/pylev")
9302 (synopsis "Levenshtein distance implementation in Python")
9303 (description "Pure Python Levenshtein implementation, based off the
9304Wikipedia code samples at
9305@url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
9306 (license license:bsd-3)))
9307
9308(define-public python2-pylev
9309 (package-with-python2 python-pylev))
9310
9311(define-public python-cleo
9312 (package
9313 (name "python-cleo")
9314 (version "0.6.1")
9315 (source (origin
9316 (method url-fetch)
9317 (uri (pypi-uri "cleo" version))
9318 (sha256
9319 (base32
9320 "0q1cf0szr0d54am4pypzwdnm74zpladdsinad94c2fz5i06fdpf7"))))
9321 (build-system python-build-system)
9322 (native-inputs
9323 `(;; For testing
9324 ("python-mock" ,python-mock)
9325 ("python-pytest-mock" ,python-pytest-mock)
9326 ("python-pytest" ,python-pytest)))
9327 (propagated-inputs
9328 `(("python-backpack" ,python-backpack)
9329 ("python-pastel" ,python-pastel)
9330 ("python-pylev" ,python-pylev)))
9331 (home-page "https://github.com/sdispater/cleo")
9332 (synopsis "Command-line arguments library for Python")
9333 (description
9334 "Cleo allows you to create command-line commands with signature in
9335docstring and colored output.")
9336 (license license:expat)))
9337
9338(define-public python2-cleo
9339 (package-with-python2 python-cleo))
9340
9341(define-public python-lazy-object-proxy
9342 (package
9343 (name "python-lazy-object-proxy")
9344 (version "1.3.1")
9345 (source (origin
9346 (method url-fetch)
9347 (uri (pypi-uri "lazy-object-proxy" version))
9348 (sha256
9349 (base32
9350 "0yha7q9bhw857fwaby785d63mffhngl9npwzlk9i0pwlkwvbx4gb"))))
9351 (build-system python-build-system)
9352 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
9353 (synopsis "Lazy object proxy for python")
9354 (description
9355 "Lazy object proxy is an object that wraps a callable but defers the call
9356until the object is actually required, and caches the result of said call.")
9357 (license license:bsd-2)))
9358
9359(define-public python2-lazy-object-proxy
9360 (package-with-python2 python-lazy-object-proxy))
9361
9362(define-public python-dnspython
9363 (package
9364 (name "python-dnspython")
9365 (version "1.15.0")
9366 (source (origin
9367 (method url-fetch)
9368 (uri (string-append "http://www.dnspython.org/kits/"
9369 version "/dnspython-" version ".tar.gz"))
9370 (sha256
9371 (base32
9372 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
9373 (build-system python-build-system)
9374 (arguments '(#:tests? #f)) ; XXX: requires internet access
9375 (home-page "http://www.dnspython.org")
9376 (synopsis "DNS toolkit for Python")
9377 (description
9378 "dnspython is a DNS toolkit for Python. It supports almost all record
9379types. It can be used for queries, zone transfers, and dynamic updates.
9380It supports TSIG authenticated messages and EDNS0.")
9381 (license license:expat)))
9382
9383(define-public python2-dnspython
9384 (package-with-python2 python-dnspython))
9385
9386(define-public python-email-validator
9387 (package
9388 (name "python-email-validator")
9389 (version "1.0.2")
9390 (source
9391 (origin (method url-fetch)
9392 (uri (pypi-uri "email_validator" version))
9393 (sha256
9394 (base32
9395 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
9396 (build-system python-build-system)
9397 (arguments
9398 '(#:phases
9399 (modify-phases %standard-phases
9400 (add-before 'build 'use-dnspython
9401 (lambda _
9402 (substitute* "setup.py"
9403 (("dnspython3") "dnspython"))
9404 #t)))))
9405 (propagated-inputs
9406 `(("python-dnspython" ,python-dnspython)
9407 ("python-idna" ,python-idna)))
9408 (home-page "https://github.com/JoshData/python-email-validator")
9409 (synopsis "Email address validation library for Python")
9410 (description
9411 "This library validates email address syntax and deliverability.")
9412 (license license:cc0)))
9413
9414(define-public python2-email-validator
9415 (package-with-python2 python-email-validator))
9416
9417(define-public python-ukpostcodeparser
9418 (package
9419 (name "python-ukpostcodeparser")
9420 (version "1.0.3")
9421 (source (origin
9422 (method url-fetch)
9423 (uri (pypi-uri "UkPostcodeParser" version))
9424 (sha256
9425 (base32
9426 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
9427 (build-system python-build-system)
9428 (home-page "https://github.com/hamstah/ukpostcodeparser")
9429 (synopsis "UK Postcode parser for Python")
9430 (description
9431 "This library provides the @code{parse_uk_postcode} function for
9432parsing UK postcodes.")
9433 (license license:expat)))
9434
9435(define-public python2-ukpostcodeparser
9436 (package-with-python2 python-ukpostcodeparser))
9437
9438(define-public python-faker
9439 (package
9440 (name "python-faker")
9441 (version "0.7.9")
9442 (source (origin
9443 (method url-fetch)
9444 (uri (pypi-uri "Faker" version))
9445 (sha256
9446 (base32
9447 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
9448 (patches
9449 (search-patches "python-faker-fix-build-32bit.patch"))
9450 (modules '((guix build utils)))
9451 (snippet
9452 '(begin
9453 (for-each delete-file (find-files "." "\\.pyc$"))
9454 #t))))
9455 (build-system python-build-system)
9456 (arguments
9457 '(#:phases
9458 (modify-phases %standard-phases
9459 (replace 'check
49ff8827 9460 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
44d10b1f
RW
9461 (native-inputs
9462 `(;; For testing
9463 ("python-email-validator" ,python-email-validator)
9464 ("python-mock" ,python-mock)
9465 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
9466 (propagated-inputs
9467 `(("python-dateutil" ,python-dateutil)
9468 ("python-six" ,python-six)))
9469 (home-page "https://github.com/joke2k/faker")
9470 (synopsis "Python package that generates fake data")
9471 (description
9472 "Faker is a Python package that generates fake data such as names,
9473addresses, and phone numbers.")
9474 (license license:expat)
9475 (properties `((python2-variant . ,(delay python2-faker))))))
9476
9477(define-public python2-faker
9478 (let ((base (package-with-python2 (strip-python2-variant
9479 python-faker))))
9480 (package
9481 (inherit base)
9482 (propagated-inputs
9483 `(("python2-ipaddress" ,python2-ipaddress)
9484 ,@(package-propagated-inputs base))))))
9485
9486(define-public python-pyaml
9487 (package
9488 (name "python-pyaml")
9489 (version "18.11.0")
9490 (source (origin
9491 (method url-fetch)
9492 (uri (pypi-uri "pyaml" version))
9493 (sha256
9494 (base32
9495 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
9496 (build-system python-build-system)
9497 (native-inputs
9498 `(("python-unidecode" ,python-unidecode)))
9499 (propagated-inputs
9500 `(("python-pyyaml" ,python-pyyaml)))
9501 (home-page "https://github.com/mk-fg/pretty-yaml")
9502 (synopsis "YAML pretty-print library for Python")
9503 (description
9504 "pyaml is a PyYAML based python module to produce pretty and readable
9505YAML-serialized data.")
9506 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
9507
9508(define-public python2-pyaml
9509 (package-with-python2 python-pyaml))
9510
9511(define-public python-backpack
9512 (package
9513 (name "python-backpack")
9514 (version "0.1")
9515 (source
9516 (origin
9517 (method url-fetch)
9518 (uri (pypi-uri "backpack" version))
9519 (sha256
9520 (base32
9521 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
9522 (build-system python-build-system)
9523 (native-inputs
9524 `(("python-pytest" ,python-pytest)
9525 ("python-nose" ,python-nose)))
9526 (propagated-inputs
9527 `(("python-simplejson" ,python-simplejson)))
9528 (home-page "https://github.com/sdispater/backpack")
9529 (synopsis "Utilities for working with Python collections")
9530 (description "Backpack provides some useful utilities for working with
9531collections of data.")
9532 (license license:expat)))
9533
9534(define-public python2-backpack
9535 (package-with-python2 python-backpack))
9536
9537(define-public python-prompt-toolkit
9538 (package
9539 (name "python-prompt-toolkit")
9540 (version "2.0.7")
9541 (source
9542 (origin
9543 (method url-fetch)
9544 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
9545 (sha256
9546 (base32
9547 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
9548 (build-system python-build-system)
9549 (arguments
9550 `(#:phases
9551 (modify-phases %standard-phases
9552 (delete 'check)
9553 (add-after 'install 'post-install-check
9554 (lambda* (#:key inputs outputs #:allow-other-keys)
9555 ;; HOME is needed for the test
9556 ;; "test_pathcompleter_can_expanduser".
9557 (setenv "HOME" "/tmp")
9558 (add-installed-pythonpath inputs outputs)
9559 (invoke "py.test"))))))
9560 (propagated-inputs
9561 `(("python-wcwidth" ,python-wcwidth)
9562 ("python-six" ,python-six)
9563 ("python-pygments" ,python-pygments)))
9564 (native-inputs
9565 `(("python-pytest" ,python-pytest)))
9566 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
9567 (synopsis "Library for building command line interfaces in Python")
9568 (description
9569 "Prompt-Toolkit is a library for building interactive command line
9570interfaces in Python. It's like GNU Readline but it also features syntax
9571highlighting while typing, out-of-the-box multi-line input editing, advanced
9572code completion, incremental search, support for Chinese double-width
9573characters, mouse support, and auto suggestions.")
9574 (license license:bsd-3)))
9575
9576(define-public python2-prompt-toolkit
9577 (package-with-python2 python-prompt-toolkit))
9578
9579(define-public python-prompt-toolkit-1
9580 (package (inherit python-prompt-toolkit)
9581 (version "1.0.15")
9582 (source
9583 (origin
9584 (method url-fetch)
9585 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
9586 (sha256
9587 (base32
9588 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
9589
9590(define-public python2-prompt-toolkit-1
9591 (package-with-python2 python-prompt-toolkit-1))
9592
9593(define-public python-jedi
9594 (package
9595 (name "python-jedi")
40bd0aa3 9596 (version "0.13.2")
44d10b1f
RW
9597 (source
9598 (origin
9599 (method url-fetch)
9600 (uri (pypi-uri "jedi" version))
9601 (sha256
9602 (base32
40bd0aa3 9603 "1za944msp0f8x36qa8l309jhv0kzlsdh7r9nj3z12y8npnsh45sp"))))
44d10b1f
RW
9604 (build-system python-build-system)
9605 (arguments
40bd0aa3 9606 `( ;; Many tests are failing with Python 3.7.x as of version 0.13.2 (see:
44d10b1f
RW
9607 ;; https://github.com/davidhalter/jedi/issues/1263)
9608 #:tests? #f
9609 #:phases
9610 (modify-phases %standard-phases
9611 (replace 'check
9612 (lambda* (#:key tests? #:allow-other-keys)
9613 (when tests?
9614 (invoke "py.test" "-vv")))))))
9615 (native-inputs
9616 `(("python-pytest" ,python-pytest)
9617 ("python-docopt" ,python-docopt)))
9618 (propagated-inputs
9619 `(("python-parso" ,python-parso)))
9620 (home-page "https://github.com/davidhalter/jedi")
9621 (synopsis "Autocompletion and static analysis library for Python")
9622 (description
9623 "Jedi is a static analysis tool for Python that can be used in Integrated
9624Development Environments (@dfn{IDE}s) and text editors. It understands Python
9625on a deeper level than many other static analysis frameworks for Python.
9626
9627Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
9628well.")
9629 (license license:expat)))
9630
9631(define-public python2-jedi
9632 (package-with-python2 python-jedi))
9633
9634(define-public ptpython
9635 (package
9636 (name "ptpython")
9637 (version "0.34")
9638 (source (origin
9639 (method url-fetch)
9640 (uri (pypi-uri "ptpython" version))
9641 (sha256
9642 (base32
9643 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
9644 (build-system python-build-system)
9645 (arguments
9646 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
9647 (propagated-inputs
9648 `(("python-docopt" ,python-docopt)
9649 ("python-jedi" ,python-jedi)
9650 ("python-prompt-toolkit" ,python-prompt-toolkit)
9651 ("python-pygments" ,python-pygments)))
9652 (home-page "https://github.com/jonathanslenders/ptpython")
9653 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
9654 (description
9655 "ptpython is a Python read-eval-print loop with IDE-like features.
9656It supports syntax highlighting, multiline editing, autocompletion, mouse,
9657color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
9658etc.")
9659 (license license:bsd-3)
9660 (properties `((python2-variant . ,(delay ptpython-2))))))
9661
9662(define-public ptpython-2
9663 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
9664 (package
9665 (inherit base)
9666 (name "ptpython2"))))
9667
9668(define-public python-stem
9669 (package
9670 (name "python-stem")
9671 (version "1.7.0")
9672 (source
9673 (origin
9674 (method url-fetch)
9675 (uri (pypi-uri "stem" version))
9676 (sha256
9677 (base32
9678 "1awiglfiajnx2hva9aqpj3fmdvdb4qg7cwnlfyih827m68y3cq8v"))))
9679 (build-system python-build-system)
9680 (arguments
9681 `(#:phases
9682 (modify-phases %standard-phases
9683 (replace 'check
9684 (lambda _
9685 (invoke "./run_tests.py" "--unit")
9686 #t)))))
9687 (native-inputs
9688 `(("python-mock" ,python-mock)
9689 ("python-pycodestyle" ,python-pycodestyle)
9690 ("python-pyflakes" ,python-pyflakes)))
9691 (home-page "https://stem.torproject.org/")
9692 (synopsis
9693 "Python controller library that allows applications to interact with Tor")
9694 (description
9695 "Stem is a Python controller library for Tor. With it you can use Tor's
9696control protocol to script against the Tor process and read descriptor data
9697relays publish about themselves.")
9698 (license license:lgpl3)))
9699
9700(define-public python2-stem
9701 (package-with-python2 python-stem))
9702
9703(define-public python-pyserial
9704 (package
9705 (name "python-pyserial")
9706 (version "3.1.1")
9707 (source
9708 (origin
9709 (method url-fetch)
9710 (uri (pypi-uri "pyserial" version))
9711 (sha256
9712 (base32
9713 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
9714 (build-system python-build-system)
9715 (arguments
9716 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
9717 ;; #:phases
9718 ;; (modify-phases %standard-phases
9719 ;; (replace 'check
9720 ;; (lambda _
9721 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
9722 (home-page
9723 "https://github.com/pyserial/pyserial")
9724 (synopsis "Python Serial Port Bindings")
9725 (description "@code{pyserial} provide serial port bindings for Python. It
9726supports different byte sizes, stop bits, parity and flow control with RTS/CTS
9727and/or Xon/Xoff. The port is accessed in RAW mode.")
9728 (license license:bsd-3)))
9729
9730(define-public python2-pyserial
9731 (package-with-python2 python-pyserial))
9732
9733(define-public python-kivy
9734 (package
9735 (name "python-kivy")
9736 (version "1.10.1")
9737 (source
9738 (origin
9739 (method url-fetch)
9740 (uri (pypi-uri "Kivy" version))
9741 (file-name (string-append name "-" version ".tar.gz"))
9742 (sha256
9743 (base32
9744 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
9745 (build-system python-build-system)
9746 (arguments
9747 `(#:tests? #f ; Tests require many optional packages
9748 #:phases
9749 (modify-phases %standard-phases
9750 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
9751 (lambda* (#:key inputs #:allow-other-keys)
9752 (setenv "KIVY_SDL2_PATH"
9753 (string-append (assoc-ref inputs "sdl-union")
9754 "/include/SDL2"))
9755 #t)))))
9756 (native-inputs
9757 `(("git" ,git)
9758 ("pkg-config" ,pkg-config)
9759 ("python-cython" ,python-cython)))
9760 (inputs
9761 `(("gstreamer" ,gstreamer)
9762 ("mesa" ,mesa)
9763 ("sdl-union"
9764 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
9765 (home-page "http://kivy.org")
9766 (synopsis
9767 "Multitouch application framework")
9768 (description
9769 "A software library for rapid development of
9770hardware-accelerated multitouch applications.")
9771 (license license:expat)))
9772
9773(define-public python2-kivy
9774 (package-with-python2 python-kivy))
9775
9776(define-public python-kivy-next
9777 (deprecated-package "python-kivy-next" python-kivy))
9778
9779(define-public python2-kivy-next
9780 (deprecated-package "python2-kivy-next" python2-kivy))
9781
9782(define-public python-binaryornot
9783 (package
9784 (name "python-binaryornot")
9785 (version "0.4.4")
9786 (source (origin
9787 (method url-fetch)
9788 (uri (pypi-uri "binaryornot" version))
9789 (sha256
9790 (base32
9791 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
9792 (build-system python-build-system)
9793 (propagated-inputs
9794 `(("python-chardet" ,python-chardet)
9795 ("python-hypothesis" ,python-hypothesis)))
9796 (home-page "https://github.com/audreyr/binaryornot")
9797 (synopsis "Package to check if a file is binary or text")
9798 (description "Ultra-lightweight pure Python package to check if a file is
9799binary or text.")
9800 (license license:bsd-3)
9801 (properties `((python2-variant . ,(delay python2-binaryornot))))))
9802
9803(define-public python2-binaryornot
9804 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
9805 (package (inherit base)
9806 (propagated-inputs
9807 `(("python2-enum34" ,python2-enum34)
9808 ,@(package-propagated-inputs base))))))
9809
9810(define-public python-nltk
9811 (package
9812 (name "python-nltk")
9813 (version "3.2.1")
9814 (source (origin
9815 (method url-fetch)
9816 (uri (pypi-uri "nltk" version))
9817 (sha256
9818 (base32
9819 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
9820 (build-system python-build-system)
9821 (arguments
9822 '(;; The tests require some extra resources to be downloaded.
9823 ;; TODO Try packaging these resources.
9824 #:tests? #f))
9825 (home-page "http://nltk.org/")
9826 (synopsis "Natural Language Toolkit")
9827 (description "It provides interfaces to over 50 corpora and lexical
9828resources such as WordNet, along with a suite of text processing libraries
9829for classification, tokenization, stemming, tagging, parsing, and semantic
9830reasoning, wrappers for natural language processing libraries.")
9831 (license license:asl2.0)))
9832
9833(define-public python2-nltk
9834 (package-with-python2 python-nltk))
9835
9836(define-public python-pymongo
9837 (package
9838 (name "python-pymongo")
9839 (version "3.7.2")
9840 (source (origin
9841 (method url-fetch)
9842 (uri (pypi-uri "pymongo" version))
9843 (sha256
9844 (base32
9845 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
9846 (build-system python-build-system)
9847 (propagated-inputs
9848 `(("python-certifi" ,python-certifi)))
9849 (home-page "https://github.com/mongodb/mongo-python-driver")
9850 (synopsis "Python driver for MongoDB")
9851 (description "Python driver for MongoDB.")
9852 (license license:asl2.0)))
9853
9854(define-public python2-pymongo
9855 (package-with-python2 python-pymongo))
9856
44d10b1f
RW
9857(define-public python-consul
9858 (package
9859 (name "python-consul")
9860 (version "0.6.1")
9861 (source
9862 (origin
9863 (method url-fetch)
9864 (uri (pypi-uri "python-consul" version))
9865 (sha256
9866 (base32
9867 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
9868 (build-system python-build-system)
9869 (arguments
9870 '(#:tests? #f)) ; The tests are not distributed
9871 (propagated-inputs
9872 `(("python-requests" ,python-requests)
9873 ("python-six" ,python-six)))
9874 (home-page "https://github.com/cablehead/python-consul")
9875 (synopsis "Python client for Consul")
9876 (description
9877 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
9878discovery, monitoring and configuration.")
9879 (license license:expat)))
9880
9881(define-public python2-consul
9882 (package-with-python2 python-consul))
9883
9884(define-public python-schematics
9885 (package
9886 (name "python-schematics")
9887 (version "1.1.1")
9888 (source
9889 (origin
9890 (method url-fetch)
9891 (uri (string-append
9892 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
9893 (file-name (string-append name "-" version ".tar.gz"))
9894 (sha256
9895 (base32
9896 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
9897 (build-system python-build-system)
9898 (propagated-inputs
9899 `(("python-six" ,python-six)))
9900 (arguments
9901 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
9902 ; version requirements (eg python-coveralls)
9903 (home-page "https://github.com/schematics/schematics")
9904 (synopsis "Python Data Structures for Humans")
9905 (description "Python Data Structures for Humans.")
9906 (license license:bsd-3)))
9907
9908(define-public python2-schematics
9909 (package-with-python2 python-schematics))
9910
9911(define-public python-odfpy
9912 (package
9913 (name "python-odfpy")
9914 (version "1.3.3")
9915 (source (origin
9916 (method url-fetch)
9917 (uri (pypi-uri "odfpy" version))
9918 (sha256
9919 (base32
9920 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
9921 (arguments
9922 `(#:modules ((srfi srfi-1)
9923 (guix build python-build-system)
9924 (guix build utils))
9925 #:phases
9926 (modify-phases %standard-phases
9927 (replace 'check
9928 ;; The test runner invokes python2 and python3 for test*.py.
9929 ;; To avoid having both in inputs, we replicate it here.
9930 (lambda _
21ccc01d
RW
9931 (for-each (lambda (test-file) (invoke "python" test-file))
9932 (find-files "tests" "^test.*\\.py$"))
9933 #t)))))
44d10b1f
RW
9934 (build-system python-build-system)
9935 (home-page "https://github.com/eea/odfpy")
9936 (synopsis "Python API and tools to manipulate OpenDocument files")
9937 (description "Collection of libraries and utility programs written in
9938Python to manipulate OpenDocument 1.2 files.")
9939 (license
9940 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
9941 ;; number of files with other licenses.
9942 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
9943
9944(define-public python2-odfpy
9945 (package-with-python2 python-odfpy))
9946
9947(define-public python-natsort
9948 (package
9949 (name "python-natsort")
9950 (version "5.4.1")
9951 (source (origin
9952 (method url-fetch)
9953 (uri (pypi-uri "natsort" version))
9954 (sha256
9955 (base32
9956 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
9957 (build-system python-build-system)
9958 (arguments
9959 `(#:modules ((guix build utils)
9960 (guix build python-build-system)
9961 (srfi srfi-1)
9962 (srfi srfi-26)
9963 (ice-9 ftw))
9964 #:phases
9965 (modify-phases %standard-phases
9966 (add-before 'check 'set-cachedir
9967 ;; Tests require write access to $HOME by default
9968 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
9969 (replace 'check
9970 (lambda _
9971 (let ((cwd (getcwd)))
9972 (setenv "PYTHONPATH"
9973 (string-append
9974 cwd "/build/"
9975 (find (cut string-prefix? "lib" <>)
9976 (scandir (string-append cwd "/build")))
9977 ":"
9978 (getenv "PYTHONPATH")))
9979 (invoke "pytest" "-v")))))))
9980 (native-inputs
9981 `(("python-hypothesis" ,python-hypothesis)
9982 ("python-pytest-cov" ,python-pytest-cov)
9983 ("python-pytest-mock" ,python-pytest-mock)
9984 ("python-pytest" ,python-pytest)))
9985 (propagated-inputs ; TODO: Add python-fastnumbers.
9986 `(("python-pyicu" ,python-pyicu)))
9987 (home-page "https://github.com/SethMMorton/natsort")
9988 (synopsis "Natural sorting for python and shell")
9989 (description
9990 "Natsort lets you apply natural sorting on lists instead of
9991lexicographical. If you use the built-in @code{sorted} method in python
9992on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
9993returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
9994function @code{natsorted} that identifies numbers and sorts them separately
9995from strings. It can also sort version numbers, real numbers, mixed types
9996and more, and comes with a shell command @command{natsort} that exposes this
9997functionality in the command line.")
9998 (license license:expat)
9999 (properties `((python2-variant . ,(delay python2-natsort))))))
10000
10001(define-public python2-natsort
10002 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
10003 (package (inherit base)
10004 (native-inputs
10005 `(("python2-pathlib" ,python2-pathlib)
10006 ,@(package-native-inputs base))))))
10007
10008(define-public python-glances
10009 (package
10010 (name "python-glances")
10011 (version "3.0.2")
10012 (source
10013 (origin
10014 (method url-fetch)
10015 (uri (pypi-uri "Glances" version))
10016 (sha256
10017 (base32
10018 "09fxysfp1n16csqvzvawy74qm6a94nvwjf3vcf5gkqp4i6k4vjjy"))))
10019 (build-system python-build-system)
10020 (propagated-inputs
10021 `(("python-psutil" ,python-psutil)))
10022 (home-page
10023 "https://github.com/nicolargo/glances")
10024 (synopsis
10025 "A cross-platform curses-based monitoring tool")
10026 (description
10027 "Glances is a curses-based monitoring tool for a wide variety of platforms.
10028Glances uses the PsUtil library to get information from your system. It monitors
10029CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
10030 (license license:lgpl3+)))
10031
10032(define-public python2-glances
10033 (package-with-python2 python-glances))
10034
10035(define-public python-graphql-core
10036 (package
10037 (name "python-graphql-core")
10038 (version "0.5.3")
10039 (source
10040 (origin
10041 (method url-fetch)
10042 (uri (pypi-uri "graphql-core" version))
10043 (sha256
10044 (base32
10045 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
10046 (build-system python-build-system)
10047 (arguments
10048 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
10049 #:phases
10050 (modify-phases %standard-phases
10051 (add-after 'unpack 'patch-hardcoded-version
10052 (lambda _ (substitute*
10053 "setup.py"
10054 (("'gevent==1.1rc1'") "'gevent'"))
10055 #t)))))
10056 (native-inputs
10057 `(("python-gevent" ,python-gevent)
10058 ("python-mock" ,python-mock)
10059 ("python-pytest-mock" ,python-pytest-mock)))
10060 (propagated-inputs
10061 `(("python-promise" ,python-promise)
10062 ("python-six" ,python-six)))
10063 (home-page "https://github.com/graphql-python/graphql-core")
10064 (synopsis "GraphQL implementation for Python")
10065 (description
10066 "GraphQL implementation for Python. GraphQL is a data query language and
10067runtime designed and used to request and deliver data to mobile and web apps.
10068This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
10069to Python.")
10070 (license license:expat)))
10071
10072(define-public python2-graphql-core
10073 (package-with-python2 python-graphql-core))
10074
10075(define-public python-graphql-relay
10076 (package
10077 (name "python-graphql-relay")
10078 (version "0.4.5")
10079 (source
10080 (origin
10081 (method url-fetch)
10082 (uri (pypi-uri "graphql-relay" version))
10083 (sha256
10084 (base32
10085 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
10086 (build-system python-build-system)
10087 (arguments
10088 '(#:tests? #f)) ; The tests are not distributed
10089 (propagated-inputs
10090 `(("python-graphql-core" ,python-graphql-core)
10091 ("python-promise" ,python-promise)
10092 ("python-six" ,python-six)))
10093 (home-page "https://github.com/graphql-python/graphql-relay-py")
10094 (synopsis "Relay implementation for Python")
10095 (description
10096 "This is a library to allow the easy creation of Relay-compliant servers
10097using the GraphQL Python reference implementation of a GraphQL server. It
10098should be noted that the code is a exact port of the original
10099@url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
10100from Facebook.")
10101 (license license:expat)))
10102
10103(define-public python2-graphql-relay
10104 (package-with-python2 python-graphql-relay))
10105
10106(define-public python-graphene
10107 (package
10108 (name "python-graphene")
10109 (version "0.10.2")
10110 (source
10111 (origin
10112 (method url-fetch)
10113 (uri (pypi-uri "graphene" version))
10114 (sha256
10115 (base32
10116 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
10117 (build-system python-build-system)
10118 (propagated-inputs
10119 `(("python-graphql-core" ,python-graphql-core)
10120 ("python-graphql-relay" ,python-graphql-relay)
10121 ("python-iso8601" ,python-iso8601)
10122 ("python-promise" ,python-promise)
10123 ("python-six" ,python-six)))
10124 (arguments
10125 `(#:tests? #f)) ; no tests/ in the PyPI tarball
10126 (home-page "http://graphene-python.org/")
10127 (synopsis "GraphQL Framework for Python")
10128 (description
10129 "Graphene is a Python library for building GraphQL schemas/types.
10130A GraphQL schema describes your data model, and provides a GraphQL server
10131with an associated set of resolve methods that know how to fetch data.")
10132 (properties `((python2-variant . ,(delay python2-graphene))))
10133 (license license:expat)))
10134
10135(define-public python2-graphene
10136 (let ((base (package-with-python2
10137 (strip-python2-variant python-graphene))))
10138 (package (inherit base)
10139 (native-inputs
10140 `(("python2-sqlalchemy" ,python2-sqlalchemy)
10141 ,@(package-native-inputs base))))))
10142
10143(define-public python-nautilus
10144 (package
10145 (name "python-nautilus")
10146 (version "0.4.9")
10147 (source
10148 (origin
10149 (method url-fetch)
10150 (uri (pypi-uri "nautilus" version))
10151 (sha256
10152 (base32
10153 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
10154 (build-system python-build-system)
10155 (arguments `(#:tests? #f)) ; fails to import test modules
10156 (propagated-inputs
10157 `(("python-bcrypt" ,python-bcrypt)
10158 ("python-click" ,python-click)
10159 ("python-consul" ,python-consul)
10160 ("python-graphene" ,python-graphene)
10161 ("python-jinja2" ,python-jinja2)
10162 ("python-peewee" ,python-peewee)
10163 ("python-pika" ,python-pika)
10164 ("python-tornado" ,python-tornado)
10165 ("python-wtforms" ,python-wtforms)))
10166 (native-inputs
10167 `(("python-nose2" ,python-nose2)))
10168 (home-page "https://github.com/AlecAivazis/nautilus")
10169 (synopsis "Library for creating microservice applications")
10170 (description
10171 "Nautilus is a framework for flux based microservices that looks to
10172provide extendible implementations of common aspects of a cloud so that you can
10173focus on building massively scalable web applications.")
10174 (license license:expat)))
10175
10176(define-public python-snowballstemmer
10177 (package
10178 (name "python-snowballstemmer")
10179 (version "1.2.1")
10180 (source (origin
10181 (method url-fetch)
10182 (uri (pypi-uri "snowballstemmer" version))
10183 (sha256
10184 (base32
10185 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
10186 (build-system python-build-system)
10187 (arguments
10188 `(;; No tests exist
10189 #:tests? #f))
10190 (home-page "https://github.com/shibukawa/snowball_py")
10191 (synopsis "Snowball stemming library collection for Python")
10192 (description "This package provides 16 word stemmer algorithms generated
10193from Snowball algorithms. It includes the 15 original ones plus the Poerter
10194English stemmer.")
10195 (license license:bsd-3)))
10196
10197(define-public python2-snowballstemmer
10198 (package-with-python2 python-snowballstemmer))
10199
10200(define-public python-sphinx-cloud-sptheme
10201 (package
10202 (name "python-sphinx-cloud-sptheme")
10203 (version "1.8.0")
10204 (source (origin
10205 (method url-fetch)
10206 (uri (pypi-uri "cloud_sptheme" version))
10207 (sha256
10208 (base32
10209 "1dniqb6a39yh786f86c4jn666rwnyi1jvzn4616zhcchb7sfdshd"))))
10210 (build-system python-build-system)
10211 ;; FIXME: The 'pypi' release archive does not contain tests.
10212 (arguments '(#:tests? #f))
10213 (native-inputs
10214 `(("python-sphinx" ,python-sphinx)))
10215 (home-page "https://bitbucket.org/ecollins/cloud_sptheme")
10216 (synopsis "'Cloud' theme for Sphinx documenter")
10217 (description "This package contains the \"Cloud\" theme for Sphinx and some
10218related extensions.")
10219 (license license:bsd-3)))
10220
10221(define-public python2-sphinx-cloud-sptheme
10222 (package-with-python2 python-sphinx-cloud-sptheme))
10223
10224(define-public python-sphinx-alabaster-theme
10225 (package
10226 (name "python-sphinx-alabaster-theme")
10227 (version "0.7.12")
10228 (source (origin
10229 (method url-fetch)
10230 (uri (pypi-uri "alabaster" version))
10231 (sha256
10232 (base32
10233 "00nwwjj2d2ym4s2kk217x7jkx1hnczc3fvm8yxbqmsp6b0nxfqd6"))))
10234 (build-system python-build-system)
10235 (propagated-inputs
10236 `(("python-pygments" ,python-pygments)))
10237 (home-page "https://alabaster.readthedocs.io/")
10238 (synopsis "Configurable sidebar-enabled Sphinx theme")
10239 (description "Alabaster is a visually (c)lean, responsive, configurable
10240theme for the Sphinx documentation system. It's the default theme of Sphinx.")
10241 (license license:bsd-3)))
10242
10243(define-public python2-sphinx-alabaster-theme
10244 (package-with-python2 python-sphinx-alabaster-theme))
10245
10246(define-public python-setproctitle
10247(package
10248 (name "python-setproctitle")
10249 (version "1.1.10")
10250 (source
10251 (origin
10252 (method url-fetch)
10253 (uri (pypi-uri "setproctitle" version))
10254 (sha256
10255 (base32
10256 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
10257 (build-system python-build-system)
10258 (arguments
10259 '(#:phases
10260 (modify-phases %standard-phases
10261 (add-before 'check 'patch-Makefile
10262 ;; Stricly this is only required for the python2 variant.
10263 ;; But adding a phase in an inherited package seems to be
10264 ;; cumbersum. So we patch even for python3.
10265 (lambda _
10266 (let ((nose (assoc-ref %build-inputs "python2-nose")))
10267 (when nose
10268 (substitute* "Makefile"
10269 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
10270 (string-append nose "/bin/nosetests "))))
10271 #t)))
10272 (replace 'check
10273 (lambda _
10274 (setenv "PYTHON" (or (which "python3") (which "python")))
10275 (setenv "PYCONFIG" (or (which "python3-config")
10276 (which "python-config")))
10277 (setenv "CC" "gcc")
10278 ;; No need to extend PYTHONPATH to find the built package, since
10279 ;; the Makefile will build anyway
10280 (invoke "make" "check"))))))
10281 (native-inputs
10282 `(("procps" ,procps))) ; required for tests
10283 (home-page
10284 "https://github.com/dvarrazzo/py-setproctitle")
10285 (synopsis
10286 "Setproctitle implementation for Python to customize the process title")
10287 (description "The library allows a process to change its title (as displayed
10288by system tools such as ps and top).
10289
10290Changing the title is mostly useful in multi-process systems, for
10291example when a master process is forked: changing the children's title
10292allows to identify the task each process is busy with. The technique
10293is used by PostgreSQL and the OpenSSH Server for example.")
10294 (license license:bsd-3)
10295 (properties `((python2-variant . ,(delay python2-setproctitle))))))
10296
10297(define-public python2-setproctitle
10298 (let ((base (package-with-python2
10299 (strip-python2-variant python-setproctitle))))
10300 (package
10301 (inherit base)
10302 (native-inputs `(("python2-nose" ,python2-nose)
10303 ,@(package-native-inputs base))))))
10304
10305(define-public python-validictory
10306 (package
10307 (name "python-validictory")
10308 (version "1.0.1")
10309 (source
10310 (origin
10311 (method url-fetch)
10312 (uri (pypi-uri "validictory" version))
10313 (sha256
10314 (base32
10315 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
10316 (build-system python-build-system)
10317 (arguments
10318 '(#:phases
10319 (modify-phases %standard-phases
10320 (add-after 'unpack 'bootstrap
10321 ;; Move the tests out of the package directory to avoid
10322 ;; packaging them.
10323 (lambda* _
10324 (rename-file "validictory/tests" "tests")
10325 (delete-file "tests/__init__.py")))
10326 (replace 'check
10327 (lambda _
10328 ;; Extend PYTHONPATH so the built package will be found.
10329 (setenv "PYTHONPATH"
10330 (string-append (getcwd) "/build/lib:"
10331 (getenv "PYTHONPATH")))
6568bd5d 10332 (invoke "py.test" "-vv" ))))))
44d10b1f
RW
10333 (native-inputs
10334 `(("python-pytest" ,python-pytest)))
10335 (home-page
10336 "https://github.com/jamesturk/validictory")
10337 (synopsis "General purpose Python data validator")
10338 (description "It allows validation of arbitrary Python data structures.
10339
10340The schema format is based on the JSON Schema
10341proposal (http://json-schema.org), so combined with json the library is also
10342useful as a validator for JSON data.")
10343 (license license:expat)))
10344
10345(define-public python2-validictory
10346 (package-with-python2 python-validictory))
10347
10348(define-public python-pyelftools
10349 (package
10350 (name "python-pyelftools")
10351 (version "0.25")
10352 (source
10353 (origin
10354 (method url-fetch)
10355 (uri (pypi-uri "pyelftools" version))
10356 (sha256
10357 (base32
10358 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
10359 (build-system python-build-system)
10360 (arguments
10361 `(#:phases
10362 (modify-phases %standard-phases
10363 (add-before 'check 'set-pythonpath
10364 (lambda _
10365 (setenv "PYTHONPATH"
10366 (string-append
10367 (getcwd) "/test/"
10368 ":" (getenv "PYTHONPATH")))
10369 #t)))))
10370 (home-page
10371 "https://github.com/eliben/pyelftools")
10372 (synopsis
10373 "Analyze binary and library file information")
10374 (description "This Python library provides interfaces for parsing and
10375analyzing two binary and library file formats; the Executable and Linking
10376Format (ELF), and debugging information in the Debugging With Attributed
10377Record Format (DWARF).")
10378 (license license:public-domain)))
10379
10380(define-public python-pyev
10381 (package
10382 (name "python-pyev")
10383 (version "0.9.0")
10384 (source
10385 (origin
10386 (method url-fetch)
10387 (uri (pypi-uri "pyev" version))
10388 (sha256
10389 (base32
10390 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
10391 (build-system python-build-system)
10392 (arguments
10393 `(#:tests? #f ; no test suite
10394 #:phases
10395 (modify-phases %standard-phases
10396 (add-after 'unpack 'patch
10397 (lambda* (#:key inputs #:allow-other-keys)
10398 (let ((libev (string-append (assoc-ref inputs "libev")
10399 "/lib/libev.so.4")))
10400 (substitute* "setup.py"
10401 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
10402 (string-append "libev_dll_name = \"" libev "\"")))))))))
10403 (inputs
10404 `(("libev" ,libev)))
10405 (home-page "http://pythonhosted.org/pyev/")
10406 (synopsis "Python libev interface")
10407 (description "Pyev provides a Python interface to libev.")
10408 (license license:gpl3)))
10409
10410(define-public python2-pyev
10411 (package-with-python2 python-pyev))
10412
10413(define-public python-imagesize
10414 (package
10415 (name "python-imagesize")
10416 (version "1.1.0")
10417 (source
10418 (origin
10419 (method url-fetch)
10420 (uri (pypi-uri "imagesize" version))
10421 (sha256
10422 (base32
10423 "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk"))))
10424 (build-system python-build-system)
10425 (home-page "https://github.com/shibukawa/imagesize_py")
10426 (synopsis "Gets image size of files in various formats in Python")
10427 (description
10428 "This package allows determination of image size from
10429PNG, JPEG, JPEG2000 and GIF files in pure Python.")
10430 (license license:expat)))
10431
10432(define-public python2-imagesize
10433 (package-with-python2 python-imagesize))
10434
10435(define-public python-termstyle
10436 (package
10437 (name "python-termstyle")
10438 (version "0.1.11")
10439 (source
10440 (origin
10441 (method url-fetch)
10442 (uri (pypi-uri "termstyle" version))
10443 (sha256
10444 (base32
10445 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
10446 (build-system python-build-system)
10447 (arguments
10448 '(#:phases
10449 (modify-phases %standard-phases
10450 (replace 'check
10451 (lambda _
831080a6 10452 (invoke "python" "test3.py"))))))
44d10b1f
RW
10453 (home-page "https://github.com/gfxmonk/termstyle")
10454 (synopsis "Console text coloring for Python")
10455 (description "This package provides console text coloring for Python.")
10456 (license license:bsd-3)))
10457
10458(define-public python-argcomplete
10459 (package
10460 (name "python-argcomplete")
10461 (version "1.7.0")
10462 (source
10463 (origin
10464 (method url-fetch)
10465 (uri (pypi-uri "argcomplete" version))
10466 (sha256
10467 (base32
10468 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
10469 (build-system python-build-system)
10470 (native-inputs
10471 `(("python-pexpect" ,python-pexpect)
10472 ("tcsh" ,tcsh)
10473 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
10474 (home-page "https://github.com/kislyuk/argcomplete")
10475 (synopsis "Shell tab completion for Python argparse")
10476 (description "argcomplete provides extensible command line tab completion
10477of arguments and options for Python scripts using @code{argparse}. It's
10478particularly useful for programs with many options or sub-parsers that can
10479dynamically suggest completions; for example, when browsing resources over the
10480network.")
10481 (license license:asl2.0)))
10482
10483(define-public python2-argcomplete
10484 (package-with-python2 python-argcomplete))
10485
10486(define-public python-xopen
10487 (package
10488 (name "python-xopen")
10489 (version "0.3.3")
10490 (source
10491 (origin
10492 (method url-fetch)
10493 (uri (pypi-uri "xopen" version))
10494 (sha256
10495 (base32
10496 "1a0wbil552wsmklwd89ssmgz3pjd86qa9i7jh8wqb9wslc8a2qjr"))
10497 (file-name (string-append name "-" version ".tar.gz"))))
10498 (build-system python-build-system)
10499 (home-page "https://github.com/marcelm/xopen/")
10500 (synopsis "Open compressed files transparently")
10501 (description "This module provides an @code{xopen} function that works like
10502Python's built-in @code{open} function, but can also deal with compressed files.
10503Supported compression formats are gzip, bzip2 and, xz, and are automatically
10504recognized by their file extensions. The focus is on being as efficient as
10505possible on all supported Python versions.")
10506 (license license:expat)))
10507
10508(define-public python2-xopen
10509 (let ((base (package-with-python2
10510 (strip-python2-variant python-xopen))))
10511 (package
10512 (inherit base)
10513 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
10514 ,@(package-propagated-inputs base))))))
10515
10516(define-public python-cheetah
10517 (package
10518 (name "python-cheetah")
10519 (version "3.1.0")
10520 (source
10521 (origin
10522 (method url-fetch)
10523 (uri (pypi-uri "Cheetah3" version))
10524 (sha256
10525 (base32
10526 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
10527 (build-system python-build-system)
10528 (arguments
10529 `(#:modules ((guix build utils)
10530 (guix build python-build-system)
10531 (ice-9 ftw)
10532 (srfi srfi-1)
10533 (srfi srfi-26))
10534 #:phases (modify-phases %standard-phases
10535 (add-after 'unpack 'use-absolute-python
10536 (lambda _
10537 (substitute* "Cheetah/CheetahWrapper.py"
10538 (("#!/usr/bin/env python")
10539 (string-append "#!" (which "python"))))
10540 #t))
10541 (replace 'check
10542 (lambda _
10543 (let ((cwd (getcwd)))
10544 (setenv "PYTHONPATH"
10545 (string-append
10546 cwd "/build/"
10547 (find (cut string-prefix? "lib" <>)
10548 (scandir (string-append cwd "/build")))
10549 ":" (getenv "PYTHONPATH")))
10550 (setenv "PATH"
10551 (string-append (getenv "PATH")
10552 ":" cwd "/bin"))
10553 (setenv "TMPDIR" "/tmp")
10554
10555 (substitute* "Cheetah/Tests/Test.py"
10556 (("unittest.TextTestRunner\\(\\)")
10557 "unittest.TextTestRunner(verbosity=2)"))
10558
10559 (invoke "python" "Cheetah/Tests/Test.py")))))))
10560 (propagated-inputs
10561 `(("python-markdown" ,python-markdown))) ;optional
10562 (home-page "http://cheetahtemplate.org/")
10563 (synopsis "Template engine")
10564 (description "Cheetah is a text-based template engine and Python code
10565generator.
10566
10567Cheetah can be used as a standalone templating utility or referenced as
10568a library from other Python applications. It has many potential uses,
10569but web developers looking for a viable alternative to ASP, JSP, PHP and
10570PSP are expected to be its principle user group.
10571
10572Features:
10573@enumerate
10574@item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
10575 text-based format.
10576@item Cleanly separates content, graphic design, and program code.
10577@item Blends the power and flexibility of Python with a simple template language
10578 that non-programmers can understand.
10579@item Gives template writers full access to any Python data structure, module,
10580 function, object, or method in their templates.
10581@item Makes code reuse easy by providing an object-orientated interface to
10582 templates that is accessible from Python code or other Cheetah templates.
10583 One template can subclass another and selectively reimplement sections of it.
10584@item Provides a simple, yet powerful, caching mechanism that can dramatically
10585 improve the performance of a dynamic website.
10586@item Compiles templates into optimized, yet readable, Python code.
10587@end enumerate")
10588 (license (license:x11-style "file://LICENSE"))))
10589
10590(define-public python2-cheetah
10591 (package-with-python2 python-cheetah))
10592
10593(define-public python-dulwich
10594 (package
10595 (name "python-dulwich")
10596 (version "0.18.6")
10597 (source
10598 (origin
10599 (method url-fetch)
10600 (uri (list (string-append "https://www.dulwich.io/releases/"
10601 "dulwich-" version ".tar.gz")
10602 (pypi-uri "dulwich" version)))
10603 (sha256
10604 (base32
10605 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
10606 (build-system python-build-system)
10607 (arguments
10608 `(#:phases
10609 (modify-phases %standard-phases
10610 (add-before 'check 'fix-tests
10611 (lambda* (#:key inputs #:allow-other-keys)
10612 ;; The tests use Popen with a custom environment which doesn't
10613 ;; include PATH.
10614 (substitute* "dulwich/tests/compat/utils.py"
10615 (("'git'") (string-append "'"
10616 (which "git")
10617 "'")))
10618 (substitute* '("dulwich/tests/test_repository.py"
10619 "dulwich/tests/test_hooks.py")
10620 (("#!/bin/sh") (string-append "#!" (which "sh"))))
10621 (setenv "TEST_RUNNER" "unittest")
10622 (setenv "PYTHONHASHSEED" "random")
10623 #t)))))
10624 (propagated-inputs
10625 `(("python-fastimport" ,python-fastimport)))
10626 (native-inputs
10627 `(("python-mock" ,python-mock)
10628 ("python-geventhttpclient" ,python-geventhttpclient)
10629 ("git" ,git)))
10630 (home-page "https://www.dulwich.io/")
10631 (synopsis "Git implementation in Python")
10632 (description "Dulwich is an implementation of the Git file formats and
10633protocols written in pure Python.")
10634 ;; Can be used with either license.
10635 (license (list license:asl2.0 license:gpl2+))))
10636
10637(define-public python2-dulwich
10638 (package-with-python2 python-dulwich))
10639
10640(define-public python-pbkdf2
10641 (package
10642 (name "python-pbkdf2")
10643 (version "1.3")
10644 (source
10645 (origin
10646 (method url-fetch)
10647 (uri (pypi-uri "pbkdf2" version))
10648 (sha256
10649 (base32
10650 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
10651 (build-system python-build-system)
10652 (arguments
10653 '(#:phases
10654 (modify-phases %standard-phases
10655 (replace 'check
10656 (lambda _
10657 (setenv "PYTHONPATH"
10658 (string-append (getcwd) "/build/lib:"
10659 (getenv "PYTHONPATH")))
ee2bb944 10660 (invoke "python" "test/test_pbkdf2.py"))))))
44d10b1f
RW
10661 (propagated-inputs
10662 `(("python-pycrypto" ,python-pycrypto))) ; optional
10663 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
10664 (synopsis "Password-based key derivation")
10665 (description "This module implements the password-based key derivation
10666function, PBKDF2, specified in RSA PKCS#5 v2.0.
10667
10668PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
10669is part of the RSA Public Key Cryptography Standards series. The provided
10670implementation takes a password or a passphrase and a salt value (and
10671optionally a iteration count, a digest module, and a MAC module) and provides
10672a file-like object from which an arbitrarly-sized key can be read.")
10673 (license license:expat)))
10674
10675(define-public python2-pbkdf2
10676 (package-with-python2 python-pbkdf2))
10677
10678(define-public python-qrcode
10679 (package
10680 (name "python-qrcode")
10681 (version "6.0")
10682 (source
10683 (origin
10684 (method url-fetch)
10685 (uri (pypi-uri "qrcode" version))
10686 (sha256
10687 (base32
10688 "1gz1g2n9kqwqkak78aavr354z1v3yyiksk7q6xp5hi1zr6s0syq3"))))
10689 (build-system python-build-system)
10690 (arguments
10691 ;; FIXME: Tests require packaging 'pymaging'.
10692 '(#:tests? #f))
10693 (propagated-inputs
10694 `(("python-lxml" ,python-lxml) ; for SVG output
10695 ("python-pillow" ,python-pillow) ; for PNG output
10696 ("python-six" ,python-six)))
10697 (inputs
10698 `(;; The setup.cfg file needs to be used, and support for this requires
10699 ;; at least version 30.3.0 of setuptools
10700 ("python-setuptools" ,python-setuptools)))
10701 (home-page "https://github.com/lincolnloop/python-qrcode")
10702 (synopsis "QR Code image generator")
10703 (description "This package provides a pure Python QR Code generator
10704module. It uses the Python Imaging Library (PIL) to allow for the generation
10705of QR Codes.
10706
10707In addition this package provides a command line tool to generate QR codes and
10708either write these QR codes to a file or do the output as ascii art at the
10709console.")
10710 (license license:bsd-3)))
10711
10712(define-public python2-qrcode
10713 (package-with-python2 python-qrcode))
10714
10715(define-public python-rst2ansi
10716 (package
10717 (name "python-rst2ansi")
10718 (version "0.1.5")
10719 (source
10720 (origin
10721 (method url-fetch)
10722 (uri (pypi-uri "rst2ansi" version))
10723 (sha256
10724 (base32
10725 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
10726 (build-system python-build-system)
10727 (propagated-inputs
10728 `(("python-docutils" ,python-docutils)))
10729 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
10730 (synopsis "Convert RST to ANSI-decorated console output")
10731 (description
10732 "Python module dedicated to rendering RST (reStructuredText) documents
10733to ansi-escaped strings suitable for display in a terminal.")
10734 (license license:expat)))
10735
10736(define-public python-ansi2html
10737 (package
10738 (name "python-ansi2html")
10739 (version "1.2.0")
10740 (source
10741 (origin
10742 (method url-fetch)
10743 (uri (pypi-uri "ansi2html" version))
10744 (sha256
10745 (base32
10746 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
10747 (build-system python-build-system)
10748 (native-inputs
10749 `(("python-mock" ,python-mock)
10750 ("python-nose" ,python-nose)))
10751 (propagated-inputs
10752 `(("python-six" ,python-six)))
10753 (home-page "https://github.com/ralphbean/ansi2html")
10754 (synopsis "Convert ANSI-decorated console output to HTML")
10755 (description
10756 "@command{ansi2html} is a Python library and command line utility for
10757convering text with ANSI color codes to HTML or LaTeX.")
10758 (license license:gpl3+)))
10759
10760(define-public python2-ansi2html
10761 (package-with-python2 python-ansi2html))
10762
10763(define-public python-ddt
10764 (package
10765 (name "python-ddt")
10766 (version "1.1.3")
10767 (source
10768 (origin
10769 (method url-fetch)
10770 (uri (pypi-uri "ddt" version))
10771 (sha256
10772 (base32
10773 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
10774 (build-system python-build-system)
10775 (native-inputs
10776 `(("python-mock" ,python-mock)
10777 ("python-nose" ,python-nose)))
10778 (propagated-inputs
10779 `(("python-six" ,python-six)
10780 ("python-pyyaml" ,python-pyyaml)))
10781 (home-page "https://github.com/txels/ddt")
10782 (synopsis "Data-Driven Tests")
10783 (description
10784 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
10785running it with different test data, and make it appear as multiple test
10786cases.")
10787 (license license:expat)))
10788
10789(define-public python2-ddt
10790 (package-with-python2 python-ddt))
10791
10792(define-public python-pycountry
10793 (package
10794 (name "python-pycountry")
10795 (version "18.5.26")
10796 (source
10797 (origin
10798 (method url-fetch)
10799 (uri (pypi-uri "pycountry" version))
10800 (sha256
10801 (base32
10802 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
10803 (build-system python-build-system)
10804 (home-page "https://bitbucket.org/flyingcircus/pycountry")
10805 (synopsis "ISO databases for languages, countries, currencies, etc.")
10806 (description
10807 "@code{pycountry} provides the ISO databases for the standards:
10808@enumerate
10809@item 639-3 (Languages)
10810@item 3166 (Countries)
10811@item 3166-3 (Deleted Countries)
10812@item 3166-2 (Subdivisions of countries)
10813@item 4217 (Currencies)
10814@item 15924 (Scripts)
10815@end enumerate
10816It includes a copy from Debian’s pkg-isocodes and makes the data accessible
10817through a Python API.")
10818 (license license:lgpl2.1+)))
10819
10820(define-public python2-pycountry
10821 (package-with-python2 python-pycountry))
10822
10823(define-public python-pycosat
10824 (package
10825 (name "python-pycosat")
10826 (version "0.6.1")
10827 (source
10828 (origin
10829 (method url-fetch)
10830 (uri (pypi-uri "pycosat" version))
10831 (sha256
10832 (base32
10833 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
10834 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
10835 (build-system python-build-system)
10836 (home-page "https://github.com/ContinuumIO/pycosat")
10837 (synopsis "Bindings to picosat (a SAT solver)")
10838 (description
10839 "This package provides efficient Python bindings to @code{picosat} on
10840the C level. When importing pycosat, the @code{picosat} solver becomes part
10841of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
10842Problem} (SAT) solver.")
10843 (license license:expat)))
10844
10845(define-public python2-pycosat
10846 (package-with-python2 python-pycosat))
10847
10848(define-public python2-ruamel.ordereddict
10849 (package
10850 (name "python2-ruamel.ordereddict")
10851 (version "0.4.9")
10852 (source
10853 (origin
10854 (method url-fetch)
10855 (uri (pypi-uri "ruamel.ordereddict" version))
10856 (sha256
10857 (base32
10858 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
10859 (build-system python-build-system)
10860 (arguments
10861 `(#:python ,python-2
10862 #:phases
10863 (modify-phases %standard-phases
10864 (delete 'check)
10865 (add-after 'install 'check
10866 (lambda* (#:key inputs outputs #:allow-other-keys)
10867 (add-installed-pythonpath inputs outputs)
f987ac30 10868 (invoke "python" "test/testordereddict.py"))))))
44d10b1f
RW
10869 (home-page "https://bitbucket.org/ruamel/ordereddict")
10870 (synopsis "Version of dict that keeps keys in insertion order")
10871 (description
10872 "This is an implementation of an ordered dictionary with @dfn{Key
10873Insertion Order} (KIO: updates of values do not affect the position of the
10874key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
10875removed and put at the back). The standard library module @code{OrderedDict},
10876implemented later, implements a subset of @code{ordereddict} functionality.
10877Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
10878Order} (KSO, no sorting function can be specified, but a transform can be
10879specified to apply on the key before comparison (e.g. @code{string.lower})).")
10880 (license license:expat)))
10881
10882(define-public python-pypeg2
10883 (package
10884 (name "python-pypeg2")
10885 (version "2.15.2")
10886 (source
10887 (origin
10888 (method url-fetch)
10889 (uri (pypi-uri "pyPEG2" version))
10890 (sha256
10891 (base32
10892 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
10893 (build-system python-build-system)
10894 (propagated-inputs `(("python-lxml" ,python-lxml)))
10895 (arguments
10896 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
10897 '(#:tests? #f))
10898 (home-page "https://fdik.org/pyPEG/")
10899 (synopsis "Parsering Expression Grammars in Python")
10900 (description "PyPEG is an intrinsic parser interpreter framework for
10901Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
10902parse many formal languages.")
10903 (license license:gpl2)))
10904
10905(define-public python-incremental
10906 (package
10907 (name "python-incremental")
10908 (version "17.5.0")
10909 (source
10910 (origin
10911 (method url-fetch)
10912 (uri (pypi-uri "incremental" version))
10913 (sha256
10914 (base32
10915 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
10916 (build-system python-build-system)
10917 (home-page "https://github.com/hawkowl/incremental")
10918 (synopsis "Library for versioning Python projects")
10919 (description "Incremental is a small library that versions your Python
10920projects.")
10921 (license license:expat)))
10922
10923(define-public python2-incremental
10924 (package-with-python2 python-incremental))
10925
10926(define-public python-invoke
10927 (package
10928 (name "python-invoke")
10929 (home-page "http://www.pyinvoke.org/")
10930 (version "1.1.0")
10931 (source (origin
10932 (method url-fetch)
10933 (uri (pypi-uri "invoke" version))
10934 (sha256
10935 (base32
10936 "0aiy1xvk1f91246zxd1zqrm679vdvd10h843a2na41cqr3cflpi6"))))
10937 (build-system python-build-system)
10938 (arguments
10939 ;; XXX: Requires many dependencies that are not yet in Guix.
10940 `(#:tests? #f))
10941 (synopsis "Pythonic task execution")
10942 (description
10943 "Invoke is a Python task execution tool and library, drawing inspiration
10944from various sources to arrive at a powerful and clean feature set. It is
10945evolved from the Fabric project, but focuses on local and abstract concerns
10946instead of servers and network commands.")
10947 (license license:bsd-3)))
10948
10949(define-public python2-invoke
10950 (package-with-python2 python-invoke))
10951
10952(define-public python-automat
10953 (package
10954 (name "python-automat")
10955 (version "0.6.0")
10956 (source (origin
10957 (method url-fetch)
10958 (uri (pypi-uri "Automat" version))
10959 (sha256
10960 (base32
10961 "1a7nsrljysfmdqmpn2apfa1gg6rfah4y9sizvns8gb08rx7d07rw"))))
10962 (build-system python-build-system)
10963 ;; We disable the tests because they require python-twisted, while
10964 ;; python-twisted depends on python-automat. Twisted is optional, but the
10965 ;; tests fail if it is not available. Also see
10966 ;; <https://github.com/glyph/automat/issues/71>.
10967 (arguments '(#:tests? #f))
10968 (native-inputs
10969 `(("python-m2r" ,python-m2r)
10970 ("python-setuptools-scm" ,python-setuptools-scm)
10971 ("python-graphviz" ,python-graphviz)))
10972 (propagated-inputs
10973 `(("python-six" ,python-six)
10974 ("python-attrs" ,python-attrs)))
10975 (home-page "https://github.com/glyph/Automat")
10976 (synopsis "Self-service finite-state machines")
10977 (description "Automat is a library for concise, idiomatic Python
10978expression of finite-state automata (particularly deterministic finite-state
10979transducers).")
10980 (license license:expat)))
10981
10982(define-public python2-automat
10983 (package-with-python2 python-automat))
10984
10985(define-public python-m2r
10986 (package
10987 (name "python-m2r")
10988 (version "0.1.12")
10989 (source (origin
10990 (method url-fetch)
10991 (uri (pypi-uri "m2r" version))
10992 (sha256
10993 (base32
10994 "1axrwnf425sz4qz3c0qc7yhhki4myzb8rki7pczcsgzznzmqdyxd"))))
10995 (build-system python-build-system)
10996 (propagated-inputs
10997 `(("python-docutils" ,python-docutils)
10998 ("python-mistune" ,python-mistune)))
10999 (native-inputs
11000 `(("python-pygments" ,python-pygments)
11001 ("python-mock" ,python-mock)))
11002 (home-page "https://github.com/miyakogi/m2r")
11003 (synopsis "Markdown to reStructuredText converter")
11004 (description "M2R converts a markdown file including reST markups to valid
11005reST format.")
11006 (license license:expat)))
11007
11008(define-public python2-m2r
11009 (package-with-python2 python-m2r))
11010
11011(define-public python-constantly
11012 (package
11013 (name "python-constantly")
11014 (version "15.1.0")
11015 (source (origin
11016 (method url-fetch)
11017 (uri (pypi-uri "constantly" version))
11018 (sha256
11019 (base32
11020 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
11021 (build-system python-build-system)
11022 (home-page "https://github.com/twisted/constantly")
11023 (synopsis "Symbolic constants in Python")
11024 (description "Constantly is a Python library that provides symbolic
11025constant support. It includes collections and constants with text, numeric,
11026and bit flag values.")
11027 (license license:expat)))
11028
11029(define-public python2-constantly
11030 (package-with-python2 python-constantly))
11031
11032(define-public python-attrs
11033 (package
11034 (name "python-attrs")
11035 (version "18.2.0")
11036 (source (origin
11037 (method url-fetch)
11038 (uri (pypi-uri "attrs" version))
11039 (sha256
11040 (base32
11041 "0s9ydh058wmmf5v391pym877x4ahxg45dw6a0w4c7s5wgpigdjqh"))))
11042 (build-system python-build-system)
11043 (arguments
11044 `(#:modules ((guix build utils)
11045 (guix build python-build-system)
11046 (ice-9 ftw)
11047 (srfi srfi-1)
11048 (srfi srfi-26))
11049 #:phases (modify-phases %standard-phases
11050 (replace 'check
11051 (lambda _
11052 (let ((cwd (getcwd)))
11053 (setenv "PYTHONPATH"
11054 (string-append
11055 cwd "/build/"
11056 (find (cut string-prefix? "lib" <>)
11057 (scandir (string-append cwd "/build")))
11058 ":"
11059 (getenv "PYTHONPATH")))
11060 (invoke "python" "-m" "pytest")))))))
11061 (native-inputs
11062 `(("python-coverage" ,python-coverage)
11063 ("python-hypothesis" ,python-hypothesis)
11064 ("python-pympler" ,python-pympler)
11065 ("python-pytest" ,python-pytest)
11066 ("python-six" ,python-six)
11067 ("python-sphinx" ,python-sphinx)
11068 ("python-zope-interface" ,python-zope-interface)))
11069 (home-page "https://github.com/python-attrs/attrs/")
11070 (synopsis "Attributes without boilerplate")
11071 (description "@code{attrs} is a Python package with class decorators that
11072ease the chores of implementing the most common attribute-related object
11073protocols.")
11074 (license license:expat)))
11075
11076(define-public python2-attrs
11077 (package-with-python2 python-attrs))
11078
11079(define-public python-attrs-bootstrap
11080 (package
11081 (inherit python-attrs)
11082 (name "python-attrs-bootstrap")
11083 ;; Keep this on a fixed version so python-attrs can be updated without
11084 ;; triggering a mass-rebuild. FIXME: Update this in the next rebuild cycle.
11085 (version "17.4.0")
11086 (source (origin
11087 (method url-fetch)
11088 (uri (pypi-uri "attrs" version))
11089 (sha256
11090 (base32
11091 "1jafnn1kzd6qhxgprhx6y6ik1r5m2rilx25syzcmq03azp660y8w"))))
11092 (native-inputs `())
11093 (arguments `(#:tests? #f))))
11094
11095(define-public python2-attrs-bootstrap
11096 (package-with-python2 python-attrs-bootstrap))
11097
11098(define-public python2-cliapp
11099 (package
11100 (name "python2-cliapp")
11101 (version "1.20170823")
11102 (source
11103 (origin
11104 (method url-fetch)
11105 (uri (string-append
11106 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
11107 version ".tar.gz"))
11108 (sha256
11109 (base32
11110 "1i9gik0xrj6jmi95s5w988jl1y265baz5xm5pbqdyvsh8h9ln6yq"))))
11111 (build-system python-build-system)
11112 (arguments
11113 `(#:python ,python-2
11114 #:phases
11115 (modify-phases %standard-phases
11116 ;; check phase needs to be run before the build phase. If not,
11117 ;; coverage-test-runner looks for tests for the built source files,
11118 ;; and fails.
11119 (delete 'check)
11120 (add-before 'build 'check
11121 (lambda _
11122 ;; Disable python3 tests
11123 (substitute* "check"
11124 (("python3") "# python3"))
6c826d32 11125 (invoke "./check"))))))
44d10b1f
RW
11126 (native-inputs
11127 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
11128 ("python2-pep8" ,python2-pep8)))
11129 (propagated-inputs
11130 `(("python2-pyaml" ,python2-pyaml)))
11131 (home-page "https://liw.fi/cliapp/")
11132 (synopsis "Python framework for command line programs")
11133 (description "@code{python2-cliapp} is a python framework for
11134command line programs. It contains the typical stuff such programs
11135need to do, such as parsing the command line for options, and
11136iterating over input files.")
11137 (license license:gpl2+)))
11138
11139(define-public python2-ttystatus
11140 (package
11141 (name "python2-ttystatus")
11142 (version "0.35")
11143 (source
11144 (origin
11145 (method url-fetch)
11146 (uri (string-append
11147 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
11148 version ".tar.gz"))
11149 (sha256
11150 (base32
11151 "0vivqbw7ddhsq1zj3g9cvvv4f0phl0pis2smsnwcr2szz2fk3hl6"))))
11152 (build-system python-build-system)
11153 (native-inputs
11154 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
11155 ("python2-pep8" ,python2-pep8)))
11156 (arguments
11157 `(#:python ,python-2
11158 #:phases
11159 (modify-phases %standard-phases
11160 ;; check phase needs to be run before the build phase. If not,
11161 ;; coverage-test-runner looks for tests for the built source files,
11162 ;; and fails.
11163 (delete 'check)
11164 (add-before 'build 'check
cbeee881 11165 (lambda _ (invoke "make" "check"))))))
44d10b1f
RW
11166 (home-page "https://liw.fi/ttystatus/")
11167 (synopsis "Python library for showing progress reporting and
11168status updates on terminals")
11169 (description "@code{python2-ttystatus} is a python library for
11170showing progress reporting and status updates on terminals, for
11171command line programs. Output is automatically adapted to the width
11172of the terminal: truncated if it does not fit, and resized if the
11173terminal size changes.")
11174 (license license:gpl3+)))
11175
11176(define-public python2-tracing
11177 (package
11178 (name "python2-tracing")
11179 (version "0.10")
11180 (source
11181 (origin
11182 (method url-fetch)
11183 (uri (string-append
11184 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
11185 version ".tar.gz"))
11186 (sha256
11187 (base32
11188 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
11189 (build-system python-build-system)
11190 (arguments
11191 `(#:python ,python-2))
11192 (home-page "https://liw.fi/tracing/")
11193 (synopsis "Python debug logging helper")
11194 (description "@code{python2-tracing} is a python library for
11195logging debug messages. It provides a way to turn debugging messages
11196on and off, based on the filename they occur in. It is much faster
11197than using @code{logging.Filter} to accomplish the same thing, which
11198matters when code is run in production mode. The actual logging still
11199happens using the @code{logging} library.")
11200 (license license:gpl3+)))
11201
11202(define-public python2-larch
11203 (package
11204 (name "python2-larch")
11205 (version "1.20151025")
11206 (source
11207 (origin
11208 (method url-fetch)
11209 (uri (string-append
11210 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
11211 version ".tar.gz"))
11212 (patches (search-patches
11213 "python2-larch-coverage-4.0a6-compatibility.patch"))
11214 (sha256
11215 (base32
11216 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
11217 (build-system python-build-system)
11218 (arguments
11219 `(#:python ,python-2
11220 #:phases
11221 (modify-phases %standard-phases
11222 ;; check phase needs to be run before the build phase. If not,
11223 ;; coverage-test-runner looks for tests for the built source files,
11224 ;; and fails.
11225 (delete 'check)
11226 (add-before 'build 'check
204ad455 11227 (lambda _ (invoke "make" "check"))))))
44d10b1f
RW
11228 (native-inputs
11229 `(("cmdtest" ,cmdtest)
11230 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
11231 (propagated-inputs
11232 `(("python2-tracing" ,python2-tracing)))
11233 (home-page "https://liw.fi/larch/")
11234 (synopsis "Python copy-on-write B-tree library")
11235 (description "@code{python2-larch} is an implementation of
11236particular kind of B-tree, based on research by Ohad Rodeh. See
11237@url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
11238on the data structure.
11239
11240The distinctive feature of this B-tree is that a node is never
11241(conceptually) modified. Instead, all updates are done by
11242copy-on-write. This makes it easy to clone a tree, and modify only the
11243clone, while other processes access the original tree.")
11244 (license license:gpl3+)))
11245
11246(define-public python-astroid
11247 (package
11248 (name "python-astroid")
11249 (version "2.1.0")
11250 (source
11251 (origin
11252 (method url-fetch)
11253 (uri (pypi-uri "astroid" version))
11254 (sha256
11255 (base32
11256 "08hz675knh4294bancdapql392fmbjyimhbyrmfkz1ka7l035c1m"))))
11257 (build-system python-build-system)
11258 (propagated-inputs
11259 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
11260 ("python-six" ,python-six)
11261 ("python-wrapt" ,python-wrapt)))
11262 (native-inputs
11263 `(("python-dateutil" ,python-dateutil)
11264 ("python-nose" ,python-nose)
11265 ("python-pytest" ,python-pytest)
11266 ("python-pytest-runner" ,python-pytest-runner)))
11267 (arguments
11268 `(#:phases
11269 (modify-phases %standard-phases
11270 (add-after 'unpack 'remove-spurious-test
11271 (lambda _
11272 ;; This can be removed after upgrading from python-3.7
11273 ;; https://github.com/PyCQA/astroid/issues/593
11274 ;; https://bugs.python.org/issue34056
11275 (delete-file "astroid/tests/unittest_modutils.py")
11276 #t))
11277 (replace 'check
11278 (lambda _
11279 (invoke "pytest" "astroid"))))))
11280 (home-page "https://github.com/PyCQA/astroid")
11281 (synopsis "Common base representation of python source code for pylint and
11282other projects")
11283 (description "@code{python-astroid} provides a common base representation
11284of python source code for projects such as pychecker, pyreverse, pylint, etc.
11285
11286It provides a compatible representation which comes from the _ast module. It
11287rebuilds the tree generated by the builtin _ast module by recursively walking
11288down the AST and building an extended ast. The new node classes have
11289additional methods and attributes for different usages. They include some
11290support for static inference and local name scopes. Furthermore, astroid
11291builds partial trees by inspecting living objects.")
11292 (license license:lgpl2.1+)
11293 (properties `((python2-variant . ,(delay python2-astroid))))))
11294
11295(define-public python2-astroid
11296 (let ((base (package-with-python2
11297 (strip-python2-variant python-astroid))))
11298 (package (inherit base)
11299 ;; Version 2.x removes python2 support.
11300 (version "1.6.5")
11301 (source
11302 (origin
11303 (method url-fetch)
11304 (uri (pypi-uri "astroid" version))
11305 (sha256
11306 (base32
11307 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
11308 (arguments
11309 (substitute-keyword-arguments (package-arguments base)
11310 ((#:phases phases)
11311 `(modify-phases ,phases
11312 (add-after 'unpack 'remove-spurious-test
11313 (lambda _
11314 ;; https://github.com/PyCQA/astroid/issues/276
11315 (delete-file "astroid/tests/unittest_brain.py")
11316 #t))
11317 (replace 'check
11318 (lambda _
11319 (invoke"python" "-m" "unittest" "discover"
11320 "-p" "unittest*.py")))))))
11321 (native-inputs `())
11322 (propagated-inputs
11323 `(("python2-backports-functools-lru-cache"
11324 ,python2-backports-functools-lru-cache)
11325 ("python2-enum34" ,python2-enum34)
11326 ("python2-singledispatch" ,python2-singledispatch)
11327 ,@(package-propagated-inputs base))))))
11328
11329(define-public python-isort
11330 (package
11331 (name "python-isort")
e2227b6a 11332 (version "4.3.4")
44d10b1f
RW
11333 (source
11334 (origin
e2227b6a
EF
11335 (method git-fetch)
11336 (uri (git-reference
11337 ;; Tests pass only from the Github sources
11338 (url "https://github.com/timothycrosley/isort")
11339 (commit version)))
11340 (file-name (git-file-name name version))
44d10b1f
RW
11341 (sha256
11342 (base32
e2227b6a 11343 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
44d10b1f
RW
11344 (build-system python-build-system)
11345 (native-inputs
11346 `(("python-mock" ,python-mock)
11347 ("python-pytest" ,python-pytest)))
11348 (home-page "https://github.com/timothycrosley/isort")
11349 (synopsis "Python utility/library to sort python imports")
11350 (description "@code{python-isort} is a python utility/library to sort
11351imports alphabetically, and automatically separated into sections. It
11352provides a command line utility, a python library and plugins for various
11353editors.")
e2227b6a
EF
11354 (license license:expat)
11355 (properties `((python2-variant . ,(delay python2-isort))))))
44d10b1f
RW
11356
11357(define-public python2-isort
e2227b6a
EF
11358 (let ((base (package-with-python2
11359 (strip-python2-variant python-isort))))
11360 (package (inherit base)
11361 (native-inputs
11362 `(("python2-futures" ,python2-futures)
11363 ,@(package-native-inputs base))))))
44d10b1f
RW
11364
11365(define-public python2-backports-functools-lru-cache
11366 (package
11367 (name "python2-backports-functools-lru-cache")
11368 (version "1.5")
11369 (source
11370 (origin
11371 (method url-fetch)
11372 ;; only the pypi tarballs contain the necessary metadata
11373 (uri (pypi-uri "backports.functools_lru_cache" version))
11374 (sha256
11375 (base32
11376 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
11377 (build-system python-build-system)
11378 (native-inputs
11379 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
11380 (arguments
11381 `(#:python ,python-2))
11382 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
11383 (synopsis "Backport of functools.lru_cache from Python 3.3")
11384 (description "@code{python2-backports-functools-lru-cache} is a backport
11385of @code{functools.lru_cache} from python 3.3.")
11386 (license license:expat)))
11387
11388(define-public python-configparser
11389 (package
11390 (name "python-configparser")
11391 (version "3.5.0")
11392 (source
11393 (origin
11394 (method url-fetch)
11395 (uri (string-append
11396 "https://bitbucket.org/ambv/configparser/get/"
11397 version ".tar.bz2"))
11398 (file-name (string-append name "-" version ".tar.gz"))
11399 (sha256
11400 (base32
11401 "0waq40as14abwzbb321hfz4vr1fi363nscy32ga14qvfygrg96wa"))))
11402 (build-system python-build-system)
809f003f 11403 (home-page "https://github.com/jaraco/configparser/")
44d10b1f
RW
11404 (synopsis "Backport of configparser from python 3.5")
11405 (description "@code{python-configparser} is a backport of
11406@code{configparser} from Python 3.5 so that it can be used directly
11407in other versions.")
11408 (license license:expat)))
11409
11410(define-public python2-configparser
11411 (package-with-python2 python-configparser))
11412
11413(define-public python-mando
11414 (package
11415 (name "python-mando")
11416 (version "0.6.4")
11417 (source (origin
11418 (method url-fetch)
11419 (uri (pypi-uri "mando" version))
11420 (sha256
11421 (base32
11422 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
11423 (build-system python-build-system)
11424 (propagated-inputs
11425 `(("python-rst2ansi" ,python-rst2ansi)
11426 ("python-six" ,python-six)))
11427 (native-inputs
11428 `(("python-pytest" ,python-pytest)))
11429 (home-page "https://mando.readthedocs.org/")
11430 (synopsis
11431 "Wrapper around argparse, allowing creation of complete CLI applications")
11432 (description
11433 "This package is a wrapper around argparse, allowing you to write complete CLI
11434applications in seconds while maintaining all the flexibility.")
11435 (license license:expat)))
11436
11437(define-public python2-mando
11438 (package-with-python2 python-mando))
11439
11440(define-public python-fudge
11441 (package
11442 (name "python-fudge")
11443 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
11444 ;; package, which is currently the only use of this package.
11445 (version "0.9.6")
11446 (source
11447 (origin
11448 (method url-fetch)
11449 (uri (pypi-uri "fudge" version))
11450 (sha256
11451 (base32
11452 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
11453 (build-system python-build-system)
11454 (arguments
11455 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
11456 (home-page "https://github.com/fudge-py/fudge")
11457 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
11458 (description
11459 "Fudge is a Python module for using fake objects (mocks and stubs) to
11460test real ones.
11461
11462In readable Python code, you declare the methods available on your fake object
11463and how they should be called. Then you inject that into your application and
11464start testing. This declarative approach means you don’t have to record and
11465playback actions and you don’t have to inspect your fakes after running code.
11466If the fake object was used incorrectly then you’ll see an informative
11467exception message with a traceback that points to the culprit.")
11468 (license license:expat)))
11469
11470(define-public python2-fudge
11471 (package-with-python2 python-fudge))
11472
11473(define-public python-mwclient
11474 (package
11475 (name "python-mwclient")
11476 (version "0.8.4")
11477 (source
11478 (origin
11479 (method url-fetch)
11480 ;; The PyPI version wouldn't contain tests.
11481 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
11482 "v" version ".tar.gz"))
11483 (file-name (string-append name "-" version ".tar.gz"))
11484 (sha256
11485 (base32
11486 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
11487 (build-system python-build-system)
11488 (propagated-inputs
11489 `(("python-requests" ,python-requests)
11490 ("python-requests-oauthlib"
11491 ,python-requests-oauthlib)
11492 ("python-six" ,python-six)))
11493 (native-inputs
11494 `(("python-mock" ,python-mock)
11495 ("python-pytest" ,python-pytest)
11496 ("python-pytest-pep8" ,python-pytest-pep8)
11497 ("python-pytest-cache" ,python-pytest-cache)
11498 ("python-pytest-cov" ,python-pytest-cov)
11499 ("python-responses" ,python-responses)))
11500 (home-page "https://github.com/btongminh/mwclient")
11501 (synopsis "MediaWiki API client")
11502 (description "This package provides a MediaWiki API client.")
11503 (license license:expat)))
11504
11505(define-public python2-mwclient
11506 (package-with-python2 python-mwclient))
11507
11508(define-public python-utils
11509 (package
11510 (name "python-utils")
11511 (version "2.1.0")
11512 (source (origin
11513 (method url-fetch)
11514 (uri (pypi-uri "python-utils" version))
11515 (sha256
11516 (base32
11517 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
11518 (build-system python-build-system)
11519 (native-inputs
11520 `(("pytest-runner" ,python-pytest-runner)
11521 ("pytest" ,python-pytest)
11522 ("six" ,python-six)))
11523 (home-page "https://github.com/WoLpH/python-utils")
11524 (synopsis "Convenient utilities not included with the standard Python install")
11525 (description
11526 "Python Utils is a collection of small Python functions and classes which
11527make common patterns shorter and easier.")
11528 (license license:bsd-2)))
11529
11530(define-public python2-utils
11531 (package-with-python2 python-utils))
11532
11533(define-public python-sphinx-me
11534 (package
11535 (name "python-sphinx-me")
11536 (version "0.3")
11537 (source
11538 (origin
11539 (method url-fetch)
11540 (uri (pypi-uri "sphinx-me" version))
11541 (sha256
11542 (base32
11543 "06jzgp213zihnvpcy2y5jy3ykid3apc2ncp2pg6a2g05lhiziglq"))))
11544 (build-system python-build-system)
11545 (home-page "https://github.com/stephenmcd/sphinx-me")
11546 (synopsis "Create a Sphinx documentation shell")
11547 (description
11548 "Create a Sphinx documentation shell for your project and include the
11549README file as the documentation index. It handles extracting the required
11550meta data such as the project name, author and version from your project for
11551use in your Sphinx docs.")
11552 (license license:bsd-2)))
11553
11554(define-public python2-sphinx-me
11555 (package-with-python2 python-sphinx-me))
11556
11557(define-public python-diff-match-patch
11558 (package
11559 (name "python-diff-match-patch")
11560 (version "20121119")
11561 (source
11562 (origin
11563 (method url-fetch)
11564 (uri (pypi-uri "diff-match-patch" version))
11565 (sha256
11566 (base32
11567 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
11568 (build-system python-build-system)
11569 (home-page "https://code.google.com/p/google-diff-match-patch")
11570 (synopsis "Synchronize plain text")
11571 (description "Diff Match and Patch libraries offer robust algorithms to
11572perform the operations required for synchronizing plain text.")
11573 (license license:asl2.0)))
11574
11575(define-public python2-diff-match-patch
11576 (package-with-python2 python-diff-match-patch))
11577
11578(define-public python-dirsync
11579 (package
11580 (name "python-dirsync")
11581 (version "2.2.3")
11582 (source
11583 (origin
11584 (method url-fetch)
11585 (uri (pypi-uri "dirsync" version))
11586 (sha256
11587 (base32
11588 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
11589 (build-system python-build-system)
11590 (propagated-inputs
11591 `(("six" ,python-six)))
11592 (home-page "https://bitbucket.org/tkhyn/dirsync")
11593 (synopsis "Advanced directory tree synchronisation tool")
11594 (description "Advanced directory tree synchronisation tool.")
11595 (license license:expat)))
11596
11597(define-public python2-dirsync
11598 (package-with-python2 python-dirsync))
11599
11600(define-public python-levenshtein
11601 (package
11602 (name "python-levenshtein")
11603 (version "0.12.0")
11604 (source
11605 (origin
11606 (method url-fetch)
11607 (uri (pypi-uri "python-Levenshtein" version))
11608 (sha256
11609 (base32
11610 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
11611 (build-system python-build-system)
11612 (home-page "https://github.com/ztane/python-Levenshtein")
11613 (synopsis "Fast computation of Levenshtein distance and string similarity")
11614 (description
11615 "The Levenshtein Python C extension module contains functions for fast computation of
11616@enumerate
11617@item Levenshtein (edit) distance, and edit operations
11618@item string similarity
11619@item approximate median strings, and generally string averaging
11620@item string sequence and set similarity
11621@end enumerate
11622It supports both normal and Unicode strings.")
11623 (license license:gpl2+)))
11624
11625(define-public python2-levenshtein
11626 (package-with-python2 python-levenshtein))
11627
11628(define-public python-scandir
11629 (package
11630 (name "python-scandir")
11631 (version "1.9.0")
11632 (source
11633 (origin
11634 (method url-fetch)
11635 (uri (pypi-uri "scandir" version))
11636 (sha256
11637 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
11638 (build-system python-build-system)
11639 (arguments
11640 `(#:phases (modify-phases %standard-phases
11641 (replace 'check
11642 (lambda _
11643 (invoke "python" "test/run_tests.py"))))))
11644 (home-page "https://github.com/benhoyt/scandir")
11645 (synopsis "Directory iteration function")
11646 (description
11647 "Directory iteration function like os.listdir(), except that instead of
11648returning a list of bare filenames, it yields DirEntry objects that include
11649file type and stat information along with the name. Using scandir() increases
11650the speed of os.walk() by 2-20 times (depending on the platform and file
11651system) by avoiding unnecessary calls to os.stat() in most cases.
11652
11653This package is part of the Python standard library since version 3.5.")
11654 (license license:bsd-3)))
11655
11656(define-public python2-scandir
11657 (package-with-python2 python-scandir))
11658
11659(define-public python2-stemming
11660 (package
11661 (name "python2-stemming")
11662 (version "1.0.1")
11663 (source
11664 (origin
11665 (method url-fetch)
11666 (uri (pypi-uri "stemming" version))
11667 (sha256
11668 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
11669 (build-system python-build-system)
11670 (arguments
11671 `(#:python ,python-2))
11672 (home-page "https://bitbucket.org/mchaput/stemming/overview")
11673 (synopsis "Python implementations of various stemming algorithms")
11674 (description
11675 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
11676stemming algorithms for English. These implementations are straightforward and
11677efficient, unlike some Python versions of the same algorithms available on the
11678Web. This package is an extraction of the stemming code included in the Whoosh
11679search engine.")
11680 (license license:public-domain)))
11681
11682(define-public python-factory-boy
11683 (package
11684 (name "python-factory-boy")
11685 (version "2.8.1")
11686 (source
11687 (origin
11688 (method url-fetch)
11689 (uri (pypi-uri "factory_boy" version))
11690 (sha256
11691 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
11692 (build-system python-build-system)
11693 (arguments
11694 ;; Tests are not included in the tarball.
11695 `(#:tests? #f))
11696 (propagated-inputs
11697 `(("faker" ,python-faker)))
11698 (home-page "https://github.com/benhoyt/scandir")
11699 (synopsis "Versatile test fixtures replacement")
11700 (description
11701 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
11702
11703As a fixtures replacement tool, it aims to replace static, hard to maintain
11704fixtures with easy-to-use factories for complex object.
11705
11706Instead of building an exhaustive test setup with every possible combination
11707of corner cases, factory_boy allows you to use objects customized for the
11708current test, while only declaring the test-specific fields")
11709 (license license:expat)))
11710
11711(define-public python2-factory-boy
11712 (package-with-python2 python-factory-boy))
11713
11714(define-public python-translate-toolkit
11715 (package
11716 (name "python-translate-toolkit")
11717 (version "2.1.0")
11718 (source
11719 (origin
11720 (method url-fetch)
11721 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
11722 (sha256
11723 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
11724 (build-system python-build-system)
11725 (native-inputs
11726 `(("python-pytest" ,python-pytest)
11727 ("python-sphinx" ,python-sphinx)))
11728 (propagated-inputs
11729 `(("python-babel" ,python-babel)
11730 ("python-beautifulsoup4" ,python-beautifulsoup4)
11731 ("python-chardet" ,python-chardet)
11732 ("python-diff-match-patch" ,python-diff-match-patch)
11733 ("python-levenshtein" ,python-levenshtein)
11734 ("python-lxml" ,python-lxml)
11735 ("python-six" ,python-six)
11736 ("python-vobject" ,python-vobject)
11737 ("python-pyyaml" ,python-pyyaml)))
11738 (arguments
11739 ;; TODO: tests are not run, because they end with
11740 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
11741 ;; 'parse_funcs'
11742 ;; during test setup.
11743 `(#:tests? #f))
11744 (home-page "http://toolkit.translatehouse.org")
11745 (synopsis "Tools and API for translation and localization engineering")
11746 (description
11747 "Tools and API for translation and localization engineering. It contains
11748several utilities, as well as an API for building localization tools.")
11749 (license license:gpl2+)))
11750
11751(define-public python2-translate-toolkit
11752 (package-with-python2 python-translate-toolkit))
11753
11754(define-public python-packaging
11755 (package
11756 (name "python-packaging")
11757 (version "18.0")
11758 (source
11759 (origin
11760 (method url-fetch)
11761 (uri (pypi-uri "packaging" version))
11762 (sha256
11763 (base32
11764 "01wq9c53ix5rz6qg2c98gy8n4ff768rmanifm8m5jpjiaizj51h8"))))
11765 (build-system python-build-system)
11766 (arguments
11767 `(#:phases (modify-phases %standard-phases
11768 (replace 'check
11769 (lambda _ (invoke "py.test" "-vv"))))))
11770 (native-inputs
11771 `(("python-pretend" ,python-pretend)
11772 ("python-pytest" ,python-pytest)))
11773 (propagated-inputs
11774 `(("python-pyparsing" ,python-pyparsing)
11775 ("python-six" ,python-six)))
11776 (home-page "https://github.com/pypa/packaging")
11777 (synopsis "Core utilities for Python packages")
11778 (description "Packaging is a Python module for dealing with Python packages.
11779It offers an interface for working with package versions, names, and dependency
11780information.")
11781 ;; From 'LICENSE': This software is made available under the terms of
11782 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
11783 ;; Contributions to this software is made under the terms of *both* these
11784 ;; licenses.
11785 (license (list license:asl2.0 license:bsd-2))))
11786
11787(define-public python2-packaging
11788 (package-with-python2 python-packaging))
11789
11790(define-public python-relatorio
11791 (package
11792 (name "python-relatorio")
11793 (version "0.8.0")
11794 (source
11795 (origin
11796 (method url-fetch)
11797 (uri (pypi-uri "relatorio" version))
11798 (sha256
11799 (base32
11800 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
11801 (build-system python-build-system)
11802 (propagated-inputs
11803 `(("python-lxml" ,python-lxml)
11804 ("python-genshi" ,python-genshi)))
11805 (native-inputs
11806 `(("python-magic" ,python-magic)))
11807 (home-page "https://relatorio.tryton.org/")
11808 (synopsis "Templating library able to output ODT and PDF files")
11809 (description "Relatorio is a templating library which provides a way to
11810easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
11811for more filetypes can be easily added by creating plugins for them.")
11812 (license license:gpl3+)))
11813
11814(define-public python2-relatorio
11815 (package-with-python2 python-relatorio))
11816
11817(define-public python-radon
11818 (package
11819 (name "python-radon")
11820 (version "2.2.0")
11821 (source
11822 (origin
11823 (method url-fetch)
11824 (uri (pypi-uri "radon" version))
11825 (sha256
11826 (base32
11827 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
11828 (build-system python-build-system)
11829 (arguments
11830 `(#:phases (modify-phases %standard-phases
11831 (replace 'check
11832 (lambda _
11833 (invoke "python" "radon/tests/run.py"))))))
11834 (propagated-inputs
11835 `(("python-colorama" ,python-colorama)
11836 ("python-flake8-polyfill" ,python-flake8-polyfill)
11837 ("python-mando" ,python-mando)))
11838 (native-inputs
11839 `(("python-pytest" ,python-pytest)
11840 ("python-pytest-mock" ,python-pytest-mock)))
11841 (home-page "https://radon.readthedocs.org/")
11842 (synopsis "Code Metrics in Python")
11843 (description "Radon is a Python tool which computes various code metrics.
11844Supported metrics are:
11845@itemize @bullet
11846@item raw metrics: SLOC, comment lines, blank lines, &c.
11847@item Cyclomatic Complexity (i.e. McCabe’s Complexity)
11848@item Halstead metrics (all of them)
11849@item the Maintainability Index (a Visual Studio metric)
11850@end itemize")
11851 (license license:expat)))
11852
11853(define-public python2-radon
11854 (package-with-python2 python-radon))
11855
11856(define-public python-sure
11857 (package
11858 (name "python-sure")
11859 (version "1.4.11")
11860 (source
11861 (origin
11862 (method url-fetch)
11863 (uri (pypi-uri "sure" version))
11864 (sha256
11865 (base32
11866 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
11867 (build-system python-build-system)
11868 (propagated-inputs
11869 `(("python-mock" ,python-mock)
11870 ("python-six" ,python-six)))
11871 (native-inputs
11872 `(("python-nose" ,python-nose)))
11873 (home-page "https://github.com/gabrielfalcao/sure")
11874 (synopsis "Automated testing library in python for python")
11875 (description
11876 "Sure is a python library that leverages a DSL for writing assertions.
11877Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
11878 (license license:gpl3+)))
11879
11880(define-public python2-sure
11881 (package-with-python2 python-sure))
11882
11883(define-public python2-couleur
11884 ;; This package does not seem to support python3 at all, hence,
11885 ;; only the python2 variant definition is provided.
11886 (package
11887 (name "python2-couleur")
11888 (version "0.6.2")
11889 (source
11890 (origin
11891 (method url-fetch)
11892 (uri (pypi-uri "couleur" version))
11893 (sha256
11894 (base32
11895 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
11896 (build-system python-build-system)
11897 (arguments
11898 `(#:python ,python-2))
11899 (home-page "https://github.com/gabrielfalcao/couleur")
11900 (synopsis
11901 "ANSI terminal tool for python, colored shell and other handy fancy features")
11902 (description
11903 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
11904terminal such as coloured output in the shell, overwriting output, indentation, etc.")
11905 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
11906 ;; https://github.com/gabrielfalcao/couleur/issues/11
11907 (license license:lgpl3+)))
11908
11909(define-public python-misaka
11910 (package
11911 (name "python-misaka")
11912 (version "2.1.0")
11913 (source
11914 (origin
11915 (method url-fetch)
11916 (uri (pypi-uri "misaka" version))
11917 (sha256
11918 (base32
11919 "1yqrq3a5rracirmvk52n28nn6ckdaz897gnigv89a9gmyn87sqw7"))))
11920 (build-system python-build-system)
11921 (arguments
11922 `(;; Line 37 of setup.py calls self.run_command('develop')
11923 ;; in the 'check' phase. This command seems to be trying
11924 ;; to write to
11925 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
11926 ;; for which it does not have the permission to write.
11927 #:tests? #f))
11928 (propagated-inputs
11929 `(("python-cffi" ,python-cffi)))
11930 (home-page "https://github.com/FSX/misaka")
11931 (synopsis "Python binding for Hoedown")
11932 (description
11933 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
11934library written in C. It features a fast HTML renderer and functionality to make custom
11935renderers (e.g. man pages or LaTeX).")
11936 (license license:expat)))
11937
11938(define-public python2-misaka
11939 (package-with-python2 python-misaka))
11940
11941(define-public python2-steadymark
11942 ;; This is forced into being a python2 only variant
11943 ;; due to its dependence on couleur that has no support
11944 ;; for python3
11945 (package
11946 (name "python2-steadymark")
11947 (version "0.7.3")
11948 (source
11949 (origin
11950 (method url-fetch)
11951 (uri (pypi-uri "steadymark" version))
11952 (sha256
11953 (base32
11954 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
11955 (build-system python-build-system)
11956 (native-inputs
11957 `(("python-couleur" ,python2-couleur)
11958 ("python-sure" ,python2-sure)
11959 ("python-misaka" ,python2-misaka)))
11960 (arguments
11961 `(#:python ,python-2
11962 #:phases
11963 (modify-phases %standard-phases
11964 (add-before 'build 'patch-setup-py
11965 (lambda _
11966 ;; Update requirements from dependency==version
11967 ;; to dependency>=version
11968 (substitute* "setup.py"
11969 (("==") ">="))
11970 #t)))))
11971 (home-page "https://github.com/gabrielfalcao/steadymark")
11972 (synopsis "Markdown-based test runner for python")
11973 (description
11974 "@code{Steadymark} allows documentation to be written in github-flavoured
11975markdown. The documentation may contain snippets of code surrounded by python
11976code blocks and @code{Steadymark} will find these snippets and run them, making
11977sure that there are no old malfunctional examples in the documentation examples.")
11978 (license license:expat)))
11979
11980(define-public python-jsonpointer
11981 (package
11982 (name "python-jsonpointer")
11983 (version "1.10")
11984 (source
11985 (origin
11986 (method url-fetch)
11987 (uri (pypi-uri "jsonpointer" version))
11988 (sha256
11989 (base32
11990 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
11991 (build-system python-build-system)
11992 (home-page "https://github.com/stefankoegl/python-json-pointer")
11993 (synopsis "Identify specific nodes in a JSON document")
11994 (description "@code{jsonpointer} allows you to access specific nodes
11995by path in a JSON document (see RFC 6901).")
11996 (license license:bsd-3)))
11997
11998(define-public python2-jsonpointer
11999 (package-with-python2 python-jsonpointer))
12000
12001(define-public python-jsonpatch
12002 (package
12003 (name "python-jsonpatch")
12004 (version "1.16")
12005 (source
12006 (origin
12007 (method url-fetch)
12008 ;; pypi version lacks tests.js
12009 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12010 "archive/v" version ".tar.gz"))
12011 (file-name (string-append name "-" version ".tar.gz"))
12012 (sha256
12013 (base32
12014 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
12015 (build-system python-build-system)
12016 (native-inputs
12017 `(("python-jsonpointer" ,python-jsonpointer)))
12018 (home-page "https://github.com/stefankoegl/python-json-patch")
12019 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
12020 (description "@code{jsonpatch} is a library and program that allows
12021applying JSON Patches according to RFC 6902.")
12022 (license license:bsd-3)))
12023
12024(define-public python2-jsonpatch
12025 (package-with-python2 python-jsonpatch))
12026
12027(define-public python-jsonpatch-0.4
12028 (package (inherit python-jsonpatch)
12029 (name "python-jsonpatch")
12030 (version "0.4")
12031 (source
12032 (origin
12033 (method url-fetch)
12034 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12035 "archive/v" version ".tar.gz"))
12036 (file-name (string-append name "-" version ".tar.gz"))
12037 (sha256
12038 (base32
12039 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
12040
12041(define-public python2-jsonpatch-0.4
12042 (package-with-python2 python-jsonpatch-0.4))
12043
12044(define-public python-rfc3986
12045 (package
12046 (name "python-rfc3986")
12047 (version "1.1.0")
12048 (source (origin
12049 (method url-fetch)
12050 (uri (pypi-uri "rfc3986" version))
12051 (sha256
12052 (base32
12053 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
12054 (build-system python-build-system)
12055 (arguments
12056 `(#:modules ((guix build utils)
12057 (guix build python-build-system)
12058 (ice-9 ftw)
12059 (srfi srfi-1)
12060 (srfi srfi-26))
12061 #:phases
12062 (modify-phases %standard-phases
12063 (replace 'check
12064 (lambda _
12065 (let ((cwd (getcwd)))
12066 (setenv "PYTHONPATH"
12067 (string-append cwd "/build/"
12068 (find (cut string-prefix? "lib" <>)
12069 (scandir (string-append cwd "/build")))
12070 ":"
12071 (getenv "PYTHONPATH")))
12072 (invoke "pytest" "-v")))))))
12073 (native-inputs
12074 `(("python-pytest" ,python-pytest)))
12075 (home-page "https://rfc3986.readthedocs.io/")
12076 (synopsis "Parse and validate URI references")
12077 (description
12078 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
12079validation and authority parsing. This module also supports RFC@tie{}6874
12080which adds support for zone identifiers to IPv6 addresses.")
12081 (license license:asl2.0)))
12082
12083(define-public python2-rfc3986
12084 (package-with-python2 python-rfc3986))
12085
12086(define-public python-rfc3987
12087 (package
12088 (name "python-rfc3987")
12089 (version "1.3.7")
12090 (source
12091 (origin
12092 (method url-fetch)
12093 (uri (pypi-uri "rfc3987" version))
12094 (sha256
12095 (base32
12096 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
12097 (build-system python-build-system)
12098 (home-page "https://pypi.python.org/pypi/rfc3987")
12099 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
12100 (description "@code{rfc3987} provides routines for parsing and
12101validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
12102 (license license:gpl3+)))
12103
12104(define-public python2-rfc3987
12105 (package-with-python2 python-rfc3987))
12106
12107(define-public python-validate-email
12108 (package
12109 (name "python-validate-email")
12110 (version "1.3")
12111 (source
12112 (origin
12113 (method url-fetch)
12114 (uri (pypi-uri "validate_email" version))
12115 (sha256
12116 (base32
12117 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
12118 (build-system python-build-system)
12119 (home-page "https://github.com/syrusakbary/validate_email")
12120 (synopsis "Verifies if an email address is valid and really exists")
12121 (description "@code{validate_email} can be used to verify if an email
12122address is valid and really exists.")
12123 (license license:lgpl3+)))
12124
12125(define-public python2-validate-email
12126 (package-with-python2 python-validate-email))
12127
12128(define-public python-flex
12129 (package
12130 (name "python-flex")
12131 (version "6.10.0")
12132 (source
12133 (origin
12134 (method url-fetch)
12135 (uri (pypi-uri "flex" version))
12136 (sha256
12137 (base32
12138 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
12139 (build-system python-build-system)
12140 (propagated-inputs
12141 `(("python-click" ,python-click)
12142 ("python-iso8601" ,python-iso8601)
12143 ("python-jsonpointer" ,python-jsonpointer)
12144 ("python-pyyaml" ,python-pyyaml)
12145 ("python-requests" ,python-requests)
12146 ("python-rfc3987" ,python-rfc3987)
12147 ("python-six" ,python-six)
12148 ("python-validate-email" ,python-validate-email)))
12149 (home-page "https://github.com/pipermerriam/flex")
12150 (synopsis "Validates Swagger schemata")
12151 (description "@code{flex} can be used to validate Swagger schemata.")
12152 (license license:bsd-3)))
12153
12154(define-public python2-flex
12155 (package-with-python2 python-flex))
12156
12157(define-public python-marshmallow
12158 (package
12159 (name "python-marshmallow")
12160 (version "3.0.0b14")
12161 (source
12162 (origin
12163 (method url-fetch)
12164 (uri (pypi-uri "marshmallow" version))
12165 (sha256
12166 (base32
12167 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
12168 (build-system python-build-system)
12169 (propagated-inputs
12170 `(("python-dateutil" ,python-dateutil)
12171 ("python-simplejson" ,python-simplejson)))
12172 (native-inputs
12173 `(("python-pytest" ,python-pytest)
12174 ("python-pytz" ,python-pytz)))
12175 (home-page "https://github.com/marshmallow-code/marshmallow")
12176 (synopsis "Convert complex datatypes to and from native
12177Python datatypes.")
12178 (description "@code{marshmallow} provides a library for converting
12179complex datatypes to and from native Python datatypes.")
12180 (license license:expat)))
12181
12182(define-public python2-marshmallow
12183 (package-with-python2 python-marshmallow))
12184
12185(define-public python-apispec
12186 (package
12187 (name "python-apispec")
12188 (version "0.25.3")
12189 (source
12190 (origin
12191 (method url-fetch)
12192 (uri (pypi-uri "apispec" version))
12193 (sha256
12194 (base32
12195 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
12196 (build-system python-build-system)
12197 (propagated-inputs
12198 `(("python-pyyaml" ,python-pyyaml)))
12199 (native-inputs
12200 `(("python-pytest" ,python-pytest)
12201 ("python-flask" ,python-flask)
12202 ("python-marshmallow" ,python-marshmallow)
12203 ("python-tornado" ,python-tornado)
12204 ("python-bottle" ,python-bottle)
12205 ("python-mock" ,python-mock)))
12206 (home-page "https://github.com/marshmallow-code/apispec")
12207 (synopsis "Swagger 2.0 API specification generator")
12208 (description "@code{python-apispec} is a pluggable API specification
12209generator. Currently supports the OpenAPI specification (f.k.a.
12210Swagger 2.0).")
12211 (license license:expat)))
12212
12213(define-public python2-apispec
12214 (package-with-python2 python-apispec))
12215
12216(define-public python-flasgger
12217 (package
12218 (name "python-flasgger")
12219 (version "0.6.3")
12220 (source
12221 (origin
12222 (method url-fetch)
12223 (uri (string-append "https://github.com/rochacbruno/flasgger/archive/"
12224 version ".tar.gz"))
12225 (file-name (string-append name "-" version ".tar.gz"))
12226 (sha256
12227 (base32
12228 "1gqzlm0rb55fdpsy5ipkganlx9cnpi454fqyycr03jm22zql14ay"))))
12229 (build-system python-build-system)
12230 (arguments
12231 `(#:phases
12232 (modify-phases %standard-phases
12233 (replace 'check
12234 (lambda* (#:key inputs outputs #:allow-other-keys)
12235 (substitute* "Makefile"
12236 (("flake8 flasgger --ignore=F403")
12237 "flake8 flasgger --ignore=E731,F403"))
12238 (setenv "PYTHONPATH" (string-append (getcwd)
12239 ":"
12240 (getenv "PYTHONPATH")))
ac599a09 12241 (invoke "py.test"))))))
44d10b1f
RW
12242 (propagated-inputs
12243 `(("python-flask" ,python-flask)
12244 ("python-pyyaml" ,python-pyyaml)
12245 ("python-jsonschema" ,python-jsonschema)
12246 ("python-mistune" ,python-mistune)
12247 ("python-six" ,python-six)))
12248 (native-inputs
12249 `(("python-decorator" ,python-decorator)
12250 ("python-flake8" ,python-flake8)
12251 ("python-flask-restful" ,python-flask-restful)
12252 ("python-flex" ,python-flex)
12253 ("python-pytest" ,python-pytest)
12254 ("python-pytest-cov" ,python-pytest-cov)
12255 ("python-marshmallow" ,python-marshmallow)
12256 ("python-apispec" ,python-apispec)))
12257 (home-page "https://github.com/rochacbruno/flasgger/")
12258 (synopsis "Extract Swagger specs from your Flask project")
12259 (description "@code{python-flasgger} allows extracting Swagger specs
12260from your Flask project. It is a fork of Flask-Swagger.")
12261 (license license:expat)))
12262
12263(define-public python2-flasgger
12264 (package-with-python2 python-flasgger))
12265
12266(define-public python-swagger-spec-validator
12267 (package
12268 (name "python-swagger-spec-validator")
12269 (version "2.1.0")
12270 (source
12271 (origin
12272 (method url-fetch)
12273 (uri (pypi-uri "swagger-spec-validator" version))
12274 (sha256
12275 (base32
12276 "13hkpn2lycwr0468yqhjb3kwszqf7hjwlq61w7vdxq1caz31k4nw"))))
12277 (build-system python-build-system)
12278 (propagated-inputs
12279 `(("python-jsonschema" ,python-jsonschema)
12280 ("python-six" ,python-six)))
12281 (home-page
12282 "https://github.com/Yelp/swagger_spec_validator")
12283 (synopsis "Validation of Swagger specifications")
12284 (description "@code{swagger_spec_validator} provides a library for
12285validating Swagger API specifications.")
12286 (license license:asl2.0)))
12287
12288(define-public python2-swagger-spec-validator
12289 (package-with-python2 python-swagger-spec-validator))
12290
12291(define-public python-apache-libcloud
12292 (package
12293 (name "python-apache-libcloud")
12294 (version "2.4.0")
12295 (source
12296 (origin
12297 (method url-fetch)
12298 (uri (pypi-uri "apache-libcloud" version))
12299 (sha256
12300 (base32
12301 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
12302 (build-system python-build-system)
12303 (arguments
12304 `(#:phases
12305 (modify-phases %standard-phases
12306 (add-after 'unpack 'patch-ssh
12307 (lambda* (#:key inputs #:allow-other-keys)
12308 (substitute* "libcloud/compute/ssh.py"
12309 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
12310 "/bin/ssh" "'")))
12311 #t))
12312 (add-after 'unpack 'patch-tests
12313 (lambda _
12314 (substitute* "./libcloud/test/test_file_fixtures.py"
12315 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
12316 (("def _ascii") "def _raw_data(self, method, url, body, headers):
12317 return (httplib.OK,
12318 \"1234abcd\",
12319 {\"test\": \"value\"},
12320 httplib.responses[httplib.OK])
12321 def _ascii"))
12322 (substitute* "libcloud/test/compute/test_ssh_client.py"
12323 (("class ShellOutSSHClientTests")
12324 "@unittest.skip(\"Guix container doesn't have ssh service\")
12325class ShellOutSSHClientTests")
12326 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
12327 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
12328 (("'.xF0', '.x90', '.x8D', '.x88'")
12329 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
12330 #t))
12331 (add-before 'check 'copy-secret
12332 (lambda _
12333 (copy-file "libcloud/test/secrets.py-dist"
12334 "libcloud/test/secrets.py")
12335 #t)))))
12336 (inputs
12337 `(("openssh" ,openssh)))
12338 (propagated-inputs
12339 `(("python-paramiko" ,python-paramiko)
12340 ("python-requests" ,python-requests)))
12341 (native-inputs
12342 `(("python-lockfile" ,python-lockfile)
12343 ("python-mock" ,python-mock)
12344 ("python-pytest" ,python-pytest)
12345 ("python-pytest-runner" ,python-pytest-runner)
12346 ("python-requests-mock" ,python-requests-mock)))
12347 (home-page "https://libcloud.apache.org/")
12348 (synopsis "Unified Cloud API")
12349 (description "@code{libcloud} is a Python library for interacting with
12350many of the popular cloud service providers using a unified API.")
12351 (license license:asl2.0)))
12352
12353(define-public python2-apache-libcloud
12354 (package-with-python2 python-apache-libcloud))
12355
12356(define-public python-smmap2
12357 (package
12358 (name "python-smmap2")
12359 (version "2.0.3")
12360 (source
12361 (origin
12362 (method url-fetch)
12363 (uri (pypi-uri "smmap2" version))
12364 (sha256
12365 (base32
12366 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
12367 (build-system python-build-system)
12368 (native-inputs
12369 `(("python-nosexcover" ,python-nosexcover)))
12370 (home-page "https://github.com/Byron/smmap")
12371 (synopsis "Python sliding window memory map manager")
12372 (description "@code{smmap2} is a pure Python implementation of a sliding
12373window memory map manager.")
12374 (license license:bsd-3)))
12375
12376(define-public python2-smmap2
12377 (package-with-python2 python-smmap2))
12378
12379(define-public python-regex
12380 (package
12381 (name "python-regex")
12382 (version "2017.06.07")
12383 (source (origin
12384 (method url-fetch)
12385 (uri (pypi-uri "regex" version))
12386 (sha256
12387 (base32
12388 "06r6b7yigikbj3a72whl85r2b64pj1r0ypmw9yalmkm0wnxq8mz4"))))
12389 (build-system python-build-system)
12390 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
12391 (synopsis "Alternative regular expression module")
12392 (description "This regular expression implementation is backwards-
12393compatible with the standard @code{re} module, but offers additional
12394functionality like full case-folding for case-insensitive matches in Unicode.")
12395 (license license:psfl)))
12396
12397(define-public python2-regex
12398 (package-with-python2 python-regex))
12399
12400(define-public python2-pyopengl
12401 (package
12402 (name "python2-pyopengl")
12403 (version "3.1.0")
12404 (source
12405 (origin
12406 (method url-fetch)
12407 (uri (pypi-uri "PyOpenGL" version))
12408 (sha256
12409 (base32
12410 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
12411 (arguments
12412 `(#:python ,python-2))
12413 (build-system python-build-system)
12414 (home-page "http://pyopengl.sourceforge.net")
12415 (synopsis "Standard OpenGL bindings for Python")
12416 (description
12417 "PyOpenGL is the most common cross platform Python binding to OpenGL and
12418related APIs. The binding is created using the standard @code{ctypes}
12419library.")
12420 (license license:bsd-3)))
12421
12422(define-public python2-pyopengl-accelerate
12423 (package
12424 (inherit python2-pyopengl)
12425 (name "python2-pyopengl-accelerate")
12426 (version "3.1.0")
12427 (source
12428 (origin
12429 (method url-fetch)
12430 (uri (pypi-uri "PyOpenGL-accelerate" version))
12431 (sha256
12432 (base32
12433 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
12434 (synopsis "Acceleration code for PyOpenGL")
12435 (description
12436 "This is the Cython-coded accelerator module for PyOpenGL.")))
12437
12438(define-public python-rencode
12439 (package
12440 (name "python-rencode")
12441 (version "1.0.5")
12442 (source
12443 (origin
12444 (method url-fetch)
12445 (uri (pypi-uri "rencode" version))
12446 (sha256
12447 (base32
12448 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
12449 (build-system python-build-system)
12450 (arguments
12451 `(#:phases
12452 (modify-phases %standard-phases
12453 (add-before 'check 'delete-bogus-test
12454 ;; This test requires /home/aresch/Downloads, which is not provided by
12455 ;; the build environment.
12456 (lambda _
12457 (delete-file "rencode/t.py")
12458 #t)))))
12459 (native-inputs `(("pkg-config" ,pkg-config)
12460 ("python-cython" ,python-cython)))
12461 (home-page "https://github.com/aresch/rencode")
12462 (synopsis "Serialization of heterogeneous data structures")
12463 (description
12464 "The @code{rencode} module is a data structure serialization library,
12465similar to @code{bencode} from the BitTorrent project. For complex,
12466heterogeneous data structures with many small elements, r-encoding stake up
12467significantly less space than b-encodings. This version of rencode is a
12468complete rewrite in Cython to attempt to increase the performance over the
12469pure Python module.")
12470 (license license:bsd-3)))
12471
12472(define-public python2-rencode
12473 (package-with-python2 python-rencode))
12474
12475(define-public python-xenon
12476 (package
12477 (name "python-xenon")
12478 (version "0.5.4")
12479 (source
12480 (origin
12481 (method url-fetch)
12482 (uri (pypi-uri "xenon" version))
12483 (sha256
12484 (base32
12485 "029cbhysg2vr5n4jz8gpg2793f8wkwnqpr1qgv6c1dn685vy31mc"))))
12486 (build-system python-build-system)
12487 (native-inputs
12488 `(("python-pyyaml" ,python-pyyaml)
12489 ("python-radon" ,python-radon)
12490 ("python-requests" ,python-requests)
12491 ("python-flake8" ,python-flake8)
12492 ("python-tox" ,python-tox)))
12493 (arguments
12494 `(#:phases
12495 (modify-phases %standard-phases
12496 (add-before 'build 'patch-test-requirements
12497 (lambda _
12498 ;; Remove httpretty dependency for tests.
12499 (substitute* "setup.py"
12500 (("httpretty") ""))
12501 #t)))))
12502 (home-page "https://xenon.readthedocs.org/")
12503 (synopsis "Monitor code metrics for Python on your CI server")
12504 (description
12505 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
12506Ideally, @code{xenon} is run every time code is committed. Through command
12507line options, various thresholds can be set for the complexity of code. It
12508will fail (i.e. it will exit with a non-zero exit code) when any of these
12509requirements is not met.")
12510 (license license:expat)))
12511
12512(define-public python2-xenon
12513 (package-with-python2 python-xenon))
12514
12515(define-public python-pysocks
12516 (package
12517 (name "python-pysocks")
12518 (version "1.6.8")
12519 (source
12520 (origin
12521 (method url-fetch)
12522 (uri (pypi-uri "PySocks" version))
12523 (sha256
12524 (base32
12525 "0wn6xafwy9c1gamwljw3fyvih5w19qy9xp39zmv8c90ai5ajrr9z"))))
12526 (build-system python-build-system)
12527 (arguments `(#:tests? #f))
12528 (home-page "https://github.com/Anorov/PySocks")
12529 (synopsis "SOCKS client module")
12530 (description "@code{pysocks} is an updated and semi-actively maintained
12531version of @code{SocksiPy} with bug fixes and extra features.")
12532 (license license:bsd-3)))
12533
12534(define-public python2-pysocks
12535 (package-with-python2 python-pysocks))
12536
12537(define-public python-pydiff
12538 (package
12539 (name "python-pydiff")
12540 (version "0.2")
12541 (source
12542 (origin
12543 (method url-fetch)
12544 (uri (pypi-uri "pydiff" version))
12545 (sha256
12546 (base32
12547 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
12548 (build-system python-build-system)
12549 (home-page "https://github.com/myint/pydiff")
12550 (synopsis "Library to diff two Python files at the bytecode level")
12551 (description
12552 "@code{pydiff} makes it easy to look for actual code changes while
12553ignoring formatting changes.")
12554 (license license:expat)))
12555
12556(define-public python2-pydiff
12557 (package-with-python2 python-pydiff))
12558
12559(define-public python-tqdm
12560 (package
12561 (name "python-tqdm")
12562 (version "4.19.6")
12563 (source
12564 (origin
12565 (method url-fetch)
12566 (uri (pypi-uri "tqdm" version))
12567 (sha256
12568 (base32
12569 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
12570 (build-system python-build-system)
12571 (native-inputs
12572 `(("python-flake8" ,python-flake8)
12573 ("python-nose" ,python-nose)
12574 ("python-coverage" ,python-coverage)))
12575 (home-page "https://github.com/tqdm/tqdm")
12576 (synopsis "Fast, extensible progress meter")
12577 (description
12578 "Make loops show a progress bar on the console by just wrapping any
12579iterable with @code{|tqdm(iterable)|}. Offers many options to define
12580design and layout.")
12581 (license (list license:mpl2.0 license:expat))))
12582
12583(define-public python2-tqdm
12584 (package-with-python2 python-tqdm))
12585
12586(define-public python-pkginfo
12587 (package
12588 (name "python-pkginfo")
12589 (version "1.4.2")
12590 (source
12591 (origin
12592 (method url-fetch)
12593 (uri (pypi-uri "pkginfo" version))
12594 (sha256
12595 (base32
12596 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
12597 (build-system python-build-system)
12598 (arguments
12599 ;; The tests are broken upstream.
12600 '(#:tests? #f))
12601 (home-page
12602 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
12603 (synopsis
12604 "Query metadatdata from sdists, bdists, and installed packages")
12605 (description
12606 "API to query the distutils metadata written in @file{PKG-INFO} inside a
12607source distriubtion (an sdist) or a binary distribution (e.g., created by
12608running bdist_egg). It can also query the EGG-INFO directory of an installed
12609distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
12610created by running @code{python setup.py develop}).")
12611 (license license:expat)))
12612
12613(define-public python2-pkginfo
12614 (package-with-python2 python-pkginfo))
12615
12616(define-public python-twine
12617 (package
12618 (name "python-twine")
12619 (version "1.9.1")
12620 (source
12621 (origin
12622 (method url-fetch)
12623 (uri (pypi-uri "twine" version))
12624 (sha256
12625 (base32
12626 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
12627 (build-system python-build-system)
12628 (propagated-inputs
12629 `(("python-tqdm" ,python-tqdm)
12630 ("python-pkginfo" ,python-pkginfo)
12631 ("python-requests" ,python-requests)
12632 ("python-requests-toolbelt" ,python-requests-toolbelt)))
12633 (home-page "https://github.com/pypa/twine")
12634 (synopsis "Collection of utilities for interacting with PyPI")
12635 (description
12636 "@code{twine} currently supports registering projects and uploading
12637distributions. It authenticates the user over HTTPS, allows them to pre-sign
12638their files and supports any packaging format (including wheels).")
12639 (license license:asl2.0)))
12640
12641(define-public python2-twine
12642 (package-with-python2 python-twine))
12643
12644(define-public python-linecache2
12645 (package
12646 (name "python-linecache2")
12647 (version "1.0.0")
12648 (source
12649 (origin
12650 (method url-fetch)
12651 (uri (pypi-uri "linecache2" version))
12652 (sha256
12653 (base32
12654 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
12655 (build-system python-build-system)
12656 (arguments
12657 `(;; The tests depend on unittest2, and our version is a bit too old.
12658 #:tests? #f))
12659 (native-inputs
12660 `(("python-pbr" ,python-pbr-minimal)))
12661 (home-page
12662 "https://github.com/testing-cabal/linecache2")
12663 (synopsis "Backports of the linecache module")
12664 (description
12665 "The linecache module allows one to get any line from any file, while
12666attempting to optimize internally, using a cache, the common case where many
12667lines are read from a single file.")
12668 (license license:psfl)))
12669
12670(define-public python2-linecache2
12671 (package-with-python2 python-linecache2))
12672
12673(define-public python-traceback2
12674 (package
12675 (name "python-traceback2")
12676 (version "1.4.0")
12677 (source
12678 (origin
12679 (method url-fetch)
12680 (uri (pypi-uri "traceback2" version))
12681 (sha256
12682 (base32
12683 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
12684 (build-system python-build-system)
12685 (arguments
12686 `(;; python-traceback2 and python-unittest2 depend on one another.
12687 #:tests? #f))
12688 (native-inputs
12689 `(("python-pbr" ,python-pbr-minimal)))
12690 (propagated-inputs
12691 `(("python-linecache2" ,python-linecache2)))
12692 (home-page
12693 "https://github.com/testing-cabal/traceback2")
12694 (synopsis "Backports of the traceback module")
12695 (description
12696 "This module provides a standard interface to extract, format and print
12697stack traces of Python programs. It exactly mimics the behavior of the Python
12698interpreter when it prints a stack trace.")
12699 (license license:psfl)))
12700
12701(define-public python2-traceback2
12702 (package-with-python2 python-traceback2))
12703
12704(define-public python-ratelimiter
12705 (package
12706 (name "python-ratelimiter")
12707 (version "1.2.0")
12708 (source
12709 (origin
12710 (method url-fetch)
12711 (uri (pypi-uri "ratelimiter" version))
12712 (sha256
12713 (base32
12714 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
12715 (build-system python-build-system)
12716 (arguments
12717 '(#:tests? #f)) ; There are no tests in the pypi archive.
12718 (home-page "https://github.com/RazerM/ratelimiter")
12719 (synopsis "Simple rate limiting object")
12720 (description
12721 "The @code{ratelimiter} module ensures that an operation will not be
12722executed more than a given number of times during a given period.")
12723 (license license:asl2.0)))
12724
12725(define-public python2-ratelimiter
12726 (package-with-python2 python-ratelimiter))
12727
12728(define-public python-dukpy
12729 (package
12730 (name "python-dukpy")
12731 (version "0.3")
12732 (source
12733 (origin
12734 (method url-fetch)
12735 (uri (string-append "https://github.com/kovidgoyal/dukpy/archive/v"
12736 version ".tar.gz"))
12737 (file-name (string-append name "-" version ".tar.gz"))
12738 (sha256
12739 (base32
12740 "0pj39rfwlzivqm5hkrsza7gssg6ggpxlq5ivc8f3h7x5pfgc6y6c"))))
12741 (build-system python-build-system)
12742 (home-page "https://github.com/kovidgoyal/dukpy")
12743 (synopsis "Run JavaScript in python")
12744 (description
12745 "dukpy is a JavaScript runtime environment for Python using the duktape
12746embeddable JavaScript engine.")
12747 ;; Dukpy is licensed under MIT like the embedded duktape library,
12748 ;; with 'errors.c' as GPL3.
12749 (license (list license:expat license:gpl3))))
12750
12751(define-public python2-dukpy
12752 (package-with-python2 python-dukpy))
12753
12754(define-public python-jsonrpclib-pelix
12755 (package
12756 (name "python-jsonrpclib-pelix")
12757 (version "0.3.2")
12758 (source
12759 (origin
12760 (method url-fetch)
12761 (uri (pypi-uri "jsonrpclib-pelix" version))
12762 (sha256
12763 (base32
12764 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
12765 (build-system python-build-system)
12766 (arguments
12767 `(#:tests? #f)) ; no tests in PyPI tarball
12768 (home-page "https://github.com/tcalmant/jsonrpclib/")
12769 (synopsis "JSON-RPC 2.0 client library for Python")
12770 (description
12771 "This library implements the JSON-RPC v2.0
12772specification (backwards-compatible) as a client library for Python. This
12773version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
12774services.")
12775 (license license:asl2.0)))
12776
12777(define-public python2-jsonrpclib-pelix
12778 (package-with-python2 python-jsonrpclib-pelix))
12779
12780(define-public python-setuptools-scm-git-archive
12781 (package
12782 (name "python-setuptools-scm-git-archive")
12783 (version "1.0")
12784 (source
12785 (origin
12786 (method url-fetch)
12787 (uri (pypi-uri "setuptools_scm_git_archive" version))
12788 (sha256
12789 (base32
12790 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
12791 (build-system python-build-system)
12792 (native-inputs
12793 `(("python-pytest" ,python-pytest)))
12794 (propagated-inputs
12795 `(("python-setuptools-scm" ,python-setuptools-scm)))
12796 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
12797 (synopsis "Setuptools_scm plugin for git archives")
12798 (description
12799 "The setuptools_scm_git_archive package is a plugin to
12800setuptools_scm, which supports obtaining versions from git archives that
12801belong to tagged versions.")
12802 (license license:expat)))
12803
12804(define-public python2-setuptools-scm-git-archive
12805 (package-with-python2 python-setuptools-scm-git-archive))
12806
12807(define-public python-pyclipper
12808 (package
12809 (name "python-pyclipper")
12810 (version "1.1.0.post1")
12811 (source
12812 (origin
12813 (method url-fetch)
12814 (uri (pypi-uri "pyclipper" version ".zip"))
12815 (sha256
12816 (base32
12817 "0ldbkbnx94an4zzrwb1sxmg6k0jgk4cwmvcdyy8y5k1zslc612wa"))
12818 (modules '((guix build utils)))
12819 (snippet
12820 '(begin
12821 ;; This file is generated by Cython.
12822 (delete-file "pyclipper/pyclipper.cpp") #t))))
12823 (build-system python-build-system)
12824 (arguments
12825 `(#:phases
12826 (modify-phases %standard-phases
12827 (add-before 'build 'cythonize-sources
12828 (lambda _
12829 (with-directory-excursion "pyclipper"
12830 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
12831 (propagated-inputs
12832 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
12833 (native-inputs
12834 `(("python-cython" ,python-cython)
12835 ("python-pytest" ,python-pytest)
12836 ("python-pytest-runner" ,python-pytest-runner)
12837 ("python-unittest2" ,python-unittest2)
12838 ("unzip" ,unzip)))
12839 (home-page "https://github.com/greginvm/pyclipper")
12840 (synopsis "Wrapper for Angus Johnson's Clipper library")
12841 (description
12842 "Pyclipper is a Cython wrapper for the C++ translation of the
12843Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
12844 (license license:expat)))
12845
12846(define-public python2-pyclipper
12847 (package-with-python2 python-pyclipper))
12848
12849(define-public python2-booleanoperations
12850 (package
12851 (name "python2-booleanoperations")
12852 (version "0.7.1")
12853 (source
12854 (origin
12855 (method url-fetch)
12856 (uri (pypi-uri "booleanOperations" version ".zip"))
12857 (sha256
12858 (base32
12859 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
12860 (build-system python-build-system)
12861 (arguments
12862 `(#:python ,python-2))
12863 (native-inputs
12864 `(("unzip" ,unzip)
12865 ("python2-pytest" ,python2-pytest)
12866 ("python2-pytest-runner" ,python2-pytest-runner)))
12867 (propagated-inputs
12868 `(("python-fonttools" ,python2-fonttools)
12869 ("python-pyclipper" ,python2-pyclipper)
12870 ("python-ufolib" ,python2-ufolib)))
12871 (home-page "https://github.com/typemytype/booleanOperations")
12872 (synopsis "Boolean operations on paths")
12873 (description
12874 "BooleanOperations provides a Python library that enables
12875boolean operations on paths.")
12876 (license license:expat)))
12877
12878(define-public python-tempdir
12879 (package
12880 (name "python-tempdir")
12881 (version "0.7.1")
12882 (source
12883 (origin
12884 (method url-fetch)
12885 (uri (pypi-uri "tempdir" version))
12886 (sha256
12887 (base32
12888 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
12889 (build-system python-build-system)
12890 (home-page "https://pypi.org/project/tempdir/")
12891 (arguments
12892 ;; the package has no tests
12893 '(#:tests? #f))
12894 (synopsis "Python library for managing temporary directories")
12895 (description
12896 "This library manages temporary directories that are automatically
12897deleted with all their contents when they are no longer needed. It is
12898particularly convenient for use in tests.")
12899 (license license:expat)))
12900
12901(define-public python2-tempdir
12902 (package-with-python2 python-tempdir))
12903
12904(define-public python-activepapers
12905 (package
12906 (name "python-activepapers")
12907 (version "0.2.2")
12908 (source
12909 (origin
12910 (method url-fetch)
12911 (uri (pypi-uri "ActivePapers.Py" version))
12912 (sha256
12913 (base32
12914 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
12915 (build-system python-build-system)
12916 (arguments
12917 `(#:modules ((ice-9 ftw)
12918 (srfi srfi-1)
12919 (guix build utils)
12920 (guix build python-build-system))
12921
12922 #:phases
12923 (modify-phases %standard-phases
12924 (add-after 'unpack 'delete-python2-code
12925 (lambda _
12926 (for-each delete-file
12927 '("lib/activepapers/builtins2.py"
12928 "lib/activepapers/standardlib2.py"
12929 "lib/activepapers/utility2.py"))))
12930 (replace 'check
12931 (lambda _
12932 ;; Deactivate the test cases that download files
12933 (setenv "NO_NETWORK_ACCESS" "1")
12934 ;; For some strange reason, some tests fail if nosetests runs all
12935 ;; test modules in a single execution. They pass if each test
12936 ;; module is run individually.
12937 (for-each (lambda (filename)
12938 (invoke "nosetests"
12939 (string-append "tests/" filename)))
12940 (scandir "tests"
12941 (lambda (filename)
12942 (string-suffix? ".py" filename)))))))))
12943 (native-inputs
12944 `(("python-tempdir" ,python-tempdir)
12945 ("python-nose" ,python-nose)))
12946 (propagated-inputs
12947 `(("python-h5py" ,python-h5py)))
12948 (home-page "http://www.activepapers.org/")
12949 (synopsis "Executable papers for scientific computing")
12950 (description
12951 "ActivePapers is a tool for working with executable papers, which
12952combine data, code, and documentation in single-file packages,
12953suitable for publication as supplementary material or on repositories
12954such as figshare or Zenodo.")
12955 (properties `((python2-variant . ,(delay python2-activepapers))))
12956 (license license:bsd-3)))
12957
12958(define-public python2-activepapers
12959 (let ((base (package-with-python2
12960 (strip-python2-variant python-activepapers))))
12961 (package
12962 (inherit base)
12963 (arguments
12964 (substitute-keyword-arguments (package-arguments base)
12965 ((#:phases phases)
12966 `(modify-phases ,phases
12967 (delete 'delete-python2-code)
12968 (add-after 'unpack 'delete-python3-code
12969 (lambda _
12970 (for-each delete-file
12971 '("lib/activepapers/builtins3.py"
12972 "lib/activepapers/standardlib3.py"
12973 "lib/activepapers/utility3.py")))))))))))
12974
12975(define-public python-semver
12976 (package
12977 (name "python-semver")
12978 (version "2.7.9")
12979 (source
12980 (origin
12981 (method url-fetch)
12982 (uri (pypi-uri "semver" version))
12983 (sha256
12984 (base32
12985 "0hhgqppchv59rqj0yzi1prdg2nfsywqmjsqy2rycyxm0hvxmbyqz"))))
12986 (build-system python-build-system)
12987 (arguments
12988 `(#:phases
12989 (modify-phases %standard-phases
12990 (add-after 'unpack 'patch-test-requirements
12991 (lambda _
12992 (substitute* "setup.py"
12993 ;; Our Python is new enough.
12994 (("'virtualenv<14\\.0\\.0'") "'virtualenv'"))
12995 #t)))))
12996 (native-inputs
12997 `(("python-tox" ,python-tox)
12998 ("python-virtualenv" ,python-virtualenv)))
12999 (home-page "https://github.com/k-bx/python-semver")
13000 (synopsis "Python helper for Semantic Versioning")
13001 (description "This package provides a Python library for
13002@url{Semantic Versioning, http://semver.org/}.")
13003 (license license:bsd-3)))
13004
13005(define-public python2-semver
13006 (package-with-python2 python-semver))
13007
13008(define-public python-pyro4
13009 (package
13010 (name "python-pyro4")
13011 (version "4.74")
13012 (source
13013 (origin
13014 (method url-fetch)
13015 (uri (pypi-uri "Pyro4" version))
13016 (sha256
13017 (base32
13018 "0pzp7c6q3vvkxq0wy9lr6wd5wky40sajz69g697i5rb2q497pvc9"))))
13019 (build-system python-build-system)
13020 (propagated-inputs
13021 `(("python-serpent" ,python-serpent)))
13022 (home-page "https://pyro4.readthedocs.io")
13023 (synopsis "Distributed object middleware for Python")
13024 (description
13025 "Pyro enables you to build applications in which objects can talk to each
13026other over the network. You can just use normal Python method calls to call
13027objects on other machines, also known as remote procedure calls (RPC).")
13028 (license license:expat)))
13029
13030(define-public python2-pyro
13031 (package
13032 (name "python2-pyro")
13033 (version "3.16")
13034 (source
13035 (origin
13036 (method url-fetch)
13037 (uri (pypi-uri "Pyro" version))
13038 (file-name (string-append "Pyro-" version ".tar.gz"))
13039 (sha256
13040 (base32
13041 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
13042 (build-system python-build-system)
13043 (arguments
13044 ;; Pyro is not compatible with Python 3
13045 `(#:python ,python-2
13046 ;; Pyro has no test cases for automatic execution
13047 #:tests? #f))
13048 (home-page "http://pythonhosted.org/Pyro/")
13049 (synopsis "Distributed object manager for Python")
13050 (description "Pyro is a Distributed Object Technology system
13051written in Python that is designed to be easy to use. It resembles
13052Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
13053which is a system and language independent Distributed Object Technology
13054and has much more to offer than Pyro or RMI. Pyro 3.x is no
13055longer maintained. New projects should use Pyro4 instead, which
13056is the new Pyro version that is actively developed.")
13057 (license license:expat)))
13058
13059(define-public python2-scientific
13060 (package
13061 (name "python2-scientific")
13062 (version "2.9.4")
13063 (source
13064 (origin
13065 (method url-fetch)
13066 (uri (string-append "https://bitbucket.org/khinsen/"
13067 "scientificpython/downloads/ScientificPython-"
13068 version ".tar.gz"))
13069 (file-name (string-append "ScientificPython-" version ".tar.gz"))
13070 (sha256
13071 (base32
13072 "0fc69zhlsn9d2jvbzyjl9ah53vj598h84nkq230c83ahfvgzx5y3"))))
13073 (build-system python-build-system)
13074 (inputs
13075 `(("netcdf" ,netcdf)))
13076 (propagated-inputs
13077 `(("python-numpy" ,python2-numpy-1.8)
13078 ("python-pyro" ,python2-pyro)))
13079 (arguments
13080 ;; ScientificPython is not compatible with Python 3
13081 `(#:python ,python-2
13082 #:tests? #f ; No test suite
13083 #:phases
13084 (modify-phases %standard-phases
13085 (replace 'build
13086 (lambda* (#:key inputs #:allow-other-keys)
77e61e25
RW
13087 (invoke "python" "setup.py" "build"
13088 (string-append "--netcdf_prefix="
13089 (assoc-ref inputs "netcdf"))))))))
44d10b1f
RW
13090 (home-page "https://bitbucket.org/khinsen/scientificpython")
13091 (synopsis "Python modules for scientific computing")
13092 (description "ScientificPython is a collection of Python modules that are
13093useful for scientific computing. Most modules are rather general (Geometry,
13094physical units, automatic derivatives, ...) whereas others are more
13095domain-specific (e.g. netCDF and PDB support). The library is currently
13096not actively maintained and works only with Python 2 and NumPy < 1.9.")
13097 (license license:cecill-c)))
13098
13099(define-public python2-mmtk
13100 (package
13101 (name "python2-mmtk")
13102 (version "2.7.11")
13103 (source
13104 (origin
13105 (method url-fetch)
13106 (uri (string-append "https://bitbucket.org/khinsen/"
13107 "mmtk/downloads/MMTK-" version ".tar.gz"))
13108 (file-name (string-append "MMTK-" version ".tar.gz"))
13109 (sha256
13110 (base32
13111 "1d0nnjx4lwsvh8f99vv1r6gi50d93yba0adkz8b4zgv4za4c5862"))))
13112 (build-system python-build-system)
13113 (native-inputs
13114 `(("netcdf" ,netcdf)))
13115 (propagated-inputs
13116 `(("python-scientific" ,python2-scientific)
13117 ("python-tkinter" ,python-2 "tk")))
13118 (arguments
13119 `(#:python ,python-2
13120 #:tests? #f
13121 #:phases
13122 (modify-phases %standard-phases
13123 (add-before 'build 'includes-from-scientific
13124 (lambda* (#:key inputs #:allow-other-keys)
13125 (mkdir-p "Include/Scientific")
13126 (copy-recursively
13127 (string-append
13128 (assoc-ref inputs "python-scientific")
13129 "/include/python2.7/Scientific")
13130 "Include/Scientific"))))))
13131 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
13132 (synopsis "Python library for molecular simulation")
13133 (description "MMTK is a library for molecular simulations with an emphasis
13134on biomolecules. It provides widely used methods such as Molecular Dynamics
13135and normal mode analysis, but also basic routines for implementing new methods
13136for simulation and analysis. The library is currently not actively maintained
13137and works only with Python 2 and NumPy < 1.9.")
13138 (license license:cecill-c)))
13139
13140(define-public python-phonenumbers
13141 (package
13142 (name "python-phonenumbers")
13143 (version "8.9.1")
13144 (source
13145 (origin
13146 (method url-fetch)
13147 (uri (pypi-uri "phonenumbers" version))
13148 (sha256
13149 (base32
13150 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
13151 (build-system python-build-system)
13152 (home-page
13153 "https://github.com/daviddrysdale/python-phonenumbers")
13154 (synopsis
13155 "Python library for dealing with international phone numbers")
13156 (description
13157 "This package provides a Python port of Google's libphonenumber library.")
13158 (license license:asl2.0)))
13159
13160(define-public python2-phonenumbers
13161 (package-with-python2 python-phonenumbers))
13162
13163(define-public python-send2trash
13164 (package
13165 (name "python-send2trash")
d9b0216b 13166 (version "1.5.0")
44d10b1f 13167 (source
d9b0216b 13168 (origin (method git-fetch)
44d10b1f 13169 ;; Source tarball on PyPI doesn't include tests.
d9b0216b
RW
13170 (uri (git-reference
13171 (url "https://github.com/hsoft/send2trash.git")
13172 (commit version)))
13173 (file-name (git-file-name name version))
44d10b1f
RW
13174 (sha256
13175 (base32
d9b0216b 13176 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
44d10b1f
RW
13177 (build-system python-build-system)
13178 (arguments
13179 '(#:phases
13180 (modify-phases %standard-phases
13181 (add-before 'check 'pre-check
13182 (lambda _
13183 (mkdir-p "/tmp/foo")
13184 (setenv "HOME" "/tmp/foo")
13185 #t)))))
13186 (home-page "https://github.com/hsoft/send2trash")
13187 (synopsis "Send files to the user's @file{~/Trash} directory")
13188 (description "This package provides a Python library to send files to the
13189user's @file{~/Trash} directory.")
13190 (license license:bsd-3)))
13191
13192(define-public python2-send2trash
13193 (package
13194 (inherit (package-with-python2 python-send2trash))
13195 (arguments
13196 (substitute-keyword-arguments (package-arguments python-send2trash)
13197 ((#:phases phases)
13198 `(modify-phases ,phases
13199 (add-before 'check 'setenv
13200 (lambda _
13201 (setenv "PYTHONPATH"
13202 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
13203 #t))))))
13204 (properties `((python2-variant . ,(delay python-send2trash))))))
13205
13206(define-public python-yapf
13207 (package
13208 (name "python-yapf")
13209 (version "0.24.0")
13210 (source
13211 (origin
13212 (method url-fetch)
13213 (uri (pypi-uri "yapf" version))
13214 (sha256
13215 (base32
13216 "0anwby0ydmyzcsgjc5dn1ryddwvii4dq61vck447q0n96npnzfyf"))))
13217 (build-system python-build-system)
13218 (home-page "https://github.com/google/yapf")
13219 (synopsis "Formatter for Python code")
13220 (description "YAPF is a formatter for Python code. It's based off of
13221@dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
13222takes the code and reformats it to the best formatting that conforms to the
13223style guide, even if the original code didn't violate the style guide.")
13224 (license license:asl2.0)))
13225
13226(define-public python2-yapf
13227 (package-with-python2 python-yapf))
13228
13229(define-public python-gyp
13230 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
13231 (revision "0"))
13232 (package
13233 (name "python-gyp")
13234 ;; Google does not release versions,
13235 ;; based on second most recent commit date.
13236 (version (git-version "0.0.0" revision commit))
13237 (source
13238 (origin
13239 ;; Google does not release tarballs,
13240 ;; git checkout is needed.
13241 (method git-fetch)
13242 (uri (git-reference
13243 (url "https://chromium.googlesource.com/external/gyp")
13244 (commit commit)))
13245 (file-name (git-file-name name version))
13246 (sha256
13247 (base32
13248 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
13249 (build-system python-build-system)
13250 (home-page "https://gyp.gsrc.io/")
13251 (synopsis "GYP is a Meta-Build system")
13252 (description
13253 "GYP builds build systems for large, cross platform applications.
13254It can be used to generate XCode projects, Visual Studio projects, Ninja build
13255files, and Makefiles.")
13256 (license license:bsd-3))))
13257
13258(define-public python2-gyp
13259 (package-with-python2 python-gyp))
13260
13261(define-public python-whatever
13262 (package
13263 (name "python-whatever")
13264 (version "0.5")
13265 (source
13266 (origin
13267 (method url-fetch)
13268 (uri (string-append "https://github.com/Suor/whatever/archive/" version
13269 ".tar.gz"))
13270 (sha256
13271 (base32
13272 "1iqvnaf0zpc6b4rvbqq4xy45mszcscyzpzknv8wg6j84pbp22sap"))
13273 (file-name (string-append name "-" version ".tar.gz"))))
13274 (build-system python-build-system)
13275 (arguments
13276 `(#:phases
13277 (modify-phases %standard-phases
13278 (replace 'check
13279 (lambda _
13280 (invoke "py.test"))))))
13281 (native-inputs
13282 `(("python-pytest" ,python-pytest)))
13283 (home-page "http://github.com/Suor/whatever")
13284 (synopsis "Make anonymous functions by partial application of operators")
13285 (description "@code{whatever} provides an easy way to make anonymous
13286functions by partial application of operators.")
13287 (license license:bsd-3)))
13288
13289(define-public python2-whatever
13290 (package-with-python2 python-whatever))
13291
13292(define-public python-funcy
13293 (package
13294 (name "python-funcy")
13295 (version "1.10")
13296 (source
13297 (origin
13298 (method url-fetch)
13299 (uri (string-append "https://github.com/Suor/funcy/archive/" version
13300 ".tar.gz"))
13301 (sha256
13302 (base32
13303 "1fanxivsip29vgarw6dn39xym3q4pbxcpa11plpp548lvxajpahz"))
13304 (file-name (string-append name "-" version ".tar.gz"))))
13305 (build-system python-build-system)
13306 (arguments
13307 `(#:phases
13308 (modify-phases %standard-phases
13309 (replace 'check
13310 (lambda _
13311 (invoke "py.test"))))))
13312 (native-inputs
13313 `(("python-pytest" ,python-pytest)
13314 ("python-whatever" ,python-whatever)))
13315 (home-page "http://github.com/Suor/funcy")
13316 (synopsis "Functional tools")
13317 (description "@code{funcy} is a library that provides functional tools.
13318Examples are:
13319@enumerate
13320@item merge - Merges collections of the same type
13321@item walk - Type-preserving map
13322@item select - Selects a part of a collection
13323@item take - Takes the first n items of a collection
13324@item first - Takes the first item of a collection
13325@item remove - Predicated-removes items of a collection
13326@item concat - Concatenates two collections
13327@item flatten - Flattens a collection with subcollections
13328@item distinct - Returns only distinct items
13329@item split - Predicated-splits a collection
13330@item split_at - Splits a collection at a given item
13331@item group_by - Groups items by group
13332@item pairwise - Pairs off adjacent items
13333@item partial - Partially-applies a function
13334@item curry - Curries a function
13335@item compose - Composes functions
13336@item complement - Complements a predicate
13337@item all_fn - \"all\" with predicate
13338@end enumerate")
13339 (license license:bsd-3)))
13340
13341(define-public python2-funcy
13342 (package-with-python2 python-funcy))
13343
13344(define-public python-isoweek
13345 (package
13346 (name "python-isoweek")
13347 (version "1.3.3")
13348 (source
13349 (origin
13350 (method url-fetch)
13351 (uri (pypi-uri "isoweek" version))
13352 (sha256
13353 (base32
13354 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
13355 (build-system python-build-system)
13356 (home-page "https://github.com/gisle/isoweek")
13357 (synopsis "Objects representing a week")
13358 (description "The @code{isoweek} module provide the class Week that
13359implements the week definition of ISO 8601. This standard also defines
13360a notation for identifying weeks; yyyyWww (where the W is a literal).
13361Week instances stringify to this form.")
13362 (license license:bsd-3)))
13363
13364(define-public python2-isoweek
13365 (package-with-python2 python-isoweek))
13366
13367(define-public python-tokenize-rt
13368 (package
13369 (name "python-tokenize-rt")
13370 (version "2.0.1")
13371 (source
13372 (origin
13373 (method url-fetch)
13374 (uri (pypi-uri "tokenize-rt" version))
13375 (sha256
13376 (base32
13377 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
13378 (build-system python-build-system)
13379 (home-page "https://github.com/asottile/tokenize-rt")
13380 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
13381 (description
13382 "This Python library is a wrapper around @code{tokenize} from the Python
13383standard library. It provides two additional tokens @code{ESCAPED_NL} and
13384@code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
13385and @code{tokens_to_src} to roundtrip.")
13386 (license license:expat)))
13387
13388(define-public python-future-fstrings
13389 (package
13390 (name "python-future-fstrings")
13391 (version "0.4.1")
13392 (source
13393 (origin
13394 (method url-fetch)
13395 (uri (pypi-uri "future_fstrings" version))
13396 (sha256
13397 (base32
13398 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
13399 (build-system python-build-system)
13400 (propagated-inputs
13401 `(("python-tokenize-rt" ,python-tokenize-rt)))
13402 (home-page "https://github.com/asottile/future-fstrings")
13403 (synopsis "Backport of fstrings to Python < 3.6")
13404 (description
13405 "This package provides a UTF-8 compatible encoding
13406@code{future_fstrings}, which performs source manipulation. It decodes the
13407source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
13408@code{f} strings.")
13409 (license license:expat)))
13410
13411(define-public python-typing
13412 (package
13413 (name "python-typing")
13414 (version "3.6.6")
13415 (source
13416 (origin
13417 (method url-fetch)
13418 (uri (pypi-uri "typing" version))
13419 (sha256
13420 (base32
13421 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
13422 (build-system python-build-system)
13423 (home-page "https://docs.python.org/3/library/typing.html")
13424 (synopsis "Type hints for Python")
13425 (description "This is a backport of the standard library @code{typing}
13426module to Python versions older than 3.5. Typing defines a standard notation
13427for Python function and variable type annotations. The notation can be used
13428for documenting code in a concise, standard format, and it has been designed
13429to also be used by static and runtime type checkers, static analyzers, IDEs
13430and other tools.")
13431 (license license:psfl)))
13432
13433(define-public python2-typing
13434 (package-with-python2 python-typing))
13435
13436(define-public bpython
13437 (package
13438 (name "bpython")
13439 (version "0.17.1")
13440 (source
13441 (origin
13442 (method url-fetch)
13443 (uri (pypi-uri "bpython" version))
13444 (sha256
13445 (base32
13446 "0bxhxi5zxdkrf8b4gwn0d363kdz3qnypjwhm1aydki53ph8ca1w9"))))
13447 (build-system python-build-system)
13448 (arguments
13449 `(#:phases
13450 (modify-phases %standard-phases
13451 (add-after 'unpack 'remove-failing-test
13452 (lambda _
13453 ;; Remove failing test. FIXME: make it pass
13454 (delete-file "bpython/test/test_args.py")
13455 #t))
13456 (add-after 'wrap 'add-aliases
13457 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
13458 (lambda* (#:key outputs #:allow-other-keys)
13459 (let ((out (assoc-ref outputs "out")))
13460 (for-each
13461 (lambda (old new)
13462 (symlink old (string-append out "/bin/" new)))
13463 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
13464 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
13465 #t)))))
13466 (propagated-inputs
13467 `(("python-pygments" ,python-pygments)
13468 ("python-requests" ,python-requests)
13469 ("python-babel" ,python-babel) ; optional, for internationalization
13470 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
13471 ("python-greenlet" ,python-greenlet)
13472 ("python-urwid" ,python-urwid) ; for bpython-urwid only
13473 ("python-six" ,python-six)))
13474 (native-inputs
13475 `(("python-sphinx" ,python-sphinx)
13476 ("python-mock" ,python-mock)))
13477 (home-page "https://bpython-interpreter.org/")
13478 (synopsis "Fancy interface to the Python interpreter")
13479 (description "Bpython is a fancy interface to the Python
13480interpreter. bpython's main features are
13481
13482@enumerate
13483@item in-line syntax highlighting,
13484@item readline-like autocomplete with suggestions displayed as you type,
13485@item expected parameter list for any Python function,
13486@item \"rewind\" function to pop the last line of code from memory and
13487 re-evaluate,
13488@item send the code you've entered off to a pastebin,
13489@item save the code you've entered to a file, and
13490@item auto-indentation.
13491@end enumerate")
13492 (license license:expat)))
13493
13494(define-public bpython2
13495 (let ((base (package-with-python2
13496 (strip-python2-variant bpython))))
13497 (package (inherit base)
13498 (name "bpython2")
13499 (arguments
13500 `(#:python ,python-2
13501 #:phases
13502 (modify-phases %standard-phases
13503 (add-after 'unpack 'remove-failing-test
13504 (lambda _
13505 ;; Remove failing test. FIXME: make it pass
13506 (delete-file "bpython/test/test_args.py")
13507 ;; Disable failing test-cases (renaming inhibits they are
13508 ;; discovered)
13509 (substitute* "bpython/test/test_curtsies_repl.py"
13510 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
13511 (string-append a "xxx_off_" b))
13512 (("^(\\s*def )(test_complex\\W)" _ a b)
13513 (string-append a "xxx_off_" b)))
13514 #t))
13515 (add-before 'build 'rename-scripts
13516 ;; rename the scripts to bypthon2, bpdb2, etc.
13517 (lambda _
13518 (substitute* "setup.py"
13519 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
13520 (string-append name "2" rest "\n"))
13521 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
13522 (string-append name "2" (or sub "") rest "\n")))
13523 #t))))))))
13524
13525(define-public python-pyinotify
13526 (package
13527 (name "python-pyinotify")
13528 (version "0.9.6")
13529 (source (origin
13530 (method url-fetch)
13531 (uri (pypi-uri "pyinotify" version))
13532 (sha256
13533 (base32
13534 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
13535 (build-system python-build-system)
13536 (arguments `(#:tests? #f)) ;no tests
13537 (home-page "https://github.com/seb-m/pyinotify")
13538 (synopsis "Python library for monitoring inotify events")
13539 (description
13540 "@code{pyinotify} provides a Python interface for monitoring
13541file system events on Linux.")
13542 (license license:expat)))
13543
13544(define-public python2-pyinotify
13545 (package-with-python2 python-pyinotify))
13546
13547;; Ada parser uses this version.
13548(define-public python2-quex-0.67.3
13549 (package
13550 (name "python2-quex")
13551 (version "0.67.3")
13552 (source
13553 (origin
13554 (method url-fetch)
13555 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
13556 (version-major+minor version)
13557 "/quex-" version ".zip"))
13558 (sha256
13559 (base32
13560 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
13561 (build-system python-build-system)
13562 (native-inputs
13563 `(("unzip" ,unzip)))
13564 (arguments
13565 `(#:python ,python-2
13566 #:tests? #f
13567 #:phases
13568 (modify-phases %standard-phases
13569 (delete 'configure)
13570 (delete 'build)
13571 (replace 'install
13572 (lambda* (#:key outputs #:allow-other-keys)
13573 (let* ((out (assoc-ref outputs "out"))
13574 (share/quex (string-append out "/share/quex"))
13575 (bin (string-append out "/bin")))
13576 (copy-recursively "." share/quex)
13577 (mkdir-p bin)
13578 (symlink (string-append share/quex "/quex-exe.py")
13579 (string-append bin "/quex"))
13580 #t))))))
13581 (native-search-paths
13582 (list (search-path-specification
13583 (variable "QUEX_PATH")
13584 (files '("share/quex")))))
13585 (home-page "http://quex.sourceforge.net/")
13586 (synopsis "Lexical analyzer generator in Python")
13587 (description "@code{quex} is a lexical analyzer generator in Python.")
13588 (license license:lgpl2.1+))) ; Non-military
13589
13590(define-public python2-quex
13591 (package (inherit python2-quex-0.67.3)
13592 (name "python2-quex")
13593 (version "0.68.1")
13594 (source
13595 (origin
13596 (method url-fetch)
13597 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
13598 (sha256
13599 (base32
13600 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
13601 (file-name (string-append name "-" version ".tar.gz"))))))
13602
13603(define-public python-more-itertools
13604 (package
13605 (name "python-more-itertools")
13606 (version "4.3.0")
13607 (source
13608 (origin
13609 (method url-fetch)
13610 (uri (pypi-uri "more-itertools" version))
13611 (sha256
13612 (base32
13613 "17h3na0rdh8xq30w4b9pizgkdxmm51896bxw600x84jflg9vaxn4"))))
13614 (build-system python-build-system)
13615 (arguments
13616 `(,@(if (any (cute string-prefix? <> (or (%current-system)
13617 (%current-target-system)))
13618 '("armhf" "i686"))
13619 '(#:phases
13620 (modify-phases %standard-phases
13621 ;; This is required for 32-bit hardware.
13622 ;; TODO: Try to remove this when upgrading.
13623 (add-after 'unpack 'patch-test
13624 (lambda _
13625 (substitute* "more_itertools/tests/test_more.py"
13626 (("10 \\*\\* 10") "9 ** 9"))
13627 #t))))
13628 '())))
13629 (propagated-inputs
13630 `(("python-six" ,python-six-bootstrap)))
13631 (home-page "https://github.com/erikrose/more-itertools")
13632 (synopsis "More routines for operating on iterables, beyond itertools")
13633 (description "Python's built-in @code{itertools} module implements a
13634number of iterator building blocks inspired by constructs from APL, Haskell,
13635and SML. @code{more-itertools} includes additional building blocks for
13636working with iterables.")
13637 (license license:expat)))
13638
13639(define-public python2-more-itertools
13640 (package-with-python2 python-more-itertools))
13641
13642(define-public python-latexcodec
13643 (package
13644 (name "python-latexcodec")
13645 (version "1.0.5")
13646 (source
13647 (origin
13648 (method url-fetch)
13649 (uri (pypi-uri "latexcodec" version))
13650 (sha256
13651 (base32
13652 "0zdd1gf24i83ykadx0y30n3001j43scqr2saql3vckk5c39dj1wn"))))
13653 (build-system python-build-system)
13654 (inputs
13655 `(("python-six" ,python-six)))
13656 (home-page "https://readthedocs.org/projects/latexcodec/")
13657 (synopsis "Work with LaTeX code in Python")
13658 (description "Lexer and codec to work with LaTeX code in Python.")
13659 (license license:expat)))
13660
13661(define-public python-pybtex
13662 (package
13663 (name "python-pybtex")
13664 (version "0.21")
13665 (source
13666 (origin
13667 (method url-fetch)
13668 (uri (pypi-uri "pybtex" version))
13669 (sha256
13670 (base32
13671 "00300j8dn5pxq4ndxmfmbmycg2znawkqs49val2x6jlmfiy6r2mg"))))
13672 (build-system python-build-system)
13673 (native-inputs
13674 `(("python-nose" ,python-nose)))
13675 (inputs
13676 `(("python-latexcodec" ,python-latexcodec)
13677 ("python-pyyaml" ,python-pyyaml)
13678 ("python-six" ,python-six)))
13679 (arguments
13680 `(#:test-target "nosetests"))
13681 (home-page "https://pybtex.org/")
13682 (synopsis "BibTeX-compatible bibliography processor")
13683 (description "Pybtex is a BibTeX-compatible bibliography processor written
13684in Python. You can simply type pybtex instead of bibtex.")
13685 (license license:expat)))
13686
13687(define-public python-onetimepass
13688 (package
13689 (name "python-onetimepass")
13690 (version "1.0.1")
13691 (source
13692 (origin
13693 (method url-fetch)
13694 (uri (pypi-uri "onetimepass" version))
13695 (sha256
13696 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
13697 (build-system python-build-system)
13698 (propagated-inputs `(("python-six" ,python-six)))
13699 (home-page "https://github.com/tadeck/onetimepass/")
13700 (synopsis "One-time password library")
13701 (description "Python one-time password library for HMAC-based (HOTP) and
13702time-based (TOTP) passwords.")
13703 (license license:expat)))
13704
13705(define-public python-parso
13706 (package
13707 (name "python-parso")
13708 (version "0.3.1")
13709 (source
13710 (origin
13711 (method url-fetch)
13712 (uri (pypi-uri "parso" version))
13713 (sha256
13714 (base32
13715 "18p89iwcm8mnf380f92g9w0bhx5km8wxp392vvjcq4y1ld1llw1m"))))
13716 (native-inputs
13717 `(("python-pytest" ,python-pytest)))
13718 (build-system python-build-system)
13719 (home-page "https://github.com/davidhalter/parso")
13720 (synopsis "Python Parser")
13721 (description "Parso is a Python parser that supports error recovery and
13722round-trip parsing for different Python versions (in multiple Python versions).
13723Parso is also able to list multiple syntax errors in your Python file.")
13724 (license license:expat)))
13725
13726(define-public python2-parso
13727 (package-with-python2 python-parso))
13728
13729(define-public python-async-generator
13730 (package
13731 (name "python-async-generator")
13732 (version "1.9")
13733 (source
13734 (origin
13735 (method url-fetch)
13736 (uri (pypi-uri "async_generator" version))
13737 (sha256
13738 (base32
13739 "0wc3hidz1q85cja93k5pzybn0fprfnqyrv4qlkdqdzklc5f4dmdp"))))
13740 (build-system python-build-system)
13741 (native-inputs
13742 `(("python-pytest" ,python-pytest)))
13743 (home-page "https://github.com/python-trio/async_generator")
13744 (synopsis "Async generators and context managers for Python 3.5+")
13745 (description "@code{async_generator} back-ports Python 3.6's native async
13746generators and Python 3.7's context managers into Python 3.5.")
13747 ;; Dual licensed.
13748 (license (list license:expat license:asl2.0))))
13749
13750(define-public python-async-timeout
13751 (package
13752 (name "python-async-timeout")
13753 (version "3.0.1")
13754 (source
13755 (origin
13756 (method url-fetch)
13757 (uri (pypi-uri "async-timeout" version))
13758 (sha256
13759 (base32
13760 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
13761 (build-system python-build-system)
13762 (home-page "https://github.com/aio-libs/async_timeout/")
13763 (synopsis "Timeout context manager for asyncio programs")
13764 (description "@code{async-timeout} provides a timeout timeout context
13765manager compatible with @code{asyncio}.")
13766 (license license:asl2.0)))
13767
13768(define-public python-glob2
13769 (package
13770 (name "python-glob2")
13771 (version "0.6")
13772 (source (origin
13773 (method url-fetch)
13774 (uri (string-append
13775 "https://github.com/miracle2k/python-glob2/archive/"
13776 version
13777 ".tar.gz"))
13778 (sha256
13779 (base32
13780 "0ja168f0dz4kbz4m06dm0rd3acaypk6hjx2km541pw22y9s40mag"))
13781 (file-name (string-append name "-" version ".tar.gz"))))
13782 (build-system python-build-system)
13783 (home-page "https://github.com/miracle2k/python-glob2/")
13784 (synopsis "Extended Version of the python buildin glob module")
13785 (description "This is an extended version of the Python
13786@url{http://docs.python.org/library/glob.html, built-in glob module} which
13787adds:
13788
13789@itemize
13790@item The ability to capture the text matched by glob patterns, and return
13791those matches alongside the file names.
13792@item A recursive @code{**} globbing syntax, akin for example to the
13793@code{globstar} option of Bash.
13794@item The ability to replace the file system functions used, in order to glob
13795on virtual file systems.
13796@item Compatible with Python 2 and Python 3 (tested with 3.3).
13797@end itemize
13798
13799Glob2 currently based on the glob code from Python 3.3.1.")
13800 (license license:bsd-2)))
13801
13802(define-public python2-glob2
13803 (package-with-python2 python-glob2))
13804
13805(define-public python-gipc
13806 (package
13807 (name "python-gipc")
13808 (version "0.6.0")
13809 (source
13810 (origin
13811 (method url-fetch)
13812 (uri (pypi-uri "gipc" version ".zip"))
13813 (sha256
13814 (base32
13815 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
13816 (build-system python-build-system)
13817 (native-inputs
13818 `(("unzip" ,unzip)))
13819 (propagated-inputs
13820 `(("python-gevent" ,python-gevent)))
13821 (home-page "http://gehrcke.de/gipc")
13822 (synopsis "Child process management in the context of gevent")
13823 (description "Usage of Python's multiprocessing package in a
13824gevent-powered application may raise problems. With @code{gipc},
13825process-based child processes can safely be created anywhere within a
13826gevent-powered application.")
13827 (license license:expat)))
13828
13829(define-public python2-gipc
13830 (package-with-python2 python-gipc))
13831
13832(define-public python-fusepy
13833 (package
13834 (name "python-fusepy")
13835 (version "2.0.4")
13836 (source
13837 (origin
13838 (method url-fetch)
13839 (uri (pypi-uri "fusepy" version))
13840 (sha256
13841 (base32
13842 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
13843 (build-system python-build-system)
13844 (arguments
13845 `(#:phases
13846 (modify-phases %standard-phases
13847 (add-before 'build 'set-library-file-name
13848 (lambda* (#:key inputs #:allow-other-keys)
13849 (let ((fuse (assoc-ref inputs "fuse")))
13850 (substitute* "fuse.py"
13851 (("find_library\\('fuse'\\)")
13852 (string-append "'" fuse "/lib/libfuse.so'")))
13853 #t))))))
13854 (propagated-inputs
13855 `(("fuse" ,fuse)))
13856 (home-page "https://github.com/fusepy/fusepy")
13857 (synopsis "Simple ctypes bindings for FUSE")
13858 (description "Python module that provides a simple interface to FUSE and
13859MacFUSE. The binding is created using the standard @code{ctypes} library.")
13860 (license license:isc)))
13861
13862(define-public python2-fusepy
13863 (package-with-python2 python-fusepy))
13864
13865(define-public python2-gdrivefs
13866 (package
13867 (name "python2-gdrivefs")
13868 (version "0.14.9")
13869 (source
13870 (origin
13871 (method url-fetch)
13872 (uri (pypi-uri "gdrivefs" version))
13873 (sha256
13874 (base32
13875 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
13876 (build-system python-build-system)
13877 (arguments
13878 `(#:python ,python-2
13879 #:phases
13880 (modify-phases %standard-phases
13881 (add-before 'build 'patch-setup-py
13882 (lambda _
13883 ;; Update requirements from dependency==version
13884 ;; to dependency>=version
13885 (substitute* "gdrivefs/resources/requirements.txt"
13886 (("==") ">="))
13887 #t)))))
13888 (native-inputs
13889 `(("python2-gipc" ,python2-gipc)
13890 ("python2-gevent" ,python2-gevent)
13891 ("python2-greenlet" ,python2-greenlet)
13892 ("python2-httplib2" ,python2-httplib2)
13893 ("python2-uritemplate" ,python2-uritemplate)
13894 ("python2-oauth2client" ,python2-oauth2client)
13895 ("python2-six" ,python2-six)))
13896 (propagated-inputs
13897 `(("python2-dateutil" ,python2-dateutil)
13898 ("python2-fusepy" ,python2-fusepy)
13899 ("python2-google-api-client" ,python2-google-api-client)))
13900 (home-page "https://github.com/dsoprea/GDriveFS")
13901 (synopsis "Mount Google Drive as a local file system")
13902 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
13903under Python 2.7.")
13904 (license license:gpl2)))
13905
13906(define-public pybind11
13907 (package
13908 (name "pybind11")
13909 (version "2.2.4")
13910 (source (origin
13911 (method git-fetch)
13912 (uri (git-reference
13913 (url "https://github.com/pybind/pybind11.git")
13914 (commit (string-append "v" version))))
13915 (sha256
13916 (base32
13917 "0pa79ymcasv8br5ifbx7878id5py2jpjac3i20cqxr6gs9l6ivlv"))
13918 (file-name (git-file-name name version))))
13919 (build-system cmake-build-system)
13920 (native-inputs
13921 `(("python" ,python)
13922 ("python-pytest" ,python-pytest)))
13923 (arguments
13924 `(#:test-target "check"))
13925 (home-page "https://github.com/pybind/pybind11/")
13926 (synopsis "Seamless operability between C++11 and Python")
13927 (description "pybind11 is a lightweight header-only library that exposes
13928C++ types in Python and vice versa, mainly to create Python bindings of
13929existing C++ code. Its goals and syntax are similar to the excellent
13930Boost.Python library by David Abrahams: to minimize boilerplate code in
13931traditional extension modules by inferring type information using compile-time
13932introspection.")
13933 (license license:expat)))
13934
13935(define-public python-fasteners
13936 (package
13937 (name "python-fasteners")
13938 (version "0.14.1")
13939 (source
13940 (origin
13941 (method url-fetch)
13942 (uri (pypi-uri "fasteners" version))
13943 (sha256
13944 (base32
13945 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
13946 (build-system python-build-system)
13947 (propagated-inputs
13948 `(("python-monotonic" ,python-monotonic)
13949 ("python-six" ,python-six)
13950 ("python-testtools" ,python-testtools)))
13951 (home-page "https://github.com/harlowja/fasteners")
13952 (synopsis "Python package that provides useful locks")
13953 (description
13954 "This package provides a Python program that provides following locks:
13955
13956@itemize
13957@item Locking decorator
13958@item Reader-writer locks
13959@item Inter-process locks
13960@item Generic helpers
13961@end itemize\n")
13962 (properties `((python2-variant . ,(delay python2-fasteners))))
13963 (license license:asl2.0)))
13964
13965(define-public python2-fasteners
13966 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
13967 (package
13968 (inherit base)
13969 (propagated-inputs
13970 `(("python2-futures" ,python2-futures)
13971 ,@(package-propagated-inputs base))))))
13972
13973(define-public python-requests-file
13974 (package
13975 (name "python-requests-file")
13976 (version "1.4.3")
13977 (source
13978 (origin
13979 (method url-fetch)
13980 (uri (pypi-uri "requests-file" version))
13981 (sha256
13982 (base32
13983 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
13984 (build-system python-build-system)
13985 (propagated-inputs
13986 `(("python-requests" ,python-requests)
13987 ("python-six" ,python-six)))
13988 (home-page
13989 "https://github.com/dashea/requests-file")
13990 (synopsis "File transport adapter for Requests")
13991 (description
13992 "Requests-File is a transport adapter for use with the Requests Python
13993library to allow local filesystem access via file:// URLs.")
13994 (license license:asl2.0)))
13995
13996(define-public python2-requests-file
13997 (package-with-python2 python-requests-file))
13998
13999(define-public python-tldextract
14000 (package
14001 (name "python-tldextract")
14002 (version "2.2.0")
14003 (source
14004 (origin
14005 (method url-fetch)
14006 (uri (pypi-uri "tldextract" version))
14007 (sha256
14008 (base32
14009 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
14010 (build-system python-build-system)
14011 (native-inputs
14012 `(("python-pytest" ,python-pytest)
14013 ("python-responses" ,python-responses)))
14014 (propagated-inputs
14015 `(("python-idna" ,python-idna)
14016 ("python-requests" ,python-requests)
14017 ("python-requests-file" ,python-requests-file)))
14018 (home-page
14019 "https://github.com/john-kurkowski/tldextract")
14020 (synopsis
14021 "Separate the TLD from the registered domain and subdomains of a URL")
14022 (description
14023 "TLDExtract accurately separates the TLD from the registered domain and
14024subdomains of a URL, using the Public Suffix List. By default, this includes
14025the public ICANN TLDs and their exceptions. It can optionally support the
14026Public Suffix List's private domains as well.")
14027 (license license:bsd-3)))
14028
14029(define-public python2-tldextract
14030 (package-with-python2 python-tldextract))
14031
14032(define-public python-pynamecheap
14033 (package
14034 (name "python-pynamecheap")
14035 (version "0.0.3")
14036 (source
14037 (origin
14038 (method url-fetch)
14039 (uri (pypi-uri "PyNamecheap" version))
14040 (sha256
14041 (base32
14042 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
14043 (build-system python-build-system)
14044 (propagated-inputs
14045 `(("python-requests" ,python-requests)))
14046 (home-page
14047 "https://github.com/Bemmu/PyNamecheap")
14048 (synopsis
14049 "Namecheap API client in Python")
14050 (description
14051 "PyNamecheap is a Namecheap API client in Python.")
14052 (license license:expat)))
14053
14054(define-public python2-pynamecheap
14055 (package-with-python2 python-pynamecheap))
14056
14057(define-public python-dns-lexicon
14058 (package
14059 (name "python-dns-lexicon")
14060 (version "2.4.0")
14061 (source
14062 (origin
14063 (method url-fetch)
14064 (uri (pypi-uri "dns-lexicon" version))
14065 (sha256
14066 (base32
14067 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
14068 (build-system python-build-system)
14069 (arguments
14070 `(#:tests? #f)) ;requires internet access
14071 (propagated-inputs
14072 `(("python-future" ,python-future)
14073 ("python-pynamecheap" ,python-pynamecheap)
14074 ("python-requests" ,python-requests)
14075 ("python-tldextract" ,python-tldextract)
14076 ("python-urllib3" ,python-urllib3)))
14077 (home-page "https://github.com/AnalogJ/lexicon")
14078 (synopsis
14079 "Manipulate DNS records on various DNS providers")
14080 (description
14081 "Lexicon provides a way to manipulate DNS records on multiple DNS
14082providers in a standardized way. It has a CLI but it can also be used as a
14083Python library. It was designed to be used in automation, specifically with
14084Let's Encrypt.")
14085 (license license:expat)))
14086
14087(define-public python2-dns-lexicon
14088 (package-with-python2 python-dns-lexicon))
14089
14090(define-public python-commandlines
14091 (package
14092 (name "python-commandlines")
14093 (version "0.4.1")
14094 (source
14095 (origin
14096 (method url-fetch)
14097 (uri (pypi-uri "commandlines" version))
14098 (sha256
14099 (base32
14100 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
14101 (build-system python-build-system)
14102 (home-page "https://github.com/chrissimpkins/commandlines")
14103 (synopsis "Command line argument to object parsing library")
14104 (description
14105 "@code{Commandlines} is a Python library for command line application
14106development that supports command line argument parsing, command string
14107validation testing and application logic.")
14108 (license license:expat)))
14109
14110;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
14111;; python-numba. They have a very unflexible relationship.
14112(define-public python-numba
14113 (package
14114 (name "python-numba")
14115 (version "0.39.0")
14116 (source
14117 (origin
14118 (method url-fetch)
14119 (uri (pypi-uri "numba" version))
14120 (sha256
14121 (base32
14122 "1bibvkwga1v8293i9ivl469d8bzgabn3vgr2ig7c1i68v8frsx07"))))
14123 (build-system python-build-system)
14124 (arguments
14125 `(#:modules ((guix build utils)
14126 (guix build python-build-system)
14127 (ice-9 ftw)
14128 (srfi srfi-1)
14129 (srfi srfi-26))
14130 #:phases
14131 (modify-phases %standard-phases
14132 (add-after 'unpack 'disable-proprietary-features
14133 (lambda _
14134 (setenv "NUMBA_DISABLE_HSA" "1")
14135 (setenv "NUMBA_DISABLE_CUDA" "1")
14136 #t))
14137 (add-after 'unpack 'remove-failing-tests
14138 (lambda _
14139 ;; FIXME: these tests fail for unknown reasons:
14140 ;; test_non_writable_pycache, test_non_creatable_pycache, and
14141 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
14142 (substitute* "numba/tests/test_dispatcher.py"
14143 (("def test(_non_writable_pycache)" _ m)
14144 (string-append "def guix_skip" m))
14145 (("def test(_non_creatable_pycache)" _ m)
14146 (string-append "def guix_skip" m))
14147 (("def test(_frozen)" _ m)
14148 (string-append "def guix_skip" m)))
14149
14150 ;; These tests fail because we don't run the tests from the build
14151 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
14152 ;; They ar in numba.tests.test_pycc.TestDistutilsSupport.
14153 (substitute* "numba/tests/test_pycc.py"
14154 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
14155 (string-append "def guix_skip" m)))
14156 #t))
14157 (replace 'check
14158 (lambda _
14159 (let ((cwd (getcwd)))
14160 (setenv "PYTHONPATH"
14161 (string-append cwd "/build/"
14162 (find (cut string-prefix? "lib" <>)
14163 (scandir (string-append cwd "/build")))
14164 ":"
14165 (getenv "PYTHONPATH")))
14166 ;; Something is wrong with the PYTHONPATH when running the
14167 ;; tests from the build directory, as it complains about not being
14168 ;; able to import certain modules.
14169 (with-directory-excursion "/tmp"
14170 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
14171 #t)))))
14172 (propagated-inputs
14173 `(("python-llvmlite" ,python-llvmlite)
14174 ("python-numpy" ,python-numpy)
14175 ("python-singledispatch" ,python-singledispatch)))
14176 ;; Needed for tests.
14177 (inputs
14178 `(("python-jinja2" ,python-jinja2)
14179 ("python-pygments" ,python-pygments)))
14180 (home-page "https://numba.pydata.org")
14181 (synopsis "Compile Python code using LLVM")
14182 (description "Numba gives you the power to speed up your applications with
14183high performance functions written directly in Python. With a few
14184annotations, array-oriented and math-heavy Python code can be just-in-time
14185compiled to native machine instructions, similar in performance to C, C++ and
14186Fortran, without having to switch languages or Python interpreters.
14187
14188Numba works by generating optimized machine code using the LLVM compiler
14189infrastructure at import time, runtime, or statically (using the included pycc
14190tool).")
14191 (license license:bsd-3)))
14192
14193(define-public python-anndata
14194 (package
14195 (name "python-anndata")
14196 (version "0.6.9")
14197 (source
14198 (origin
14199 (method url-fetch)
14200 (uri (pypi-uri "anndata" version))
14201 (sha256
14202 (base32
14203 "1fh461xyyc7pcrjfgd013bdc2alf53r46ss3gfw3431mbb1gappi"))))
14204 (build-system python-build-system)
14205 (propagated-inputs
14206 `(("python-h5py" ,python-h5py)
14207 ("python-natsort" ,python-natsort)
14208 ("python-pandas" ,python-pandas)
14209 ("python-scipy" ,python-scipy)))
14210 (home-page "https://github.com/theislab/anndata")
14211 (synopsis "Annotated data for data analysis pipelines")
14212 (description "Anndata is a package for simple (functional) high-level APIs
14213for data analysis pipelines. In this context, it provides an efficient,
14214scalable way of keeping track of data together with learned annotations and
14215reduces the code overhead typically encountered when using a mostly
14216object-oriented library such as @code{scikit-learn}.")
14217 (license license:bsd-3)))
14218
14219(define-public python-dill
14220 (package
14221 (name "python-dill")
14222 (version "0.2.8.2")
14223 (source
14224 (origin
14225 (method url-fetch)
14226 (uri (pypi-uri "dill" version))
14227 (sha256
14228 (base32
14229 "1cymzn9fxwdy33h21zkk4gqgzvd25110hh3zdqnvnwa3p52c4kb2"))))
14230 (build-system python-build-system)
14231 ;; FIXME: The check phase fails with "don't know how to make test".
14232 (arguments '(#:tests? #f))
14233 (home-page "https://pypi.org/project/dill")
14234 (synopsis "Serialize all of Python")
14235 (description "Dill extends Python's @code{pickle} module for serializing
14236and de-serializing Python objects to the majority of the built-in Python
14237types. Dill provides the user the same interface as the @code{pickle} module,
14238and also includes some additional features. In addition to pickling Python
14239objects, @code{dill} provides the ability to save the state of an interpreter
14240session in a single command. Hence, it would be feasable to save a
14241interpreter session, close the interpreter, ship the pickled file to another
14242computer, open a new interpreter, unpickle the session and thus continue from
14243the saved state of the original interpreter session.")
14244 (license license:bsd-3)))
14245
14246(define-public python-multiprocess
14247 (package
14248 (name "python-multiprocess")
14249 (version "0.70.6.1")
14250 (source
14251 (origin
14252 (method url-fetch)
14253 (uri (pypi-uri "multiprocess" version))
14254 (sha256
14255 (base32
14256 "1ip5caz67b3q0553mr8gm8xwsb8x500jn8ml0gihgyfy52m2ypcq"))))
14257 (build-system python-build-system)
14258 (propagated-inputs
14259 `(("python-dill" ,python-dill)))
14260 (home-page "https://pypi.org/project/multiprocess")
14261 (synopsis "Multiprocessing and multithreading in Python")
14262 (description
14263 "This package is a fork of the multiprocessing Python package, a package
14264which supports the spawning of processes using the API of the standard
14265library's @code{threading} module.")
14266 (license license:bsd-3)))
14267
14268(define-public python-toolz
14269 (package
14270 (name "python-toolz")
14271 (version "0.9.0")
14272 (source
14273 (origin
14274 (method url-fetch)
14275 (uri (pypi-uri "toolz" version))
14276 (sha256
14277 (base32
14278 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
14279 (build-system python-build-system)
14280 ;; FIXME: tests cannot be computed: "Can't perform this operation for
14281 ;; unregistered loader type"
14282 (arguments '(#:tests? #f))
14283 (home-page "https://github.com/pytoolz/toolz/")
14284 (synopsis "List processing tools and functional utilities")
14285 (description
14286 "This package provides a set of utility functions for iterators,
14287functions, and dictionaries.")
14288 (license license:bsd-3)))
14289
14290(define-public python2-toolz
14291 (package-with-python2 python-toolz))
14292
14293(define-public python-cytoolz
14294 (package
14295 (name "python-cytoolz")
14296 (version "0.9.0.1")
14297 (source
14298 (origin
14299 (method url-fetch)
14300 (uri (pypi-uri "cytoolz" version))
14301 (sha256
14302 (base32
14303 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
14304 (build-system python-build-system)
14305 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
14306 ;; 'exceptions'"
14307 (arguments '(#:tests? #f))
14308 (propagated-inputs
14309 `(("python-toolz" ,python-toolz)))
14310 (native-inputs
14311 `(("python-cython" ,python-cython)))
14312 (home-page "https://github.com/pytoolz/cytoolz")
14313 (synopsis "High performance functional utilities")
14314 (description
14315 "The cytoolz package implements the same API as provided by toolz. The
14316main differences are that @code{cytoolz} is faster and cytoolz offers a C API
14317that is accessible to other projects developed in Cython.")
14318 (license license:bsd-3)))
14319
14320(define-public python-sortedcontainers
14321 (package
14322 (name "python-sortedcontainers")
14323 (version "2.0.4")
14324 (source
14325 (origin
14326 (method url-fetch)
14327 (uri (pypi-uri "sortedcontainers" version))
14328 (sha256
14329 (base32
14330 "10hrk2k0hbf9x78vd3f0lj277m1yzfhzzxr0hja718liwb398wk0"))))
14331 (build-system python-build-system)
14332 (native-inputs
14333 `(("python-tox" ,python-tox)))
14334 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
14335 (synopsis "Sorted List, Sorted Dict, Sorted Set")
14336 (description
14337 "This package provides a sorted collections library, written in
14338pure-Python.")
14339 (license license:asl2.0)))
14340
14341(define-public python-cloudpickle
14342 (package
14343 (name "python-cloudpickle")
14344 (version "0.6.1")
14345 (source
14346 (origin
14347 (method url-fetch)
14348 (uri (pypi-uri "cloudpickle" version))
14349 (sha256
14350 (base32
14351 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
14352 (build-system python-build-system)
14353 ;; FIXME: there are 5 errors in 122 tests:
14354 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
14355 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
14356 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
14357 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
14358 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
14359 ;; TypeError: cannot serialize '_io.BufferedRandom' object
14360 (arguments '(#:tests? #f))
14361 (native-inputs
14362 `(("python-pytest" ,python-pytest)
14363 ("python-mock" ,python-mock)
14364 ("python-tornado" ,python-tornado)))
14365 (home-page "https://github.com/cloudpipe/cloudpickle")
14366 (synopsis "Extended pickling support for Python objects")
14367 (description
14368 "Cloudpickle makes it possible to serialize Python constructs not
14369supported by the default pickle module from the Python standard library. It
14370is especially useful for cluster computing where Python expressions are
14371shipped over the network to execute on remote hosts, possibly close to the
14372data.")
14373 (license license:bsd-3)))
14374
14375(define-public python2-cloudpickle
14376 (package-with-python2 python-cloudpickle))
14377
14378(define-public python-locket
14379 (package
14380 (name "python-locket")
14381 (version "0.2.0")
14382 (source
14383 (origin
14384 (method url-fetch)
14385 (uri (pypi-uri "locket" version))
14386 (sha256
14387 (base32
14388 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
14389 (build-system python-build-system)
14390 (home-page "https://github.com/mwilliamson/locket.py")
14391 (synopsis "File-based locks for Python")
14392 (description
14393 "Locket implements a lock that can be used by multiple processes provided
14394they use the same path.")
14395 (license license:bsd-2)))
14396
14397(define-public python2-locket
14398 (package-with-python2 python-locket))
14399
14400(define-public python-blosc
14401 (package
14402 (name "python-blosc")
14403 (version "1.5.1")
14404 (source
14405 (origin
14406 (method url-fetch)
14407 (uri (pypi-uri "blosc" version))
14408 (sha256
14409 (base32
14410 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
14411 (build-system python-build-system)
14412 ;; FIXME: all tests pass, but then this error is printed:
14413 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
14414 (arguments '(#:tests? #f))
14415 (propagated-inputs
14416 `(("python-numpy" ,python-numpy)))
14417 (home-page "https://github.com/blosc/python-blosc")
14418 (synopsis "Python wrapper for the Blosc data compressor library")
14419 (description "Blosc is a high performance compressor optimized for binary
14420data. It has been designed to transmit data to the processor cache faster
14421than the traditional, non-compressed, direct memory fetch approach via a
14422@code{memcpy()} system call.
14423
14424Blosc works well for compressing numerical arrays that contains data with
14425relatively low entropy, like sparse data, time series, grids with
14426regular-spaced values, etc.
14427
14428This Python package wraps the Blosc library.")
14429 (license license:bsd-3)))
14430
14431(define-public python2-blosc
14432 (package-with-python2 python-blosc))
14433
14434(define-public python-partd
14435 (package
14436 (name "python-partd")
14437 (version "0.3.9")
14438 (source
14439 (origin
14440 (method url-fetch)
14441 (uri (pypi-uri "partd" version))
14442 (sha256
14443 (base32
14444 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
14445 (build-system python-build-system)
14446 (propagated-inputs
14447 `(("python-blosc" ,python-blosc)
14448 ("python-locket" ,python-locket)
14449 ("python-numpy" ,python-numpy)
14450 ("python-pandas" ,python-pandas)
14451 ("python-pyzmq" ,python-pyzmq)
14452 ("python-toolz" ,python-toolz)))
14453 (home-page "https://github.com/dask/partd/")
14454 (synopsis "Appendable key-value storage")
14455 (description "Partd stores key-value pairs. Values are raw bytes. We
14456append on old values. Partd excels at shuffling operations.")
14457 (license license:bsd-3)))
14458
14459(define-public python2-partd
14460 (package-with-python2 python-partd))
14461
14462(define-public python-dask
14463 (package
14464 (name "python-dask")
14465 (version "1.0.0")
14466 (source
14467 (origin
14468 (method url-fetch)
14469 (uri (pypi-uri "dask" version))
14470 (sha256
14471 (base32
14472 "1xwz8h020ipwav2p5gcq9pskya1cvzd6hjyvd06dvr3w5lxlmym1"))))
14473 (build-system python-build-system)
14474 ;; A single test out of 5000+ fails. This test is marked as xfail when
14475 ;; pytest-xdist is used.
14476 (arguments
14477 `(#:phases
14478 (modify-phases %standard-phases
14479 (add-after 'unpack 'disable-broken-test
14480 (lambda _
14481 (substitute* "dask/tests/test_threaded.py"
14482 (("def test_interrupt\\(\\)" m)
14483 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
14484 m)))
14485 (when (which "python2")
14486 ;; This test fails with recent Pandas:
14487 ;; <https://github.com/dask/dask/issues/3794>.
14488 (substitute* "dask/dataframe/tests/test_dataframe.py"
14489 (("def test_info\\(\\)" m)
14490 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
14491 m))))
14492 #t))
14493 (replace 'check
14494 (lambda _ (invoke "pytest" "-vv"))))))
14495 (propagated-inputs
14496 `(("python-cloudpickle" ,python-cloudpickle)
14497 ("python-numpy" ,python-numpy)
14498 ("python-pandas" ,python-pandas)
14499 ("python-partd" ,python-partd)
14500 ("python-toolz" ,python-toolz)
14501 ("python-pyyaml" ,python-pyyaml)))
14502 (native-inputs
14503 `(("python-pytest" ,python-pytest)
14504 ("python-pytest-runner" ,python-pytest-runner)))
14505 (home-page "https://github.com/dask/dask/")
14506 (synopsis "Parallel computing with task scheduling")
14507 (description
14508 "Dask is a flexible parallel computing library for analytics. It
14509consists of two components: dynamic task scheduling optimized for computation,
14510and large data collections like parallel arrays, dataframes, and lists that
14511extend common interfaces like NumPy, Pandas, or Python iterators to
14512larger-than-memory or distributed environments. These parallel collections
14513run on top of the dynamic task schedulers. ")
14514 (license license:bsd-3)))
14515
14516(define-public python2-dask
14517 (package-with-python2 python-dask))
14518
14519(define-public python-ilinkedlist
14520 (package
14521 (name "python-ilinkedlist")
14522 (version "0.4.0")
14523 (source
14524 (origin
14525 (method url-fetch)
14526 (uri (pypi-uri "ilinkedlist" version))
14527 (sha256
14528 (base32
14529 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
14530 (build-system python-build-system)
14531 (native-inputs `(("python-pytest" ,python-pytest)))
14532 (inputs `(("python" ,python)))
14533 (home-page "https://github.com/luther9/ilinkedlist-py")
14534 (synopsis "Immutable linked list library")
14535 (description
14536 "This is a implementation of immutable linked lists for Python. It
14537contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
14538Since a linked list is treated as immutable, it is hashable, and its length
14539can be retrieved in constant time. Some of the terminology is inspired by
14540LISP. It is possible to create an improper list by creating a @code{Pair}
14541with a non-list @code{cdr}.")
14542 (license license:gpl3+)))
14543
14544(define-public python-readlike
14545 (package
14546 (name "python-readlike")
14547 (version "0.1.3")
14548 (source
14549 (origin
14550 (method url-fetch)
14551 (uri (pypi-uri "readlike" version))
14552 (sha256
14553 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
14554 (build-system python-build-system)
14555 (home-page "https://github.com/jangler/readlike")
14556 (synopsis "GNU Readline-like line editing module")
14557 (description
14558 "This Python module provides line editing functions similar to the default
14559Emacs-style ones of GNU Readline. Unlike the Python standard library's
14560@code{readline} package, this one allows access to those capabilties in settings
14561outside of a standard command-line interface. It is especially well-suited to
14562interfacing with Urwid, due to a shared syntax for describing key inputs.
14563
14564Currently, all stateless Readline commands are implemented. Yanking and history
14565are not supported.")
14566 (license license:expat)))
14567
14568(define-public python2-readlike
14569 (package-with-python2 python-readlike))
14570
14571(define-public python-reparser
14572 (package
14573 (name "python-reparser")
14574 (version "1.4.3")
14575 (source
14576 (origin
14577 (method url-fetch)
14578 (uri (pypi-uri "ReParser" version))
14579 (sha256
14580 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
14581 (build-system python-build-system)
14582 (home-page "https://github.com/xmikos/reparser")
14583 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
14584 (description
14585 "This Python library provides a simple lexer/parser for inline markup based
14586on regular expressions.")
14587 (license license:expat)))
14588
14589(define-public python2-reparser
14590 (let ((reparser (package-with-python2
14591 (strip-python2-variant python-reparser))))
14592 (package (inherit reparser)
14593 (propagated-inputs
14594 `(("python2-enum34" ,python2-enum34)
14595 ,@(package-propagated-inputs reparser))))))
14596
14597(define-public python-precis-i18n
14598 (package
14599 (name "python-precis-i18n")
14600 (version "1.0.0")
14601 (source
14602 (origin
14603 (method url-fetch)
14604 (uri (pypi-uri "precis_i18n" version))
14605 (sha256
14606 (base32
14607 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
14608 (build-system python-build-system)
14609 (home-page "https://github.com/byllyfish/precis_i18n")
14610 (synopsis "Implementation of the PRECIS framework")
14611 (description
14612 "This module implements the PRECIS Framework as described in RFC 8264,
14613RFC 8265 and RFC 8266.")
14614 (license license:expat)))
14615
d0446c4b
RW
14616(define-public python-absl-py
14617 (package
14618 (name "python-absl-py")
14619 (version "0.6.1")
14620 (source
14621 (origin
14622 (method url-fetch)
14623 (uri (pypi-uri "absl-py" version))
14624 (sha256
14625 (base32
14626 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
14627 (build-system python-build-system)
14628 (propagated-inputs
14629 `(("python-six" ,python-six)))
14630 (home-page "https://github.com/abseil/abseil-py")
14631 (synopsis "Abseil Python common libraries")
14632 (description
14633 "This package provides the Abseil Python Common Libraries, a collection
14634of Python libraries for building Python applications.")
14635 (license license:asl2.0)))
14636
81bed4e9
RW
14637(define-public python-astor
14638 (package
14639 (name "python-astor")
14640 (version "0.7.1")
14641 (source
14642 (origin
14643 (method url-fetch)
14644 (uri (pypi-uri "astor" version))
14645 (sha256
14646 (base32
14647 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
14648 (build-system python-build-system)
14649 ;; FIXME: There are two errors and two test failures.
14650 (arguments `(#:tests? #f))
14651 (home-page "https://github.com/berkerpeksag/astor")
39ee82ff 14652 (synopsis "Read and write Python ASTs")
81bed4e9 14653 (description "Astor is designed to allow easy manipulation of Python
39ee82ff 14654source via the Abstract Syntax Tree.")
81bed4e9
RW
14655 (license license:bsd-3)))
14656
39ee82ff
RW
14657(define-public python2-astor
14658 (package-with-python2 python-astor))
14659
22e623ae
RW
14660(define-public python-grpcio
14661 (package
14662 (name "python-grpcio")
14663 (version "1.17.1")
14664 (source
14665 (origin
14666 (method url-fetch)
14667 (uri (pypi-uri "grpcio" version))
14668 (sha256
14669 (base32
14670 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
14671 (build-system python-build-system)
14672 (propagated-inputs
14673 `(("python-six" ,python-six)))
14674 (home-page "https://grpc.io")
14675 (synopsis "HTTP/2-based RPC framework")
14676 (description "This package provides a Python library for communicating
14677with the HTTP/2-based RPC framework gRPC.")
14678 (license license:asl2.0)))
14679
79869f80
RW
14680(define-public python-astunparse
14681 (package
14682 (name "python-astunparse")
14683 (version "1.6.1")
14684 (source
14685 (origin
14686 (method url-fetch)
14687 (uri (pypi-uri "astunparse" version))
14688 (sha256
14689 (base32
14690 "1jhidwyrqn17avqh9xnnm3wd7q7aahaq009cba67g86y6gxicyyj"))))
14691 (build-system python-build-system)
14692 (arguments '(#:tests? #f)) ; there are none
14693 (propagated-inputs
14694 `(("python-six" ,python-six)
14695 ("python-wheel" ,python-wheel)))
14696 (home-page "https://github.com/simonpercivall/astunparse")
14697 (synopsis "AST unparser for Python")
14698 (description "This package provides an AST unparser for Python. It is a
14699factored out version of @code{unparse} found in the Python source
14700distribution.")
14701 (license license:bsd-3)))
14702
2884aac0
RW
14703(define-public python-gast
14704 (package
14705 (name "python-gast")
14706 (version "0.2.0")
14707 (source
14708 (origin
14709 (method url-fetch)
14710 (uri (pypi-uri "gast" version))
14711 (sha256
14712 (base32
14713 "0c296xm1vz9x4w4inmdl0k8mnc0i9arw94si2i7pglpc461r0s3h"))))
14714 (build-system python-build-system)
14715 (propagated-inputs
14716 `(("python-astunparse" ,python-astunparse)))
14717 (home-page "https://pypi.org/project/gast/")
14718 (synopsis "Generic Python AST that abstracts the underlying Python version")
14719 (description
14720 "GAST provides a compatibility layer between the AST of various Python
14721versions, as produced by @code{ast.parse} from the standard @code{ast}
14722module.")
14723 (license license:bsd-3)))
14724
44d10b1f
RW
14725(define-public python-wikidata
14726 (package
14727 (name "python-wikidata")
14728 (version "0.6.1")
14729 (source
14730 (origin
14731 (method url-fetch)
14732 (uri (pypi-uri "Wikidata" version))
14733 (sha256
14734 (base32
14735 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
14736 (build-system python-build-system)
14737 (propagated-inputs
14738 `(("python-babel" ,python-babel)))
14739 (home-page "https://github.com/dahlia/wikidata")
14740 (synopsis "Wikidata client library")
14741 (description
14742 "This package provides a Python interface to
14743@url{https://www.wikidata.org/, Wikidata}.")
14744 (properties '((upstream-name . "Wikidata")))
14745 (license license:gpl3+)))
14746
14747(define-public python-doctest-ignore-unicode
14748 (package
14749 (name "python-doctest-ignore-unicode")
14750 (version "0.1.2")
14751 (source
14752 (origin
14753 (method url-fetch)
14754 (uri (pypi-uri "doctest-ignore-unicode" version))
14755 (sha256
14756 (base32
14757 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
14758 (build-system python-build-system)
14759 (native-inputs
14760 `(("python-nose" ,python-nose)))
14761 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
14762 (synopsis "Ignore Unicode literal prefixes in doctests")
14763 (description
14764 "This package adds support for a flag to ignore Unicode literal prefixes
14765in doctests.")
14766 (license license:asl2.0)))
14767
14768(define-public python-attr
14769 (package
14770 (name "python-attr")
14771 (version "0.3.1")
14772 (source
14773 (origin
14774 (method url-fetch)
14775 (uri (pypi-uri "attr" version))
14776 (sha256
14777 (base32
14778 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
14779 (build-system python-build-system)
14780 (home-page "https://github.com/denis-ryzhkov/attr")
14781 (synopsis "Decorator for attributes of target function or class")
14782 (description "Simple decorator to set attributes of target function or
14783class in a @acronym{DRY, Don't Repeat Yourself} way.")
14784 (license license:expat)))