gnu: Add python-sh.
[jackhill/guix/guix.git] / gnu / packages / python-xyz.scm
CommitLineData
44d10b1f
RW
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
2d040763 3;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
44d10b1f
RW
4;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr>
5;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
6;;; Copyright © 2014, 2017 Eric Bavier <bavier@member.fsf.org>
7;;; Copyright © 2014, 2015 Federico Beffa <beffa@fbengineering.ch>
8;;; Copyright © 2015 Omar Radwan <toxemicsquire4@gmail.com>
9;;; Copyright © 2015 Pierre-Antoine Rault <par@rigelk.eu>
10;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
11;;; Copyright © 2015, 2016 Christopher Allan Webber <cwebber@dustycloud.org>
12;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
13;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
14;;; Copyright © 2015, 2016, 2017 Leo Famulari <leo@famulari.name>
15;;; Copyright © 2015, 2017 Ben Woodcroft <donttrustben@gmail.com>
16;;; Copyright © 2015, 2016 Erik Edrosa <erik.edrosa@gmail.com>
17;;; Copyright © 2015, 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
18;;; Copyright © 2015, 2017 Kyle Meyer <kyle@kyleam.com>
19;;; Copyright © 2015, 2016 Chris Marusich <cmmarusich@gmail.com>
20;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
21;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
22;;; Copyright © 2016, 2018 Hartmut Goebel <h.goebel@crazy-compilers.com>
23;;; Copyright © 2016 Daniel Pimentel <d4n1@d4n1.org>
24;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
25;;; Copyright © 2016, 2017 Troy Sankey <sankeytms@gmail.com>
26;;; Copyright © 2016, 2017 Nils Gillmann <ng0@n0.is>
27;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
28;;; Copyright © 2016 David Craven <david@craven.ch>
29;;; Copyright © 2016, 2017, 2018 Marius Bakke <mbakke@fastmail.com>
30;;; Copyright © 2016, 2017 Stefan Reichör <stefan@xsteve.at>
31;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
32;;; Copyright © 2016, 2017 Alex Vong <alexvong1995@gmail.com>
33;;; Copyright © 2016, 2017, 2018 Arun Isaac <arunisaac@systemreboot.net>
34;;; Copyright © 2016, 2017, 2018 Julien Lepiller <julien@lepiller.eu>
35;;; Copyright © 2016, 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
36;;; Copyright © 2016, 2017 Thomas Danckaert <post@thomasdanckaert.be>
37;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
38;;; Copyright © 2017 Frederick M. Muriithi <fredmanglis@gmail.com>
39;;; Copyright © 2017, 2018 Adriano Peluso <catonano@gmail.com>
40;;; Copyright © 2017 Ben Sturmfels <ben@sturm.com.au>
41;;; Copyright © 2017, 2018 Mathieu Othacehe <m.othacehe@gmail.com>
42;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.org>
43;;; Copyright © 2017 Roel Janssen <roel@gnu.org>
44;;; Copyright © 2017, 2018 Kei Kebreau <kkebreau@posteo.net>
45;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
46;;; Copyright © 2017 Muriithi Frederick Muriuki <fredmanglis@gmail.com>
47;;; Copyright © 2017 Brendan Tildesley <brendan.tildesley@openmailbox.org>
48;;; Copyright © 2018 Ethan R. Jones <ethanrjones97@gmail.com
49;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
50;;; Copyright © 2018 Vijayalakshmi Vedantham <vijimay12@gmail.com>
51;;; Copyright © 2018 Mathieu Lirzin <mthl@gnu.org>
52;;; Copyright © 2018 Adam Massmann <massmannak@gmail.com>
53;;; Copyright © 2016, 2018 Tomáš Čech <sleep_walker@gnu.org>
54;;; Copyright © 2018 Nicolas Goaziou <mail@nicolasgoaziou.fr>
55;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
56;;; Copyright © 2018 Clément Lassieur <clement@lassieur.org>
57;;; Copyright © 2018 Maxim Cournoyer <maxim.cournoyer@gmail.com>
58;;; Copyright © 2018 Luther Thompson <lutheroto@gmail.com>
59;;; Copyright © 2018 Vagrant Cascadian <vagrant@debian.org>
60;;;
61;;; This file is part of GNU Guix.
62;;;
63;;; GNU Guix is free software; you can redistribute it and/or modify it
64;;; under the terms of the GNU General Public License as published by
65;;; the Free Software Foundation; either version 3 of the License, or (at
66;;; your option) any later version.
67;;;
68;;; GNU Guix is distributed in the hope that it will be useful, but
69;;; WITHOUT ANY WARRANTY; without even the implied warranty of
70;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
71;;; GNU General Public License for more details.
72;;;
73;;; You should have received a copy of the GNU General Public License
74;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
75
76(define-module (gnu packages python-xyz)
77 #:use-module ((guix licenses) #:prefix license:)
78 #:use-module (gnu packages)
79 #:use-module (gnu packages algebra)
80 #:use-module (gnu packages adns)
81 #:use-module (gnu packages attr)
82 #:use-module (gnu packages backup)
83 #:use-module (gnu packages bash)
84 #:use-module (gnu packages check)
85 #:use-module (gnu packages compression)
86 #:use-module (gnu packages crypto)
87 #:use-module (gnu packages databases)
88 #:use-module (gnu packages file)
89 #:use-module (gnu packages fontutils)
90 #:use-module (gnu packages gcc)
91 #:use-module (gnu packages geo)
92 #:use-module (gnu packages ghostscript)
93 #:use-module (gnu packages gl)
94 #:use-module (gnu packages glib)
95 #:use-module (gnu packages graphviz)
96 #:use-module (gnu packages graphics)
97 #:use-module (gnu packages gstreamer)
98 #:use-module (gnu packages gtk)
99 #:use-module (gnu packages icu4c)
100 #:use-module (gnu packages image)
101 #:use-module (gnu packages imagemagick)
102 #:use-module (gnu packages libevent)
103 #:use-module (gnu packages libffi)
104 #:use-module (gnu packages linux)
105 #:use-module (gnu packages llvm)
106 #:use-module (gnu packages man)
107 #:use-module (gnu packages maths)
108 #:use-module (gnu packages multiprecision)
109 #:use-module (gnu packages networking)
110 #:use-module (gnu packages ncurses)
111 #:use-module (gnu packages openstack)
112 #:use-module (gnu packages pcre)
113 #:use-module (gnu packages perl)
114 #:use-module (gnu packages pkg-config)
115 #:use-module (gnu packages python)
116 #:use-module (gnu packages python-crypto)
117 #:use-module (gnu packages python-web)
118 #:use-module (gnu packages qt)
119 #:use-module (gnu packages readline)
120 #:use-module (gnu packages sdl)
121 #:use-module (gnu packages search)
122 #:use-module (gnu packages shells)
123 #:use-module (gnu packages ssh)
124 #:use-module (gnu packages terminals)
125 #:use-module (gnu packages tex)
126 #:use-module (gnu packages texinfo)
127 #:use-module (gnu packages time)
128 #:use-module (gnu packages tls)
129 #:use-module (gnu packages version-control)
130 #:use-module (gnu packages video)
131 #:use-module (gnu packages web)
132 #:use-module (gnu packages base)
133 #:use-module (gnu packages xml)
134 #:use-module (gnu packages xorg)
135 #:use-module (gnu packages xdisorg)
136 #:use-module (gnu packages tcl)
137 #:use-module (gnu packages bdw-gc)
138 #:use-module (guix packages)
139 #:use-module (guix download)
140 #:use-module (guix git-download)
141 #:use-module (guix utils)
142 #:use-module (guix build-system gnu)
143 #:use-module (guix build-system cmake)
144 #:use-module (guix build-system python)
145 #:use-module (guix build-system trivial)
146 #:use-module (srfi srfi-1)
147 #:use-module (srfi srfi-26))
148
149(define-public python-psutil
150 (package
151 (name "python-psutil")
152 (version "5.4.3")
153 (source
154 (origin
155 (method url-fetch)
156 (uri (pypi-uri "psutil" version))
157 (sha256
158 (base32
159 "063v69x7spyclyaxrd3gmzj3p16q5ayg97xqhwb1kyn22a9pwip2"))))
160 (build-system python-build-system)
161 (arguments
162 ;; FIXME: some tests does not return and times out.
163 '(#:tests? #f))
164 (home-page "https://www.github.com/giampaolo/psutil")
165 (synopsis "Library for retrieving information on running processes")
166 (description
167 "psutil (Python system and process utilities) is a library for retrieving
168information on running processes and system utilization (CPU, memory, disks,
169network) in Python. It is useful mainly for system monitoring, profiling and
170limiting process resources and management of running processes. It implements
171many functionalities offered by command line tools such as: ps, top, lsof,
172netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
173pidof, tty, taskset, pmap.")
174 (properties `((python2-variant . ,(delay python2-psutil))))
175 (license license:bsd-3)))
176
177(define-public python2-psutil
178 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
179 (package
180 (inherit base)
181 (propagated-inputs
182 `(("python2-enum34" ,python2-enum34) ;optional
183 ,@(package-propagated-inputs base))))))
184
185(define-public python-shapely
186 (package
187 (name "python-shapely")
188 (version "1.6.3")
189 (source
190 (origin
191 (method url-fetch)
192 (uri (pypi-uri "Shapely" version))
193 (sha256
194 (base32
195 "0svc58dzcw9gj92b4sgq35sdxkf85z0qwlzxarkzq4bp3h8jy58l"))))
196 (build-system python-build-system)
197 (native-inputs
198 `(("python-cython" ,python-cython)
199 ("python-matplotlib" ,python-matplotlib)
200 ("python-pytest" ,python-pytest)
201 ("python-pytest-cov" ,python-pytest-cov)))
202 (inputs
203 `(("geos" ,geos)))
204 (propagated-inputs
205 `(("python-numpy" ,python-numpy)))
206 (arguments
207 `(#:phases
208 (modify-phases %standard-phases
209 (add-after 'unpack 'patch-geos-path
210 (lambda* (#:key inputs #:allow-other-keys)
211 (let ((geos (assoc-ref inputs "geos"))
212 (glibc (assoc-ref inputs ,(if (%current-target-system)
213 "cross-libc" "libc"))))
214 (substitute* "shapely/geos.py"
215 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
216 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
217 geos "/lib/libgeos_c.so'])"))
218 (("free = load_dll\\('c'\\)\\.free")
219 (string-append "free = load_dll('c', fallbacks=['"
220 glibc "/lib/libc.so.6']).free"))))
221 #t)))))
222 (home-page "https://github.com/Toblerity/Shapely")
223 (synopsis "Library for the manipulation and analysis of geometric objects")
224 (description "Shapely is a Python package for manipulation and analysis of
225planar geometric objects. It is based on the @code{GEOS} library.")
226 (license license:bsd-3)))
227
228(define-public python-logwrap
229 (package
230 (name "python-logwrap")
231 (version "3.2.1")
232 (source
233 (origin
234 (method url-fetch)
235 (uri (pypi-uri "logwrap" version ".zip"))
236 (sha256
237 (base32
238 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
239 (build-system python-build-system)
240 (propagated-inputs
241 `(("python-six" ,python-six)
242 ("python-typing" ,python-typing)))
243 (native-inputs
244 `(("unzip" ,unzip)
245 ("python-cython" ,python-cython)
246 ("python-pytest" ,python-pytest)
247 ("python-pytest-cov" ,python-pytest-cov)
248 ("python-pytest-runner" ,python-pytest-runner)))
249 (home-page "https://github.com/penguinolog/logwrap")
250 (synopsis "Decorator for logging function arguments")
251 (description "This package provides a decorator to log function arguments
252and function call return values in a human-readable way.")
253 (license license:asl2.0)))
254
255(define-public python2-shapely
256 (package-with-python2 python-shapely))
257
258(define-public python-clyent
259 (package
260 (name "python-clyent")
261 (version "1.2.1")
262 (source
263 (origin
264 (method url-fetch)
265 (uri (pypi-uri "clyent" version))
266 (sha256
267 (base32
268 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
269 (build-system python-build-system)
270 (native-inputs
271 `(("python-mock" ,python-mock)))
272 (home-page "https://github.com/binstar/clyent")
273 (synopsis "Command line client library")
274 (description "Clyent is a Python command line utiliy library. It is used
275by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
276 (license license:bsd-3)))
277
278(define-public python2-clyent
279 (package-with-python2 python-clyent))
280
281(define-public python-babel
282 (package
283 (name "python-babel")
284 (version "2.6.0")
285 (source
286 (origin
287 (method url-fetch)
288 (uri (pypi-uri "Babel" version))
289 (sha256
290 (base32
291 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))
292 (build-system python-build-system)
293 (native-inputs
294 `(("python-freezegun" ,python-freezegun)
295 ("python-pytest" ,python-pytest)))
296 (propagated-inputs
297 `(("python-pytz" ,python-pytz)))
298 (arguments
299 `(#:phases (modify-phases %standard-phases
300 (replace 'check
301 (lambda _ (invoke "pytest" "-vv"))))))
302 (home-page "http://babel.pocoo.org/")
303 (synopsis
304 "Tools for internationalizing Python applications")
305 (description
306 "Babel is composed of two major parts:
307- tools to build and work with gettext message catalogs
308- a Python interface to the CLDR (Common Locale Data Repository), providing
309access to various locale display names, localized number and date formatting,
310etc. ")
311 (license license:bsd-3)))
312
313(define-public python2-babel
314 (package-with-python2 python-babel))
315
316(define-public python2-backport-ssl-match-hostname
317 (package
318 (name "python2-backport-ssl-match-hostname")
319 (version "3.5.0.1")
320 (source
321 (origin
322 (method url-fetch)
323 (uri (string-append
324 "https://pypi.python.org/packages/source/b/"
325 "backports.ssl_match_hostname/backports.ssl_match_hostname-"
326 version ".tar.gz"))
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)
449 (home-page "https://github.com/amoffat/sh")
450 (synopsis "Python subprocess replacement")
451 (description "This package provides a replacement for Python's
452@code{subprocess} feature.")
453 (license license:expat)))
454
44d10b1f
RW
455(define-public python-netcdf4
456 (package
457 (name "python-netcdf4")
458 (version "1.2.9")
459 (source
460 (origin
461 (method url-fetch)
462 (uri (pypi-uri "netCDF4" version))
463 (sha256
464 (base32
465 "1h6jq338amlbk0ilzvjyl7cck80i0bah9a5spn9in71vy2qxm7i5"))))
466 (build-system python-build-system)
467 (native-inputs
468 `(("python-cython" ,python-cython)))
469 (propagated-inputs
470 `(("python-numpy" ,python-numpy)))
471 (inputs
472 `(("netcdf" ,netcdf)
473 ("hdf4" ,hdf4)
474 ("hdf5" ,hdf5)))
475 (arguments
476 '(#:phases
477 (modify-phases %standard-phases
478 (replace 'check
479 (lambda _
480 (setenv "NO_NET" "1") ; disable opendap tests
481 (with-directory-excursion "test"
482 (setenv "PYTHONPATH" ; find and add the library we just built
483 (string-append
484 (car (find-files "../build" "lib.*"
485 #:directories? #:t
486 #:fail-on-error? #:t))
487 ":" (getenv "PYTHONPATH")))
488 (zero? (system* "python" "run_all.py"))))))))
489 (home-page
490 "https://github.com/Unidata/netcdf4-python")
491 (synopsis "Python/numpy interface to the netCDF library")
492 (description "Netcdf4-python is a Python interface to the netCDF C
493library. netCDF version 4 has many features not found in earlier
494versions of the library and is implemented on top of HDF5. This module
495can read and write files in both the new netCDF 4 and the old netCDF 3
496format, and can create files that are readable by HDF5 clients. The
497API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
498to users of that module.")
499 ;; The software is mainly ISC, but includes some files covered
500 ;; by the Expat license.
501 (license (list license:isc license:expat))))
502
503(define-public python2-netcdf4
504 (package-with-python2 python-netcdf4))
505
506(define-public python-lockfile
507 (package
508 (name "python-lockfile")
509 (version "0.12.2")
510 (source
511 (origin
512 (method url-fetch)
513 (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/"
514 "lockfile-" version ".tar.gz"))
515 (sha256
516 (base32
517 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
518 (build-system python-build-system)
519 (arguments '(#:test-target "check"))
520 (native-inputs
521 `(("python-pbr" ,python-pbr)))
522 (home-page "https://launchpad.net/pylockfile")
523 (synopsis "Platform-independent file locking module")
524 (description
525 "The lockfile package exports a LockFile class which provides a simple
526API for locking files.")
527 (license license:expat)))
528
529(define-public python2-lockfile
530 (package-with-python2 python-lockfile))
531
532(define-public python-semantic-version
533 (package
534 (name "python-semantic-version")
535 (version "2.6.0")
536 (source
537 (origin
538 (method url-fetch)
539 (uri (pypi-uri "semantic_version" version))
540 (sha256
541 (base32
542 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
543 (build-system python-build-system)
544 (arguments
545 `(#:tests? #f)) ; PyPI tarball lacks tests
546 (home-page "https://github.com/rbarrois/python-semanticversion")
547 (synopsis "Semantic versioning module for Python")
548 (description
549 "The @code{semantic_version} class is a small library for handling
550@uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
551
552It can compare versions, generate a new version that represents a bump in one of
553the version levels, and check whether any given string is a proper semantic
554version identifier.")
555 (license license:bsd-3)))
556
557(define-public python2-semantic-version
558 (package-with-python2 python-semantic-version))
559
560(define-public python-serpent
561 (package
562 (name "python-serpent")
563 (version "1.27")
564 (source
565 (origin
566 (method url-fetch)
567 (uri (pypi-uri "serpent" version))
568 (sha256
569 (base32
570 "04p9dsrm5pv8vhk3flvih55kgvlzpi38hlaykdiakddmgwqw93bg"))))
571 (build-system python-build-system)
572 (home-page "https://github.com/irmen/Serpent")
573 (synopsis "Serializer for literal Python expressions")
574 (description
575 "Serpent provides ast.literal_eval() compatible object tree
576serialization. It serializes an object tree into bytes (utf-8 encoded string)
577that can be decoded and then passed as-is to ast.literal_eval() to rebuild it
578as the original object tree. As such it is safe to send serpent data to other
579machines over the network for instance (because only safe literals are
580encoded).")
581 (license license:expat)))
582
583(define-public python-setuptools
584 (package
585 (name "python-setuptools")
586 (version "40.0.0")
587 (source
588 (origin
589 (method url-fetch)
590 (uri (pypi-uri "setuptools" version ".zip"))
591 (sha256
592 (base32
593 "0pq116lr14gnc62v76nk0npkm6krb2mpp7p9ab369zgv4n7dnah1"))
594 (modules '((guix build utils)))
595 (snippet
596 '(begin
597 ;; Remove included binaries which are used to build self-extracting
598 ;; installers for Windows.
599 ;; TODO: Find some way to build them ourself so we can include them.
600 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
601 #t))))
602 (build-system python-build-system)
603 ;; FIXME: Tests require pytest, which itself relies on setuptools.
604 ;; One could bootstrap with an internal untested setuptools.
605 (arguments
606 `(#:tests? #f))
607 (home-page "https://pypi.python.org/pypi/setuptools")
608 (synopsis
609 "Library designed to facilitate packaging Python projects")
610 (description
611 "Setuptools is a fully-featured, stable library designed to facilitate
612packaging Python projects, where packaging includes:
613Python package and module definitions,
614distribution package metadata,
615test hooks,
616project installation,
617platform-specific details,
618Python 3 support.")
619 ;; TODO: setuptools now bundles the following libraries:
620 ;; packaging, pyparsing, six and appdirs. How to unbundle?
621 (license (list license:psfl ; setuptools itself
622 license:expat ; six, appdirs, pyparsing
623 license:asl2.0 ; packaging is dual ASL2/BSD-2
624 license:bsd-2))))
625
626(define-public python2-setuptools
627 (package-with-python2 python-setuptools))
628
629(define-public python-uniseg
630 (package
631 (name "python-uniseg")
632 (version "0.7.1")
633 (source
634 (origin
635 (method url-fetch)
636 (uri (pypi-uri "uniseg" version ".zip"))
637 (sha256
638 (base32
639 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
640 (build-system python-build-system)
641 (arguments
642 '(#:tests? #f)) ; The test suite requires network access.
643 (native-inputs
644 `(("unzip" ,unzip)))
645 (home-page
646 "https://bitbucket.org/emptypage/uniseg-python")
647 (synopsis
648 "Python library to determine Unicode text segmentations")
649 (description
650 "Uniseg is a Python package used to determine Unicode text segmentations.
651Supported segmentations include:
652@enumerate
653@item @dfn{Code point} (any value in the Unicode codespace)
654@item @dfn{Grapheme cluster} (user-perceived character made of a single or
655multiple Unicode code points, e.g. \"G\" + acute-accent)
656@item Word break
657@item Sentence break
658@item Line break
659@end enumerate")
660 (license license:expat)))
661
662(define-public python2-uniseg
663 (package-with-python2 python-uniseg))
664
665(define-public python-humanfriendly
666 (package
667 (name "python-humanfriendly")
668 (version "4.4.1")
669 (source
670 (origin
671 (method url-fetch)
672 (uri (pypi-uri "humanfriendly" version))
673 (sha256
674 (base32
675 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
676 (build-system python-build-system)
677 (arguments
678 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
679 #:tests? #f))
680 (propagated-inputs
681 `(("python-monotonic" ,python-monotonic)))
682 (home-page "https://humanfriendly.readthedocs.io")
683 (synopsis "Human-friendly input and output in Python")
684 (description
685 "The functions and classes in @code{humanfriendly} can be used to make
686text interfaces more user-friendly. It includes tools to parse and format
687numbers, file sizes, and timespans, timers for long-running operations, menus
688to allow the user to choose from a list of options, and terminal interaction
689helpers.")
690 (license license:expat)))
691
692(define-public python2-humanfriendly
693 (package-with-python2 python-humanfriendly))
694
695(define-public python-capturer
696 (package
697 (name "python-capturer")
698 (version "2.4")
699 (source
700 (origin
701 (method url-fetch)
702 (uri (pypi-uri "capturer" version))
703 (sha256
704 (base32
705 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
706 (build-system python-build-system)
707 (arguments
708 `(#:tests? #f))
709 (propagated-inputs
710 `(("python-humanfriendly" ,python-humanfriendly)))
711 (home-page "https://capturer.readthedocs.io")
712 (synopsis "Capture stdout and stderr streams of the current process")
713 (description
714 "The capturer package makes it easy to capture the stdout and stderr
715streams of the current process and subprocesses. Output can be relayed
716to the terminal in real time but is also available to the Python program
717for additional processing.")
718 (license license:expat)))
719
720(define-public python2-capturer
721 (package-with-python2 python-capturer))
722
723(define-public python-case
724 (package
725 (name "python-case")
726 (version "1.5.3")
727 (source
728 (origin
729 (method url-fetch)
730 (uri (pypi-uri "case" version))
731 (sha256
732 (base32
733 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
734 (build-system python-build-system)
735 (propagated-inputs
736 `(("python-mock" ,python-mock)
737 ("python-nose" ,python-nose)
738 ("python-six" ,python-six)
739 ("python-unittest2" ,python-unittest2)))
740 (native-inputs
741 `(("python-coverage" ,python-coverage)))
742 (home-page "https://github.com/celery/case")
743 (synopsis "Unittest utilities and convenience methods")
744 (description
745 "The @code{case} package provides utilities on top of unittest, including
746some helpful Python 2 compatibility convenience methods.")
747 (license license:bsd-3)))
748
749(define-public python-verboselogs
750 (package
751 (name "python-verboselogs")
752 (version "1.7")
753 (source
754 (origin
755 (method url-fetch)
756 (uri (pypi-uri "verboselogs" version))
757 (sha256
758 (base32
759 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
760 (build-system python-build-system)
761 (native-inputs
762 `(("python-mock" ,python-mock)
763 ("python-astroid" ,python-astroid)
764 ("python-pylint" ,python-pylint)))
765 (home-page "https://verboselogs.readthedocs.io")
766 (synopsis "Verbose logging level for Python's logging module")
767 (description
768 "The @code{verboselogs} package extends Python's @code{logging} module to
769add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
770 (license license:expat)))
771
772(define-public python2-verboselogs
773 (package-with-python2 python-verboselogs))
774
775(define-public python-coloredlogs
776 (package
777 (name "python-coloredlogs")
778 (version "7.3")
779 (source
780 (origin
781 (method url-fetch)
782 (uri (pypi-uri "coloredlogs" version))
783 (sha256
784 (base32
785 "1blcann6dyg5dhps9pg12rn0q0rjrlajpmmil0gy0j4cbvnl2il9"))))
786 (build-system python-build-system)
787 (arguments
788 `(;Tests require some updated modules
789 #:tests? #f))
790 (propagated-inputs
791 `(("python-capturer" ,python-capturer)))
792 (home-page "https://coloredlogs.readthedocs.io")
793 (synopsis "Colored stream handler for Python's logging module")
794 (description
795 "The @code{coloredlogs} package enables colored terminal output for
796Python's logging module. The @code{ColoredFormatter} class inherits from
797@code{logging.Formatter} and uses ANSI escape sequences to render your logging
798messages in color.")
799 (license license:expat)))
800
801(define-public python2-coloredlogs
802 (package-with-python2 python-coloredlogs))
803
804(define-public python-eventlet
805 (package
806 (name "python-eventlet")
807 (version "0.20.1")
808 (source
809 (origin
810 (method url-fetch)
811 (uri (pypi-uri "eventlet" version))
812 (sha256
813 (base32
814 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
815 (build-system python-build-system)
816 (propagated-inputs
817 `(("python-greenlet" ,python-greenlet)))
818 (arguments
819 ;; TODO: Requires unpackaged 'enum-compat'.
820 '(#:tests? #f))
821 (home-page "http://eventlet.net")
822 (synopsis "Concurrent networking library for Python")
823 (description
824 "Eventlet is a concurrent networking library for Python that
825allows you to change how you run your code, not how you write it.
826It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
827Coroutines ensure that the developer uses a blocking style of programming
828that is similar to threading, but provide the benefits of non-blocking I/O.
829The event dispatch is implicit, which means you can easily use @code{Eventlet}
830from the Python interpreter, or as a small part of a larger application.")
831 (license license:expat)))
832
833(define-public python2-eventlet
834 (let ((base (package-with-python2
835 (strip-python2-variant python-eventlet))))
836 (package (inherit base)
837 (propagated-inputs
838 `(("python2-enum34" ,python2-enum34)
839 ,@(package-propagated-inputs base))))))
840
841(define-public python-six
842 (package
843 (name "python-six")
844 (version "1.11.0")
845 (source
846 (origin
847 (method url-fetch)
848 (uri (pypi-uri "six" version))
849 (sha256
850 (base32
851 "1scqzwc51c875z23phj48gircqjgnn3af8zy2izjwmnlxrxsgs3h"))))
852 (build-system python-build-system)
853 (arguments
854 `(#:phases
855 (modify-phases %standard-phases
856 (replace 'check
857 (lambda _
858 (invoke "py.test" "-v"))))))
859 (native-inputs
860 `(("python-py" ,python-py)
861 ("python-pytest" ,python-pytest-bootstrap)))
862 (home-page "https://pypi.python.org/pypi/six/")
863 (synopsis "Python 2 and 3 compatibility utilities")
864 (description
865 "Six is a Python 2 and 3 compatibility library. It provides utility
866functions for smoothing over the differences between the Python versions with
867the goal of writing Python code that is compatible on both Python versions.
868Six supports every Python version since 2.5. It is contained in only one
869Python file, so it can be easily copied into your project.")
870 (license license:x11)))
871
872(define-public python2-six
873 (package-with-python2 python-six))
874
875(define-public python-six-bootstrap
876 (package
877 (inherit python-six)
878 (name "python-six-bootstrap")
879 (native-inputs `())
880 (arguments `(#:tests? #f))))
881
882(define-public python2-six-bootstrap
883 (package-with-python2 python-six-bootstrap))
884
885(define-public python-schedule
886 (package
887 (name "python-schedule")
888 (version "0.4.3")
889 (source
890 (origin
891 (method url-fetch)
892 (uri (pypi-uri "schedule" version))
893 (sha256
894 (base32
895 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
896 (build-system python-build-system)
897 (native-inputs
898 `(("python-pytest" ,python-pytest)
899 ("python-mock" ,python-mock)))
900 (home-page "https://github.com/dbader/schedule")
901 (synopsis "Schedule periodic function calls in Python")
902 (description
903 "Schedule is an in-process scheduler for periodic jobs that uses the
904builder pattern for configuration. Schedule lets you run Python functions (or
905any other callable) periodically at pre-determined intervals using a simple,
906human-friendly syntax.")
907 (license license:expat)))
908
909(define-public python2-schedule
910 (package-with-python2 python-schedule))
911
912(define-public python-pandas
913 (package
914 (name "python-pandas")
915 (version "0.23.4")
916 (source
917 (origin
918 (method url-fetch)
919 (uri (pypi-uri "pandas" version))
920 (sha256
921 (base32 "1x54pd7hr3y7qahx6b5bf2wzj54xvl8r3s1h4pl254pnmi3wl92v"))))
922 (build-system python-build-system)
923 (arguments
924 `(#:modules ((guix build utils)
925 (guix build python-build-system)
926 (ice-9 ftw)
927 (srfi srfi-26))
928 #:phases (modify-phases %standard-phases
929 (replace 'check
930 (lambda _
931 (let ((build-directory
932 (string-append
933 (getcwd) "/build/"
934 (car (scandir "build"
935 (cut string-prefix? "lib." <>))))))
936 ;; Disable the "strict data files" option which causes
937 ;; the build to error out if required data files are not
938 ;; available (as is the case with PyPI archives).
939 (substitute* "setup.cfg"
940 (("addopts = --strict-data-files") "addopts = "))
941 (with-directory-excursion build-directory
942 ;; Delete tests that require "moto" which is not yet in Guix.
943 (for-each delete-file
944 '("pandas/tests/io/conftest.py"
945 "pandas/tests/io/json/test_compression.py"
946 "pandas/tests/io/parser/test_network.py"
947 "pandas/tests/io/test_excel.py"
948 "pandas/tests/io/test_parquet.py"))
949 (invoke "pytest" "-vv" "pandas" "--skip-slow"
950 "--skip-network" "-k"
951 ;; XXX: Due to the deleted tests above.
952 "not test_read_s3_jsonl"))))))))
953 (propagated-inputs
954 `(("python-numpy" ,python-numpy)
955 ("python-pytz" ,python-pytz)
956 ("python-dateutil" ,python-dateutil)))
957 (native-inputs
958 `(("python-cython" ,python-cython)
959 ("python-beautifulsoup4" ,python-beautifulsoup4)
960 ("python-lxml" ,python-lxml)
961 ("python-html5lib" ,python-html5lib)
962 ("python-nose" ,python-nose)
963 ("python-pytest" ,python-pytest)))
964 (home-page "https://pandas.pydata.org")
965 (synopsis "Data structures for data analysis, time series, and statistics")
966 (description
967 "Pandas is a Python package providing fast, flexible, and expressive data
968structures designed to make working with structured (tabular,
969multidimensional, potentially heterogeneous) and time series data both easy
970and intuitive. It aims to be the fundamental high-level building block for
971doing practical, real world data analysis in Python.")
972 (license license:bsd-3)))
973
974(define-public python2-pandas
975 (package-with-python2 python-pandas))
976
977(define-public python2-mechanize
978 (package
979 (name "python2-mechanize")
980 (version "0.2.5")
981 (source
982 (origin
983 (method url-fetch)
984 (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-"
985 version ".tar.gz"))
986 (sha256
987 (base32
988 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
989 (build-system python-build-system)
990 (arguments
991 `(#:python ,python-2 ; apparently incompatible with Python 3
992 #:tests? #f))
993 ;; test fails with message
994 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
995 ;; (python-3.3.2) or
996 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
997 ;; (python-2.7.5).
998 ;; The source code is from March 2011 and probably not up-to-date
999 ;; with respect to python unit tests.
1000 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1001 (synopsis
1002 "Stateful programmatic web browsing in Python")
1003 (description
1004 "Mechanize implements stateful programmatic web browsing in Python,
1005after Andy Lester’s Perl module WWW::Mechanize.")
1006 (license (license:non-copyleft
1007 "file://COPYING"
1008 "See COPYING in the distribution."))))
1009
1010
1011(define-public python-simplejson
1012 (package
1013 (name "python-simplejson")
1014 (version "3.14.0")
1015 (source
1016 (origin
1017 (method url-fetch)
1018 (uri (pypi-uri "simplejson" version))
1019 (sha256
1020 (base32
1021 "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy"))))
1022 (build-system python-build-system)
1023 (home-page "http://simplejson.readthedocs.org/en/latest/")
1024 (synopsis
1025 "Json library for Python")
1026 (description
1027 "JSON (JavaScript Object Notation) is a subset of JavaScript
1028syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1029format.
1030
1031Simplejson exposes an API familiar to users of the standard library marshal
1032and pickle modules. It is the externally maintained version of the json
1033library contained in Python 2.6, but maintains compatibility with Python 2.5
1034and (currently) has significant performance advantages, even without using
1035the optional C extension for speedups. Simplejson is also supported on
1036Python 3.3+.")
1037 (license license:x11)))
1038
1039(define-public python2-simplejson
1040 (package-with-python2 python-simplejson))
1041
1042
1043(define-public python-pyicu
1044 (package
1045 (name "python-pyicu")
1046 (version "2.2")
1047 (source
1048 (origin
1049 (method url-fetch)
1050 (uri (pypi-uri "PyICU" version))
1051 (sha256
1052 (base32
1053 "0wq9y5fi1ighgf5aws9nr87vi1w44p7q1k83rx2y3qj5d2xyhspa"))))
1054 (build-system python-build-system)
1055 (inputs
1056 `(("icu4c" ,icu4c)))
1057 (native-inputs
1058 `(("python-pytest" ,python-pytest)
1059 ("python-six" ,python-six)))
1060 (home-page "https://github.com/ovalhub/pyicu")
1061 (synopsis "Python extension wrapping the ICU C++ API")
1062 (description
1063 "PyICU is a python extension wrapping the ICU C++ API.")
1064 (properties `((python2-variant . ,(delay python2-pyicu))))
1065 (license license:x11)))
1066
1067(define-public python2-pyicu
1068 (let ((base (package-with-python2
1069 (strip-python2-variant python-pyicu))))
1070 (package
1071 (inherit base)
1072 (arguments
1073 `(,@(package-arguments base)
1074 #:phases
1075 (modify-phases %standard-phases
1076 (add-before 'check 'delete-failing-test
1077 (λ _
1078 ;; XXX: This fails due to Unicode issues unique to Python 2,
1079 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1080 (delete-file "test/test_Script.py")
1081 #t))))))))
1082
1083(define-public python2-dogtail
1084 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1085 ;; spaces in indentation" with Python 3.
1086 (package
1087 (name "python2-dogtail")
1088 (version "0.9.9")
1089 (source (origin
1090 (method url-fetch)
1091 (uri (pypi-uri "dogtail" version))
1092 (sha256
1093 (base32
1094 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1095 (build-system python-build-system)
1096 (arguments `(#:python ,python-2
1097 #:tests? #f)) ; invalid command "test"
1098 ;; Currently no offical homepage.
1099 (home-page "https://pypi.python.org/pypi/dogtail/")
1100 (synopsis "GUI test tool and automation framework written in Python")
1101 (description
1102 "Dogtail is a GUI test tool and automation framework written in Python.
1103It uses Accessibility (a11y) technologies to communicate with desktop
1104applications. dogtail scripts are written in Python and executed like any
1105other Python program.")
1106 (license license:gpl2+)))
1107
1108(define-public python-empy
1109 (package
1110 (name "python-empy")
1111 (version "3.3")
1112 (source (origin
1113 (method url-fetch)
1114 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1115 version ".tar.gz"))
1116 (sha256
1117 (base32
1118 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1119 (build-system python-build-system)
1120 (arguments
1121 `(#:tests? #f)) ;python2 only
1122 (home-page "http://www.alcyone.com/software/empy/")
1123 (synopsis "Templating system for Python")
1124 (description
1125 "EmPy is a system for embedding Python expressions and statements in
1126template text; it takes an EmPy source file, processes it, and produces
1127output. This is accomplished via expansions, which are special signals to the
1128EmPy system and are set off by a special prefix (by default the at sign, @@).
1129EmPy can expand arbitrary Python expressions and statements in this way, as
1130well as a variety of special forms. Textual data not explicitly delimited in
1131this way is sent unaffected to the output, allowing Python to be used in
1132effect as a markup language. Also supported are callbacks via hooks,
1133recording and playback via diversions, and dynamic, chainable filters. The
1134system is highly configurable via command line options and embedded
1135commands.")
1136 (license license:lgpl2.1+)))
1137
1138(define-public python2-empy
1139 (package-with-python2 python-empy))
1140
1141(define-public python2-element-tree
1142 (package
1143 (name "python2-element-tree")
1144 (version "1.2.6")
1145 (source (origin
1146 (method url-fetch)
1147 (uri (string-append
1148 "http://effbot.org/media/downloads/elementtree-"
1149 version "-20050316.tar.gz"))
1150 (sha256
1151 (base32
1152 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1153 (build-system python-build-system)
1154 (arguments
1155 `(#:python ,python-2 ; seems to be part of Python 3
1156 #:tests? #f)) ; no 'test' sub-command
1157 (synopsis "Toolkit for XML processing in Python")
1158 (description
1159 "ElementTree is a Python library supporting lightweight XML processing.")
1160 (home-page "http://effbot.org/zone/element-index.htm")
1161 (license (license:x11-style
1162 "http://docs.python.org/2/license.html"
1163 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1164
1165(define-public python2-pybugz
1166 (package
1167 (name "python2-pybugz")
1168 (version "0.6.11")
1169 (source (origin
1170 (method url-fetch)
1171 (uri (string-append
1172 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1173 version ".tar.gz"))
1174 (sha256
1175 (base32
1176 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1177 (patches (search-patches "pybugz-stty.patch"
1178 "pybugz-encode-error.patch"))))
1179 (build-system python-build-system)
1180 (arguments
1181 `(#:python ,python-2 ; SyntaxError with Python 3
1182 #:tests? #f)) ; no 'test' sub-command
1183 (propagated-inputs
1184 `(("element-tree" ,python2-element-tree)))
1185 (synopsis "Python and command-line interface to Bugzilla")
1186 (description
1187 "PyBugz is a Python library and command-line tool to query the Bugzilla
1188bug tracking system. It is meant as an aid to speed up interaction with the
1189bug tracker.")
1190 (home-page "http://www.liquidx.net/pybugz/")
1191 (license license:gpl2)))
1192
1193(define-public python2-enum
1194 (package
1195 (name "python2-enum")
1196 (version "0.4.6")
1197 (source (origin
1198 (method url-fetch)
1199 (uri (pypi-uri "enum" version))
1200 (sha256
1201 (base32
1202 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1203 (build-system python-build-system)
1204 (arguments
1205 `(#:python ,python-2))
1206 (home-page "http://pypi.python.org/pypi/enum/")
1207 (synopsis "Robust enumerated type support in Python")
1208 (description
1209 "This provides a module for robust enumerations in Python. It has
1210been superseded by the Python standard library and is provided only for
1211compatibility.")
1212 ;; Choice of either license.
1213 (license (list license:gpl3+ license:psfl))))
1214
1215(define-public python-enum34
1216 (package
1217 (name "python-enum34")
1218 (version "1.1.6")
1219 (source
1220 (origin
1221 (method url-fetch)
1222 (uri (pypi-uri "enum34" version))
1223 (sha256
1224 (base32
1225 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1226 (build-system python-build-system)
1227 (home-page "https://pypi.python.org/pypi/enum34")
1228 (synopsis "Backported Python 3.4 Enum")
1229 (description
1230 "Enum34 is the new Python stdlib enum module available in Python 3.4
1231backported for previous versions of Python from 2.4 to 3.3.")
1232 (license license:bsd-3)))
1233
1234(define-public python2-enum34
1235 (package-with-python2 python-enum34))
1236
1237(define-public python-parse-type
1238 (package
1239 (name "python-parse-type")
1240 (version "0.4.2")
1241 (source
1242 (origin
1243 (method url-fetch)
1244 (uri (pypi-uri "parse_type" version))
1245 (sha256
1246 (base32
1247 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1248 (build-system python-build-system)
1249 (propagated-inputs
1250 `(("python-six" ,python-six)
1251 ("python-parse" ,python-parse)))
1252 (native-inputs
1253 `(("python-pytest" ,python-pytest)
1254 ("python-pytest-runner" ,python-pytest-runner)))
1255 (home-page "https://github.com/jenisys/parse_type")
1256 (synopsis "Extended parse module")
1257 (description
1258 "Parse_type extends the python parse module.")
1259 (properties
1260 `((python2-variant . ,(delay python2-parse-type))))
1261 (license license:bsd-3)))
1262
1263(define-public python2-parse-type
1264 (let ((base (package-with-python2
1265 (strip-python2-variant python-parse-type))))
1266 (package (inherit base)
1267 (propagated-inputs
1268 `(("python2-enum34" ,python2-enum34)
1269 ,@(package-propagated-inputs base))))))
1270
1271(define-public python-parse
1272 (package
1273 (name "python-parse")
1274 (version "1.8.4")
1275 (source
1276 (origin
1277 (method url-fetch)
1278 (uri (pypi-uri "parse" version))
1279 (sha256
1280 (base32
1281 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
1282 (build-system python-build-system)
1283 (arguments
1284 `(#:phases
1285 (modify-phases %standard-phases
1286 (replace 'check
1287 (lambda _ (invoke "python" "test_parse.py"))))))
1288 (home-page "https://github.com/r1chardj0n3s/parse")
1289 (synopsis "Parse strings")
1290 (description
1291 "Parse strings using a specification based on the Python @code{format()}
1292syntax.")
1293 (license license:x11)))
1294
1295(define-public python-polib
1296 (package
1297 (name "python-polib")
1298 (version "1.0.8")
1299 (source (origin
1300 (method url-fetch)
1301 (uri (pypi-uri "polib" version))
1302 (sha256
1303 (base32
1304 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1305 (build-system python-build-system)
1306 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1307 (synopsis "Manipulate, create and modify gettext files")
1308 (description "Polib can manipulate any gettext format (po, pot and mo)
1309files. It can be used to create po files from scratch or to modify
1310existing ones.")
1311 (license license:expat)))
1312
1313(define-public python2-polib
1314 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1315 (package
1316 (inherit base)
1317 (arguments `(,@(package-arguments base)
1318 ;; Tests don't work with python2.
1319 #:tests? #f)))))
1320
1321(define-public scons
1322 (package
1323 (name "scons")
1324 (version "3.0.1")
1325 (source (origin
1326 (method url-fetch)
1327 (uri (string-append "mirror://sourceforge/scons/scons/" version
1328 "/scons-" version ".tar.gz"))
1329 (sha256
1330 (base32
1331 "0wzid419mlwqw9llrg8gsx4nkzhqy16m4m40r0xnh6cwscw5wir4"))))
1332 (build-system python-build-system)
1333 (arguments
1334 `(#:use-setuptools? #f ; still relies on distutils
1335 #:tests? #f)) ; no 'python setup.py test' command
1336 (home-page "http://scons.org/")
1337 (synopsis "Software construction tool written in Python")
1338 (description
1339 "SCons is a software construction tool. Think of SCons as an improved,
1340cross-platform substitute for the classic Make utility with integrated
1341functionality similar to autoconf/automake and compiler caches such as ccache.
1342In short, SCons is an easier, more reliable and faster way to build
1343software.")
1344 (license license:x11)))
1345
1346(define-public scons-python2
1347 (package
1348 (inherit (package-with-python2 scons))
1349 (name "scons-python2")))
1350
1351(define-public python-extras
1352 (package
1353 (name "python-extras")
1354 (version "1.0.0")
1355 (source
1356 (origin
1357 (method url-fetch)
1358 (uri (pypi-uri "extras" version))
1359 (sha256
1360 (base32
1361 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1362 (build-system python-build-system)
1363 (arguments
1364 ;; FIXME: Circular dependency on testtools.
1365 '(#:tests? #f))
1366 (home-page "https://github.com/testing-cabal/extras")
1367 (synopsis "Useful extensions to the Python standard library")
1368 (description
1369 "Extras is a set of extensions to the Python standard library.")
1370 (license license:expat)))
1371
1372(define-public python2-extras
1373 (package-with-python2 python-extras))
1374
1375(define-public python-mimeparse
1376 (package
1377 (name "python-mimeparse")
1378 (version "1.6.0")
1379 (source
1380 (origin
1381 (method url-fetch)
1382 (uri (string-append
1383 "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
1384 version ".tar.gz"))
1385 (sha256
1386 (base32
1387 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
1388 (build-system python-build-system)
1389 (arguments
1390 '(#:phases
1391 (modify-phases %standard-phases
1392 (replace 'check
1393 (lambda _
1394 (invoke "./mimeparse_test.py"))))))
1395 (home-page
1396 "https://github.com/dbtsai/python-mimeparse")
1397 (synopsis "Python library for parsing MIME types")
1398 (description
1399 "Mimeparse provides basic functions for parsing MIME type names and
1400matching them against a list of media-ranges.")
1401 (license license:expat)))
1402
1403(define-public python2-mimeparse
1404 (package-with-python2 python-mimeparse))
1405
1406(define-public python-miniboa
1407 (package
1408 (name "python-miniboa")
1409 (version "1.0.7")
1410 (source
1411 (origin
1412 (method url-fetch)
1413 (uri (pypi-uri "miniboa" version))
1414 (sha256
1415 (base32
1416 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
1417 (build-system python-build-system)
1418 (home-page "https://github.com/shmup/miniboa")
1419 (synopsis "Simple, single-threaded Telnet server")
1420 (description
1421 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
1422server.")
1423 (license license:asl2.0)))
1424
1425(define-public python2-miniboa
1426 (package-with-python2 python-miniboa))
1427
1428(define-public python-pafy
1429 (package
1430 (name "python-pafy")
1431 (version "0.5.3.1")
1432 (source
1433 (origin
1434 (method url-fetch)
1435 (uri (pypi-uri "pafy" version))
1436 (sha256
1437 (base32
1438 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1439 (build-system python-build-system)
1440 (arguments
1441 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1442 (propagated-inputs
1443 ;; Youtube-dl is a python package which is imported in the file
1444 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1445 `(("youtube-dl" ,youtube-dl)))
1446 (home-page "https://np1.github.io/pafy/")
1447 (synopsis "Retrieve YouTube content and metadata")
1448 (description
1449 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1450 (license license:lgpl3+)))
1451
1452(define-public python2-funcsigs
1453 (package
1454 (name "python2-funcsigs")
1455 (version "1.0.2")
1456 (source (origin
1457 (method url-fetch)
1458 (uri (pypi-uri "funcsigs" version))
1459 (sha256
1460 (base32
1461 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1462 (build-system python-build-system)
1463 (arguments
1464 `(#:python ,python-2))
1465 (native-inputs
1466 `(("python2-unittest2" ,python2-unittest2)))
1467 (home-page "http://funcsigs.readthedocs.org")
1468 (synopsis "Python function signatures from PEP362")
1469 (description
1470 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1471 (license license:asl2.0)))
1472
1473(define-public python2-funcsigs-bootstrap
1474 (package
1475 (inherit python2-funcsigs)
1476 (name "python2-funcsigs-bootstrap")
1477 (native-inputs `())
1478 (arguments
1479 `(#:tests? #f
1480 ,@(package-arguments python2-funcsigs)))))
1481
1482(define-public python-py
1483 (package
1484 (name "python-py")
1485 (version "1.5.4")
1486 (source
1487 (origin
1488 (method url-fetch)
1489 (uri (pypi-uri "py" version))
1490 (sha256
1491 (base32
1492 "1xxvwfn82457djf55f5n2c94699rfqnk43br8fif2r2q8gvrmm9z"))))
1493 (build-system python-build-system)
1494 (arguments
1495 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1496 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1497 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1498 ;; Is this module globally installed?"
1499 '(#:tests? #f))
1500 (native-inputs
1501 `(("python-setuptools-scm" ,python-setuptools-scm)))
1502 (home-page "https://github.com/pytest-dev/py")
1503 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1504 (description
1505 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1506code introspection, and logging.")
1507 (license license:expat)))
1508
1509(define-public python2-py
1510 (package-with-python2 python-py))
1511
1512;; Recent versions of python-fixtures and python-testrepository need
1513;; python-pbr for packaging, which itself needs these two packages for
1514;; testing.
1515;; To fix this circular dependency, we use a build of python-pbr, based on the
1516;; same source, just without any test dependencies and with tests disabled.
1517;; python-pbr-minmal is then used to package python-fixtures and
1518;; python-testrepository.
1519;; Strictly speaking we currently could remove the test-requirements from the
1520;; normal python-pbr package (and save this package) since test are disabled
1521;; there anyway. But this may change in future.
1522(define-public python-pbr-minimal
1523 (package
1524 (name "python-pbr-minimal")
1525 (version "3.0.1")
1526 (source
1527 (origin
1528 (method url-fetch)
1529 (uri (pypi-uri "pbr" version))
1530 (sha256
1531 (base32
1532 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
1533 (build-system python-build-system)
1534 (arguments
1535 `(#:tests? #f))
1536 (home-page "http://docs.openstack.org/developer/pbr/")
1537 (synopsis "Minimal build of python-pbr used for bootstrapping")
1538 (description
1539 "Used only for bootstrapping python2-pbr, you should not need this.")
1540 (license license:asl2.0)))
1541
1542(define-public python2-pbr-minimal
1543 (package-with-python2 python-pbr-minimal))
1544
1545(define-public python-pbr
1546 (package
1547 (inherit python-pbr-minimal)
1548 (name "python-pbr")
1549 (arguments
1550 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1551 (propagated-inputs
1552 `(("git" ,git))) ;; pbr actually uses the "git" binary.
1553 (native-inputs
1554 `(("python-fixtures" ,python-fixtures-bootstrap)
1555 ;; discover, coverage, hacking, subunit
1556 ("python-mock" ,python-mock)
1557 ("python-six" ,python-six)
1558 ("python-sphinx" ,python-sphinx)
1559 ("python-testrepository" ,python-testrepository-bootstrap)
1560 ("python-testresources" ,python-testresources-bootstrap)
1561 ("python-testscenarios" ,python-testscenarios-bootstrap)
1562 ("python-testtools" ,python-testtools-bootstrap)
1563 ("python-virtualenv" ,python-virtualenv)))
1564 (synopsis "Enhance the default behavior of Python’s setuptools")
1565 (description
1566 "Python Build Reasonableness (PBR) is a library that injects some useful
1567and sensible default behaviors into your setuptools run. It will set
1568versions, process requirements files and generate AUTHORS and ChangeLog file
1569from git information.
1570")))
1571
1572(define-public python2-pbr
1573 (package-with-python2 python-pbr))
1574
1575(define-public python-exif-read
1576 (package
1577 (name "python-exif-read")
1578 (version "2.1.2")
1579 (source (origin
1580 (method url-fetch)
1581 (uri (pypi-uri "ExifRead" version))
1582 (sha256
1583 (base32
1584 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
1585 (build-system python-build-system)
1586 (arguments `(#:tests? #f)) ; no tests
1587 (home-page "https://github.com/ianare/exif-py")
1588 (synopsis "Python library to extract EXIF data from image files")
1589 (description
1590 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1591files.")
1592 (license license:bsd-3)))
1593
1594(define-public python2-exif-read
1595 (package-with-python2 python-exif-read))
1596
1597(define-public python-pyld
1598 (package
1599 (name "python-pyld")
1600 (version "1.0.3")
1601 (source (origin
1602 (method url-fetch)
1603 (uri (pypi-uri "PyLD" version))
1604 (sha256
1605 (base32
1606 "12i2g6xdj30k7xxcibg3sc5y76snwq8l6n8fy9lyi577kgy0h2pm"))))
1607 (build-system python-build-system)
1608 (home-page "https://github.com/digitalbazaar/pyld")
1609 (synopsis "Python implementation of the JSON-LD specification")
1610 (description
1611 "PyLD is an implementation of the JSON-LD specification.")
1612 (license license:bsd-3)))
1613
1614(define-public python2-pyld
1615 (package-with-python2 python-pyld))
1616
1617(define-public python-click
1618 (package
1619 (name "python-click")
1620 (version "6.7")
1621 (source
1622 (origin
1623 (method url-fetch)
1624 (uri (pypi-uri "click" version))
1625 (sha256
1626 (base32
1627 "02qkfpykbq35id8glfgwc38yc430427yd05z1wc5cnld8zgicmgi"))))
1628 (build-system python-build-system)
1629 (arguments
1630 `(;; The tests are fragile, depending on a specific version of pytest:
1631 ;; <https://github.com/pallets/click/issues/823>
1632 #:tests? #f
1633 #:phases
1634 (modify-phases %standard-phases
1635 (add-after 'unpack 'fix-paths
1636 (lambda* (#:key inputs #:allow-other-keys)
1637 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
1638 "cross-libc" "libc"))))
1639 (substitute* "click/_unicodefun.py"
1640 (("'locale'")
1641 (string-append "'" glibc "/bin/locale'"))))
1642 #t)))))
1643 (native-inputs
1644 `(("python-pytest" ,python-pytest)))
1645 (home-page "http://click.pocoo.org")
1646 (synopsis "Command line library for Python")
1647 (description
1648 "Click is a Python package for creating command line interfaces in a
1649composable way with as little code as necessary. Its name stands for
1650\"Command Line Interface Creation Kit\". It's highly configurable but comes
1651with sensible defaults out of the box.")
1652 (license license:bsd-3)))
1653
1654(define-public python2-click
1655 (package-with-python2 python-click))
1656
1657(define-public python-wheel
1658 (package
1659 (name "python-wheel")
1660 (version "0.30.0a0")
1661 (source
1662 (origin
1663 (method url-fetch)
1664 (uri (pypi-uri "wheel" version))
1665 (sha256
1666 (base32
1667 "1nm6mn8isny0hr86rhbfrpfj867c0phf001xgsd69xfp9ady1wwq"))))
1668 (build-system python-build-system)
1669 (native-inputs
1670 `(("python-jsonschema" ,python-jsonschema)
1671 ("python-pytest-cov" ,python-pytest-cov)))
1672 (home-page "https://bitbucket.org/pypa/wheel/")
1673 (synopsis "Format for built Python packages")
1674 (description
1675 "A wheel is a ZIP-format archive with a specially formatted filename and
1676the @code{.whl} extension. It is designed to contain all the files for a PEP
1677376 compatible install in a way that is very close to the on-disk format. Many
1678packages will be properly installed with only the @code{Unpack} step and the
1679unpacked archive preserves enough information to @code{Spread} (copy data and
1680scripts to their final locations) at any later time. Wheel files can be
1681installed with a newer @code{pip} or with wheel's own command line utility.")
1682 (license license:expat)
1683 (properties `((python2-variant . ,(delay python2-wheel))))))
1684
1685(define-public python2-wheel
1686 (let ((wheel (package-with-python2
1687 (strip-python2-variant python-wheel))))
1688 (package (inherit wheel)
1689 (native-inputs `(("python2-functools32" ,python2-functools32)
1690 ,@(package-native-inputs wheel))))))
1691
1692(define-public python-vcversioner
1693 (package
1694 (name "python-vcversioner")
1695 (version "2.16.0.0")
1696 (source
1697 (origin
1698 (method url-fetch)
1699 (uri (pypi-uri "vcversioner" version))
1700 (sha256
1701 (base32
1702 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
1703 (build-system python-build-system)
1704 (synopsis "Python library for version number discovery")
1705 (description "Vcversioner is a Python library that inspects tagging
1706information in a variety of version control systems in order to discover
1707version numbers.")
1708 (home-page "https://github.com/habnabit/vcversioner")
1709 (license license:isc)))
1710
1711(define-public python2-vcversioner
1712 (package-with-python2 python-vcversioner))
1713
1714(define-public python-jsonschema
1715 (package
1716 (name "python-jsonschema")
1717 (version "2.6.0")
1718 (source (origin
1719 (method url-fetch)
1720 (uri
1721 (string-append
1722 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
1723 version ".tar.gz"))
1724 (sha256
1725 (base32
1726 "00kf3zmpp9ya4sydffpifn0j0mzm342a2vzh82p6r0vh10cg7xbg"))))
1727 (build-system python-build-system)
1728 (arguments
1729 '(#:phases
1730 (modify-phases %standard-phases
1731 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
1732 (native-inputs
1733 `(("python-nose" ,python-nose)
1734 ("python-vcversioner" ,python-vcversioner)))
1735 (home-page "https://github.com/Julian/jsonschema")
1736 (synopsis "Implementation of JSON Schema for Python")
1737 (description
1738 "Jsonschema is an implementation of JSON Schema for Python.")
1739 (license license:expat)
1740 (properties `((python2-variant . ,(delay python2-jsonschema))))))
1741
1742(define-public python2-jsonschema
1743 (let ((jsonschema (package-with-python2
1744 (strip-python2-variant python-jsonschema))))
1745 (package (inherit jsonschema)
1746 (native-inputs
1747 `(("python2-mock" ,python2-mock)
1748 ,@(package-native-inputs jsonschema)))
1749 (propagated-inputs
1750 `(("python2-functools32" ,python2-functools32))))))
1751
1752(define-public python-schema
1753 (package
1754 (name "python-schema")
1755 (version "0.6.6")
1756 (source
1757 (origin
1758 (method url-fetch)
1759 (uri (pypi-uri "schema" version))
1760 (sha256
1761 (base32
1762 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
1763 (build-system python-build-system)
1764 (native-inputs
1765 `(("python-pytest" ,python-pytest)))
1766 (home-page "https://github.com/keleshev/schema")
1767 (synopsis "Simple data validation library")
1768 (description
1769 "@code{python-schema} is a library for validating Python data
1770structures, such as those obtained from config-files, forms, external
1771services or command-line parsing, converted from JSON/YAML (or
1772something else) to Python data-types.")
1773 (license license:psfl)))
1774
1775(define-public python2-schema
1776 (package-with-python2 python-schema))
1777
1778(define-public python-schema-0.5
1779 (package (inherit python-schema)
1780 (version "0.5.0")
1781 (source
1782 (origin
1783 (method url-fetch)
1784 (uri (pypi-uri "schema" version))
1785 (sha256
1786 (base32
1787 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
1788
1789(define-public python2-schema-0.5
1790 (package-with-python2 python-schema-0.5))
1791
1792(define-public python-kitchen
1793 (package
1794 (name "python-kitchen")
1795 (version "1.2.5")
1796 (source
1797 (origin
1798 (method url-fetch)
1799 (uri (pypi-uri "kitchen" version))
1800 (sha256
1801 (base32
1802 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
1803 (build-system python-build-system)
1804 (propagated-inputs
1805 `(("python-chardet" ,python-chardet)))
1806 (home-page "https://github.com/fedora-infra/kitchen")
1807 (synopsis "Python API for snippets")
1808 (description "@code{kitchen} module provides a python API for all sorts of
1809little useful snippets of code that everybody ends up writing for their projects
1810but never seem big enough to build an independent release. Use kitchen and stop
1811cutting and pasting that code over and over.")
1812 (license (list license:lgpl2.1+
1813 ;; subprocess.py, test_subprocess.py,
1814 ;; kitchen/pycompat25/defaultdict.py:
1815 license:psfl))))
1816
1817(define-public python2-kitchen
1818 (package-with-python2 python-kitchen))
1819
1820(define-public python-unidecode
1821 (package
1822 (name "python-unidecode")
1823 (version "1.0.23")
1824 (source (origin
1825 (method url-fetch)
1826 (uri (pypi-uri "Unidecode" version))
1827 (sha256
1828 (base32
1829 "1ysjbr3nqfqj97h8zyj3v9pya413vkv7a1mzml80w37xx15kb1cb"))))
1830 (build-system python-build-system)
1831 (home-page "https://pypi.python.org/pypi/Unidecode")
1832 (synopsis "ASCII transliterations of Unicode text")
1833 (description
1834 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
1835useful when integrating with legacy code that doesn't support Unicode, or for
1836ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
1837machine identifiers from human-readable Unicode strings that should still be
1838somewhat intelligible.")
1839 (license license:gpl2+)))
1840
1841(define-public python2-unidecode
1842 (package-with-python2 python-unidecode))
1843
1844(define-public python-pyjwt
1845 (package
1846 (name "python-pyjwt")
1847 (version "1.5.3")
1848 (source
1849 (origin
1850 (method url-fetch)
1851 (uri (pypi-uri "PyJWT" version))
1852 (sha256
1853 (base32
1854 "1rxsg14i33vm2i6lz0my628108c81k43v10n4h3p0gx62xdyf2sh"))
1855 (modules '((guix build utils)))
1856 (snippet
1857 '(begin
1858 (for-each delete-file-recursively
1859 (find-files "." "\\.pyc$"))
1860 #t))))
1861 (build-system python-build-system)
1862 (native-inputs
1863 `(("python-pytest" ,python-pytest)
1864 ("python-pytest-cov" ,python-pytest-cov)
1865 ("python-pytest-runner" ,python-pytest-runner)))
1866 (home-page "https://github.com/progrium/pyjwt")
1867 (synopsis "JSON Web Token implementation in Python")
1868 (description
1869 "PyJWT is a JSON Web Token implementation written in Python.")
1870 (license license:expat)))
1871
1872(define-public python2-pyjwt
1873 (package-with-python2 python-pyjwt))
1874
1875(define-public python-pykka
1876 (package
1877 (name "python-pykka")
1878 (version "1.2.1")
1879 (source
1880 (origin
1881 (method url-fetch)
1882 (uri (pypi-uri "Pykka" version))
1883 (sha256
1884 (base32
1885 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
1886 (build-system python-build-system)
1887 (native-inputs
1888 `(("python-mock" ,python-mock)
1889 ("python-nose" ,python-nose)
1890 ("python-gevent" ,python-gevent)
1891 ("python-eventlet" ,python-eventlet)))
1892 (home-page "https://www.pykka.org/")
1893 (synopsis "Pykka is a Python implementation of the actor model")
1894 (description
1895 "Pykka is a Python implementation of the actor model.
1896The actor model introduces some simple rules to control the sharing
1897of state and cooperation between execution units, which makes it
1898easier to build concurrent applications.")
1899 (license license:asl2.0)))
1900
1901(define-public python2-pykka
1902 (package-with-python2 python-pykka))
1903
1904(define-public python-pympler
1905 (package
1906 (name "python-pympler")
1907 (home-page "https://pythonhosted.org/Pympler/")
1908 (version "0.5")
1909 (source (origin
1910 (method url-fetch)
1911 (uri (pypi-uri "Pympler" version))
1912 (sha256
1913 (base32
1914 "03qwsbilqgvnbl3a1jmpgixbr2kq6m3fvdlzyr3wdp01bwlc85kx"))))
1915 (build-system python-build-system)
1916 (arguments
1917 `(#:phases (modify-phases %standard-phases
1918 (delete 'check)
1919 (add-after 'install 'check
1920 (lambda* (#:key inputs outputs #:allow-other-keys)
1921 (add-installed-pythonpath inputs outputs)
1922 (invoke "python" "setup.py" "test"))))))
1923 (synopsis "Measure, monitor and analyze memory behavior")
1924 (description
1925 "Pympler is a development tool to measure, monitor and analyze
1926the memory behavior of Python objects in a running Python application.
1927
1928By pympling a Python application, detailed insight in the size and the
1929lifetime of Python objects can be obtained. Undesirable or unexpected
1930runtime behavior like memory bloat and other @samp{pymples} can easily
1931be identified.
1932
1933A web profiling frontend exposes process statistics, garbage
1934visualisation and class tracker statistics.")
1935 (license license:asl2.0)))
1936
1937(define-public python2-pympler
1938 (package-with-python2 python-pympler))
1939
1940(define-public python-itsdangerous
1941 (package
1942 (name "python-itsdangerous")
1943 (version "0.24")
1944 (source
1945 (origin
1946 (method url-fetch)
1947 (uri (string-append
1948 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
1949 version ".tar.gz"))
1950 (sha256
1951 (base32
1952 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
1953 (build-system python-build-system)
1954 (home-page "https://github.com/mitsuhiko/itsdangerous")
1955 (synopsis "Python library for passing data to/from untrusted environments")
1956 (description
1957 "Itsdangerous provides various helpers to pass trusted data to untrusted
1958environments and back.")
1959 (license license:bsd-3)))
1960
1961(define-public python2-itsdangerous
1962 (package-with-python2 python-itsdangerous))
1963
1964(define-public python-pyyaml
1965 (package
1966 (name "python-pyyaml")
1967 (version "3.13")
1968 (source
1969 (origin
1970 (method url-fetch)
1971 (uri (pypi-uri "PyYAML" version))
1972 (sha256
1973 (base32
1974 "1gx603g484z46cb74j9rzr6sjlh2vndxayicvlyhxdz98lhhkwry"))))
1975 (build-system python-build-system)
1976 (inputs
1977 `(("libyaml" ,libyaml)))
1978 (home-page "http://pyyaml.org/wiki/PyYAML")
1979 (synopsis "YAML parser and emitter for Python")
1980 (description
1981 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
1982complete YAML 1.1 parser, Unicode support, pickle support, capable extension
1983API, and sensible error messages. PyYAML supports standard YAML tags and
1984provides Python-specific tags that allow to represent an arbitrary Python
1985object.")
1986 (license license:expat)))
1987
1988(define-public python2-pyyaml
1989 (package-with-python2 python-pyyaml))
1990
1991(define-public python-vine
1992 (package
1993 (name "python-vine")
1994 (version "1.1.4")
1995 (source
1996 (origin
1997 (method url-fetch)
1998 (uri (pypi-uri "vine" version))
1999 (sha256
2000 (base32
2001 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
2002 (build-system python-build-system)
2003 (native-inputs
2004 `(("python-pytest" ,python-pytest)
2005 ("python-case" ,python-case)))
2006 (home-page "https://github.com/celery/vine")
2007 (synopsis "Promises for Python")
2008 (description
2009 "@code{vine} provides a special implementation of promises in that it can
2010be used both for \"promise of a value\" and lazy evaluation. The biggest
2011upside for this is that everything in a promise can also be a promise,
2012e.g. filters, callbacks and errbacks can all be promises.")
2013 (license license:bsd-3)))
2014
2015(define-public python-virtualenv
2016 (package
2017 (name "python-virtualenv")
2782bd51 2018 (version "16.1.0")
44d10b1f
RW
2019 (source
2020 (origin
2021 (method url-fetch)
2022 (uri (pypi-uri "virtualenv" version))
2023 (sha256
2024 (base32
2782bd51 2025 "0242cg3hdq3qdvx5flyrki8lpwlgwf5k45c21ks5049fv7ygm6gq"))))
44d10b1f
RW
2026 (build-system python-build-system)
2027 (arguments
2028 `(#:phases
2029 (modify-phases %standard-phases
2782bd51 2030 (add-before 'check 'disable-failing-test
44d10b1f
RW
2031 (lambda _
2032 ;; Disable failing test. See upstream bug report
2033 ;; https://github.com/pypa/virtualenv/issues/957
2034 (substitute* "tests/test_virtualenv.py"
2035 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2782bd51 2036 #t)))))
44d10b1f
RW
2037 (native-inputs
2038 `(("python-mock" ,python-mock)
2039 ("python-pytest" ,python-pytest)))
2040 (home-page "https://virtualenv.pypa.io/")
2041 (synopsis "Virtual Python environment builder")
2042 (description
2043 "Virtualenv is a tool to create isolated Python environments.")
2044 (license license:expat)))
2045
2046(define-public python2-virtualenv
2047 (package-with-python2 python-virtualenv))
2048
2049(define-public python-markupsafe
2050 (package
2051 (name "python-markupsafe")
2052 (version "1.0")
2053 (source
2054 (origin
2055 (method url-fetch)
2056 (uri (string-append
2057 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
2058 version ".tar.gz"))
2059 (sha256
2060 (base32
2061 "0rdn1s8x9ni7ss8rfiacj7x1085lx8mh2zdwqslnw8xc3l4nkgm6"))))
2062 (build-system python-build-system)
2063 (home-page "https://github.com/mitsuhiko/markupsafe")
2064 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2065 (description
2066 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2067for Python.")
2068 (license license:bsd-3)))
2069
2070(define-public python2-markupsafe
2071 (package-with-python2 python-markupsafe))
2072
2073(define-public python-jinja2
2074 (package
2075 (name "python-jinja2")
2076 (version "2.10")
2077 (source
2078 (origin
2079 (method url-fetch)
2080 (uri (pypi-uri "Jinja2" version))
2081 (sha256
2082 (base32
2083 "190l36hfw3wb2n3n68yacjabxyb1pnxwn7vjx96cmjj002xy2jzq"))))
2084 (build-system python-build-system)
2085 (propagated-inputs
2086 `(("python-markupsafe" ,python-markupsafe)))
2087 (home-page "http://jinja.pocoo.org/")
2088 (synopsis "Python template engine")
2089 (description
2090 "Jinja2 is a small but fast and easy to use stand-alone template engine
2091written in pure Python.")
2092 (license license:bsd-3)))
2093
2094(define-public python2-jinja2
2095 (package-with-python2 python-jinja2))
2096
2097(define-public python-pystache
2098 (package
2099 (name "python-pystache")
2100 (version "0.5.4")
2101 (source (origin
2102 (method url-fetch)
2103 (uri (pypi-uri "pystache" version))
2104 (sha256
2105 (base32
2106 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2107 (build-system python-build-system)
2108 (arguments
2109 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2110 (home-page "http://defunkt.io/pystache/")
2111 (synopsis "Python logic-less template engine")
2112 (description
2113 "Pystache is a Python implementation of the framework agnostic,
2114logic-free templating system Mustache.")
2115 (license license:expat)
2116 (properties `((python2-variant . ,(delay python2-pystache))))))
2117
2118(define-public python2-pystache
2119 (package (inherit (package-with-python2
2120 (strip-python2-variant python-pystache)))
2121 (arguments
2122 `(#:python ,python-2
2123 #:phases
2124 (modify-phases %standard-phases
2125 (replace 'check
2126 (lambda _
2127 (zero? (system* "python" "test_pystache.py")))))))))
2128
2129(define-public python-joblib
2130 (package
2131 (name "python-joblib")
2132 (version "0.13.0")
2133 (source (origin
2134 (method url-fetch)
2135 (uri (pypi-uri "joblib" version))
2136 (sha256
2137 (base32
2138 "0612nazad8dxmn3xghfrmjax6456l4xy6hn9cngs7vydi14ds7v5"))))
2139 (build-system python-build-system)
2140 (arguments
2141 `(#:phases
2142 (modify-phases %standard-phases
2143 (replace 'check
2144 (lambda _ (invoke "pytest" "-v" "joblib"))))))
2145 (native-inputs
2146 `(("python-pytest" ,python-pytest)))
2147 (home-page "https://joblib.readthedocs.io/")
2148 (synopsis "Using Python functions as pipeline jobs")
2149 (description
2150 "Joblib is a set of tools to provide lightweight pipelining in Python.
2151In particular, joblib offers: transparent disk-caching of the output values
2152and lazy re-evaluation (memoize pattern), easy simple parallel computing
2153logging and tracing of the execution.")
2154 (license license:bsd-3)))
2155
2156(define-public python2-joblib
2157 (package-with-python2 python-joblib))
2158
2159(define-public python-docutils
2160 (package
2161 (name "python-docutils")
2162 (version "0.14")
2163 (source
2164 (origin
2165 (method url-fetch)
2166 (uri (pypi-uri "docutils" version))
2167 (sha256
2168 (base32
2169 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
2170 (build-system python-build-system)
2171 (arguments
2172 '(#:tests? #f)) ; no setup.py test command
2173 (home-page "http://docutils.sourceforge.net/")
2174 (synopsis "Python Documentation Utilities")
2175 (description
2176 "Docutils is a modular system for processing documentation into useful
2177formats, such as HTML, XML, and LaTeX. For input Docutils supports
2178reStructuredText.")
2179 ;; Most of the source code is public domain, but some source files are
2180 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2181 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2182
2183(define-public python2-docutils
2184 (package-with-python2 python-docutils))
2185
2186(define-public python-pygments
2187 (package
2188 (name "python-pygments")
2189 (version "2.2.0")
2190 (source
2191 (origin
2192 (method url-fetch)
2193 (uri (pypi-uri "Pygments" version))
2194 (sha256
2195 (base32
2196 "1k78qdvir1yb1c634nkv6rbga8wv4289xarghmsbbvzhvr311bnv"))))
2197 (build-system python-build-system)
2198 (arguments
2199 ;; FIXME: Tests require sphinx, which depends on this.
2200 '(#:tests? #f))
2201 (home-page "http://pygments.org/")
2202 (synopsis "Syntax highlighting")
2203 (description
2204 "Pygments is a syntax highlighting package written in Python.")
2205 (license license:bsd-2)))
2206
2207(define-public python2-pygments
2208 (package-with-python2 python-pygments))
2209
2210(define-public python-sphinxcontrib-websupport
2211 (package
2212 (name "python-sphinxcontrib-websupport")
2213 (version "1.1.0")
2214 (source (origin
2215 (method url-fetch)
2216 (uri (pypi-uri "sphinxcontrib-websupport" version))
2217 (sha256
2218 (base32
2219 "1ff3ix76xi1y6m99qxhaq5161ix9swwzydilvdya07mgbcvpzr4x"))))
2220 (build-system python-build-system)
2221 (arguments
2222 ;; FIXME: Tests depend on Sphinx, which depends on this.
2223 `(#:tests? #f))
2224 (home-page "http://sphinx-doc.org/")
2225 (synopsis "Sphinx API for web applications")
2226 (description "This package provides a Python API to easily integrate
2227Sphinx documentation into your web application. It provides tools to
2228integrate Sphinx documents in web templates and to handle searches.")
2229 (license license:bsd-3)))
2230
2231(define-public python2-sphinxcontrib-websupport
2232 (package-with-python2 python-sphinxcontrib-websupport))
2233
2234(define-public python-sphinx
2235 (package
2236 (name "python-sphinx")
2237 (version "1.7.7")
2238 (source
2239 (origin
2240 (method url-fetch)
2241 (uri (pypi-uri "Sphinx" version))
2242 (sha256
2243 (base32
2244 "0pkkbfj7cl157q550gcs45am5y78ps0h7q6455d64s1zmw01jlvi"))))
2245 (build-system python-build-system)
2246 (arguments
2247 `(#:phases
2248 (modify-phases %standard-phases
2249 (replace 'check
2250 (lambda _
2251 ;; Requires Internet access.
2252 (delete-file "tests/test_build_linkcheck.py")
2253 (substitute* "tests/test_build_latex.py"
2254 (("@pytest.mark.sphinx\\('latex', testroot='images'\\)")
2255 "@pytest.mark.skip()"))
2256 (when (which "python")
2257 ;; XXX: These tests are broken when using Python2:
2258 ;; <https://github.com/sphinx-doc/sphinx/issues/4710>.
2259 (delete-file "tests/test_api_translator.py")
2260 (delete-file "tests/test_setup_command.py"))
2261 (invoke "make" "test"))))))
2262 (propagated-inputs
2263 `(("python-imagesize" ,python-imagesize)
2264 ("python-sphinx-alabaster-theme"
2265 ,python-sphinx-alabaster-theme)
2266 ("python-babel" ,python-babel)
2267 ("python-snowballstemmer" ,python-snowballstemmer)
2268 ("python-docutils" ,python-docutils)
2269 ("python-jinja2" ,python-jinja2)
2270 ("python-packaging" ,python-packaging)
2271 ("python-pygments" ,python-pygments)
2272 ("python-requests" ,python-requests)
2273 ("python-six" ,python-six)
2274 ("python-sphinxcontrib-websupport" ,python-sphinxcontrib-websupport)))
2275 (native-inputs
2276 `(("graphviz" ,graphviz)
2277 ("imagemagick" ,imagemagick) ;for "convert"
2278 ("python-html5lib" ,python-html5lib)
2279 ("python-mock" ,python-mock)
2280 ("python-nose" ,python-nose)
2281 ("python-pytest" ,python-pytest)))
2282 (home-page "http://sphinx-doc.org/")
2283 (synopsis "Python documentation generator")
2284 (description "Sphinx is a tool that makes it easy to create documentation
2285for Python projects or other documents consisting of multiple reStructuredText
2286sources.")
2287 (license license:bsd-3)
2288 (properties `((python2-variant . ,(delay python2-sphinx))))))
2289
2290(define-public python2-sphinx
2291 (let ((base (package-with-python2 (strip-python2-variant python-sphinx))))
2292 (package
2293 (inherit base)
2294 (native-inputs `(("python2-mock" ,python2-mock)
2295 ("python2-enum34" ,python2-enum34)
2296 ,@(package-native-inputs base)))
2297 (propagated-inputs `(("python2-pytz" ,python2-pytz)
2298 ("python2-typing" ,python2-typing)
2299 ,@(package-propagated-inputs base))))))
2300
2301(define-public python-sphinx-gallery
2302 (package
2303 (name "python-sphinx-gallery")
2304 (version "0.1.13")
2305 (source (origin
2306 (method url-fetch)
2307 (uri (string-append "https://github.com/sphinx-gallery/sphinx-gallery"
2308 "/archive/v" version ".tar.gz"))
2309 (file-name (string-append name "-" version ".tar.gz"))
2310 (sha256
2311 (base32
2312 "03fs99mcb1r7qp0xixqv07vcz98sk21yq19ffdysi0infdcpzfkd"))))
2313 (build-system python-build-system)
2314 (arguments
2315 ;; FIXME: Tests attempt to download <https://docs.python.org/3/objects.inv>,
2316 ;; <https://docs.scipy.org/doc/numpy/objects.inv>, and
2317 ;; <https://matplotlib.org/objects.inv>.
2318 `(#:tests? #f))
2319 (native-inputs
2320 `(("python-pytest-runner" ,python-pytest-runner)))
2321 (home-page "https://sphinx-gallery.github.io/")
2322 (synopsis "Generate an examples gallery automatically")
2323 (description
2324 "@code{sphinx_gallery} is a Sphinx extension that builds an HTML version
2325from any set of Python scripts and puts it into an examples gallery.")
2326 (license license:bsd-3)))
2327
2328(define-public python2-sphinx-gallery
2329 (package-with-python2 python-sphinx-gallery))
2330
2331(define-public python-sphinx-rtd-theme
2332 (package
2333 (name "python-sphinx-rtd-theme")
2334 (version "0.2.4")
2335 (source
2336 (origin
2337 (method url-fetch)
2338 (uri (pypi-uri "sphinx_rtd_theme" version))
2339 (sha256
2340 (base32
2341 "05rlhjzdyapr2w74jjs7mrm8hi69qskcr5vya9f9drpsys7lpxrd"))))
2342 (build-system python-build-system)
2343 (arguments '(#:tests? #f)) ; No tests.
2344 (propagated-inputs
2345 `(("python-sphinx" ,python-sphinx)))
2346 (home-page "https://github.com/snide/sphinx_rtd_theme/")
2347 (synopsis "ReadTheDocs.org theme for Sphinx")
2348 (description "A theme for Sphinx used by ReadTheDocs.org.")
2349 (license license:expat)))
2350
2351(define-public python2-sphinx-rtd-theme
2352 (package-with-python2 python-sphinx-rtd-theme))
2353
2354(define-public python-guzzle-sphinx-theme
2355 (package
2356 (name "python-guzzle-sphinx-theme")
2357 (version "0.7.11")
2358 (source
2359 (origin
2360 (method url-fetch)
2361 (uri (pypi-uri "guzzle_sphinx_theme" version))
2362 (sha256
2363 (base32
2364 "1rnkzrrsbnifn3vsb4pfaia3nlvgvw6ndpxp7lzjrh23qcwid34v"))))
2365 (build-system python-build-system)
2366 (propagated-inputs
2367 `(("python-sphinx" ,python-sphinx)))
2368 (home-page "https://github.com/guzzle/guzzle_sphinx_theme")
2369 (synopsis "Sphinx theme used by Guzzle")
2370 (description "This package provides guzzle_sphinx_theme, a theme for the
2371Sphinx documentation system, used by @uref{http://docs.guzzlephp.org, Guzzle}
2372and several other projects.")
2373 (license license:expat)))
2374
2375(define-public python2-guzzle-sphinx-theme
2376 (package-with-python2 python-guzzle-sphinx-theme))
2377
2378(define-public python-rst.linker
2379 (package
2380 (name "python-rst.linker")
2381 (version "1.10")
2382 (source
2383 (origin
2384 (method url-fetch)
2385 (uri (pypi-uri "rst.linker" version))
2386 (sha256
2387 (base32
2388 "0iqaacp7pj1s8avs4kc0qg0r7dscywaq37y6l9j14glqdikk0wdj"))))
2389 (build-system python-build-system)
2390 (propagated-inputs
2391 `(("python-dateutil" ,python-dateutil)
2392 ("python-six" ,python-six)))
2393 (native-inputs
2394 `(("python-setuptools-scm" ,python-setuptools-scm)))
2395 ;; Test would require path.py, which would introduce a cyclic dependence.
2396 (arguments `(#:tests? #f))
2397 ;; Note: As of version 1.7 the documentation is not worth building.
2398 (home-page "https://github.com/jaraco/rst.linker")
2399 (synopsis "Sphinx plugin to add links and timestamps")
2400 (description "rst.linker allows to automatically replace text by a
2401reStructuredText external reference or timestamps. It's primary purpose is to
2402augment the changelog, but it can be used for other documents, too.")
2403 (license license:expat)))
2404
2405(define-public python2-rst.linker
2406 (package-with-python2 python-rst.linker))
2407
2408(define-public python-feedgenerator
2409 (package
2410 (name "python-feedgenerator")
2411 (version "1.9")
2412 (source
2413 (origin
2414 (method url-fetch)
2415 (uri (pypi-uri "feedgenerator" version))
2416 (sha256
2417 (base32
2418 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
2419 (modules '((guix build utils)))
2420 (snippet
2421 '(begin
2422 ;; Remove pre-compiled .pyc files from source.
2423 (for-each delete-file-recursively
2424 (find-files "." "__pycache__" #:directories? #t))
2425 (for-each delete-file (find-files "." "\\.pyc$"))
2426 #t))))
2427 (build-system python-build-system)
2428 (propagated-inputs
2429 `(("python-pytz" ,python-pytz)
2430 ("python-six" ,python-six)))
2431 (home-page "https://github.com/getpelican/feedgenerator")
2432 (synopsis
2433 "Standalone version of Django's Atom/RSS feed generator")
2434 (description
2435 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2436which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
2437 (license license:bsd-3)))
2438
2439(define-public python2-feedgenerator
2440 (package-with-python2 python-feedgenerator))
2441
2442(define-public python-toml
2443 (package
2444 (name "python-toml")
2445 (version "0.9.4")
2446 (source
2447 (origin
2448 (method url-fetch)
2449 (uri (pypi-uri "toml" version))
2450 (sha256
2451 (base32
2452 "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf"))))
2453 (build-system python-build-system)
2454 (arguments
2455 `(#:tests? #f)) ;no tests suite in release
2456 (home-page "https://github.com/uiri/toml")
2457 (synopsis "Library for TOML")
2458 (description
2459 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
2460Language (TOML) configuration files.")
2461 (license license:expat)))
2462
2463(define-public python-black
2464 (package
2465 (name "python-black")
2466 (version "18.6b4")
2467 (source
2468 (origin
2469 (method url-fetch)
2470 (uri (pypi-uri "black" version))
2471 (sha256
2472 (base32
2473 "0i4sfqgz6w15vd50kbhi7g7rifgqlf8yfr8y78rypd56q64qn592"))))
2474 (build-system python-build-system)
2475 (arguments
2476 `(#:phases
2477 (modify-phases %standard-phases
2478 (add-after 'patch-source-shebangs 'patch-extra-shebangs
2479 (lambda _
2480 (let ((python3 (which "python3")))
2481 (substitute* '("tests/data/fmtonoff.py"
2482 "tests/data/string_prefixes.py"
2483 "tests/data/function.py")
2484 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
2485 (string-append "#!" python3 (if (string? minor-version)
2486 minor-version
2487 ""))))))))))
2488 (propagated-inputs
2489 `(("python-click" ,python-click)
2490 ("python-attrs" ,python-attrs)
2491 ("python-appdirs" ,python-appdirs)
2492 ("python-toml" ,python-toml)))
2493 (home-page "https://github.com/ambv/black")
2494 (synopsis "The uncompromising code formatter")
2495 (description "Black is the uncompromising Python code formatter.")
2496 (license license:expat)))
2497
2498(define-public python-blinker
2499 (package
2500 (name "python-blinker")
2501 (version "1.4")
2502 (source
2503 (origin
2504 (method url-fetch)
2505 (uri (pypi-uri "blinker" version))
2506 (sha256
2507 (base32
2508 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
2509 (build-system python-build-system)
2510 (home-page "http://pythonhosted.org/blinker/")
2511 (synopsis "Fast, simple object-to-object and broadcast signaling")
2512 (description
2513 "Blinker provides a fast dispatching system that allows any number of
2514interested parties to subscribe to events, or \"signals\".")
2515 (license license:expat)))
2516
2517(define-public python2-blinker
2518 (package-with-python2 python-blinker))
2519
2520(define-public pelican
2521 (package
2522 (name "pelican")
2523 (version "3.7.1")
2524 (source
2525 (origin
2526 (method url-fetch)
2527 (uri (pypi-uri "pelican" version))
2528 (sha256
2529 (base32
2530 "12spygavv9b6xpb5pgp7f0p3z0mms60nx6zrpx1yfkj68zz4flra"))))
2531 (build-system python-build-system)
2532 (propagated-inputs
2533 `(("python-feedgenerator" ,python-feedgenerator)
2534 ("python-jinja2" ,python-jinja2)
2535 ("python-pygments" ,python-pygments)
2536 ("python-docutils" ,python-docutils)
2537 ("python-pytz" ,python-pytz)
2538 ("python-blinker" ,python-blinker)
2539 ("python-unidecode" ,python-unidecode)
2540 ("python-six" ,python-six)
2541 ("python-dateutil" ,python-dateutil)
2542 ("python-markdown" ,python-markdown)))
2543 (home-page "https://getpelican.com/")
2544 (arguments
2545 `(;; XXX Requires a lot more packages to do unit tests :P
2546 #:tests? #f
2547 #:phases (modify-phases %standard-phases
2548 (add-before
2549 'install 'adjust-requires
2550 ;; Since feedgenerator is installed from git, it doesn't
2551 ;; conform to the version requirements.
2552 ;;
2553 ;; We *do have* "feedgenerator >= 1.6", but strip off the
2554 ;; version requirement so setuptools doesn't get confused.
2555 (lambda _
2556 (substitute* "setup.py"
2557 (("['\"]feedgenerator.*?['\"]")
2558 "'feedgenerator'")))))))
2559 (synopsis "Python-based static site publishing system")
2560 (description
2561 "Pelican is a tool to generate a static blog from reStructuredText,
2562Markdown input files, and more. Pelican uses Jinja2 for templating
2563and is very extensible.")
2564 (license license:agpl3+)))
2565
2566(define-public python-scikit-image
2567 (package
2568 (name "python-scikit-image")
2569 (version "0.14.1")
2570 (source
2571 (origin
2572 (method url-fetch)
2573 (uri (pypi-uri "scikit-image" version))
2574 (sha256
2575 (base32 "0l1c3rl4s1jyv80i5hns4pgih09zrxfj7lygdc51w8sgyysb7ac6"))))
2576 (build-system python-build-system)
2577 (arguments
2578 ;; TODO: Some tests require running X11 server. Disable them?
2579 '(#:tests? #f))
2580 ;; See DEPENDS.txt for the list of build and run time requiremnts
2581 (propagated-inputs
2582 `(("python-cloudpickle" ,python-cloudpickle)
2583 ("python-dask" ,python-dask)
2584 ("python-matplotlib" ,python-matplotlib)
2585 ("python-networkx" ,python-networkx)
2586 ("python-numpy" ,python-numpy)
2587 ("python-pillow" ,python-pillow)
2588 ("python-pywavelets" ,python-pywavelets)
2589 ("python-scipy" ,python-scipy)
2590 ("python-six" ,python-six)))
2591 (native-inputs
2592 `(("python-cython" ,python-cython)))
2593 (home-page "http://scikit-image.org/")
2594 (synopsis "Image processing in Python")
2595 (description
2596 "Scikit-image is a collection of algorithms for image processing.")
2597 (license license:bsd-3)))
2598
2599(define-public python2-scikit-image
2600 (package-with-python2 python-scikit-image))
2601
2602(define-public python-cython
2603 (package
2604 (name "python-cython")
2605 (version "0.28.4")
2606 (source
2607 (origin
2608 (method url-fetch)
2609 (uri (pypi-uri "Cython" version))
2610 (sha256
2611 (base32
2612 "0imw9s2rbrh32clbl10csnwmig9p3nzkrd2baxxxfmnrsc42pb3n"))))
2613 (build-system python-build-system)
2614 ;; we need the full python package and not just the python-wrapper
2615 ;; because we need libpython3.3m.so
2616 (inputs
2617 `(("python" ,python)))
2618 (arguments
2619 `(#:phases
2620 (modify-phases %standard-phases
2621 (add-before 'check 'set-HOME
2622 ;; some tests require access to "$HOME/.cython"
2623 (lambda _ (setenv "HOME" "/tmp") #t))
2624
2625 ;; FIXME: These tests started failing on armhf after the 0.28 update
2626 ;; (commit c69d11c5930), both with an error such as this:
2627 ;; compiling (cpp) and running dictcomp ...
2628 ;; === C/C++ compiler error output: ===
2629 ;; ‘
2630 ;; dictcomp.cpp:5221: confused by earlier errors, bailing out
2631 ;; See <https://hydra.gnu.org/build/2948724> for logs.
2632 ,@(if (target-arm32?)
2633 `((add-before 'check 'disable-failing-tests
2634 (lambda _
2635 (let ((disabled-tests (open-file "tests/bugs.txt" "a")))
2636 (for-each (lambda (test)
2637 (format disabled-tests "~a\n" test))
2638 '("memslice" "dictcomp"))
2639 (close-port disabled-tests)))))
2640 '())
2641
2642 (replace 'check
2643 (lambda _
2644 ;; The "with_outer_raising" test fails with Python 3.7. See
2645 ;; https://github.com/cython/cython/issues/2454
2646 (delete-file "tests/run/generators_py.py")
2647 (invoke "python" "runtests.py" "-vv"))))))
2648 (home-page "http://cython.org/")
2649 (synopsis "C extensions for Python")
2650 (description "Cython is an optimising static compiler for both the Python
2651programming language and the extended Cython programming language. It makes
2652writing C extensions for Python as easy as Python itself.")
2653 (license license:asl2.0)
2654 (properties `((python2-variant . ,(delay python2-cython))))))
2655
2656(define-public python2-cython
2657 (package (inherit (package-with-python2
2658 (strip-python2-variant python-cython)))
2659 (name "python2-cython")
2660 (inputs
2661 `(("python-2" ,python-2))))) ; this is not automatically changed
2662
2663;; The RPython toolchain currently does not support Python 3.
2664(define-public python2-rpython
2665 (package
2666 (name "python2-rpython")
2667 (version "0.2.1")
2668 (source
2669 (origin
2670 (method url-fetch)
2671 (uri (pypi-uri "rpython" version))
2672 (sha256
2673 (base32
2674 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
2675 (build-system python-build-system)
2676 (arguments `(#:python ,python-2))
2677 (native-inputs
2678 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
2679 (home-page "https://rpython.readthedocs.org")
2680 (synopsis "Framework for implementing interpreters and virtual machines")
2681 (description "RPython is a translation and support framework for
2682producing implementations of dynamic languages, emphasizing a clean separation
2683between language specification and implementation aspects.")
2684 (license license:expat)))
2685
2686;; NOTE: when upgrading numpy please make sure that python-pandas and
2687;; python-scipy still build, as these three packages are often used together.
2688(define-public python-numpy
2689 (package
2690 (name "python-numpy")
2691 (version "1.15.4")
2692 (source
2693 (origin
2694 (method url-fetch)
2695 (uri (string-append
2696 "https://github.com/numpy/numpy/releases/download/v"
2697 version "/numpy-" version ".tar.gz"))
2698 (sha256
2699 (base32
2700 "102vcl2qq4pjbm7a3d67vkkvn4466ngia1d8wi5avqwqh8j0jvkn"))))
2701 (build-system python-build-system)
2702 (inputs
2703 `(("openblas" ,openblas)
2704 ("lapack" ,lapack)))
2705 (native-inputs
2706 `(("python-cython" ,python-cython)
2707 ("python-pytest" ,python-pytest)
2708 ("gfortran" ,gfortran)))
2709 (arguments
2710 `(#:phases
2711 (modify-phases %standard-phases
2712 (add-before 'build 'configure-blas-lapack
2713 (lambda* (#:key inputs #:allow-other-keys)
2714 (call-with-output-file "site.cfg"
2715 (lambda (port)
2716 (format port
2717 "[openblas]
2718libraries = openblas
2719library_dirs = ~a/lib
2720include_dirs = ~a/include
2721
2722# backslash-n to make emacs happy
2723\n[lapack]
2724lapack_libs = lapack
2725library_dirs = ~a/lib
2726include_dirs = ~a/include
2727"
2728 (assoc-ref inputs "openblas")
2729 (assoc-ref inputs "openblas")
2730 (assoc-ref inputs "lapack")
2731 (assoc-ref inputs "lapack"))))
2732 #t))
2733 (add-before 'build 'fix-executable-paths
2734 (lambda* (#:key inputs #:allow-other-keys)
2735 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
2736 ;; instead of /bin/sh.
2737 (substitute* "numpy/distutils/exec_command.py"
2738 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
2739 (string-append match-start (assoc-ref inputs "bash") match-end)))
2740 ;; Use "gcc" executable, not "cc".
2741 (substitute* "numpy/distutils/system_info.py"
2742 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
2743 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
2744 #t))
2745 ;; Tests can only be run after the library has been installed and not
2746 ;; within the source directory.
2747 (delete 'check)
2748 (add-after 'install 'check
2749 (lambda* (#:key outputs inputs #:allow-other-keys)
2750 ;; Make installed package available for running the tests
2751 (add-installed-pythonpath inputs outputs)
2752 ;; Make sure "f2py" etc is found.
2753 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
2754 ":" (getenv "PATH")))
2755 (with-directory-excursion "/tmp"
2756 (invoke "python" "-c"
2757 "import numpy; numpy.test(verbose=2)")))))))
2758 (home-page "http://www.numpy.org/")
2759 (synopsis "Fundamental package for scientific computing with Python")
2760 (description "NumPy is the fundamental package for scientific computing
2761with Python. It contains among other things: a powerful N-dimensional array
2762object, sophisticated (broadcasting) functions, tools for integrating C/C++
2763and Fortran code, useful linear algebra, Fourier transform, and random number
2764capabilities.")
2765 (license license:bsd-3)))
2766
2767(define-public python2-numpy
2768 (package-with-python2 python-numpy))
2769
2770;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
2771;; interest only for legacy code going back to NumPy's predecessor
2772;; Numeric.
2773(define-public python2-numpy-1.8
2774 (package (inherit python2-numpy)
2775 (version "1.8.2")
2776 (source
2777 (origin
2778 (method url-fetch)
2779 (uri (string-append
2780 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
2781 (file-name (string-append "python2-numpy-" version ".tar.gz"))
2782 (sha256
2783 (base32
2784 "0sc20gz1b17xnyrkp5frca3ql5qfalpv916hfg2kqxpwr6jg0f1g"))))
2785 (arguments
2786 (substitute-keyword-arguments (package-arguments python2-numpy)
2787 ((#:phases phases)
2788 `(modify-phases ,phases
2789 (replace 'configure-blas-lapack
2790 (lambda* (#:key inputs #:allow-other-keys)
2791 (call-with-output-file "site.cfg"
2792 (lambda (port)
2793 (format port
2794 "[openblas]
2795libraries = openblas,lapack
2796library_dirs = ~a/lib:~a/lib
2797include_dirs = ~a/include:~a/include
2798"
2799 (assoc-ref inputs "openblas")
2800 (assoc-ref inputs "lapack")
2801 (assoc-ref inputs "openblas")
2802 (assoc-ref inputs "lapack"))))
2803 #t))))))
2804 (native-inputs
2805 `(("python2-nose" ,python2-nose)))
2806 (description "NumPy is the fundamental package for scientific computing
2807with Python. It contains among other things: a powerful N-dimensional array
2808object, sophisticated (broadcasting) functions, tools for integrating C/C++
2809and Fortran code, useful linear algebra, Fourier transform, and random number
2810capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
2811that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
2812Numeric.")
2813 (license license:bsd-3)))
2814
2815(define-public python-munch
2816 (package
2817 (name "python-munch")
2818 (version "2.0.4")
2819 (source
2820 (origin
2821 (method url-fetch)
2822 (uri (pypi-uri "munch" version))
2823 (sha256
2824 (base32
2825 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
2826 (build-system python-build-system)
2827 (home-page "https://github.com/Infinidat/munch")
2828 (synopsis "Dot-accessible dictionary")
2829 (description "Munch is a dot-accessible dictionary similar to JavaScript
2830objects.")
2831 (license license:expat)))
2832
2833(define-public python2-munch
2834 (package-with-python2 python-munch))
2835
2836(define-public python-colormath
2837 (package
2838 (name "python-colormath")
2839 (version "3.0.0")
2840 (source
2841 (origin
2842 (method url-fetch)
2843 (uri (pypi-uri "colormath" version))
2844 (sha256
2845 (base32
2846 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
2847 (build-system python-build-system)
2848 (propagated-inputs
2849 `(("python-networkx" ,python-networkx)
2850 ("python-numpy" ,python-numpy)))
2851 (home-page "https://github.com/gtaylor/python-colormath")
2852 (synopsis "Color math and conversion library")
2853 (description
2854 "This is a Python library for color math and conversions.")
2855 (license license:bsd-3)))
2856
2857(define-public python2-colormath
2858 (package-with-python2 python-colormath))
2859
2860(define-public python-spectra
2861 (package
2862 (name "python-spectra")
2863 (version "0.0.11")
2864 (source
2865 (origin
2866 (method url-fetch)
2867 (uri (pypi-uri "spectra" version))
2868 (sha256
2869 (base32
2870 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
2871 (build-system python-build-system)
2872 (arguments
2873 `(#:phases
2874 (modify-phases %standard-phases
2875 (replace 'check
2876 (lambda _
2877 (zero? (system* "nosetests" "-v")))))))
2878 (propagated-inputs
2879 `(("python-colormath" ,python-colormath)))
2880 (native-inputs
2881 `(("python-nose" ,python-nose)))
2882 (home-page "https://github.com/jsvine/spectra")
2883 (synopsis "Color scales and color conversion")
2884 (description
2885 "This package provides a Python library intended to make color math,
2886color scales, and color space conversion easy. It has support for:
2887
2888@enumerate
2889@item Color scales
2890@item Color ranges
2891@item Color blending
2892@item Brightening/darkening colors
2893@item Saturating/desaturating colors
2894@item Conversion to/from multiple color spaces.
2895@end enumerate\n")
2896 (license license:expat)))
2897
2898(define-public python2-spectra
2899 (package-with-python2 python-spectra))
2900
2901(define-public python-numpy-documentation
2902 (package
2903 (name "python-numpy-documentation")
2904 (version (package-version python-numpy))
2905 (source (package-source python-numpy))
2906 (build-system python-build-system)
2907 (native-inputs
2908 `(("python-matplotlib" ,python-matplotlib)
2909 ("python-numpy" ,python-numpy)
2910 ("pkg-config" ,pkg-config)
2911 ("python-sphinx" ,python-sphinx)
2912 ("python-numpydoc" ,python-numpydoc)
2913 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
2914 texlive-fonts-cm-super
2915 texlive-fonts-ec
2916 texlive-generic-ifxetex
2917 texlive-generic-pdftex
2918 texlive-latex-amsfonts
2919 texlive-latex-capt-of
2920 texlive-latex-cmap
2921 texlive-latex-environ
2922 texlive-latex-eqparbox
2923 texlive-latex-etoolbox
2924 texlive-latex-expdlist
2925 texlive-latex-fancyhdr
2926 texlive-latex-fancyvrb
2927 texlive-latex-fncychap
2928 texlive-latex-float
2929 texlive-latex-framed
2930 texlive-latex-geometry
2931 texlive-latex-graphics
2932 texlive-latex-hyperref
2933 texlive-latex-mdwtools
2934 texlive-latex-multirow
2935 texlive-latex-needspace
2936 texlive-latex-oberdiek
2937 texlive-latex-parskip
2938 texlive-latex-preview
2939 texlive-latex-tabulary
2940 texlive-latex-threeparttable
2941 texlive-latex-titlesec
2942 texlive-latex-trimspaces
2943 texlive-latex-ucs
2944 texlive-latex-upquote
2945 texlive-latex-url
2946 texlive-latex-varwidth
2947 texlive-latex-wrapfig)))
2948 ("texinfo" ,texinfo)
2949 ("perl" ,perl)
2950 ("scipy-sphinx-theme"
2951 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
2952 (method git-fetch)
2953 (uri (git-reference
2954 (url "https://github.com/scipy/scipy-sphinx-theme.git")
2955 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
2956 (sha256
2957 (base32
2958 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
2959 ,@(package-native-inputs python-numpy)))
2960 (arguments
2961 `(#:tests? #f ; we're only generating the documentation
2962 #:phases
2963 (modify-phases %standard-phases
2964 (delete 'build)
2965 (replace 'install
2966 (lambda* (#:key inputs outputs #:allow-other-keys)
2967 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
2968 (doc (string-append
2969 data "/doc/" ,name "-"
2970 ,(package-version python-numpy)))
2971 (info-reader (string-append data "/info"))
2972 (html (string-append doc "/html"))
2973 (scipy-sphinx-theme "scipy-sphinx-theme")
2974 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
2975 (pyver ,(string-append "PYVER=")))
2976
2977 ;; FIXME: this is needed to for texlive-union to generate
2978 ;; fonts, which are not found.
2979 (setenv "HOME" "/tmp")
2980
2981 (with-directory-excursion "doc"
2982 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
2983 (mkdir-p html)
2984 (system* "make" "html" pyver)
2985 (system* "make" "latex" "PAPER=a4" pyver)
2986 (system* "make" "-C" "build/latex"
2987 "all-pdf" "PAPER=a4" pyver)
2988 ;; FIXME: Generation of the info file fails.
2989 ;; (system* "make" "info" pyver)
2990 ;; (mkdir-p info)
2991 ;; (copy-file "build/texinfo/numpy.info"
2992 ;; (string-append info "/numpy.info"))
2993 (for-each (lambda (file)
2994 (copy-file (string-append "build/latex" file)
2995 (string-append doc file)))
2996 '("/numpy-ref.pdf" "/numpy-user.pdf"))
2997 (with-directory-excursion "build/html"
2998 (for-each (lambda (file)
2999 (let* ((dir (dirname file))
3000 (tgt-dir (string-append html "/" dir)))
3001 (unless (equal? "." dir)
3002 (mkdir-p tgt-dir))
3003 (install-file file html)))
3004 (find-files "." ".*")))))
3005 #t)))))
3006 (home-page (package-home-page python-numpy))
3007 (synopsis "Documentation for the python-numpy package")
3008 (description (package-description python-numpy))
3009 (license (package-license python-numpy))))
3010
3011(define-public python2-numpy-documentation
3012 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3013 (package
3014 (inherit numpy-documentation)
3015 (native-inputs `(("python2-functools32" ,python2-functools32)
3016 ,@(package-native-inputs numpy-documentation))))))
3017
3018(define-public python-pygit2
3019 (package
3020 (name "python-pygit2")
3021 (version "0.27.3")
3022 (source
3023 (origin
3024 (method url-fetch)
3025 (uri (pypi-uri "pygit2" version))
3026 (sha256
3027 (base32
3028 "046ahvsb7a20sgvscqfm3cb32sp3sii4gim9vz7zzrkf7yz16xlv"))))
3029 (build-system python-build-system)
3030 (arguments
3031 '(#:phases
3032 (modify-phases %standard-phases
3033 ;; Remove after the next update. See:
3034 ;; https://github.com/libgit2/pygit2/pull/851
3035 (add-after 'unpack 'compile-with-cffi
3036 (lambda _
3037 (substitute* "setup.py"
3038 (("install_requires")
3039 "setup_requires=['cffi'],\n install_requires"))
3040 #t))
3041 (add-after 'unpack 'fix-dependency-versioning
3042 (lambda _
3043 (substitute* "setup.py"
3044 (("<") "<="))
3045 #t)))))
3046 (propagated-inputs
3047 `(("python-six" ,python-six)
3048 ("python-cffi" ,python-cffi)
3049 ("libgit2" ,libgit2)
3050 ("python-tox" ,python-tox)))
3051 (native-inputs
3052 `(("python-pytest" ,python-pytest)))
3053 (home-page "https://github.com/libgit2/pygit2")
3054 (synopsis "Python bindings for libgit2")
3055 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3056library, libgit2 implements Git plumbing.")
3057 ;; GPL2.0 only, with linking exception.
3058 (license license:gpl2)))
3059
3060(define-public python2-pygit2
3061 (package-with-python2 python-pygit2))
3062
3063(define-public python-pyparsing
3064 (package
3065 (name "python-pyparsing")
3066 (version "2.2.1")
3067 (source
3068 (origin
3069 (method url-fetch)
3070 (uri (pypi-uri "pyparsing" version))
3071 (sha256
3072 (base32 "06dgd0iilvf8m0ssmfpcbh8l6jf0zkp8adbb84llksg17crfx4zl"))))
3073 (build-system python-build-system)
3074 (outputs '("out" "doc"))
3075 (arguments
3076 `(#:tests? #f ; no test target
3077 #:phases
3078 (modify-phases %standard-phases
3079 (add-after 'install 'install-doc
3080 (lambda* (#:key outputs #:allow-other-keys)
3081 (let* ((doc (string-append (assoc-ref outputs "doc")
3082 "/share/doc/" ,name "-" ,version))
3083 (html-doc (string-append doc "/html"))
3084 (examples (string-append doc "/examples")))
3085 (mkdir-p html-doc)
3086 (mkdir-p examples)
3087 (for-each
3088 (lambda (dir tgt)
3089 (map (lambda (file)
3090 (install-file file tgt))
3091 (find-files dir ".*")))
3092 (list "docs" "htmldoc" "examples")
3093 (list doc html-doc examples))
3094 #t))))))
3095 (home-page "https://github.com/pyparsing/pyparsing")
3096 (synopsis "Python parsing class library")
3097 (description
3098 "The pyparsing module is an alternative approach to creating and
3099executing simple grammars, vs. the traditional lex/yacc approach, or the use
3100of regular expressions. The pyparsing module provides a library of classes
3101that client code uses to construct the grammar directly in Python code.")
3102 (license license:expat)))
3103
3104(define-public python2-pyparsing
3105 (package-with-python2 python-pyparsing))
3106
3107(define-public python-numpydoc
3108 (package
3109 (name "python-numpydoc")
3110 (version "0.8.0")
3111 (source
3112 (origin
3113 (method url-fetch)
3114 (uri (pypi-uri "numpydoc" version))
3115 (sha256
3116 (base32
3117 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
3118 (build-system python-build-system)
3119 (propagated-inputs
3120 `(("python-sphinx" ,python-sphinx)))
3121 (native-inputs
3122 `(("python-nose" ,python-nose)))
3123 (home-page "https://pypi.python.org/pypi/numpydoc")
3124 (synopsis
3125 "Numpy's Sphinx extensions")
3126 (description
3127 "Sphinx extension to support docstrings in Numpy format.")
3128 (license license:bsd-2)))
3129
3130(define-public python2-numpydoc
3131 (package-with-python2 python-numpydoc))
3132
3133(define-public python-numexpr
3134 (package
3135 (name "python-numexpr")
3136 (version "2.6.5")
3137 (source
3138 (origin
3139 (method url-fetch)
3140 (uri (pypi-uri "numexpr" version))
3141 (sha256
3142 (base32
3143 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3144 (build-system python-build-system)
3145 (arguments `(#:tests? #f)) ; no tests included
3146 (propagated-inputs
3147 `(("python-numpy" ,python-numpy)))
3148 (home-page "https://github.com/pydata/numexpr")
3149 (synopsis "Fast numerical expression evaluator for NumPy")
3150 (description
3151 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3152expressions that operate on arrays are accelerated and use less memory than
3153doing the same calculation in Python. In addition, its multi-threaded
3154capabilities can make use of all your cores, which may accelerate
3155computations, most specially if they are not memory-bounded (e.g. those using
3156transcendental functions).")
3157 (license license:expat)))
3158
3159(define-public python2-numexpr
3160 (package-with-python2 python-numexpr))
3161
3162(define-public python-cycler
3163 (package
3164 (name "python-cycler")
3165 (version "0.10.0")
3166 (source (origin
3167 (method url-fetch)
3168 (uri (pypi-uri "cycler" version))
3169 (sha256
3170 (base32
3171 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3172 (build-system python-build-system)
3173 (arguments
3174 ;; XXX: The current version requires 'coveralls' which we don't have.
3175 ;; Enable this for the next release which uses 'python-pytest'.
3176 '(#:tests? #f))
3177 (propagated-inputs
3178 `(("python-six" ,python-six)))
3179 (home-page "http://matplotlib.org/cycler/")
3180 (synopsis "Composable keyword argument iterator")
3181 (description
3182 "When using @code{matplotlib} and plotting more than one line, it is
3183common to want to be able to want to be able to cycle over one or more artist
3184styles; but the plotting logic can quickly become involved.
3185To address this and enable easy cycling over arbitrary @code{kwargs}, the
3186@code{Cycler} class was developed.")
3187 (license license:bsd-3)))
3188
3189(define-public python2-cycler
3190 (package-with-python2 python-cycler))
3191
3192(define-public python-colorspacious
3193 (package
3194 (name "python-colorspacious")
3195 (version "1.1.0")
3196 (source
3197 (origin
3198 (method url-fetch)
3199 (uri (string-append "https://github.com/njsmith/colorspacious/archive/v"
3200 version ".tar.gz"))
3201 (file-name (string-append name "-" version))
3202 (sha256
3203 (base32 "1vflh5jm32qb0skza2i8pjacv09w6gq84fqpp2nj77s0rbmzgr4k"))))
3204 (build-system python-build-system)
3205 (propagated-inputs
3206 `(("python-numpy" ,python-numpy)))
3207 (native-inputs
3208 `(("python-nose" ,python-nose)))
3209 (arguments
3210 `(#:phases
3211 (modify-phases %standard-phases
3212 (replace 'check
3213 (lambda _
3214 (zero? (system* "nosetests" "--all-modules" "-v" "colorspacious")))))))
3215 (home-page "https://github.com/njsmith/colorspacious")
3216 (synopsis "Python library for colorspace conversions")
3217 (description "@code{colorspacious} is a Python library that lets you
3218convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3219 (license license:expat)))
3220
3221(define-public python2-colorspacious
3222 (package-with-python2 python-colorspacious))
3223
3224(define-public python-matplotlib
3225 (package
3226 (name "python-matplotlib")
3227 (version "2.2.3")
3228 (source
3229 (origin
3230 (method url-fetch)
3231 (uri (pypi-uri "matplotlib" version))
3232 (sha256
3233 (base32
3234 "1rcc7x9ig3hpchkc4cwdvym3y451w74275fxr455zkfagrsvymbk"))))
3235 (build-system python-build-system)
3236 (propagated-inputs ; the following packages are all needed at run time
3237 `(("python-cycler" ,python-cycler)
3238 ("python-kiwisolver" ,python-kiwisolver)
3239 ("python-pyparsing" ,python-pyparsing)
3240 ("python-pygobject" ,python-pygobject)
3241 ("gobject-introspection" ,gobject-introspection)
3242 ("python-tkinter" ,python "tk")
3243 ("python-dateutil" ,python-dateutil)
3244 ("python-numpy" ,python-numpy)
3245 ("python-pillow" ,python-pillow)
3246 ("python-pytz" ,python-pytz)
3247 ("python-six" ,python-six)
3248 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3249 ;; from 'gtk+') provides the required 'typelib' files used by
3250 ;; 'gobject-introspection'. The location of these files is set with the
3251 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3252 ;; is done automatically by a 'native-search-path' procedure. However,
3253 ;; at run-time the user must set this variable as follows:
3254 ;;
3255 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
3256 ("gtk+" ,gtk+)
3257 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3258 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3259 ;; object. For this reason we need to import both libraries.
3260 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3261 ("python-pycairo" ,python-pycairo)
3262 ;; XXX: qtwebkit cannot be built reliably.
3263 ("python-pyqt" ,python-pyqt-without-qtwebkit)
3264 ("python-cairocffi" ,python-cairocffi)))
3265 (inputs
3266 `(("libpng" ,libpng)
3267 ("imagemagick" ,imagemagick)
3268 ("freetype" ,freetype)
3269 ("cairo" ,cairo)
3270 ("glib" ,glib)
3271 ;; FIXME: Add backends when available.
3272 ;("python-wxpython" ,python-wxpython)
3273 ("tcl" ,tcl)
3274 ("tk" ,tk)))
3275 (native-inputs
3276 `(("pkg-config" ,pkg-config)
3277 ("python-nose" ,python-nose)
3278 ("python-mock" ,python-mock)))
3279 (arguments
3280 `(#:phases
3281 (modify-phases %standard-phases
3282 (add-before 'build 'configure-environment
3283 (lambda* (#:key outputs inputs #:allow-other-keys)
3284 (let ((cairo (assoc-ref inputs "cairo"))
3285 (gtk+ (assoc-ref inputs "gtk+")))
3286 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3287 ;; has not effect.
3288 (setenv "LD_LIBRARY_PATH"
3289 (string-append cairo "/lib:" gtk+ "/lib"))
3290 (setenv "HOME" (getcwd))
3291 (call-with-output-file "setup.cfg"
3292 (lambda (port)
3293 (format port "[directories]~%
3294basedirlist = ~a,~a~%
3295 [rc_options]~%
3296backend = TkAgg~%"
3297 (assoc-ref inputs "tcl")
3298 (assoc-ref inputs "tk")))))
3299 #t)))))
3300 (home-page "http://matplotlib.org")
3301 (synopsis "2D plotting library for Python")
3302 (description
3303 "Matplotlib is a Python 2D plotting library which produces publication
3304quality figures in a variety of hardcopy formats and interactive environments
3305across platforms. Matplotlib can be used in Python scripts, the python and
3306ipython shell, web application servers, and six graphical user interface
3307toolkits.")
3308 (license license:psfl)
3309 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3310
3311(define-public python2-matplotlib
3312 (let ((matplotlib (package-with-python2
3313 (strip-python2-variant python-matplotlib))))
3314 (package (inherit matplotlib)
3315 ;; Make sure to use special packages for Python 2 instead
3316 ;; of those automatically rewritten by package-with-python2.
3317 (propagated-inputs
3318 `(("python2-pycairo" ,python2-pycairo)
3319 ("python2-backports-functools-lru-cache"
3320 ,python2-backports-functools-lru-cache)
3321 ("python2-functools32" ,python2-functools32)
3322 ("python2-pygobject-2" ,python2-pygobject-2)
3323 ("python2-subprocess32" ,python2-subprocess32)
3324 ("python2-tkinter" ,python-2 "tk")
3325 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3326 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
3327
3328(define-public python-matplotlib-documentation
3329 (package
3330 (name "python-matplotlib-documentation")
3331 (version (package-version python-matplotlib))
3332 (source (package-source python-matplotlib))
3333 (build-system python-build-system)
3334 (native-inputs
3335 `(("python-matplotlib" ,python-matplotlib)
3336 ("python-colorspacious" ,python-colorspacious)
3337 ("python-sphinx" ,python-sphinx)
3338 ("python-sphinx-gallery" ,python-sphinx-gallery)
3339 ("python-numpydoc" ,python-numpydoc)
3340 ("python-ipython" ,python-ipython)
3341 ("python-mock" ,python-mock)
3342 ("graphviz" ,graphviz)
3343 ("texlive" ,texlive)
3344 ("texinfo" ,texinfo)
3345 ,@(package-native-inputs python-matplotlib)))
3346 (arguments
3347 `(#:tests? #f ; we're only generating documentation
3348 #:phases
3349 (modify-phases %standard-phases
3350 (replace 'build
3351 (lambda _
3352 (chdir "doc")
3353 ;; Produce pdf in 'A4' format.
3354 (substitute* "conf.py"
3355 (("latex_paper_size = 'letter'") "")
3356 ;; latex_paper_size is deprecated -> set paper size using
3357 ;; latex_elements
3358 (("latex_elements\\['pointsize'\\] = '11pt'" match)
3359 ;; insert at a point where latex_elements{} is defined:
3360 (string-append match "\nlatex_elements['papersize'] = 'a4paper'")))
3361 (invoke "make" "SPHINXBUILD=sphinx-build" "html" "latex" "texinfo")))
3362 (replace 'install
3363 (lambda* (#:key inputs outputs #:allow-other-keys)
3364 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3365 (doc (string-append data "/doc/python-matplotlib-" ,version))
3366 (info (string-append data "/info"))
3367 (html (string-append doc "/html")))
3368 (mkdir-p html)
3369 (mkdir-p info)
3370 (copy-recursively "build/html" html)
3371 (symlink (string-append html "/_images")
3372 (string-append info "/matplotlib-figures"))
3373 (with-directory-excursion "build/texinfo"
3374 (substitute* "matplotlib.texi"
3375 (("@image\\{([^,]*)" all file)
3376 (string-append "@image{matplotlib-figures/" file)))
3377 (symlink (string-append html "/_images")
3378 "./matplotlib-figures")
3379 (system* "makeinfo" "--no-split"
3380 "-o" "matplotlib.info" "matplotlib.texi"))
3381 (copy-file "build/texinfo/matplotlib.info"
3382 (string-append info "/matplotlib.info"))
3383 (copy-file "build/latex/Matplotlib.pdf"
3384 (string-append doc "/Matplotlib.pdf")))
3385 #t)))))
3386 (home-page (package-home-page python-matplotlib))
3387 (synopsis "Documentation for the python-matplotlib package")
3388 (description (package-description python-matplotlib))
3389 (license (package-license python-matplotlib))))
3390
3391(define-public python2-matplotlib-documentation
3392 (package-with-python2 python-matplotlib-documentation))
3393
3394(define-public python2-pysnptools
3395 (package
3396 (name "python2-pysnptools")
5d1ade85 3397 (version "0.3.13")
44d10b1f
RW
3398 (source
3399 (origin
3400 (method url-fetch)
5d1ade85 3401 (uri (pypi-uri "pysnptools" version))
44d10b1f
RW
3402 (sha256
3403 (base32
5d1ade85 3404 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
44d10b1f
RW
3405 (build-system python-build-system)
3406 (arguments
5d1ade85
RW
3407 `(#:python ,python-2 ; only Python 2.7 is supported
3408 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
44d10b1f
RW
3409 (propagated-inputs
3410 `(("python2-numpy" ,python2-numpy)
3411 ("python2-scipy" ,python2-scipy)
3412 ("python2-pandas" ,python2-pandas)))
44d10b1f 3413 (native-inputs
5d1ade85 3414 `(("python2-cython" ,python2-cython)))
1b66989b 3415 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
44d10b1f
RW
3416 (synopsis "Library for reading and manipulating genetic data")
3417 (description
3418 "PySnpTools is a library for reading and manipulating genetic data. It
3419can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
3420those files. It can also efficiently manipulate ranges of integers using set
3421operators such as union, intersection, and difference.")
3422 (license license:asl2.0)))
3423
3424(define-public python-scipy
3425 (package
3426 (name "python-scipy")
3427 (version "1.1.0")
3428 (source
3429 (origin
3430 (method url-fetch)
3431 (uri (pypi-uri "scipy" version))
3432 (sha256
3433 (base32
3434 "1lfg686w6vv2m2dfs8v9d0bf2i18z7wz5vgzjnkgmpr4hi0550w7"))))
3435 (build-system python-build-system)
3436 (propagated-inputs
3437 `(("python-numpy" ,python-numpy)
3438 ("python-matplotlib" ,python-matplotlib)
3439 ("python-pyparsing" ,python-pyparsing)))
3440 (inputs
3441 `(("lapack" ,lapack)
3442 ("openblas" ,openblas)))
3443 (native-inputs
3444 `(("python-cython" ,python-cython)
3445 ("python-pytest" ,python-pytest)
3446 ("python-sphinx" ,python-sphinx)
3447 ("python-numpydoc" ,python-numpydoc)
3448 ("gfortran" ,gfortran)
3449 ("perl" ,perl)
3450 ("which" ,which)))
3451 (outputs '("out" "doc"))
3452 (arguments
3453 `(#:phases
3454 (modify-phases %standard-phases
3455 (add-after 'unpack 'disable-broken-tests
3456 (lambda _
3457 (substitute* "scipy/sparse/linalg/dsolve/tests/test_linsolve.py"
3458 (("^( +)def test_threads_parallel\\(self\\):" m indent)
3459 (string-append indent
3460 "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
3461 m)))
3462 (substitute* "scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py"
3463 (("^def test_parallel_threads\\(\\):" m)
3464 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
3465 m)))
3466 #t))
3467 (add-before 'build 'configure-openblas
3468 (lambda* (#:key inputs #:allow-other-keys)
3469 (call-with-output-file "site.cfg"
3470 (lambda (port)
3471 (format port
3472 "[blas]
3473libraries = openblas
3474library_dirs = ~a/lib
3475include_dirs = ~a/include
3476
3477# backslash-n to make emacs happy
3478\n[atlas]
3479library_dirs = ~a/lib
3480atlas_libs = openblas
3481"
3482 (assoc-ref inputs "openblas")
3483 (assoc-ref inputs "openblas")
3484 (assoc-ref inputs "openblas"))))
3485 #t))
3486 (add-after 'install 'install-doc
3487 (lambda* (#:key inputs outputs #:allow-other-keys)
3488 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3489 (doc (string-append data "/doc/" ,name "-" ,version))
3490 (html (string-append doc "/html"))
3491 (pyver ,(string-append "PYVER=" (version-major+minor
3492 (package-version python))))
3493 ;; By default it tries to run sphinx-build through the Python
3494 ;; interpreter which won't work with our shell wrapper.
3495 (sphinxbuild "SPHINXBUILD=LANG=C sphinx-build"))
3496 ;; Make installed package available for building the
3497 ;; documentation
3498 (add-installed-pythonpath inputs outputs)
3499 (with-directory-excursion "doc"
3500 ;; Fix generation of images for mathematical expressions.
3501 (substitute* (find-files "source" "conf\\.py")
3502 (("pngmath_use_preview = True")
3503 "pngmath_use_preview = False"))
3504 (mkdir-p html)
3505 (invoke "make" "html" pyver sphinxbuild)
3506 (with-directory-excursion "build/html"
3507 (for-each (lambda (file)
3508 (let* ((dir (dirname file))
3509 (tgt-dir (string-append html "/" dir)))
3510 (install-file file html)))
3511 (find-files "." ".*")))))
3512 #t))
3513 ;; Tests can only be run after the library has been installed and not
3514 ;; within the source directory.
3515 (delete 'check)
3516 (add-after 'install 'check
3517 (lambda* (#:key inputs outputs #:allow-other-keys)
3518 (add-installed-pythonpath inputs outputs)
3519 (with-directory-excursion "/tmp"
3520 (invoke "python" "-c"
3521 "import scipy; scipy.test(verbose=2)")))))))
3522 (home-page "https://www.scipy.org/")
3523 (synopsis "The Scipy library provides efficient numerical routines")
3524 (description "The SciPy library is one of the core packages that make up
3525the SciPy stack. It provides many user-friendly and efficient numerical
3526routines such as routines for numerical integration and optimization.")
3527 (properties `((python2-variant . ,(delay python2-scipy))))
3528 (license license:bsd-3)))
3529
3530(define-public python2-scipy
3531 (package-with-python2
3532 (strip-python2-variant python-scipy)))
3533
3534(define-public python-socksipy-branch
3535 (package
3536 (name "python-socksipy-branch")
3537 (version "1.01")
3538 (source
3539 (origin
3540 (method url-fetch)
3541 (uri (pypi-uri "SocksiPy-branch" version))
3542 (sha256
3543 (base32
3544 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
3545 (build-system python-build-system)
3546 (arguments
3547 `(#:tests? #f)) ; There are no tests
3548 (home-page "https://code.google.com/archive/p/socksipy-branch/")
3549 (synopsis "Python SOCKS module")
3550 (description
3551 "SocksiPy - A Python SOCKS client module. It provides a
3552socket-like interface that supports connections to any TCP
3553service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
3554The original version was developed by Dan Haim, this is a
3555branch created by Mario Vilas to address some open issues,
3556as the original project seems to have been abandoned circa 2007.")
3557 (license license:bsd-3)))
3558
3559(define-public python2-socksipy-branch
3560 (package-with-python2 python-socksipy-branch))
3561
3562(define-public python-pycodestyle
3563 (package
3564 (name "python-pycodestyle")
3565 (version "2.4.0")
3566 (source
3567 (origin
3568 (method url-fetch)
3569 (uri (pypi-uri "pycodestyle" version))
3570 (sha256
3571 (base32
3572 "0fhy4vnlgpjq4qd1wdnl6pvdw7rah0ypmn8c9mkhz8clsndskz6b"))))
3573 (build-system python-build-system)
3574 (home-page "https://pycodestyle.readthedocs.io/")
3575 (synopsis "Python style guide checker")
3576 (description "@code{pycodestyle} (formerly pep8) is a tool to check
3577Python code against some of the style conventions in
3578@url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
3579 (license license:expat)))
3580
3581(define-public python2-pycodestyle
3582 (package-with-python2 python-pycodestyle))
3583
3584(define-public python-multidict
3585 (package
3586 (name "python-multidict")
3587 (version "4.2.0")
3588 (source
3589 (origin
3590 (method url-fetch)
3591 (uri (pypi-uri "multidict" version))
3592 (sha256
3593 (base32
3594 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
3595 (build-system python-build-system)
3596 (native-inputs
3597 `(("python-pytest" ,python-pytest)
3598 ("python-pytest-runner" ,python-pytest-runner)))
3599 (home-page "https://github.com/aio-libs/multidict/")
3600 (synopsis "Multidict implementation")
3601 (description "Multidict is dict-like collection of key-value pairs
3602where key might be occurred more than once in the container.")
3603 (license license:asl2.0)))
3604
3605(define-public python-orderedmultidict
3606 (package
3607 (name "python-orderedmultidict")
3608 (version "0.7.11")
3609 (source
3610 (origin
3611 (method url-fetch)
3612 (uri (pypi-uri "orderedmultidict" version))
3613 (sha256
3614 (base32
3615 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
3616 (build-system python-build-system)
3617 (arguments
3618 `(#:phases
3619 (modify-phases %standard-phases
3620 (add-after 'unpack 'fix-tests
3621 (lambda _
3622 ;; The package uses nosetest for running the tests.
3623 ;; Adding this initfile allows to run the test suite
3624 ;; without requiring nosetest.
d1c4f329
RW
3625 (with-output-to-file "tests/__init__.py" newline)
3626 #t)))))
44d10b1f
RW
3627 (propagated-inputs
3628 `(("python-six" ,python-six)))
3629 (native-inputs
3630 `(("python-pycodestyle" ,python-pycodestyle)))
3631 (home-page "https://github.com/gruns/orderedmultidict")
3632 (synopsis "Python Ordered Multivalue Dictionary - omdict")
3633 (description "This package contains a library for ordered multivalue
3634dictionaries. A multivalue dictionary is a dictionary that can store
3635multiple values for the same key. An ordered multivalue dictionary is a
3636multivalue dictionary that retains the order of insertions and deletions.")
3637 (license license:unlicense)))
3638
3639(define-public python2-orderedmultidict
3640 (package-with-python2 python-orderedmultidict))
3641
3642(define-public python-autopep8
3643 (package
3644 (name "python-autopep8")
3645 (version "1.3.5")
3646 (source
3647 (origin
3648 (method url-fetch)
3649 (uri (pypi-uri "autopep8" version))
3650 (sha256
3651 (base32
3652 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
3653 (build-system python-build-system)
3654 (propagated-inputs
3655 `(("python-pycodestyle" ,python-pycodestyle)))
3656 (home-page "https://github.com/hhatto/autopep8")
3657 (synopsis "Format Python code according to the PEP 8 style guide")
3658 (description
3659 "@code{autopep8} automatically formats Python code to conform to
3660the PEP 8 style guide. It uses the pycodestyle utility to determine
3661what parts of the code needs to be formatted. @code{autopep8} is
3662capable of fixing most of the formatting issues that can be reported
3663by pycodestyle.")
3664 (license (license:non-copyleft
3665 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
3666
3667(define-public python2-autopep8
3668 (package-with-python2 python-autopep8))
3669
3670(define-public python-distutils-extra
3671 (package
3672 (name "python-distutils-extra")
3673 (version "2.38")
3674 (source
3675 (origin
3676 (method url-fetch)
3677 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
3678 version "/+download/python-distutils-extra-"
3679 version ".tar.gz"))
3680 (sha256
3681 (base32
3682 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
3683 (build-system python-build-system)
3684 (home-page "https://launchpad.net/python-distutils-extra/")
3685 (synopsis "Enhancements to Python's distutils")
3686 (description
3687 "The python-distutils-extra module enables you to easily integrate
3688gettext support, themed icons, and scrollkeeper-based documentation into
3689Python's distutils.")
3690 (license license:gpl2)))
3691
3692(define-public python2-distutils-extra
3693 (package-with-python2 python-distutils-extra))
3694
3695(define-public python2-elib.intl
3696 (package
3697 (name "python2-elib.intl")
3698 (version "0.0.3")
3699 (source
3700 (origin
3701 ;; This project doesn't tag releases or publish tarballs, so we take
3702 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
3703 (method git-fetch)
3704 (uri (git-reference
3705 (url "https://github.com/dieterv/elib.intl.git")
3706 (commit "d09997cfef")))
3707 (file-name (string-append name "-" version "-checkout"))
3708 (sha256
3709 (base32
3710 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
3711 (build-system python-build-system)
3712 (arguments
3713 ;; incompatible with Python 3 (exception syntax)
3714 `(#:python ,python-2
3715 #:tests? #f))
3716 (home-page "https://github.com/dieterv/elib.intl")
3717 (synopsis "Enhanced internationalization for Python")
3718 (description
3719 "The elib.intl module provides enhanced internationalization (I18N)
3720services for your Python modules and applications.")
3721 (license license:lgpl3+)))
3722
3723(define-public python-olefile
3724 (package
3725 (name "python-olefile")
3726 (version "0.45.1")
3727 (source
3728 (origin
3729 (method url-fetch)
3730 (uri (string-append "https://github.com/decalage2/olefile/archive/v"
3731 version ".tar.gz"))
3732 (file-name (string-append name "-" version ".tar.gz"))
3733 (sha256
3734 (base32
3735 "18ai19zwagm6nli14k8bii31ipbab2rp7plrvsm6gmfql551a8ai"))))
3736 (build-system python-build-system)
3737 (home-page
3738 "https://www.decalage.info/python/olefileio")
3739 (synopsis "Read and write Microsoft OLE2 files.")
3740 (description
3741 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
3742Storage or Compound Document, Microsoft Office). It is an improved version of
3743the OleFileIO module from PIL, the Python Image Library.")
3744 (license license:bsd-3)))
3745
3746(define-public python2-olefile
3747 (package-with-python2 python-olefile))
3748
3749(define-public python-pillow
3750 (package
3751 (name "python-pillow")
3752 (version "5.4.1")
3753 (source
3754 (origin
3755 (method url-fetch)
3756 (uri (pypi-uri "Pillow" version))
3757 (sha256
3758 (base32
3759 "17waygkhhzjd75kajlfw9v57mbb41lcpg6cvkdijqd7smm76ccsj"))))
3760 (build-system python-build-system)
3761 (native-inputs
3762 `(("python-pytest" ,python-pytest)))
3763 (inputs
3764 `(("freetype" ,freetype)
3765 ("lcms" ,lcms)
3766 ("zlib" ,zlib)
3767 ("libjpeg" ,libjpeg)
3768 ("openjpeg" ,openjpeg)
3769 ("libtiff" ,libtiff)
3770 ("libwebp" ,libwebp)))
3771 (propagated-inputs
3772 `(("python-olefile" ,python-olefile)))
3773 (arguments
3774 `(#:phases
3775 (modify-phases %standard-phases
3776 (add-after 'unpack 'patch-ldconfig
3777 (lambda _
3778 (substitute* "setup.py"
3779 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
3780 (delete 'check) ; We must run checks after python-pillow is installed.
3781 (add-after 'install 'check-installed
3782 (lambda* (#:key outputs inputs #:allow-other-keys)
3783 (begin
3784 (setenv "HOME" (getcwd))
3785 ;; Make installed package available for running the tests.
3786 (add-installed-pythonpath inputs outputs)
3787 (invoke "python" "selftest.py" "--installed")
3788 (invoke "python" "-m" "pytest" "-vv")))))))
3789 (home-page "https://python-pillow.org")
3790 (synopsis "Fork of the Python Imaging Library")
3791 (description
3792 "The Python Imaging Library adds image processing capabilities to your
3793Python interpreter. This library provides extensive file format support, an
3794efficient internal representation, and fairly powerful image processing
3795capabilities. The core image library is designed for fast access to data
3796stored in a few basic pixel formats. It should provide a solid foundation for
3797a general image processing tool.")
3798 (license (license:x11-style
3799 "http://www.pythonware.com/products/pil/license.htm"
3800 "The PIL Software License"))))
3801
3802(define-public python2-pillow
3803 (package-with-python2 python-pillow))
3804
3805(define-public python-pycparser
3806 (package
3807 (name "python-pycparser")
3808 (version "2.18")
3809 (source
3810 (origin
3811 (method url-fetch)
3812 (uri (pypi-uri "pycparser" version))
3813 (sha256
3814 (base32
3815 "09mjyw82ibqzl449g7swy8bfxnfpmas0815d2rkdjlcqw81wma4r"))))
3816 (outputs '("out" "doc"))
3817 (build-system python-build-system)
3818 (native-inputs
3819 `(("pkg-config" ,pkg-config)))
3820 (arguments
3821 `(#:phases
3822 (modify-phases %standard-phases
3823 (replace 'check
3824 (lambda _
3825 (with-directory-excursion "tests"
acb75c03
RW
3826 (invoke "python" "all_tests.py"))
3827 #t))
44d10b1f
RW
3828 (add-after 'install 'install-doc
3829 (lambda* (#:key outputs #:allow-other-keys)
3830 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3831 (doc (string-append data "/doc/" ,name "-" ,version))
3832 (examples (string-append doc "/examples")))
3833 (mkdir-p examples)
3834 (for-each (lambda (file)
3835 (copy-file (string-append "." file)
3836 (string-append doc file)))
3837 '("/README.rst" "/CHANGES" "/LICENSE"))
3838 (copy-recursively "examples" examples)))))))
3839 (home-page "https://github.com/eliben/pycparser")
3840 (synopsis "C parser in Python")
3841 (description
3842 "Pycparser is a complete parser of the C language, written in pure Python
3843using the PLY parsing library. It parses C code into an AST and can serve as
3844a front-end for C compilers or analysis tools.")
3845 (license license:bsd-3)))
3846
3847(define-public python2-pycparser
3848 (package-with-python2 python-pycparser))
3849
3850(define-public python-pywavelets
3851 (package
3852 (name "python-pywavelets")
3853 (version "1.0.1")
3854 (home-page "https://github.com/PyWavelets/pywt")
3855 (source (origin
3856 (method url-fetch)
3857 (uri (pypi-uri "PyWavelets" version))
3858 (sha256
3859 (base32
3860 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
3861 (build-system python-build-system)
3862 (arguments
3863 '(#:modules ((ice-9 ftw)
3864 (srfi srfi-1)
3865 (srfi srfi-26)
3866 (guix build utils)
3867 (guix build python-build-system))
3868 #:phases (modify-phases %standard-phases
3869 (replace 'check
3870 (lambda _
3871 (let ((cwd (getcwd))
3872 (libdir (find (cut string-prefix? "lib." <>)
3873 (scandir "build"))))
3874 (with-directory-excursion (string-append cwd "/build/" libdir)
3875 (invoke "nosetests" "-v" "."))))))))
3876 (native-inputs
3877 `(("python-matplotlib" ,python-matplotlib) ;for tests
3878 ("python-nose" ,python-nose)))
3879 (propagated-inputs
3880 `(("python-numpy" ,python-numpy)))
3881 (synopsis "Wavelet transforms in Python")
3882 (description
3883 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
3884mathematical basis functions that are localized in both time and frequency.
3885Wavelet transforms are time-frequency transforms employing wavelets. They are
3886similar to Fourier transforms, the difference being that Fourier transforms are
3887localized only in frequency instead of in time and frequency.")
3888 (license license:expat)))
3889
3890(define-public python2-pywavelets
3891 (package-with-python2 python-pywavelets))
3892
3893(define-public python-xcffib
3894 (package
3895 (name "python-xcffib")
3896 (version "0.6.0")
3897 (source
3898 (origin
3899 (method url-fetch)
3900 (uri (pypi-uri "xcffib" version))
3901 (sha256
3902 (base32
3903 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
3904 (build-system python-build-system)
3905 (inputs
3906 `(("libxcb" ,libxcb)))
3907 (propagated-inputs
3908 `(("python-cffi" ,python-cffi) ; used at run time
3909 ("python-six" ,python-six)))
3910 (arguments
3911 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
3912 #:tests? #f
3913 #:phases
3914 (modify-phases %standard-phases
3915 (add-after 'unpack 'fix-libxcb-path
3916 (lambda* (#:key inputs #:allow-other-keys)
3917 (let ((libxcb (assoc-ref inputs "libxcb")))
3918 (substitute* '("xcffib/__init__.py")
3919 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
3920 #t)))
3921 (add-after 'install 'install-doc
3922 (lambda* (#:key outputs #:allow-other-keys)
3923 (let ((doc (string-append (assoc-ref outputs "out") "/share"
3924 "/doc/" ,name "-" ,version)))
3925 (mkdir-p doc)
3926 (copy-file "README.md"
3927 (string-append doc "/README.md"))
3928 #t))))))
3929 (home-page "https://github.com/tych0/xcffib")
3930 (synopsis "XCB Python bindings")
3931 (description
3932 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
3933support for Python 3 and PyPy. It is based on cffi.")
3934 (license license:expat)))
3935
3936(define-public python2-xcffib
3937 (package-with-python2 python-xcffib))
3938
3939(define-public python-cairocffi
3940 (package
3941 (name "python-cairocffi")
3942 (version "0.9.0")
3943 (source
3944 (origin
3945 (method url-fetch)
3946 (uri (pypi-uri "cairocffi" version))
3947 (sha256
3948 (base32
3949 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
3950 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
3951 (build-system python-build-system)
3952 (outputs '("out" "doc"))
3953 (inputs
3954 `(("glib" ,glib)
3955 ("gtk+" ,gtk+)
3956 ("gdk-pixbuf" ,gdk-pixbuf)
3957 ("cairo" ,cairo)
3958 ("pango" ,pango)))
3959 (native-inputs
3960 `(("pkg-config" ,pkg-config)
3961 ("python-pytest" ,python-pytest)
3962 ("python-pytest-cov" ,python-pytest-cov)
3963 ("python-pytest-runner" ,python-pytest-runner)
3964 ("python-sphinx" ,python-sphinx)
3965 ("python-docutils" ,python-docutils)))
3966 (propagated-inputs
3967 `(("python-xcffib" ,python-xcffib))) ; used at run time
3968 (arguments
3969 `(#:phases
3970 (modify-phases %standard-phases
3971 (add-after 'unpack 'patch-paths
3972 (lambda* (#:key inputs outputs #:allow-other-keys)
3973 (substitute* (find-files "." "\\.py$")
3974 (("dlopen\\(ffi, 'cairo'")
3975 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
3976 "/lib/libcairo.so.2'"))
3977 (("dlopen\\(ffi, 'gdk-3'")
3978 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
3979 "/lib/libgtk-3.so.0'"))
3980 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
3981 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
3982 "/lib/libgdk_pixbuf-2.0.so.0'"))
3983 (("dlopen\\(ffi, 'glib-2.0'")
3984 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
3985 "/lib/libglib-2.0.so.0'"))
3986 (("dlopen\\(ffi, 'gobject-2.0'")
3987 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
3988 "/lib/libgobject-2.0.so.0'"))
3989 (("dlopen\\(ffi, 'pangocairo-1.0'")
3990 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
3991 "/lib/libpangocairo-1.0.so.0'"))
3992 (("dlopen\\(ffi, 'pango-1.0'")
3993 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
3994 "/lib/libpango-1.0.so.0'")))
3995 #t))
3996 (add-after 'install 'install-doc
3997 (lambda* (#:key inputs outputs #:allow-other-keys)
3998 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3999 (doc (string-append data "/doc/" ,name "-" ,version))
4000 (html (string-append doc "/html")))
4001 (setenv "LD_LIBRARY_PATH"
4002 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4003 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4004 (setenv "LANG" "en_US.UTF-8")
4005 (mkdir-p html)
4006 (for-each (lambda (file)
4007 (copy-file (string-append "." file)
4008 (string-append doc file)))
4009 '("/README.rst" "/CHANGES" "/LICENSE"))
4010 (system* "python" "setup.py" "build_sphinx")
4011 (copy-recursively "docs/_build/html" html)
4012 #t))))))
4013 (home-page "https://github.com/Kozea/cairocffi")
4014 (synopsis "Python bindings and object-oriented API for Cairo")
4015 (description
4016 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4017Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4018graphics library with support for multiple backends including image buffers,
4019PNG, PostScript, PDF, and SVG file output.")
4020 (license license:bsd-3)))
4021
4022(define-public python2-cairocffi
4023 (package-with-python2 python-cairocffi))
4024
4025(define-public python-decorator
4026 (package
4027 (name "python-decorator")
4028 (version "4.3.0")
4029 (source
4030 (origin
4031 (method url-fetch)
4032 (uri (pypi-uri "decorator" version))
4033 (sha256
4034 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
4035 (build-system python-build-system)
4036 (home-page "https://pypi.python.org/pypi/decorator/")
4037 (synopsis "Python module to simplify usage of decorators")
4038 (description
4039 "The aim of the decorator module is to simplify the usage of decorators
4040for the average programmer, and to popularize decorators usage giving examples
4041of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4042etc. The core of this module is a decorator factory.")
4043 (license license:expat)))
4044
4045(define-public python2-decorator
4046 (package-with-python2 python-decorator))
4047
4048(define-public python-drmaa
4049 (package
4050 (name "python-drmaa")
4051 (version "0.7.7")
4052 (source
4053 (origin
4054 (method url-fetch)
4055 (uri (pypi-uri "drmaa" version))
4056 (sha256
4057 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4058 (build-system python-build-system)
4059 ;; The test suite requires libdrmaa which is provided by the cluster
4060 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4061 ;; should be set to the path of the libdrmaa library.
4062 (arguments '(#:tests? #f))
4063 (native-inputs
4064 `(("python-nose" ,python-nose)))
4065 (home-page "https://pypi.python.org/pypi/drmaa")
4066 (synopsis "Python bindings for the DRMAA library")
4067 (description
4068 "A Python package for Distributed Resource Management (DRM) job
4069submission and control. This package is an implementation of the DRMAA 1.0
4070Python language binding specification.")
4071 (license license:bsd-3)))
4072
4073(define-public python2-drmaa
4074 (package-with-python2 python-drmaa))
4075
4076(define-public python-grako
4077 (package
4078 (name "python-grako")
4079 (version "3.99.9")
4080 (source
4081 (origin
4082 (method url-fetch)
4083 (uri
4084 (pypi-uri "grako" version ".zip"))
4085 (sha256
4086 (base32
4087 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4088 (build-system python-build-system)
4089 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4090 (native-inputs
4091 `(("unzip" ,unzip)
4092 ("python-pytest" ,python-pytest)
4093 ("python-pytest-runner" ,python-pytest-runner)))
4094 (home-page "https://bitbucket.org/neogeny/grako")
4095 (synopsis "EBNF parser generator")
4096 (description
4097 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4098memoizing PEG/Packrat parser in Python.")
4099 (license license:bsd-3)))
4100
4101(define-public python2-grako
4102 (package-with-python2 python-grako))
4103
4104(define-public python-gridmap
4105 (package
4106 (name "python-gridmap")
4107 (version "0.13.0")
4108 (source
4109 (origin
4110 (method url-fetch)
4111 (uri (string-append
4112 "https://github.com/pygridtools/gridmap/archive/v"
4113 version ".tar.gz"))
4114 (file-name (string-append name "-" version ".tar.gz"))
4115 (sha256
4116 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
4117 (build-system python-build-system)
4118 (arguments
4119 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4120 (propagated-inputs
4121 `(("python-psutil" ,python-psutil)
4122 ("python-drmaa" ,python-drmaa)
4123 ("python-pyzmq" ,python-pyzmq)))
4124 (home-page "https://github.com/pygridtools/gridmap")
4125 (synopsis "Create jobs on a cluster directly from Python")
4126 (description
4127 "Gridmap is a Python package to allow you to easily create jobs on the
4128cluster directly from Python. You can directly map Python functions onto the
4129cluster without needing to write any wrapper code yourself.")
4130 (license license:gpl3+)))
4131
4132(define-public python2-gridmap
4133 (package-with-python2 python-gridmap))
4134
4135(define-public python-honcho
4136 (package
4137 (name "python-honcho")
4138 (version "1.0.1")
4139 (source
4140 (origin
4141 (method url-fetch)
4142 (uri (string-append
4143 "https://github.com/nickstenning/honcho/archive/v"
4144 version ".tar.gz"))
4145 (file-name (string-append name "-" version ".tar.gz"))
4146 (sha256
4147 (base32 "0zizn61n5z5hq421hkypk9pw8s6fpxw30f4hsg7k4ivwzy3gjw9j"))))
4148 (build-system python-build-system)
4149 (native-inputs
4150 `(("python-pytest" ,python-pytest)
4151 ("python-mock" ,python-mock)
4152 ("python-tox" ,python-tox)
4153 ("which" ,which))) ;for tests
4154 (propagated-inputs
4155 `(("python-jinja2" ,python-jinja2)))
4156 (arguments
4157 `(#:phases
4158 (modify-phases %standard-phases
4159 (delete 'check)
4160 (add-after 'install 'check
4161 (lambda* (#:key outputs inputs #:allow-other-keys)
4162 ;; fix honcho path in testsuite
4163 (substitute* "tests/conftest.py"
4164 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
4165 "/bin/honcho" "'")))
4166 ;; It's easier to run tests after install.
4167 ;; Make installed package available for running the tests
4168 (add-installed-pythonpath inputs outputs)
95b707fb 4169 (invoke "py.test" "-v"))))))
44d10b1f
RW
4170 (home-page "https://github.com/nickstenning/honcho")
4171 (synopsis "Manage Procfile-based applications")
4172 (description
4173 "A Procfile is a file which describes how to run an application
4174consisting of serveral processes. honcho starts all listed processes.
4175The output of all running processes is collected by honcho and
4176displayed.")
4177 (license license:expat)))
4178
4179(define-public python2-honcho
4180 (package-with-python2 python-honcho))
4181
4182(define-public python-pexpect
4183 (package
4184 (name "python-pexpect")
4185 (version "4.6.0")
4186 (source
4187 (origin
4188 (method url-fetch)
4189 (uri (pypi-uri "pexpect" version))
4190 (sha256
4191 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
4192 (build-system python-build-system)
4193 (arguments
4194 `(#:phases
4195 (modify-phases %standard-phases
4196 (add-before 'check 'prepare-tests
4197 (lambda _
4198 (substitute* (find-files "tests")
4199 (("/bin/ls") (which "ls"))
4200 (("/bin/echo") (which "echo"))
4201 (("/bin/which") (which "which"))
4202 ;; Many tests try to use the /bin directory which
4203 ;; is not present in the build environment.
4204 ;; Use one that's non-empty and unlikely to change.
4205 (("/bin'") "/dev'"))
4206 ;; XXX: Socket connection test gets "Connection reset by peer".
4207 ;; Why does it not work? Delete for now.
4208 (delete-file "tests/test_socket.py")
4209 #t))
4210 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
4211 (native-inputs
4212 `(("python-nose" ,python-nose)
4213 ("python-pytest" ,python-pytest)
4214 ("man-db" ,man-db)
4215 ("which" ,which)
4216 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
4217 (propagated-inputs
4218 `(("python-ptyprocess" ,python-ptyprocess)))
4219 (home-page "http://pexpect.readthedocs.org/")
4220 (synopsis "Controlling interactive console applications")
4221 (description
4222 "Pexpect is a pure Python module for spawning child applications;
4223controlling them; and responding to expected patterns in their output.
4224Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4225child application and control it as if a human were typing commands.")
4226 (license license:isc)))
4227
4228(define-public python2-pexpect
4229 (package-with-python2 python-pexpect))
4230
4231(define-public python-setuptools-scm
4232 (package
4233 (name "python-setuptools-scm")
4234 (version "3.1.0")
4235 (source (origin
4236 (method url-fetch)
4237 (uri (pypi-uri "setuptools_scm" version))
4238 (sha256
4239 (base32
4240 "0h4bglwfz8b9prqljv8z3w9rgydfyxzaj05bm1y6zs5m6shz548i"))))
4241 (build-system python-build-system)
4242 (home-page "https://github.com/pypa/setuptools_scm/")
4243 (synopsis "Manage Python package versions in SCM metadata")
4244 (description
4245 "Setuptools_scm handles managing your Python package versions in
4246@dfn{software configuration management} (SCM) metadata instead of declaring
4247them as the version argument or in a SCM managed file.")
4248 (license license:expat)))
4249
4250(define-public python2-setuptools-scm
4251 (package-with-python2 python-setuptools-scm))
4252
4253(define-public python-pathpy
4254 (package
4255 (name "python-pathpy")
4256 (version "11.0.1")
4257 (source
4258 (origin
4259 (method url-fetch)
4260 (uri (pypi-uri "path.py" version))
4261 (sha256
4262 (base32 "07x15v8c7ry9bvycw294c9yq6ky9v2b0dalvgi6rn38ilh69vsz7"))))
4263 ;; (outputs '("out" "doc"))
4264 (build-system python-build-system)
4265 (propagated-inputs
4266 `(("python-appdirs" ,python-appdirs)))
4267 (native-inputs
4268 `(("python-setuptools-scm" ,python-setuptools-scm)
4269 ("python-sphinx" ,python-sphinx)
4270 ("python-rst.linker" ,python-rst.linker)
4271 ("python-pytest" ,python-pytest)
4272 ("python-pytest-runner" ,python-pytest-runner)))
4273 (arguments
4274 ;; FIXME: Documentation and tests require "jaraco.packaging".
4275 `(#:tests? #f))
4276 ;; #:phases
4277 ;; (modify-phases %standard-phases
4278 ;; (add-after 'build 'build-doc
4279 ;; (lambda _
4280 ;; (setenv "LANG" "en_US.UTF-8")
4281 ;; (zero? (system* "python" "setup.py" "build_sphinx"))))
4282 ;; (add-after 'install 'install-doc
4283 ;; (lambda* (#:key outputs #:allow-other-keys)
4284 ;; (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4285 ;; (doc (string-append data "/doc/" ,name "-" ,version))
4286 ;; (html (string-append doc "/html")))
4287 ;; (mkdir-p html)
4288 ;; (for-each (lambda (file)
4289 ;; (copy-file file (string-append doc "/" file)))
4290 ;; '("README.rst" "CHANGES.rst"))
4291 ;; (copy-recursively "build/sphinx/html" html)))))))
4292 (home-page "https://github.com/jaraco/path.py")
4293 (synopsis "Python module wrapper for built-in os.path")
4294 (description
4295 "@code{path.py} implements path objects as first-class entities, allowing
4296common operations on files to be invoked on those path objects directly.")
4297 (license license:expat)))
4298
4299(define-public python2-pathpy
4300 (package-with-python2 python-pathpy))
4301
4302(define-public python-simplegeneric
4303 (package
4304 (name "python-simplegeneric")
4305 (version "0.8.1")
4306 (source
4307 (origin
4308 (method url-fetch)
4309 (uri (string-append "https://pypi.python.org/packages/source/s/"
4310 "simplegeneric/simplegeneric-" version ".zip"))
4311 (sha256
4312 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
4313 (build-system python-build-system)
4314 (native-inputs
4315 `(("unzip" ,unzip)))
4316 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
4317 (synopsis "Python module for simple generic functions")
4318 (description
4319 "The simplegeneric module lets you define simple single-dispatch generic
4320functions, akin to Python’s built-in generic functions like @code{len()},
4321@code{iter()} and so on. However, instead of using specially-named methods,
4322these generic functions use simple lookup tables, akin to those used by
4323e.g. @code{pickle.dump()} and other generic functions found in the Python
4324standard library.")
4325 (license license:zpl2.1)))
4326
4327(define-public python2-simplegeneric
4328 (package-with-python2 python-simplegeneric))
4329
4330(define-public python-ipython-genutils
4331 ;; TODO: This package is retired, check if can be removed, see description.
4332 (package
4333 (name "python-ipython-genutils")
4334 (version "0.1.0")
4335 (source
4336 (origin
4337 (method url-fetch)
4338 (uri (string-append "https://pypi.python.org/packages/source/i/"
4339 "ipython_genutils/ipython_genutils-"
4340 version ".tar.gz"))
4341 (sha256
4342 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
4343 (build-system python-build-system)
4344 (arguments `(#:tests? #f)) ; no tests
4345 (home-page "https://ipython.org")
4346 (synopsis "Vestigial utilities from IPython")
4347 (description
4348 "This package provides retired utilities from IPython. No packages
4349outside IPython/Jupyter should depend on it.
4350
4351This package shouldn't exist. It contains some common utilities shared by
4352Jupyter and IPython projects during The Big Split. As soon as possible, those
4353packages will remove their dependency on this, and this package will go
4354away.")
4355 (license license:bsd-3)))
4356
4357(define-public python2-ipython-genutils
4358 (package-with-python2 python-ipython-genutils))
4359
4360(define-public python-traitlets
4361 (package
4362 (name "python-traitlets")
4363 (version "4.3.2")
4364 (source
4365 (origin
4366 (method url-fetch)
4367 (uri (pypi-uri "traitlets" version))
4368 (sha256
4369 (base32
4370 "0dbq7sx26xqz5ixs711k5nc88p8a0nqyz6162pwks5dpcz9d4jww"))))
4371 (build-system python-build-system)
4372 (arguments
4373 `(#:phases
4374 (modify-phases %standard-phases
4375 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
4376 (propagated-inputs
4377 `(("python-ipython-genutils" ,python-ipython-genutils)
4378 ("python-decorator" ,python-decorator))) ;not needed for >4.3.2
4379 (native-inputs
4380 `(("python-pytest" ,python-pytest)))
4381 (properties `((python2-variant . ,(delay python2-traitlets))))
4382 (home-page "https://ipython.org")
4383 (synopsis "Configuration system for Python applications")
4384 (description
4385 "Traitlets is a framework that lets Python classes have attributes with
4386type checking, dynamically calculated default values, and ‘on change’
4387callbacks. The package also includes a mechanism to use traitlets for
4388configuration, loading values from files or from command line arguments. This
4389is a distinct layer on top of traitlets, so you can use traitlets in your code
4390without using the configuration machinery.")
4391 (license license:bsd-3)))
4392
4393(define-public python2-traitlets
4394 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
4395 (package
4396 (inherit traitlets)
4397 (propagated-inputs
4398 `(("python2-enum34" ,python2-enum34)
4399 ,@(package-propagated-inputs traitlets))))))
4400
4401(define-public python-jupyter-core
4402 (package
4403 (name "python-jupyter-core")
4404 (version "4.4.0")
4405 (source
4406 (origin
4407 (method url-fetch)
4408 (uri (string-append (pypi-uri "jupyter_core" version)))
4409 (sha256
4410 (base32
4411 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
4412 (build-system python-build-system)
4413 ;; FIXME: not sure how to run the tests
4414 (arguments `(#:tests? #f))
4415 (propagated-inputs
4416 `(("python-traitlets" ,python-traitlets)))
4417 (home-page "http://jupyter.org/")
4418 (synopsis "Jupyter base package")
4419 (description
4420 "Jupyter core is the base package on which Jupyter projects rely.")
4421 (license license:bsd-3)))
4422
4423(define-public python2-jupyter-core
4424 (package-with-python2 python-jupyter-core))
4425
4426(define-public python-jupyter-client
4427 (package
4428 (name "python-jupyter-client")
4429 (version "5.2.4")
4430 (source
4431 (origin
4432 (method url-fetch)
4433 (uri (pypi-uri "jupyter_client" version))
4434 (sha256
4435 (base32
4436 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
4437 (build-system python-build-system)
4438 ;; Tests fail because of missing native python kernel which I assume is
4439 ;; provided by the ipython package, which we cannot use because it would
4440 ;; cause a dependency cycle.
4441 (arguments `(#:tests? #f))
4442 (propagated-inputs
4443 `(("python-pyzmq" ,python-pyzmq)
4444 ("python-traitlets" ,python-traitlets)
4445 ("python-jupyter-core" ,python-jupyter-core)))
4446 (home-page "http://jupyter.org/")
4447 (synopsis "Jupyter protocol implementation and client libraries")
4448 (description
4449 "The @code{jupyter_client} package contains the reference implementation
4450of the Jupyter protocol. It also provides client and kernel management APIs
4451for working with kernels, and the @code{jupyter kernelspec} entrypoint for
4452installing @code{kernelspec}s for use with Jupyter frontends.")
4453 (license license:bsd-3)))
4454
4455(define-public python2-jupyter-client
4456 (package-with-python2 python-jupyter-client))
4457
4458(define-public python-ipykernel
4459 (package
4460 (name "python-ipykernel")
4461 (version "5.1.0")
4462 (source
4463 (origin
4464 (method url-fetch)
4465 (uri (pypi-uri "ipykernel" version))
4466 (sha256
4467 (base32 "0br95qhrd5k65g10djngiy27hs0642301hlf2q142i8djabvzh0g"))))
4468 (build-system python-build-system)
4469 (arguments
4470 `(#:phases
4471 (modify-phases %standard-phases
4472 (replace 'check
4473 (lambda _
4474 (setenv "HOME" "/tmp")
4475 (invoke "pytest" "-v")
4476 #t)))))
4477 (propagated-inputs
4478 `(("python-ipython" ,python-ipython)
4479 ;; imported at runtime during connect
4480 ("python-jupyter-client" ,python-jupyter-client)))
4481 (native-inputs
4482 `(("python-pytest" ,python-pytest)
4483 ("python-nose" ,python-nose)))
4484 (home-page "https://ipython.org")
4485 (synopsis "IPython Kernel for Jupyter")
4486 (description
4487 "This package provides the IPython kernel for Jupyter.")
4488 (license license:bsd-3)))
4489
4490(define-public python2-ipykernel
4491 (package-with-python2 python-ipykernel))
4492
4493(define-public python-send2trash
4494 (package
4495 (name "python-send2trash")
4496 (version "1.5.0")
4497 (source
4498 (origin
4499 (method url-fetch)
4500 (uri (pypi-uri "send2trash" version))
4501 (sha256
4502 (base32
4503 "1ci8vcwjmjlp11ljj1ckrfmml9fkq1mclx2gr53y4zvhgp01q030"))))
4504 (build-system python-build-system)
4505 (home-page "https://github.com/hsoft/send2trash")
4506 (synopsis "Send files to trash")
4507 (description
4508 "This package provides a cross-platform mechanism to send files to the
4509trash.")
4510 (license license:bsd-3)))
4511
4512(define-public python2-send2trash
4513 (package-with-python2 python-send2trash))
4514
4515;; This is the latest release of the LTS version of ipython with support for
4516;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
4517;; dropped support for Python 2.7. We may want to rename this package.
4518(define-public python-ipython
4519 (package
4520 (name "python-ipython")
4521 (version "5.8.0")
4522 (source
4523 (origin
4524 (method url-fetch)
4525 (uri (pypi-uri "ipython" version ".tar.gz"))
4526 (sha256
4527 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
4528 (build-system python-build-system)
4529 (outputs '("out" "doc"))
4530 (propagated-inputs
4531 `(("python-pyzmq" ,python-pyzmq)
4532 ("python-prompt-toolkit" ,python-prompt-toolkit-1)
4533 ("python-terminado" ,python-terminado)
4534 ("python-matplotlib" ,python-matplotlib)
4535 ("python-numpy" ,python-numpy)
4536 ("python-numpydoc" ,python-numpydoc)
4537 ("python-jinja2" ,python-jinja2)
4538 ("python-mistune" ,python-mistune)
4539 ("python-pexpect" ,python-pexpect)
4540 ("python-pickleshare" ,python-pickleshare)
4541 ("python-simplegeneric" ,python-simplegeneric)
4542 ("python-jsonschema" ,python-jsonschema)
4543 ("python-traitlets" ,python-traitlets)
4544 ("python-nbformat" ,python-nbformat)
4545 ("python-pygments" ,python-pygments)))
4546 (inputs
4547 `(("readline" ,readline)
4548 ("which" ,which)))
4549 (native-inputs
4550 `(("graphviz" ,graphviz)
4551 ("pkg-config" ,pkg-config)
4552 ("python-requests" ,python-requests) ;; for tests
4553 ("python-testpath" ,python-testpath)
4554 ("python-nose" ,python-nose)
4555 ("python-sphinx" ,python-sphinx)
4556 ("python-shpinx-rtd-theme" ,python-sphinx-rtd-theme)
4557 ;; FIXME: It's possible that a smaller union would work just as well.
4558 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
4559 texlive-fonts-ec
4560 texlive-generic-ifxetex
4561 texlive-generic-pdftex
4562 texlive-latex-amsfonts
4563 texlive-latex-capt-of
4564 texlive-latex-cmap
4565 texlive-latex-environ
4566 texlive-latex-eqparbox
4567 texlive-latex-etoolbox
4568 texlive-latex-expdlist
4569 texlive-latex-fancyhdr
4570 texlive-latex-fancyvrb
4571 texlive-latex-fncychap
4572 texlive-latex-float
4573 texlive-latex-framed
4574 texlive-latex-geometry
4575 texlive-latex-graphics
4576 texlive-latex-hyperref
4577 texlive-latex-mdwtools
4578 texlive-latex-multirow
4579 texlive-latex-oberdiek
4580 texlive-latex-parskip
4581 texlive-latex-preview
4582 texlive-latex-tabulary
4583 texlive-latex-threeparttable
4584 texlive-latex-titlesec
4585 texlive-latex-trimspaces
4586 texlive-latex-ucs
4587 texlive-latex-upquote
4588 texlive-latex-url
4589 texlive-latex-varwidth
4590 texlive-latex-wrapfig)))
4591 ("texinfo" ,texinfo)))
4592 (arguments
4593 `(#:phases
4594 (modify-phases %standard-phases
4595 (add-after 'install 'install-doc
4596 (lambda* (#:key inputs outputs #:allow-other-keys)
4597 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4598 (doc (string-append data "/doc/" ,name "-" ,version))
4599 (html (string-append doc "/html"))
4600 (man1 (string-append data "/man/man1"))
4601 (info (string-append data "/info"))
4602 (examples (string-append doc "/examples"))
4603 (python-arg (string-append "PYTHON=" (which "python"))))
4604 (setenv "LANG" "en_US.utf8")
4605 ;; Make installed package available for running the tests
4606 (add-installed-pythonpath inputs outputs)
4607 (with-directory-excursion "docs"
4608 ;; FIXME: pdf fails to build
4609 ;;(system* "make" "pdf" "PAPER=a4")
4610 (system* "make" python-arg "html")
4611 (system* "make" python-arg "info"))
4612 (copy-recursively "docs/man" man1)
4613 (copy-recursively "examples" examples)
4614 (copy-recursively "docs/build/html" html)
4615 ;; (copy-file "docs/build/latex/ipython.pdf"
4616 ;; (string-append doc "/ipython.pdf"))
4617 (mkdir-p info)
4618 (copy-file "docs/build/texinfo/ipython.info"
4619 (string-append info "/ipython.info"))
4620 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
4621 #t))
4622 ;; Tests can only be run after the library has been installed and not
4623 ;; within the source directory.
4624 (delete 'check)
4625 (add-after 'install 'check
4626 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
4627 (if tests?
4628 (begin
4629 ;; Make installed package available for running the tests
4630 (add-installed-pythonpath inputs outputs)
4631 (setenv "HOME" "/tmp/") ;; required by a test
4632 ;; We only test the core because one of the other tests
4633 ;; tries to import ipykernel.
4634 (invoke "python" "IPython/testing/iptest.py"
4635 "-v" "IPython/core/tests"))
4636 #t)))
4637 (add-before 'check 'fix-tests
4638 (lambda* (#:key inputs #:allow-other-keys)
4639 (substitute* "./IPython/utils/_process_posix.py"
4640 (("/usr/bin/env', 'which") (which "which")))
4641 (substitute* "./IPython/core/tests/test_inputtransformer.py"
4642 (("#!/usr/bin/env python")
4643 (string-append "#!" (which "python"))))
4644 ;; Disable 1 failing test
4645 (substitute* "./IPython/core/tests/test_magic.py"
4646 (("def test_dirops\\(\\):" all)
4647 (string-append "@dec.skipif(True)\n" all)))
4648 ;; This test introduces a circular dependency on ipykernel
4649 ;; (which depends on ipython).
4650 (delete-file "IPython/core/tests/test_display.py")
4651 ;; These tests throw errors for unknown reasons.
4652 (delete-file "IPython/extensions/tests/test_storemagic.py")
4653 (delete-file "IPython/core/tests/test_displayhook.py")
4654 (delete-file "IPython/core/tests/test_interactiveshell.py")
4655 (delete-file "IPython/core/tests/test_pylabtools.py")
4656 (delete-file "IPython/core/tests/test_paths.py")
4657 #t)))))
4658 (home-page "https://ipython.org")
4659 (synopsis "IPython is a tool for interactive computing in Python")
4660 (description
4661 "IPython provides a rich architecture for interactive computing with:
4662Powerful interactive shells, a browser-based notebook, support for interactive
4663data visualization, embeddable interpreters and tools for parallel
4664computing.")
4665 (license license:bsd-3)
4666 (properties `((python2-variant . ,(delay python2-ipython))))))
4667
4668(define-public python2-ipython
4669 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
4670 (package
4671 (inherit ipython)
4672 ;; FIXME: add pyreadline once available.
4673 (propagated-inputs
4674 `(("python2-backports-shutil-get-terminal-size"
4675 ,python2-backports-shutil-get-terminal-size)
4676 ("python2-pathlib2" ,python2-pathlib2)
4677 ,@(package-propagated-inputs ipython)))
4678 (native-inputs
4679 `(("python2-mock" ,python2-mock)
4680 ,@(package-native-inputs ipython))))))
4681
4682(define-public python-urwid
4683 (package
4684 (name "python-urwid")
4685 (version "2.0.1")
4686 (source
4687 (origin
4688 (method url-fetch)
4689 (uri (pypi-uri "urwid" version))
4690 (sha256
4691 (base32
4692 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
4693 (build-system python-build-system)
4694 (home-page "http://urwid.org")
4695 (synopsis "Console user interface library for Python")
4696 (description
4697 "Urwid is a curses-based UI/widget library for Python. It includes many
4698features useful for text console applications.")
4699 (license license:lgpl2.1+)))
4700
4701(define-public python2-urwid
4702 (package-with-python2 python-urwid))
4703
4704(define-public python-urwidtrees
4705 (package
4706 (name "python-urwidtrees")
4707 (version "1.0.2")
4708 (source
4709 (origin
4710 (method url-fetch)
4711 ;; package author intends on distributing via github rather than pypi:
4712 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
4713 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
4714 version ".tar.gz"))
4715 (file-name (string-append name "-" version ".tar.gz"))
4716 (sha256
4717 (base32
4718 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
4719 (build-system python-build-system)
4720 (arguments
4721 '(#:tests? #f)) ; no tests
4722 (propagated-inputs `(("python-urwid" ,python-urwid)))
4723 (home-page "https://github.com/pazz/urwidtrees")
4724 (synopsis "Tree widgets for urwid")
4725 (description "Urwidtrees is a Widget Container API for the @code{urwid}
4726toolkit. Use it to build trees of widgets.")
4727 (license license:gpl3+)))
4728
4729(define-public python2-urwidtrees
4730 (package-with-python2 python-urwidtrees))
4731
4732(define-public python-ua-parser
4733 (package
4734 (name "python-ua-parser")
4735 (version "0.8.0")
4736 (source
4737 (origin
4738 (method url-fetch)
4739 (uri (pypi-uri "ua-parser" version))
4740 (sha256
4741 (base32
4742 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
4743 (build-system python-build-system)
4744 (arguments
4745 `(#:tests? #f)) ;no test suite in release
4746 (native-inputs
4747 `(("python-pyyaml" ,python-pyyaml)))
4748 (home-page "https://github.com/ua-parser/uap-python")
4749 (synopsis "User agent parser")
4750 (description
4751 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
4752 (license license:asl2.0)))
4753
4754(define-public python2-ua-parser
4755 (package-with-python2 python-ua-parser))
4756
4757(define-public python-user-agents
4758 (package
4759 (name "python-user-agents")
4760 (version "1.1.0")
4761 (source
4762 (origin
4763 (method url-fetch)
4764 (uri (pypi-uri "user-agents" version))
4765 (sha256
4766 (base32
4767 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
4768 (build-system python-build-system)
4769 (arguments
4770 `(#:tests? #f)) ;missing devices.json test file in release
4771 (propagated-inputs
4772 `(("python-ua-parser" ,python-ua-parser)))
4773 (home-page "https://github.com/selwin/python-user-agents")
4774 (synopsis "User Agent strings parsing library")
4775 (description
4776 "A library to identify devices (phones, tablets) and their capabilities by
4777parsing (browser/HTTP) user agent strings.")
4778 (license license:expat)))
4779
4780(define-public python2-user-agents
4781 (package-with-python2 python-user-agents))
4782
4783(define-public python-dbus
4784 (package
4785 (name "python-dbus")
4786 (version "1.2.8")
4787 (source
4788 (origin
4789 (method url-fetch)
4790 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
4791 "dbus-python-" version ".tar.gz"))
4792 (sha256
4793 (base32
4794 "0vvvjmiwnc9cjlks3gcdk43ap7llhlpz7cm1wbw0nc2yfsxjpwdb"))))
4795 (build-system gnu-build-system)
4796 (arguments
4797 '(#:phases
4798 (modify-phases %standard-phases
4799 (add-before
4800 'check 'pre-check
4801 (lambda _
4802 ;; XXX: For the missing '/etc/machine-id'.
4803 (substitute* "test/run-test.sh"
4804 (("DBUS_FATAL_WARNINGS=1")
4805 "DBUS_FATAL_WARNINGS=0"))
4806 #t)))))
4807 (native-inputs
4808 `(("pkg-config" ,pkg-config)))
4809 (inputs
4810 `(("python" ,python-wrapper)
4811 ("dbus-glib" ,dbus-glib)))
4812 (synopsis "Python bindings for D-bus")
4813 (description "python-dbus provides bindings for libdbus, the reference
4814implementation of D-Bus.")
4815 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
4816 (license license:expat)))
4817
4818(define-public python2-dbus
4819 (package (inherit python-dbus)
4820 (name "python2-dbus")
4821 (inputs `(("python" ,python-2)
4822 ,@(alist-delete "python"
4823 (package-inputs python-dbus)
4824 equal?)))
4825 ;; FIXME: on Python 2, the test_utf8 fails with:
4826 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
4827 (arguments `(#:tests? #f))))
4828
4829(define-public python-lxml
4830 (package
4831 (name "python-lxml")
4832 (version "4.2.5")
4833 (source
4834 (origin
4835 (method url-fetch)
4836 (uri (pypi-uri "lxml" version))
4837 (sha256
4838 (base32
4839 "0zw0y9hs0nflxhl9cs6ipwwh53szi3w2x06wl0k9cylyqac0cwin"))))
4840 (build-system python-build-system)
4841 (inputs
4842 `(("libxml2" ,libxml2)
4843 ("libxslt" ,libxslt)))
4844 (home-page "http://lxml.de/")
4845 (synopsis
4846 "Python XML processing library")
4847 (description
4848 "The lxml XML toolkit is a Pythonic binding for the C libraries
4849libxml2 and libxslt.")
4850 (license license:bsd-3))) ; and a few more, see LICENSES.txt
4851
4852(define-public python2-lxml
4853 (package-with-python2 python-lxml))
4854
4855;; beautifulsoup4 has a totally different namespace than 3.x,
4856;; and pypi seems to put it under its own name, so I guess we should too
4857(define-public python-beautifulsoup4
4858 (package
4859 (name "python-beautifulsoup4")
4860 (version "4.6.3")
4861 (source
4862 (origin
4863 (method url-fetch)
4864 (uri (pypi-uri "beautifulsoup4" version))
4865 (sha256
4866 (base32
4867 "041dhalzjciw6qyzzq7a2k4h1yvyk76xigp35hv5ibnn448ydy4h"))))
4868 (build-system python-build-system)
4869 (arguments
4870 `(#:phases
4871 (modify-phases %standard-phases
4872 ;; The Python 2 source is the definitive source of beautifulsoup4. We
4873 ;; must use this conversion script when building with Python 3. The
4874 ;; conversion script also runs the tests.
4875 ;; For more information, see the file 'convert-py3k' in the source
4876 ;; distribution.
4877 (replace 'check
dff0197e 4878 (lambda _ (invoke "./convert-py3k"))))))
44d10b1f
RW
4879 (home-page
4880 "https://www.crummy.com/software/BeautifulSoup/bs4/")
4881 (synopsis
4882 "Python screen-scraping library")
4883 (description
4884 "Beautiful Soup is a Python library designed for rapidly setting up
4885screen-scraping projects. It offers Pythonic idioms for navigating,
4886searching, and modifying a parse tree, providing a toolkit for
4887dissecting a document and extracting what you need. It automatically
4888converts incoming documents to Unicode and outgoing documents to UTF-8.")
4889 (license license:expat)
4890 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
4891
4892(define-public python2-beautifulsoup4
4893 (package
4894 (inherit (package-with-python2
4895 (strip-python2-variant python-beautifulsoup4)))
4896 (arguments `(#:python ,python-2))))
4897
4898(define-public python-netifaces
4899 (package
4900 (name "python-netifaces")
4901 (version "0.10.7")
4902 (source
4903 (origin
4904 (method url-fetch)
4905 (uri (pypi-uri "netifaces" version))
4906 (sha256
4907 (base32
4908 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
4909 (build-system python-build-system)
4910 (home-page "https://github.com/al45tair/netifaces")
4911 (synopsis
4912 "Python module for portable network interface information")
4913 (description
4914 "Netifaces is a Python module providing information on network
4915interfaces in an easy and portable manner.")
4916 (license license:expat)))
4917
4918(define-public python2-netifaces
4919 (package-with-python2 python-netifaces))
4920
4921(define-public python-networkx
4922 (package
4923 (name "python-networkx")
4924 (version "2.2")
4925 (source
4926 (origin
4927 (method url-fetch)
4928 (uri (pypi-uri "networkx" version ".zip"))
4929 (sha256
4930 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
4931 (build-system python-build-system)
4932 ;; python-decorator is needed at runtime.
4933 (propagated-inputs
4934 `(("python-decorator" ,python-decorator)))
4935 (native-inputs
4936 `(("python-nose" ,python-nose)
4937 ("unzip" ,unzip)))
4938 (home-page "https://networkx.github.io/")
4939 (synopsis "Python module for creating and manipulating graphs and networks")
4940 (description
4941 "NetworkX is a Python package for the creation, manipulation, and study
4942of the structure, dynamics, and functions of complex networks.")
4943 (license license:bsd-3)))
4944
4945(define-public python2-networkx
4946 (package-with-python2 python-networkx))
4947
4948(define-public python-datrie
4949 (package
4950 (name "python-datrie")
4951 (version "0.7.1")
4952 (source
4953 (origin
4954 (method url-fetch)
4955 (uri (pypi-uri "datrie" version))
4956 (sha256
4957 (base32
4958 "08r0if7dry2q7p34gf7ffyrlnf4bdvnprxgydlfxgfnvq8f3f4bs"))))
4959 (build-system python-build-system)
4960 (arguments
4961 `(#:phases (modify-phases %standard-phases
4962 (add-before 'build 'cythonize
4963 (lambda _
4964 ;; Regenerate Cython classes to solve ABI issues with Python
4965 ;; 3.7.0. See <https://github.com/pytries/datrie/issues/52>.
4966 (invoke "cython" "src/datrie.pyx" "src/cdatrie.pxd"
4967 "src/stdio_ext.pxd" "-a"))))))
4968 (native-inputs
4969 `(("python-cython" ,python-cython)
4970 ("python-hypothesis" ,python-hypothesis)
4971 ("python-pytest" ,python-pytest)
4972 ("python-pytest-runner" ,python-pytest-runner)))
4973 (home-page "https://github.com/kmike/datrie")
4974 (synopsis "Fast, efficiently stored trie for Python")
4975 (description
4976 "This package provides a fast, efficiently stored trie implementation for
4977Python.")
4978 (license license:lgpl2.1+)))
4979
4980(define-public snakemake
4981 (package
4982 (name "snakemake")
4983 (version "5.2.4")
4984 (source
4985 (origin
4986 (method url-fetch)
4987 (uri (pypi-uri "snakemake" version))
4988 (sha256
4989 (base32 "0gj0xxgiq3mp9qyyrbfzldiaq1giliqw0in64nqiz7vx49myqj7z"))))
4990 (build-system python-build-system)
4991 (arguments
4992 ;; TODO: Package missing test dependencies.
4993 '(#:tests? #f
4994 #:phases
4995 (modify-phases %standard-phases
4996 ;; For cluster execution Snakemake will call Python. Since there is
4997 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
4998 ;; this by calling the snakemake wrapper instead.
4999 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
5000 (lambda* (#:key outputs #:allow-other-keys)
5001 (substitute* "snakemake/executors.py"
5002 (("\\{sys.executable\\} -m snakemake")
5003 (string-append (assoc-ref outputs "out")
5004 "/bin/snakemake")))
5005 #t)))))
5006 (propagated-inputs
5007 `(("python-gitpython" ,python-gitpython)
5008 ("python-wrapt" ,python-wrapt)
5009 ("python-requests" ,python-requests)
5010 ("python-appdirs" ,python-appdirs)
5011 ("python-configargparse" ,python-configargparse)
5012 ("python-datrie" ,python-datrie)
5013 ("python-docutils" ,python-docutils)
5014 ("python-jinja2" ,python-jinja2)
5015 ("python-jsonschema" ,python-jsonschema)
5016 ("python-networkx" ,python-networkx)
5017 ("python-pyyaml" ,python-pyyaml)
5018 ("python-ratelimiter" ,python-ratelimiter)))
5019 (home-page "https://snakemake.readthedocs.io")
5020 (synopsis "Python-based execution environment for make-like workflows")
5021 (description
5022 "Snakemake aims to reduce the complexity of creating workflows by
5023providing a clean and modern domain specific specification language (DSL) in
5024Python style, together with a fast and comfortable execution environment.")
5025 (license license:expat)))
5026
5027;; This is currently needed for the pigx-* packages.
5028(define-public snakemake-4
5029 (package (inherit snakemake)
5030 (version "4.4.0")
5031 (source
5032 (origin
5033 (method url-fetch)
5034 (uri (pypi-uri "snakemake" version))
5035 (sha256
5036 (base32 "0g0paia4z7w3srnqdmavq3hrb2x7qnpf81jx50njl0p7y4y0j8jv"))))
5037 (propagated-inputs
5038 `(("python-wrapt" ,python-wrapt)
5039 ("python-requests" ,python-requests)
5040 ("python-appdirs" ,python-appdirs)
5041 ("python-configargparse" ,python-configargparse)
5042 ("python-pyyaml" ,python-pyyaml)
5043 ("python-ratelimiter" ,python-ratelimiter)))))
5044
5045(define-public python-pyqrcode
5046 (package
5047 (name "python-pyqrcode")
5048 (version "1.2.1")
5049 (source
5050 (origin
5051 (method url-fetch)
5052 (uri (pypi-uri "PyQRCode" version))
5053 (sha256
5054 (base32
5055 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
5056 (build-system python-build-system)
5057 (home-page
5058 "https://github.com/mnooner256/pyqrcode")
5059 (synopsis "QR code generator")
5060 (description
5061 "Pyqrcode is a QR code generator written purely in Python with
5062SVG, EPS, PNG and terminal output.")
5063 (license license:bsd-3)))
5064
5065(define-public python-seaborn
5066 (package
5067 (name "python-seaborn")
5068 (version "0.9.0")
5069 (source
5070 (origin
5071 (method url-fetch)
5072 (uri (pypi-uri "seaborn" version))
5073 (sha256
5074 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))))
5075 (build-system python-build-system)
5076 (arguments
5077 `(#:phases
5078 (modify-phases %standard-phases
5079 (add-before 'check 'start-xserver
5080 (lambda* (#:key inputs #:allow-other-keys)
5081 (let ((xorg-server (assoc-ref inputs "xorg-server")))
5082 ;; There must be a running X server and make check doesn't
5083 ;; start one. Therefore we must do it.
5084 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
5085 (setenv "DISPLAY" ":1")
5086 #t)))
5087 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
5088 (propagated-inputs
5089 `(("python-pandas" ,python-pandas)
5090 ("python-matplotlib" ,python-matplotlib)
5091 ("python-numpy" ,python-numpy)
5092 ("python-scipy" ,python-scipy)))
5093 (native-inputs
5094 `(("python-pytest" ,python-pytest)
5095 ("xorg-server" ,xorg-server)))
5096 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5097 (synopsis "Statistical data visualization")
5098 (description
5099 "Seaborn is a library for making attractive and informative statistical
5100graphics in Python. It is built on top of matplotlib and tightly integrated
5101with the PyData stack, including support for numpy and pandas data structures
5102and statistical routines from scipy and statsmodels.")
5103 (license license:bsd-3)))
5104
5105(define-public python2-seaborn
5106 (package-with-python2 python-seaborn))
5107
5108(define-public python-mpmath
5109 (package
5110 (name "python-mpmath")
5111 (version "0.19")
5112 (source (origin
5113 (method url-fetch)
5114 (uri (string-append "http://mpmath.org/files/mpmath-"
5115 version ".tar.gz"))
5116 (sha256
5117 (base32
5118 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
5119 (build-system python-build-system)
5120 (arguments
5121 '(#:phases
5122 (modify-phases %standard-phases
5123 (replace 'check
5124 (lambda _
5d7a6f1c 5125 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
44d10b1f
RW
5126 (home-page "http://mpmath.org")
5127 (synopsis "Arbitrary-precision floating-point arithmetic in python")
5128 (description
5129 "@code{mpmath} can be used as an arbitrary-precision substitute for
5130Python's float/complex types and math/cmath modules, but also does much
5131more advanced mathematics.")
5132 (license license:bsd-3)))
5133
5134(define-public python2-mpmath
5135 (package-with-python2 python-mpmath))
5136
5137(define-public python-bigfloat
5138 (package
5139 (name "python-bigfloat")
5140 (version "0.3.0")
5141 (source
5142 (origin
5143 (method url-fetch)
5144 (uri (pypi-uri "bigfloat" version))
5145 (sha256
5146 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
5147 (build-system python-build-system)
5148 (inputs
5149 `(("mpfr" ,mpfr)))
5150 (home-page "https://github.com/mdickinson/bigfloat")
5151 (synopsis "Arbitrary precision floating-point arithmetic for Python")
5152 (description
5153 "This packages provides a Python interface to the MPFR library for
5154multiprecision arithmetic.")
5155 (license license:lgpl3+)))
5156
5157(define-public python2-bigfloat
5158 (package-with-python2 python-bigfloat))
5159
5160(define-public python-sympy
5161 (package
5162 (name "python-sympy")
5163 (version "1.1.1")
5164 (source
5165 (origin
5166 (method url-fetch)
5167 (uri (string-append
5168 "https://github.com/sympy/sympy/releases/download/sympy-"
5169 version "/sympy-" version ".tar.gz"))
5170 (sha256
5171 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
5172 (build-system python-build-system)
5173 (arguments
5174 `(#:phases
5175 (modify-phases %standard-phases
5176 ;; Run the core tests after installation. By default it would run
5177 ;; *all* tests, which take a very long time to complete and are known
5178 ;; to be flaky.
5179 (delete 'check)
5180 (add-after 'install 'check
5181 (lambda* (#:key outputs #:allow-other-keys)
5182 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
5183 #t)))))
5184 (propagated-inputs
5185 `(("python-mpmath" ,python-mpmath)))
5186 (home-page "http://www.sympy.org/")
5187 (synopsis "Python library for symbolic mathematics")
5188 (description
5189 "SymPy is a Python library for symbolic mathematics. It aims to become a
5190full-featured computer algebra system (CAS) while keeping the code as simple
5191as possible in order to be comprehensible and easily extensible.")
5192 (license license:bsd-3)))
5193
5194(define-public python2-sympy
5195 (package
5196 (inherit (package-with-python2 python-sympy))
5197 (arguments
5198 `(#:phases
5199 (modify-phases %standard-phases
5200 ;; Run the core tests after installation. By default it would run
5201 ;; *all* tests, which take a very long time to complete and are known
5202 ;; to be flaky.
5203 (delete 'check)
5204 (add-after 'install 'check
5205 (lambda* (#:key outputs #:allow-other-keys)
5206 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
5207 #t)))))))
5208
5209(define-public python-q
5210 (package
5211 (name "python-q")
5212 (version "2.6")
5213 (source
5214 (origin
5215 (method url-fetch)
5216 (uri (pypi-uri "q" version))
5217 (sha256
5218 (base32
5219 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
5220 (build-system python-build-system)
5221 (home-page "https://github.com/zestyping/q")
5222 (synopsis "Quick-and-dirty debugging output for tired programmers")
5223 (description
5224 "q is a Python module for \"print\" style of debugging Python code. It
5225provides convenient short API for print out of values, tracebacks, and
5226falling into the Python interpreter.")
5227 (license license:asl2.0)))
5228
5229(define-public python2-q
5230 (package-with-python2 python-q))
5231
5232(define-public python2-xlib
5233 (package
5234 (name "python2-xlib")
5235 (version "0.14")
5236 (source (origin
5237 (method url-fetch)
5238 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
5239 "/" version "/"
5240 "python-xlib-" version ".tar.gz"))
5241 (sha256
5242 (base32
5243 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
5244 (build-system python-build-system)
5245 (arguments
5246 `(#:python ,python-2 ;Python 2 only
5247 #:tests? #f)) ;no tests
5248 (home-page "http://python-xlib.sourceforge.net/")
5249 (synopsis "Python X11 client library")
5250 (description
5251 "The Python X Library is intended to be a fully functional X client
5252library for Python programs. It is useful to implement low-level X clients.
5253It is written entirely in Python.")
5254 (license license:gpl2+)))
5255
5256(define-public python-singledispatch
5257 (package
5258 (name "python-singledispatch")
5259 (version "3.4.0.3")
5260 (source
5261 (origin
5262 (method url-fetch)
5263 (uri (pypi-uri "singledispatch" version))
5264 (sha256
5265 (base32
5266 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
5267 (build-system python-build-system)
5268 (native-inputs
5269 `(("python-six" ,python-six))) ; required for conversion, not at run-time
5270 (home-page
5271 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
5272 (synopsis "Backport of singledispatch feature from Python 3.4")
5273 (description
5274 "This library brings functools.singledispatch from Python 3.4 to Python
52752.6-3.3.")
5276 (license license:expat)))
5277
5278(define-public python2-singledispatch
5279 (package-with-python2 python-singledispatch))
5280
5281;; the python- version can be removed with python-3.5
5282(define-public python-backports-abc
5283 (package
5284 (name "python-backports-abc")
5285 (version "0.5")
5286 (source
5287 (origin
5288 (method url-fetch)
5289 (uri (pypi-uri "backports_abc" version))
5290 (sha256
5291 (base32
5292 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
5293 (build-system python-build-system)
5294 (home-page "https://github.com/cython/backports_abc")
5295 (synopsis "Backport of additions to the 'collections.abc' module")
5296 (description
5297 "Python-backports-abc provides a backport of additions to the
5298'collections.abc' module in Python-3.5.")
5299 (license license:psfl)))
5300
5301(define-public python2-backports-abc
5302 (package-with-python2 python-backports-abc))
5303
5304(define-public python-backports-csv
5305 (package
5306 (name "python-backports-csv")
5307 (version "1.0.5")
5308 (source
5309 (origin
5310 (method url-fetch)
5311 (uri (pypi-uri "backports.csv" version))
5312 (sha256
5313 (base32
5314 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
5315 (build-system python-build-system)
5316 (home-page "https://github.com/ryanhiebert/backports.csv")
5317 (synopsis "Backport of Python 3's csv module for Python 2")
5318 (description
5319 "Provides a backport of Python 3's @code{csv} module for parsing
5320comma separated values. The API of the @code{csv} module in Python 2
5321is drastically different from the @code{csv} module in Python 3.
5322This is due, for the most part, to the difference between str in
5323Python 2 and Python 3.")
5324 (license license:psfl)))
5325
5326(define-public python2-backports-csv
5327 (package-with-python2 python-backports-csv))
5328
5329(define-public python2-backports-shutil-get-terminal-size
5330 (package
5331 (name "python2-backports-shutil-get-terminal-size")
5332 (version "1.0.0")
5333 (source
5334 (origin
5335 (method url-fetch)
5336 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
5337 (sha256
5338 (base32
5339 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
5340 (build-system python-build-system)
5341 (arguments
5342 `(#:python ,python-2
5343 #:phases
5344 (modify-phases %standard-phases
5345 (replace 'check
5346 (lambda _
4a4a7d9a 5347 (invoke "py.test" "-v"))))))
44d10b1f
RW
5348 (native-inputs
5349 `(("python2-pytest" ,python2-pytest)))
5350 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
5351 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
5352 (description
5353 "This package provides a backport of the @code{get_terminal_size
5354function} from Python 3.3's @code{shutil}.
5355Unlike the original version it is written in pure Python rather than C,
5356so it might be a tiny bit slower.")
5357 (license license:expat)))
5358
5359(define-public python-waf
5360 (package
5361 (name "python-waf")
5362 (version "2.0.11")
5363 (source (origin
5364 (method url-fetch)
5365 (uri (string-append "https://waf.io/"
5366 "waf-" version ".tar.bz2"))
5367 (sha256
5368 (base32
5369 "13zrniwkmfqgsgzi9v5m1367fppp9yzrz6z2ny6hy8dmpb8mj4z4"))))
5370 (build-system python-build-system)
5371 (arguments
5372 '(#:phases
5373 (modify-phases %standard-phases
5374 (replace 'build
5375 (lambda _
5376 (invoke "python" "waf-light" "configure" "build")))
5377 (replace 'check
5378 (lambda _
5379 (invoke "python" "waf" "--version")))
5380 (replace 'install
5381 (lambda* (#:key outputs #:allow-other-keys)
5382 (let ((out (assoc-ref outputs "out")))
5383 (install-file "waf" (string-append out "/bin")))
5384 #t))
5385 ;; waf breaks when it is wrapped.
5386 (delete 'wrap))))
5387 (home-page "https://waf.io/")
5388 (synopsis "Python-based build system")
5389 (description
5390 "Waf is a Python-based framework for configuring, compiling and installing
5391applications.")
5392 (license license:bsd-3)))
5393
5394(define-public python2-waf
5395 (package-with-python2 python-waf))
5396
5397(define-public python-pyzmq
5398 (package
5399 (name "python-pyzmq")
5400 (version "17.1.2")
5401 (source
5402 (origin
5403 (method url-fetch)
5404 (uri (pypi-uri "pyzmq" version))
5405 (sha256
5406 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
5407 (build-system python-build-system)
5408 (arguments
5409 `(#:configure-flags
5410 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
5411 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
5412 ;; --inplace' for 'python setup.py test' to work.
5413 #:tests? #f))
5414 (inputs
5415 `(("zeromq" ,zeromq)))
5416 (native-inputs
5417 `(("pkg-config" ,pkg-config)
5418 ("python-nose" ,python-nose)))
5419 (home-page "https://github.com/zeromq/pyzmq")
5420 (synopsis "Python bindings for 0MQ")
5421 (description
5422 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
5423 (license license:bsd-4)))
5424
5425(define-public python2-pyzmq
5426 (package-with-python2 python-pyzmq))
5427
5428(define-public python-pep8
5429 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
5430 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
5431 ;; some dependents' test suites, and nothing more.
5432 (package
5433 (name "python-pep8")
5434 (version "1.7.0")
5435 (source
5436 (origin
5437 (method url-fetch)
5438 (uri (pypi-uri "pep8" version))
5439 (sha256
5440 (base32
5441 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
5442 (build-system python-build-system)
5443 (home-page "https://pep8.readthedocs.org/")
5444 (synopsis "Python style guide checker")
5445 (description
5446 "This tools checks Python code against some of the style conventions in
5447PEP 8.")
5448 (license license:expat)))
5449
5450(define-public python2-pep8
5451 (package-with-python2 python-pep8))
5452
5453(define-public python-pyflakes
5454 (package
5455 (name "python-pyflakes")
5456 (version "2.0.0")
5457 (source
5458 (origin
5459 (method url-fetch)
5460 (uri (pypi-uri "pyflakes" version))
5461 (sha256
5462 (base32
5463 "0jba28czyvimdc72llms3f17swp3i8jdcabf5w0j00adfbn64xls"))))
5464 (build-system python-build-system)
5465 (home-page
5466 "https://github.com/pyflakes/pyflakes")
5467 (synopsis "Passive checker of Python programs")
5468 (description
5469 "Pyflakes statically checks Python source code for common errors.")
5470 (license license:expat)))
5471
5472(define-public python2-pyflakes
5473 (package-with-python2 python-pyflakes))
5474
5475(define-public python-mccabe
5476 (package
5477 (name "python-mccabe")
5478 (version "0.6.1")
5479 (source
5480 (origin
5481 (method url-fetch)
5482 (uri (pypi-uri "mccabe" version))
5483 (sha256
5484 (base32
5485 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
5486 (build-system python-build-system)
5487 (native-inputs
5488 `(("python-pytest" ,python-pytest-bootstrap)
5489 ("python-pytest-runner" ,python-pytest-runner)))
5490 (home-page "https://github.com/flintwork/mccabe")
5491 (synopsis "McCabe checker, plugin for flake8")
5492 (description
5493 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
5494complexity of Python source code.")
5495 (license license:expat)))
5496
5497(define-public python2-mccabe
5498 (package-with-python2 python-mccabe))
5499
5500(define-public python-mccabe-0.2.1
5501 (package (inherit python-mccabe)
5502 (version "0.2.1")
5503 (source
5504 (origin
5505 (method url-fetch)
5506 (uri (pypi-uri "mccabe" version))
5507 (sha256
5508 (base32
5509 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
5510
5511(define-public python2-mccabe-0.2.1
5512 (package-with-python2 python-mccabe-0.2.1))
5513
5514;; Flake8 2.4.1 requires an older version of pep8.
5515;; This should be removed ASAP.
5516(define-public python-pep8-1.5.7
5517 (package (inherit python-pep8)
5518 (version "1.5.7")
5519 (source
5520 (origin
5521 (method url-fetch)
5522 (uri (string-append
5523 "https://pypi.python.org/packages/source/p/pep8/pep8-"
5524 version
5525 ".tar.gz"))
5526 (sha256
5527 (base32
5528 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
5529 (arguments
5530 ;; XXX Tests not compatible with Python 3.5.
5531 '(#:tests? #f))))
5532
5533(define-public python2-pep8-1.5.7
5534 (package-with-python2 python-pep8-1.5.7))
5535
5536;; Flake8 2.4.1 requires an older version of pyflakes.
5537;; This should be removed ASAP.
5538(define-public python-pyflakes-0.8.1
5539 (package (inherit python-pyflakes)
5540 (version "0.8.1")
5541 (source
5542 (origin
5543 (method url-fetch)
5544 (uri (string-append
5545 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
5546 version
5547 ".tar.gz"))
5548 (sha256
5549 (base32
5550 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
5551 (arguments
5552 ;; XXX Tests not compatible with Python 3.5.
5553 '(#:tests? #f))))
5554
5555(define-public python2-pyflakes-0.8.1
5556 (package-with-python2 python-pyflakes-0.8.1))
5557
5558;; This package is used by hypothesis which has thousands of dependent packages.
5559;; FIXME: Consolidate this with "python-flake8" below in the next rebuild cycle.
5560(define-public python-flake8-3.5
5561 (package
5562 (name "python-flake8")
5563 (version "3.5.0")
5564 (source
5565 (origin
5566 (method url-fetch)
5567 (uri (pypi-uri "flake8" version))
5568 (sha256
5569 (base32
5570 "184b33grvvjmiwlv9kyd7yng9qv5ld24154j70z332xxg9gjclvj"))))
5571 (build-system python-build-system)
5572 (arguments
5573 `(#:phases
5574 (modify-phases %standard-phases
5575 ;; Two errors don't seem to have assigned codes.
5576 (add-after 'unpack 'delete-broken-test
5577 (lambda _ (delete-file "tests/unit/test_pyflakes_codes.py") #t))
5578 (add-after 'unpack 'fix-problem-with-pycodestyle
5579 (lambda _
5580 ;; See https://gitlab.com/pycqa/flake8/merge_requests/230
5581 ;; This should no longer be needed with the next release.
5582 (substitute* "setup.py"
5583 (("PEP8_PLUGIN\\('break_around_binary_operator'\\),")
5584 "PEP8_PLUGIN('break_after_binary_operator'),\
5585PEP8_PLUGIN('break_before_binary_operator'),"))
5586 #t))
5587 (delete 'check)
5588 (add-after 'install 'check
5589 (lambda* (#:key inputs outputs #:allow-other-keys)
5590 (add-installed-pythonpath inputs outputs)
5591 (invoke "pytest" "-v")
5592 #t)))))
5593 (propagated-inputs
5594 `(("python-pycodestyle" ,python-pycodestyle)
5595 ("python-pyflakes" ,python-pyflakes)
5596 ("python-mccabe" ,python-mccabe)))
5597 (native-inputs
5598 `(("python-mock" ,python-mock)
5599 ("python-pytest" ,python-pytest-bootstrap)
5600 ("python-pytest-runner" ,python-pytest-runner)))
5601 (home-page "https://gitlab.com/pycqa/flake8")
5602 (synopsis
5603 "The modular source code checker: pep8, pyflakes and co")
5604 (description
5605 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
5606 (properties `((python2-variant . ,(delay python2-flake8-3.5))))
5607 (license license:expat)))
5608
5609(define-public python2-flake8-3.5
5610 (let ((base (package-with-python2 (strip-python2-variant python-flake8-3.5))))
5611 (package (inherit base)
5612 (propagated-inputs
5613 `(("python2-configparser" ,python2-configparser)
5614 ("python2-enum34" ,python2-enum34)
5615 ,@(package-propagated-inputs base))))))
5616
5617;; Version 3.5.0 has compatibility issues with Pyflakes 2.0, so we need
5618;; this newer version. Keep it as a separate variable for now to avoid
5619;; rebuilding "python-hypothesis"; this should be removed in the next
5620;; rebuild cycle.
5621(define-public python-flake8
5622 (package
5623 (inherit python-flake8-3.5)
5624 (version "3.6.0")
5625 (source (origin
5626 (method url-fetch)
5627 (uri (pypi-uri "flake8" version))
5628 (sha256
5629 (base32
5630 "0w0nprx22rbvrrkbfx9v5jc5gskbm08g219l7r8wai8zfswgadba"))))
5631 (arguments
5632 (substitute-keyword-arguments (package-arguments python-flake8-3.5)
5633 ((#:phases phases)
5634 `(modify-phases ,phases
5635 (delete 'delete-broken-test)
5636 (delete 'fix-problem-with-pycodestyle)))))
5637 (properties `((python2-variant . ,(delay python2-flake8))))))
5638
5639(define-public python2-flake8
5640 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
5641 (package (inherit base)
5642 (propagated-inputs
5643 (package-propagated-inputs python2-flake8-3.5)))))
5644
5645;; python-hacking requires flake8 <2.6.0.
5646(define-public python-flake8-2.5
5647 (package
5648 (inherit python-flake8)
5649 (version "2.5.5")
5650 (source (origin
5651 (method url-fetch)
5652 (uri (pypi-uri "flake8" version))
5653 (sha256
5654 (base32
5655 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
5656 (propagated-inputs
5657 `(("python-pep8" ,python-pep8)
5658 ,@(package-propagated-inputs python-flake8)))
5659 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
5660
5661(define-public python2-flake8-2.5
5662 (package
5663 (inherit python2-flake8)
5664 (version (package-version python-flake8-2.5))
5665 (source (origin
5666 (inherit (package-source python-flake8-2.5))))
5667 (propagated-inputs
5668 `(("python2-pep8" ,python2-pep8)
5669 ,@(package-propagated-inputs python2-flake8)))))
5670
5671(define-public python-flake8-polyfill
5672 (package
5673 (name "python-flake8-polyfill")
5674 (version "1.0.2")
5675 (source
5676 (origin
5677 (method url-fetch)
5678 (uri (pypi-uri "flake8-polyfill" version))
5679 (sha256
5680 (base32
5681 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
5682 (build-system python-build-system)
5683 (arguments
5684 '(#:phases
5685 (modify-phases %standard-phases
5686 (replace 'check
5687 (lambda _
5688 (setenv "PYTHONPATH"
5689 (string-append (getcwd) "/build/lib:"
5690 (getenv "PYTHONPATH")))
4f0a0894 5691 (invoke "py.test" "-v"))))))
44d10b1f
RW
5692 (native-inputs
5693 `(("python-flake8" ,python-flake8)
5694 ("python-mock" ,python-mock)
5695 ("python-pep8" ,python-pep8)
5696 ("python-pycodestyle" ,python-pycodestyle)
5697 ("python-pytest" ,python-pytest)))
5698 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
5699 (synopsis "Polyfill package for Flake8 plugins")
5700 (description
5701 "This package that provides some compatibility helpers for Flake8
5702plugins that intend to support Flake8 2.x and 3.x simultaneously.")
5703 (license license:expat)))
5704
5705(define-public python2-flake8-polyfill
5706 (package-with-python2 python-flake8-polyfill))
5707
5708(define-public python-mistune
5709 (package
5710 (name "python-mistune")
5711 (version "0.8.4")
5712 (source
5713 (origin
5714 (method url-fetch)
5715 (uri (pypi-uri "mistune" version))
5716 (sha256
5717 (base32
5718 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
5719 (build-system python-build-system)
5720 (native-inputs
5721 `(("python-nose" ,python-nose)
5722 ("python-cython" ,python-cython)))
5723 (home-page "https://github.com/lepture/mistune")
5724 (synopsis "Markdown parser in pure Python")
5725 (description "This package provides a fast markdown parser in pure
5726Python.")
5727 (license license:bsd-3)))
5728
5729(define-public python2-mistune
5730 (package-with-python2 python-mistune))
5731
5732(define-public python-markdown
5733 (package
5734 (name "python-markdown")
5735 (version "3.0.1")
5736 (source
5737 (origin
5738 (method url-fetch)
5739 (uri (pypi-uri "Markdown" version))
5740 (sha256
5741 (base32
5742 "0z6v8649sr434d5r5zmrhydka7v7f9yas4bwcgkcs0650jdhybnh"))))
5743 (build-system python-build-system)
5744 (native-inputs
5745 `(("python-nose" ,python-nose)
5746 ("python-pyyaml" ,python-pyyaml)))
5747 (home-page "https://python-markdown.github.io/")
5748 (synopsis "Python implementation of Markdown")
5749 (description
5750 "This package provides a Python implementation of John Gruber's
5751Markdown. The library features international input, various Markdown
5752extensions, and several HTML output formats. A command line wrapper
5753markdown_py is also provided to convert Markdown files to HTML.")
5754 (license license:bsd-3)))
5755
5756(define-public python2-markdown
5757 (package-with-python2 python-markdown))
5758
5759(define-public python-ptyprocess
5760 (package
5761 (name "python-ptyprocess")
5762 (version "0.5.2")
5763 (source
5764 (origin
5765 (method url-fetch)
5766 (uri (pypi-uri "ptyprocess" version))
5767 (sha256
5768 (base32
5769 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
5770 (build-system python-build-system)
5771 (native-inputs
5772 `(("python-nose" ,python-nose)))
5773 (arguments
5774 `(#:phases
5775 (modify-phases %standard-phases
5776 (replace 'check
7904d6fa 5777 (lambda _ (invoke "nosetests"))))))
44d10b1f
RW
5778 (home-page "https://github.com/pexpect/ptyprocess")
5779 (synopsis "Run a subprocess in a pseudo terminal")
5780 (description
5781 "This package provides a Python library used to launch a subprocess in a
5782pseudo terminal (pty), and interact with both the process and its pty.")
5783 (license license:isc)))
5784
5785(define-public python2-ptyprocess
5786 (package-with-python2 python-ptyprocess))
5787
5788(define-public python-cram
5789 (package
5790 (name "python-cram")
5791 (version "0.7")
5792 (home-page "https://bitheap.org/cram/")
5793 (source (origin
5794 (method url-fetch)
5795 (uri (list (string-append home-page "cram-"
5796 version ".tar.gz")
5797 (pypi-uri "cram" version)))
5798 (sha256
5799 (base32
5800 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
5801 (arguments
5802 '(#:phases
5803 (modify-phases %standard-phases
5804 (add-after 'unpack 'patch-source
5805 (lambda _
5806 (substitute* (find-files "cram" ".*\\.py$")
5807 ;; Replace default shell path.
5808 (("/bin/sh") (which "sh")))
5809 (substitute* (find-files "tests" ".*\\.t$")
5810 (("md5") "md5sum")
5811 (("/bin/bash") (which "bash"))
5812 (("/bin/sh") (which "sh")))
5813 (substitute* "cram/_test.py"
5814 ;; This hack works around a bug triggered by substituting
5815 ;; the /bin/sh paths. "tests/usage.t" compares the output of
5816 ;; "cram -h", which breaks the output at 80 characters. This
5817 ;; causes the line showing the default shell to break into two
5818 ;; lines, but the test expects a single line...
5819 (("env\\['COLUMNS'\\] = '80'")
5820 "env['COLUMNS'] = '160'"))
5821 #t))
5822 (delete 'check)
5823 (add-after 'install 'check
5824 ;; The test phase uses the built library and executable.
5825 ;; It's easier to run it after install since the build
5826 ;; directory contains version-specific PATH.
5827 (lambda* (#:key inputs outputs #:allow-other-keys)
5828 (add-installed-pythonpath inputs outputs)
5829 (setenv "PATH" (string-append (getenv "PATH") ":"
5830 (assoc-ref outputs "out") "/bin"))
2d7db192 5831 (invoke "make" "test"))))))
44d10b1f
RW
5832 (build-system python-build-system)
5833 (native-inputs
5834 `(("python-coverage" ,python-coverage)
5835 ("which" ,which)))
5836 (synopsis "Simple testing framework for command line applications")
5837 (description
5838 "Cram is a functional testing framework for command line applications.
5839Cram tests look like snippets of interactive shell sessions. Cram runs each
5840command and compares the command output in the test with the command’s actual
5841output.")
5842 (license license:gpl2+)))
5843
5844(define-public python2-cram
5845 (package-with-python2 python-cram))
5846
5847(define-public python-straight-plugin
5848 (package
5849 (name "python-straight-plugin")
5850 (version "1.4.1")
5851 (source
5852 (origin
5853 (method url-fetch)
5854 (uri (pypi-uri "straight.plugin" version))
5855 (sha256
5856 (base32
5857 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
5858 (build-system python-build-system)
5859 (home-page "https://github.com/ironfroggy/straight.plugin")
5860 (synopsis "Simple namespaced plugin facility")
5861 (description "Straight Plugin provides a type of plugin you can create from
5862almost any existing Python modules, and an easy way for outside developers to
5863add functionality and customization to your projects with their own plugins.")
5864 (license license:expat)))
5865
5866(define-public python2-straight-plugin
5867 (package-with-python2 python-straight-plugin))
5868
5869(define-public python-fonttools
5870 (package
5871 (name "python-fonttools")
5872 (version "3.28.0")
5873 (source (origin
5874 (method url-fetch)
5875 (uri (pypi-uri "fonttools" version ".zip"))
5876 (sha256
5877 (base32
5878 "0vsvjhidpb5kywpjgz1j3fywzkddxkb0afqai18qa3h6lqjyxwpb"))))
5879 (build-system python-build-system)
5880 (native-inputs
5881 `(("unzip" ,unzip)
5882 ("python-pytest" ,python-pytest)
5883 ("python-pytest-runner" ,python-pytest-runner)))
5884 (home-page "https://github.com/behdad/fonttools")
5885 (synopsis "Tools to manipulate font files")
5886 (description
5887 "FontTools/TTX is a library to manipulate font files from Python. It
5888supports reading and writing of TrueType/OpenType fonts, reading and writing
5889of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
5890also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
5891from an XML-based format.")
5892 (license license:expat)))
5893
5894(define-public python2-fonttools
5895 (package-with-python2 python-fonttools))
5896
5897(define-public python-ly
5898 (package
5899 (name "python-ly")
5900 (version "0.9.5")
5901 (source
5902 (origin
5903 (method url-fetch)
5904 (uri (pypi-uri name version))
5905 (sha256
5906 (base32
5907 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
5908 (build-system python-build-system)
5909 (arguments
5910 ;; FIXME: Some tests need network access.
5911 '(#:tests? #f))
5912 (synopsis "Tool and library for manipulating LilyPond files")
5913 (description "This package provides a Python library to parse, manipulate
5914or create documents in LilyPond format. A command line program ly is also
5915provided that can be used to do various manipulations with LilyPond files.")
5916 (home-page "https://pypi.python.org/pypi/python-ly")
5917 (license license:gpl2+)))
5918
5919(define-public python-appdirs
5920 (package
5921 (name "python-appdirs")
5922 (version "1.4.3")
5923 (source
5924 (origin
5925 (method url-fetch)
5926 (uri (pypi-uri "appdirs" version))
5927 (sha256
5928 (base32
5929 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
5930 (build-system python-build-system)
5931 (home-page "https://github.com/ActiveState/appdirs")
5932 (synopsis
5933 "Determine platform-specific dirs, e.g. a \"user data dir\"")
5934 (description
5935 "This module provides a portable way of finding out where user data
5936should be stored on various operating systems.")
5937 (license license:expat)))
5938
5939(define-public python2-appdirs
5940 (package-with-python2 python-appdirs))
5941
5942(define-public python-llfuse
5943 (package
5944 (name "python-llfuse")
5945 (version "1.3.5")
5946 (source (origin
5947 (method url-fetch)
5948 (uri (pypi-uri "llfuse" version ".tar.bz2"))
5949 (sha256
5950 (base32
5951 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
5952 (build-system python-build-system)
5953 (inputs
5954 `(("fuse" ,fuse)
5955 ("attr" ,attr)))
5956 (native-inputs
5957 `(("pkg-config" ,pkg-config)))
5958 (synopsis "Python bindings for FUSE")
5959 (description
5960 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
5961 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
5962 (license license:lgpl2.0+)
5963 (properties `((python2-variant . ,(delay python2-llfuse))))))
5964
5965(define-public python2-llfuse
5966 (package (inherit (package-with-python2
5967 (strip-python2-variant python-llfuse)))
5968 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
5969
5970;; For attic-0.16
5971(define-public python-llfuse-0.41
5972 (package (inherit python-llfuse)
5973 (version "0.41.1")
5974 (source (origin
5975 (method url-fetch)
5976 (uri (string-append
5977 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
5978 "llfuse-" version ".tar.bz2"))
5979 (sha256
5980 (base32
5981 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
5982 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
5983 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
5984 (license (list license:expat license:lgpl2.0+))))
5985
5986(define-public python-msgpack
5987 (package
5988 (name "python-msgpack")
5989 (version "0.5.6")
5990 (source (origin
5991 (method url-fetch)
5992 (uri (pypi-uri "msgpack" version))
5993 (sha256
5994 (base32
5995 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
5996 (build-system python-build-system)
5997 (arguments
5998 `(#:modules ((guix build utils)
5999 (guix build python-build-system)
6000 (ice-9 ftw)
6001 (srfi srfi-1)
6002 (srfi srfi-26))
6003 #:phases
6004 (modify-phases %standard-phases
6005 (replace 'check
6006 (lambda _
6007 (let ((cwd (getcwd)))
6008 (setenv "PYTHONPATH"
6009 (string-append cwd "/build/"
6010 (find (cut string-prefix? "lib" <>)
6011 (scandir (string-append cwd "/build")))
6012 ":"
6013 (getenv "PYTHONPATH")))
6014 (invoke "pytest" "-v" "test")))))))
6015 (native-inputs
6016 `(("python-pytest" ,python-pytest)))
6017 (synopsis "MessagePack (de)serializer")
6018 (description "MessagePack is a fast, compact binary serialization format,
6019suitable for similar data to JSON. This package provides CPython bindings for
6020reading and writing MessagePack data.")
6021 (home-page "https://pypi.python.org/pypi/msgpack/")
6022 (license license:asl2.0)))
6023
6024;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
6025;; release 0.5. Some packages like borg still call it by the old name for now.
6026;; <https://bugs.gnu.org/30662>
6027(define-public python-msgpack-transitional
6028 (package
6029 (inherit python-msgpack)
6030 (name "python-msgpack-transitional")
6031 (arguments
6032 (substitute-keyword-arguments (package-arguments python-msgpack)
6033 ((#:phases phases)
6034 `(modify-phases ,phases
6035 (add-after 'unpack 'configure-transitional
6036 (lambda _
6037 ;; Keep using the old name.
6038 (substitute* "setup.py"
6039 (("TRANSITIONAL = False")
6040 "TRANSITIONAL = 1"))
6041 #t))))))))
6042
6043(define-public python2-msgpack
6044 (package-with-python2 python-msgpack))
6045
6046(define-public python-netaddr
6047 (package
6048 (name "python-netaddr")
6049 (version "0.7.19")
6050 (source
6051 (origin
6052 (method url-fetch)
6053 (uri (pypi-uri "netaddr" version))
6054 (sha256
6055 (base32
6056 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
6057 (build-system python-build-system)
6058 (arguments `(#:tests? #f)) ;; No tests.
6059 (home-page "https://github.com/drkjam/netaddr/")
6060 (synopsis "Pythonic manipulation of network addresses")
6061 (description
6062 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6063and MAC network addresses.")
6064 (license license:bsd-3)))
6065
6066(define-public python2-netaddr
6067 (package-with-python2 python-netaddr))
6068
6069(define-public python-wrapt
6070 (package
6071 (name "python-wrapt")
dddd7a75 6072 (version "1.11.1")
44d10b1f
RW
6073 (source
6074 (origin
6075 (method url-fetch)
6076 (uri (pypi-uri "wrapt" version))
6077 (sha256
6078 (base32
dddd7a75 6079 "0cqmysny1pz01jw26q48q5zasvns6507rwhgm6wcw743f0r01sja"))))
44d10b1f
RW
6080 (build-system python-build-system)
6081 (arguments
6082 ;; Tests are not included in the tarball, they are only available in the
6083 ;; git repository.
6084 `(#:tests? #f))
6085 (home-page "https://github.com/GrahamDumpleton/wrapt")
6086 (synopsis "Module for decorators, wrappers and monkey patching")
6087 (description
6088 "The aim of the wrapt module is to provide a transparent object proxy for
6089 Python, which can be used as the basis for the construction of function
6090 wrappers and decorator functions.")
6091 (license license:bsd-2)))
6092
6093(define-public python2-wrapt
6094 (package-with-python2 python-wrapt))
6095
6096(define-public python-xlrd
6097 (package
6098 (name "python-xlrd")
6099 (version "1.0.0")
6100 (source (origin
6101 (method url-fetch)
6102 (uri (pypi-uri "xlrd" version))
6103 (sha256
6104 (base32
6105 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
6106 (build-system python-build-system)
6107 (arguments
6108 `(#:phases
6109 (modify-phases %standard-phases
6110 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
6111 ;; run tests instead for now.
45fd0081 6112 (replace 'check (lambda _ (invoke "nosetests"))))))
44d10b1f
RW
6113 (native-inputs `(("python-nose" ,python-nose)))
6114 (home-page "http://www.python-excel.org/")
6115 (synopsis "Library for extracting data from Excel files")
6116 (description "This packages provides a library to extract data from
6117spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
6118@samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
6119Unicode-aware. It is not intended as an end-user tool.")
6120 (license license:bsd-3)))
6121
6122(define-public python2-xlrd
6123 (package-with-python2 python-xlrd))
6124
6125(define-public python-prettytable
6126 (package
6127 (name "python-prettytable")
6128 (version "0.7.2")
6129 (source
6130 (origin
6131 (method url-fetch)
6132 (uri (string-append
6133 "https://pypi.python.org/packages/source/P/PrettyTable/"
6134 "prettytable-" version ".tar.bz2"))
6135 (sha256
6136 (base32
6137 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
6138 (build-system python-build-system)
6139 (home-page "http://code.google.com/p/prettytable/")
6140 (synopsis "Display tabular data in an ASCII table format")
6141 (description
6142 "A library designed to represent tabular data in visually appealing ASCII
6143tables. PrettyTable allows for selection of which columns are to be printed,
6144independent alignment of columns (left or right justified or centred) and
6145printing of sub-tables by specifying a row range.")
6146 (license license:bsd-3)))
6147
6148(define-public python2-prettytable
6149 (package-with-python2 python-prettytable))
6150
6151(define-public python-tables
6152 (package
6153 (name "python-tables")
6154 (version "3.4.4")
6155 (source
6156 (origin
6157 (method url-fetch)
6158 (uri (pypi-uri "tables" version))
6159 (sha256
6160 (base32
6161 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
6162 (modules '((guix build utils)))
6163 (snippet
6164 '(begin
6165 ;; Remove pre-compiled .pyc files from source.
6166 (for-each delete-file-recursively
6167 (find-files "." "__pycache__" #:directories? #t))
6168 (for-each delete-file (find-files "." "\\.pyc$"))
6169 #t))))
6170 (build-system python-build-system)
6171 (arguments
6172 `(;; FIXME: python-build-system does not pass configure-flags to "build"
6173 ;; or "check", so we must override the build and check phases.
6174 #:phases
6175 (modify-phases %standard-phases
6176 (add-after 'unpack 'use-gcc
6177 (lambda _
6178 (substitute* "setup.py"
6179 (("compiler = new_compiler\\(\\)" line)
6180 (string-append line
6181 "\ncompiler.set_executables(compiler='gcc',"
6182 "compiler_so='gcc',"
6183 "linker_exe='gcc',"
6184 "linker_so='gcc -shared')")))
6185 #t))
6186 (replace 'build
6187 (lambda* (#:key inputs #:allow-other-keys)
35d79d61
RW
6188 (invoke "python" "setup.py" "build"
6189 (string-append "--hdf5="
6190 (assoc-ref inputs "hdf5")))))
44d10b1f
RW
6191 (replace 'check
6192 (lambda* (#:key inputs #:allow-other-keys)
35d79d61
RW
6193 (invoke "python" "setup.py" "check"
6194 (string-append "--hdf5="
6195 (assoc-ref inputs "hdf5"))))))))
44d10b1f
RW
6196 (propagated-inputs
6197 `(("python-numexpr" ,python-numexpr)
6198 ("python-numpy" ,python-numpy)))
6199 (native-inputs
6200 `(("python-cython" ,python-cython)
6201 ("pkg-config" ,pkg-config)))
6202 (inputs
6203 `(("hdf5" ,hdf5)
6204 ("bzip2" ,bzip2)
6205 ("zlib" ,zlib)))
6206 (home-page "http://www.pytables.org/")
6207 (synopsis "Hierarchical datasets for Python")
6208 (description "PyTables is a package for managing hierarchical datasets and
6209designed to efficiently cope with extremely large amounts of data.")
6210 (license license:bsd-3)))
6211
6212(define-public python2-tables
6213 (package-with-python2 python-tables))
6214
6215(define-public python-pyasn1
6216 (package
6217 (name "python-pyasn1")
6218 (version "0.4.3")
6219 (source
6220 (origin
6221 (method url-fetch)
6222 (uri (pypi-uri "pyasn1" version))
6223 (sha256
6224 (base32
6225 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
6226 (build-system python-build-system)
6227 (home-page "http://pyasn1.sourceforge.net/")
6228 (synopsis "ASN.1 types and codecs")
6229 (description
6230 "This is an implementation of ASN.1 types and codecs in Python. It is
6231suitable for a wide range of protocols based on the ASN.1 specification.")
6232 (license license:bsd-2)))
6233
6234(define-public python2-pyasn1
6235 (package-with-python2 python-pyasn1))
6236
6237(define-public python-pyasn1-modules
6238 (package
6239 (name "python-pyasn1-modules")
6240 (version "0.2.2")
6241 (source
6242 (origin
6243 (method url-fetch)
6244 (uri (pypi-uri "pyasn1-modules" version))
6245 (sha256
6246 (base32
6247 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
6248 (build-system python-build-system)
6249 (propagated-inputs
6250 `(("python-pyasn1" ,python-pyasn1)))
6251 (home-page "https://sourceforge.net/projects/pyasn1/")
6252 (synopsis "ASN.1 codec implementations")
6253 (description
6254 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
6255implementations of ASN.1-based codecs and protocols.")
6256 (license license:bsd-3)))
6257
6258(define-public python2-pyasn1-modules
6259 (package-with-python2 python-pyasn1-modules))
6260
6261(define-public python-ipaddress
6262 (package
6263 (name "python-ipaddress")
6264 (version "1.0.22")
6265 (source (origin
6266 (method url-fetch)
6267 (uri (pypi-uri "ipaddress" version))
6268 (sha256
6269 (base32
6270 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
6271 (build-system python-build-system)
6272 (home-page "https://github.com/phihag/ipaddress")
6273 (synopsis "IP address manipulation library")
6274 (description
6275 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
6276 in Python. This library is used to create, poke at, and manipulate IPv4 and
6277 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
6278 module to older versions of Python.")
6279 (license license:psfl)))
6280
6281(define-public python2-ipaddress
6282 (package-with-python2 python-ipaddress))
6283
6284(define-public python2-ipaddr
6285 (package
6286 (name "python2-ipaddr")
6287 (version "2.1.11")
6288 (source
6289 (origin
6290 (method url-fetch)
6291 (uri (pypi-uri "ipaddr" version))
6292 (sha256
6293 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
6294 (build-system python-build-system)
6295 (arguments
6296 `(#:python ,python-2 ;version 2 only
6297 #:phases
6298 (modify-phases %standard-phases
6299 (replace 'check
40b8c4e3 6300 (lambda _ (invoke "python" "ipaddr_test.py"))))))
44d10b1f
RW
6301 (home-page "https://github.com/google/ipaddr-py")
6302 (synopsis "IP address manipulation library")
6303 (description
6304 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
6305IPv6 addresses and networks.
6306
6307For new implementations you may prefer to use the standard module
6308@code{ipaddress}, which was introduced in Python 3.3 and backported to older
6309versions of Python.")
6310 (license license:asl2.0)))
6311
6312(define-public python-idna
6313 (package
6314 (name "python-idna")
6315 (version "2.7")
6316 (source
6317 (origin
6318 (method url-fetch)
6319 (uri (pypi-uri "idna" version))
6320 (sha256
6321 (base32
6322 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))
6323 (build-system python-build-system)
6324 (home-page "https://github.com/kjd/idna")
6325 (synopsis "Internationalized domain names in applications")
6326 (description
6327 "This is a library to support the Internationalised Domain Names in
6328Applications (IDNA) protocol as specified in RFC 5891. This version of the
6329protocol is often referred to as “IDNA2008” and can produce different results
6330from the earlier standard from 2003. The library is also intended to act as a
6331suitable drop-in replacement for the “encodings.idna” module that comes with
6332the Python standard library but currently only supports the older 2003
6333specification.")
6334 (license license:bsd-4)))
6335
6336(define-public python2-idna
6337 (package-with-python2 python-idna))
6338
6339(define-public python-idna-ssl
6340 (package
6341 (name "python-idna-ssl")
6342 (version "1.0.1")
6343 (source
6344 (origin
6345 (method url-fetch)
6346 (uri (pypi-uri "idna-ssl" version))
6347 (sha256
6348 (base32
6349 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
6350 (build-system python-build-system)
6351 (arguments
6352 `(#:tests? #f)) ;circular dependency with python-aiohttp
6353 (home-page "https://github.com/aio-libs/idna-ssl")
6354 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
6355 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
6356domains support.")
6357 (license license:expat)))
6358
6359(define-public python-pretend
6360 (package
6361 (name "python-pretend")
6362 (version "1.0.9")
6363 (source
6364 (origin
6365 (method url-fetch)
6366 (uri (string-append "https://pypi.python.org/packages/source/p/"
6367 "pretend/pretend-" version ".tar.gz"))
6368 (sha256
6369 (base32
6370 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
6371 (build-system python-build-system)
6372 (home-page "https://github.com/alex/pretend")
6373 (synopsis "Library for stubbing in Python")
6374 (description
6375 "Pretend is a library to make stubbing with Python easier. Stubbing is a
6376technique for writing tests. You may hear the term mixed up with mocks,
6377fakes, or doubles. Basically, a stub is an object that returns pre-canned
6378responses, rather than doing any computation.")
6379 (license license:bsd-3)))
6380
6381(define-public python2-pretend
6382 (package-with-python2 python-pretend))
6383
6384(define-public python-pip
6385 (package
6386 (name "python-pip")
6387 (version "18.1")
6388 (source
6389 (origin
6390 (method url-fetch)
6391 (uri (pypi-uri "pip" version))
6392 (sha256
6393 (base32
6394 "188fclay154s520n43s7cxxlhdaiysvxf19zk8vr1xbyjyyr58n0"))))
6395 (build-system python-build-system)
6396 (arguments
6397 '(#:tests? #f)) ; there are no tests in the pypi archive.
6398 (home-page "https://pip.pypa.io/")
6399 (synopsis "Package manager for Python software")
6400 (description
6401 "Pip is a package manager for Python software, that finds packages on the
6402Python Package Index (PyPI).")
6403 (license license:expat)))
6404
6405(define-public python2-pip
6406 (package-with-python2 python-pip))
6407
6408(define-public python-tlsh
6409 (package
6410 (name "python-tlsh")
6411 (version "3.4.5")
6412 (home-page "https://github.com/trendmicro/tlsh")
6413 (source (origin
6414 (method url-fetch)
6415 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
6416 version ".tar.gz"))
6417 (sha256
6418 (base32
6419 "1x1vahd4zg5kpyr9h9hs3fvh460p25rjy4cclwdnbbw8x3vc30q3"))
6420 (file-name (string-append name "-" version ".tar.gz"))))
6421 (build-system cmake-build-system)
6422 (arguments
6423 '(#:out-of-source? #f
6424 #:phases (modify-phases %standard-phases
6425 (replace
6426 'install
6427 (lambda* (#:key outputs #:allow-other-keys)
6428 ;; Build and install the Python bindings. The underlying
6429 ;; C++ library is apparently not meant to be installed.
6430 (let ((out (assoc-ref outputs "out")))
6431 (with-directory-excursion "py_ext"
6432 (and (system* "python" "setup.py" "build")
6433 (system* "python" "setup.py" "install"
6434 (string-append "--prefix=" out))))))))))
6435 (inputs `(("python" ,python-wrapper))) ;for the bindings
6436 (synopsis "Fuzzy matching library for Python")
6437 (description
6438 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
6439Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
6440value which can be used for similarity comparisons. Similar objects have
6441similar hash values, which allows for the detection of similar objects by
6442comparing their hash values. The byte stream should have a sufficient amount
6443of complexity; for example, a byte stream of identical bytes will not generate
6444a hash value.")
6445 (license license:asl2.0)))
6446
6447(define-public python2-tlsh
6448 (package
6449 (inherit python-tlsh)
6450 (name "python2-tlsh")
6451 (inputs `(("python" ,python-2)))))
6452
6453(define-public python-termcolor
6454 (package
6455 (name "python-termcolor")
6456 (version "1.1.0")
6457 (source
6458 (origin
6459 (method url-fetch)
6460 (uri (pypi-uri "termcolor" version))
6461 (sha256
6462 (base32
6463 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
6464 (build-system python-build-system)
6465 (arguments
6466 ;; There are no tests.
6467 `(#:tests? #f))
6468 (home-page "https://pypi.python.org/pypi/termcolor")
6469 (synopsis "ANSII Color formatting for terminal output")
6470 (description
6471 "This package provides ANSII Color formatting for output in terminals.")
6472 (license license:expat)))
6473
6474(define-public python2-termcolor
6475 (package-with-python2 python-termcolor))
6476
6477(define-public python-libarchive-c
6478 (package
6479 (name "python-libarchive-c")
6480 (version "2.8")
6481 (source (origin
6482 (method url-fetch)
6483 (uri (pypi-uri "libarchive-c" version))
6484 (sha256
6485 (base32
6486 "0qg0v1s9c1xdk9philhnv8k6c6nicvnvfwlc0j9srg90jmdlvm06"))))
6487 (build-system python-build-system)
6488 (arguments
6489 '(#:phases (modify-phases %standard-phases
6490 (add-before
6491 'build 'reference-libarchive
6492 (lambda* (#:key inputs #:allow-other-keys)
6493 ;; Retain the absolute file name of libarchive.so.
6494 (let ((libarchive (assoc-ref inputs "libarchive")))
6495 (substitute* "libarchive/ffi.py"
6496 (("find_library\\('archive'\\)")
6497 (string-append "'" libarchive
6498 "/lib/libarchive.so'"))))))
6499 (replace 'check
6500 (lambda _ (invoke "pytest" "-vv"))))))
6501 (native-inputs
6502 `(("python-mock" ,python-mock)
6503 ("python-pytest" ,python-pytest)))
6504 (inputs
6505 `(("libarchive" ,libarchive)))
6506 (home-page "https://github.com/Changaco/python-libarchive-c")
6507 (synopsis "Python interface to libarchive")
6508 (description
6509 "This package provides Python bindings to libarchive, a C library to
6510access possibly compressed archives in many different formats. It uses
6511Python's @code{ctypes} foreign function interface (FFI).")
6512 (license license:lgpl2.0+)))
6513
6514(define-public python2-libarchive-c
6515 (package-with-python2 python-libarchive-c))
6516
6517(define-public python-file
6518 (package
6519 (inherit file)
6520 (name "python-file")
6521 (build-system python-build-system)
6522 (arguments
6523 '(#:tests? #f ;no tests
6524 #:configure-flags '("--single-version-externally-managed" "--root=/")
6525 #:phases (modify-phases %standard-phases
6526 (add-before 'build 'change-directory
6527 (lambda _
6528 (chdir "python")
6529 #t))
6530 (add-before 'build 'set-library-file-name
6531 (lambda* (#:key inputs #:allow-other-keys)
6532 (let ((file (assoc-ref inputs "file")))
6533 (substitute* "magic.py"
6534 (("find_library\\('magic'\\)")
6535 (string-append "'" file "/lib/libmagic.so'")))
6536 #t))))))
6537 (inputs `(("file" ,file)))
6538 (self-native-input? #f)
6539 (synopsis "Python bindings to the libmagic file type guesser. Note that
6540this module and the python-magic module both provide a \"magic.py\" file;
6541these two modules, which are different and were developed separately, both
6542serve the same purpose: provide Python bindings for libmagic.")))
6543
6544(define-public python2-file
6545 (package-with-python2 python-file))
6546
6547(define-public python-debian
6548 (package
6549 (name "python-debian")
6550 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
6551 (version "0.1.28")
6552 (source
6553 (origin
6554 (method url-fetch)
6555 (uri (pypi-uri name version))
6556 (sha256
6557 (base32
6558 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
6559 (build-system python-build-system)
6560 (propagated-inputs
6561 `(("python-six" ,python-six)))
6562 (synopsis "Debian package related modules")
6563 (description
6564 ;; XXX: Use @enumerate instead of @itemize to work around
6565 ;; <http://bugs.gnu.org/21772>.
6566 "This package provides Python modules that abstract many formats of
6567Debian-related files, such as:
6568
6569@enumerate
6570@item Debtags information;
6571@item @file{debian/changelog} files;
6572@item packages files, pdiffs;
6573@item control files of single or multiple RFC822-style paragraphs---e.g.
6574 @file{debian/control}, @file{.changes}, @file{.dsc};
6575@item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
6576 contained files and meta-information.
6577@end enumerate\n")
6578
6579 ;; Modules are either GPLv2+ or GPLv3+.
6580 (license license:gpl3+)))
6581
6582(define-public python2-debian
6583 (package-with-python2 python-debian))
6584
6585(define-public python-nbformat
6586 (package
6587 (name "python-nbformat")
6588 (version "4.4.0")
6589 (source
6590 (origin
6591 (method url-fetch)
6592 (uri (pypi-uri "nbformat" version))
6593 (sha256
6594 (base32
6595 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
6596 (build-system python-build-system)
6597 (arguments `(#:tests? #f)) ; no test target
6598 (propagated-inputs
6599 `(("python-ipython-genutils" ,python-ipython-genutils)
6600 ("python-jsonschema" ,python-jsonschema)
6601 ("python-jupyter-core" ,python-jupyter-core)
6602 ("python-traitlets" ,python-traitlets)))
6603 (home-page "http://jupyter.org")
6604 (synopsis "Jupyter Notebook format")
6605 (description "This package provides the reference implementation of the
6606Jupyter Notebook format and Python APIs for working with notebooks.")
6607 (license license:bsd-3)))
6608
6609(define-public python2-nbformat
6610 (package-with-python2 python-nbformat))
6611
6612(define-public python-bleach
6613 (package
6614 (name "python-bleach")
6615 (version "1.4.3")
6616 (source
6617 (origin
6618 (method url-fetch)
6619 (uri (pypi-uri "bleach" version))
6620 (sha256
6621 (base32
6622 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
6623 (build-system python-build-system)
6624 (propagated-inputs
6625 `(("python-html5lib" ,python-html5lib-0.9)
6626 ("python-six" ,python-six)))
6627 (native-inputs
6628 `(("python-nose" ,python-nose)))
6629 (home-page "https://github.com/jsocol/bleach")
6630 (synopsis "Whitelist-based HTML-sanitizing tool")
6631 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
6632 (license license:asl2.0)))
6633
6634(define-public python2-bleach
6635 (package-with-python2 python-bleach))
6636
6637(define-public python-entrypoints
6638 (package
6639 (name "python-entrypoints")
6640 (version "0.2.3")
6641 (source
6642 (origin
6643 (method url-fetch)
6644 (uri (string-append "https://github.com/takluyver/entrypoints/archive/"
6645 version ".tar.gz"))
6646 (file-name (string-append name "-" version ".tar.gz"))
6647 (sha256
6648 (base32
6649 "1pdvgfr5bxyvnfvxbsd3zi0dh3il71pc4k6rinx6zpps91b84a56"))))
6650 (build-system python-build-system)
6651 ;; The package does not come with a setup.py file, so we have to generate
6652 ;; one ourselves.
6653 (arguments
6654 `(#:tests? #f
6655 #:phases
6656 (modify-phases %standard-phases
6657 (add-after 'unpack 'create-setup.py
6658 (lambda _
6659 (call-with-output-file "setup.py"
6660 (lambda (port)
6661 (format port "\
6662from setuptools import setup
6663setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
6664" ,version))))))))
6665 (home-page "https://github.com/takluyver/entrypoints")
6666 (synopsis "Discover and load entry points from installed Python packages")
6667 (description "Entry points are a way for Python packages to advertise
6668objects with some common interface. The most common examples are
6669@code{console_scripts} entry points, which define shell commands by
6670identifying a Python function to run. The @code{entrypoints} module contains
6671functions to find and load entry points.")
6672 (license license:expat)))
6673
6674(define-public python2-entrypoints
6675 (package-with-python2 python-entrypoints))
6676
6677(define-public python-nbconvert
6678 (package
6679 (name "python-nbconvert")
6680 (version "5.0.0b1")
6681 (source
6682 (origin
6683 (method url-fetch)
6684 (uri (pypi-uri "nbconvert" version))
6685 (sha256
6686 (base32
6687 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
6688 (build-system python-build-system)
6689 (arguments
6690 `(;; The "bdist_egg" target is disabled by default, causing the installation
6691 ;; to fail.
6692 #:configure-flags (list "bdist_egg")
6693 ;; FIXME: 5 failures, 40 errors.
6694 #:tests? #f))
6695 ;; #:phases
6696 ;; (modify-phases %standard-phases
6697 ;; (replace 'check
6698 ;; (lambda _
6699 ;; (zero? (system* "py.test" "-v")))))
6700 (native-inputs
6701 `(("python-pytest" ,python-pytest)))
6702 (propagated-inputs
6703 `(("python-bleach" ,python-bleach)
6704 ("python-entrypoints" ,python-entrypoints)
6705 ("python-jinja2" ,python-jinja2)
6706 ("python-jupyter-core" ,python-jupyter-core)
6707 ("python-mistune" ,python-mistune)
6708 ("python-nbformat" ,python-nbformat)
6709 ("python-pygments" ,python-pygments)
6710 ("python-traitlets" ,python-traitlets)))
6711 (home-page "http://jupyter.org")
6712 (synopsis "Converting Jupyter Notebooks")
6713 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
6714notebooks to various other formats via Jinja templates. It allows you to
6715convert an @code{.ipynb} notebook file into various static formats including:
6716
6717@enumerate
6718@item HTML
6719@item LaTeX
6720@item PDF
6721@item Reveal JS
6722@item Markdown (md)
6723@item ReStructured Text (rst)
6724@item executable script
6725@end enumerate\n")
6726 (license license:bsd-3)))
6727
6728(define-public python2-nbconvert
6729 (package-with-python2 python-nbconvert))
6730
6731(define-public python-prometheus-client
6732 (package
6733 (name "python-prometheus-client")
6734 (version "0.5.0")
6735 (source
6736 (origin
6737 (method url-fetch)
6738 (uri (pypi-uri "prometheus_client" version))
6739 (sha256
6740 (base32
6741 "0g7rpv1pq2lab1nfqdx98z9d3bqwc400alg1j4ynrpjkrbsizhg8"))))
6742 (build-system python-build-system)
6743 (arguments '(#:tests? #f)) ; tests are not included
6744 (propagated-inputs
6745 `(("python-twisted" ,python-twisted)))
6746 (home-page "https://github.com/prometheus/client_python")
6747 (synopsis "Python client for the Prometheus monitoring system")
6748 (description
6749 "This package provides a Python client for the Prometheus monitoring
6750system.")
6751 (license license:asl2.0)))
6752
6753(define-public python2-prometheus-client
6754 (package-with-python2 python-prometheus-client))
6755
6756(define-public python-notebook
6757 (package
6758 (name "python-notebook")
6759 (version "5.7.4")
6760 (source (origin
6761 (method url-fetch)
6762 (uri (pypi-uri "notebook" version))
6763 (sha256
6764 (base32
6765 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
6766 (build-system python-build-system)
6767 (arguments
6768 `(#:phases
6769 (modify-phases %standard-phases
6770 (replace 'check
6771 (lambda _
6772 ;; These tests require a browser
6773 (delete-file-recursively "notebook/tests/selenium")
6774 ;; Some tests need HOME
6775 (setenv "HOME" "/tmp")
6776 ;; This file contains "warningfilters", which are not supported
6777 ;; by this version of nose.
6778 (delete-file "setup.cfg")
6779 (with-directory-excursion "/tmp"
6780 (invoke "nosetests" "-v"))
6781 #t)))))
6782 (propagated-inputs
6783 `(("python-jupyter-core" ,python-jupyter-core)
6784 ("python-nbformat" ,python-nbformat)
6785 ("python-nbconvert" ,python-nbconvert)
6786 ("python-prometheus-client" ,python-prometheus-client)
6787 ("python-send2trash" ,python-send2trash)
6788 ("python-terminado" ,python-terminado)))
6789 (native-inputs
6790 `(("python-nose" ,python-nose)
6791 ("python-sphinx" ,python-sphinx)
6792 ("python-requests" ,python-requests)))
6793 (home-page "http://jupyter.org/")
6794 (synopsis "Web-based notebook environment for interactive computing")
6795 (description
6796 "The Jupyter HTML notebook is a web-based notebook environment for
6797interactive computing.")
6798 (properties `((python2-variant . ,(delay python2-notebook))))
6799 (license license:bsd-3)))
6800
6801(define-public python2-notebook
6802 (let ((base (package-with-python2
6803 (strip-python2-variant python-notebook))))
6804 (package (inherit base)
6805 (native-inputs
6806 `(("python2-mock" ,python2-mock)
6807 ,@(package-native-inputs base)))
6808 (arguments
6809 (substitute-keyword-arguments (package-arguments base)
6810 ((#:phases phases)
6811 `(modify-phases ,phases
6812 (add-before 'check 'disable-test-case
6813 ;; The test requires network access to localhost. Curiously it
6814 ;; fails with Python 2 only. Simply make the test-case return
6815 ;; immediately.
6816 (lambda _
6817 (substitute*
6818 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
6819 (("formats = self.nbconvert_api") "return #")))))))))))
6820
6821(define-public python-widgetsnbextension
6822 (package
6823 (name "python-widgetsnbextension")
6824 (version "3.4.2")
6825 (source
6826 (origin
6827 (method url-fetch)
6828 (uri (pypi-uri "widgetsnbextension" version))
6829 (sha256
6830 (base32
6831 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
6832 (build-system python-build-system)
6833 (propagated-inputs
6834 `(("python-ipykernel" ,python-ipykernel)
6835 ("python-notebook" ,python-notebook)))
6836 (native-inputs
6837 `(("python-certifi" ,python-certifi)
6838 ("python-nose" ,python-nose)))
6839 (home-page "https://ipython.org")
6840 (synopsis "IPython HTML widgets for Jupyter")
6841 (description "This package provides interactive HTML widgets for Jupyter
6842notebooks.")
6843 (license license:bsd-3)))
6844
6845(define-public python2-widgetsnbextension
6846 (package-with-python2 python-widgetsnbextension))
6847
6848(define-public python-ipywidgets
6849 (package
6850 (name "python-ipywidgets")
6851 (version "5.2.2")
6852 (source
6853 (origin
6854 (method url-fetch)
6855 (uri (pypi-uri "ipywidgets" version))
6856 (sha256
6857 (base32
6858 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
6859 (build-system python-build-system)
6860 (propagated-inputs
6861 `(("python-ipython" ,python-ipython)
6862 ("python-traitlets" ,python-traitlets)
6863 ("python-widgetsnbextension" ,python-widgetsnbextension)))
6864 (native-inputs
6865 `(("python-nose" ,python-nose)
6866 ("python-pytest" ,python-pytest)))
6867 (home-page "https://ipython.org")
6868 (synopsis "IPython HTML widgets for Jupyter")
6869 (description "Ipywidgets are interactive HTML widgets for Jupyter
6870notebooks and the IPython kernel. Notebooks come alive when interactive
6871widgets are used. Users gain control of their data and can visualize changes
6872in the data.")
6873 (license license:bsd-3)))
6874
6875(define-public python2-ipywidgets
6876 (package-with-python2 python-ipywidgets))
6877
6878(define-public python-jupyter-console
6879 (package
6880 (name "python-jupyter-console")
6881 (version "5.2.0")
6882 (source
6883 (origin
6884 (method url-fetch)
6885 (uri (pypi-uri "jupyter_console" version))
6886 (sha256
6887 (base32
6888 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
6889 (build-system python-build-system)
6890 ;; Tests only run in an TTY.
6891 (arguments `(#:tests? #f))
6892 (propagated-inputs
6893 `(("python-ipykernel" ,python-ipykernel)
6894 ("python-jupyter-client" ,python-jupyter-client)
6895 ("python-prompt-toolkit" ,python-prompt-toolkit-1)
6896 ("python-pygments" ,python-pygments)))
6897 (native-inputs
6898 `(("python-nose" ,python-nose)))
6899 (home-page "https://jupyter.org")
6900 (synopsis "Jupyter terminal console")
6901 (description "This package provides a terminal-based console frontend for
6902Jupyter kernels. It also allows for console-based interaction with non-Python
6903Jupyter kernels such as IJulia and IRKernel.")
6904 (license license:bsd-3)))
6905
6906(define-public python2-jupyter-console
6907 (package-with-python2 python-jupyter-console))
6908
6909;; The python-ipython and python-jupyter-console require each other. To get
6910;; the functionality in both packages working, strip down the
6911;; python-jupyter-console package when using it as an input to python-ipython.
6912(define python-jupyter-console-minimal
6913 (package
6914 (inherit python-jupyter-console)
6915 (name "python-jupyter-console-minimal")
6916 (arguments
6917 (substitute-keyword-arguments
6918 (package-arguments python-jupyter-console)
6919 ((#:phases phases)
6920 `(modify-phases ,phases
6921 (add-after 'install 'delete-bin
6922 (lambda* (#:key outputs #:allow-other-keys)
6923 ;; Delete the bin files, to avoid conflicts in profiles
6924 ;; where python-ipython and python-jupyter-console are
6925 ;; both present.
6926 (delete-file-recursively
6927 (string-append
6928 (assoc-ref outputs "out") "/bin"))))))))
6929 ;; Remove the python-ipython propagated input, to avoid the cycle
6930 (propagated-inputs
6931 (alist-delete
6932 "python-ipython"
6933 (package-propagated-inputs python-jupyter-console)))))
6934
6935(define-public python-qtconsole
6936 (package
6937 (name "python-qtconsole")
6938 (version "4.4.3")
6939 (source
6940 (origin
6941 (method url-fetch)
6942 (uri (pypi-uri "qtconsole" version))
6943 (sha256
6944 (base32
6945 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
6946 (build-system python-build-system)
6947 (arguments
6948 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
6949 ;; but we only have the LTS version 5.x. This means that there might be
6950 ;; runtime errors, but since this is a dependency of the Jupyter package,
6951 ;; and Jupyter can be used without the qtconsole we can overlook this for
6952 ;; now.
6953 `(#:tests? #f
6954 #:phases
6955 (modify-phases %standard-phases
6956 (add-before 'check 'pre-check
6957 (lambda _
6958 (setenv "QT_QPA_PLATFORM" "offscreen")
6959 #t)))))
6960 (propagated-inputs
6961 `(("python-ipykernel" ,python-ipykernel)
6962 ("python-ipython" ,python-ipython)))
6963 (native-inputs
6964 `(("python-pytest" ,python-pytest)))
6965 (home-page "http://jupyter.org")
6966 (synopsis "Jupyter Qt console")
6967 (description "This package provides a Qt-based console for Jupyter with
6968support for rich media output.")
6969 (license license:bsd-3)))
6970
6971(define-public jupyter
6972 (package
6973 (name "jupyter")
6974 (version "1.0.0")
6975 (source
6976 (origin
6977 (method url-fetch)
6978 (uri (pypi-uri "jupyter" version))
6979 (sha256
6980 (base32
6981 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
6982 (build-system python-build-system)
6983 (arguments '(#:tests? #f)) ; there are none.
6984 (propagated-inputs
6985 `(("python-ipykernel" ,python-ipykernel)
6986 ("python-ipywidgets" ,python-ipywidgets)
6987 ("python-jupyter-console" ,python-jupyter-console)
6988 ("python-nbconvert" ,python-nbconvert)
6989 ("python-notebook" ,python-notebook)
6990 ("python-qtconsole" ,python-qtconsole)))
6991 (native-search-paths
6992 (list (search-path-specification
6993 (variable "JUPYTER_PATH")
6994 (files '("share/jupyter")))))
6995 (home-page "https://jupyter.org")
6996 (synopsis "Web application for interactive documents")
6997 (description
6998 "The Jupyter Notebook is a web application that allows you to create and
6999share documents that contain live code, equations, visualizations and
7000explanatory text. Uses include: data cleaning and transformation, numerical
7001simulation, statistical modeling, machine learning and much more.")
7002 (license license:bsd-3)))
7003
7004(define-public python-chardet
7005 (package
7006 (name "python-chardet")
7007 (version "3.0.4")
7008 (source
7009 (origin
7010 (method url-fetch)
7011 (uri (pypi-uri "chardet" version))
7012 (sha256
7013 (base32
7014 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
7015 (native-inputs
7016 `(("python-hypothesis" ,python-hypothesis)
7017 ("python-pytest" ,python-pytest)
7018 ("python-pytest-runner" ,python-pytest-runner)))
7019 (build-system python-build-system)
7020 (home-page "https://github.com/chardet/chardet")
7021 (synopsis "Universal encoding detector for Python 2 and 3")
7022 (description
7023 "This package provides @code{chardet}, a Python module that can
7024automatically detect a wide range of file encodings.")
7025 (license license:lgpl2.1+)))
7026
7027(define-public python2-chardet
7028 (package-with-python2 python-chardet))
7029
7030(define-public python-docopt
7031 (package
7032 (name "python-docopt")
7033 (version "0.6.2")
7034 (source
7035 (origin
7036 (method url-fetch)
7037 ;; The release on PyPI does not include tests.
7038 (uri (string-append
7039 "https://github.com/docopt/docopt/archive/"
7040 version ".tar.gz"))
7041 (file-name (string-append name "-" version ".tar.gz"))
7042 (sha256
7043 (base32
7044 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
7045 (build-system python-build-system)
7046 (native-inputs
7047 `(("python-pytest" ,python-pytest)))
7048 (arguments
7049 `(#:phases
7050 (modify-phases %standard-phases
7051 (replace 'check
7052 (lambda _ (invoke "py.test"))))))
7053 (home-page "http://docopt.org")
7054 (synopsis "Command-line interface description language for Python")
7055 (description "This library allows the user to define a command-line
7056interface from a program's help message rather than specifying it
7057programatically with command-line parsers like @code{getopt} and
7058@code{argparse}.")
7059 (license license:expat)))
7060
7061(define-public python2-docopt
7062 (package-with-python2 python-docopt))
7063
7064(define-public python-pythondialog
7065 (package
7066 (name "python-pythondialog")
7067 (version "3.4.0")
7068 (source
7069 (origin
7070 (method url-fetch)
7071 (uri (pypi-uri "pythondialog" version))
7072 (sha256
7073 (base32
7074 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
7075 (build-system python-build-system)
7076 (arguments
7077 `(#:phases
7078 (modify-phases %standard-phases
7079 (add-after 'unpack 'patch-path
7080 (lambda* (#:key inputs #:allow-other-keys)
7081 (let* ((dialog (assoc-ref inputs "dialog")))
7082 ;; Since this library really wants to grovel the search path, we
7083 ;; must hardcode dialog's store path into it.
7084 (substitute* "dialog.py"
7085 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
7086 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
7087 #t))))
7088 #:tests? #f)) ; no test suite
7089 (propagated-inputs
7090 `(("dialog" ,dialog)))
7091 (home-page "http://pythondialog.sourceforge.net/")
7092 (synopsis "Python interface to the UNIX dialog utility")
7093 (description "A Python wrapper for the dialog utility. Its purpose is to
7094provide an easy to use, pythonic and comprehensive Python interface to dialog.
7095This allows one to make simple text-mode user interfaces on Unix-like systems")
7096 (license license:lgpl2.1)
7097 (properties `((python2-variant . ,(delay python2-pythondialog))))))
7098
7099(define-public python2-pythondialog
7100 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
7101 (package
7102 (inherit base)
7103 (version (package-version python-pythondialog))
7104 (source (origin
7105 (method url-fetch)
7106 (uri (pypi-uri "python2-pythondialog" version))
7107 (sha256
7108 (base32
7109 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
7110
7111(define-public python-configobj
7112 (package
7113 (name "python-configobj")
7114 (version "5.0.6")
7115 (source (origin
7116 (method url-fetch)
7117 (uri (string-append
7118 "https://pypi.python.org/packages/source/c/configobj/"
7119 "configobj-" version ".tar.gz"))
7120 (sha256
7121 (base32
7122 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
7123 ;; Patch setup.py so it looks for python-setuptools, which is
7124 ;; required to parse the keyword 'install_requires' in setup.py.
7125 (patches (search-patches "python-configobj-setuptools.patch"))))
7126 (build-system python-build-system)
7127 (propagated-inputs
7128 `(("python-six" ,python-six)))
7129 (synopsis "Config file reading, writing and validation")
7130 (description "ConfigObj is a simple but powerful config file reader and
7131writer: an ini file round tripper. Its main feature is that it is very easy to
7132use, with a straightforward programmer’s interface and a simple syntax for
7133config files.")
7134 (home-page "https://github.com/DiffSK/configobj")
7135 (license license:bsd-3)))
7136
7137(define-public python2-configobj
7138 (package-with-python2 python-configobj))
7139
7140(define-public python-configargparse
7141 (package
7142 (name "python-configargparse")
7143 (version "0.12.0")
7144 (source (origin
7145 (method url-fetch)
7146 (uri (pypi-uri "ConfigArgParse" version))
7147 (sha256
7148 (base32
7149 "0fgkiqh6r3rbkdq3k8c48m85g52k96686rw3a6jg4lcncrkpvk98"))))
7150 (build-system python-build-system)
7151 (native-inputs
7152 `(("python-pyyaml" ,python-pyyaml)))
7153 (arguments
7154 `(#:phases
7155 (modify-phases %standard-phases
7156 (replace 'check
7157 (lambda _
7158 ;; Bypass setuptools-shim because one test relies on "setup.py"
7159 ;; being the first argument passed to the python call.
7160 ;;
7161 ;; NOTE: Many tests do not run because they rely on Python's
7162 ;; built-in test.test_argparse, but we remove the unit tests from
7163 ;; our Python installation.
7164 (invoke "python" "setup.py" "test"))))))
7165 (synopsis "Replacement for argparse")
7166 (description "A drop-in replacement for argparse that allows options to also
7167be set via config files and/or environment variables.")
7168 (home-page "https://github.com/bw2/ConfigArgParse")
7169 (license license:expat)))
7170
7171(define-public python2-configargparse
7172 (package-with-python2 python-configargparse))
7173
7174(define-public python-argparse-manpage
7175 (package
7176 (name "python-argparse-manpage")
7177 (version "1.1")
7178 (source
7179 (origin
7180 (method url-fetch)
7181 (uri (pypi-uri "argparse-manpage" version))
7182 (sha256
7183 (base32
7184 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
7185 (build-system python-build-system)
7186 (home-page "https://github.com/praiskup/argparse-manpage")
7187 (synopsis "Build manual page from Python's ArgumentParser object")
7188 (description
7189 "This package provides tools to build manual pages from Python's
7190@code{ArgumentParser} object.")
7191 (license license:asl2.0)))
7192
7193(define-public python2-contextlib2
7194 (package
7195 (name "python2-contextlib2")
7196 (version "0.5.5")
7197 (source
7198 (origin
7199 (method url-fetch)
7200 (uri (pypi-uri "contextlib2" version))
7201 (sha256
7202 (base32
7203 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
7204 (build-system python-build-system)
7205 (arguments
7206 `(#:python ,python-2
7207 #:phases
7208 (modify-phases %standard-phases
7209 (replace 'check
7210 (lambda _ (invoke "python" "test_contextlib2.py" "-v"))))))
7211 (native-inputs
7212 `(("python2-unittest2" ,python2-unittest2)))
7213 (home-page "http://contextlib2.readthedocs.org/")
7214 (synopsis "Tools for decorators and context managers")
7215 (description "This module is primarily a backport of the Python
72163.2 contextlib to earlier Python versions. Like contextlib, it
7217provides utilities for common tasks involving decorators and context
7218managers. It also contains additional features that are not part of
7219the standard library.")
7220 (license license:psfl)))
7221
7222(define-public python-texttable
7223 (package
7224 (name "python-texttable")
7225 (version "0.8.7")
7226 (source
7227 (origin
7228 (method url-fetch)
7229 (uri (pypi-uri "texttable" version))
7230 (sha256
7231 (base32
7232 "1liiiydgkg37i46a418aw19fyf6z3ds51wdwwpyjbs12x0phhf4a"))))
7233 (build-system python-build-system)
7234 (arguments '(#:tests? #f)) ; no tests
7235 (home-page "https://github.com/foutaise/texttable/")
7236 (synopsis "Python module for creating simple ASCII tables")
7237 (description "Texttable is a Python module for creating simple ASCII
7238tables.")
7239 (license license:lgpl2.1+)))
7240
7241(define-public python2-texttable
7242 (package-with-python2 python-texttable))
7243
7244(define-public python-atomicwrites
7245 (package
7246 (name "python-atomicwrites")
7247 (version "1.1.5")
7248 (source (origin
7249 (method url-fetch)
7250 (uri (pypi-uri "atomicwrites" version))
7251 (sha256
7252 (base32
7253 "11bm90fwm2avvf4f3ib8g925w7jr4m11vcsinn1bi6ns4bm32214"))))
7254 (build-system python-build-system)
7255 (synopsis "Atomic file writes in Python")
7256 (description "Library for atomic file writes using platform dependent tools
7257for atomic file system operations.")
7258 (home-page "https://github.com/untitaker/python-atomicwrites")
7259 (license license:expat)))
7260
7261(define-public python2-atomicwrites
7262 (package-with-python2 python-atomicwrites))
7263
7264(define-public python-click-threading
7265 (package
7266 (name "python-click-threading")
7267 (version "0.4.4")
7268 (source (origin
7269 (method url-fetch)
7270 (uri (pypi-uri "click-threading" version))
7271 (sha256
7272 (base32
7273 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
7274 (build-system python-build-system)
7275 (propagated-inputs
7276 `(("python-click" ,python-click)))
7277 (synopsis "Utilities for multithreading in Click")
7278 (description "This package provides utilities for multithreading in Click
7279applications.")
7280 (home-page "https://github.com/click-contrib/click-threading")
7281 (license license:expat)))
7282
7283(define-public python-click-log
7284 (package
7285 (name "python-click-log")
7286 (version "0.3.2")
7287 (source (origin
7288 (method url-fetch)
7289 (uri (pypi-uri "click-log" version))
7290 (sha256
7291 (base32
7292 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
7293 (build-system python-build-system)
7294 (propagated-inputs
7295 `(("python-click" ,python-click)))
7296 (synopsis "Logging for click applications")
7297 (description "This package provides a Python library for logging Click
7298applications.")
7299 (home-page "https://github.com/click-contrib/click-log")
7300 (license license:expat)))
7301
7302(define-public python-apipkg
7303 (package
7304 (name "python-apipkg")
7305 (version "1.4")
7306 (source (origin
7307 (method url-fetch)
7308 (uri (pypi-uri "apipkg" version))
7309 (sha256
7310 (base32
7311 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
7312 (build-system python-build-system)
7313 (native-inputs
7314 `(("python-pytest" ,python-pytest)))
7315 (synopsis "Namespace control and lazy-import mechanism")
7316 (description "With apipkg you can control the exported namespace of a Python
7317package and greatly reduce the number of imports for your users. It is a small
7318pure Python module that works on virtually all Python versions.")
7319 (home-page "https://github.com/pytest-dev/apipkg")
7320 (license license:expat)))
7321
7322(define-public python2-apipkg
7323 (package-with-python2 python-apipkg))
7324
7325(define-public python-execnet
7326 (package
7327 (name "python-execnet")
7328 (version "1.4.1")
7329 (source (origin
7330 (method url-fetch)
7331 (uri (pypi-uri "execnet" version))
7332 (sha256
7333 (base32
7334 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
7335 (build-system python-build-system)
7336 (arguments
7337 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
7338 ;; The two test failures are caused by the lack of an `ssh` executable.
7339 ;; The test suite can be run with pytest after the 'install' phase.
7340 #:tests? #f))
7341 (native-inputs
7342 `(("python-pytest" ,python-pytest)
7343 ("python-setuptools-scm" ,python-setuptools-scm)))
7344 (propagated-inputs
7345 `(("python-apipkg" ,python-apipkg)))
7346 (synopsis "Rapid multi-Python deployment")
7347 (description "Execnet provides a share-nothing model with
7348channel-send/receive communication for distributing execution across many
7349Python interpreters across version, platform and network barriers. It has a
7350minimal and fast API targeting the following uses:
7351@enumerate
7352@item distribute tasks to (many) local or remote CPUs
7353@item write and deploy hybrid multi-process applications
7354@item write scripts to administer multiple environments
7355@end enumerate")
7356 (home-page "http://codespeak.net/execnet/")
7357 (license license:expat)))
7358
7359(define-public python2-execnet
7360 (package-with-python2 python-execnet))
7361
7362(define-public python-icalendar
7363 (package
7364 (name "python-icalendar")
7365 (version "4.0.3")
7366 (source (origin
7367 (method url-fetch)
7368 (uri (pypi-uri "icalendar" version))
7369 (sha256
7370 (base32
7371 "0mk3dk1dxkcm46jy48v27j2w2349iv4sbimqj1yb5js43mx49hh7"))))
7372 (build-system python-build-system)
7373 (propagated-inputs
7374 `(("python-dateutil" ,python-dateutil)
7375 ("python-pytz" ,python-pytz)))
7376 (synopsis "Python library for parsing iCalendar files")
7377 (description "The icalendar package is a parser/generator of iCalendar
7378files for use with Python.")
7379 (home-page "https://github.com/collective/icalendar")
7380 (license license:bsd-2)))
7381
7382(define-public python-sphinxcontrib-newsfeed
7383 (package
7384 (name "python-sphinxcontrib-newsfeed")
7385 (version "0.1.4")
7386 (source (origin
7387 (method url-fetch)
7388 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
7389 (sha256
7390 (base32
7391 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
7392 (arguments '(#:tests? #f)) ; No tests.
7393 (build-system python-build-system)
7394 (propagated-inputs
7395 `(("python-sphinx" ,python-sphinx)))
7396 (synopsis "News Feed extension for Sphinx")
7397 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
7398Blog, News or Announcements section to a Sphinx website.")
7399 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
7400 (license license:bsd-2)))
7401
7402(define-public python-args
7403 (package
7404 (name "python-args")
7405 (version "0.1.0")
7406 (source (origin
7407 (method url-fetch)
7408 (uri (pypi-uri "args" version))
7409 (sha256
7410 (base32
7411 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
7412 (build-system python-build-system)
7413 (home-page "https://github.com/kennethreitz/args")
7414 (synopsis "Command-line argument parser")
7415 (description
7416 "This library provides a Python module to parse command-line arguments.")
7417 (license license:bsd-3)))
7418
7419(define-public python2-args
7420 (package-with-python2 python-args))
7421
7422(define-public python-clint
7423 (package
7424 (name "python-clint")
7425 (version "0.5.1")
7426 (source (origin
7427 (method url-fetch)
7428 (uri (pypi-uri "clint" version))
7429 (sha256
7430 (base32
7431 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
7432 (build-system python-build-system)
7433 (arguments
7434 '(#:phases
7435 (modify-phases %standard-phases
7436 (replace 'check
7437 (lambda _ (invoke "py.test" "-v"))))))
7438 (native-inputs
7439 `(("python-pytest" ,python-pytest)))
7440 (propagated-inputs
7441 `(("python-args" ,python-args)))
7442 (home-page "https://github.com/kennethreitz/clint")
7443 (synopsis "Command-line interface tools")
7444 (description
7445 "Clint is a Python module filled with a set of tools for developing
7446command-line applications, including tools for colored and indented
7447output, progress bar display, and pipes.")
7448 (license license:isc)))
7449
7450(define-public python2-clint
7451 (package-with-python2 python-clint))
7452
7453(define-public python-astor
7454 (package
7455 (name "python-astor")
7456 (version "0.5")
7457 (source (origin
7458 (method url-fetch)
7459 (uri (pypi-uri "astor" version))
7460 (sha256
7461 (base32
7462 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
7463 (build-system python-build-system)
7464 (home-page "https://github.com/berkerpeksag/astor")
7465 (synopsis "Read and write Python ASTs")
7466 (description
7467 "Astor is designed to allow easy manipulation of Python source via the
7468Abstract Syntax Tree.")
7469 (license license:bsd-3)))
7470
7471(define-public python2-astor
7472 (package-with-python2 python-astor))
7473
7474(define-public python-rply
7475 (package
7476 (name "python-rply")
7477 (version "0.7.5")
7478 (source (origin
7479 (method url-fetch)
7480 (uri (pypi-uri "rply" version))
7481 (sha256
7482 (base32
7483 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
7484 (build-system python-build-system)
7485 (propagated-inputs
7486 `(("python-appdirs" ,python-appdirs)))
7487 (home-page "https://github.com/alex/rply")
7488 (synopsis "Parser generator for Python")
7489 (description
7490 "This package provides a pure Python based parser generator, that also
7491works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
7492with a new public API, and RPython support.")
7493 (license license:bsd-3)))
7494
7495(define-public python2-rply
7496 (package-with-python2 python-rply))
7497
7498(define-public python-hy
7499 (package
7500 (name "python-hy")
7501 (version "0.13.0")
7502 (source (origin
7503 (method url-fetch)
7504 (uri (pypi-uri "hy" version))
7505 (sha256
7506 (base32
7507 "19sfymaksx9jhksfnb15ahid46mzrhdfzz6yy2craz2qnzvpmky8"))))
7508 (build-system python-build-system)
7509 (arguments
7510 '(#:phases
7511 (modify-phases %standard-phases
7512 (replace 'check
7513 (lambda _
7514 ;; Tests require write access to HOME.
7515 (setenv "HOME" "/tmp")
7516 (invoke "nosetests"))))))
7517 (native-inputs
7518 `(("python-coverage" ,python-coverage)
7519 ("python-nose" ,python-nose)))
7520 (propagated-inputs
7521 `(("python-astor" ,python-astor)
7522 ("python-clint" ,python-clint)
7523 ("python-rply" ,python-rply)))
7524 (home-page "http://hylang.org/")
7525 (synopsis "Lisp frontend to Python")
7526 (description
7527 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
7528its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
7529Python at your fingertips, in Lisp form.")
7530 (license license:expat)))
7531
7532(define-public python2-hy
7533 (package-with-python2 python-hy))
7534
7535(define-public python2-functools32
7536 (package
7537 (name "python2-functools32")
7538 (version "3.2.3-2")
7539 (source
7540 (origin
7541 (method url-fetch)
7542 (uri (pypi-uri "functools32" version))
7543 (sha256
7544 (base32
7545 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
7546 (build-system python-build-system)
7547 (arguments
7548 `(#:python ,python-2
7549 #:tests? #f)) ; no test target
7550 (home-page "https://github.com/MiCHiLU/python-functools32")
7551 (synopsis
7552 "Backport of the functools module from Python 3.2.3")
7553 (description
7554 "This package is a backport of the @code{functools} module from Python
75553.2.3 for use with older versions of Python and PyPy.")
7556 (license license:expat)))
7557
7558(define-public python2-subprocess32
7559 (package
7560 (name "python2-subprocess32")
7561 (version "3.2.7")
7562 (source (origin
7563 (method url-fetch)
7564 (uri (pypi-uri "subprocess32" version))
7565 (sha256
7566 (base32
7567 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
7568 (patches
7569 (search-patches "python2-subprocess32-disable-input-test.patch"))))
7570 (build-system python-build-system)
7571 (arguments
7572 `(#:python ,python-2
7573 ;; The test suite fails with Python > 2.7.13:
7574 ;; import test.support
7575 ;; ImportError: No module named support
7576 #:tests? #f
7577 #:phases
7578 (modify-phases %standard-phases
7579 (add-after 'unpack 'patch-/bin/sh
7580 (lambda _
7581 (substitute* '("subprocess32.py"
7582 "test_subprocess32.py")
7583 (("/bin/sh") (which "sh")))
7584 #t)))))
7585 (home-page "https://github.com/google/python-subprocess32")
7586 (synopsis "Backport of the subprocess module from Python 3.2")
7587 (description
7588 "This is a backport of the @code{subprocess} standard library module
7589from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
7590new features. On POSIX systems it is guaranteed to be reliable when used
7591in threaded applications. It includes timeout support from Python 3.3 but
7592otherwise matches 3.2’s API.")
7593 (license license:psfl)))
7594
7595(define-public python2-futures
7596 (package
7597 (name "python2-futures")
7598 (version "3.2.0")
7599 (source
7600 (origin
7601 (method url-fetch)
7602 (uri (pypi-uri "futures" version))
7603 (sha256
7604 (base32
7605 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
7606 (build-system python-build-system)
7607 (arguments `(#:python ,python-2
7608 ;; FIXME: Python 2.7.14 moved the test.support library,
7609 ;; but our package has not yet been adjusted. Enable
7610 ;; tests when the python2 package has been fixed.
7611 #:tests? #f))
7612 (home-page "https://github.com/agronholm/pythonfutures")
7613 (synopsis
7614 "Backport of the concurrent.futures package from Python 3.2")
7615 (description
7616 "The concurrent.futures module provides a high-level interface for
7617asynchronously executing callables. This package backports the
7618concurrent.futures package from Python 3.2")
7619 (license license:bsd-3)))
7620
7621(define-public python-promise
7622 (package
7623 (name "python-promise")
7624 (version "0.4.2")
7625 (source
7626 (origin
7627 (method url-fetch)
7628 (uri (pypi-uri "promise" version))
7629 (sha256
7630 (base32
7631 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
7632 (build-system python-build-system)
7633 ;; Tests wants python-futures, which is a python2 only program, and
7634 ;; can't be found by python-promise at test time.
7635 (arguments `(#:tests? #f))
7636 (home-page "https://github.com/syrusakbary/promise")
7637 (synopsis "Promises/A+ implementation for Python")
7638 (description
7639 "Promises/A+ implementation for Python")
7640 (properties `((python2-variant . ,(delay python2-promise))))
7641 (license license:expat)))
7642
7643(define-public python2-promise
7644 (let ((promise (package-with-python2
7645 (strip-python2-variant python-promise))))
7646 (package (inherit promise)
7647 (arguments (substitute-keyword-arguments (package-arguments promise)
7648 ((#:tests? _) #t)))
7649 (native-inputs
7650 `(("python2-futures" ,python2-futures)
7651 ("python2-pytest" ,python2-pytest)
7652 ,@(package-native-inputs promise))))))
7653
7654(define-public python-colorama
7655 (package
7656 (name "python-colorama")
7657 (version "0.3.9")
7658 (source
7659 (origin
7660 (method url-fetch)
7661 (uri (pypi-uri "colorama" version))
7662 (sha256
7663 (base32
7664 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
7665 (build-system python-build-system)
7666 (synopsis "Colored terminal text rendering for Python")
7667 (description "Colorama is a Python library for rendering colored terminal
7668text.")
7669 (home-page "https://pypi.python.org/pypi/colorama")
7670 (license license:bsd-3)))
7671
7672(define-public python2-colorama
7673 (package-with-python2 python-colorama))
7674
7675(define-public python-rsa
7676 (package
7677 (name "python-rsa")
7678 (version "3.4.2")
7679 (source
7680 (origin
7681 (method url-fetch)
7682 (uri (pypi-uri "rsa" version))
7683 (sha256
7684 (base32
7685 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
7686 (build-system python-build-system)
7687 (propagated-inputs
7688 `(("python-pyasn1" ,python-pyasn1)))
7689 (synopsis "Pure-Python RSA implementation")
7690 (description "Python-RSA is a pure-Python RSA implementation. It supports
7691encryption and decryption, signing and verifying signatures, and key
7692generation according to PKCS#1 version 1.5. It can be used as a Python
7693library as well as on the command line.")
7694 (home-page "https://stuvel.eu/rsa")
7695 (license license:asl2.0)))
7696
7697(define-public python2-rsa
7698 (package-with-python2 python-rsa))
7699
7700(define-public python-pluggy
7701 (package
7702 (name "python-pluggy")
7703 (version "0.7.1")
7704 (source
7705 (origin
7706 (method url-fetch)
7707 (uri (pypi-uri "pluggy" version))
7708 (sha256
7709 (base32
7710 "1qbn70mksmr03hac6jgp6fiqc4l7859z8dchx2x950vhlij87swm"))))
7711 (build-system python-build-system)
7712 (native-inputs
7713 `(("python-setuptools-scm" ,python-setuptools-scm)))
7714 (synopsis "Plugin and hook calling mechanism for Python")
7715 (description "Pluggy is an extraction of the plugin manager as used by
7716Pytest but stripped of Pytest specific details.")
7717 (home-page "https://pypi.python.org/pypi/pluggy")
7718 (license license:expat)))
7719
7720(define-public python2-pluggy
7721 (package-with-python2 python-pluggy))
7722
7723(define-public python-tox
7724 (package
7725 (name "python-tox")
7726 (version "2.8.1")
7727 (source
7728 (origin
7729 (method url-fetch)
7730 (uri (pypi-uri "tox" version))
7731 (sha256
7732 (base32
7733 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
7734 (build-system python-build-system)
7735 (arguments
7736 ;; FIXME: Tests require pytest-timeout, which itself requires
7737 ;; pytest>=2.8.0 for installation.
7738 '(#:tests? #f))
7739 (propagated-inputs
7740 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
7741 ("python-py" ,python-py)
7742 ("python-virtualenv" ,python-virtualenv)))
7743 (native-inputs
7744 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
7745 ("python-pytest" ,python-pytest) ; >= 2.3.5
7746 ("python-setuptools-scm" ,python-setuptools-scm)))
7747 (home-page "http://tox.testrun.org/")
7748 (synopsis "Virtualenv-based automation of test activities")
7749 (description "Tox is a generic virtualenv management and test command line
7750tool. It can be used to check that a package installs correctly with
7751different Python versions and interpreters, or run tests in each type of
7752supported environment, or act as a frontend to continuous integration
7753servers.")
7754 (license license:expat)))
7755
7756(define-public python2-tox
7757 (package-with-python2 python-tox))
7758
7759(define-public python-jmespath
7760 (package
7761 (name "python-jmespath")
7762 (version "0.9.3")
7763 (source
7764 (origin
7765 (method url-fetch)
7766 (uri (pypi-uri "jmespath" version))
7767 (sha256
7768 (base32
7769 "0r7wc7fsxmlwzxx9j1j7rms06c6xs6d4sysirdhz1jk2mb4x90ba"))))
7770 (build-system python-build-system)
7771 (native-inputs
7772 `(("python-nose" ,python-nose)))
7773 (synopsis "JSON Matching Expressions")
7774 (description "JMESPath (pronounced “james path”) is a Python library that
7775allows one to declaratively specify how to extract elements from a JSON
7776document.")
7777 (home-page "https://github.com/jmespath/jmespath.py")
7778 (license license:expat)))
7779
7780(define-public python2-jmespath
7781 (package-with-python2 python-jmespath))
7782
7783(define-public python-botocore
7784 (package
7785 (name "python-botocore")
7786 (version "1.8.43")
7787 (source
7788 (origin
7789 (method url-fetch)
7790 (uri (pypi-uri "botocore" version))
7791 (sha256
7792 (base32
7793 "12cqpbnz3vfv41mp9admvciw7bc7hz57sjpqs2bxaw9wnfmbw5lg"))))
7794 (build-system python-build-system)
7795 (arguments
7796 ;; FIXME: Many tests are failing.
7797 '(#:tests? #f))
7798 (propagated-inputs
7799 `(("python-dateutil" ,python-dateutil)
7800 ("python-docutils" ,python-docutils)
7801 ("python-jmespath" ,python-jmespath)))
7802 (native-inputs
7803 `(("python-mock" ,python-mock)
7804 ("python-nose" ,python-nose)
7805 ("behave" ,behave)
7806 ("python-tox" ,python-tox)
7807 ("python-wheel" ,python-wheel)))
7808 (home-page "https://github.com/boto/botocore")
7809 (synopsis "Low-level interface to AWS")
7810 (description "Botocore is a Python library that provides a low-level
7811interface to the Amazon Web Services (AWS) API.")
7812 (license license:asl2.0)))
7813
7814(define-public python2-botocore
7815 (package-with-python2 python-botocore))
7816
7817(define-public python-xdo
7818 (package
7819 (name "python-xdo")
7820 (version "0.3")
7821 (source (origin
7822 (method url-fetch)
7823 (uri (string-append
7824 "http://http.debian.net/debian/pool/main/p/python-xdo/"
7825 "python-xdo_" version ".orig.tar.gz"))
7826 (sha256
7827 (base32
7828 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
7829 (build-system python-build-system)
7830 (arguments
7831 '(#:phases
7832 (modify-phases %standard-phases
7833 (add-before 'install 'patch-libxdo-path
7834 ;; Hardcode the path of dynamically loaded libxdo library.
7835 (lambda* (#:key inputs #:allow-other-keys)
7836 (let ((libxdo (string-append
7837 (assoc-ref inputs "xdotool")
7838 "/lib/libxdo.so")))
7839 (substitute* "xdo/_xdo.py"
7840 (("find_library\\(\"xdo\"\\)")
7841 (simple-format #f "\"~a\"" libxdo)))
7842 #t))))
7843 #:tests? #f)) ; no tests provided
7844 (propagated-inputs
7845 `(("python-six" ,python-six)))
7846 (inputs
7847 `(("xdotool" ,xdotool)
7848 ("libX11" ,libx11)))
7849 (home-page "https://tracker.debian.org/pkg/python-xdo")
7850 (synopsis "Python library for simulating X11 keyboard/mouse input")
7851 (description "Provides bindings to libxdo for manipulating X11 via simulated
7852input. (Note that this is mostly a legacy library; you may wish to look at
7853python-xdo for newer bindings.)")
7854 (license license:bsd-3)))
7855
7856(define-public python2-xdo
7857 (package-with-python2 python-xdo))
7858
7859(define-public python-mako
7860 (package
7861 (name "python-mako")
7862 (version "1.0.7")
7863 (source
7864 (origin
7865 (method url-fetch)
7866 (uri (pypi-uri "Mako" version))
7867 (sha256
7868 (base32
7869 "1bi5gnr8r8dva06qpyx4kgjc6spm2k1y908183nbbaylggjzs0jf"))))
7870 (build-system python-build-system)
7871 (propagated-inputs
7872 `(("python-markupsafe" ,python-markupsafe)))
7873 (native-inputs
7874 `(("python-mock" ,python-mock)
7875 ("python-nose" ,python-nose)
7876 ("python-pytest" ,python-pytest)))
7877 (home-page "http://www.makotemplates.org/")
7878 (synopsis "Templating language for Python")
7879 (description "Mako is a templating language for Python that compiles
7880templates into Python modules.")
7881 (license license:expat)))
7882
7883(define-public python2-mako
7884 (package-with-python2 python-mako))
7885
7886(define-public python-waitress
7887 (package
7888 (name "python-waitress")
7889 (version "1.1.0")
7890 (source
7891 (origin
7892 (method url-fetch)
7893 (uri (pypi-uri "waitress" version))
7894 (patches (search-patches "python-waitress-fix-tests.patch"))
7895 (sha256
7896 (base32
7897 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
7898 (build-system python-build-system)
7899 (home-page "https://github.com/Pylons/waitress")
7900 (synopsis "Waitress WSGI server")
7901 (description "Waitress is meant to be a production-quality pure-Python WSGI
7902server with very acceptable performance.")
7903 (license license:zpl2.1)))
7904
7905(define-public python2-waitress
7906 (package-with-python2 python-waitress))
7907
7908(define-public python-pyquery
7909 (package
7910 (name "python-pyquery")
7911 (version "1.2.17")
7912 (source
7913 (origin
7914 (method url-fetch)
7915 (uri (pypi-uri "pyquery" version))
7916 (sha256
7917 (base32
7918 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
7919 (build-system python-build-system)
7920 (native-inputs
7921 `(("python-webob" ,python-webob)
7922 ("python-webtest" ,python-webtest)))
7923 (propagated-inputs
7924 `(("python-lxml" ,python-lxml)
7925 ("python-cssselect" ,python-cssselect)))
7926 (home-page "https://github.com/gawel/pyquery")
7927 (synopsis "Make jQuery-like queries on xml documents")
7928 (description "pyquery allows you to make jQuery queries on xml documents.
7929The API is as much as possible the similar to jQuery. pyquery uses lxml for
7930fast xml and html manipulation.")
7931 (license license:bsd-3)))
7932
7933(define-public python2-pyquery
7934 (package-with-python2 python-pyquery))
7935
7936(define-public python-anyjson
7937 (package
7938 (name "python-anyjson")
7939 (version "0.3.3")
7940 (source
7941 (origin
7942 (method url-fetch)
7943 (uri (pypi-uri "anyjson" version))
7944 (sha256
7945 (base32
7946 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
7947 (build-system python-build-system)
7948 (arguments
7949 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
7950 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
7951 ;; whatever) so this transformation needs to be done before the tests
7952 ;; can be run. Maybe we could add a build step to transform beforehand
7953 ;; but it could be annoying/difficult.
7954 ;; We can enable tests for the Python 2 version, though, and do below.
7955 #:tests? #f))
7956 (home-page "https://bitbucket.org/runeh/anyjson/")
7957 (synopsis
7958 "Wraps best available JSON implementation in a common interface")
7959 (description
7960 "Anyjson loads whichever is the fastest JSON module installed
7961and provides a uniform API regardless of which JSON implementation is used.")
7962 (license license:bsd-3)
7963 (properties `((python2-variant . ,(delay python2-anyjson))))))
7964
7965(define-public python2-anyjson
7966 (let ((anyjson (package-with-python2
7967 (strip-python2-variant python-anyjson))))
7968 (package
7969 (inherit anyjson)
7970 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
7971 #:tests? #t
7972 ,@(package-arguments anyjson)))
7973 (native-inputs `(("python2-nose" ,python2-nose))))))
7974
7975(define-public python-amqp
7976 (package
7977 (name "python-amqp")
7978 (version "2.3.2")
7979 (source
7980 (origin
7981 (method url-fetch)
7982 (uri (pypi-uri "amqp" version))
7983 (sha256
7984 (base32
7985 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
7986 (build-system python-build-system)
7987 (native-inputs
7988 `(("python-case" ,python-case)
7989 ("python-pytest-sugar" ,python-pytest-sugar)
7990 ("python-mock" ,python-mock)))
7991 (propagated-inputs
7992 `(("python-vine" ,python-vine)))
7993 (home-page "https://github.com/celery/py-amqp")
7994 (synopsis
7995 "Low-level AMQP client for Python (fork of amqplib)")
7996 (description
7997 "This is a fork of amqplib which was originally written by Barry Pederson.
7998It is maintained by the Celery project, and used by kombu as a pure python
7999alternative when librabbitmq is not available.")
8000 (license license:lgpl2.1+)
8001 (properties `((python2-variant . ,(delay python2-amqp))))))
8002
8003(define-public python2-amqp
8004 (let ((amqp (package-with-python2
8005 (strip-python2-variant python-amqp))))
8006 (package
8007 (inherit amqp)
8008 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
8009 ;; unmaintained. Weirdly, does not do this on the python 3
8010 ;; version?
8011 #:tests? #f
8012 ,@(package-arguments amqp))))))
8013
8014(define-public python-txamqp
8015 (package
8016 (name "python-txamqp")
8017 (version "0.8.2")
8018 (source
8019 (origin
8020 (method url-fetch)
8021 (uri (pypi-uri "txAMQP" version))
8022 (sha256
8023 (base32
8024 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
8025 (build-system python-build-system)
8026 (propagated-inputs
8027 `(("python-six" ,python-six)
8028 ("python-twisted" ,python-twisted)))
8029 (home-page "https://github.com/txamqp/txamqp")
8030 (synopsis "Communicate with AMQP peers and brokers using Twisted")
8031 (description
8032 "This package provides a Python library for communicating with AMQP peers
8033and brokers using the asynchronous networking framework Twisted. It contains
8034all the necessary code to connect, send and receive messages to/from an
8035AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
8036also includes support for using Thrift RPC over AMQP in Twisted
8037applications.")
8038 (license license:asl2.0)))
8039
8040(define-public python2-txamqp
8041 (package-with-python2 python-txamqp))
8042
8043(define-public python-kombu
8044 (package
8045 (name "python-kombu")
8046 (version "4.2.2")
8047 (source
8048 (origin
8049 (method url-fetch)
8050 (uri (pypi-uri "kombu" version))
8051 (sha256
8052 (base32
8053 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
8054 (build-system python-build-system)
8055 (native-inputs
8056 `(("python-mock" ,python-mock)
8057 ("python-case" ,python-case)
8058 ("python-pyro4" ,python-pyro4)
8059 ("python-pytest-sugar" ,python-pytest-sugar)
8060 ("python-pytz" ,python-pytz)))
8061 (propagated-inputs
8062 `(("python-anyjson" ,python-anyjson)
8063 ("python-amqp" ,python-amqp)
8064 ("python-redis" ,python-redis)))
8065 (home-page "https://kombu.readthedocs.io")
8066 (synopsis "Message passing library for Python")
8067 (description "The aim of Kombu is to make messaging in Python as easy as
8068possible by providing an idiomatic high-level interface for the AMQ protocol,
8069and also provide proven and tested solutions to common messaging problems.
8070AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
8071message orientation, queuing, routing, reliability and security, for which the
8072RabbitMQ messaging server is the most popular implementation.")
8073 (license license:bsd-3)
8074 (properties `((python2-variant . ,(delay python2-kombu))))))
8075
8076(define-public python2-kombu
8077 (let ((kombu (package-with-python2
8078 (strip-python2-variant python-kombu))))
8079 (package
8080 (inherit kombu)
8081 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
8082 ;; It works fine on the python3 variant.
8083 #:tests? #f
8084 ,@(package-arguments kombu)))
8085 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8086 ,@(package-native-inputs kombu))))))
8087
8088(define-public python-billiard
8089 (package
8090 (name "python-billiard")
8091 (version "3.5.0.5")
8092 (source
8093 (origin
8094 (method url-fetch)
8095 (uri (pypi-uri "billiard" version))
8096 (sha256
8097 (base32
8098 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
8099 (build-system python-build-system)
8100 (native-inputs
8101 `(("python-case" ,python-case)
8102 ("python-pytest" ,python-pytest)))
8103 (home-page "https://github.com/celery/billiard")
8104 (synopsis
8105 "Python multiprocessing fork with improvements and bugfixes")
8106 (description
8107 "Billiard is a fork of the Python 2.7 multiprocessing package. The
8108multiprocessing package itself is a renamed and updated version of R Oudkerk's
8109pyprocessing package. This standalone variant is intended to be compatible with
8110Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
8111 (license license:bsd-3)
8112 (properties `((python2-variant . ,(delay python2-billiard))))))
8113
8114(define-public python2-billiard
8115 (let ((billiard (package-with-python2
8116 (strip-python2-variant python-billiard))))
8117 (package
8118 (inherit billiard)
8119 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8120 ("python2-mock" ,python2-mock)
8121 ,@(package-native-inputs billiard))))))
8122
8123(define-public python-celery
8124 (package
8125 (name "python-celery")
8126 (version "4.2.1")
8127 (source
8128 (origin
8129 (method url-fetch)
8130 (uri (pypi-uri "celery" version))
8131 (sha256
8132 (base32
8133 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
8134 (build-system python-build-system)
8135 (arguments
8136 '(;; TODO The tests fail with Python 3.7
8137 ;; https://github.com/celery/celery/issues/4849
8138 #:tests? #f
8139 #:phases
8140 (modify-phases %standard-phases
8141 (add-after 'unpack 'patch-requirements
8142 (lambda _
8143 (substitute* "requirements/test.txt"
8144 (("pytest>=3\\.0,<3\\.3")
8145 "pytest>=3.0"))
8146 #t)))))
8147 (native-inputs
8148 `(("python-case" ,python-case)
8149 ("python-pytest" ,python-pytest)))
8150 (propagated-inputs
8151 `(("python-pytz" ,python-pytz)
8152 ("python-billiard" ,python-billiard)
8153 ("python-kombu" ,python-kombu)))
8154 (home-page "https://celeryproject.org")
8155 (synopsis "Distributed Task Queue")
8156 (description "Celery is an asynchronous task queue/job queue based on
8157distributed message passing. It is focused on real-time operation, but
8158supports scheduling as well. The execution units, called tasks, are executed
8159concurrently on a single or more worker servers using multiprocessing,
8160Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
8161synchronously (wait until ready).")
8162 (license license:bsd-3)
8163 (properties `((python2-variant . ,(delay python2-celery))))))
8164
8165(define-public python2-celery
8166 (let ((celery (package-with-python2
8167 (strip-python2-variant python-celery))))
8168 (package
8169 (inherit celery)
8170 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8171 ("python2-mock" ,python2-mock)
8172 ,@(package-native-inputs celery))))))
8173
8174(define-public python-translitcodec
8175 (package
8176 (name "python-translitcodec")
8177 (version "0.4.0")
8178 (source
8179 (origin
8180 (method url-fetch)
8181 (uri (pypi-uri "translitcodec" version))
8182 (sha256
8183 (base32
8184 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
8185 (build-system python-build-system)
8186 (arguments
8187 `(#:tests? #f)) ; no tests provided
8188 (home-page
8189 "https://github.com/claudep/translitcodec")
8190 (synopsis
8191 "Unicode to 8-bit charset transliteration codec")
8192 (description
8193 "This package contains codecs for transliterating ISO 10646 texts into
8194best-effort representations using smaller coded character sets (ASCII,
8195ISO 8859, etc.).")
8196 (license license:expat)))
8197
8198(define-public python2-translitcodec
8199 (package-with-python2 python-translitcodec))
8200
8201(define-public python-editor
8202 (package
8203 (name "python-editor")
8204 (version "0.5")
8205 (source
8206 (origin
8207 (method url-fetch)
8208 (uri (pypi-uri "python-editor" version))
8209 (sha256
8210 (base32
8211 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
8212 (build-system python-build-system)
8213 (home-page
8214 "https://github.com/fmoo/python-editor")
8215 (synopsis
8216 "Programmatically open an editor, capture the result")
8217 (description
8218 "python-editor is a library that provides the editor module for
8219programmatically interfacing with your system's $EDITOR.")
8220 (license license:asl2.0)))
8221
8222(define-public python2-editor
8223 (package-with-python2 python-editor))
8224
8225(define-public python-sphinxcontrib-programoutput
8226 (package
8227 (name "python-sphinxcontrib-programoutput")
8228 (version "0.10")
8229 (source (origin
8230 (method url-fetch)
8231 (uri (pypi-uri "sphinxcontrib-programoutput" version))
8232 (sha256
8233 (base32
8234 "153hhnlbx4688zj9wd64819ps5znc2jlyp5crkgzvn5hxgy99vpx"))))
8235 (build-system python-build-system)
8236 (arguments
8237 ;; FIXME: Many tests are failing and the upstream is gone.
8238 '(#:tests? #f))
8239 (propagated-inputs
8240 `(("python-sphinx" ,python-sphinx)))
8241 (synopsis "Sphinx extension to include program output")
8242 (description "A Sphinx extension to literally insert the output of arbitrary
8243commands into documents, helping you to keep your command examples up to date.")
8244 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
8245 (license license:bsd-2)))
8246
8247(define-public python2-sphinxcontrib-programoutput
8248 (package-with-python2 python-sphinxcontrib-programoutput))
8249
8250(define-public python-sphinx-repoze-autointerface
8251 (package
8252 (name "python-sphinx-repoze-autointerface")
8253 (version "0.8")
8254 (source (origin
8255 (method url-fetch)
8256 (uri (pypi-uri "repoze.sphinx.autointerface" version))
8257 (sha256
8258 (base32
8259 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
8260 (build-system python-build-system)
8261 (arguments '(#:tests? #f)) ; No tests.
8262 (propagated-inputs
8263 `(("python-sphinx" ,python-sphinx)
8264 ("python-zope-interface" ,python-zope-interface)))
8265 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
8266 (description "This package defines an extension for the Sphinx documentation
8267system. The extension allows generation of API documentation by
8268introspection of @code{zope.interface} instances in code.")
8269 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
8270 (license license:repoze)))
8271
8272(define-public python2-sphinx-repoze-autointerface
8273 (package-with-python2 python-sphinx-repoze-autointerface))
8274
8275(define-public python-vobject
8276 (package
8277 (name "python-vobject")
8278 (version "0.9.5")
8279 (source (origin
8280 (method url-fetch)
8281 (uri (pypi-uri "vobject" version))
8282 (sha256
8283 (base32
8284 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
8285 (build-system python-build-system)
8286 (arguments
8287 '(;; The test suite relies on some non-portable Windows interfaces.
8288 #:tests? #f))
8289 (propagated-inputs
8290 `(("python-dateutil" ,python-dateutil)
8291 ("python-pyicu" ,python-pyicu)))
8292 (synopsis "Parse and generate vCard and vCalendar files")
8293 (description "Vobject is intended to be a full featured Python package for
8294parsing and generating vCard and vCalendar files. Currently, iCalendar files
8295are supported and well tested. vCard 3.0 files are supported, and all data
8296should be imported, but only a few components are understood in a sophisticated
8297way.")
8298 (home-page "http://eventable.github.io/vobject/")
8299 (license license:asl2.0)))
8300
8301(define-public python2-vobject
8302 (package-with-python2 python-vobject))
8303
8304(define-public python-munkres
8305 (package
8306 (name "python-munkres")
8307 (version "1.0.8")
8308 (source (origin
8309 (method url-fetch)
8310 (uri (pypi-uri "munkres" version))
8311 (sha256
8312 (base32
8313 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
8314 (build-system python-build-system)
8315 (arguments
8316 '(#:tests? #f)) ; no test suite
8317 (home-page "http://software.clapper.org/munkres/")
8318 (synopsis "Implementation of the Munkres algorithm")
8319 (description "The Munkres module provides an implementation of the Munkres
8320algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
8321useful for solving the Assignment Problem.")
8322 (license license:bsd-3)))
8323
8324(define-public python2-munkres
8325 (package-with-python2 python-munkres))
8326
8327(define-public python-whoosh
8328 (package
8329 (name "python-whoosh")
8330 (version "2.7.4")
8331 (source
8332 (origin
8333 (method url-fetch)
8334 (uri (pypi-uri "Whoosh" version))
8335 (sha256
8336 (base32
8337 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
8338 (build-system python-build-system)
8339 (native-inputs
8340 `(("python-pytest" ,python-pytest)))
8341 (home-page "https://bitbucket.org/mchaput/whoosh")
8342 (synopsis "Full text indexing, search, and spell checking library")
8343 (description
8344 "Whoosh is a fast, pure-Python full text indexing, search, and spell
8345checking library.")
8346 (license license:bsd-2)))
8347
8348(define-public python2-whoosh
8349 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
8350 (package (inherit whoosh)
8351 (propagated-inputs
8352 `(("python2-backport-ssl-match-hostname"
8353 ,python2-backport-ssl-match-hostname)
8354 ,@(package-propagated-inputs whoosh))))))
8355
8356(define-public python-pathlib
8357 (package
8358 (name "python-pathlib")
8359 (version "1.0.1")
8360 (source (origin
8361 (method url-fetch)
8362 (uri (pypi-uri "pathlib" version))
8363 (sha256
8364 (base32
8365 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
8366 (build-system python-build-system)
8367 ;; The tests depend on the internal "test" module, which does not provide
8368 ;; a stable interface.
8369 (arguments `(#:tests? #f))
8370 (home-page "https://pathlib.readthedocs.org/")
8371 (synopsis "Object-oriented file system paths")
8372 (description "Pathlib offers a set of classes to handle file system paths.
8373It offers the following advantages over using string objects:
8374
8375@enumerate
8376@item No more cumbersome use of os and os.path functions. Everything can
8377be done easily through operators, attribute accesses, and method calls.
8378@item Embodies the semantics of different path types. For example,
8379comparing Windows paths ignores casing.
8380@item Well-defined semantics, eliminating any inconsistencies or
8381ambiguities (forward vs. backward slashes, etc.).
8382@end enumerate
8383
8384Note: In Python 3.4, pathlib is now part of the standard library. For other
8385Python versions please consider python-pathlib2 instead, which tracks the
8386standard library module. This module (python-pathlib) isn't maintained
8387anymore.")
8388 (license license:expat)))
8389
8390(define-public python2-pathlib
8391 (package-with-python2 python-pathlib))
8392
8393(define-public python2-pathlib2
8394 (package
8395 (name "python2-pathlib2")
8396 (version "2.3.2")
8397 (source (origin
8398 (method url-fetch)
8399 (uri (pypi-uri "pathlib2" version))
8400 (sha256
8401 (base32
8402 "10yb0iv5x2hs631rcppkhbddx799d3h8pcwmkbh2a66ns3w71ccf"))))
8403 (build-system python-build-system)
8404 ;; We only need the the Python 2 variant, since for Python 3 our minimum
8405 ;; version is 3.4 which already includes this package as part of the
8406 ;; standard library.
8407 (arguments
8408 `(#:python ,python-2))
8409 (propagated-inputs
8410 `(("python2-scandir" ,python2-scandir)
8411 ("python2-six" ,python2-six)))
8412 (home-page "https://pypi.python.org/pypi/pathlib2/")
8413 (synopsis "Object-oriented file system paths - backport of standard
8414pathlib module")
8415 (description "The goal of pathlib2 is to provide a backport of standard
8416pathlib module which tracks the standard library module, so all the newest
8417features of the standard pathlib can be used also on older Python versions.
8418
8419Pathlib offers a set of classes to handle file system paths. It offers the
8420following advantages over using string objects:
8421
8422@enumerate
8423@item No more cumbersome use of os and os.path functions. Everything can
8424be done easily through operators, attribute accesses, and method calls.
8425@item Embodies the semantics of different path types. For example,
8426comparing Windows paths ignores casing.
8427@item Well-defined semantics, eliminating any inconsistencies or
8428ambiguities (forward vs. backward slashes, etc.).
8429@end enumerate")
8430 (license license:expat)))
8431
8432(define-public python2-pathlib2-bootstrap
8433 (hidden-package
8434 (package
8435 (inherit python2-pathlib2)
8436 (name "python2-pathlib2-bootstrap")
8437 (propagated-inputs
8438 `(("python2-scandir" ,python2-scandir)
8439 ("python2-six" ,python2-six-bootstrap))))))
8440
8441(define-public python-jellyfish
8442 (package
8443 (name "python-jellyfish")
8444 (version "0.5.6")
8445 (source (origin
8446 (method url-fetch)
8447 (uri (pypi-uri "jellyfish" version))
8448 (sha256
8449 (base32
8450 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
8451 (build-system python-build-system)
8452 (native-inputs
8453 `(("python-pytest" ,python-pytest)))
8454 (home-page "https://github.com/jamesturk/jellyfish")
8455 (synopsis "Approximate and phonetic matching of strings")
8456 (description "Jellyfish uses a variety of string comparison and phonetic
8457encoding algorithms to do fuzzy string matching.")
8458 (license license:bsd-2)
8459 (properties `((python2-variant . ,(delay python2-jellyfish))))))
8460
8461(define-public python2-jellyfish
8462 (let ((jellyfish (package-with-python2
8463 (strip-python2-variant python-jellyfish))))
8464 (package (inherit jellyfish)
8465 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
8466 ,@(package-native-inputs jellyfish))))))
8467
8468(define-public python2-unicodecsv
8469 (package
8470 (name "python2-unicodecsv")
8471 (version "0.14.1")
8472 (source (origin
8473 (method url-fetch)
8474 ;; The test suite is not included in the PyPi release.
8475 ;; https://github.com/jdunck/python-unicodecsv/issues/19
8476 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
8477 "archive/" version ".tar.gz"))
8478 (file-name (string-append name "-" version ".tar.gz"))
8479 (sha256
8480 (base32
8481 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
8482 (build-system python-build-system)
8483 (arguments
8484 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
8485 #:python ,python-2))
8486 (native-inputs
8487 `(("python2-unittest2" ,python2-unittest2)))
8488 (home-page "https://github.com/jdunck/python-unicodecsv")
8489 (synopsis "Unicode CSV module for Python 2")
8490 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
8491module, adding support for Unicode strings.")
8492 (license license:bsd-2)))
8493
8494(define-public python-rarfile
8495 (package
8496 (name "python-rarfile")
8497 (version "2.8")
8498 (source (origin
8499 (method url-fetch)
8500 (uri (pypi-uri "rarfile" version))
8501 (sha256
8502 (base32
8503 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
8504 (build-system python-build-system)
8505 (arguments
8506 '(#:phases
8507 (modify-phases %standard-phases
8508 (replace 'check
8509 ;; Many tests fail, but the installation proceeds.
e59dd341 8510 (lambda _ (invoke "make" "-C" "test" "test"))))))
44d10b1f
RW
8511 (native-inputs
8512 `(("which" ,which))) ; required for tests
8513 (propagated-inputs
8514 `(("libarchive" ,libarchive)))
8515 (home-page "https://github.com/markokr/rarfile")
8516 (synopsis "RAR archive reader for Python")
8517 (description "This is Python module for RAR archive reading. The interface
8518is made as zipfile like as possible.")
8519 (license license:isc)))
8520
8521(define-public python2-rarfile
8522 (package-with-python2 python-rarfile))
8523
8524(define-public python-magic
8525 (package
8526 (name "python-magic")
8527 (version "0.4.15")
8528 (source
8529 (origin
8530 (method url-fetch)
8531 (uri (pypi-uri "python-magic" version))
8532 (sha256
8533 (base32
8534 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
8535 (file-name (string-append name "-" version "-checkout"))))
8536 (build-system python-build-system)
8537 (arguments
8538 ;; The tests are unreliable, so don't run them. The tests fail
8539 ;; under Python3 because they were written for Python2 and
8540 ;; contain import statements that do not work in Python3. One of
8541 ;; the tests fails under Python2 because its assertions are
8542 ;; overly stringent; it relies on comparing output strings which
8543 ;; are brittle and can change depending on the version of
8544 ;; libmagic being used and the system on which the test is
8545 ;; running. In my case, under GuixSD 0.10.0, only one test
8546 ;; failed, and it seems to have failed only because the version
8547 ;; of libmagic that is packaged in Guix outputs a slightly
8548 ;; different (but not wrong) string than the one that the test
8549 ;; expected.
8550 '(#:tests? #f
8551 #:phases (modify-phases %standard-phases
8552 ;; Replace a specific method call with a hard-coded
8553 ;; path to the necessary libmagic.so file in the
8554 ;; store. If we don't do this, then the method call
8555 ;; will fail to find the libmagic.so file, which in
8556 ;; turn will cause any application using
8557 ;; python-magic to fail.
8558 (add-before 'build 'hard-code-path-to-libmagic
8559 (lambda* (#:key inputs #:allow-other-keys)
8560 (let ((file (assoc-ref inputs "file")))
8561 (substitute* "magic.py"
8562 (("ctypes.util.find_library\\('magic'\\)")
8563 (string-append "'" file "/lib/libmagic.so'")))
8564 #t)))
8565 (add-before 'install 'disable-egg-compression
8566 (lambda _
8567 (let ((port (open-file "setup.cfg" "a")))
8568 (display "\n[easy_install]\nzip_ok = 0\n"
8569 port)
8570 (close-port port)
8571 #t))))))
8572 (inputs
8573 ;; python-magic needs to be able to find libmagic.so.
8574 `(("file" ,file)))
8575 (home-page
8576 "https://github.com/ahupp/python-magic")
8577 (synopsis
8578 "File type identification using libmagic")
8579 (description
8580 "This module uses ctypes to access the libmagic file type
8581identification library. It makes use of the local magic database and
8582supports both textual and MIME-type output. Note that this module and
8583the python-file module both provide a \"magic.py\" file; these two
8584modules, which are different and were developed separately, both serve
8585the same purpose: to provide Python bindings for libmagic.")
8586 (license license:expat)))
8587
8588(define-public python2-magic
8589 (package-with-python2 python-magic))
8590
8591(define-public python2-s3cmd
8592 (package
8593 (name "python2-s3cmd")
8594 (version "1.6.1")
8595 (source
8596 (origin
8597 (method url-fetch)
8598 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
8599 "s3cmd-" version ".tar.gz"))
8600 (sha256
8601 (base32
8602 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
8603 (build-system python-build-system)
8604 (arguments
8605 ;; s3cmd is written for python2 only and contains no tests.
8606 `(#:python ,python-2
8607 #:tests? #f))
8608 (propagated-inputs
8609 `(("python2-dateutil" ,python2-dateutil)
8610 ;; The python-file package also provides a magic.py module.
8611 ;; This is an unfortunate state of affairs; however, s3cmd
8612 ;; fails to install if it cannot find specifically the
8613 ;; python-magic package. Thus we include it, instead of using
8614 ;; python-file. Ironically, s3cmd sometimes works better
8615 ;; without libmagic bindings at all:
8616 ;; https://github.com/s3tools/s3cmd/issues/198
8617 ("python2-magic" ,python2-magic)))
8618 (home-page "http://s3tools.org/s3cmd")
8619 (synopsis "Command line tool for S3-compatible storage services")
8620 (description
8621 "S3cmd is a command line tool for uploading, retrieving and managing data
8622in storage services that are compatible with the Amazon Simple Storage
8623Service (S3) protocol, including S3 itself. It supports rsync-like backup,
8624GnuPG encryption, and more. It also supports management of Amazon's
8625CloudFront content delivery network.")
8626 (license license:gpl2+)))
8627
8628(define-public python-pkgconfig
8629 (package
8630 (name "python-pkgconfig")
8631 (version "1.3.1")
8632 (source
8633 (origin
8634 (method url-fetch)
8635 (uri (pypi-uri "pkgconfig" version))
8636 (sha256
8637 (base32
8638 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
8639 (build-system python-build-system)
8640 (native-inputs
8641 `(("python-nose" ,python-nose)))
8642 (inputs
8643 `(("pkg-config" ,pkg-config)))
8644 (arguments
8645 `(#:phases
8646 (modify-phases %standard-phases
8647 (add-before 'build 'patch
8648 ;; Hard-code the path to pkg-config.
8649 (lambda _
8650 (substitute* "pkgconfig/pkgconfig.py"
8651 (("cmd = 'pkg-config")
8652 (string-append "cmd = '" (which "pkg-config"))))
8653 #t))
8654 (replace 'check
8655 (lambda _
8656 (invoke "nosetests" "test.py"))))))
8657 (home-page "https://github.com/matze/pkgconfig")
8658 (synopsis "Python interface for pkg-config")
8659 (description "This module provides a Python interface to pkg-config. It
8660can be used to find all pkg-config packages, check if a package exists,
8661check if a package meets certain version requirements, query CFLAGS and
8662LDFLAGS and parse the output to build extensions with setup.py.")
8663 (license license:expat)))
8664
8665(define-public python2-pkgconfig
8666 (package-with-python2 python-pkgconfig))
8667
8668(define-public python-bz2file
8669 (package
8670 (name "python-bz2file")
8671 (version "0.98")
8672 (source
8673 (origin
8674 (method url-fetch)
8675 (uri (pypi-uri "bz2file" version))
8676 (sha256
8677 (base32
8678 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
8679 (build-system python-build-system)
8680 (arguments
8681 `(#:tests? #f)) ; Tests use deprecated python modules.
8682 (home-page "https://github.com/nvawda/bz2file")
8683 (synopsis "Read and write bzip2-compressed files")
8684 (description
8685 "Bz2file is a Python library for reading and writing bzip2-compressed
8686files. It contains a drop-in replacement for the I/O interface in the
8687standard library's @code{bz2} module, including features from the latest
8688development version of CPython that are not available in older releases.")
8689 (license license:asl2.0)))
8690
8691(define-public python2-bz2file
8692 (package-with-python2 python-bz2file))
8693
8694(define-public python-future
8695 (package
8696 (name "python-future")
8697 (version "0.16.0")
8698 (source
8699 (origin
8700 (method url-fetch)
8701 (uri (pypi-uri "future" version))
8702 (sha256
8703 (base32
8704 "1nzy1k4m9966sikp0qka7lirh8sqrsyainyf8rk97db7nwdfv773"))))
8705 (build-system python-build-system)
8706 ;; Many tests connect to the network or are otherwise flawed.
8707 ;; https://github.com/PythonCharmers/python-future/issues/210
8708 (arguments
8709 `(#:tests? #f))
8710 (home-page "http://python-future.org")
8711 (synopsis "Single-source support for Python 3 and 2")
8712 (description
8713 "@code{python-future} is the missing compatibility layer between Python 2 and
8714Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
8715to support both Python 2 and Python 3 with minimal overhead.")
8716 (license license:expat)))
8717
8718(define-public python2-future
8719 (package-with-python2 python-future))
8720
8721(define-public python-cysignals
8722 (package
8723 (name "python-cysignals")
8e3e51df 8724 (version "1.9.0")
44d10b1f
RW
8725 (source
8726 (origin
8727 (method url-fetch)
8e3e51df 8728 (uri (pypi-uri "cysignals" version))
44d10b1f
RW
8729 (sha256
8730 (base32
8e3e51df 8731 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
44d10b1f
RW
8732 (build-system python-build-system)
8733 (native-inputs
8734 `(("python-cython" ,python-cython)
8735 ("python-sphinx" ,python-sphinx)))
8736 (inputs
8737 `(("pari-gp" ,pari-gp)))
8738 (arguments
8739 `(#:modules ((guix build python-build-system)
8740 ((guix build gnu-build-system) #:prefix gnu:)
8741 (guix build utils))
8742 ;; FIXME: Tests are executed after installation and currently fail
8743 ;; when not installing into standard locations; the author is working
8744 ;; on a fix.
8745 #:tests? #f
8746 #:phases
8747 (modify-phases %standard-phases
8748 (add-before
8749 'build 'configure
8750 (assoc-ref gnu:%standard-phases 'configure)))))
8751 (home-page
8752 "https://github.com/sagemath/cysignals")
8753 (synopsis
8754 "Handling of interrupts and signals for Cython")
8755 (description
8756 "The cysignals package provides mechanisms to handle interrupts (and
8757other signals and errors) in Cython code, using two related approaches,
8758for mixed Cython/Python code or external C libraries and pure Cython code,
8759respectively.")
8760 (license license:lgpl3+)))
8761
8762(define-public python2-cysignals
8763 (package-with-python2 python-cysignals))
8764
8765(define-public python2-shedskin
8766 (package
8767 (name "python2-shedskin")
8768 (version "0.9.4")
8769 (source
8770 (origin
8771 (method url-fetch)
8772 (uri (string-append "https://github.com/shedskin/shedskin/"
8773 "releases/download/v" version
8774 "/shedskin-" version ".tgz"))
8775 (sha256
8776 (base32
8777 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
8778 (build-system python-build-system)
8779 (arguments
8780 `(#:python ,python-2
8781 #:phases (modify-phases %standard-phases
8782 (add-after 'unpack 'fix-resulting-include-libs
8783 (lambda* (#:key inputs #:allow-other-keys)
8784 (let ((libgc (assoc-ref inputs "libgc"))
8785 (pcre (assoc-ref inputs "pcre")))
8786 (substitute* "shedskin/makefile.py"
8787 (("variable == 'CCFLAGS':[ ]*")
8788 (string-append "variable == 'CCFLAGS':\n"
8789 " line += ' -I " pcre "/include"
8790 " -I " libgc "/include'"))
8791 (("variable == 'LFLAGS':[ ]*")
8792 (string-append "variable == 'LFLAGS':\n"
8793 " line += ' -L" pcre "/lib"
8794 " -L " libgc "/lib'")))
8795 #t))))))
8796 (inputs `(("pcre" ,pcre)
8797 ("libgc" ,libgc)))
8798 (home-page "https://shedskin.github.io/")
8799 (synopsis "Experimental Python-2 to C++ Compiler")
8800 (description (string-append "This is an experimental compiler for a subset of
8801Python. It generates C++ code and a Makefile."))
8802 (license (list license:gpl3 license:bsd-3 license:expat))))
8803
8804(define-public python2-rope
8805 (package
8806 (name "python2-rope")
8807 (version "0.10.3")
8808 (source
8809 (origin
8810 (method url-fetch)
8811 (uri (pypi-uri "rope" version))
8812 (sha256
8813 (base32
8814 "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
8815 (arguments
8816 ;; Rope is currently python-2 only.
8817 ;; https://github.com/python-rope/rope/issues/57
8818 `(#:python ,python-2))
8819 (build-system python-build-system)
8820 (native-inputs
8821 `(("python2-unittest2" ,python2-unittest2)))
8822 (home-page "https://github.com/python-rope/rope")
8823 (synopsis "Refactoring library for Python")
8824 (description "Rope is a refactoring library for Python. It facilitates
8825the renaming, moving and extracting of attributes, functions, modules, fields
8826and parameters in Python 2 source code. These refactorings can also be applied
8827to occurrences in strings and comments.")
8828 (license license:gpl2)))
8829
8830(define-public python-py3status
8831 (package
8832 (name "python-py3status")
8833 (version "3.7")
8834 (source
8835 (origin
8836 (method url-fetch)
8837 (uri (pypi-uri "py3status" version))
8838 (sha256
8839 (base32
8840 "0shxcfz4wcczj0mhwp4w0dvwd2fdd9bgprq8slim1519iiqzgwhq"))))
8841 (build-system python-build-system)
8842 (inputs
8843 `(("file" ,file)))
8844 (arguments
8845 '(#:phases
8846 (modify-phases %standard-phases
8847 ;; 'file' is used for detection of configuration file encoding
8848 ;; let's make link the dependency to particular input
8849 (add-before 'build 'patch-file-path
8850 (lambda* (#:key inputs #:allow-other-keys)
8851 (let ((file-path (assoc-ref inputs "file")))
8852 (substitute* "py3status/parse_config.py"
8853 (("\\['file', '-b'")
8854 (string-append "['" file-path "/bin/file', '-b'")))
8855 #t))))
8856 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
8857 (home-page "https://github.com/ultrabug/py3status")
8858 (synopsis "Extensible i3status wrapper written in Python")
8859 (description "py3status is an i3status wrapper which extends i3status
8860functionality in a modular way, allowing you to extend your panel with your
8861own code, responding to click events and updating clock every second.")
8862 (license license:bsd-3)))
8863
8864(define-public python-tblib
8865 (package
8866 (name "python-tblib")
8867 (version "1.3.2")
8868 (source (origin
8869 (method url-fetch)
8870 (uri (pypi-uri "tblib" version))
8871 (sha256 (base32
8872 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
8873 (build-system python-build-system)
8874 (arguments
8875 `(#:phases
8876 (modify-phases %standard-phases
8877 (add-before 'check 'adjust-tests
8878 (lambda _
8879 (when (which "python3")
8880 ;; Adjust the example output to match that of Python 3.7:
8881 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
8882 (substitute* "README.rst"
8883 (("Exception\\('fail',") "Exception('fail'"))
8884 #t)))
8885 (replace 'check
8886 (lambda _
8887 ;; Upstream runs tests after installation and the package itself
8888 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
8889 ;; found.
8890 (setenv "PYTHONPATH"
8891 (string-append (getcwd) "/build/lib:"
8892 (getenv "PYTHONPATH")))
8893 (invoke "py.test" "-vv" "tests" "README.rst"))))))
8894 (native-inputs
8895 `(("python-pytest" ,python-pytest)
8896 ("python-six" ,python-six)))
8897 (home-page "https://github.com/ionelmc/python-tblib")
8898 (synopsis "Traceback serialization library")
8899 (description
8900 "Traceback serialization allows you to:
8901
8902@enumerate
8903@item Pickle tracebacks and raise exceptions with pickled tracebacks in
8904different processes. This allows better error handling when running code over
8905multiple processes (imagine multiprocessing, billiard, futures, celery etc).
8906
8907@item Parse traceback strings and raise with the parsed tracebacks.
8908@end enumerate\n")
8909 (license license:bsd-3)))
8910
8911(define-public python2-tblib
8912 (package-with-python2 python-tblib))
8913
8914(define-public python-greenlet
8915 (package
8916 (name "python-greenlet")
8917 (version "0.4.15")
8918 (source (origin
8919 (method url-fetch)
8920 (uri (pypi-uri "greenlet" version))
8921 (sha256
8922 (base32
8923 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
8924 (build-system python-build-system)
8925 (home-page "https://greenlet.readthedocs.io/")
8926 (synopsis "Lightweight in-process concurrent programming")
8927 (description
8928 "Greenlet package is a spin-off of Stackless, a version of CPython
8929that supports micro-threads called \"tasklets\". Tasklets run
8930pseudo-concurrently (typically in a single or a few OS-level threads) and
8931are synchronized with data exchanges on \"channels\".")
8932 (license (list license:psfl license:expat))))
8933
8934(define-public python2-greenlet
8935 (package-with-python2 python-greenlet))
8936
8937(define-public python-objgraph
8938 (package
8939 (name "python-objgraph")
8940 (version "3.4.0")
8941 (source
8942 (origin
8943 (method url-fetch)
8944 (uri (pypi-uri "objgraph" version))
8945 (sha256
8946 (base32
8947 "184m09am5gpbqfaiy7l0hwh476mczbrly1dffs0rw2p1d1i2q32a"))))
8948 (build-system python-build-system)
8949 (propagated-inputs
8950 `(("python-graphviz" ,python-graphviz)))
8951 (native-inputs
8952 `(("python-mock" ,python-mock)
8953 ("graphviz" ,graphviz)))
8954 (home-page "https://mg.pov.lt/objgraph/")
8955 (synopsis "Draw Python object reference graphs with graphviz")
8956 (description
8957 "This package provides tools to draw Python object reference graphs with
8958graphviz.")
8959 (license license:expat)))
8960
8961(define-public python-gevent
8962 (package
8963 (name "python-gevent")
8964 (version "1.3.7")
8965 (source (origin
8966 (method url-fetch)
8967 (uri (pypi-uri "gevent" version))
8968 (sha256
8969 (base32
8970 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
8971 (modules '((guix build utils)))
8972 (snippet
8973 '(begin
8974 ;; unbunding libev and c-ares
8975 (delete-file-recursively "deps")
8976 #t))))
8977 (build-system python-build-system)
8978 (arguments
8979 `(#:modules ((ice-9 ftw)
8980 (ice-9 match)
8981 (srfi srfi-26)
8982 (guix build utils)
8983 (guix build python-build-system))
8984 #:phases (modify-phases %standard-phases
8985 (add-after 'unpack 'unpack-libev
8986 (lambda* (#:key inputs #:allow-other-keys)
8987 (mkdir-p "deps/libev")
8988 ;; FIXME: gevent requires building libev, even though
8989 ;; it only links against the proper one.
8990 (invoke "tar" "-xf" (assoc-ref inputs "libev-source")
8991 "--strip-components=1" "-C" "deps/libev")))
8992 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
8993 (lambda _
8994 (substitute* "src/gevent/subprocess.py"
8995 (("/bin/sh") (which "sh")))
8996 (for-each (lambda (file)
8997 (substitute* file
8998 (("/bin/sh") (which "sh"))
8999 (("/bin/true") (which "true"))))
9000 (find-files "src/greentest" "\\.py$"))
9001 #t))
9002 (add-before 'build 'do-not-use-bundled-sources
9003 (lambda* (#:key inputs #:allow-other-keys)
9004 (setenv "CONFIG_SHELL" (which "bash"))
9005 (setenv "LIBEV_EMBED" "false")
9006 (setenv "CARES_EMBED" "false")
9007 (setenv "EMBED" "false")
9008
9009 (let ((greenlet (string-append
9010 (assoc-ref inputs "python-greenlet")
9011 "/include")))
9012 (match (scandir greenlet
9013 (lambda (item)
9014 (string-prefix? "python" item)))
9015 ((python)
9016 (setenv "CPATH"
9017 (string-append greenlet "/" python)))))
9018 #t))
9019 (add-before 'check 'skip-timer-test
9020 (lambda _
9021 ;; XXX: Skip 'TestTimerResolution', which appears to be
9022 ;; unreliable.
9023 (substitute* "src/greentest/test__core_timer.py"
9024 (("not greentest.RUNNING_ON_CI") "False"))
9025 #t))
9026 (replace 'check
9027 (lambda _
9028 ;; Make sure the build directory is on PYTHONPATH.
9029 (setenv "PYTHONPATH"
9030 (string-append
9031 (getenv "PYTHONPATH") ":"
9032 (getcwd) "/build/"
9033 (car (scandir "build" (cut string-prefix? "lib." <>)))))
9034 (with-directory-excursion "src/greentest"
9035 ;; XXX: Many tests require network access. Instead we only
9036 ;; run known-good tests. Unfortunately we cannot use
9037 ;; recursion here since this directory also contains
9038 ;; Python-version-specific subfolders.
9039 (apply invoke "python" "testrunner.py" "--config"
9040 "known_failures.py"
9041 (scandir "." (cut regexp-exec
9042 (make-regexp "test_+(subprocess|core)")
9043 <>)))))))))
9044 (propagated-inputs
9045 `(("python-greenlet" ,python-greenlet)
9046 ("python-objgraph" ,python-objgraph)))
9047 (native-inputs
9048 `(("libev-source" ,(package-source libev))
9049 ("python-six" ,python-six)))
9050 (inputs
9051 `(("c-ares" ,c-ares)
9052 ("libev" ,libev)))
9053 (home-page "http://www.gevent.org/")
9054 (synopsis "Coroutine-based network library")
9055 (description
9056 "gevent is a coroutine-based Python networking library that uses greenlet
9057to provide a high-level synchronous API on top of the libev event loop.")
9058 (license license:expat)
9059 (properties `((python2-variant . ,(delay python2-gevent))))))
9060
9061(define-public python2-gevent
9062 (let ((base (package-with-python2
9063 (strip-python2-variant python-gevent))))
9064 (package
9065 (inherit base)
9066 (native-inputs `(,@(package-native-inputs python-gevent)
9067 ("python-mock" ,python2-mock))))))
9068
9069(define-public python-fastimport
9070 (package
9071 (name "python-fastimport")
9072 (version "0.9.6")
9073 (source
9074 (origin
9075 (method url-fetch)
9076 (uri (pypi-uri "fastimport" version))
9077 (sha256
9078 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
9079 (build-system python-build-system)
9080 (home-page "https://github.com/jelmer/python-fastimport")
9081 (synopsis "VCS fastimport parser and generator in Python")
9082 (description "This package provides a parser for and generator of the Git
9083@url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
9084format.")
9085 (license license:gpl2+)))
9086
9087(define-public python2-fastimport
9088 (package-with-python2 python-fastimport))
9089
9090(define-public python-twisted
9091 (package
9092 (name "python-twisted")
9093 (version "17.1.0")
9094 (source (origin
9095 (method url-fetch)
9096 (uri (pypi-uri "Twisted" version ".tar.bz2"))
9097 (sha256
9098 (base32
9099 "1p245mg15hkxp7hy5cyq2fgvlgjkb4cg0gwkwd148nzy1bbi3wnv"))))
9100 (build-system python-build-system)
9101 (arguments
9102 '(#:tests? #f)) ; FIXME: Some tests are failing.
9103 ;; #:phases
9104 ;; (modify-phases %standard-phases
9105 ;; (replace 'check
9106 ;; (lambda _
9107 ;; (zero? (system* "./bin/trial" "twisted")))))
9108 (propagated-inputs
9109 `(("python-zope-interface" ,python-zope-interface)
9110 ("python-incremental" ,python-incremental)
9111 ("python-constantly" ,python-constantly)
9112 ("python-automat" ,python-automat)))
9113 (home-page "https://twistedmatrix.com/")
9114 (synopsis "Asynchronous networking framework written in Python")
9115 (description
9116 "Twisted is an extensible framework for Python programming, with special
9117focus on event-based network programming and multiprotocol integration.")
9118 (license license:expat)))
9119
9120(define-public python2-twisted
9121 (package-with-python2 python-twisted))
9122
9123(define-public python-pika
9124 (package
9125 (name "python-pika")
9126 (version "0.12.0")
9127 (source
9128 (origin
9129 (method url-fetch)
9130 (uri (pypi-uri "pika" version))
9131 (sha256
9132 (base32
9133 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
9134 (build-system python-build-system)
9135 (native-inputs
9136 `(("python-pyev" ,python-pyev)
9137 ("python-tornado" ,python-tornado)
9138 ("python-twisted" ,python-twisted)))
9139 (home-page "https://pika.readthedocs.org")
9140 (synopsis "Pure Python AMQP Client Library")
9141 (description
9142 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
9143Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
9144network support library.")
9145 (license license:bsd-3)))
9146
9147(define-public python2-pika
9148 (package-with-python2 python-pika))
9149
9150(define-public python-ply
9151 (package
9152 (name "python-ply")
9153 (version "3.10")
9154 (source
9155 (origin
9156 (method url-fetch)
9157 (uri (pypi-uri "ply" version))
9158 (sha256
9159 (base32
9160 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
9161 (build-system python-build-system)
9162 (home-page "http://www.dabeaz.com/ply/")
9163 (synopsis "Python Lex & Yacc")
9164 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
9165It uses LR parsing and does extensive error checking.")
9166 (license license:bsd-3)))
9167
9168(define-public python2-ply
9169 (package-with-python2 python-ply))
9170
9171(define-public python-tabulate
9172 (package
9173 (name "python-tabulate")
9174 (version "0.7.7")
9175 (source (origin
9176 (method url-fetch)
9177 (uri (pypi-uri "tabulate" version))
9178 (sha256
9179 (base32
9180 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
9181 (build-system python-build-system)
9182 (arguments
9183 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
9184 ;; and the latest release is not tagged in the upstream repository.
9185 '(#:tests? #f))
9186 (home-page "https://bitbucket.org/astanin/python-tabulate")
9187 (synopsis "Pretty-print tabular data")
9188 (description
9189 "Tabulate is a library and command-line utility to pretty-print tabular
9190data in Python.")
9191 (license license:expat)))
9192
9193(define-public python2-tabulate
9194 (package-with-python2 python-tabulate))
9195
9196(define-public python-kazoo
9197 (package
9198 (name "python-kazoo")
9199 (version "2.4.0")
9200 (source
9201 (origin
9202 (method url-fetch)
9203 (uri (pypi-uri "kazoo" version))
9204 (sha256
9205 (base32
9206 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
9207 (build-system python-build-system)
9208 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
9209 (propagated-inputs
9210 `(("python-six" ,python-six)))
9211 (home-page "https://kazoo.readthedocs.org")
9212 (synopsis "High-level Zookeeper client library")
9213 (description
9214 "Kazoo is a Python client library for the Apache Zookeeper distributed
9215application service. It is designed to be easy to use and to avoid common
9216programming errors.")
9217 (license license:asl2.0)))
9218
9219(define-public python2-kazoo
9220 (package-with-python2 python-kazoo))
9221
9222(define-public python-pykafka
9223 (package
9224 (name "python-pykafka")
9225 (version "2.4.0")
9226 (source (origin
9227 (method url-fetch)
9228 (uri (string-append
9229 "https://pypi.python.org/packages/8b/3e/"
9230 "384eeff406b06315738b62483fd2126c6e4f544167116b17cc04ea7d2a59/"
9231 "pykafka-" version ".tar.gz"))
9232 (sha256
9233 (base32
9234 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
9235 (build-system python-build-system)
9236 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
9237 (propagated-inputs
9238 `(("python-gevent" ,python-gevent)
9239 ("python-kazoo" ,python-kazoo)
9240 ("python-tabulate" ,python-tabulate)))
9241 (inputs
9242 `(("librdkafka" ,librdkafka)))
9243 (home-page "https://pykafka.readthedocs.io/")
9244 (synopsis "Apache Kafka client for Python")
9245 (description
9246 "PyKafka is a client for the Apache Kafka distributed messaging system.
9247It includes Python implementations of Kafka producers and consumers, which
9248are optionally backed by a C extension built on librdkafka.")
9249 (license license:asl2.0)))
9250
9251(define-public python2-pykafka
9252 (package-with-python2 python-pykafka))
9253
9254(define-public python-wcwidth
9255 (package
9256 (name "python-wcwidth")
9257 (version "0.1.7")
9258 (source
9259 (origin
9260 (method url-fetch)
9261 (uri (pypi-uri "wcwidth" version))
9262 (sha256
9263 (base32
9264 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
9265 (build-system python-build-system)
9266 (home-page "https://github.com/jquast/wcwidth")
9267 (synopsis "Measure number of terminal column cells of wide-character codes")
9268 (description "Wcwidth measures the number of terminal column cells of
9269wide-character codes. It is useful for those implementing a terminal emulator,
9270or programs that carefully produce output to be interpreted by one. It is a
9271Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
9272specified in POSIX.1-2001 and POSIX.1-2008.")
9273 (license license:expat)))
9274
9275(define-public python2-wcwidth
9276 (package-with-python2 python-wcwidth))
9277
9278(define-public python2-jsonrpclib
9279 (package
9280 (name "python2-jsonrpclib")
9281 (version "0.1.7")
9282 (source (origin
9283 (method url-fetch)
9284 (uri (string-append
9285 "https://pypi.python.org/packages/source/j/jsonrpclib/"
9286 "jsonrpclib-" version ".tar.gz"))
9287 (sha256
9288 (base32
9289 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
9290 (build-system python-build-system)
9291 (arguments
9292 `(#:tests? #f
9293 #:python ,python-2))
9294 (home-page "https://github.com/joshmarshall/jsonrpclib/")
9295 (synopsis "Implementation of JSON-RPC specification for Python")
9296 (description
9297 "This library is an implementation of the JSON-RPC specification.
9298It supports both the original 1.0 specification, as well as the
9299new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
9300etc.")
9301 (license license:asl2.0)))
9302
9303(define-public python-chai
9304 (package
9305 (name "python-chai")
9306 (version "1.1.2")
9307 (source (origin
9308 (method url-fetch)
9309 (uri (pypi-uri "chai" version))
9310 (sha256
9311 (base32
9312 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
9313 (build-system python-build-system)
9314 (home-page "https://github.com/agoragames/chai")
9315 (synopsis "Mocking framework for Python")
9316 (description
9317 "Chai provides an api for mocking, stubbing and spying your python
9318objects, patterned after the Mocha library for Ruby.")
9319 (license license:bsd-3)))
9320
9321(define-public python2-chai
9322 (package-with-python2 python-chai))
9323
9324(define-public python-inflection
9325 (package
9326 (name "python-inflection")
9327 (version "0.3.1")
9328 (source
9329 (origin (method url-fetch)
9330 (uri (pypi-uri "inflection" version))
9331 (sha256
9332 (base32
9333 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
9334 (build-system python-build-system)
9335 (native-inputs
9336 `(("python-pytest" ,python-pytest)))
9337 (home-page "https://github.com/jpvanhal/inflection")
9338 (synopsis "Python string transformation library")
9339 (description
9340 "Inflection is a string transformation library. It singularizes
9341and pluralizes English words, and transforms strings from CamelCase to
9342underscored string.")
9343 (license license:expat)))
9344
9345(define-public python2-inflection
9346 (package-with-python2 python-inflection))
9347
9348(define-public python-pylev
9349 (package
9350 (name "python-pylev")
9351 (version "1.3.0")
9352 (source (origin
9353 (method url-fetch)
9354 (uri (pypi-uri "pylev" version))
9355 (sha256
9356 (base32
9357 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
9358 (build-system python-build-system)
9359 (home-page "https://github.com/toastdriven/pylev")
9360 (synopsis "Levenshtein distance implementation in Python")
9361 (description "Pure Python Levenshtein implementation, based off the
9362Wikipedia code samples at
9363@url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
9364 (license license:bsd-3)))
9365
9366(define-public python2-pylev
9367 (package-with-python2 python-pylev))
9368
9369(define-public python-cleo
9370 (package
9371 (name "python-cleo")
9372 (version "0.6.1")
9373 (source (origin
9374 (method url-fetch)
9375 (uri (pypi-uri "cleo" version))
9376 (sha256
9377 (base32
9378 "0q1cf0szr0d54am4pypzwdnm74zpladdsinad94c2fz5i06fdpf7"))))
9379 (build-system python-build-system)
9380 (native-inputs
9381 `(;; For testing
9382 ("python-mock" ,python-mock)
9383 ("python-pytest-mock" ,python-pytest-mock)
9384 ("python-pytest" ,python-pytest)))
9385 (propagated-inputs
9386 `(("python-backpack" ,python-backpack)
9387 ("python-pastel" ,python-pastel)
9388 ("python-pylev" ,python-pylev)))
9389 (home-page "https://github.com/sdispater/cleo")
9390 (synopsis "Command-line arguments library for Python")
9391 (description
9392 "Cleo allows you to create command-line commands with signature in
9393docstring and colored output.")
9394 (license license:expat)))
9395
9396(define-public python2-cleo
9397 (package-with-python2 python-cleo))
9398
9399(define-public python-lazy-object-proxy
9400 (package
9401 (name "python-lazy-object-proxy")
9402 (version "1.3.1")
9403 (source (origin
9404 (method url-fetch)
9405 (uri (pypi-uri "lazy-object-proxy" version))
9406 (sha256
9407 (base32
9408 "0yha7q9bhw857fwaby785d63mffhngl9npwzlk9i0pwlkwvbx4gb"))))
9409 (build-system python-build-system)
9410 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
9411 (synopsis "Lazy object proxy for python")
9412 (description
9413 "Lazy object proxy is an object that wraps a callable but defers the call
9414until the object is actually required, and caches the result of said call.")
9415 (license license:bsd-2)))
9416
9417(define-public python2-lazy-object-proxy
9418 (package-with-python2 python-lazy-object-proxy))
9419
9420(define-public python-dnspython
9421 (package
9422 (name "python-dnspython")
9423 (version "1.15.0")
9424 (source (origin
9425 (method url-fetch)
9426 (uri (string-append "http://www.dnspython.org/kits/"
9427 version "/dnspython-" version ".tar.gz"))
9428 (sha256
9429 (base32
9430 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
9431 (build-system python-build-system)
9432 (arguments '(#:tests? #f)) ; XXX: requires internet access
9433 (home-page "http://www.dnspython.org")
9434 (synopsis "DNS toolkit for Python")
9435 (description
9436 "dnspython is a DNS toolkit for Python. It supports almost all record
9437types. It can be used for queries, zone transfers, and dynamic updates.
9438It supports TSIG authenticated messages and EDNS0.")
9439 (license license:expat)))
9440
9441(define-public python2-dnspython
9442 (package-with-python2 python-dnspython))
9443
9444(define-public python-email-validator
9445 (package
9446 (name "python-email-validator")
9447 (version "1.0.2")
9448 (source
9449 (origin (method url-fetch)
9450 (uri (pypi-uri "email_validator" version))
9451 (sha256
9452 (base32
9453 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
9454 (build-system python-build-system)
9455 (arguments
9456 '(#:phases
9457 (modify-phases %standard-phases
9458 (add-before 'build 'use-dnspython
9459 (lambda _
9460 (substitute* "setup.py"
9461 (("dnspython3") "dnspython"))
9462 #t)))))
9463 (propagated-inputs
9464 `(("python-dnspython" ,python-dnspython)
9465 ("python-idna" ,python-idna)))
9466 (home-page "https://github.com/JoshData/python-email-validator")
9467 (synopsis "Email address validation library for Python")
9468 (description
9469 "This library validates email address syntax and deliverability.")
9470 (license license:cc0)))
9471
9472(define-public python2-email-validator
9473 (package-with-python2 python-email-validator))
9474
9475(define-public python-ukpostcodeparser
9476 (package
9477 (name "python-ukpostcodeparser")
9478 (version "1.0.3")
9479 (source (origin
9480 (method url-fetch)
9481 (uri (pypi-uri "UkPostcodeParser" version))
9482 (sha256
9483 (base32
9484 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
9485 (build-system python-build-system)
9486 (home-page "https://github.com/hamstah/ukpostcodeparser")
9487 (synopsis "UK Postcode parser for Python")
9488 (description
9489 "This library provides the @code{parse_uk_postcode} function for
9490parsing UK postcodes.")
9491 (license license:expat)))
9492
9493(define-public python2-ukpostcodeparser
9494 (package-with-python2 python-ukpostcodeparser))
9495
9496(define-public python-faker
9497 (package
9498 (name "python-faker")
9499 (version "0.7.9")
9500 (source (origin
9501 (method url-fetch)
9502 (uri (pypi-uri "Faker" version))
9503 (sha256
9504 (base32
9505 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
9506 (patches
9507 (search-patches "python-faker-fix-build-32bit.patch"))
9508 (modules '((guix build utils)))
9509 (snippet
9510 '(begin
9511 (for-each delete-file (find-files "." "\\.pyc$"))
9512 #t))))
9513 (build-system python-build-system)
9514 (arguments
9515 '(#:phases
9516 (modify-phases %standard-phases
9517 (replace 'check
49ff8827 9518 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
44d10b1f
RW
9519 (native-inputs
9520 `(;; For testing
9521 ("python-email-validator" ,python-email-validator)
9522 ("python-mock" ,python-mock)
9523 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
9524 (propagated-inputs
9525 `(("python-dateutil" ,python-dateutil)
9526 ("python-six" ,python-six)))
9527 (home-page "https://github.com/joke2k/faker")
9528 (synopsis "Python package that generates fake data")
9529 (description
9530 "Faker is a Python package that generates fake data such as names,
9531addresses, and phone numbers.")
9532 (license license:expat)
9533 (properties `((python2-variant . ,(delay python2-faker))))))
9534
9535(define-public python2-faker
9536 (let ((base (package-with-python2 (strip-python2-variant
9537 python-faker))))
9538 (package
9539 (inherit base)
9540 (propagated-inputs
9541 `(("python2-ipaddress" ,python2-ipaddress)
9542 ,@(package-propagated-inputs base))))))
9543
9544(define-public python-pyaml
9545 (package
9546 (name "python-pyaml")
9547 (version "18.11.0")
9548 (source (origin
9549 (method url-fetch)
9550 (uri (pypi-uri "pyaml" version))
9551 (sha256
9552 (base32
9553 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
9554 (build-system python-build-system)
9555 (native-inputs
9556 `(("python-unidecode" ,python-unidecode)))
9557 (propagated-inputs
9558 `(("python-pyyaml" ,python-pyyaml)))
9559 (home-page "https://github.com/mk-fg/pretty-yaml")
9560 (synopsis "YAML pretty-print library for Python")
9561 (description
9562 "pyaml is a PyYAML based python module to produce pretty and readable
9563YAML-serialized data.")
9564 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
9565
9566(define-public python2-pyaml
9567 (package-with-python2 python-pyaml))
9568
9569(define-public python-backpack
9570 (package
9571 (name "python-backpack")
9572 (version "0.1")
9573 (source
9574 (origin
9575 (method url-fetch)
9576 (uri (pypi-uri "backpack" version))
9577 (sha256
9578 (base32
9579 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
9580 (build-system python-build-system)
9581 (native-inputs
9582 `(("python-pytest" ,python-pytest)
9583 ("python-nose" ,python-nose)))
9584 (propagated-inputs
9585 `(("python-simplejson" ,python-simplejson)))
9586 (home-page "https://github.com/sdispater/backpack")
9587 (synopsis "Utilities for working with Python collections")
9588 (description "Backpack provides some useful utilities for working with
9589collections of data.")
9590 (license license:expat)))
9591
9592(define-public python2-backpack
9593 (package-with-python2 python-backpack))
9594
9595(define-public python-prompt-toolkit
9596 (package
9597 (name "python-prompt-toolkit")
9598 (version "2.0.7")
9599 (source
9600 (origin
9601 (method url-fetch)
9602 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
9603 (sha256
9604 (base32
9605 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
9606 (build-system python-build-system)
9607 (arguments
9608 `(#:phases
9609 (modify-phases %standard-phases
9610 (delete 'check)
9611 (add-after 'install 'post-install-check
9612 (lambda* (#:key inputs outputs #:allow-other-keys)
9613 ;; HOME is needed for the test
9614 ;; "test_pathcompleter_can_expanduser".
9615 (setenv "HOME" "/tmp")
9616 (add-installed-pythonpath inputs outputs)
9617 (invoke "py.test"))))))
9618 (propagated-inputs
9619 `(("python-wcwidth" ,python-wcwidth)
9620 ("python-six" ,python-six)
9621 ("python-pygments" ,python-pygments)))
9622 (native-inputs
9623 `(("python-pytest" ,python-pytest)))
9624 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
9625 (synopsis "Library for building command line interfaces in Python")
9626 (description
9627 "Prompt-Toolkit is a library for building interactive command line
9628interfaces in Python. It's like GNU Readline but it also features syntax
9629highlighting while typing, out-of-the-box multi-line input editing, advanced
9630code completion, incremental search, support for Chinese double-width
9631characters, mouse support, and auto suggestions.")
9632 (license license:bsd-3)))
9633
9634(define-public python2-prompt-toolkit
9635 (package-with-python2 python-prompt-toolkit))
9636
9637(define-public python-prompt-toolkit-1
9638 (package (inherit python-prompt-toolkit)
9639 (version "1.0.15")
9640 (source
9641 (origin
9642 (method url-fetch)
9643 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
9644 (sha256
9645 (base32
9646 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
9647
9648(define-public python2-prompt-toolkit-1
9649 (package-with-python2 python-prompt-toolkit-1))
9650
9651(define-public python-jedi
9652 (package
9653 (name "python-jedi")
9654 (version "0.13.1")
9655 (source
9656 (origin
9657 (method url-fetch)
9658 (uri (pypi-uri "jedi" version))
9659 (sha256
9660 (base32
9661 "0j11q42g5vjkyhhjpyy8nb0gdxs78m3rpjai7p1hvgpyl9rkyjdp"))))
9662 (build-system python-build-system)
9663 (arguments
9664 `( ;; Many tests are failing with Python 3.7.x as of version 0.13.1 (see:
9665 ;; https://github.com/davidhalter/jedi/issues/1263)
9666 #:tests? #f
9667 #:phases
9668 (modify-phases %standard-phases
9669 (replace 'check
9670 (lambda* (#:key tests? #:allow-other-keys)
9671 (when tests?
9672 (invoke "py.test" "-vv")))))))
9673 (native-inputs
9674 `(("python-pytest" ,python-pytest)
9675 ("python-docopt" ,python-docopt)))
9676 (propagated-inputs
9677 `(("python-parso" ,python-parso)))
9678 (home-page "https://github.com/davidhalter/jedi")
9679 (synopsis "Autocompletion and static analysis library for Python")
9680 (description
9681 "Jedi is a static analysis tool for Python that can be used in Integrated
9682Development Environments (@dfn{IDE}s) and text editors. It understands Python
9683on a deeper level than many other static analysis frameworks for Python.
9684
9685Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
9686well.")
9687 (license license:expat)))
9688
9689(define-public python2-jedi
9690 (package-with-python2 python-jedi))
9691
9692(define-public ptpython
9693 (package
9694 (name "ptpython")
9695 (version "0.34")
9696 (source (origin
9697 (method url-fetch)
9698 (uri (pypi-uri "ptpython" version))
9699 (sha256
9700 (base32
9701 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
9702 (build-system python-build-system)
9703 (arguments
9704 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
9705 (propagated-inputs
9706 `(("python-docopt" ,python-docopt)
9707 ("python-jedi" ,python-jedi)
9708 ("python-prompt-toolkit" ,python-prompt-toolkit)
9709 ("python-pygments" ,python-pygments)))
9710 (home-page "https://github.com/jonathanslenders/ptpython")
9711 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
9712 (description
9713 "ptpython is a Python read-eval-print loop with IDE-like features.
9714It supports syntax highlighting, multiline editing, autocompletion, mouse,
9715color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
9716etc.")
9717 (license license:bsd-3)
9718 (properties `((python2-variant . ,(delay ptpython-2))))))
9719
9720(define-public ptpython-2
9721 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
9722 (package
9723 (inherit base)
9724 (name "ptpython2"))))
9725
9726(define-public python-stem
9727 (package
9728 (name "python-stem")
9729 (version "1.7.0")
9730 (source
9731 (origin
9732 (method url-fetch)
9733 (uri (pypi-uri "stem" version))
9734 (sha256
9735 (base32
9736 "1awiglfiajnx2hva9aqpj3fmdvdb4qg7cwnlfyih827m68y3cq8v"))))
9737 (build-system python-build-system)
9738 (arguments
9739 `(#:phases
9740 (modify-phases %standard-phases
9741 (replace 'check
9742 (lambda _
9743 (invoke "./run_tests.py" "--unit")
9744 #t)))))
9745 (native-inputs
9746 `(("python-mock" ,python-mock)
9747 ("python-pycodestyle" ,python-pycodestyle)
9748 ("python-pyflakes" ,python-pyflakes)))
9749 (home-page "https://stem.torproject.org/")
9750 (synopsis
9751 "Python controller library that allows applications to interact with Tor")
9752 (description
9753 "Stem is a Python controller library for Tor. With it you can use Tor's
9754control protocol to script against the Tor process and read descriptor data
9755relays publish about themselves.")
9756 (license license:lgpl3)))
9757
9758(define-public python2-stem
9759 (package-with-python2 python-stem))
9760
9761(define-public python-pyserial
9762 (package
9763 (name "python-pyserial")
9764 (version "3.1.1")
9765 (source
9766 (origin
9767 (method url-fetch)
9768 (uri (pypi-uri "pyserial" version))
9769 (sha256
9770 (base32
9771 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
9772 (build-system python-build-system)
9773 (arguments
9774 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
9775 ;; #:phases
9776 ;; (modify-phases %standard-phases
9777 ;; (replace 'check
9778 ;; (lambda _
9779 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
9780 (home-page
9781 "https://github.com/pyserial/pyserial")
9782 (synopsis "Python Serial Port Bindings")
9783 (description "@code{pyserial} provide serial port bindings for Python. It
9784supports different byte sizes, stop bits, parity and flow control with RTS/CTS
9785and/or Xon/Xoff. The port is accessed in RAW mode.")
9786 (license license:bsd-3)))
9787
9788(define-public python2-pyserial
9789 (package-with-python2 python-pyserial))
9790
9791(define-public python-kivy
9792 (package
9793 (name "python-kivy")
9794 (version "1.10.1")
9795 (source
9796 (origin
9797 (method url-fetch)
9798 (uri (pypi-uri "Kivy" version))
9799 (file-name (string-append name "-" version ".tar.gz"))
9800 (sha256
9801 (base32
9802 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
9803 (build-system python-build-system)
9804 (arguments
9805 `(#:tests? #f ; Tests require many optional packages
9806 #:phases
9807 (modify-phases %standard-phases
9808 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
9809 (lambda* (#:key inputs #:allow-other-keys)
9810 (setenv "KIVY_SDL2_PATH"
9811 (string-append (assoc-ref inputs "sdl-union")
9812 "/include/SDL2"))
9813 #t)))))
9814 (native-inputs
9815 `(("git" ,git)
9816 ("pkg-config" ,pkg-config)
9817 ("python-cython" ,python-cython)))
9818 (inputs
9819 `(("gstreamer" ,gstreamer)
9820 ("mesa" ,mesa)
9821 ("sdl-union"
9822 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
9823 (home-page "http://kivy.org")
9824 (synopsis
9825 "Multitouch application framework")
9826 (description
9827 "A software library for rapid development of
9828hardware-accelerated multitouch applications.")
9829 (license license:expat)))
9830
9831(define-public python2-kivy
9832 (package-with-python2 python-kivy))
9833
9834(define-public python-kivy-next
9835 (deprecated-package "python-kivy-next" python-kivy))
9836
9837(define-public python2-kivy-next
9838 (deprecated-package "python2-kivy-next" python2-kivy))
9839
9840(define-public python-binaryornot
9841 (package
9842 (name "python-binaryornot")
9843 (version "0.4.4")
9844 (source (origin
9845 (method url-fetch)
9846 (uri (pypi-uri "binaryornot" version))
9847 (sha256
9848 (base32
9849 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
9850 (build-system python-build-system)
9851 (propagated-inputs
9852 `(("python-chardet" ,python-chardet)
9853 ("python-hypothesis" ,python-hypothesis)))
9854 (home-page "https://github.com/audreyr/binaryornot")
9855 (synopsis "Package to check if a file is binary or text")
9856 (description "Ultra-lightweight pure Python package to check if a file is
9857binary or text.")
9858 (license license:bsd-3)
9859 (properties `((python2-variant . ,(delay python2-binaryornot))))))
9860
9861(define-public python2-binaryornot
9862 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
9863 (package (inherit base)
9864 (propagated-inputs
9865 `(("python2-enum34" ,python2-enum34)
9866 ,@(package-propagated-inputs base))))))
9867
9868(define-public python-nltk
9869 (package
9870 (name "python-nltk")
9871 (version "3.2.1")
9872 (source (origin
9873 (method url-fetch)
9874 (uri (pypi-uri "nltk" version))
9875 (sha256
9876 (base32
9877 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
9878 (build-system python-build-system)
9879 (arguments
9880 '(;; The tests require some extra resources to be downloaded.
9881 ;; TODO Try packaging these resources.
9882 #:tests? #f))
9883 (home-page "http://nltk.org/")
9884 (synopsis "Natural Language Toolkit")
9885 (description "It provides interfaces to over 50 corpora and lexical
9886resources such as WordNet, along with a suite of text processing libraries
9887for classification, tokenization, stemming, tagging, parsing, and semantic
9888reasoning, wrappers for natural language processing libraries.")
9889 (license license:asl2.0)))
9890
9891(define-public python2-nltk
9892 (package-with-python2 python-nltk))
9893
9894(define-public python-pymongo
9895 (package
9896 (name "python-pymongo")
9897 (version "3.7.2")
9898 (source (origin
9899 (method url-fetch)
9900 (uri (pypi-uri "pymongo" version))
9901 (sha256
9902 (base32
9903 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
9904 (build-system python-build-system)
9905 (propagated-inputs
9906 `(("python-certifi" ,python-certifi)))
9907 (home-page "https://github.com/mongodb/mongo-python-driver")
9908 (synopsis "Python driver for MongoDB")
9909 (description "Python driver for MongoDB.")
9910 (license license:asl2.0)))
9911
9912(define-public python2-pymongo
9913 (package-with-python2 python-pymongo))
9914
9915(define-public python-sh
9916 (package
9917 (name "python-sh")
9918 (version "1.11")
9919 (source (origin
9920 (method url-fetch)
9921 (uri (pypi-uri "sh" version))
9922 (sha256
9923 (base32
9924 "192r0mpv6dmkysjzhc43ddffiwb5g7c76bgr1mb1z2xz9awbj3sr"))))
9925 (build-system python-build-system)
9926 (arguments
9927 `(#:tests? #f)) ; no tests
9928 (home-page "https://github.com/amoffat/sh")
9929 (synopsis "Python subprocess interface")
9930 (description "Abstracts process invocation by providing a function
9931interface for programs.")
9932 (license license:expat)))
9933
9934(define-public python2-sh
9935 (package-with-python2 python-sh))
9936
9937(define-public python-consul
9938 (package
9939 (name "python-consul")
9940 (version "0.6.1")
9941 (source
9942 (origin
9943 (method url-fetch)
9944 (uri (pypi-uri "python-consul" version))
9945 (sha256
9946 (base32
9947 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
9948 (build-system python-build-system)
9949 (arguments
9950 '(#:tests? #f)) ; The tests are not distributed
9951 (propagated-inputs
9952 `(("python-requests" ,python-requests)
9953 ("python-six" ,python-six)))
9954 (home-page "https://github.com/cablehead/python-consul")
9955 (synopsis "Python client for Consul")
9956 (description
9957 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
9958discovery, monitoring and configuration.")
9959 (license license:expat)))
9960
9961(define-public python2-consul
9962 (package-with-python2 python-consul))
9963
9964(define-public python-schematics
9965 (package
9966 (name "python-schematics")
9967 (version "1.1.1")
9968 (source
9969 (origin
9970 (method url-fetch)
9971 (uri (string-append
9972 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
9973 (file-name (string-append name "-" version ".tar.gz"))
9974 (sha256
9975 (base32
9976 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
9977 (build-system python-build-system)
9978 (propagated-inputs
9979 `(("python-six" ,python-six)))
9980 (arguments
9981 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
9982 ; version requirements (eg python-coveralls)
9983 (home-page "https://github.com/schematics/schematics")
9984 (synopsis "Python Data Structures for Humans")
9985 (description "Python Data Structures for Humans.")
9986 (license license:bsd-3)))
9987
9988(define-public python2-schematics
9989 (package-with-python2 python-schematics))
9990
9991(define-public python-odfpy
9992 (package
9993 (name "python-odfpy")
9994 (version "1.3.3")
9995 (source (origin
9996 (method url-fetch)
9997 (uri (pypi-uri "odfpy" version))
9998 (sha256
9999 (base32
10000 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
10001 (arguments
10002 `(#:modules ((srfi srfi-1)
10003 (guix build python-build-system)
10004 (guix build utils))
10005 #:phases
10006 (modify-phases %standard-phases
10007 (replace 'check
10008 ;; The test runner invokes python2 and python3 for test*.py.
10009 ;; To avoid having both in inputs, we replicate it here.
10010 (lambda _
21ccc01d
RW
10011 (for-each (lambda (test-file) (invoke "python" test-file))
10012 (find-files "tests" "^test.*\\.py$"))
10013 #t)))))
44d10b1f
RW
10014 (build-system python-build-system)
10015 (home-page "https://github.com/eea/odfpy")
10016 (synopsis "Python API and tools to manipulate OpenDocument files")
10017 (description "Collection of libraries and utility programs written in
10018Python to manipulate OpenDocument 1.2 files.")
10019 (license
10020 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
10021 ;; number of files with other licenses.
10022 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
10023
10024(define-public python2-odfpy
10025 (package-with-python2 python-odfpy))
10026
10027(define-public python-natsort
10028 (package
10029 (name "python-natsort")
10030 (version "5.4.1")
10031 (source (origin
10032 (method url-fetch)
10033 (uri (pypi-uri "natsort" version))
10034 (sha256
10035 (base32
10036 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
10037 (build-system python-build-system)
10038 (arguments
10039 `(#:modules ((guix build utils)
10040 (guix build python-build-system)
10041 (srfi srfi-1)
10042 (srfi srfi-26)
10043 (ice-9 ftw))
10044 #:phases
10045 (modify-phases %standard-phases
10046 (add-before 'check 'set-cachedir
10047 ;; Tests require write access to $HOME by default
10048 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
10049 (replace 'check
10050 (lambda _
10051 (let ((cwd (getcwd)))
10052 (setenv "PYTHONPATH"
10053 (string-append
10054 cwd "/build/"
10055 (find (cut string-prefix? "lib" <>)
10056 (scandir (string-append cwd "/build")))
10057 ":"
10058 (getenv "PYTHONPATH")))
10059 (invoke "pytest" "-v")))))))
10060 (native-inputs
10061 `(("python-hypothesis" ,python-hypothesis)
10062 ("python-pytest-cov" ,python-pytest-cov)
10063 ("python-pytest-mock" ,python-pytest-mock)
10064 ("python-pytest" ,python-pytest)))
10065 (propagated-inputs ; TODO: Add python-fastnumbers.
10066 `(("python-pyicu" ,python-pyicu)))
10067 (home-page "https://github.com/SethMMorton/natsort")
10068 (synopsis "Natural sorting for python and shell")
10069 (description
10070 "Natsort lets you apply natural sorting on lists instead of
10071lexicographical. If you use the built-in @code{sorted} method in python
10072on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
10073returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
10074function @code{natsorted} that identifies numbers and sorts them separately
10075from strings. It can also sort version numbers, real numbers, mixed types
10076and more, and comes with a shell command @command{natsort} that exposes this
10077functionality in the command line.")
10078 (license license:expat)
10079 (properties `((python2-variant . ,(delay python2-natsort))))))
10080
10081(define-public python2-natsort
10082 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
10083 (package (inherit base)
10084 (native-inputs
10085 `(("python2-pathlib" ,python2-pathlib)
10086 ,@(package-native-inputs base))))))
10087
10088(define-public python-glances
10089 (package
10090 (name "python-glances")
10091 (version "3.0.2")
10092 (source
10093 (origin
10094 (method url-fetch)
10095 (uri (pypi-uri "Glances" version))
10096 (sha256
10097 (base32
10098 "09fxysfp1n16csqvzvawy74qm6a94nvwjf3vcf5gkqp4i6k4vjjy"))))
10099 (build-system python-build-system)
10100 (propagated-inputs
10101 `(("python-psutil" ,python-psutil)))
10102 (home-page
10103 "https://github.com/nicolargo/glances")
10104 (synopsis
10105 "A cross-platform curses-based monitoring tool")
10106 (description
10107 "Glances is a curses-based monitoring tool for a wide variety of platforms.
10108Glances uses the PsUtil library to get information from your system. It monitors
10109CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
10110 (license license:lgpl3+)))
10111
10112(define-public python2-glances
10113 (package-with-python2 python-glances))
10114
10115(define-public python-graphql-core
10116 (package
10117 (name "python-graphql-core")
10118 (version "0.5.3")
10119 (source
10120 (origin
10121 (method url-fetch)
10122 (uri (pypi-uri "graphql-core" version))
10123 (sha256
10124 (base32
10125 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
10126 (build-system python-build-system)
10127 (arguments
10128 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
10129 #:phases
10130 (modify-phases %standard-phases
10131 (add-after 'unpack 'patch-hardcoded-version
10132 (lambda _ (substitute*
10133 "setup.py"
10134 (("'gevent==1.1rc1'") "'gevent'"))
10135 #t)))))
10136 (native-inputs
10137 `(("python-gevent" ,python-gevent)
10138 ("python-mock" ,python-mock)
10139 ("python-pytest-mock" ,python-pytest-mock)))
10140 (propagated-inputs
10141 `(("python-promise" ,python-promise)
10142 ("python-six" ,python-six)))
10143 (home-page "https://github.com/graphql-python/graphql-core")
10144 (synopsis "GraphQL implementation for Python")
10145 (description
10146 "GraphQL implementation for Python. GraphQL is a data query language and
10147runtime designed and used to request and deliver data to mobile and web apps.
10148This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
10149to Python.")
10150 (license license:expat)))
10151
10152(define-public python2-graphql-core
10153 (package-with-python2 python-graphql-core))
10154
10155(define-public python-graphql-relay
10156 (package
10157 (name "python-graphql-relay")
10158 (version "0.4.5")
10159 (source
10160 (origin
10161 (method url-fetch)
10162 (uri (pypi-uri "graphql-relay" version))
10163 (sha256
10164 (base32
10165 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
10166 (build-system python-build-system)
10167 (arguments
10168 '(#:tests? #f)) ; The tests are not distributed
10169 (propagated-inputs
10170 `(("python-graphql-core" ,python-graphql-core)
10171 ("python-promise" ,python-promise)
10172 ("python-six" ,python-six)))
10173 (home-page "https://github.com/graphql-python/graphql-relay-py")
10174 (synopsis "Relay implementation for Python")
10175 (description
10176 "This is a library to allow the easy creation of Relay-compliant servers
10177using the GraphQL Python reference implementation of a GraphQL server. It
10178should be noted that the code is a exact port of the original
10179@url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
10180from Facebook.")
10181 (license license:expat)))
10182
10183(define-public python2-graphql-relay
10184 (package-with-python2 python-graphql-relay))
10185
10186(define-public python-graphene
10187 (package
10188 (name "python-graphene")
10189 (version "0.10.2")
10190 (source
10191 (origin
10192 (method url-fetch)
10193 (uri (pypi-uri "graphene" version))
10194 (sha256
10195 (base32
10196 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
10197 (build-system python-build-system)
10198 (propagated-inputs
10199 `(("python-graphql-core" ,python-graphql-core)
10200 ("python-graphql-relay" ,python-graphql-relay)
10201 ("python-iso8601" ,python-iso8601)
10202 ("python-promise" ,python-promise)
10203 ("python-six" ,python-six)))
10204 (arguments
10205 `(#:tests? #f)) ; no tests/ in the PyPI tarball
10206 (home-page "http://graphene-python.org/")
10207 (synopsis "GraphQL Framework for Python")
10208 (description
10209 "Graphene is a Python library for building GraphQL schemas/types.
10210A GraphQL schema describes your data model, and provides a GraphQL server
10211with an associated set of resolve methods that know how to fetch data.")
10212 (properties `((python2-variant . ,(delay python2-graphene))))
10213 (license license:expat)))
10214
10215(define-public python2-graphene
10216 (let ((base (package-with-python2
10217 (strip-python2-variant python-graphene))))
10218 (package (inherit base)
10219 (native-inputs
10220 `(("python2-sqlalchemy" ,python2-sqlalchemy)
10221 ,@(package-native-inputs base))))))
10222
10223(define-public python-nautilus
10224 (package
10225 (name "python-nautilus")
10226 (version "0.4.9")
10227 (source
10228 (origin
10229 (method url-fetch)
10230 (uri (pypi-uri "nautilus" version))
10231 (sha256
10232 (base32
10233 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
10234 (build-system python-build-system)
10235 (arguments `(#:tests? #f)) ; fails to import test modules
10236 (propagated-inputs
10237 `(("python-bcrypt" ,python-bcrypt)
10238 ("python-click" ,python-click)
10239 ("python-consul" ,python-consul)
10240 ("python-graphene" ,python-graphene)
10241 ("python-jinja2" ,python-jinja2)
10242 ("python-peewee" ,python-peewee)
10243 ("python-pika" ,python-pika)
10244 ("python-tornado" ,python-tornado)
10245 ("python-wtforms" ,python-wtforms)))
10246 (native-inputs
10247 `(("python-nose2" ,python-nose2)))
10248 (home-page "https://github.com/AlecAivazis/nautilus")
10249 (synopsis "Library for creating microservice applications")
10250 (description
10251 "Nautilus is a framework for flux based microservices that looks to
10252provide extendible implementations of common aspects of a cloud so that you can
10253focus on building massively scalable web applications.")
10254 (license license:expat)))
10255
10256(define-public python-snowballstemmer
10257 (package
10258 (name "python-snowballstemmer")
10259 (version "1.2.1")
10260 (source (origin
10261 (method url-fetch)
10262 (uri (pypi-uri "snowballstemmer" version))
10263 (sha256
10264 (base32
10265 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
10266 (build-system python-build-system)
10267 (arguments
10268 `(;; No tests exist
10269 #:tests? #f))
10270 (home-page "https://github.com/shibukawa/snowball_py")
10271 (synopsis "Snowball stemming library collection for Python")
10272 (description "This package provides 16 word stemmer algorithms generated
10273from Snowball algorithms. It includes the 15 original ones plus the Poerter
10274English stemmer.")
10275 (license license:bsd-3)))
10276
10277(define-public python2-snowballstemmer
10278 (package-with-python2 python-snowballstemmer))
10279
10280(define-public python-sphinx-cloud-sptheme
10281 (package
10282 (name "python-sphinx-cloud-sptheme")
10283 (version "1.8.0")
10284 (source (origin
10285 (method url-fetch)
10286 (uri (pypi-uri "cloud_sptheme" version))
10287 (sha256
10288 (base32
10289 "1dniqb6a39yh786f86c4jn666rwnyi1jvzn4616zhcchb7sfdshd"))))
10290 (build-system python-build-system)
10291 ;; FIXME: The 'pypi' release archive does not contain tests.
10292 (arguments '(#:tests? #f))
10293 (native-inputs
10294 `(("python-sphinx" ,python-sphinx)))
10295 (home-page "https://bitbucket.org/ecollins/cloud_sptheme")
10296 (synopsis "'Cloud' theme for Sphinx documenter")
10297 (description "This package contains the \"Cloud\" theme for Sphinx and some
10298related extensions.")
10299 (license license:bsd-3)))
10300
10301(define-public python2-sphinx-cloud-sptheme
10302 (package-with-python2 python-sphinx-cloud-sptheme))
10303
10304(define-public python-sphinx-alabaster-theme
10305 (package
10306 (name "python-sphinx-alabaster-theme")
10307 (version "0.7.12")
10308 (source (origin
10309 (method url-fetch)
10310 (uri (pypi-uri "alabaster" version))
10311 (sha256
10312 (base32
10313 "00nwwjj2d2ym4s2kk217x7jkx1hnczc3fvm8yxbqmsp6b0nxfqd6"))))
10314 (build-system python-build-system)
10315 (propagated-inputs
10316 `(("python-pygments" ,python-pygments)))
10317 (home-page "https://alabaster.readthedocs.io/")
10318 (synopsis "Configurable sidebar-enabled Sphinx theme")
10319 (description "Alabaster is a visually (c)lean, responsive, configurable
10320theme for the Sphinx documentation system. It's the default theme of Sphinx.")
10321 (license license:bsd-3)))
10322
10323(define-public python2-sphinx-alabaster-theme
10324 (package-with-python2 python-sphinx-alabaster-theme))
10325
10326(define-public python-setproctitle
10327(package
10328 (name "python-setproctitle")
10329 (version "1.1.10")
10330 (source
10331 (origin
10332 (method url-fetch)
10333 (uri (pypi-uri "setproctitle" version))
10334 (sha256
10335 (base32
10336 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
10337 (build-system python-build-system)
10338 (arguments
10339 '(#:phases
10340 (modify-phases %standard-phases
10341 (add-before 'check 'patch-Makefile
10342 ;; Stricly this is only required for the python2 variant.
10343 ;; But adding a phase in an inherited package seems to be
10344 ;; cumbersum. So we patch even for python3.
10345 (lambda _
10346 (let ((nose (assoc-ref %build-inputs "python2-nose")))
10347 (when nose
10348 (substitute* "Makefile"
10349 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
10350 (string-append nose "/bin/nosetests "))))
10351 #t)))
10352 (replace 'check
10353 (lambda _
10354 (setenv "PYTHON" (or (which "python3") (which "python")))
10355 (setenv "PYCONFIG" (or (which "python3-config")
10356 (which "python-config")))
10357 (setenv "CC" "gcc")
10358 ;; No need to extend PYTHONPATH to find the built package, since
10359 ;; the Makefile will build anyway
10360 (invoke "make" "check"))))))
10361 (native-inputs
10362 `(("procps" ,procps))) ; required for tests
10363 (home-page
10364 "https://github.com/dvarrazzo/py-setproctitle")
10365 (synopsis
10366 "Setproctitle implementation for Python to customize the process title")
10367 (description "The library allows a process to change its title (as displayed
10368by system tools such as ps and top).
10369
10370Changing the title is mostly useful in multi-process systems, for
10371example when a master process is forked: changing the children's title
10372allows to identify the task each process is busy with. The technique
10373is used by PostgreSQL and the OpenSSH Server for example.")
10374 (license license:bsd-3)
10375 (properties `((python2-variant . ,(delay python2-setproctitle))))))
10376
10377(define-public python2-setproctitle
10378 (let ((base (package-with-python2
10379 (strip-python2-variant python-setproctitle))))
10380 (package
10381 (inherit base)
10382 (native-inputs `(("python2-nose" ,python2-nose)
10383 ,@(package-native-inputs base))))))
10384
10385(define-public python-validictory
10386 (package
10387 (name "python-validictory")
10388 (version "1.0.1")
10389 (source
10390 (origin
10391 (method url-fetch)
10392 (uri (pypi-uri "validictory" version))
10393 (sha256
10394 (base32
10395 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
10396 (build-system python-build-system)
10397 (arguments
10398 '(#:phases
10399 (modify-phases %standard-phases
10400 (add-after 'unpack 'bootstrap
10401 ;; Move the tests out of the package directory to avoid
10402 ;; packaging them.
10403 (lambda* _
10404 (rename-file "validictory/tests" "tests")
10405 (delete-file "tests/__init__.py")))
10406 (replace 'check
10407 (lambda _
10408 ;; Extend PYTHONPATH so the built package will be found.
10409 (setenv "PYTHONPATH"
10410 (string-append (getcwd) "/build/lib:"
10411 (getenv "PYTHONPATH")))
10412 (zero? (system* "py.test" "-vv" )))))))
10413 (native-inputs
10414 `(("python-pytest" ,python-pytest)))
10415 (home-page
10416 "https://github.com/jamesturk/validictory")
10417 (synopsis "General purpose Python data validator")
10418 (description "It allows validation of arbitrary Python data structures.
10419
10420The schema format is based on the JSON Schema
10421proposal (http://json-schema.org), so combined with json the library is also
10422useful as a validator for JSON data.")
10423 (license license:expat)))
10424
10425(define-public python2-validictory
10426 (package-with-python2 python-validictory))
10427
10428(define-public python-pyelftools
10429 (package
10430 (name "python-pyelftools")
10431 (version "0.25")
10432 (source
10433 (origin
10434 (method url-fetch)
10435 (uri (pypi-uri "pyelftools" version))
10436 (sha256
10437 (base32
10438 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
10439 (build-system python-build-system)
10440 (arguments
10441 `(#:phases
10442 (modify-phases %standard-phases
10443 (add-before 'check 'set-pythonpath
10444 (lambda _
10445 (setenv "PYTHONPATH"
10446 (string-append
10447 (getcwd) "/test/"
10448 ":" (getenv "PYTHONPATH")))
10449 #t)))))
10450 (home-page
10451 "https://github.com/eliben/pyelftools")
10452 (synopsis
10453 "Analyze binary and library file information")
10454 (description "This Python library provides interfaces for parsing and
10455analyzing two binary and library file formats; the Executable and Linking
10456Format (ELF), and debugging information in the Debugging With Attributed
10457Record Format (DWARF).")
10458 (license license:public-domain)))
10459
10460(define-public python-pyev
10461 (package
10462 (name "python-pyev")
10463 (version "0.9.0")
10464 (source
10465 (origin
10466 (method url-fetch)
10467 (uri (pypi-uri "pyev" version))
10468 (sha256
10469 (base32
10470 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
10471 (build-system python-build-system)
10472 (arguments
10473 `(#:tests? #f ; no test suite
10474 #:phases
10475 (modify-phases %standard-phases
10476 (add-after 'unpack 'patch
10477 (lambda* (#:key inputs #:allow-other-keys)
10478 (let ((libev (string-append (assoc-ref inputs "libev")
10479 "/lib/libev.so.4")))
10480 (substitute* "setup.py"
10481 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
10482 (string-append "libev_dll_name = \"" libev "\"")))))))))
10483 (inputs
10484 `(("libev" ,libev)))
10485 (home-page "http://pythonhosted.org/pyev/")
10486 (synopsis "Python libev interface")
10487 (description "Pyev provides a Python interface to libev.")
10488 (license license:gpl3)))
10489
10490(define-public python2-pyev
10491 (package-with-python2 python-pyev))
10492
10493(define-public python-imagesize
10494 (package
10495 (name "python-imagesize")
10496 (version "1.1.0")
10497 (source
10498 (origin
10499 (method url-fetch)
10500 (uri (pypi-uri "imagesize" version))
10501 (sha256
10502 (base32
10503 "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk"))))
10504 (build-system python-build-system)
10505 (home-page "https://github.com/shibukawa/imagesize_py")
10506 (synopsis "Gets image size of files in various formats in Python")
10507 (description
10508 "This package allows determination of image size from
10509PNG, JPEG, JPEG2000 and GIF files in pure Python.")
10510 (license license:expat)))
10511
10512(define-public python2-imagesize
10513 (package-with-python2 python-imagesize))
10514
10515(define-public python-termstyle
10516 (package
10517 (name "python-termstyle")
10518 (version "0.1.11")
10519 (source
10520 (origin
10521 (method url-fetch)
10522 (uri (pypi-uri "termstyle" version))
10523 (sha256
10524 (base32
10525 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
10526 (build-system python-build-system)
10527 (arguments
10528 '(#:phases
10529 (modify-phases %standard-phases
10530 (replace 'check
10531 (lambda _
10532 (zero? (system* "python" "test3.py")))))))
10533 (home-page "https://github.com/gfxmonk/termstyle")
10534 (synopsis "Console text coloring for Python")
10535 (description "This package provides console text coloring for Python.")
10536 (license license:bsd-3)))
10537
10538(define-public python-argcomplete
10539 (package
10540 (name "python-argcomplete")
10541 (version "1.7.0")
10542 (source
10543 (origin
10544 (method url-fetch)
10545 (uri (pypi-uri "argcomplete" version))
10546 (sha256
10547 (base32
10548 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
10549 (build-system python-build-system)
10550 (native-inputs
10551 `(("python-pexpect" ,python-pexpect)
10552 ("tcsh" ,tcsh)
10553 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
10554 (home-page "https://github.com/kislyuk/argcomplete")
10555 (synopsis "Shell tab completion for Python argparse")
10556 (description "argcomplete provides extensible command line tab completion
10557of arguments and options for Python scripts using @code{argparse}. It's
10558particularly useful for programs with many options or sub-parsers that can
10559dynamically suggest completions; for example, when browsing resources over the
10560network.")
10561 (license license:asl2.0)))
10562
10563(define-public python2-argcomplete
10564 (package-with-python2 python-argcomplete))
10565
10566(define-public python-xopen
10567 (package
10568 (name "python-xopen")
10569 (version "0.3.3")
10570 (source
10571 (origin
10572 (method url-fetch)
10573 (uri (pypi-uri "xopen" version))
10574 (sha256
10575 (base32
10576 "1a0wbil552wsmklwd89ssmgz3pjd86qa9i7jh8wqb9wslc8a2qjr"))
10577 (file-name (string-append name "-" version ".tar.gz"))))
10578 (build-system python-build-system)
10579 (home-page "https://github.com/marcelm/xopen/")
10580 (synopsis "Open compressed files transparently")
10581 (description "This module provides an @code{xopen} function that works like
10582Python's built-in @code{open} function, but can also deal with compressed files.
10583Supported compression formats are gzip, bzip2 and, xz, and are automatically
10584recognized by their file extensions. The focus is on being as efficient as
10585possible on all supported Python versions.")
10586 (license license:expat)))
10587
10588(define-public python2-xopen
10589 (let ((base (package-with-python2
10590 (strip-python2-variant python-xopen))))
10591 (package
10592 (inherit base)
10593 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
10594 ,@(package-propagated-inputs base))))))
10595
10596(define-public python-cheetah
10597 (package
10598 (name "python-cheetah")
10599 (version "3.1.0")
10600 (source
10601 (origin
10602 (method url-fetch)
10603 (uri (pypi-uri "Cheetah3" version))
10604 (sha256
10605 (base32
10606 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
10607 (build-system python-build-system)
10608 (arguments
10609 `(#:modules ((guix build utils)
10610 (guix build python-build-system)
10611 (ice-9 ftw)
10612 (srfi srfi-1)
10613 (srfi srfi-26))
10614 #:phases (modify-phases %standard-phases
10615 (add-after 'unpack 'use-absolute-python
10616 (lambda _
10617 (substitute* "Cheetah/CheetahWrapper.py"
10618 (("#!/usr/bin/env python")
10619 (string-append "#!" (which "python"))))
10620 #t))
10621 (replace 'check
10622 (lambda _
10623 (let ((cwd (getcwd)))
10624 (setenv "PYTHONPATH"
10625 (string-append
10626 cwd "/build/"
10627 (find (cut string-prefix? "lib" <>)
10628 (scandir (string-append cwd "/build")))
10629 ":" (getenv "PYTHONPATH")))
10630 (setenv "PATH"
10631 (string-append (getenv "PATH")
10632 ":" cwd "/bin"))
10633 (setenv "TMPDIR" "/tmp")
10634
10635 (substitute* "Cheetah/Tests/Test.py"
10636 (("unittest.TextTestRunner\\(\\)")
10637 "unittest.TextTestRunner(verbosity=2)"))
10638
10639 (invoke "python" "Cheetah/Tests/Test.py")))))))
10640 (propagated-inputs
10641 `(("python-markdown" ,python-markdown))) ;optional
10642 (home-page "http://cheetahtemplate.org/")
10643 (synopsis "Template engine")
10644 (description "Cheetah is a text-based template engine and Python code
10645generator.
10646
10647Cheetah can be used as a standalone templating utility or referenced as
10648a library from other Python applications. It has many potential uses,
10649but web developers looking for a viable alternative to ASP, JSP, PHP and
10650PSP are expected to be its principle user group.
10651
10652Features:
10653@enumerate
10654@item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
10655 text-based format.
10656@item Cleanly separates content, graphic design, and program code.
10657@item Blends the power and flexibility of Python with a simple template language
10658 that non-programmers can understand.
10659@item Gives template writers full access to any Python data structure, module,
10660 function, object, or method in their templates.
10661@item Makes code reuse easy by providing an object-orientated interface to
10662 templates that is accessible from Python code or other Cheetah templates.
10663 One template can subclass another and selectively reimplement sections of it.
10664@item Provides a simple, yet powerful, caching mechanism that can dramatically
10665 improve the performance of a dynamic website.
10666@item Compiles templates into optimized, yet readable, Python code.
10667@end enumerate")
10668 (license (license:x11-style "file://LICENSE"))))
10669
10670(define-public python2-cheetah
10671 (package-with-python2 python-cheetah))
10672
10673(define-public python-dulwich
10674 (package
10675 (name "python-dulwich")
10676 (version "0.18.6")
10677 (source
10678 (origin
10679 (method url-fetch)
10680 (uri (list (string-append "https://www.dulwich.io/releases/"
10681 "dulwich-" version ".tar.gz")
10682 (pypi-uri "dulwich" version)))
10683 (sha256
10684 (base32
10685 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
10686 (build-system python-build-system)
10687 (arguments
10688 `(#:phases
10689 (modify-phases %standard-phases
10690 (add-before 'check 'fix-tests
10691 (lambda* (#:key inputs #:allow-other-keys)
10692 ;; The tests use Popen with a custom environment which doesn't
10693 ;; include PATH.
10694 (substitute* "dulwich/tests/compat/utils.py"
10695 (("'git'") (string-append "'"
10696 (which "git")
10697 "'")))
10698 (substitute* '("dulwich/tests/test_repository.py"
10699 "dulwich/tests/test_hooks.py")
10700 (("#!/bin/sh") (string-append "#!" (which "sh"))))
10701 (setenv "TEST_RUNNER" "unittest")
10702 (setenv "PYTHONHASHSEED" "random")
10703 #t)))))
10704 (propagated-inputs
10705 `(("python-fastimport" ,python-fastimport)))
10706 (native-inputs
10707 `(("python-mock" ,python-mock)
10708 ("python-geventhttpclient" ,python-geventhttpclient)
10709 ("git" ,git)))
10710 (home-page "https://www.dulwich.io/")
10711 (synopsis "Git implementation in Python")
10712 (description "Dulwich is an implementation of the Git file formats and
10713protocols written in pure Python.")
10714 ;; Can be used with either license.
10715 (license (list license:asl2.0 license:gpl2+))))
10716
10717(define-public python2-dulwich
10718 (package-with-python2 python-dulwich))
10719
10720(define-public python-pbkdf2
10721 (package
10722 (name "python-pbkdf2")
10723 (version "1.3")
10724 (source
10725 (origin
10726 (method url-fetch)
10727 (uri (pypi-uri "pbkdf2" version))
10728 (sha256
10729 (base32
10730 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
10731 (build-system python-build-system)
10732 (arguments
10733 '(#:phases
10734 (modify-phases %standard-phases
10735 (replace 'check
10736 (lambda _
10737 (setenv "PYTHONPATH"
10738 (string-append (getcwd) "/build/lib:"
10739 (getenv "PYTHONPATH")))
10740 (zero? (system* "python" "test/test_pbkdf2.py")))))))
10741 (propagated-inputs
10742 `(("python-pycrypto" ,python-pycrypto))) ; optional
10743 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
10744 (synopsis "Password-based key derivation")
10745 (description "This module implements the password-based key derivation
10746function, PBKDF2, specified in RSA PKCS#5 v2.0.
10747
10748PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
10749is part of the RSA Public Key Cryptography Standards series. The provided
10750implementation takes a password or a passphrase and a salt value (and
10751optionally a iteration count, a digest module, and a MAC module) and provides
10752a file-like object from which an arbitrarly-sized key can be read.")
10753 (license license:expat)))
10754
10755(define-public python2-pbkdf2
10756 (package-with-python2 python-pbkdf2))
10757
10758(define-public python-qrcode
10759 (package
10760 (name "python-qrcode")
10761 (version "6.0")
10762 (source
10763 (origin
10764 (method url-fetch)
10765 (uri (pypi-uri "qrcode" version))
10766 (sha256
10767 (base32
10768 "1gz1g2n9kqwqkak78aavr354z1v3yyiksk7q6xp5hi1zr6s0syq3"))))
10769 (build-system python-build-system)
10770 (arguments
10771 ;; FIXME: Tests require packaging 'pymaging'.
10772 '(#:tests? #f))
10773 (propagated-inputs
10774 `(("python-lxml" ,python-lxml) ; for SVG output
10775 ("python-pillow" ,python-pillow) ; for PNG output
10776 ("python-six" ,python-six)))
10777 (inputs
10778 `(;; The setup.cfg file needs to be used, and support for this requires
10779 ;; at least version 30.3.0 of setuptools
10780 ("python-setuptools" ,python-setuptools)))
10781 (home-page "https://github.com/lincolnloop/python-qrcode")
10782 (synopsis "QR Code image generator")
10783 (description "This package provides a pure Python QR Code generator
10784module. It uses the Python Imaging Library (PIL) to allow for the generation
10785of QR Codes.
10786
10787In addition this package provides a command line tool to generate QR codes and
10788either write these QR codes to a file or do the output as ascii art at the
10789console.")
10790 (license license:bsd-3)))
10791
10792(define-public python2-qrcode
10793 (package-with-python2 python-qrcode))
10794
10795(define-public python-rst2ansi
10796 (package
10797 (name "python-rst2ansi")
10798 (version "0.1.5")
10799 (source
10800 (origin
10801 (method url-fetch)
10802 (uri (pypi-uri "rst2ansi" version))
10803 (sha256
10804 (base32
10805 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
10806 (build-system python-build-system)
10807 (propagated-inputs
10808 `(("python-docutils" ,python-docutils)))
10809 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
10810 (synopsis "Convert RST to ANSI-decorated console output")
10811 (description
10812 "Python module dedicated to rendering RST (reStructuredText) documents
10813to ansi-escaped strings suitable for display in a terminal.")
10814 (license license:expat)))
10815
10816(define-public python-ansi2html
10817 (package
10818 (name "python-ansi2html")
10819 (version "1.2.0")
10820 (source
10821 (origin
10822 (method url-fetch)
10823 (uri (pypi-uri "ansi2html" version))
10824 (sha256
10825 (base32
10826 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
10827 (build-system python-build-system)
10828 (native-inputs
10829 `(("python-mock" ,python-mock)
10830 ("python-nose" ,python-nose)))
10831 (propagated-inputs
10832 `(("python-six" ,python-six)))
10833 (home-page "https://github.com/ralphbean/ansi2html")
10834 (synopsis "Convert ANSI-decorated console output to HTML")
10835 (description
10836 "@command{ansi2html} is a Python library and command line utility for
10837convering text with ANSI color codes to HTML or LaTeX.")
10838 (license license:gpl3+)))
10839
10840(define-public python2-ansi2html
10841 (package-with-python2 python-ansi2html))
10842
10843(define-public python-ddt
10844 (package
10845 (name "python-ddt")
10846 (version "1.1.3")
10847 (source
10848 (origin
10849 (method url-fetch)
10850 (uri (pypi-uri "ddt" version))
10851 (sha256
10852 (base32
10853 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
10854 (build-system python-build-system)
10855 (native-inputs
10856 `(("python-mock" ,python-mock)
10857 ("python-nose" ,python-nose)))
10858 (propagated-inputs
10859 `(("python-six" ,python-six)
10860 ("python-pyyaml" ,python-pyyaml)))
10861 (home-page "https://github.com/txels/ddt")
10862 (synopsis "Data-Driven Tests")
10863 (description
10864 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
10865running it with different test data, and make it appear as multiple test
10866cases.")
10867 (license license:expat)))
10868
10869(define-public python2-ddt
10870 (package-with-python2 python-ddt))
10871
10872(define-public python-pycountry
10873 (package
10874 (name "python-pycountry")
10875 (version "18.5.26")
10876 (source
10877 (origin
10878 (method url-fetch)
10879 (uri (pypi-uri "pycountry" version))
10880 (sha256
10881 (base32
10882 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
10883 (build-system python-build-system)
10884 (home-page "https://bitbucket.org/flyingcircus/pycountry")
10885 (synopsis "ISO databases for languages, countries, currencies, etc.")
10886 (description
10887 "@code{pycountry} provides the ISO databases for the standards:
10888@enumerate
10889@item 639-3 (Languages)
10890@item 3166 (Countries)
10891@item 3166-3 (Deleted Countries)
10892@item 3166-2 (Subdivisions of countries)
10893@item 4217 (Currencies)
10894@item 15924 (Scripts)
10895@end enumerate
10896It includes a copy from Debian’s pkg-isocodes and makes the data accessible
10897through a Python API.")
10898 (license license:lgpl2.1+)))
10899
10900(define-public python2-pycountry
10901 (package-with-python2 python-pycountry))
10902
10903(define-public python-pycosat
10904 (package
10905 (name "python-pycosat")
10906 (version "0.6.1")
10907 (source
10908 (origin
10909 (method url-fetch)
10910 (uri (pypi-uri "pycosat" version))
10911 (sha256
10912 (base32
10913 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
10914 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
10915 (build-system python-build-system)
10916 (home-page "https://github.com/ContinuumIO/pycosat")
10917 (synopsis "Bindings to picosat (a SAT solver)")
10918 (description
10919 "This package provides efficient Python bindings to @code{picosat} on
10920the C level. When importing pycosat, the @code{picosat} solver becomes part
10921of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
10922Problem} (SAT) solver.")
10923 (license license:expat)))
10924
10925(define-public python2-pycosat
10926 (package-with-python2 python-pycosat))
10927
10928(define-public python2-ruamel.ordereddict
10929 (package
10930 (name "python2-ruamel.ordereddict")
10931 (version "0.4.9")
10932 (source
10933 (origin
10934 (method url-fetch)
10935 (uri (pypi-uri "ruamel.ordereddict" version))
10936 (sha256
10937 (base32
10938 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
10939 (build-system python-build-system)
10940 (arguments
10941 `(#:python ,python-2
10942 #:phases
10943 (modify-phases %standard-phases
10944 (delete 'check)
10945 (add-after 'install 'check
10946 (lambda* (#:key inputs outputs #:allow-other-keys)
10947 (add-installed-pythonpath inputs outputs)
10948 (zero? (system* "python" "test/testordereddict.py")))))))
10949 (home-page "https://bitbucket.org/ruamel/ordereddict")
10950 (synopsis "Version of dict that keeps keys in insertion order")
10951 (description
10952 "This is an implementation of an ordered dictionary with @dfn{Key
10953Insertion Order} (KIO: updates of values do not affect the position of the
10954key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
10955removed and put at the back). The standard library module @code{OrderedDict},
10956implemented later, implements a subset of @code{ordereddict} functionality.
10957Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
10958Order} (KSO, no sorting function can be specified, but a transform can be
10959specified to apply on the key before comparison (e.g. @code{string.lower})).")
10960 (license license:expat)))
10961
10962(define-public python-pypeg2
10963 (package
10964 (name "python-pypeg2")
10965 (version "2.15.2")
10966 (source
10967 (origin
10968 (method url-fetch)
10969 (uri (pypi-uri "pyPEG2" version))
10970 (sha256
10971 (base32
10972 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
10973 (build-system python-build-system)
10974 (propagated-inputs `(("python-lxml" ,python-lxml)))
10975 (arguments
10976 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
10977 '(#:tests? #f))
10978 (home-page "https://fdik.org/pyPEG/")
10979 (synopsis "Parsering Expression Grammars in Python")
10980 (description "PyPEG is an intrinsic parser interpreter framework for
10981Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
10982parse many formal languages.")
10983 (license license:gpl2)))
10984
10985(define-public python-incremental
10986 (package
10987 (name "python-incremental")
10988 (version "17.5.0")
10989 (source
10990 (origin
10991 (method url-fetch)
10992 (uri (pypi-uri "incremental" version))
10993 (sha256
10994 (base32
10995 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
10996 (build-system python-build-system)
10997 (home-page "https://github.com/hawkowl/incremental")
10998 (synopsis "Library for versioning Python projects")
10999 (description "Incremental is a small library that versions your Python
11000projects.")
11001 (license license:expat)))
11002
11003(define-public python2-incremental
11004 (package-with-python2 python-incremental))
11005
11006(define-public python-invoke
11007 (package
11008 (name "python-invoke")
11009 (home-page "http://www.pyinvoke.org/")
11010 (version "1.1.0")
11011 (source (origin
11012 (method url-fetch)
11013 (uri (pypi-uri "invoke" version))
11014 (sha256
11015 (base32
11016 "0aiy1xvk1f91246zxd1zqrm679vdvd10h843a2na41cqr3cflpi6"))))
11017 (build-system python-build-system)
11018 (arguments
11019 ;; XXX: Requires many dependencies that are not yet in Guix.
11020 `(#:tests? #f))
11021 (synopsis "Pythonic task execution")
11022 (description
11023 "Invoke is a Python task execution tool and library, drawing inspiration
11024from various sources to arrive at a powerful and clean feature set. It is
11025evolved from the Fabric project, but focuses on local and abstract concerns
11026instead of servers and network commands.")
11027 (license license:bsd-3)))
11028
11029(define-public python2-invoke
11030 (package-with-python2 python-invoke))
11031
11032(define-public python-automat
11033 (package
11034 (name "python-automat")
11035 (version "0.6.0")
11036 (source (origin
11037 (method url-fetch)
11038 (uri (pypi-uri "Automat" version))
11039 (sha256
11040 (base32
11041 "1a7nsrljysfmdqmpn2apfa1gg6rfah4y9sizvns8gb08rx7d07rw"))))
11042 (build-system python-build-system)
11043 ;; We disable the tests because they require python-twisted, while
11044 ;; python-twisted depends on python-automat. Twisted is optional, but the
11045 ;; tests fail if it is not available. Also see
11046 ;; <https://github.com/glyph/automat/issues/71>.
11047 (arguments '(#:tests? #f))
11048 (native-inputs
11049 `(("python-m2r" ,python-m2r)
11050 ("python-setuptools-scm" ,python-setuptools-scm)
11051 ("python-graphviz" ,python-graphviz)))
11052 (propagated-inputs
11053 `(("python-six" ,python-six)
11054 ("python-attrs" ,python-attrs)))
11055 (home-page "https://github.com/glyph/Automat")
11056 (synopsis "Self-service finite-state machines")
11057 (description "Automat is a library for concise, idiomatic Python
11058expression of finite-state automata (particularly deterministic finite-state
11059transducers).")
11060 (license license:expat)))
11061
11062(define-public python2-automat
11063 (package-with-python2 python-automat))
11064
11065(define-public python-m2r
11066 (package
11067 (name "python-m2r")
11068 (version "0.1.12")
11069 (source (origin
11070 (method url-fetch)
11071 (uri (pypi-uri "m2r" version))
11072 (sha256
11073 (base32
11074 "1axrwnf425sz4qz3c0qc7yhhki4myzb8rki7pczcsgzznzmqdyxd"))))
11075 (build-system python-build-system)
11076 (propagated-inputs
11077 `(("python-docutils" ,python-docutils)
11078 ("python-mistune" ,python-mistune)))
11079 (native-inputs
11080 `(("python-pygments" ,python-pygments)
11081 ("python-mock" ,python-mock)))
11082 (home-page "https://github.com/miyakogi/m2r")
11083 (synopsis "Markdown to reStructuredText converter")
11084 (description "M2R converts a markdown file including reST markups to valid
11085reST format.")
11086 (license license:expat)))
11087
11088(define-public python2-m2r
11089 (package-with-python2 python-m2r))
11090
11091(define-public python-constantly
11092 (package
11093 (name "python-constantly")
11094 (version "15.1.0")
11095 (source (origin
11096 (method url-fetch)
11097 (uri (pypi-uri "constantly" version))
11098 (sha256
11099 (base32
11100 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
11101 (build-system python-build-system)
11102 (home-page "https://github.com/twisted/constantly")
11103 (synopsis "Symbolic constants in Python")
11104 (description "Constantly is a Python library that provides symbolic
11105constant support. It includes collections and constants with text, numeric,
11106and bit flag values.")
11107 (license license:expat)))
11108
11109(define-public python2-constantly
11110 (package-with-python2 python-constantly))
11111
11112(define-public python-attrs
11113 (package
11114 (name "python-attrs")
11115 (version "18.2.0")
11116 (source (origin
11117 (method url-fetch)
11118 (uri (pypi-uri "attrs" version))
11119 (sha256
11120 (base32
11121 "0s9ydh058wmmf5v391pym877x4ahxg45dw6a0w4c7s5wgpigdjqh"))))
11122 (build-system python-build-system)
11123 (arguments
11124 `(#:modules ((guix build utils)
11125 (guix build python-build-system)
11126 (ice-9 ftw)
11127 (srfi srfi-1)
11128 (srfi srfi-26))
11129 #:phases (modify-phases %standard-phases
11130 (replace 'check
11131 (lambda _
11132 (let ((cwd (getcwd)))
11133 (setenv "PYTHONPATH"
11134 (string-append
11135 cwd "/build/"
11136 (find (cut string-prefix? "lib" <>)
11137 (scandir (string-append cwd "/build")))
11138 ":"
11139 (getenv "PYTHONPATH")))
11140 (invoke "python" "-m" "pytest")))))))
11141 (native-inputs
11142 `(("python-coverage" ,python-coverage)
11143 ("python-hypothesis" ,python-hypothesis)
11144 ("python-pympler" ,python-pympler)
11145 ("python-pytest" ,python-pytest)
11146 ("python-six" ,python-six)
11147 ("python-sphinx" ,python-sphinx)
11148 ("python-zope-interface" ,python-zope-interface)))
11149 (home-page "https://github.com/python-attrs/attrs/")
11150 (synopsis "Attributes without boilerplate")
11151 (description "@code{attrs} is a Python package with class decorators that
11152ease the chores of implementing the most common attribute-related object
11153protocols.")
11154 (license license:expat)))
11155
11156(define-public python2-attrs
11157 (package-with-python2 python-attrs))
11158
11159(define-public python-attrs-bootstrap
11160 (package
11161 (inherit python-attrs)
11162 (name "python-attrs-bootstrap")
11163 ;; Keep this on a fixed version so python-attrs can be updated without
11164 ;; triggering a mass-rebuild. FIXME: Update this in the next rebuild cycle.
11165 (version "17.4.0")
11166 (source (origin
11167 (method url-fetch)
11168 (uri (pypi-uri "attrs" version))
11169 (sha256
11170 (base32
11171 "1jafnn1kzd6qhxgprhx6y6ik1r5m2rilx25syzcmq03azp660y8w"))))
11172 (native-inputs `())
11173 (arguments `(#:tests? #f))))
11174
11175(define-public python2-attrs-bootstrap
11176 (package-with-python2 python-attrs-bootstrap))
11177
11178(define-public python2-cliapp
11179 (package
11180 (name "python2-cliapp")
11181 (version "1.20170823")
11182 (source
11183 (origin
11184 (method url-fetch)
11185 (uri (string-append
11186 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
11187 version ".tar.gz"))
11188 (sha256
11189 (base32
11190 "1i9gik0xrj6jmi95s5w988jl1y265baz5xm5pbqdyvsh8h9ln6yq"))))
11191 (build-system python-build-system)
11192 (arguments
11193 `(#:python ,python-2
11194 #:phases
11195 (modify-phases %standard-phases
11196 ;; check phase needs to be run before the build phase. If not,
11197 ;; coverage-test-runner looks for tests for the built source files,
11198 ;; and fails.
11199 (delete 'check)
11200 (add-before 'build 'check
11201 (lambda _
11202 ;; Disable python3 tests
11203 (substitute* "check"
11204 (("python3") "# python3"))
11205 (zero? (system* "./check")))))))
11206 (native-inputs
11207 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
11208 ("python2-pep8" ,python2-pep8)))
11209 (propagated-inputs
11210 `(("python2-pyaml" ,python2-pyaml)))
11211 (home-page "https://liw.fi/cliapp/")
11212 (synopsis "Python framework for command line programs")
11213 (description "@code{python2-cliapp} is a python framework for
11214command line programs. It contains the typical stuff such programs
11215need to do, such as parsing the command line for options, and
11216iterating over input files.")
11217 (license license:gpl2+)))
11218
11219(define-public python2-ttystatus
11220 (package
11221 (name "python2-ttystatus")
11222 (version "0.35")
11223 (source
11224 (origin
11225 (method url-fetch)
11226 (uri (string-append
11227 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
11228 version ".tar.gz"))
11229 (sha256
11230 (base32
11231 "0vivqbw7ddhsq1zj3g9cvvv4f0phl0pis2smsnwcr2szz2fk3hl6"))))
11232 (build-system python-build-system)
11233 (native-inputs
11234 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
11235 ("python2-pep8" ,python2-pep8)))
11236 (arguments
11237 `(#:python ,python-2
11238 #:phases
11239 (modify-phases %standard-phases
11240 ;; check phase needs to be run before the build phase. If not,
11241 ;; coverage-test-runner looks for tests for the built source files,
11242 ;; and fails.
11243 (delete 'check)
11244 (add-before 'build 'check
11245 (lambda _
11246 (zero? (system* "make" "check")))))))
11247 (home-page "https://liw.fi/ttystatus/")
11248 (synopsis "Python library for showing progress reporting and
11249status updates on terminals")
11250 (description "@code{python2-ttystatus} is a python library for
11251showing progress reporting and status updates on terminals, for
11252command line programs. Output is automatically adapted to the width
11253of the terminal: truncated if it does not fit, and resized if the
11254terminal size changes.")
11255 (license license:gpl3+)))
11256
11257(define-public python2-tracing
11258 (package
11259 (name "python2-tracing")
11260 (version "0.10")
11261 (source
11262 (origin
11263 (method url-fetch)
11264 (uri (string-append
11265 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
11266 version ".tar.gz"))
11267 (sha256
11268 (base32
11269 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
11270 (build-system python-build-system)
11271 (arguments
11272 `(#:python ,python-2))
11273 (home-page "https://liw.fi/tracing/")
11274 (synopsis "Python debug logging helper")
11275 (description "@code{python2-tracing} is a python library for
11276logging debug messages. It provides a way to turn debugging messages
11277on and off, based on the filename they occur in. It is much faster
11278than using @code{logging.Filter} to accomplish the same thing, which
11279matters when code is run in production mode. The actual logging still
11280happens using the @code{logging} library.")
11281 (license license:gpl3+)))
11282
11283(define-public python2-larch
11284 (package
11285 (name "python2-larch")
11286 (version "1.20151025")
11287 (source
11288 (origin
11289 (method url-fetch)
11290 (uri (string-append
11291 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
11292 version ".tar.gz"))
11293 (patches (search-patches
11294 "python2-larch-coverage-4.0a6-compatibility.patch"))
11295 (sha256
11296 (base32
11297 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
11298 (build-system python-build-system)
11299 (arguments
11300 `(#:python ,python-2
11301 #:phases
11302 (modify-phases %standard-phases
11303 ;; check phase needs to be run before the build phase. If not,
11304 ;; coverage-test-runner looks for tests for the built source files,
11305 ;; and fails.
11306 (delete 'check)
11307 (add-before 'build 'check
11308 (lambda _
11309 (zero? (system* "make" "check")))))))
11310 (native-inputs
11311 `(("cmdtest" ,cmdtest)
11312 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
11313 (propagated-inputs
11314 `(("python2-tracing" ,python2-tracing)))
11315 (home-page "https://liw.fi/larch/")
11316 (synopsis "Python copy-on-write B-tree library")
11317 (description "@code{python2-larch} is an implementation of
11318particular kind of B-tree, based on research by Ohad Rodeh. See
11319@url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
11320on the data structure.
11321
11322The distinctive feature of this B-tree is that a node is never
11323(conceptually) modified. Instead, all updates are done by
11324copy-on-write. This makes it easy to clone a tree, and modify only the
11325clone, while other processes access the original tree.")
11326 (license license:gpl3+)))
11327
11328(define-public python-astroid
11329 (package
11330 (name "python-astroid")
11331 (version "2.1.0")
11332 (source
11333 (origin
11334 (method url-fetch)
11335 (uri (pypi-uri "astroid" version))
11336 (sha256
11337 (base32
11338 "08hz675knh4294bancdapql392fmbjyimhbyrmfkz1ka7l035c1m"))))
11339 (build-system python-build-system)
11340 (propagated-inputs
11341 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
11342 ("python-six" ,python-six)
11343 ("python-wrapt" ,python-wrapt)))
11344 (native-inputs
11345 `(("python-dateutil" ,python-dateutil)
11346 ("python-nose" ,python-nose)
11347 ("python-pytest" ,python-pytest)
11348 ("python-pytest-runner" ,python-pytest-runner)))
11349 (arguments
11350 `(#:phases
11351 (modify-phases %standard-phases
11352 (add-after 'unpack 'remove-spurious-test
11353 (lambda _
11354 ;; This can be removed after upgrading from python-3.7
11355 ;; https://github.com/PyCQA/astroid/issues/593
11356 ;; https://bugs.python.org/issue34056
11357 (delete-file "astroid/tests/unittest_modutils.py")
11358 #t))
11359 (replace 'check
11360 (lambda _
11361 (invoke "pytest" "astroid"))))))
11362 (home-page "https://github.com/PyCQA/astroid")
11363 (synopsis "Common base representation of python source code for pylint and
11364other projects")
11365 (description "@code{python-astroid} provides a common base representation
11366of python source code for projects such as pychecker, pyreverse, pylint, etc.
11367
11368It provides a compatible representation which comes from the _ast module. It
11369rebuilds the tree generated by the builtin _ast module by recursively walking
11370down the AST and building an extended ast. The new node classes have
11371additional methods and attributes for different usages. They include some
11372support for static inference and local name scopes. Furthermore, astroid
11373builds partial trees by inspecting living objects.")
11374 (license license:lgpl2.1+)
11375 (properties `((python2-variant . ,(delay python2-astroid))))))
11376
11377(define-public python2-astroid
11378 (let ((base (package-with-python2
11379 (strip-python2-variant python-astroid))))
11380 (package (inherit base)
11381 ;; Version 2.x removes python2 support.
11382 (version "1.6.5")
11383 (source
11384 (origin
11385 (method url-fetch)
11386 (uri (pypi-uri "astroid" version))
11387 (sha256
11388 (base32
11389 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
11390 (arguments
11391 (substitute-keyword-arguments (package-arguments base)
11392 ((#:phases phases)
11393 `(modify-phases ,phases
11394 (add-after 'unpack 'remove-spurious-test
11395 (lambda _
11396 ;; https://github.com/PyCQA/astroid/issues/276
11397 (delete-file "astroid/tests/unittest_brain.py")
11398 #t))
11399 (replace 'check
11400 (lambda _
11401 (invoke"python" "-m" "unittest" "discover"
11402 "-p" "unittest*.py")))))))
11403 (native-inputs `())
11404 (propagated-inputs
11405 `(("python2-backports-functools-lru-cache"
11406 ,python2-backports-functools-lru-cache)
11407 ("python2-enum34" ,python2-enum34)
11408 ("python2-singledispatch" ,python2-singledispatch)
11409 ,@(package-propagated-inputs base))))))
11410
11411(define-public python-isort
11412 (package
11413 (name "python-isort")
e2227b6a 11414 (version "4.3.4")
44d10b1f
RW
11415 (source
11416 (origin
e2227b6a
EF
11417 (method git-fetch)
11418 (uri (git-reference
11419 ;; Tests pass only from the Github sources
11420 (url "https://github.com/timothycrosley/isort")
11421 (commit version)))
11422 (file-name (git-file-name name version))
44d10b1f
RW
11423 (sha256
11424 (base32
e2227b6a 11425 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
44d10b1f
RW
11426 (build-system python-build-system)
11427 (native-inputs
11428 `(("python-mock" ,python-mock)
11429 ("python-pytest" ,python-pytest)))
11430 (home-page "https://github.com/timothycrosley/isort")
11431 (synopsis "Python utility/library to sort python imports")
11432 (description "@code{python-isort} is a python utility/library to sort
11433imports alphabetically, and automatically separated into sections. It
11434provides a command line utility, a python library and plugins for various
11435editors.")
e2227b6a
EF
11436 (license license:expat)
11437 (properties `((python2-variant . ,(delay python2-isort))))))
44d10b1f
RW
11438
11439(define-public python2-isort
e2227b6a
EF
11440 (let ((base (package-with-python2
11441 (strip-python2-variant python-isort))))
11442 (package (inherit base)
11443 (native-inputs
11444 `(("python2-futures" ,python2-futures)
11445 ,@(package-native-inputs base))))))
44d10b1f
RW
11446
11447(define-public python2-backports-functools-lru-cache
11448 (package
11449 (name "python2-backports-functools-lru-cache")
11450 (version "1.5")
11451 (source
11452 (origin
11453 (method url-fetch)
11454 ;; only the pypi tarballs contain the necessary metadata
11455 (uri (pypi-uri "backports.functools_lru_cache" version))
11456 (sha256
11457 (base32
11458 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
11459 (build-system python-build-system)
11460 (native-inputs
11461 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
11462 (arguments
11463 `(#:python ,python-2))
11464 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
11465 (synopsis "Backport of functools.lru_cache from Python 3.3")
11466 (description "@code{python2-backports-functools-lru-cache} is a backport
11467of @code{functools.lru_cache} from python 3.3.")
11468 (license license:expat)))
11469
11470(define-public python-configparser
11471 (package
11472 (name "python-configparser")
11473 (version "3.5.0")
11474 (source
11475 (origin
11476 (method url-fetch)
11477 (uri (string-append
11478 "https://bitbucket.org/ambv/configparser/get/"
11479 version ".tar.bz2"))
11480 (file-name (string-append name "-" version ".tar.gz"))
11481 (sha256
11482 (base32
11483 "0waq40as14abwzbb321hfz4vr1fi363nscy32ga14qvfygrg96wa"))))
11484 (build-system python-build-system)
11485 (home-page "http://docs.python.org/py3k/library/configparser.html")
11486 (synopsis "Backport of configparser from python 3.5")
11487 (description "@code{python-configparser} is a backport of
11488@code{configparser} from Python 3.5 so that it can be used directly
11489in other versions.")
11490 (license license:expat)))
11491
11492(define-public python2-configparser
11493 (package-with-python2 python-configparser))
11494
11495(define-public python-mando
11496 (package
11497 (name "python-mando")
11498 (version "0.6.4")
11499 (source (origin
11500 (method url-fetch)
11501 (uri (pypi-uri "mando" version))
11502 (sha256
11503 (base32
11504 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
11505 (build-system python-build-system)
11506 (propagated-inputs
11507 `(("python-rst2ansi" ,python-rst2ansi)
11508 ("python-six" ,python-six)))
11509 (native-inputs
11510 `(("python-pytest" ,python-pytest)))
11511 (home-page "https://mando.readthedocs.org/")
11512 (synopsis
11513 "Wrapper around argparse, allowing creation of complete CLI applications")
11514 (description
11515 "This package is a wrapper around argparse, allowing you to write complete CLI
11516applications in seconds while maintaining all the flexibility.")
11517 (license license:expat)))
11518
11519(define-public python2-mando
11520 (package-with-python2 python-mando))
11521
11522(define-public python-fudge
11523 (package
11524 (name "python-fudge")
11525 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
11526 ;; package, which is currently the only use of this package.
11527 (version "0.9.6")
11528 (source
11529 (origin
11530 (method url-fetch)
11531 (uri (pypi-uri "fudge" version))
11532 (sha256
11533 (base32
11534 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
11535 (build-system python-build-system)
11536 (arguments
11537 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
11538 (home-page "https://github.com/fudge-py/fudge")
11539 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
11540 (description
11541 "Fudge is a Python module for using fake objects (mocks and stubs) to
11542test real ones.
11543
11544In readable Python code, you declare the methods available on your fake object
11545and how they should be called. Then you inject that into your application and
11546start testing. This declarative approach means you don’t have to record and
11547playback actions and you don’t have to inspect your fakes after running code.
11548If the fake object was used incorrectly then you’ll see an informative
11549exception message with a traceback that points to the culprit.")
11550 (license license:expat)))
11551
11552(define-public python2-fudge
11553 (package-with-python2 python-fudge))
11554
11555(define-public python-mwclient
11556 (package
11557 (name "python-mwclient")
11558 (version "0.8.4")
11559 (source
11560 (origin
11561 (method url-fetch)
11562 ;; The PyPI version wouldn't contain tests.
11563 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
11564 "v" version ".tar.gz"))
11565 (file-name (string-append name "-" version ".tar.gz"))
11566 (sha256
11567 (base32
11568 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
11569 (build-system python-build-system)
11570 (propagated-inputs
11571 `(("python-requests" ,python-requests)
11572 ("python-requests-oauthlib"
11573 ,python-requests-oauthlib)
11574 ("python-six" ,python-six)))
11575 (native-inputs
11576 `(("python-mock" ,python-mock)
11577 ("python-pytest" ,python-pytest)
11578 ("python-pytest-pep8" ,python-pytest-pep8)
11579 ("python-pytest-cache" ,python-pytest-cache)
11580 ("python-pytest-cov" ,python-pytest-cov)
11581 ("python-responses" ,python-responses)))
11582 (home-page "https://github.com/btongminh/mwclient")
11583 (synopsis "MediaWiki API client")
11584 (description "This package provides a MediaWiki API client.")
11585 (license license:expat)))
11586
11587(define-public python2-mwclient
11588 (package-with-python2 python-mwclient))
11589
11590(define-public python-utils
11591 (package
11592 (name "python-utils")
11593 (version "2.1.0")
11594 (source (origin
11595 (method url-fetch)
11596 (uri (pypi-uri "python-utils" version))
11597 (sha256
11598 (base32
11599 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
11600 (build-system python-build-system)
11601 (native-inputs
11602 `(("pytest-runner" ,python-pytest-runner)
11603 ("pytest" ,python-pytest)
11604 ("six" ,python-six)))
11605 (home-page "https://github.com/WoLpH/python-utils")
11606 (synopsis "Convenient utilities not included with the standard Python install")
11607 (description
11608 "Python Utils is a collection of small Python functions and classes which
11609make common patterns shorter and easier.")
11610 (license license:bsd-2)))
11611
11612(define-public python2-utils
11613 (package-with-python2 python-utils))
11614
11615(define-public python-sphinx-me
11616 (package
11617 (name "python-sphinx-me")
11618 (version "0.3")
11619 (source
11620 (origin
11621 (method url-fetch)
11622 (uri (pypi-uri "sphinx-me" version))
11623 (sha256
11624 (base32
11625 "06jzgp213zihnvpcy2y5jy3ykid3apc2ncp2pg6a2g05lhiziglq"))))
11626 (build-system python-build-system)
11627 (home-page "https://github.com/stephenmcd/sphinx-me")
11628 (synopsis "Create a Sphinx documentation shell")
11629 (description
11630 "Create a Sphinx documentation shell for your project and include the
11631README file as the documentation index. It handles extracting the required
11632meta data such as the project name, author and version from your project for
11633use in your Sphinx docs.")
11634 (license license:bsd-2)))
11635
11636(define-public python2-sphinx-me
11637 (package-with-python2 python-sphinx-me))
11638
11639(define-public python-diff-match-patch
11640 (package
11641 (name "python-diff-match-patch")
11642 (version "20121119")
11643 (source
11644 (origin
11645 (method url-fetch)
11646 (uri (pypi-uri "diff-match-patch" version))
11647 (sha256
11648 (base32
11649 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
11650 (build-system python-build-system)
11651 (home-page "https://code.google.com/p/google-diff-match-patch")
11652 (synopsis "Synchronize plain text")
11653 (description "Diff Match and Patch libraries offer robust algorithms to
11654perform the operations required for synchronizing plain text.")
11655 (license license:asl2.0)))
11656
11657(define-public python2-diff-match-patch
11658 (package-with-python2 python-diff-match-patch))
11659
11660(define-public python-dirsync
11661 (package
11662 (name "python-dirsync")
11663 (version "2.2.3")
11664 (source
11665 (origin
11666 (method url-fetch)
11667 (uri (pypi-uri "dirsync" version))
11668 (sha256
11669 (base32
11670 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
11671 (build-system python-build-system)
11672 (propagated-inputs
11673 `(("six" ,python-six)))
11674 (home-page "https://bitbucket.org/tkhyn/dirsync")
11675 (synopsis "Advanced directory tree synchronisation tool")
11676 (description "Advanced directory tree synchronisation tool.")
11677 (license license:expat)))
11678
11679(define-public python2-dirsync
11680 (package-with-python2 python-dirsync))
11681
11682(define-public python-levenshtein
11683 (package
11684 (name "python-levenshtein")
11685 (version "0.12.0")
11686 (source
11687 (origin
11688 (method url-fetch)
11689 (uri (pypi-uri "python-Levenshtein" version))
11690 (sha256
11691 (base32
11692 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
11693 (build-system python-build-system)
11694 (home-page "https://github.com/ztane/python-Levenshtein")
11695 (synopsis "Fast computation of Levenshtein distance and string similarity")
11696 (description
11697 "The Levenshtein Python C extension module contains functions for fast computation of
11698@enumerate
11699@item Levenshtein (edit) distance, and edit operations
11700@item string similarity
11701@item approximate median strings, and generally string averaging
11702@item string sequence and set similarity
11703@end enumerate
11704It supports both normal and Unicode strings.")
11705 (license license:gpl2+)))
11706
11707(define-public python2-levenshtein
11708 (package-with-python2 python-levenshtein))
11709
11710(define-public python-scandir
11711 (package
11712 (name "python-scandir")
11713 (version "1.9.0")
11714 (source
11715 (origin
11716 (method url-fetch)
11717 (uri (pypi-uri "scandir" version))
11718 (sha256
11719 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
11720 (build-system python-build-system)
11721 (arguments
11722 `(#:phases (modify-phases %standard-phases
11723 (replace 'check
11724 (lambda _
11725 (invoke "python" "test/run_tests.py"))))))
11726 (home-page "https://github.com/benhoyt/scandir")
11727 (synopsis "Directory iteration function")
11728 (description
11729 "Directory iteration function like os.listdir(), except that instead of
11730returning a list of bare filenames, it yields DirEntry objects that include
11731file type and stat information along with the name. Using scandir() increases
11732the speed of os.walk() by 2-20 times (depending on the platform and file
11733system) by avoiding unnecessary calls to os.stat() in most cases.
11734
11735This package is part of the Python standard library since version 3.5.")
11736 (license license:bsd-3)))
11737
11738(define-public python2-scandir
11739 (package-with-python2 python-scandir))
11740
11741(define-public python2-stemming
11742 (package
11743 (name "python2-stemming")
11744 (version "1.0.1")
11745 (source
11746 (origin
11747 (method url-fetch)
11748 (uri (pypi-uri "stemming" version))
11749 (sha256
11750 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
11751 (build-system python-build-system)
11752 (arguments
11753 `(#:python ,python-2))
11754 (home-page "https://bitbucket.org/mchaput/stemming/overview")
11755 (synopsis "Python implementations of various stemming algorithms")
11756 (description
11757 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
11758stemming algorithms for English. These implementations are straightforward and
11759efficient, unlike some Python versions of the same algorithms available on the
11760Web. This package is an extraction of the stemming code included in the Whoosh
11761search engine.")
11762 (license license:public-domain)))
11763
11764(define-public python-factory-boy
11765 (package
11766 (name "python-factory-boy")
11767 (version "2.8.1")
11768 (source
11769 (origin
11770 (method url-fetch)
11771 (uri (pypi-uri "factory_boy" version))
11772 (sha256
11773 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
11774 (build-system python-build-system)
11775 (arguments
11776 ;; Tests are not included in the tarball.
11777 `(#:tests? #f))
11778 (propagated-inputs
11779 `(("faker" ,python-faker)))
11780 (home-page "https://github.com/benhoyt/scandir")
11781 (synopsis "Versatile test fixtures replacement")
11782 (description
11783 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
11784
11785As a fixtures replacement tool, it aims to replace static, hard to maintain
11786fixtures with easy-to-use factories for complex object.
11787
11788Instead of building an exhaustive test setup with every possible combination
11789of corner cases, factory_boy allows you to use objects customized for the
11790current test, while only declaring the test-specific fields")
11791 (license license:expat)))
11792
11793(define-public python2-factory-boy
11794 (package-with-python2 python-factory-boy))
11795
11796(define-public python-translate-toolkit
11797 (package
11798 (name "python-translate-toolkit")
11799 (version "2.1.0")
11800 (source
11801 (origin
11802 (method url-fetch)
11803 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
11804 (sha256
11805 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
11806 (build-system python-build-system)
11807 (native-inputs
11808 `(("python-pytest" ,python-pytest)
11809 ("python-sphinx" ,python-sphinx)))
11810 (propagated-inputs
11811 `(("python-babel" ,python-babel)
11812 ("python-beautifulsoup4" ,python-beautifulsoup4)
11813 ("python-chardet" ,python-chardet)
11814 ("python-diff-match-patch" ,python-diff-match-patch)
11815 ("python-levenshtein" ,python-levenshtein)
11816 ("python-lxml" ,python-lxml)
11817 ("python-six" ,python-six)
11818 ("python-vobject" ,python-vobject)
11819 ("python-pyyaml" ,python-pyyaml)))
11820 (arguments
11821 ;; TODO: tests are not run, because they end with
11822 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
11823 ;; 'parse_funcs'
11824 ;; during test setup.
11825 `(#:tests? #f))
11826 (home-page "http://toolkit.translatehouse.org")
11827 (synopsis "Tools and API for translation and localization engineering")
11828 (description
11829 "Tools and API for translation and localization engineering. It contains
11830several utilities, as well as an API for building localization tools.")
11831 (license license:gpl2+)))
11832
11833(define-public python2-translate-toolkit
11834 (package-with-python2 python-translate-toolkit))
11835
11836(define-public python-packaging
11837 (package
11838 (name "python-packaging")
11839 (version "18.0")
11840 (source
11841 (origin
11842 (method url-fetch)
11843 (uri (pypi-uri "packaging" version))
11844 (sha256
11845 (base32
11846 "01wq9c53ix5rz6qg2c98gy8n4ff768rmanifm8m5jpjiaizj51h8"))))
11847 (build-system python-build-system)
11848 (arguments
11849 `(#:phases (modify-phases %standard-phases
11850 (replace 'check
11851 (lambda _ (invoke "py.test" "-vv"))))))
11852 (native-inputs
11853 `(("python-pretend" ,python-pretend)
11854 ("python-pytest" ,python-pytest)))
11855 (propagated-inputs
11856 `(("python-pyparsing" ,python-pyparsing)
11857 ("python-six" ,python-six)))
11858 (home-page "https://github.com/pypa/packaging")
11859 (synopsis "Core utilities for Python packages")
11860 (description "Packaging is a Python module for dealing with Python packages.
11861It offers an interface for working with package versions, names, and dependency
11862information.")
11863 ;; From 'LICENSE': This software is made available under the terms of
11864 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
11865 ;; Contributions to this software is made under the terms of *both* these
11866 ;; licenses.
11867 (license (list license:asl2.0 license:bsd-2))))
11868
11869(define-public python2-packaging
11870 (package-with-python2 python-packaging))
11871
11872(define-public python-relatorio
11873 (package
11874 (name "python-relatorio")
11875 (version "0.8.0")
11876 (source
11877 (origin
11878 (method url-fetch)
11879 (uri (pypi-uri "relatorio" version))
11880 (sha256
11881 (base32
11882 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
11883 (build-system python-build-system)
11884 (propagated-inputs
11885 `(("python-lxml" ,python-lxml)
11886 ("python-genshi" ,python-genshi)))
11887 (native-inputs
11888 `(("python-magic" ,python-magic)))
11889 (home-page "https://relatorio.tryton.org/")
11890 (synopsis "Templating library able to output ODT and PDF files")
11891 (description "Relatorio is a templating library which provides a way to
11892easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
11893for more filetypes can be easily added by creating plugins for them.")
11894 (license license:gpl3+)))
11895
11896(define-public python2-relatorio
11897 (package-with-python2 python-relatorio))
11898
11899(define-public python-radon
11900 (package
11901 (name "python-radon")
11902 (version "2.2.0")
11903 (source
11904 (origin
11905 (method url-fetch)
11906 (uri (pypi-uri "radon" version))
11907 (sha256
11908 (base32
11909 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
11910 (build-system python-build-system)
11911 (arguments
11912 `(#:phases (modify-phases %standard-phases
11913 (replace 'check
11914 (lambda _
11915 (invoke "python" "radon/tests/run.py"))))))
11916 (propagated-inputs
11917 `(("python-colorama" ,python-colorama)
11918 ("python-flake8-polyfill" ,python-flake8-polyfill)
11919 ("python-mando" ,python-mando)))
11920 (native-inputs
11921 `(("python-pytest" ,python-pytest)
11922 ("python-pytest-mock" ,python-pytest-mock)))
11923 (home-page "https://radon.readthedocs.org/")
11924 (synopsis "Code Metrics in Python")
11925 (description "Radon is a Python tool which computes various code metrics.
11926Supported metrics are:
11927@itemize @bullet
11928@item raw metrics: SLOC, comment lines, blank lines, &c.
11929@item Cyclomatic Complexity (i.e. McCabe’s Complexity)
11930@item Halstead metrics (all of them)
11931@item the Maintainability Index (a Visual Studio metric)
11932@end itemize")
11933 (license license:expat)))
11934
11935(define-public python2-radon
11936 (package-with-python2 python-radon))
11937
11938(define-public python-sure
11939 (package
11940 (name "python-sure")
11941 (version "1.4.11")
11942 (source
11943 (origin
11944 (method url-fetch)
11945 (uri (pypi-uri "sure" version))
11946 (sha256
11947 (base32
11948 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
11949 (build-system python-build-system)
11950 (propagated-inputs
11951 `(("python-mock" ,python-mock)
11952 ("python-six" ,python-six)))
11953 (native-inputs
11954 `(("python-nose" ,python-nose)))
11955 (home-page "https://github.com/gabrielfalcao/sure")
11956 (synopsis "Automated testing library in python for python")
11957 (description
11958 "Sure is a python library that leverages a DSL for writing assertions.
11959Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
11960 (license license:gpl3+)))
11961
11962(define-public python2-sure
11963 (package-with-python2 python-sure))
11964
11965(define-public python2-couleur
11966 ;; This package does not seem to support python3 at all, hence,
11967 ;; only the python2 variant definition is provided.
11968 (package
11969 (name "python2-couleur")
11970 (version "0.6.2")
11971 (source
11972 (origin
11973 (method url-fetch)
11974 (uri (pypi-uri "couleur" version))
11975 (sha256
11976 (base32
11977 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
11978 (build-system python-build-system)
11979 (arguments
11980 `(#:python ,python-2))
11981 (home-page "https://github.com/gabrielfalcao/couleur")
11982 (synopsis
11983 "ANSI terminal tool for python, colored shell and other handy fancy features")
11984 (description
11985 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
11986terminal such as coloured output in the shell, overwriting output, indentation, etc.")
11987 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
11988 ;; https://github.com/gabrielfalcao/couleur/issues/11
11989 (license license:lgpl3+)))
11990
11991(define-public python-misaka
11992 (package
11993 (name "python-misaka")
11994 (version "2.1.0")
11995 (source
11996 (origin
11997 (method url-fetch)
11998 (uri (pypi-uri "misaka" version))
11999 (sha256
12000 (base32
12001 "1yqrq3a5rracirmvk52n28nn6ckdaz897gnigv89a9gmyn87sqw7"))))
12002 (build-system python-build-system)
12003 (arguments
12004 `(;; Line 37 of setup.py calls self.run_command('develop')
12005 ;; in the 'check' phase. This command seems to be trying
12006 ;; to write to
12007 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
12008 ;; for which it does not have the permission to write.
12009 #:tests? #f))
12010 (propagated-inputs
12011 `(("python-cffi" ,python-cffi)))
12012 (home-page "https://github.com/FSX/misaka")
12013 (synopsis "Python binding for Hoedown")
12014 (description
12015 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
12016library written in C. It features a fast HTML renderer and functionality to make custom
12017renderers (e.g. man pages or LaTeX).")
12018 (license license:expat)))
12019
12020(define-public python2-misaka
12021 (package-with-python2 python-misaka))
12022
12023(define-public python2-steadymark
12024 ;; This is forced into being a python2 only variant
12025 ;; due to its dependence on couleur that has no support
12026 ;; for python3
12027 (package
12028 (name "python2-steadymark")
12029 (version "0.7.3")
12030 (source
12031 (origin
12032 (method url-fetch)
12033 (uri (pypi-uri "steadymark" version))
12034 (sha256
12035 (base32
12036 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
12037 (build-system python-build-system)
12038 (native-inputs
12039 `(("python-couleur" ,python2-couleur)
12040 ("python-sure" ,python2-sure)
12041 ("python-misaka" ,python2-misaka)))
12042 (arguments
12043 `(#:python ,python-2
12044 #:phases
12045 (modify-phases %standard-phases
12046 (add-before 'build 'patch-setup-py
12047 (lambda _
12048 ;; Update requirements from dependency==version
12049 ;; to dependency>=version
12050 (substitute* "setup.py"
12051 (("==") ">="))
12052 #t)))))
12053 (home-page "https://github.com/gabrielfalcao/steadymark")
12054 (synopsis "Markdown-based test runner for python")
12055 (description
12056 "@code{Steadymark} allows documentation to be written in github-flavoured
12057markdown. The documentation may contain snippets of code surrounded by python
12058code blocks and @code{Steadymark} will find these snippets and run them, making
12059sure that there are no old malfunctional examples in the documentation examples.")
12060 (license license:expat)))
12061
12062(define-public python-jsonpointer
12063 (package
12064 (name "python-jsonpointer")
12065 (version "1.10")
12066 (source
12067 (origin
12068 (method url-fetch)
12069 (uri (pypi-uri "jsonpointer" version))
12070 (sha256
12071 (base32
12072 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
12073 (build-system python-build-system)
12074 (home-page "https://github.com/stefankoegl/python-json-pointer")
12075 (synopsis "Identify specific nodes in a JSON document")
12076 (description "@code{jsonpointer} allows you to access specific nodes
12077by path in a JSON document (see RFC 6901).")
12078 (license license:bsd-3)))
12079
12080(define-public python2-jsonpointer
12081 (package-with-python2 python-jsonpointer))
12082
12083(define-public python-jsonpatch
12084 (package
12085 (name "python-jsonpatch")
12086 (version "1.16")
12087 (source
12088 (origin
12089 (method url-fetch)
12090 ;; pypi version lacks tests.js
12091 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12092 "archive/v" version ".tar.gz"))
12093 (file-name (string-append name "-" version ".tar.gz"))
12094 (sha256
12095 (base32
12096 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
12097 (build-system python-build-system)
12098 (native-inputs
12099 `(("python-jsonpointer" ,python-jsonpointer)))
12100 (home-page "https://github.com/stefankoegl/python-json-patch")
12101 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
12102 (description "@code{jsonpatch} is a library and program that allows
12103applying JSON Patches according to RFC 6902.")
12104 (license license:bsd-3)))
12105
12106(define-public python2-jsonpatch
12107 (package-with-python2 python-jsonpatch))
12108
12109(define-public python-jsonpatch-0.4
12110 (package (inherit python-jsonpatch)
12111 (name "python-jsonpatch")
12112 (version "0.4")
12113 (source
12114 (origin
12115 (method url-fetch)
12116 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12117 "archive/v" version ".tar.gz"))
12118 (file-name (string-append name "-" version ".tar.gz"))
12119 (sha256
12120 (base32
12121 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
12122
12123(define-public python2-jsonpatch-0.4
12124 (package-with-python2 python-jsonpatch-0.4))
12125
12126(define-public python-rfc3986
12127 (package
12128 (name "python-rfc3986")
12129 (version "1.1.0")
12130 (source (origin
12131 (method url-fetch)
12132 (uri (pypi-uri "rfc3986" version))
12133 (sha256
12134 (base32
12135 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
12136 (build-system python-build-system)
12137 (arguments
12138 `(#:modules ((guix build utils)
12139 (guix build python-build-system)
12140 (ice-9 ftw)
12141 (srfi srfi-1)
12142 (srfi srfi-26))
12143 #:phases
12144 (modify-phases %standard-phases
12145 (replace 'check
12146 (lambda _
12147 (let ((cwd (getcwd)))
12148 (setenv "PYTHONPATH"
12149 (string-append cwd "/build/"
12150 (find (cut string-prefix? "lib" <>)
12151 (scandir (string-append cwd "/build")))
12152 ":"
12153 (getenv "PYTHONPATH")))
12154 (invoke "pytest" "-v")))))))
12155 (native-inputs
12156 `(("python-pytest" ,python-pytest)))
12157 (home-page "https://rfc3986.readthedocs.io/")
12158 (synopsis "Parse and validate URI references")
12159 (description
12160 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
12161validation and authority parsing. This module also supports RFC@tie{}6874
12162which adds support for zone identifiers to IPv6 addresses.")
12163 (license license:asl2.0)))
12164
12165(define-public python2-rfc3986
12166 (package-with-python2 python-rfc3986))
12167
12168(define-public python-rfc3987
12169 (package
12170 (name "python-rfc3987")
12171 (version "1.3.7")
12172 (source
12173 (origin
12174 (method url-fetch)
12175 (uri (pypi-uri "rfc3987" version))
12176 (sha256
12177 (base32
12178 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
12179 (build-system python-build-system)
12180 (home-page "https://pypi.python.org/pypi/rfc3987")
12181 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
12182 (description "@code{rfc3987} provides routines for parsing and
12183validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
12184 (license license:gpl3+)))
12185
12186(define-public python2-rfc3987
12187 (package-with-python2 python-rfc3987))
12188
12189(define-public python-validate-email
12190 (package
12191 (name "python-validate-email")
12192 (version "1.3")
12193 (source
12194 (origin
12195 (method url-fetch)
12196 (uri (pypi-uri "validate_email" version))
12197 (sha256
12198 (base32
12199 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
12200 (build-system python-build-system)
12201 (home-page "https://github.com/syrusakbary/validate_email")
12202 (synopsis "Verifies if an email address is valid and really exists")
12203 (description "@code{validate_email} can be used to verify if an email
12204address is valid and really exists.")
12205 (license license:lgpl3+)))
12206
12207(define-public python2-validate-email
12208 (package-with-python2 python-validate-email))
12209
12210(define-public python-flex
12211 (package
12212 (name "python-flex")
12213 (version "6.10.0")
12214 (source
12215 (origin
12216 (method url-fetch)
12217 (uri (pypi-uri "flex" version))
12218 (sha256
12219 (base32
12220 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
12221 (build-system python-build-system)
12222 (propagated-inputs
12223 `(("python-click" ,python-click)
12224 ("python-iso8601" ,python-iso8601)
12225 ("python-jsonpointer" ,python-jsonpointer)
12226 ("python-pyyaml" ,python-pyyaml)
12227 ("python-requests" ,python-requests)
12228 ("python-rfc3987" ,python-rfc3987)
12229 ("python-six" ,python-six)
12230 ("python-validate-email" ,python-validate-email)))
12231 (home-page "https://github.com/pipermerriam/flex")
12232 (synopsis "Validates Swagger schemata")
12233 (description "@code{flex} can be used to validate Swagger schemata.")
12234 (license license:bsd-3)))
12235
12236(define-public python2-flex
12237 (package-with-python2 python-flex))
12238
12239(define-public python-marshmallow
12240 (package
12241 (name "python-marshmallow")
12242 (version "3.0.0b14")
12243 (source
12244 (origin
12245 (method url-fetch)
12246 (uri (pypi-uri "marshmallow" version))
12247 (sha256
12248 (base32
12249 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
12250 (build-system python-build-system)
12251 (propagated-inputs
12252 `(("python-dateutil" ,python-dateutil)
12253 ("python-simplejson" ,python-simplejson)))
12254 (native-inputs
12255 `(("python-pytest" ,python-pytest)
12256 ("python-pytz" ,python-pytz)))
12257 (home-page "https://github.com/marshmallow-code/marshmallow")
12258 (synopsis "Convert complex datatypes to and from native
12259Python datatypes.")
12260 (description "@code{marshmallow} provides a library for converting
12261complex datatypes to and from native Python datatypes.")
12262 (license license:expat)))
12263
12264(define-public python2-marshmallow
12265 (package-with-python2 python-marshmallow))
12266
12267(define-public python-apispec
12268 (package
12269 (name "python-apispec")
12270 (version "0.25.3")
12271 (source
12272 (origin
12273 (method url-fetch)
12274 (uri (pypi-uri "apispec" version))
12275 (sha256
12276 (base32
12277 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
12278 (build-system python-build-system)
12279 (propagated-inputs
12280 `(("python-pyyaml" ,python-pyyaml)))
12281 (native-inputs
12282 `(("python-pytest" ,python-pytest)
12283 ("python-flask" ,python-flask)
12284 ("python-marshmallow" ,python-marshmallow)
12285 ("python-tornado" ,python-tornado)
12286 ("python-bottle" ,python-bottle)
12287 ("python-mock" ,python-mock)))
12288 (home-page "https://github.com/marshmallow-code/apispec")
12289 (synopsis "Swagger 2.0 API specification generator")
12290 (description "@code{python-apispec} is a pluggable API specification
12291generator. Currently supports the OpenAPI specification (f.k.a.
12292Swagger 2.0).")
12293 (license license:expat)))
12294
12295(define-public python2-apispec
12296 (package-with-python2 python-apispec))
12297
12298(define-public python-flasgger
12299 (package
12300 (name "python-flasgger")
12301 (version "0.6.3")
12302 (source
12303 (origin
12304 (method url-fetch)
12305 (uri (string-append "https://github.com/rochacbruno/flasgger/archive/"
12306 version ".tar.gz"))
12307 (file-name (string-append name "-" version ".tar.gz"))
12308 (sha256
12309 (base32
12310 "1gqzlm0rb55fdpsy5ipkganlx9cnpi454fqyycr03jm22zql14ay"))))
12311 (build-system python-build-system)
12312 (arguments
12313 `(#:phases
12314 (modify-phases %standard-phases
12315 (replace 'check
12316 (lambda* (#:key inputs outputs #:allow-other-keys)
12317 (substitute* "Makefile"
12318 (("flake8 flasgger --ignore=F403")
12319 "flake8 flasgger --ignore=E731,F403"))
12320 (setenv "PYTHONPATH" (string-append (getcwd)
12321 ":"
12322 (getenv "PYTHONPATH")))
12323 (zero? (system* "py.test")))))))
12324 (propagated-inputs
12325 `(("python-flask" ,python-flask)
12326 ("python-pyyaml" ,python-pyyaml)
12327 ("python-jsonschema" ,python-jsonschema)
12328 ("python-mistune" ,python-mistune)
12329 ("python-six" ,python-six)))
12330 (native-inputs
12331 `(("python-decorator" ,python-decorator)
12332 ("python-flake8" ,python-flake8)
12333 ("python-flask-restful" ,python-flask-restful)
12334 ("python-flex" ,python-flex)
12335 ("python-pytest" ,python-pytest)
12336 ("python-pytest-cov" ,python-pytest-cov)
12337 ("python-marshmallow" ,python-marshmallow)
12338 ("python-apispec" ,python-apispec)))
12339 (home-page "https://github.com/rochacbruno/flasgger/")
12340 (synopsis "Extract Swagger specs from your Flask project")
12341 (description "@code{python-flasgger} allows extracting Swagger specs
12342from your Flask project. It is a fork of Flask-Swagger.")
12343 (license license:expat)))
12344
12345(define-public python2-flasgger
12346 (package-with-python2 python-flasgger))
12347
12348(define-public python-swagger-spec-validator
12349 (package
12350 (name "python-swagger-spec-validator")
12351 (version "2.1.0")
12352 (source
12353 (origin
12354 (method url-fetch)
12355 (uri (pypi-uri "swagger-spec-validator" version))
12356 (sha256
12357 (base32
12358 "13hkpn2lycwr0468yqhjb3kwszqf7hjwlq61w7vdxq1caz31k4nw"))))
12359 (build-system python-build-system)
12360 (propagated-inputs
12361 `(("python-jsonschema" ,python-jsonschema)
12362 ("python-six" ,python-six)))
12363 (home-page
12364 "https://github.com/Yelp/swagger_spec_validator")
12365 (synopsis "Validation of Swagger specifications")
12366 (description "@code{swagger_spec_validator} provides a library for
12367validating Swagger API specifications.")
12368 (license license:asl2.0)))
12369
12370(define-public python2-swagger-spec-validator
12371 (package-with-python2 python-swagger-spec-validator))
12372
12373(define-public python-apache-libcloud
12374 (package
12375 (name "python-apache-libcloud")
12376 (version "2.4.0")
12377 (source
12378 (origin
12379 (method url-fetch)
12380 (uri (pypi-uri "apache-libcloud" version))
12381 (sha256
12382 (base32
12383 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
12384 (build-system python-build-system)
12385 (arguments
12386 `(#:phases
12387 (modify-phases %standard-phases
12388 (add-after 'unpack 'patch-ssh
12389 (lambda* (#:key inputs #:allow-other-keys)
12390 (substitute* "libcloud/compute/ssh.py"
12391 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
12392 "/bin/ssh" "'")))
12393 #t))
12394 (add-after 'unpack 'patch-tests
12395 (lambda _
12396 (substitute* "./libcloud/test/test_file_fixtures.py"
12397 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
12398 (("def _ascii") "def _raw_data(self, method, url, body, headers):
12399 return (httplib.OK,
12400 \"1234abcd\",
12401 {\"test\": \"value\"},
12402 httplib.responses[httplib.OK])
12403 def _ascii"))
12404 (substitute* "libcloud/test/compute/test_ssh_client.py"
12405 (("class ShellOutSSHClientTests")
12406 "@unittest.skip(\"Guix container doesn't have ssh service\")
12407class ShellOutSSHClientTests")
12408 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
12409 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
12410 (("'.xF0', '.x90', '.x8D', '.x88'")
12411 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
12412 #t))
12413 (add-before 'check 'copy-secret
12414 (lambda _
12415 (copy-file "libcloud/test/secrets.py-dist"
12416 "libcloud/test/secrets.py")
12417 #t)))))
12418 (inputs
12419 `(("openssh" ,openssh)))
12420 (propagated-inputs
12421 `(("python-paramiko" ,python-paramiko)
12422 ("python-requests" ,python-requests)))
12423 (native-inputs
12424 `(("python-lockfile" ,python-lockfile)
12425 ("python-mock" ,python-mock)
12426 ("python-pytest" ,python-pytest)
12427 ("python-pytest-runner" ,python-pytest-runner)
12428 ("python-requests-mock" ,python-requests-mock)))
12429 (home-page "https://libcloud.apache.org/")
12430 (synopsis "Unified Cloud API")
12431 (description "@code{libcloud} is a Python library for interacting with
12432many of the popular cloud service providers using a unified API.")
12433 (license license:asl2.0)))
12434
12435(define-public python2-apache-libcloud
12436 (package-with-python2 python-apache-libcloud))
12437
12438(define-public python-smmap2
12439 (package
12440 (name "python-smmap2")
12441 (version "2.0.3")
12442 (source
12443 (origin
12444 (method url-fetch)
12445 (uri (pypi-uri "smmap2" version))
12446 (sha256
12447 (base32
12448 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
12449 (build-system python-build-system)
12450 (native-inputs
12451 `(("python-nosexcover" ,python-nosexcover)))
12452 (home-page "https://github.com/Byron/smmap")
12453 (synopsis "Python sliding window memory map manager")
12454 (description "@code{smmap2} is a pure Python implementation of a sliding
12455window memory map manager.")
12456 (license license:bsd-3)))
12457
12458(define-public python2-smmap2
12459 (package-with-python2 python-smmap2))
12460
12461(define-public python-regex
12462 (package
12463 (name "python-regex")
12464 (version "2017.06.07")
12465 (source (origin
12466 (method url-fetch)
12467 (uri (pypi-uri "regex" version))
12468 (sha256
12469 (base32
12470 "06r6b7yigikbj3a72whl85r2b64pj1r0ypmw9yalmkm0wnxq8mz4"))))
12471 (build-system python-build-system)
12472 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
12473 (synopsis "Alternative regular expression module")
12474 (description "This regular expression implementation is backwards-
12475compatible with the standard @code{re} module, but offers additional
12476functionality like full case-folding for case-insensitive matches in Unicode.")
12477 (license license:psfl)))
12478
12479(define-public python2-regex
12480 (package-with-python2 python-regex))
12481
12482(define-public python2-pyopengl
12483 (package
12484 (name "python2-pyopengl")
12485 (version "3.1.0")
12486 (source
12487 (origin
12488 (method url-fetch)
12489 (uri (pypi-uri "PyOpenGL" version))
12490 (sha256
12491 (base32
12492 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
12493 (arguments
12494 `(#:python ,python-2))
12495 (build-system python-build-system)
12496 (home-page "http://pyopengl.sourceforge.net")
12497 (synopsis "Standard OpenGL bindings for Python")
12498 (description
12499 "PyOpenGL is the most common cross platform Python binding to OpenGL and
12500related APIs. The binding is created using the standard @code{ctypes}
12501library.")
12502 (license license:bsd-3)))
12503
12504(define-public python2-pyopengl-accelerate
12505 (package
12506 (inherit python2-pyopengl)
12507 (name "python2-pyopengl-accelerate")
12508 (version "3.1.0")
12509 (source
12510 (origin
12511 (method url-fetch)
12512 (uri (pypi-uri "PyOpenGL-accelerate" version))
12513 (sha256
12514 (base32
12515 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
12516 (synopsis "Acceleration code for PyOpenGL")
12517 (description
12518 "This is the Cython-coded accelerator module for PyOpenGL.")))
12519
12520(define-public python-rencode
12521 (package
12522 (name "python-rencode")
12523 (version "1.0.5")
12524 (source
12525 (origin
12526 (method url-fetch)
12527 (uri (pypi-uri "rencode" version))
12528 (sha256
12529 (base32
12530 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
12531 (build-system python-build-system)
12532 (arguments
12533 `(#:phases
12534 (modify-phases %standard-phases
12535 (add-before 'check 'delete-bogus-test
12536 ;; This test requires /home/aresch/Downloads, which is not provided by
12537 ;; the build environment.
12538 (lambda _
12539 (delete-file "rencode/t.py")
12540 #t)))))
12541 (native-inputs `(("pkg-config" ,pkg-config)
12542 ("python-cython" ,python-cython)))
12543 (home-page "https://github.com/aresch/rencode")
12544 (synopsis "Serialization of heterogeneous data structures")
12545 (description
12546 "The @code{rencode} module is a data structure serialization library,
12547similar to @code{bencode} from the BitTorrent project. For complex,
12548heterogeneous data structures with many small elements, r-encoding stake up
12549significantly less space than b-encodings. This version of rencode is a
12550complete rewrite in Cython to attempt to increase the performance over the
12551pure Python module.")
12552 (license license:bsd-3)))
12553
12554(define-public python2-rencode
12555 (package-with-python2 python-rencode))
12556
12557(define-public python-xenon
12558 (package
12559 (name "python-xenon")
12560 (version "0.5.4")
12561 (source
12562 (origin
12563 (method url-fetch)
12564 (uri (pypi-uri "xenon" version))
12565 (sha256
12566 (base32
12567 "029cbhysg2vr5n4jz8gpg2793f8wkwnqpr1qgv6c1dn685vy31mc"))))
12568 (build-system python-build-system)
12569 (native-inputs
12570 `(("python-pyyaml" ,python-pyyaml)
12571 ("python-radon" ,python-radon)
12572 ("python-requests" ,python-requests)
12573 ("python-flake8" ,python-flake8)
12574 ("python-tox" ,python-tox)))
12575 (arguments
12576 `(#:phases
12577 (modify-phases %standard-phases
12578 (add-before 'build 'patch-test-requirements
12579 (lambda _
12580 ;; Remove httpretty dependency for tests.
12581 (substitute* "setup.py"
12582 (("httpretty") ""))
12583 #t)))))
12584 (home-page "https://xenon.readthedocs.org/")
12585 (synopsis "Monitor code metrics for Python on your CI server")
12586 (description
12587 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
12588Ideally, @code{xenon} is run every time code is committed. Through command
12589line options, various thresholds can be set for the complexity of code. It
12590will fail (i.e. it will exit with a non-zero exit code) when any of these
12591requirements is not met.")
12592 (license license:expat)))
12593
12594(define-public python2-xenon
12595 (package-with-python2 python-xenon))
12596
12597(define-public python-pysocks
12598 (package
12599 (name "python-pysocks")
12600 (version "1.6.8")
12601 (source
12602 (origin
12603 (method url-fetch)
12604 (uri (pypi-uri "PySocks" version))
12605 (sha256
12606 (base32
12607 "0wn6xafwy9c1gamwljw3fyvih5w19qy9xp39zmv8c90ai5ajrr9z"))))
12608 (build-system python-build-system)
12609 (arguments `(#:tests? #f))
12610 (home-page "https://github.com/Anorov/PySocks")
12611 (synopsis "SOCKS client module")
12612 (description "@code{pysocks} is an updated and semi-actively maintained
12613version of @code{SocksiPy} with bug fixes and extra features.")
12614 (license license:bsd-3)))
12615
12616(define-public python2-pysocks
12617 (package-with-python2 python-pysocks))
12618
12619(define-public python-pydiff
12620 (package
12621 (name "python-pydiff")
12622 (version "0.2")
12623 (source
12624 (origin
12625 (method url-fetch)
12626 (uri (pypi-uri "pydiff" version))
12627 (sha256
12628 (base32
12629 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
12630 (build-system python-build-system)
12631 (home-page "https://github.com/myint/pydiff")
12632 (synopsis "Library to diff two Python files at the bytecode level")
12633 (description
12634 "@code{pydiff} makes it easy to look for actual code changes while
12635ignoring formatting changes.")
12636 (license license:expat)))
12637
12638(define-public python2-pydiff
12639 (package-with-python2 python-pydiff))
12640
12641(define-public python-tqdm
12642 (package
12643 (name "python-tqdm")
12644 (version "4.19.6")
12645 (source
12646 (origin
12647 (method url-fetch)
12648 (uri (pypi-uri "tqdm" version))
12649 (sha256
12650 (base32
12651 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
12652 (build-system python-build-system)
12653 (native-inputs
12654 `(("python-flake8" ,python-flake8)
12655 ("python-nose" ,python-nose)
12656 ("python-coverage" ,python-coverage)))
12657 (home-page "https://github.com/tqdm/tqdm")
12658 (synopsis "Fast, extensible progress meter")
12659 (description
12660 "Make loops show a progress bar on the console by just wrapping any
12661iterable with @code{|tqdm(iterable)|}. Offers many options to define
12662design and layout.")
12663 (license (list license:mpl2.0 license:expat))))
12664
12665(define-public python2-tqdm
12666 (package-with-python2 python-tqdm))
12667
12668(define-public python-pkginfo
12669 (package
12670 (name "python-pkginfo")
12671 (version "1.4.2")
12672 (source
12673 (origin
12674 (method url-fetch)
12675 (uri (pypi-uri "pkginfo" version))
12676 (sha256
12677 (base32
12678 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
12679 (build-system python-build-system)
12680 (arguments
12681 ;; The tests are broken upstream.
12682 '(#:tests? #f))
12683 (home-page
12684 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
12685 (synopsis
12686 "Query metadatdata from sdists, bdists, and installed packages")
12687 (description
12688 "API to query the distutils metadata written in @file{PKG-INFO} inside a
12689source distriubtion (an sdist) or a binary distribution (e.g., created by
12690running bdist_egg). It can also query the EGG-INFO directory of an installed
12691distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
12692created by running @code{python setup.py develop}).")
12693 (license license:expat)))
12694
12695(define-public python2-pkginfo
12696 (package-with-python2 python-pkginfo))
12697
12698(define-public python-twine
12699 (package
12700 (name "python-twine")
12701 (version "1.9.1")
12702 (source
12703 (origin
12704 (method url-fetch)
12705 (uri (pypi-uri "twine" version))
12706 (sha256
12707 (base32
12708 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
12709 (build-system python-build-system)
12710 (propagated-inputs
12711 `(("python-tqdm" ,python-tqdm)
12712 ("python-pkginfo" ,python-pkginfo)
12713 ("python-requests" ,python-requests)
12714 ("python-requests-toolbelt" ,python-requests-toolbelt)))
12715 (home-page "https://github.com/pypa/twine")
12716 (synopsis "Collection of utilities for interacting with PyPI")
12717 (description
12718 "@code{twine} currently supports registering projects and uploading
12719distributions. It authenticates the user over HTTPS, allows them to pre-sign
12720their files and supports any packaging format (including wheels).")
12721 (license license:asl2.0)))
12722
12723(define-public python2-twine
12724 (package-with-python2 python-twine))
12725
12726(define-public python-linecache2
12727 (package
12728 (name "python-linecache2")
12729 (version "1.0.0")
12730 (source
12731 (origin
12732 (method url-fetch)
12733 (uri (pypi-uri "linecache2" version))
12734 (sha256
12735 (base32
12736 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
12737 (build-system python-build-system)
12738 (arguments
12739 `(;; The tests depend on unittest2, and our version is a bit too old.
12740 #:tests? #f))
12741 (native-inputs
12742 `(("python-pbr" ,python-pbr-minimal)))
12743 (home-page
12744 "https://github.com/testing-cabal/linecache2")
12745 (synopsis "Backports of the linecache module")
12746 (description
12747 "The linecache module allows one to get any line from any file, while
12748attempting to optimize internally, using a cache, the common case where many
12749lines are read from a single file.")
12750 (license license:psfl)))
12751
12752(define-public python2-linecache2
12753 (package-with-python2 python-linecache2))
12754
12755(define-public python-traceback2
12756 (package
12757 (name "python-traceback2")
12758 (version "1.4.0")
12759 (source
12760 (origin
12761 (method url-fetch)
12762 (uri (pypi-uri "traceback2" version))
12763 (sha256
12764 (base32
12765 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
12766 (build-system python-build-system)
12767 (arguments
12768 `(;; python-traceback2 and python-unittest2 depend on one another.
12769 #:tests? #f))
12770 (native-inputs
12771 `(("python-pbr" ,python-pbr-minimal)))
12772 (propagated-inputs
12773 `(("python-linecache2" ,python-linecache2)))
12774 (home-page
12775 "https://github.com/testing-cabal/traceback2")
12776 (synopsis "Backports of the traceback module")
12777 (description
12778 "This module provides a standard interface to extract, format and print
12779stack traces of Python programs. It exactly mimics the behavior of the Python
12780interpreter when it prints a stack trace.")
12781 (license license:psfl)))
12782
12783(define-public python2-traceback2
12784 (package-with-python2 python-traceback2))
12785
12786(define-public python-ratelimiter
12787 (package
12788 (name "python-ratelimiter")
12789 (version "1.2.0")
12790 (source
12791 (origin
12792 (method url-fetch)
12793 (uri (pypi-uri "ratelimiter" version))
12794 (sha256
12795 (base32
12796 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
12797 (build-system python-build-system)
12798 (arguments
12799 '(#:tests? #f)) ; There are no tests in the pypi archive.
12800 (home-page "https://github.com/RazerM/ratelimiter")
12801 (synopsis "Simple rate limiting object")
12802 (description
12803 "The @code{ratelimiter} module ensures that an operation will not be
12804executed more than a given number of times during a given period.")
12805 (license license:asl2.0)))
12806
12807(define-public python2-ratelimiter
12808 (package-with-python2 python-ratelimiter))
12809
12810(define-public python-dukpy
12811 (package
12812 (name "python-dukpy")
12813 (version "0.3")
12814 (source
12815 (origin
12816 (method url-fetch)
12817 (uri (string-append "https://github.com/kovidgoyal/dukpy/archive/v"
12818 version ".tar.gz"))
12819 (file-name (string-append name "-" version ".tar.gz"))
12820 (sha256
12821 (base32
12822 "0pj39rfwlzivqm5hkrsza7gssg6ggpxlq5ivc8f3h7x5pfgc6y6c"))))
12823 (build-system python-build-system)
12824 (home-page "https://github.com/kovidgoyal/dukpy")
12825 (synopsis "Run JavaScript in python")
12826 (description
12827 "dukpy is a JavaScript runtime environment for Python using the duktape
12828embeddable JavaScript engine.")
12829 ;; Dukpy is licensed under MIT like the embedded duktape library,
12830 ;; with 'errors.c' as GPL3.
12831 (license (list license:expat license:gpl3))))
12832
12833(define-public python2-dukpy
12834 (package-with-python2 python-dukpy))
12835
12836(define-public python-jsonrpclib-pelix
12837 (package
12838 (name "python-jsonrpclib-pelix")
12839 (version "0.3.2")
12840 (source
12841 (origin
12842 (method url-fetch)
12843 (uri (pypi-uri "jsonrpclib-pelix" version))
12844 (sha256
12845 (base32
12846 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
12847 (build-system python-build-system)
12848 (arguments
12849 `(#:tests? #f)) ; no tests in PyPI tarball
12850 (home-page "https://github.com/tcalmant/jsonrpclib/")
12851 (synopsis "JSON-RPC 2.0 client library for Python")
12852 (description
12853 "This library implements the JSON-RPC v2.0
12854specification (backwards-compatible) as a client library for Python. This
12855version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
12856services.")
12857 (license license:asl2.0)))
12858
12859(define-public python2-jsonrpclib-pelix
12860 (package-with-python2 python-jsonrpclib-pelix))
12861
12862(define-public python-setuptools-scm-git-archive
12863 (package
12864 (name "python-setuptools-scm-git-archive")
12865 (version "1.0")
12866 (source
12867 (origin
12868 (method url-fetch)
12869 (uri (pypi-uri "setuptools_scm_git_archive" version))
12870 (sha256
12871 (base32
12872 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
12873 (build-system python-build-system)
12874 (native-inputs
12875 `(("python-pytest" ,python-pytest)))
12876 (propagated-inputs
12877 `(("python-setuptools-scm" ,python-setuptools-scm)))
12878 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
12879 (synopsis "Setuptools_scm plugin for git archives")
12880 (description
12881 "The setuptools_scm_git_archive package is a plugin to
12882setuptools_scm, which supports obtaining versions from git archives that
12883belong to tagged versions.")
12884 (license license:expat)))
12885
12886(define-public python2-setuptools-scm-git-archive
12887 (package-with-python2 python-setuptools-scm-git-archive))
12888
12889(define-public python-pyclipper
12890 (package
12891 (name "python-pyclipper")
12892 (version "1.1.0.post1")
12893 (source
12894 (origin
12895 (method url-fetch)
12896 (uri (pypi-uri "pyclipper" version ".zip"))
12897 (sha256
12898 (base32
12899 "0ldbkbnx94an4zzrwb1sxmg6k0jgk4cwmvcdyy8y5k1zslc612wa"))
12900 (modules '((guix build utils)))
12901 (snippet
12902 '(begin
12903 ;; This file is generated by Cython.
12904 (delete-file "pyclipper/pyclipper.cpp") #t))))
12905 (build-system python-build-system)
12906 (arguments
12907 `(#:phases
12908 (modify-phases %standard-phases
12909 (add-before 'build 'cythonize-sources
12910 (lambda _
12911 (with-directory-excursion "pyclipper"
12912 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
12913 (propagated-inputs
12914 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
12915 (native-inputs
12916 `(("python-cython" ,python-cython)
12917 ("python-pytest" ,python-pytest)
12918 ("python-pytest-runner" ,python-pytest-runner)
12919 ("python-unittest2" ,python-unittest2)
12920 ("unzip" ,unzip)))
12921 (home-page "https://github.com/greginvm/pyclipper")
12922 (synopsis "Wrapper for Angus Johnson's Clipper library")
12923 (description
12924 "Pyclipper is a Cython wrapper for the C++ translation of the
12925Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
12926 (license license:expat)))
12927
12928(define-public python2-pyclipper
12929 (package-with-python2 python-pyclipper))
12930
12931(define-public python2-booleanoperations
12932 (package
12933 (name "python2-booleanoperations")
12934 (version "0.7.1")
12935 (source
12936 (origin
12937 (method url-fetch)
12938 (uri (pypi-uri "booleanOperations" version ".zip"))
12939 (sha256
12940 (base32
12941 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
12942 (build-system python-build-system)
12943 (arguments
12944 `(#:python ,python-2))
12945 (native-inputs
12946 `(("unzip" ,unzip)
12947 ("python2-pytest" ,python2-pytest)
12948 ("python2-pytest-runner" ,python2-pytest-runner)))
12949 (propagated-inputs
12950 `(("python-fonttools" ,python2-fonttools)
12951 ("python-pyclipper" ,python2-pyclipper)
12952 ("python-ufolib" ,python2-ufolib)))
12953 (home-page "https://github.com/typemytype/booleanOperations")
12954 (synopsis "Boolean operations on paths")
12955 (description
12956 "BooleanOperations provides a Python library that enables
12957boolean operations on paths.")
12958 (license license:expat)))
12959
12960(define-public python-tempdir
12961 (package
12962 (name "python-tempdir")
12963 (version "0.7.1")
12964 (source
12965 (origin
12966 (method url-fetch)
12967 (uri (pypi-uri "tempdir" version))
12968 (sha256
12969 (base32
12970 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
12971 (build-system python-build-system)
12972 (home-page "https://pypi.org/project/tempdir/")
12973 (arguments
12974 ;; the package has no tests
12975 '(#:tests? #f))
12976 (synopsis "Python library for managing temporary directories")
12977 (description
12978 "This library manages temporary directories that are automatically
12979deleted with all their contents when they are no longer needed. It is
12980particularly convenient for use in tests.")
12981 (license license:expat)))
12982
12983(define-public python2-tempdir
12984 (package-with-python2 python-tempdir))
12985
12986(define-public python-activepapers
12987 (package
12988 (name "python-activepapers")
12989 (version "0.2.2")
12990 (source
12991 (origin
12992 (method url-fetch)
12993 (uri (pypi-uri "ActivePapers.Py" version))
12994 (sha256
12995 (base32
12996 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
12997 (build-system python-build-system)
12998 (arguments
12999 `(#:modules ((ice-9 ftw)
13000 (srfi srfi-1)
13001 (guix build utils)
13002 (guix build python-build-system))
13003
13004 #:phases
13005 (modify-phases %standard-phases
13006 (add-after 'unpack 'delete-python2-code
13007 (lambda _
13008 (for-each delete-file
13009 '("lib/activepapers/builtins2.py"
13010 "lib/activepapers/standardlib2.py"
13011 "lib/activepapers/utility2.py"))))
13012 (replace 'check
13013 (lambda _
13014 ;; Deactivate the test cases that download files
13015 (setenv "NO_NETWORK_ACCESS" "1")
13016 ;; For some strange reason, some tests fail if nosetests runs all
13017 ;; test modules in a single execution. They pass if each test
13018 ;; module is run individually.
13019 (for-each (lambda (filename)
13020 (invoke "nosetests"
13021 (string-append "tests/" filename)))
13022 (scandir "tests"
13023 (lambda (filename)
13024 (string-suffix? ".py" filename)))))))))
13025 (native-inputs
13026 `(("python-tempdir" ,python-tempdir)
13027 ("python-nose" ,python-nose)))
13028 (propagated-inputs
13029 `(("python-h5py" ,python-h5py)))
13030 (home-page "http://www.activepapers.org/")
13031 (synopsis "Executable papers for scientific computing")
13032 (description
13033 "ActivePapers is a tool for working with executable papers, which
13034combine data, code, and documentation in single-file packages,
13035suitable for publication as supplementary material or on repositories
13036such as figshare or Zenodo.")
13037 (properties `((python2-variant . ,(delay python2-activepapers))))
13038 (license license:bsd-3)))
13039
13040(define-public python2-activepapers
13041 (let ((base (package-with-python2
13042 (strip-python2-variant python-activepapers))))
13043 (package
13044 (inherit base)
13045 (arguments
13046 (substitute-keyword-arguments (package-arguments base)
13047 ((#:phases phases)
13048 `(modify-phases ,phases
13049 (delete 'delete-python2-code)
13050 (add-after 'unpack 'delete-python3-code
13051 (lambda _
13052 (for-each delete-file
13053 '("lib/activepapers/builtins3.py"
13054 "lib/activepapers/standardlib3.py"
13055 "lib/activepapers/utility3.py")))))))))))
13056
13057(define-public python-semver
13058 (package
13059 (name "python-semver")
13060 (version "2.7.9")
13061 (source
13062 (origin
13063 (method url-fetch)
13064 (uri (pypi-uri "semver" version))
13065 (sha256
13066 (base32
13067 "0hhgqppchv59rqj0yzi1prdg2nfsywqmjsqy2rycyxm0hvxmbyqz"))))
13068 (build-system python-build-system)
13069 (arguments
13070 `(#:phases
13071 (modify-phases %standard-phases
13072 (add-after 'unpack 'patch-test-requirements
13073 (lambda _
13074 (substitute* "setup.py"
13075 ;; Our Python is new enough.
13076 (("'virtualenv<14\\.0\\.0'") "'virtualenv'"))
13077 #t)))))
13078 (native-inputs
13079 `(("python-tox" ,python-tox)
13080 ("python-virtualenv" ,python-virtualenv)))
13081 (home-page "https://github.com/k-bx/python-semver")
13082 (synopsis "Python helper for Semantic Versioning")
13083 (description "This package provides a Python library for
13084@url{Semantic Versioning, http://semver.org/}.")
13085 (license license:bsd-3)))
13086
13087(define-public python2-semver
13088 (package-with-python2 python-semver))
13089
13090(define-public python-pyro4
13091 (package
13092 (name "python-pyro4")
13093 (version "4.74")
13094 (source
13095 (origin
13096 (method url-fetch)
13097 (uri (pypi-uri "Pyro4" version))
13098 (sha256
13099 (base32
13100 "0pzp7c6q3vvkxq0wy9lr6wd5wky40sajz69g697i5rb2q497pvc9"))))
13101 (build-system python-build-system)
13102 (propagated-inputs
13103 `(("python-serpent" ,python-serpent)))
13104 (home-page "https://pyro4.readthedocs.io")
13105 (synopsis "Distributed object middleware for Python")
13106 (description
13107 "Pyro enables you to build applications in which objects can talk to each
13108other over the network. You can just use normal Python method calls to call
13109objects on other machines, also known as remote procedure calls (RPC).")
13110 (license license:expat)))
13111
13112(define-public python2-pyro
13113 (package
13114 (name "python2-pyro")
13115 (version "3.16")
13116 (source
13117 (origin
13118 (method url-fetch)
13119 (uri (pypi-uri "Pyro" version))
13120 (file-name (string-append "Pyro-" version ".tar.gz"))
13121 (sha256
13122 (base32
13123 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
13124 (build-system python-build-system)
13125 (arguments
13126 ;; Pyro is not compatible with Python 3
13127 `(#:python ,python-2
13128 ;; Pyro has no test cases for automatic execution
13129 #:tests? #f))
13130 (home-page "http://pythonhosted.org/Pyro/")
13131 (synopsis "Distributed object manager for Python")
13132 (description "Pyro is a Distributed Object Technology system
13133written in Python that is designed to be easy to use. It resembles
13134Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
13135which is a system and language independent Distributed Object Technology
13136and has much more to offer than Pyro or RMI. Pyro 3.x is no
13137longer maintained. New projects should use Pyro4 instead, which
13138is the new Pyro version that is actively developed.")
13139 (license license:expat)))
13140
13141(define-public python2-scientific
13142 (package
13143 (name "python2-scientific")
13144 (version "2.9.4")
13145 (source
13146 (origin
13147 (method url-fetch)
13148 (uri (string-append "https://bitbucket.org/khinsen/"
13149 "scientificpython/downloads/ScientificPython-"
13150 version ".tar.gz"))
13151 (file-name (string-append "ScientificPython-" version ".tar.gz"))
13152 (sha256
13153 (base32
13154 "0fc69zhlsn9d2jvbzyjl9ah53vj598h84nkq230c83ahfvgzx5y3"))))
13155 (build-system python-build-system)
13156 (inputs
13157 `(("netcdf" ,netcdf)))
13158 (propagated-inputs
13159 `(("python-numpy" ,python2-numpy-1.8)
13160 ("python-pyro" ,python2-pyro)))
13161 (arguments
13162 ;; ScientificPython is not compatible with Python 3
13163 `(#:python ,python-2
13164 #:tests? #f ; No test suite
13165 #:phases
13166 (modify-phases %standard-phases
13167 (replace 'build
13168 (lambda* (#:key inputs #:allow-other-keys)
13169 (zero? (system* "python" "setup.py" "build"
13170 (string-append "--netcdf_prefix="
13171 (assoc-ref inputs "netcdf")))))))))
13172 (home-page "https://bitbucket.org/khinsen/scientificpython")
13173 (synopsis "Python modules for scientific computing")
13174 (description "ScientificPython is a collection of Python modules that are
13175useful for scientific computing. Most modules are rather general (Geometry,
13176physical units, automatic derivatives, ...) whereas others are more
13177domain-specific (e.g. netCDF and PDB support). The library is currently
13178not actively maintained and works only with Python 2 and NumPy < 1.9.")
13179 (license license:cecill-c)))
13180
13181(define-public python2-mmtk
13182 (package
13183 (name "python2-mmtk")
13184 (version "2.7.11")
13185 (source
13186 (origin
13187 (method url-fetch)
13188 (uri (string-append "https://bitbucket.org/khinsen/"
13189 "mmtk/downloads/MMTK-" version ".tar.gz"))
13190 (file-name (string-append "MMTK-" version ".tar.gz"))
13191 (sha256
13192 (base32
13193 "1d0nnjx4lwsvh8f99vv1r6gi50d93yba0adkz8b4zgv4za4c5862"))))
13194 (build-system python-build-system)
13195 (native-inputs
13196 `(("netcdf" ,netcdf)))
13197 (propagated-inputs
13198 `(("python-scientific" ,python2-scientific)
13199 ("python-tkinter" ,python-2 "tk")))
13200 (arguments
13201 `(#:python ,python-2
13202 #:tests? #f
13203 #:phases
13204 (modify-phases %standard-phases
13205 (add-before 'build 'includes-from-scientific
13206 (lambda* (#:key inputs #:allow-other-keys)
13207 (mkdir-p "Include/Scientific")
13208 (copy-recursively
13209 (string-append
13210 (assoc-ref inputs "python-scientific")
13211 "/include/python2.7/Scientific")
13212 "Include/Scientific"))))))
13213 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
13214 (synopsis "Python library for molecular simulation")
13215 (description "MMTK is a library for molecular simulations with an emphasis
13216on biomolecules. It provides widely used methods such as Molecular Dynamics
13217and normal mode analysis, but also basic routines for implementing new methods
13218for simulation and analysis. The library is currently not actively maintained
13219and works only with Python 2 and NumPy < 1.9.")
13220 (license license:cecill-c)))
13221
13222(define-public python-phonenumbers
13223 (package
13224 (name "python-phonenumbers")
13225 (version "8.9.1")
13226 (source
13227 (origin
13228 (method url-fetch)
13229 (uri (pypi-uri "phonenumbers" version))
13230 (sha256
13231 (base32
13232 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
13233 (build-system python-build-system)
13234 (home-page
13235 "https://github.com/daviddrysdale/python-phonenumbers")
13236 (synopsis
13237 "Python library for dealing with international phone numbers")
13238 (description
13239 "This package provides a Python port of Google's libphonenumber library.")
13240 (license license:asl2.0)))
13241
13242(define-public python2-phonenumbers
13243 (package-with-python2 python-phonenumbers))
13244
13245(define-public python-send2trash
13246 (package
13247 (name "python-send2trash")
13248 (version "1.4.2")
13249 (source
13250 (origin (method url-fetch)
13251 ;; Source tarball on PyPI doesn't include tests.
13252 (uri (string-append "https://github.com/hsoft/send2trash/archive/"
13253 version ".tar.gz"))
13254 (file-name (string-append name "-" version ".tar.gz"))
13255 (sha256
13256 (base32
13257 "0ffyhwjyx61slkdy38iwjc4gmj7fj9gs2q58f075gwvq630pzm9z"))))
13258 (build-system python-build-system)
13259 (arguments
13260 '(#:phases
13261 (modify-phases %standard-phases
13262 (add-before 'check 'pre-check
13263 (lambda _
13264 (mkdir-p "/tmp/foo")
13265 (setenv "HOME" "/tmp/foo")
13266 #t)))))
13267 (home-page "https://github.com/hsoft/send2trash")
13268 (synopsis "Send files to the user's @file{~/Trash} directory")
13269 (description "This package provides a Python library to send files to the
13270user's @file{~/Trash} directory.")
13271 (license license:bsd-3)))
13272
13273(define-public python2-send2trash
13274 (package
13275 (inherit (package-with-python2 python-send2trash))
13276 (arguments
13277 (substitute-keyword-arguments (package-arguments python-send2trash)
13278 ((#:phases phases)
13279 `(modify-phases ,phases
13280 (add-before 'check 'setenv
13281 (lambda _
13282 (setenv "PYTHONPATH"
13283 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
13284 #t))))))
13285 (properties `((python2-variant . ,(delay python-send2trash))))))
13286
13287(define-public python-yapf
13288 (package
13289 (name "python-yapf")
13290 (version "0.24.0")
13291 (source
13292 (origin
13293 (method url-fetch)
13294 (uri (pypi-uri "yapf" version))
13295 (sha256
13296 (base32
13297 "0anwby0ydmyzcsgjc5dn1ryddwvii4dq61vck447q0n96npnzfyf"))))
13298 (build-system python-build-system)
13299 (home-page "https://github.com/google/yapf")
13300 (synopsis "Formatter for Python code")
13301 (description "YAPF is a formatter for Python code. It's based off of
13302@dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
13303takes the code and reformats it to the best formatting that conforms to the
13304style guide, even if the original code didn't violate the style guide.")
13305 (license license:asl2.0)))
13306
13307(define-public python2-yapf
13308 (package-with-python2 python-yapf))
13309
13310(define-public python-gyp
13311 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
13312 (revision "0"))
13313 (package
13314 (name "python-gyp")
13315 ;; Google does not release versions,
13316 ;; based on second most recent commit date.
13317 (version (git-version "0.0.0" revision commit))
13318 (source
13319 (origin
13320 ;; Google does not release tarballs,
13321 ;; git checkout is needed.
13322 (method git-fetch)
13323 (uri (git-reference
13324 (url "https://chromium.googlesource.com/external/gyp")
13325 (commit commit)))
13326 (file-name (git-file-name name version))
13327 (sha256
13328 (base32
13329 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
13330 (build-system python-build-system)
13331 (home-page "https://gyp.gsrc.io/")
13332 (synopsis "GYP is a Meta-Build system")
13333 (description
13334 "GYP builds build systems for large, cross platform applications.
13335It can be used to generate XCode projects, Visual Studio projects, Ninja build
13336files, and Makefiles.")
13337 (license license:bsd-3))))
13338
13339(define-public python2-gyp
13340 (package-with-python2 python-gyp))
13341
13342(define-public python-whatever
13343 (package
13344 (name "python-whatever")
13345 (version "0.5")
13346 (source
13347 (origin
13348 (method url-fetch)
13349 (uri (string-append "https://github.com/Suor/whatever/archive/" version
13350 ".tar.gz"))
13351 (sha256
13352 (base32
13353 "1iqvnaf0zpc6b4rvbqq4xy45mszcscyzpzknv8wg6j84pbp22sap"))
13354 (file-name (string-append name "-" version ".tar.gz"))))
13355 (build-system python-build-system)
13356 (arguments
13357 `(#:phases
13358 (modify-phases %standard-phases
13359 (replace 'check
13360 (lambda _
13361 (invoke "py.test"))))))
13362 (native-inputs
13363 `(("python-pytest" ,python-pytest)))
13364 (home-page "http://github.com/Suor/whatever")
13365 (synopsis "Make anonymous functions by partial application of operators")
13366 (description "@code{whatever} provides an easy way to make anonymous
13367functions by partial application of operators.")
13368 (license license:bsd-3)))
13369
13370(define-public python2-whatever
13371 (package-with-python2 python-whatever))
13372
13373(define-public python-funcy
13374 (package
13375 (name "python-funcy")
13376 (version "1.10")
13377 (source
13378 (origin
13379 (method url-fetch)
13380 (uri (string-append "https://github.com/Suor/funcy/archive/" version
13381 ".tar.gz"))
13382 (sha256
13383 (base32
13384 "1fanxivsip29vgarw6dn39xym3q4pbxcpa11plpp548lvxajpahz"))
13385 (file-name (string-append name "-" version ".tar.gz"))))
13386 (build-system python-build-system)
13387 (arguments
13388 `(#:phases
13389 (modify-phases %standard-phases
13390 (replace 'check
13391 (lambda _
13392 (invoke "py.test"))))))
13393 (native-inputs
13394 `(("python-pytest" ,python-pytest)
13395 ("python-whatever" ,python-whatever)))
13396 (home-page "http://github.com/Suor/funcy")
13397 (synopsis "Functional tools")
13398 (description "@code{funcy} is a library that provides functional tools.
13399Examples are:
13400@enumerate
13401@item merge - Merges collections of the same type
13402@item walk - Type-preserving map
13403@item select - Selects a part of a collection
13404@item take - Takes the first n items of a collection
13405@item first - Takes the first item of a collection
13406@item remove - Predicated-removes items of a collection
13407@item concat - Concatenates two collections
13408@item flatten - Flattens a collection with subcollections
13409@item distinct - Returns only distinct items
13410@item split - Predicated-splits a collection
13411@item split_at - Splits a collection at a given item
13412@item group_by - Groups items by group
13413@item pairwise - Pairs off adjacent items
13414@item partial - Partially-applies a function
13415@item curry - Curries a function
13416@item compose - Composes functions
13417@item complement - Complements a predicate
13418@item all_fn - \"all\" with predicate
13419@end enumerate")
13420 (license license:bsd-3)))
13421
13422(define-public python2-funcy
13423 (package-with-python2 python-funcy))
13424
13425(define-public python-isoweek
13426 (package
13427 (name "python-isoweek")
13428 (version "1.3.3")
13429 (source
13430 (origin
13431 (method url-fetch)
13432 (uri (pypi-uri "isoweek" version))
13433 (sha256
13434 (base32
13435 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
13436 (build-system python-build-system)
13437 (home-page "https://github.com/gisle/isoweek")
13438 (synopsis "Objects representing a week")
13439 (description "The @code{isoweek} module provide the class Week that
13440implements the week definition of ISO 8601. This standard also defines
13441a notation for identifying weeks; yyyyWww (where the W is a literal).
13442Week instances stringify to this form.")
13443 (license license:bsd-3)))
13444
13445(define-public python2-isoweek
13446 (package-with-python2 python-isoweek))
13447
13448(define-public python-tokenize-rt
13449 (package
13450 (name "python-tokenize-rt")
13451 (version "2.0.1")
13452 (source
13453 (origin
13454 (method url-fetch)
13455 (uri (pypi-uri "tokenize-rt" version))
13456 (sha256
13457 (base32
13458 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
13459 (build-system python-build-system)
13460 (home-page "https://github.com/asottile/tokenize-rt")
13461 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
13462 (description
13463 "This Python library is a wrapper around @code{tokenize} from the Python
13464standard library. It provides two additional tokens @code{ESCAPED_NL} and
13465@code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
13466and @code{tokens_to_src} to roundtrip.")
13467 (license license:expat)))
13468
13469(define-public python-future-fstrings
13470 (package
13471 (name "python-future-fstrings")
13472 (version "0.4.1")
13473 (source
13474 (origin
13475 (method url-fetch)
13476 (uri (pypi-uri "future_fstrings" version))
13477 (sha256
13478 (base32
13479 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
13480 (build-system python-build-system)
13481 (propagated-inputs
13482 `(("python-tokenize-rt" ,python-tokenize-rt)))
13483 (home-page "https://github.com/asottile/future-fstrings")
13484 (synopsis "Backport of fstrings to Python < 3.6")
13485 (description
13486 "This package provides a UTF-8 compatible encoding
13487@code{future_fstrings}, which performs source manipulation. It decodes the
13488source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
13489@code{f} strings.")
13490 (license license:expat)))
13491
13492(define-public python-typing
13493 (package
13494 (name "python-typing")
13495 (version "3.6.6")
13496 (source
13497 (origin
13498 (method url-fetch)
13499 (uri (pypi-uri "typing" version))
13500 (sha256
13501 (base32
13502 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
13503 (build-system python-build-system)
13504 (home-page "https://docs.python.org/3/library/typing.html")
13505 (synopsis "Type hints for Python")
13506 (description "This is a backport of the standard library @code{typing}
13507module to Python versions older than 3.5. Typing defines a standard notation
13508for Python function and variable type annotations. The notation can be used
13509for documenting code in a concise, standard format, and it has been designed
13510to also be used by static and runtime type checkers, static analyzers, IDEs
13511and other tools.")
13512 (license license:psfl)))
13513
13514(define-public python2-typing
13515 (package-with-python2 python-typing))
13516
13517(define-public bpython
13518 (package
13519 (name "bpython")
13520 (version "0.17.1")
13521 (source
13522 (origin
13523 (method url-fetch)
13524 (uri (pypi-uri "bpython" version))
13525 (sha256
13526 (base32
13527 "0bxhxi5zxdkrf8b4gwn0d363kdz3qnypjwhm1aydki53ph8ca1w9"))))
13528 (build-system python-build-system)
13529 (arguments
13530 `(#:phases
13531 (modify-phases %standard-phases
13532 (add-after 'unpack 'remove-failing-test
13533 (lambda _
13534 ;; Remove failing test. FIXME: make it pass
13535 (delete-file "bpython/test/test_args.py")
13536 #t))
13537 (add-after 'wrap 'add-aliases
13538 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
13539 (lambda* (#:key outputs #:allow-other-keys)
13540 (let ((out (assoc-ref outputs "out")))
13541 (for-each
13542 (lambda (old new)
13543 (symlink old (string-append out "/bin/" new)))
13544 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
13545 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
13546 #t)))))
13547 (propagated-inputs
13548 `(("python-pygments" ,python-pygments)
13549 ("python-requests" ,python-requests)
13550 ("python-babel" ,python-babel) ; optional, for internationalization
13551 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
13552 ("python-greenlet" ,python-greenlet)
13553 ("python-urwid" ,python-urwid) ; for bpython-urwid only
13554 ("python-six" ,python-six)))
13555 (native-inputs
13556 `(("python-sphinx" ,python-sphinx)
13557 ("python-mock" ,python-mock)))
13558 (home-page "https://bpython-interpreter.org/")
13559 (synopsis "Fancy interface to the Python interpreter")
13560 (description "Bpython is a fancy interface to the Python
13561interpreter. bpython's main features are
13562
13563@enumerate
13564@item in-line syntax highlighting,
13565@item readline-like autocomplete with suggestions displayed as you type,
13566@item expected parameter list for any Python function,
13567@item \"rewind\" function to pop the last line of code from memory and
13568 re-evaluate,
13569@item send the code you've entered off to a pastebin,
13570@item save the code you've entered to a file, and
13571@item auto-indentation.
13572@end enumerate")
13573 (license license:expat)))
13574
13575(define-public bpython2
13576 (let ((base (package-with-python2
13577 (strip-python2-variant bpython))))
13578 (package (inherit base)
13579 (name "bpython2")
13580 (arguments
13581 `(#:python ,python-2
13582 #:phases
13583 (modify-phases %standard-phases
13584 (add-after 'unpack 'remove-failing-test
13585 (lambda _
13586 ;; Remove failing test. FIXME: make it pass
13587 (delete-file "bpython/test/test_args.py")
13588 ;; Disable failing test-cases (renaming inhibits they are
13589 ;; discovered)
13590 (substitute* "bpython/test/test_curtsies_repl.py"
13591 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
13592 (string-append a "xxx_off_" b))
13593 (("^(\\s*def )(test_complex\\W)" _ a b)
13594 (string-append a "xxx_off_" b)))
13595 #t))
13596 (add-before 'build 'rename-scripts
13597 ;; rename the scripts to bypthon2, bpdb2, etc.
13598 (lambda _
13599 (substitute* "setup.py"
13600 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
13601 (string-append name "2" rest "\n"))
13602 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
13603 (string-append name "2" (or sub "") rest "\n")))
13604 #t))))))))
13605
13606(define-public python-pyinotify
13607 (package
13608 (name "python-pyinotify")
13609 (version "0.9.6")
13610 (source (origin
13611 (method url-fetch)
13612 (uri (pypi-uri "pyinotify" version))
13613 (sha256
13614 (base32
13615 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
13616 (build-system python-build-system)
13617 (arguments `(#:tests? #f)) ;no tests
13618 (home-page "https://github.com/seb-m/pyinotify")
13619 (synopsis "Python library for monitoring inotify events")
13620 (description
13621 "@code{pyinotify} provides a Python interface for monitoring
13622file system events on Linux.")
13623 (license license:expat)))
13624
13625(define-public python2-pyinotify
13626 (package-with-python2 python-pyinotify))
13627
13628;; Ada parser uses this version.
13629(define-public python2-quex-0.67.3
13630 (package
13631 (name "python2-quex")
13632 (version "0.67.3")
13633 (source
13634 (origin
13635 (method url-fetch)
13636 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
13637 (version-major+minor version)
13638 "/quex-" version ".zip"))
13639 (sha256
13640 (base32
13641 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
13642 (build-system python-build-system)
13643 (native-inputs
13644 `(("unzip" ,unzip)))
13645 (arguments
13646 `(#:python ,python-2
13647 #:tests? #f
13648 #:phases
13649 (modify-phases %standard-phases
13650 (delete 'configure)
13651 (delete 'build)
13652 (replace 'install
13653 (lambda* (#:key outputs #:allow-other-keys)
13654 (let* ((out (assoc-ref outputs "out"))
13655 (share/quex (string-append out "/share/quex"))
13656 (bin (string-append out "/bin")))
13657 (copy-recursively "." share/quex)
13658 (mkdir-p bin)
13659 (symlink (string-append share/quex "/quex-exe.py")
13660 (string-append bin "/quex"))
13661 #t))))))
13662 (native-search-paths
13663 (list (search-path-specification
13664 (variable "QUEX_PATH")
13665 (files '("share/quex")))))
13666 (home-page "http://quex.sourceforge.net/")
13667 (synopsis "Lexical analyzer generator in Python")
13668 (description "@code{quex} is a lexical analyzer generator in Python.")
13669 (license license:lgpl2.1+))) ; Non-military
13670
13671(define-public python2-quex
13672 (package (inherit python2-quex-0.67.3)
13673 (name "python2-quex")
13674 (version "0.68.1")
13675 (source
13676 (origin
13677 (method url-fetch)
13678 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
13679 (sha256
13680 (base32
13681 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
13682 (file-name (string-append name "-" version ".tar.gz"))))))
13683
13684(define-public python-more-itertools
13685 (package
13686 (name "python-more-itertools")
13687 (version "4.3.0")
13688 (source
13689 (origin
13690 (method url-fetch)
13691 (uri (pypi-uri "more-itertools" version))
13692 (sha256
13693 (base32
13694 "17h3na0rdh8xq30w4b9pizgkdxmm51896bxw600x84jflg9vaxn4"))))
13695 (build-system python-build-system)
13696 (arguments
13697 `(,@(if (any (cute string-prefix? <> (or (%current-system)
13698 (%current-target-system)))
13699 '("armhf" "i686"))
13700 '(#:phases
13701 (modify-phases %standard-phases
13702 ;; This is required for 32-bit hardware.
13703 ;; TODO: Try to remove this when upgrading.
13704 (add-after 'unpack 'patch-test
13705 (lambda _
13706 (substitute* "more_itertools/tests/test_more.py"
13707 (("10 \\*\\* 10") "9 ** 9"))
13708 #t))))
13709 '())))
13710 (propagated-inputs
13711 `(("python-six" ,python-six-bootstrap)))
13712 (home-page "https://github.com/erikrose/more-itertools")
13713 (synopsis "More routines for operating on iterables, beyond itertools")
13714 (description "Python's built-in @code{itertools} module implements a
13715number of iterator building blocks inspired by constructs from APL, Haskell,
13716and SML. @code{more-itertools} includes additional building blocks for
13717working with iterables.")
13718 (license license:expat)))
13719
13720(define-public python2-more-itertools
13721 (package-with-python2 python-more-itertools))
13722
13723(define-public python-latexcodec
13724 (package
13725 (name "python-latexcodec")
13726 (version "1.0.5")
13727 (source
13728 (origin
13729 (method url-fetch)
13730 (uri (pypi-uri "latexcodec" version))
13731 (sha256
13732 (base32
13733 "0zdd1gf24i83ykadx0y30n3001j43scqr2saql3vckk5c39dj1wn"))))
13734 (build-system python-build-system)
13735 (inputs
13736 `(("python-six" ,python-six)))
13737 (home-page "https://readthedocs.org/projects/latexcodec/")
13738 (synopsis "Work with LaTeX code in Python")
13739 (description "Lexer and codec to work with LaTeX code in Python.")
13740 (license license:expat)))
13741
13742(define-public python-pybtex
13743 (package
13744 (name "python-pybtex")
13745 (version "0.21")
13746 (source
13747 (origin
13748 (method url-fetch)
13749 (uri (pypi-uri "pybtex" version))
13750 (sha256
13751 (base32
13752 "00300j8dn5pxq4ndxmfmbmycg2znawkqs49val2x6jlmfiy6r2mg"))))
13753 (build-system python-build-system)
13754 (native-inputs
13755 `(("python-nose" ,python-nose)))
13756 (inputs
13757 `(("python-latexcodec" ,python-latexcodec)
13758 ("python-pyyaml" ,python-pyyaml)
13759 ("python-six" ,python-six)))
13760 (arguments
13761 `(#:test-target "nosetests"))
13762 (home-page "https://pybtex.org/")
13763 (synopsis "BibTeX-compatible bibliography processor")
13764 (description "Pybtex is a BibTeX-compatible bibliography processor written
13765in Python. You can simply type pybtex instead of bibtex.")
13766 (license license:expat)))
13767
13768(define-public python-onetimepass
13769 (package
13770 (name "python-onetimepass")
13771 (version "1.0.1")
13772 (source
13773 (origin
13774 (method url-fetch)
13775 (uri (pypi-uri "onetimepass" version))
13776 (sha256
13777 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
13778 (build-system python-build-system)
13779 (propagated-inputs `(("python-six" ,python-six)))
13780 (home-page "https://github.com/tadeck/onetimepass/")
13781 (synopsis "One-time password library")
13782 (description "Python one-time password library for HMAC-based (HOTP) and
13783time-based (TOTP) passwords.")
13784 (license license:expat)))
13785
13786(define-public python-parso
13787 (package
13788 (name "python-parso")
13789 (version "0.3.1")
13790 (source
13791 (origin
13792 (method url-fetch)
13793 (uri (pypi-uri "parso" version))
13794 (sha256
13795 (base32
13796 "18p89iwcm8mnf380f92g9w0bhx5km8wxp392vvjcq4y1ld1llw1m"))))
13797 (native-inputs
13798 `(("python-pytest" ,python-pytest)))
13799 (build-system python-build-system)
13800 (home-page "https://github.com/davidhalter/parso")
13801 (synopsis "Python Parser")
13802 (description "Parso is a Python parser that supports error recovery and
13803round-trip parsing for different Python versions (in multiple Python versions).
13804Parso is also able to list multiple syntax errors in your Python file.")
13805 (license license:expat)))
13806
13807(define-public python2-parso
13808 (package-with-python2 python-parso))
13809
13810(define-public python-async-generator
13811 (package
13812 (name "python-async-generator")
13813 (version "1.9")
13814 (source
13815 (origin
13816 (method url-fetch)
13817 (uri (pypi-uri "async_generator" version))
13818 (sha256
13819 (base32
13820 "0wc3hidz1q85cja93k5pzybn0fprfnqyrv4qlkdqdzklc5f4dmdp"))))
13821 (build-system python-build-system)
13822 (native-inputs
13823 `(("python-pytest" ,python-pytest)))
13824 (home-page "https://github.com/python-trio/async_generator")
13825 (synopsis "Async generators and context managers for Python 3.5+")
13826 (description "@code{async_generator} back-ports Python 3.6's native async
13827generators and Python 3.7's context managers into Python 3.5.")
13828 ;; Dual licensed.
13829 (license (list license:expat license:asl2.0))))
13830
13831(define-public python-async-timeout
13832 (package
13833 (name "python-async-timeout")
13834 (version "3.0.1")
13835 (source
13836 (origin
13837 (method url-fetch)
13838 (uri (pypi-uri "async-timeout" version))
13839 (sha256
13840 (base32
13841 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
13842 (build-system python-build-system)
13843 (home-page "https://github.com/aio-libs/async_timeout/")
13844 (synopsis "Timeout context manager for asyncio programs")
13845 (description "@code{async-timeout} provides a timeout timeout context
13846manager compatible with @code{asyncio}.")
13847 (license license:asl2.0)))
13848
13849(define-public python-glob2
13850 (package
13851 (name "python-glob2")
13852 (version "0.6")
13853 (source (origin
13854 (method url-fetch)
13855 (uri (string-append
13856 "https://github.com/miracle2k/python-glob2/archive/"
13857 version
13858 ".tar.gz"))
13859 (sha256
13860 (base32
13861 "0ja168f0dz4kbz4m06dm0rd3acaypk6hjx2km541pw22y9s40mag"))
13862 (file-name (string-append name "-" version ".tar.gz"))))
13863 (build-system python-build-system)
13864 (home-page "https://github.com/miracle2k/python-glob2/")
13865 (synopsis "Extended Version of the python buildin glob module")
13866 (description "This is an extended version of the Python
13867@url{http://docs.python.org/library/glob.html, built-in glob module} which
13868adds:
13869
13870@itemize
13871@item The ability to capture the text matched by glob patterns, and return
13872those matches alongside the file names.
13873@item A recursive @code{**} globbing syntax, akin for example to the
13874@code{globstar} option of Bash.
13875@item The ability to replace the file system functions used, in order to glob
13876on virtual file systems.
13877@item Compatible with Python 2 and Python 3 (tested with 3.3).
13878@end itemize
13879
13880Glob2 currently based on the glob code from Python 3.3.1.")
13881 (license license:bsd-2)))
13882
13883(define-public python2-glob2
13884 (package-with-python2 python-glob2))
13885
13886(define-public python-gipc
13887 (package
13888 (name "python-gipc")
13889 (version "0.6.0")
13890 (source
13891 (origin
13892 (method url-fetch)
13893 (uri (pypi-uri "gipc" version ".zip"))
13894 (sha256
13895 (base32
13896 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
13897 (build-system python-build-system)
13898 (native-inputs
13899 `(("unzip" ,unzip)))
13900 (propagated-inputs
13901 `(("python-gevent" ,python-gevent)))
13902 (home-page "http://gehrcke.de/gipc")
13903 (synopsis "Child process management in the context of gevent")
13904 (description "Usage of Python's multiprocessing package in a
13905gevent-powered application may raise problems. With @code{gipc},
13906process-based child processes can safely be created anywhere within a
13907gevent-powered application.")
13908 (license license:expat)))
13909
13910(define-public python2-gipc
13911 (package-with-python2 python-gipc))
13912
13913(define-public python-fusepy
13914 (package
13915 (name "python-fusepy")
13916 (version "2.0.4")
13917 (source
13918 (origin
13919 (method url-fetch)
13920 (uri (pypi-uri "fusepy" version))
13921 (sha256
13922 (base32
13923 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
13924 (build-system python-build-system)
13925 (arguments
13926 `(#:phases
13927 (modify-phases %standard-phases
13928 (add-before 'build 'set-library-file-name
13929 (lambda* (#:key inputs #:allow-other-keys)
13930 (let ((fuse (assoc-ref inputs "fuse")))
13931 (substitute* "fuse.py"
13932 (("find_library\\('fuse'\\)")
13933 (string-append "'" fuse "/lib/libfuse.so'")))
13934 #t))))))
13935 (propagated-inputs
13936 `(("fuse" ,fuse)))
13937 (home-page "https://github.com/fusepy/fusepy")
13938 (synopsis "Simple ctypes bindings for FUSE")
13939 (description "Python module that provides a simple interface to FUSE and
13940MacFUSE. The binding is created using the standard @code{ctypes} library.")
13941 (license license:isc)))
13942
13943(define-public python2-fusepy
13944 (package-with-python2 python-fusepy))
13945
13946(define-public python2-gdrivefs
13947 (package
13948 (name "python2-gdrivefs")
13949 (version "0.14.9")
13950 (source
13951 (origin
13952 (method url-fetch)
13953 (uri (pypi-uri "gdrivefs" version))
13954 (sha256
13955 (base32
13956 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
13957 (build-system python-build-system)
13958 (arguments
13959 `(#:python ,python-2
13960 #:phases
13961 (modify-phases %standard-phases
13962 (add-before 'build 'patch-setup-py
13963 (lambda _
13964 ;; Update requirements from dependency==version
13965 ;; to dependency>=version
13966 (substitute* "gdrivefs/resources/requirements.txt"
13967 (("==") ">="))
13968 #t)))))
13969 (native-inputs
13970 `(("python2-gipc" ,python2-gipc)
13971 ("python2-gevent" ,python2-gevent)
13972 ("python2-greenlet" ,python2-greenlet)
13973 ("python2-httplib2" ,python2-httplib2)
13974 ("python2-uritemplate" ,python2-uritemplate)
13975 ("python2-oauth2client" ,python2-oauth2client)
13976 ("python2-six" ,python2-six)))
13977 (propagated-inputs
13978 `(("python2-dateutil" ,python2-dateutil)
13979 ("python2-fusepy" ,python2-fusepy)
13980 ("python2-google-api-client" ,python2-google-api-client)))
13981 (home-page "https://github.com/dsoprea/GDriveFS")
13982 (synopsis "Mount Google Drive as a local file system")
13983 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
13984under Python 2.7.")
13985 (license license:gpl2)))
13986
13987(define-public pybind11
13988 (package
13989 (name "pybind11")
13990 (version "2.2.4")
13991 (source (origin
13992 (method git-fetch)
13993 (uri (git-reference
13994 (url "https://github.com/pybind/pybind11.git")
13995 (commit (string-append "v" version))))
13996 (sha256
13997 (base32
13998 "0pa79ymcasv8br5ifbx7878id5py2jpjac3i20cqxr6gs9l6ivlv"))
13999 (file-name (git-file-name name version))))
14000 (build-system cmake-build-system)
14001 (native-inputs
14002 `(("python" ,python)
14003 ("python-pytest" ,python-pytest)))
14004 (arguments
14005 `(#:test-target "check"))
14006 (home-page "https://github.com/pybind/pybind11/")
14007 (synopsis "Seamless operability between C++11 and Python")
14008 (description "pybind11 is a lightweight header-only library that exposes
14009C++ types in Python and vice versa, mainly to create Python bindings of
14010existing C++ code. Its goals and syntax are similar to the excellent
14011Boost.Python library by David Abrahams: to minimize boilerplate code in
14012traditional extension modules by inferring type information using compile-time
14013introspection.")
14014 (license license:expat)))
14015
14016(define-public python-fasteners
14017 (package
14018 (name "python-fasteners")
14019 (version "0.14.1")
14020 (source
14021 (origin
14022 (method url-fetch)
14023 (uri (pypi-uri "fasteners" version))
14024 (sha256
14025 (base32
14026 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
14027 (build-system python-build-system)
14028 (propagated-inputs
14029 `(("python-monotonic" ,python-monotonic)
14030 ("python-six" ,python-six)
14031 ("python-testtools" ,python-testtools)))
14032 (home-page "https://github.com/harlowja/fasteners")
14033 (synopsis "Python package that provides useful locks")
14034 (description
14035 "This package provides a Python program that provides following locks:
14036
14037@itemize
14038@item Locking decorator
14039@item Reader-writer locks
14040@item Inter-process locks
14041@item Generic helpers
14042@end itemize\n")
14043 (properties `((python2-variant . ,(delay python2-fasteners))))
14044 (license license:asl2.0)))
14045
14046(define-public python2-fasteners
14047 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
14048 (package
14049 (inherit base)
14050 (propagated-inputs
14051 `(("python2-futures" ,python2-futures)
14052 ,@(package-propagated-inputs base))))))
14053
14054(define-public python-requests-file
14055 (package
14056 (name "python-requests-file")
14057 (version "1.4.3")
14058 (source
14059 (origin
14060 (method url-fetch)
14061 (uri (pypi-uri "requests-file" version))
14062 (sha256
14063 (base32
14064 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
14065 (build-system python-build-system)
14066 (propagated-inputs
14067 `(("python-requests" ,python-requests)
14068 ("python-six" ,python-six)))
14069 (home-page
14070 "https://github.com/dashea/requests-file")
14071 (synopsis "File transport adapter for Requests")
14072 (description
14073 "Requests-File is a transport adapter for use with the Requests Python
14074library to allow local filesystem access via file:// URLs.")
14075 (license license:asl2.0)))
14076
14077(define-public python2-requests-file
14078 (package-with-python2 python-requests-file))
14079
14080(define-public python-tldextract
14081 (package
14082 (name "python-tldextract")
14083 (version "2.2.0")
14084 (source
14085 (origin
14086 (method url-fetch)
14087 (uri (pypi-uri "tldextract" version))
14088 (sha256
14089 (base32
14090 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
14091 (build-system python-build-system)
14092 (native-inputs
14093 `(("python-pytest" ,python-pytest)
14094 ("python-responses" ,python-responses)))
14095 (propagated-inputs
14096 `(("python-idna" ,python-idna)
14097 ("python-requests" ,python-requests)
14098 ("python-requests-file" ,python-requests-file)))
14099 (home-page
14100 "https://github.com/john-kurkowski/tldextract")
14101 (synopsis
14102 "Separate the TLD from the registered domain and subdomains of a URL")
14103 (description
14104 "TLDExtract accurately separates the TLD from the registered domain and
14105subdomains of a URL, using the Public Suffix List. By default, this includes
14106the public ICANN TLDs and their exceptions. It can optionally support the
14107Public Suffix List's private domains as well.")
14108 (license license:bsd-3)))
14109
14110(define-public python2-tldextract
14111 (package-with-python2 python-tldextract))
14112
14113(define-public python-pynamecheap
14114 (package
14115 (name "python-pynamecheap")
14116 (version "0.0.3")
14117 (source
14118 (origin
14119 (method url-fetch)
14120 (uri (pypi-uri "PyNamecheap" version))
14121 (sha256
14122 (base32
14123 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
14124 (build-system python-build-system)
14125 (propagated-inputs
14126 `(("python-requests" ,python-requests)))
14127 (home-page
14128 "https://github.com/Bemmu/PyNamecheap")
14129 (synopsis
14130 "Namecheap API client in Python")
14131 (description
14132 "PyNamecheap is a Namecheap API client in Python.")
14133 (license license:expat)))
14134
14135(define-public python2-pynamecheap
14136 (package-with-python2 python-pynamecheap))
14137
14138(define-public python-dns-lexicon
14139 (package
14140 (name "python-dns-lexicon")
14141 (version "2.4.0")
14142 (source
14143 (origin
14144 (method url-fetch)
14145 (uri (pypi-uri "dns-lexicon" version))
14146 (sha256
14147 (base32
14148 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
14149 (build-system python-build-system)
14150 (arguments
14151 `(#:tests? #f)) ;requires internet access
14152 (propagated-inputs
14153 `(("python-future" ,python-future)
14154 ("python-pynamecheap" ,python-pynamecheap)
14155 ("python-requests" ,python-requests)
14156 ("python-tldextract" ,python-tldextract)
14157 ("python-urllib3" ,python-urllib3)))
14158 (home-page "https://github.com/AnalogJ/lexicon")
14159 (synopsis
14160 "Manipulate DNS records on various DNS providers")
14161 (description
14162 "Lexicon provides a way to manipulate DNS records on multiple DNS
14163providers in a standardized way. It has a CLI but it can also be used as a
14164Python library. It was designed to be used in automation, specifically with
14165Let's Encrypt.")
14166 (license license:expat)))
14167
14168(define-public python2-dns-lexicon
14169 (package-with-python2 python-dns-lexicon))
14170
14171(define-public python-commandlines
14172 (package
14173 (name "python-commandlines")
14174 (version "0.4.1")
14175 (source
14176 (origin
14177 (method url-fetch)
14178 (uri (pypi-uri "commandlines" version))
14179 (sha256
14180 (base32
14181 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
14182 (build-system python-build-system)
14183 (home-page "https://github.com/chrissimpkins/commandlines")
14184 (synopsis "Command line argument to object parsing library")
14185 (description
14186 "@code{Commandlines} is a Python library for command line application
14187development that supports command line argument parsing, command string
14188validation testing and application logic.")
14189 (license license:expat)))
14190
14191;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
14192;; python-numba. They have a very unflexible relationship.
14193(define-public python-numba
14194 (package
14195 (name "python-numba")
14196 (version "0.39.0")
14197 (source
14198 (origin
14199 (method url-fetch)
14200 (uri (pypi-uri "numba" version))
14201 (sha256
14202 (base32
14203 "1bibvkwga1v8293i9ivl469d8bzgabn3vgr2ig7c1i68v8frsx07"))))
14204 (build-system python-build-system)
14205 (arguments
14206 `(#:modules ((guix build utils)
14207 (guix build python-build-system)
14208 (ice-9 ftw)
14209 (srfi srfi-1)
14210 (srfi srfi-26))
14211 #:phases
14212 (modify-phases %standard-phases
14213 (add-after 'unpack 'disable-proprietary-features
14214 (lambda _
14215 (setenv "NUMBA_DISABLE_HSA" "1")
14216 (setenv "NUMBA_DISABLE_CUDA" "1")
14217 #t))
14218 (add-after 'unpack 'remove-failing-tests
14219 (lambda _
14220 ;; FIXME: these tests fail for unknown reasons:
14221 ;; test_non_writable_pycache, test_non_creatable_pycache, and
14222 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
14223 (substitute* "numba/tests/test_dispatcher.py"
14224 (("def test(_non_writable_pycache)" _ m)
14225 (string-append "def guix_skip" m))
14226 (("def test(_non_creatable_pycache)" _ m)
14227 (string-append "def guix_skip" m))
14228 (("def test(_frozen)" _ m)
14229 (string-append "def guix_skip" m)))
14230
14231 ;; These tests fail because we don't run the tests from the build
14232 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
14233 ;; They ar in numba.tests.test_pycc.TestDistutilsSupport.
14234 (substitute* "numba/tests/test_pycc.py"
14235 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
14236 (string-append "def guix_skip" m)))
14237 #t))
14238 (replace 'check
14239 (lambda _
14240 (let ((cwd (getcwd)))
14241 (setenv "PYTHONPATH"
14242 (string-append cwd "/build/"
14243 (find (cut string-prefix? "lib" <>)
14244 (scandir (string-append cwd "/build")))
14245 ":"
14246 (getenv "PYTHONPATH")))
14247 ;; Something is wrong with the PYTHONPATH when running the
14248 ;; tests from the build directory, as it complains about not being
14249 ;; able to import certain modules.
14250 (with-directory-excursion "/tmp"
14251 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
14252 #t)))))
14253 (propagated-inputs
14254 `(("python-llvmlite" ,python-llvmlite)
14255 ("python-numpy" ,python-numpy)
14256 ("python-singledispatch" ,python-singledispatch)))
14257 ;; Needed for tests.
14258 (inputs
14259 `(("python-jinja2" ,python-jinja2)
14260 ("python-pygments" ,python-pygments)))
14261 (home-page "https://numba.pydata.org")
14262 (synopsis "Compile Python code using LLVM")
14263 (description "Numba gives you the power to speed up your applications with
14264high performance functions written directly in Python. With a few
14265annotations, array-oriented and math-heavy Python code can be just-in-time
14266compiled to native machine instructions, similar in performance to C, C++ and
14267Fortran, without having to switch languages or Python interpreters.
14268
14269Numba works by generating optimized machine code using the LLVM compiler
14270infrastructure at import time, runtime, or statically (using the included pycc
14271tool).")
14272 (license license:bsd-3)))
14273
14274(define-public python-anndata
14275 (package
14276 (name "python-anndata")
14277 (version "0.6.9")
14278 (source
14279 (origin
14280 (method url-fetch)
14281 (uri (pypi-uri "anndata" version))
14282 (sha256
14283 (base32
14284 "1fh461xyyc7pcrjfgd013bdc2alf53r46ss3gfw3431mbb1gappi"))))
14285 (build-system python-build-system)
14286 (propagated-inputs
14287 `(("python-h5py" ,python-h5py)
14288 ("python-natsort" ,python-natsort)
14289 ("python-pandas" ,python-pandas)
14290 ("python-scipy" ,python-scipy)))
14291 (home-page "https://github.com/theislab/anndata")
14292 (synopsis "Annotated data for data analysis pipelines")
14293 (description "Anndata is a package for simple (functional) high-level APIs
14294for data analysis pipelines. In this context, it provides an efficient,
14295scalable way of keeping track of data together with learned annotations and
14296reduces the code overhead typically encountered when using a mostly
14297object-oriented library such as @code{scikit-learn}.")
14298 (license license:bsd-3)))
14299
14300(define-public python-dill
14301 (package
14302 (name "python-dill")
14303 (version "0.2.8.2")
14304 (source
14305 (origin
14306 (method url-fetch)
14307 (uri (pypi-uri "dill" version))
14308 (sha256
14309 (base32
14310 "1cymzn9fxwdy33h21zkk4gqgzvd25110hh3zdqnvnwa3p52c4kb2"))))
14311 (build-system python-build-system)
14312 ;; FIXME: The check phase fails with "don't know how to make test".
14313 (arguments '(#:tests? #f))
14314 (home-page "https://pypi.org/project/dill")
14315 (synopsis "Serialize all of Python")
14316 (description "Dill extends Python's @code{pickle} module for serializing
14317and de-serializing Python objects to the majority of the built-in Python
14318types. Dill provides the user the same interface as the @code{pickle} module,
14319and also includes some additional features. In addition to pickling Python
14320objects, @code{dill} provides the ability to save the state of an interpreter
14321session in a single command. Hence, it would be feasable to save a
14322interpreter session, close the interpreter, ship the pickled file to another
14323computer, open a new interpreter, unpickle the session and thus continue from
14324the saved state of the original interpreter session.")
14325 (license license:bsd-3)))
14326
14327(define-public python-multiprocess
14328 (package
14329 (name "python-multiprocess")
14330 (version "0.70.6.1")
14331 (source
14332 (origin
14333 (method url-fetch)
14334 (uri (pypi-uri "multiprocess" version))
14335 (sha256
14336 (base32
14337 "1ip5caz67b3q0553mr8gm8xwsb8x500jn8ml0gihgyfy52m2ypcq"))))
14338 (build-system python-build-system)
14339 (propagated-inputs
14340 `(("python-dill" ,python-dill)))
14341 (home-page "https://pypi.org/project/multiprocess")
14342 (synopsis "Multiprocessing and multithreading in Python")
14343 (description
14344 "This package is a fork of the multiprocessing Python package, a package
14345which supports the spawning of processes using the API of the standard
14346library's @code{threading} module.")
14347 (license license:bsd-3)))
14348
14349(define-public python-toolz
14350 (package
14351 (name "python-toolz")
14352 (version "0.9.0")
14353 (source
14354 (origin
14355 (method url-fetch)
14356 (uri (pypi-uri "toolz" version))
14357 (sha256
14358 (base32
14359 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
14360 (build-system python-build-system)
14361 ;; FIXME: tests cannot be computed: "Can't perform this operation for
14362 ;; unregistered loader type"
14363 (arguments '(#:tests? #f))
14364 (home-page "https://github.com/pytoolz/toolz/")
14365 (synopsis "List processing tools and functional utilities")
14366 (description
14367 "This package provides a set of utility functions for iterators,
14368functions, and dictionaries.")
14369 (license license:bsd-3)))
14370
14371(define-public python2-toolz
14372 (package-with-python2 python-toolz))
14373
14374(define-public python-cytoolz
14375 (package
14376 (name "python-cytoolz")
14377 (version "0.9.0.1")
14378 (source
14379 (origin
14380 (method url-fetch)
14381 (uri (pypi-uri "cytoolz" version))
14382 (sha256
14383 (base32
14384 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
14385 (build-system python-build-system)
14386 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
14387 ;; 'exceptions'"
14388 (arguments '(#:tests? #f))
14389 (propagated-inputs
14390 `(("python-toolz" ,python-toolz)))
14391 (native-inputs
14392 `(("python-cython" ,python-cython)))
14393 (home-page "https://github.com/pytoolz/cytoolz")
14394 (synopsis "High performance functional utilities")
14395 (description
14396 "The cytoolz package implements the same API as provided by toolz. The
14397main differences are that @code{cytoolz} is faster and cytoolz offers a C API
14398that is accessible to other projects developed in Cython.")
14399 (license license:bsd-3)))
14400
14401(define-public python-sortedcontainers
14402 (package
14403 (name "python-sortedcontainers")
14404 (version "2.0.4")
14405 (source
14406 (origin
14407 (method url-fetch)
14408 (uri (pypi-uri "sortedcontainers" version))
14409 (sha256
14410 (base32
14411 "10hrk2k0hbf9x78vd3f0lj277m1yzfhzzxr0hja718liwb398wk0"))))
14412 (build-system python-build-system)
14413 (native-inputs
14414 `(("python-tox" ,python-tox)))
14415 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
14416 (synopsis "Sorted List, Sorted Dict, Sorted Set")
14417 (description
14418 "This package provides a sorted collections library, written in
14419pure-Python.")
14420 (license license:asl2.0)))
14421
14422(define-public python-cloudpickle
14423 (package
14424 (name "python-cloudpickle")
14425 (version "0.6.1")
14426 (source
14427 (origin
14428 (method url-fetch)
14429 (uri (pypi-uri "cloudpickle" version))
14430 (sha256
14431 (base32
14432 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
14433 (build-system python-build-system)
14434 ;; FIXME: there are 5 errors in 122 tests:
14435 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
14436 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
14437 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
14438 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
14439 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
14440 ;; TypeError: cannot serialize '_io.BufferedRandom' object
14441 (arguments '(#:tests? #f))
14442 (native-inputs
14443 `(("python-pytest" ,python-pytest)
14444 ("python-mock" ,python-mock)
14445 ("python-tornado" ,python-tornado)))
14446 (home-page "https://github.com/cloudpipe/cloudpickle")
14447 (synopsis "Extended pickling support for Python objects")
14448 (description
14449 "Cloudpickle makes it possible to serialize Python constructs not
14450supported by the default pickle module from the Python standard library. It
14451is especially useful for cluster computing where Python expressions are
14452shipped over the network to execute on remote hosts, possibly close to the
14453data.")
14454 (license license:bsd-3)))
14455
14456(define-public python2-cloudpickle
14457 (package-with-python2 python-cloudpickle))
14458
14459(define-public python-locket
14460 (package
14461 (name "python-locket")
14462 (version "0.2.0")
14463 (source
14464 (origin
14465 (method url-fetch)
14466 (uri (pypi-uri "locket" version))
14467 (sha256
14468 (base32
14469 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
14470 (build-system python-build-system)
14471 (home-page "https://github.com/mwilliamson/locket.py")
14472 (synopsis "File-based locks for Python")
14473 (description
14474 "Locket implements a lock that can be used by multiple processes provided
14475they use the same path.")
14476 (license license:bsd-2)))
14477
14478(define-public python2-locket
14479 (package-with-python2 python-locket))
14480
14481(define-public python-blosc
14482 (package
14483 (name "python-blosc")
14484 (version "1.5.1")
14485 (source
14486 (origin
14487 (method url-fetch)
14488 (uri (pypi-uri "blosc" version))
14489 (sha256
14490 (base32
14491 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
14492 (build-system python-build-system)
14493 ;; FIXME: all tests pass, but then this error is printed:
14494 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
14495 (arguments '(#:tests? #f))
14496 (propagated-inputs
14497 `(("python-numpy" ,python-numpy)))
14498 (home-page "https://github.com/blosc/python-blosc")
14499 (synopsis "Python wrapper for the Blosc data compressor library")
14500 (description "Blosc is a high performance compressor optimized for binary
14501data. It has been designed to transmit data to the processor cache faster
14502than the traditional, non-compressed, direct memory fetch approach via a
14503@code{memcpy()} system call.
14504
14505Blosc works well for compressing numerical arrays that contains data with
14506relatively low entropy, like sparse data, time series, grids with
14507regular-spaced values, etc.
14508
14509This Python package wraps the Blosc library.")
14510 (license license:bsd-3)))
14511
14512(define-public python2-blosc
14513 (package-with-python2 python-blosc))
14514
14515(define-public python-partd
14516 (package
14517 (name "python-partd")
14518 (version "0.3.9")
14519 (source
14520 (origin
14521 (method url-fetch)
14522 (uri (pypi-uri "partd" version))
14523 (sha256
14524 (base32
14525 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
14526 (build-system python-build-system)
14527 (propagated-inputs
14528 `(("python-blosc" ,python-blosc)
14529 ("python-locket" ,python-locket)
14530 ("python-numpy" ,python-numpy)
14531 ("python-pandas" ,python-pandas)
14532 ("python-pyzmq" ,python-pyzmq)
14533 ("python-toolz" ,python-toolz)))
14534 (home-page "https://github.com/dask/partd/")
14535 (synopsis "Appendable key-value storage")
14536 (description "Partd stores key-value pairs. Values are raw bytes. We
14537append on old values. Partd excels at shuffling operations.")
14538 (license license:bsd-3)))
14539
14540(define-public python2-partd
14541 (package-with-python2 python-partd))
14542
14543(define-public python-dask
14544 (package
14545 (name "python-dask")
14546 (version "1.0.0")
14547 (source
14548 (origin
14549 (method url-fetch)
14550 (uri (pypi-uri "dask" version))
14551 (sha256
14552 (base32
14553 "1xwz8h020ipwav2p5gcq9pskya1cvzd6hjyvd06dvr3w5lxlmym1"))))
14554 (build-system python-build-system)
14555 ;; A single test out of 5000+ fails. This test is marked as xfail when
14556 ;; pytest-xdist is used.
14557 (arguments
14558 `(#:phases
14559 (modify-phases %standard-phases
14560 (add-after 'unpack 'disable-broken-test
14561 (lambda _
14562 (substitute* "dask/tests/test_threaded.py"
14563 (("def test_interrupt\\(\\)" m)
14564 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
14565 m)))
14566 (when (which "python2")
14567 ;; This test fails with recent Pandas:
14568 ;; <https://github.com/dask/dask/issues/3794>.
14569 (substitute* "dask/dataframe/tests/test_dataframe.py"
14570 (("def test_info\\(\\)" m)
14571 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
14572 m))))
14573 #t))
14574 (replace 'check
14575 (lambda _ (invoke "pytest" "-vv"))))))
14576 (propagated-inputs
14577 `(("python-cloudpickle" ,python-cloudpickle)
14578 ("python-numpy" ,python-numpy)
14579 ("python-pandas" ,python-pandas)
14580 ("python-partd" ,python-partd)
14581 ("python-toolz" ,python-toolz)
14582 ("python-pyyaml" ,python-pyyaml)))
14583 (native-inputs
14584 `(("python-pytest" ,python-pytest)
14585 ("python-pytest-runner" ,python-pytest-runner)))
14586 (home-page "https://github.com/dask/dask/")
14587 (synopsis "Parallel computing with task scheduling")
14588 (description
14589 "Dask is a flexible parallel computing library for analytics. It
14590consists of two components: dynamic task scheduling optimized for computation,
14591and large data collections like parallel arrays, dataframes, and lists that
14592extend common interfaces like NumPy, Pandas, or Python iterators to
14593larger-than-memory or distributed environments. These parallel collections
14594run on top of the dynamic task schedulers. ")
14595 (license license:bsd-3)))
14596
14597(define-public python2-dask
14598 (package-with-python2 python-dask))
14599
14600(define-public python-ilinkedlist
14601 (package
14602 (name "python-ilinkedlist")
14603 (version "0.4.0")
14604 (source
14605 (origin
14606 (method url-fetch)
14607 (uri (pypi-uri "ilinkedlist" version))
14608 (sha256
14609 (base32
14610 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
14611 (build-system python-build-system)
14612 (native-inputs `(("python-pytest" ,python-pytest)))
14613 (inputs `(("python" ,python)))
14614 (home-page "https://github.com/luther9/ilinkedlist-py")
14615 (synopsis "Immutable linked list library")
14616 (description
14617 "This is a implementation of immutable linked lists for Python. It
14618contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
14619Since a linked list is treated as immutable, it is hashable, and its length
14620can be retrieved in constant time. Some of the terminology is inspired by
14621LISP. It is possible to create an improper list by creating a @code{Pair}
14622with a non-list @code{cdr}.")
14623 (license license:gpl3+)))
14624
14625(define-public python-readlike
14626 (package
14627 (name "python-readlike")
14628 (version "0.1.3")
14629 (source
14630 (origin
14631 (method url-fetch)
14632 (uri (pypi-uri "readlike" version))
14633 (sha256
14634 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
14635 (build-system python-build-system)
14636 (home-page "https://github.com/jangler/readlike")
14637 (synopsis "GNU Readline-like line editing module")
14638 (description
14639 "This Python module provides line editing functions similar to the default
14640Emacs-style ones of GNU Readline. Unlike the Python standard library's
14641@code{readline} package, this one allows access to those capabilties in settings
14642outside of a standard command-line interface. It is especially well-suited to
14643interfacing with Urwid, due to a shared syntax for describing key inputs.
14644
14645Currently, all stateless Readline commands are implemented. Yanking and history
14646are not supported.")
14647 (license license:expat)))
14648
14649(define-public python2-readlike
14650 (package-with-python2 python-readlike))
14651
14652(define-public python-reparser
14653 (package
14654 (name "python-reparser")
14655 (version "1.4.3")
14656 (source
14657 (origin
14658 (method url-fetch)
14659 (uri (pypi-uri "ReParser" version))
14660 (sha256
14661 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
14662 (build-system python-build-system)
14663 (home-page "https://github.com/xmikos/reparser")
14664 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
14665 (description
14666 "This Python library provides a simple lexer/parser for inline markup based
14667on regular expressions.")
14668 (license license:expat)))
14669
14670(define-public python2-reparser
14671 (let ((reparser (package-with-python2
14672 (strip-python2-variant python-reparser))))
14673 (package (inherit reparser)
14674 (propagated-inputs
14675 `(("python2-enum34" ,python2-enum34)
14676 ,@(package-propagated-inputs reparser))))))
14677
14678(define-public python-precis-i18n
14679 (package
14680 (name "python-precis-i18n")
14681 (version "1.0.0")
14682 (source
14683 (origin
14684 (method url-fetch)
14685 (uri (pypi-uri "precis_i18n" version))
14686 (sha256
14687 (base32
14688 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
14689 (build-system python-build-system)
14690 (home-page "https://github.com/byllyfish/precis_i18n")
14691 (synopsis "Implementation of the PRECIS framework")
14692 (description
14693 "This module implements the PRECIS Framework as described in RFC 8264,
14694RFC 8265 and RFC 8266.")
14695 (license license:expat)))
14696
d0446c4b
RW
14697(define-public python-absl-py
14698 (package
14699 (name "python-absl-py")
14700 (version "0.6.1")
14701 (source
14702 (origin
14703 (method url-fetch)
14704 (uri (pypi-uri "absl-py" version))
14705 (sha256
14706 (base32
14707 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
14708 (build-system python-build-system)
14709 (propagated-inputs
14710 `(("python-six" ,python-six)))
14711 (home-page "https://github.com/abseil/abseil-py")
14712 (synopsis "Abseil Python common libraries")
14713 (description
14714 "This package provides the Abseil Python Common Libraries, a collection
14715of Python libraries for building Python applications.")
14716 (license license:asl2.0)))
14717
81bed4e9
RW
14718(define-public python-astor
14719 (package
14720 (name "python-astor")
14721 (version "0.7.1")
14722 (source
14723 (origin
14724 (method url-fetch)
14725 (uri (pypi-uri "astor" version))
14726 (sha256
14727 (base32
14728 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
14729 (build-system python-build-system)
14730 ;; FIXME: There are two errors and two test failures.
14731 (arguments `(#:tests? #f))
14732 (home-page "https://github.com/berkerpeksag/astor")
14733 (synopsis "Read/rewrite/write Python ASTs")
14734 (description "Astor is designed to allow easy manipulation of Python
14735source via the AST.")
14736 (license license:bsd-3)))
14737
22e623ae
RW
14738(define-public python-grpcio
14739 (package
14740 (name "python-grpcio")
14741 (version "1.17.1")
14742 (source
14743 (origin
14744 (method url-fetch)
14745 (uri (pypi-uri "grpcio" version))
14746 (sha256
14747 (base32
14748 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
14749 (build-system python-build-system)
14750 (propagated-inputs
14751 `(("python-six" ,python-six)))
14752 (home-page "https://grpc.io")
14753 (synopsis "HTTP/2-based RPC framework")
14754 (description "This package provides a Python library for communicating
14755with the HTTP/2-based RPC framework gRPC.")
14756 (license license:asl2.0)))
14757
79869f80
RW
14758(define-public python-astunparse
14759 (package
14760 (name "python-astunparse")
14761 (version "1.6.1")
14762 (source
14763 (origin
14764 (method url-fetch)
14765 (uri (pypi-uri "astunparse" version))
14766 (sha256
14767 (base32
14768 "1jhidwyrqn17avqh9xnnm3wd7q7aahaq009cba67g86y6gxicyyj"))))
14769 (build-system python-build-system)
14770 (arguments '(#:tests? #f)) ; there are none
14771 (propagated-inputs
14772 `(("python-six" ,python-six)
14773 ("python-wheel" ,python-wheel)))
14774 (home-page "https://github.com/simonpercivall/astunparse")
14775 (synopsis "AST unparser for Python")
14776 (description "This package provides an AST unparser for Python. It is a
14777factored out version of @code{unparse} found in the Python source
14778distribution.")
14779 (license license:bsd-3)))
14780
2884aac0
RW
14781(define-public python-gast
14782 (package
14783 (name "python-gast")
14784 (version "0.2.0")
14785 (source
14786 (origin
14787 (method url-fetch)
14788 (uri (pypi-uri "gast" version))
14789 (sha256
14790 (base32
14791 "0c296xm1vz9x4w4inmdl0k8mnc0i9arw94si2i7pglpc461r0s3h"))))
14792 (build-system python-build-system)
14793 (propagated-inputs
14794 `(("python-astunparse" ,python-astunparse)))
14795 (home-page "https://pypi.org/project/gast/")
14796 (synopsis "Generic Python AST that abstracts the underlying Python version")
14797 (description
14798 "GAST provides a compatibility layer between the AST of various Python
14799versions, as produced by @code{ast.parse} from the standard @code{ast}
14800module.")
14801 (license license:bsd-3)))
14802
44d10b1f
RW
14803(define-public python-wikidata
14804 (package
14805 (name "python-wikidata")
14806 (version "0.6.1")
14807 (source
14808 (origin
14809 (method url-fetch)
14810 (uri (pypi-uri "Wikidata" version))
14811 (sha256
14812 (base32
14813 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
14814 (build-system python-build-system)
14815 (propagated-inputs
14816 `(("python-babel" ,python-babel)))
14817 (home-page "https://github.com/dahlia/wikidata")
14818 (synopsis "Wikidata client library")
14819 (description
14820 "This package provides a Python interface to
14821@url{https://www.wikidata.org/, Wikidata}.")
14822 (properties '((upstream-name . "Wikidata")))
14823 (license license:gpl3+)))
14824
14825(define-public python-doctest-ignore-unicode
14826 (package
14827 (name "python-doctest-ignore-unicode")
14828 (version "0.1.2")
14829 (source
14830 (origin
14831 (method url-fetch)
14832 (uri (pypi-uri "doctest-ignore-unicode" version))
14833 (sha256
14834 (base32
14835 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
14836 (build-system python-build-system)
14837 (native-inputs
14838 `(("python-nose" ,python-nose)))
14839 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
14840 (synopsis "Ignore Unicode literal prefixes in doctests")
14841 (description
14842 "This package adds support for a flag to ignore Unicode literal prefixes
14843in doctests.")
14844 (license license:asl2.0)))
14845
14846(define-public python-attr
14847 (package
14848 (name "python-attr")
14849 (version "0.3.1")
14850 (source
14851 (origin
14852 (method url-fetch)
14853 (uri (pypi-uri "attr" version))
14854 (sha256
14855 (base32
14856 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
14857 (build-system python-build-system)
14858 (home-page "https://github.com/denis-ryzhkov/attr")
14859 (synopsis "Decorator for attributes of target function or class")
14860 (description "Simple decorator to set attributes of target function or
14861class in a @acronym{DRY, Don't Repeat Yourself} way.")
14862 (license license:expat)))