gnu: python-wrapt: Update to 1.11.1.
[jackhill/guix/guix.git] / gnu / packages / python-xyz.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
3 ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
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
168 information on running processes and system utilization (CPU, memory, disks,
169 network) in Python. It is useful mainly for system monitoring, profiling and
170 limiting process resources and management of running processes. It implements
171 many functionalities offered by command line tools such as: ps, top, lsof,
172 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
173 pidof, 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
225 planar 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
252 and 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
275 by @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
309 access to various locale display names, localized number and date formatting,
310 etc. ")
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
338 earlier versions of Python. The function checks the hostname in the
339 certificate returned by the server to which a connection has been established,
340 and 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,
380 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
381 NetCDF 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
428 HDF5 library from Python. The low-level interface is intended to be a
429 complete wrapping of the HDF5 API, while the high-level component supports
430 access to HDF5 files, datasets and groups using established Python and NumPy
431 concepts.")
432 (license license:bsd-3)))
433
434 (define-public python2-h5py
435 (package-with-python2 python-h5py))
436
437 (define-public python-netcdf4
438 (package
439 (name "python-netcdf4")
440 (version "1.2.9")
441 (source
442 (origin
443 (method url-fetch)
444 (uri (pypi-uri "netCDF4" version))
445 (sha256
446 (base32
447 "1h6jq338amlbk0ilzvjyl7cck80i0bah9a5spn9in71vy2qxm7i5"))))
448 (build-system python-build-system)
449 (native-inputs
450 `(("python-cython" ,python-cython)))
451 (propagated-inputs
452 `(("python-numpy" ,python-numpy)))
453 (inputs
454 `(("netcdf" ,netcdf)
455 ("hdf4" ,hdf4)
456 ("hdf5" ,hdf5)))
457 (arguments
458 '(#:phases
459 (modify-phases %standard-phases
460 (replace 'check
461 (lambda _
462 (setenv "NO_NET" "1") ; disable opendap tests
463 (with-directory-excursion "test"
464 (setenv "PYTHONPATH" ; find and add the library we just built
465 (string-append
466 (car (find-files "../build" "lib.*"
467 #:directories? #:t
468 #:fail-on-error? #:t))
469 ":" (getenv "PYTHONPATH")))
470 (zero? (system* "python" "run_all.py"))))))))
471 (home-page
472 "https://github.com/Unidata/netcdf4-python")
473 (synopsis "Python/numpy interface to the netCDF library")
474 (description "Netcdf4-python is a Python interface to the netCDF C
475 library. netCDF version 4 has many features not found in earlier
476 versions of the library and is implemented on top of HDF5. This module
477 can read and write files in both the new netCDF 4 and the old netCDF 3
478 format, and can create files that are readable by HDF5 clients. The
479 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
480 to users of that module.")
481 ;; The software is mainly ISC, but includes some files covered
482 ;; by the Expat license.
483 (license (list license:isc license:expat))))
484
485 (define-public python2-netcdf4
486 (package-with-python2 python-netcdf4))
487
488 (define-public python-lockfile
489 (package
490 (name "python-lockfile")
491 (version "0.12.2")
492 (source
493 (origin
494 (method url-fetch)
495 (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/"
496 "lockfile-" version ".tar.gz"))
497 (sha256
498 (base32
499 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
500 (build-system python-build-system)
501 (arguments '(#:test-target "check"))
502 (native-inputs
503 `(("python-pbr" ,python-pbr)))
504 (home-page "https://launchpad.net/pylockfile")
505 (synopsis "Platform-independent file locking module")
506 (description
507 "The lockfile package exports a LockFile class which provides a simple
508 API for locking files.")
509 (license license:expat)))
510
511 (define-public python2-lockfile
512 (package-with-python2 python-lockfile))
513
514 (define-public python-semantic-version
515 (package
516 (name "python-semantic-version")
517 (version "2.6.0")
518 (source
519 (origin
520 (method url-fetch)
521 (uri (pypi-uri "semantic_version" version))
522 (sha256
523 (base32
524 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
525 (build-system python-build-system)
526 (arguments
527 `(#:tests? #f)) ; PyPI tarball lacks tests
528 (home-page "https://github.com/rbarrois/python-semanticversion")
529 (synopsis "Semantic versioning module for Python")
530 (description
531 "The @code{semantic_version} class is a small library for handling
532 @uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
533
534 It can compare versions, generate a new version that represents a bump in one of
535 the version levels, and check whether any given string is a proper semantic
536 version identifier.")
537 (license license:bsd-3)))
538
539 (define-public python2-semantic-version
540 (package-with-python2 python-semantic-version))
541
542 (define-public python-serpent
543 (package
544 (name "python-serpent")
545 (version "1.27")
546 (source
547 (origin
548 (method url-fetch)
549 (uri (pypi-uri "serpent" version))
550 (sha256
551 (base32
552 "04p9dsrm5pv8vhk3flvih55kgvlzpi38hlaykdiakddmgwqw93bg"))))
553 (build-system python-build-system)
554 (home-page "https://github.com/irmen/Serpent")
555 (synopsis "Serializer for literal Python expressions")
556 (description
557 "Serpent provides ast.literal_eval() compatible object tree
558 serialization. It serializes an object tree into bytes (utf-8 encoded string)
559 that can be decoded and then passed as-is to ast.literal_eval() to rebuild it
560 as the original object tree. As such it is safe to send serpent data to other
561 machines over the network for instance (because only safe literals are
562 encoded).")
563 (license license:expat)))
564
565 (define-public python-setuptools
566 (package
567 (name "python-setuptools")
568 (version "40.0.0")
569 (source
570 (origin
571 (method url-fetch)
572 (uri (pypi-uri "setuptools" version ".zip"))
573 (sha256
574 (base32
575 "0pq116lr14gnc62v76nk0npkm6krb2mpp7p9ab369zgv4n7dnah1"))
576 (modules '((guix build utils)))
577 (snippet
578 '(begin
579 ;; Remove included binaries which are used to build self-extracting
580 ;; installers for Windows.
581 ;; TODO: Find some way to build them ourself so we can include them.
582 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
583 #t))))
584 (build-system python-build-system)
585 ;; FIXME: Tests require pytest, which itself relies on setuptools.
586 ;; One could bootstrap with an internal untested setuptools.
587 (arguments
588 `(#:tests? #f))
589 (home-page "https://pypi.python.org/pypi/setuptools")
590 (synopsis
591 "Library designed to facilitate packaging Python projects")
592 (description
593 "Setuptools is a fully-featured, stable library designed to facilitate
594 packaging Python projects, where packaging includes:
595 Python package and module definitions,
596 distribution package metadata,
597 test hooks,
598 project installation,
599 platform-specific details,
600 Python 3 support.")
601 ;; TODO: setuptools now bundles the following libraries:
602 ;; packaging, pyparsing, six and appdirs. How to unbundle?
603 (license (list license:psfl ; setuptools itself
604 license:expat ; six, appdirs, pyparsing
605 license:asl2.0 ; packaging is dual ASL2/BSD-2
606 license:bsd-2))))
607
608 (define-public python2-setuptools
609 (package-with-python2 python-setuptools))
610
611 (define-public python-uniseg
612 (package
613 (name "python-uniseg")
614 (version "0.7.1")
615 (source
616 (origin
617 (method url-fetch)
618 (uri (pypi-uri "uniseg" version ".zip"))
619 (sha256
620 (base32
621 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
622 (build-system python-build-system)
623 (arguments
624 '(#:tests? #f)) ; The test suite requires network access.
625 (native-inputs
626 `(("unzip" ,unzip)))
627 (home-page
628 "https://bitbucket.org/emptypage/uniseg-python")
629 (synopsis
630 "Python library to determine Unicode text segmentations")
631 (description
632 "Uniseg is a Python package used to determine Unicode text segmentations.
633 Supported segmentations include:
634 @enumerate
635 @item @dfn{Code point} (any value in the Unicode codespace)
636 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
637 multiple Unicode code points, e.g. \"G\" + acute-accent)
638 @item Word break
639 @item Sentence break
640 @item Line break
641 @end enumerate")
642 (license license:expat)))
643
644 (define-public python2-uniseg
645 (package-with-python2 python-uniseg))
646
647 (define-public python-humanfriendly
648 (package
649 (name "python-humanfriendly")
650 (version "4.4.1")
651 (source
652 (origin
653 (method url-fetch)
654 (uri (pypi-uri "humanfriendly" version))
655 (sha256
656 (base32
657 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
658 (build-system python-build-system)
659 (arguments
660 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
661 #:tests? #f))
662 (propagated-inputs
663 `(("python-monotonic" ,python-monotonic)))
664 (home-page "https://humanfriendly.readthedocs.io")
665 (synopsis "Human-friendly input and output in Python")
666 (description
667 "The functions and classes in @code{humanfriendly} can be used to make
668 text interfaces more user-friendly. It includes tools to parse and format
669 numbers, file sizes, and timespans, timers for long-running operations, menus
670 to allow the user to choose from a list of options, and terminal interaction
671 helpers.")
672 (license license:expat)))
673
674 (define-public python2-humanfriendly
675 (package-with-python2 python-humanfriendly))
676
677 (define-public python-capturer
678 (package
679 (name "python-capturer")
680 (version "2.4")
681 (source
682 (origin
683 (method url-fetch)
684 (uri (pypi-uri "capturer" version))
685 (sha256
686 (base32
687 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
688 (build-system python-build-system)
689 (arguments
690 `(#:tests? #f))
691 (propagated-inputs
692 `(("python-humanfriendly" ,python-humanfriendly)))
693 (home-page "https://capturer.readthedocs.io")
694 (synopsis "Capture stdout and stderr streams of the current process")
695 (description
696 "The capturer package makes it easy to capture the stdout and stderr
697 streams of the current process and subprocesses. Output can be relayed
698 to the terminal in real time but is also available to the Python program
699 for additional processing.")
700 (license license:expat)))
701
702 (define-public python2-capturer
703 (package-with-python2 python-capturer))
704
705 (define-public python-case
706 (package
707 (name "python-case")
708 (version "1.5.3")
709 (source
710 (origin
711 (method url-fetch)
712 (uri (pypi-uri "case" version))
713 (sha256
714 (base32
715 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
716 (build-system python-build-system)
717 (propagated-inputs
718 `(("python-mock" ,python-mock)
719 ("python-nose" ,python-nose)
720 ("python-six" ,python-six)
721 ("python-unittest2" ,python-unittest2)))
722 (native-inputs
723 `(("python-coverage" ,python-coverage)))
724 (home-page "https://github.com/celery/case")
725 (synopsis "Unittest utilities and convenience methods")
726 (description
727 "The @code{case} package provides utilities on top of unittest, including
728 some helpful Python 2 compatibility convenience methods.")
729 (license license:bsd-3)))
730
731 (define-public python-verboselogs
732 (package
733 (name "python-verboselogs")
734 (version "1.7")
735 (source
736 (origin
737 (method url-fetch)
738 (uri (pypi-uri "verboselogs" version))
739 (sha256
740 (base32
741 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
742 (build-system python-build-system)
743 (native-inputs
744 `(("python-mock" ,python-mock)
745 ("python-astroid" ,python-astroid)
746 ("python-pylint" ,python-pylint)))
747 (home-page "https://verboselogs.readthedocs.io")
748 (synopsis "Verbose logging level for Python's logging module")
749 (description
750 "The @code{verboselogs} package extends Python's @code{logging} module to
751 add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
752 (license license:expat)))
753
754 (define-public python2-verboselogs
755 (package-with-python2 python-verboselogs))
756
757 (define-public python-coloredlogs
758 (package
759 (name "python-coloredlogs")
760 (version "7.3")
761 (source
762 (origin
763 (method url-fetch)
764 (uri (pypi-uri "coloredlogs" version))
765 (sha256
766 (base32
767 "1blcann6dyg5dhps9pg12rn0q0rjrlajpmmil0gy0j4cbvnl2il9"))))
768 (build-system python-build-system)
769 (arguments
770 `(;Tests require some updated modules
771 #:tests? #f))
772 (propagated-inputs
773 `(("python-capturer" ,python-capturer)))
774 (home-page "https://coloredlogs.readthedocs.io")
775 (synopsis "Colored stream handler for Python's logging module")
776 (description
777 "The @code{coloredlogs} package enables colored terminal output for
778 Python's logging module. The @code{ColoredFormatter} class inherits from
779 @code{logging.Formatter} and uses ANSI escape sequences to render your logging
780 messages in color.")
781 (license license:expat)))
782
783 (define-public python2-coloredlogs
784 (package-with-python2 python-coloredlogs))
785
786 (define-public python-eventlet
787 (package
788 (name "python-eventlet")
789 (version "0.20.1")
790 (source
791 (origin
792 (method url-fetch)
793 (uri (pypi-uri "eventlet" version))
794 (sha256
795 (base32
796 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
797 (build-system python-build-system)
798 (propagated-inputs
799 `(("python-greenlet" ,python-greenlet)))
800 (arguments
801 ;; TODO: Requires unpackaged 'enum-compat'.
802 '(#:tests? #f))
803 (home-page "http://eventlet.net")
804 (synopsis "Concurrent networking library for Python")
805 (description
806 "Eventlet is a concurrent networking library for Python that
807 allows you to change how you run your code, not how you write it.
808 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
809 Coroutines ensure that the developer uses a blocking style of programming
810 that is similar to threading, but provide the benefits of non-blocking I/O.
811 The event dispatch is implicit, which means you can easily use @code{Eventlet}
812 from the Python interpreter, or as a small part of a larger application.")
813 (license license:expat)))
814
815 (define-public python2-eventlet
816 (let ((base (package-with-python2
817 (strip-python2-variant python-eventlet))))
818 (package (inherit base)
819 (propagated-inputs
820 `(("python2-enum34" ,python2-enum34)
821 ,@(package-propagated-inputs base))))))
822
823 (define-public python-six
824 (package
825 (name "python-six")
826 (version "1.11.0")
827 (source
828 (origin
829 (method url-fetch)
830 (uri (pypi-uri "six" version))
831 (sha256
832 (base32
833 "1scqzwc51c875z23phj48gircqjgnn3af8zy2izjwmnlxrxsgs3h"))))
834 (build-system python-build-system)
835 (arguments
836 `(#:phases
837 (modify-phases %standard-phases
838 (replace 'check
839 (lambda _
840 (invoke "py.test" "-v"))))))
841 (native-inputs
842 `(("python-py" ,python-py)
843 ("python-pytest" ,python-pytest-bootstrap)))
844 (home-page "https://pypi.python.org/pypi/six/")
845 (synopsis "Python 2 and 3 compatibility utilities")
846 (description
847 "Six is a Python 2 and 3 compatibility library. It provides utility
848 functions for smoothing over the differences between the Python versions with
849 the goal of writing Python code that is compatible on both Python versions.
850 Six supports every Python version since 2.5. It is contained in only one
851 Python file, so it can be easily copied into your project.")
852 (license license:x11)))
853
854 (define-public python2-six
855 (package-with-python2 python-six))
856
857 (define-public python-six-bootstrap
858 (package
859 (inherit python-six)
860 (name "python-six-bootstrap")
861 (native-inputs `())
862 (arguments `(#:tests? #f))))
863
864 (define-public python2-six-bootstrap
865 (package-with-python2 python-six-bootstrap))
866
867 (define-public python-schedule
868 (package
869 (name "python-schedule")
870 (version "0.4.3")
871 (source
872 (origin
873 (method url-fetch)
874 (uri (pypi-uri "schedule" version))
875 (sha256
876 (base32
877 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
878 (build-system python-build-system)
879 (native-inputs
880 `(("python-pytest" ,python-pytest)
881 ("python-mock" ,python-mock)))
882 (home-page "https://github.com/dbader/schedule")
883 (synopsis "Schedule periodic function calls in Python")
884 (description
885 "Schedule is an in-process scheduler for periodic jobs that uses the
886 builder pattern for configuration. Schedule lets you run Python functions (or
887 any other callable) periodically at pre-determined intervals using a simple,
888 human-friendly syntax.")
889 (license license:expat)))
890
891 (define-public python2-schedule
892 (package-with-python2 python-schedule))
893
894 (define-public python-pandas
895 (package
896 (name "python-pandas")
897 (version "0.23.4")
898 (source
899 (origin
900 (method url-fetch)
901 (uri (pypi-uri "pandas" version))
902 (sha256
903 (base32 "1x54pd7hr3y7qahx6b5bf2wzj54xvl8r3s1h4pl254pnmi3wl92v"))))
904 (build-system python-build-system)
905 (arguments
906 `(#:modules ((guix build utils)
907 (guix build python-build-system)
908 (ice-9 ftw)
909 (srfi srfi-26))
910 #:phases (modify-phases %standard-phases
911 (replace 'check
912 (lambda _
913 (let ((build-directory
914 (string-append
915 (getcwd) "/build/"
916 (car (scandir "build"
917 (cut string-prefix? "lib." <>))))))
918 ;; Disable the "strict data files" option which causes
919 ;; the build to error out if required data files are not
920 ;; available (as is the case with PyPI archives).
921 (substitute* "setup.cfg"
922 (("addopts = --strict-data-files") "addopts = "))
923 (with-directory-excursion build-directory
924 ;; Delete tests that require "moto" which is not yet in Guix.
925 (for-each delete-file
926 '("pandas/tests/io/conftest.py"
927 "pandas/tests/io/json/test_compression.py"
928 "pandas/tests/io/parser/test_network.py"
929 "pandas/tests/io/test_excel.py"
930 "pandas/tests/io/test_parquet.py"))
931 (invoke "pytest" "-vv" "pandas" "--skip-slow"
932 "--skip-network" "-k"
933 ;; XXX: Due to the deleted tests above.
934 "not test_read_s3_jsonl"))))))))
935 (propagated-inputs
936 `(("python-numpy" ,python-numpy)
937 ("python-pytz" ,python-pytz)
938 ("python-dateutil" ,python-dateutil)))
939 (native-inputs
940 `(("python-cython" ,python-cython)
941 ("python-beautifulsoup4" ,python-beautifulsoup4)
942 ("python-lxml" ,python-lxml)
943 ("python-html5lib" ,python-html5lib)
944 ("python-nose" ,python-nose)
945 ("python-pytest" ,python-pytest)))
946 (home-page "https://pandas.pydata.org")
947 (synopsis "Data structures for data analysis, time series, and statistics")
948 (description
949 "Pandas is a Python package providing fast, flexible, and expressive data
950 structures designed to make working with structured (tabular,
951 multidimensional, potentially heterogeneous) and time series data both easy
952 and intuitive. It aims to be the fundamental high-level building block for
953 doing practical, real world data analysis in Python.")
954 (license license:bsd-3)))
955
956 (define-public python2-pandas
957 (package-with-python2 python-pandas))
958
959 (define-public python2-mechanize
960 (package
961 (name "python2-mechanize")
962 (version "0.2.5")
963 (source
964 (origin
965 (method url-fetch)
966 (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-"
967 version ".tar.gz"))
968 (sha256
969 (base32
970 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
971 (build-system python-build-system)
972 (arguments
973 `(#:python ,python-2 ; apparently incompatible with Python 3
974 #:tests? #f))
975 ;; test fails with message
976 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
977 ;; (python-3.3.2) or
978 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
979 ;; (python-2.7.5).
980 ;; The source code is from March 2011 and probably not up-to-date
981 ;; with respect to python unit tests.
982 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
983 (synopsis
984 "Stateful programmatic web browsing in Python")
985 (description
986 "Mechanize implements stateful programmatic web browsing in Python,
987 after Andy Lester’s Perl module WWW::Mechanize.")
988 (license (license:non-copyleft
989 "file://COPYING"
990 "See COPYING in the distribution."))))
991
992
993 (define-public python-simplejson
994 (package
995 (name "python-simplejson")
996 (version "3.14.0")
997 (source
998 (origin
999 (method url-fetch)
1000 (uri (pypi-uri "simplejson" version))
1001 (sha256
1002 (base32
1003 "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy"))))
1004 (build-system python-build-system)
1005 (home-page "http://simplejson.readthedocs.org/en/latest/")
1006 (synopsis
1007 "Json library for Python")
1008 (description
1009 "JSON (JavaScript Object Notation) is a subset of JavaScript
1010 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1011 format.
1012
1013 Simplejson exposes an API familiar to users of the standard library marshal
1014 and pickle modules. It is the externally maintained version of the json
1015 library contained in Python 2.6, but maintains compatibility with Python 2.5
1016 and (currently) has significant performance advantages, even without using
1017 the optional C extension for speedups. Simplejson is also supported on
1018 Python 3.3+.")
1019 (license license:x11)))
1020
1021 (define-public python2-simplejson
1022 (package-with-python2 python-simplejson))
1023
1024
1025 (define-public python-pyicu
1026 (package
1027 (name "python-pyicu")
1028 (version "2.2")
1029 (source
1030 (origin
1031 (method url-fetch)
1032 (uri (pypi-uri "PyICU" version))
1033 (sha256
1034 (base32
1035 "0wq9y5fi1ighgf5aws9nr87vi1w44p7q1k83rx2y3qj5d2xyhspa"))))
1036 (build-system python-build-system)
1037 (inputs
1038 `(("icu4c" ,icu4c)))
1039 (native-inputs
1040 `(("python-pytest" ,python-pytest)
1041 ("python-six" ,python-six)))
1042 (home-page "https://github.com/ovalhub/pyicu")
1043 (synopsis "Python extension wrapping the ICU C++ API")
1044 (description
1045 "PyICU is a python extension wrapping the ICU C++ API.")
1046 (properties `((python2-variant . ,(delay python2-pyicu))))
1047 (license license:x11)))
1048
1049 (define-public python2-pyicu
1050 (let ((base (package-with-python2
1051 (strip-python2-variant python-pyicu))))
1052 (package
1053 (inherit base)
1054 (arguments
1055 `(,@(package-arguments base)
1056 #:phases
1057 (modify-phases %standard-phases
1058 (add-before 'check 'delete-failing-test
1059 (λ _
1060 ;; XXX: This fails due to Unicode issues unique to Python 2,
1061 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1062 (delete-file "test/test_Script.py")
1063 #t))))))))
1064
1065 (define-public python2-dogtail
1066 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1067 ;; spaces in indentation" with Python 3.
1068 (package
1069 (name "python2-dogtail")
1070 (version "0.9.9")
1071 (source (origin
1072 (method url-fetch)
1073 (uri (pypi-uri "dogtail" version))
1074 (sha256
1075 (base32
1076 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1077 (build-system python-build-system)
1078 (arguments `(#:python ,python-2
1079 #:tests? #f)) ; invalid command "test"
1080 ;; Currently no offical homepage.
1081 (home-page "https://pypi.python.org/pypi/dogtail/")
1082 (synopsis "GUI test tool and automation framework written in Python")
1083 (description
1084 "Dogtail is a GUI test tool and automation framework written in Python.
1085 It uses Accessibility (a11y) technologies to communicate with desktop
1086 applications. dogtail scripts are written in Python and executed like any
1087 other Python program.")
1088 (license license:gpl2+)))
1089
1090 (define-public python-empy
1091 (package
1092 (name "python-empy")
1093 (version "3.3")
1094 (source (origin
1095 (method url-fetch)
1096 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1097 version ".tar.gz"))
1098 (sha256
1099 (base32
1100 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1101 (build-system python-build-system)
1102 (arguments
1103 `(#:tests? #f)) ;python2 only
1104 (home-page "http://www.alcyone.com/software/empy/")
1105 (synopsis "Templating system for Python")
1106 (description
1107 "EmPy is a system for embedding Python expressions and statements in
1108 template text; it takes an EmPy source file, processes it, and produces
1109 output. This is accomplished via expansions, which are special signals to the
1110 EmPy system and are set off by a special prefix (by default the at sign, @@).
1111 EmPy can expand arbitrary Python expressions and statements in this way, as
1112 well as a variety of special forms. Textual data not explicitly delimited in
1113 this way is sent unaffected to the output, allowing Python to be used in
1114 effect as a markup language. Also supported are callbacks via hooks,
1115 recording and playback via diversions, and dynamic, chainable filters. The
1116 system is highly configurable via command line options and embedded
1117 commands.")
1118 (license license:lgpl2.1+)))
1119
1120 (define-public python2-empy
1121 (package-with-python2 python-empy))
1122
1123 (define-public python2-element-tree
1124 (package
1125 (name "python2-element-tree")
1126 (version "1.2.6")
1127 (source (origin
1128 (method url-fetch)
1129 (uri (string-append
1130 "http://effbot.org/media/downloads/elementtree-"
1131 version "-20050316.tar.gz"))
1132 (sha256
1133 (base32
1134 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1135 (build-system python-build-system)
1136 (arguments
1137 `(#:python ,python-2 ; seems to be part of Python 3
1138 #:tests? #f)) ; no 'test' sub-command
1139 (synopsis "Toolkit for XML processing in Python")
1140 (description
1141 "ElementTree is a Python library supporting lightweight XML processing.")
1142 (home-page "http://effbot.org/zone/element-index.htm")
1143 (license (license:x11-style
1144 "http://docs.python.org/2/license.html"
1145 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1146
1147 (define-public python2-pybugz
1148 (package
1149 (name "python2-pybugz")
1150 (version "0.6.11")
1151 (source (origin
1152 (method url-fetch)
1153 (uri (string-append
1154 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1155 version ".tar.gz"))
1156 (sha256
1157 (base32
1158 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1159 (patches (search-patches "pybugz-stty.patch"
1160 "pybugz-encode-error.patch"))))
1161 (build-system python-build-system)
1162 (arguments
1163 `(#:python ,python-2 ; SyntaxError with Python 3
1164 #:tests? #f)) ; no 'test' sub-command
1165 (propagated-inputs
1166 `(("element-tree" ,python2-element-tree)))
1167 (synopsis "Python and command-line interface to Bugzilla")
1168 (description
1169 "PyBugz is a Python library and command-line tool to query the Bugzilla
1170 bug tracking system. It is meant as an aid to speed up interaction with the
1171 bug tracker.")
1172 (home-page "http://www.liquidx.net/pybugz/")
1173 (license license:gpl2)))
1174
1175 (define-public python2-enum
1176 (package
1177 (name "python2-enum")
1178 (version "0.4.6")
1179 (source (origin
1180 (method url-fetch)
1181 (uri (pypi-uri "enum" version))
1182 (sha256
1183 (base32
1184 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1185 (build-system python-build-system)
1186 (arguments
1187 `(#:python ,python-2))
1188 (home-page "http://pypi.python.org/pypi/enum/")
1189 (synopsis "Robust enumerated type support in Python")
1190 (description
1191 "This provides a module for robust enumerations in Python. It has
1192 been superseded by the Python standard library and is provided only for
1193 compatibility.")
1194 ;; Choice of either license.
1195 (license (list license:gpl3+ license:psfl))))
1196
1197 (define-public python-enum34
1198 (package
1199 (name "python-enum34")
1200 (version "1.1.6")
1201 (source
1202 (origin
1203 (method url-fetch)
1204 (uri (pypi-uri "enum34" version))
1205 (sha256
1206 (base32
1207 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1208 (build-system python-build-system)
1209 (home-page "https://pypi.python.org/pypi/enum34")
1210 (synopsis "Backported Python 3.4 Enum")
1211 (description
1212 "Enum34 is the new Python stdlib enum module available in Python 3.4
1213 backported for previous versions of Python from 2.4 to 3.3.")
1214 (license license:bsd-3)))
1215
1216 (define-public python2-enum34
1217 (package-with-python2 python-enum34))
1218
1219 (define-public python-parse-type
1220 (package
1221 (name "python-parse-type")
1222 (version "0.4.2")
1223 (source
1224 (origin
1225 (method url-fetch)
1226 (uri (pypi-uri "parse_type" version))
1227 (sha256
1228 (base32
1229 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1230 (build-system python-build-system)
1231 (propagated-inputs
1232 `(("python-six" ,python-six)
1233 ("python-parse" ,python-parse)))
1234 (native-inputs
1235 `(("python-pytest" ,python-pytest)
1236 ("python-pytest-runner" ,python-pytest-runner)))
1237 (home-page "https://github.com/jenisys/parse_type")
1238 (synopsis "Extended parse module")
1239 (description
1240 "Parse_type extends the python parse module.")
1241 (properties
1242 `((python2-variant . ,(delay python2-parse-type))))
1243 (license license:bsd-3)))
1244
1245 (define-public python2-parse-type
1246 (let ((base (package-with-python2
1247 (strip-python2-variant python-parse-type))))
1248 (package (inherit base)
1249 (propagated-inputs
1250 `(("python2-enum34" ,python2-enum34)
1251 ,@(package-propagated-inputs base))))))
1252
1253 (define-public python-parse
1254 (package
1255 (name "python-parse")
1256 (version "1.8.4")
1257 (source
1258 (origin
1259 (method url-fetch)
1260 (uri (pypi-uri "parse" version))
1261 (sha256
1262 (base32
1263 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
1264 (build-system python-build-system)
1265 (arguments
1266 `(#:phases
1267 (modify-phases %standard-phases
1268 (replace 'check
1269 (lambda _ (invoke "python" "test_parse.py"))))))
1270 (home-page "https://github.com/r1chardj0n3s/parse")
1271 (synopsis "Parse strings")
1272 (description
1273 "Parse strings using a specification based on the Python @code{format()}
1274 syntax.")
1275 (license license:x11)))
1276
1277 (define-public python-polib
1278 (package
1279 (name "python-polib")
1280 (version "1.0.8")
1281 (source (origin
1282 (method url-fetch)
1283 (uri (pypi-uri "polib" version))
1284 (sha256
1285 (base32
1286 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1287 (build-system python-build-system)
1288 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1289 (synopsis "Manipulate, create and modify gettext files")
1290 (description "Polib can manipulate any gettext format (po, pot and mo)
1291 files. It can be used to create po files from scratch or to modify
1292 existing ones.")
1293 (license license:expat)))
1294
1295 (define-public python2-polib
1296 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1297 (package
1298 (inherit base)
1299 (arguments `(,@(package-arguments base)
1300 ;; Tests don't work with python2.
1301 #:tests? #f)))))
1302
1303 (define-public scons
1304 (package
1305 (name "scons")
1306 (version "3.0.1")
1307 (source (origin
1308 (method url-fetch)
1309 (uri (string-append "mirror://sourceforge/scons/scons/" version
1310 "/scons-" version ".tar.gz"))
1311 (sha256
1312 (base32
1313 "0wzid419mlwqw9llrg8gsx4nkzhqy16m4m40r0xnh6cwscw5wir4"))))
1314 (build-system python-build-system)
1315 (arguments
1316 `(#:use-setuptools? #f ; still relies on distutils
1317 #:tests? #f)) ; no 'python setup.py test' command
1318 (home-page "http://scons.org/")
1319 (synopsis "Software construction tool written in Python")
1320 (description
1321 "SCons is a software construction tool. Think of SCons as an improved,
1322 cross-platform substitute for the classic Make utility with integrated
1323 functionality similar to autoconf/automake and compiler caches such as ccache.
1324 In short, SCons is an easier, more reliable and faster way to build
1325 software.")
1326 (license license:x11)))
1327
1328 (define-public scons-python2
1329 (package
1330 (inherit (package-with-python2 scons))
1331 (name "scons-python2")))
1332
1333 (define-public python-extras
1334 (package
1335 (name "python-extras")
1336 (version "1.0.0")
1337 (source
1338 (origin
1339 (method url-fetch)
1340 (uri (pypi-uri "extras" version))
1341 (sha256
1342 (base32
1343 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1344 (build-system python-build-system)
1345 (arguments
1346 ;; FIXME: Circular dependency on testtools.
1347 '(#:tests? #f))
1348 (home-page "https://github.com/testing-cabal/extras")
1349 (synopsis "Useful extensions to the Python standard library")
1350 (description
1351 "Extras is a set of extensions to the Python standard library.")
1352 (license license:expat)))
1353
1354 (define-public python2-extras
1355 (package-with-python2 python-extras))
1356
1357 (define-public python-mimeparse
1358 (package
1359 (name "python-mimeparse")
1360 (version "1.6.0")
1361 (source
1362 (origin
1363 (method url-fetch)
1364 (uri (string-append
1365 "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
1366 version ".tar.gz"))
1367 (sha256
1368 (base32
1369 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
1370 (build-system python-build-system)
1371 (arguments
1372 '(#:phases
1373 (modify-phases %standard-phases
1374 (replace 'check
1375 (lambda _
1376 (invoke "./mimeparse_test.py"))))))
1377 (home-page
1378 "https://github.com/dbtsai/python-mimeparse")
1379 (synopsis "Python library for parsing MIME types")
1380 (description
1381 "Mimeparse provides basic functions for parsing MIME type names and
1382 matching them against a list of media-ranges.")
1383 (license license:expat)))
1384
1385 (define-public python2-mimeparse
1386 (package-with-python2 python-mimeparse))
1387
1388 (define-public python-miniboa
1389 (package
1390 (name "python-miniboa")
1391 (version "1.0.7")
1392 (source
1393 (origin
1394 (method url-fetch)
1395 (uri (pypi-uri "miniboa" version))
1396 (sha256
1397 (base32
1398 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
1399 (build-system python-build-system)
1400 (home-page "https://github.com/shmup/miniboa")
1401 (synopsis "Simple, single-threaded Telnet server")
1402 (description
1403 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
1404 server.")
1405 (license license:asl2.0)))
1406
1407 (define-public python2-miniboa
1408 (package-with-python2 python-miniboa))
1409
1410 (define-public python-pafy
1411 (package
1412 (name "python-pafy")
1413 (version "0.5.3.1")
1414 (source
1415 (origin
1416 (method url-fetch)
1417 (uri (pypi-uri "pafy" version))
1418 (sha256
1419 (base32
1420 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1421 (build-system python-build-system)
1422 (arguments
1423 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1424 (propagated-inputs
1425 ;; Youtube-dl is a python package which is imported in the file
1426 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1427 `(("youtube-dl" ,youtube-dl)))
1428 (home-page "https://np1.github.io/pafy/")
1429 (synopsis "Retrieve YouTube content and metadata")
1430 (description
1431 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1432 (license license:lgpl3+)))
1433
1434 (define-public python2-funcsigs
1435 (package
1436 (name "python2-funcsigs")
1437 (version "1.0.2")
1438 (source (origin
1439 (method url-fetch)
1440 (uri (pypi-uri "funcsigs" version))
1441 (sha256
1442 (base32
1443 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1444 (build-system python-build-system)
1445 (arguments
1446 `(#:python ,python-2))
1447 (native-inputs
1448 `(("python2-unittest2" ,python2-unittest2)))
1449 (home-page "http://funcsigs.readthedocs.org")
1450 (synopsis "Python function signatures from PEP362")
1451 (description
1452 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1453 (license license:asl2.0)))
1454
1455 (define-public python2-funcsigs-bootstrap
1456 (package
1457 (inherit python2-funcsigs)
1458 (name "python2-funcsigs-bootstrap")
1459 (native-inputs `())
1460 (arguments
1461 `(#:tests? #f
1462 ,@(package-arguments python2-funcsigs)))))
1463
1464 (define-public python-py
1465 (package
1466 (name "python-py")
1467 (version "1.5.4")
1468 (source
1469 (origin
1470 (method url-fetch)
1471 (uri (pypi-uri "py" version))
1472 (sha256
1473 (base32
1474 "1xxvwfn82457djf55f5n2c94699rfqnk43br8fif2r2q8gvrmm9z"))))
1475 (build-system python-build-system)
1476 (arguments
1477 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1478 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1479 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1480 ;; Is this module globally installed?"
1481 '(#:tests? #f))
1482 (native-inputs
1483 `(("python-setuptools-scm" ,python-setuptools-scm)))
1484 (home-page "https://github.com/pytest-dev/py")
1485 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1486 (description
1487 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1488 code introspection, and logging.")
1489 (license license:expat)))
1490
1491 (define-public python2-py
1492 (package-with-python2 python-py))
1493
1494 ;; Recent versions of python-fixtures and python-testrepository need
1495 ;; python-pbr for packaging, which itself needs these two packages for
1496 ;; testing.
1497 ;; To fix this circular dependency, we use a build of python-pbr, based on the
1498 ;; same source, just without any test dependencies and with tests disabled.
1499 ;; python-pbr-minmal is then used to package python-fixtures and
1500 ;; python-testrepository.
1501 ;; Strictly speaking we currently could remove the test-requirements from the
1502 ;; normal python-pbr package (and save this package) since test are disabled
1503 ;; there anyway. But this may change in future.
1504 (define-public python-pbr-minimal
1505 (package
1506 (name "python-pbr-minimal")
1507 (version "3.0.1")
1508 (source
1509 (origin
1510 (method url-fetch)
1511 (uri (pypi-uri "pbr" version))
1512 (sha256
1513 (base32
1514 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
1515 (build-system python-build-system)
1516 (arguments
1517 `(#:tests? #f))
1518 (home-page "http://docs.openstack.org/developer/pbr/")
1519 (synopsis "Minimal build of python-pbr used for bootstrapping")
1520 (description
1521 "Used only for bootstrapping python2-pbr, you should not need this.")
1522 (license license:asl2.0)))
1523
1524 (define-public python2-pbr-minimal
1525 (package-with-python2 python-pbr-minimal))
1526
1527 (define-public python-pbr
1528 (package
1529 (inherit python-pbr-minimal)
1530 (name "python-pbr")
1531 (arguments
1532 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1533 (propagated-inputs
1534 `(("git" ,git))) ;; pbr actually uses the "git" binary.
1535 (native-inputs
1536 `(("python-fixtures" ,python-fixtures-bootstrap)
1537 ;; discover, coverage, hacking, subunit
1538 ("python-mock" ,python-mock)
1539 ("python-six" ,python-six)
1540 ("python-sphinx" ,python-sphinx)
1541 ("python-testrepository" ,python-testrepository-bootstrap)
1542 ("python-testresources" ,python-testresources-bootstrap)
1543 ("python-testscenarios" ,python-testscenarios-bootstrap)
1544 ("python-testtools" ,python-testtools-bootstrap)
1545 ("python-virtualenv" ,python-virtualenv)))
1546 (synopsis "Enhance the default behavior of Python’s setuptools")
1547 (description
1548 "Python Build Reasonableness (PBR) is a library that injects some useful
1549 and sensible default behaviors into your setuptools run. It will set
1550 versions, process requirements files and generate AUTHORS and ChangeLog file
1551 from git information.
1552 ")))
1553
1554 (define-public python2-pbr
1555 (package-with-python2 python-pbr))
1556
1557 (define-public python-exif-read
1558 (package
1559 (name "python-exif-read")
1560 (version "2.1.2")
1561 (source (origin
1562 (method url-fetch)
1563 (uri (pypi-uri "ExifRead" version))
1564 (sha256
1565 (base32
1566 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
1567 (build-system python-build-system)
1568 (arguments `(#:tests? #f)) ; no tests
1569 (home-page "https://github.com/ianare/exif-py")
1570 (synopsis "Python library to extract EXIF data from image files")
1571 (description
1572 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1573 files.")
1574 (license license:bsd-3)))
1575
1576 (define-public python2-exif-read
1577 (package-with-python2 python-exif-read))
1578
1579 (define-public python-pyld
1580 (package
1581 (name "python-pyld")
1582 (version "1.0.3")
1583 (source (origin
1584 (method url-fetch)
1585 (uri (pypi-uri "PyLD" version))
1586 (sha256
1587 (base32
1588 "12i2g6xdj30k7xxcibg3sc5y76snwq8l6n8fy9lyi577kgy0h2pm"))))
1589 (build-system python-build-system)
1590 (home-page "https://github.com/digitalbazaar/pyld")
1591 (synopsis "Python implementation of the JSON-LD specification")
1592 (description
1593 "PyLD is an implementation of the JSON-LD specification.")
1594 (license license:bsd-3)))
1595
1596 (define-public python2-pyld
1597 (package-with-python2 python-pyld))
1598
1599 (define-public python-click
1600 (package
1601 (name "python-click")
1602 (version "6.7")
1603 (source
1604 (origin
1605 (method url-fetch)
1606 (uri (pypi-uri "click" version))
1607 (sha256
1608 (base32
1609 "02qkfpykbq35id8glfgwc38yc430427yd05z1wc5cnld8zgicmgi"))))
1610 (build-system python-build-system)
1611 (arguments
1612 `(;; The tests are fragile, depending on a specific version of pytest:
1613 ;; <https://github.com/pallets/click/issues/823>
1614 #:tests? #f
1615 #:phases
1616 (modify-phases %standard-phases
1617 (add-after 'unpack 'fix-paths
1618 (lambda* (#:key inputs #:allow-other-keys)
1619 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
1620 "cross-libc" "libc"))))
1621 (substitute* "click/_unicodefun.py"
1622 (("'locale'")
1623 (string-append "'" glibc "/bin/locale'"))))
1624 #t)))))
1625 (native-inputs
1626 `(("python-pytest" ,python-pytest)))
1627 (home-page "http://click.pocoo.org")
1628 (synopsis "Command line library for Python")
1629 (description
1630 "Click is a Python package for creating command line interfaces in a
1631 composable way with as little code as necessary. Its name stands for
1632 \"Command Line Interface Creation Kit\". It's highly configurable but comes
1633 with sensible defaults out of the box.")
1634 (license license:bsd-3)))
1635
1636 (define-public python2-click
1637 (package-with-python2 python-click))
1638
1639 (define-public python-wheel
1640 (package
1641 (name "python-wheel")
1642 (version "0.30.0a0")
1643 (source
1644 (origin
1645 (method url-fetch)
1646 (uri (pypi-uri "wheel" version))
1647 (sha256
1648 (base32
1649 "1nm6mn8isny0hr86rhbfrpfj867c0phf001xgsd69xfp9ady1wwq"))))
1650 (build-system python-build-system)
1651 (native-inputs
1652 `(("python-jsonschema" ,python-jsonschema)
1653 ("python-pytest-cov" ,python-pytest-cov)))
1654 (home-page "https://bitbucket.org/pypa/wheel/")
1655 (synopsis "Format for built Python packages")
1656 (description
1657 "A wheel is a ZIP-format archive with a specially formatted filename and
1658 the @code{.whl} extension. It is designed to contain all the files for a PEP
1659 376 compatible install in a way that is very close to the on-disk format. Many
1660 packages will be properly installed with only the @code{Unpack} step and the
1661 unpacked archive preserves enough information to @code{Spread} (copy data and
1662 scripts to their final locations) at any later time. Wheel files can be
1663 installed with a newer @code{pip} or with wheel's own command line utility.")
1664 (license license:expat)
1665 (properties `((python2-variant . ,(delay python2-wheel))))))
1666
1667 (define-public python2-wheel
1668 (let ((wheel (package-with-python2
1669 (strip-python2-variant python-wheel))))
1670 (package (inherit wheel)
1671 (native-inputs `(("python2-functools32" ,python2-functools32)
1672 ,@(package-native-inputs wheel))))))
1673
1674 (define-public python-vcversioner
1675 (package
1676 (name "python-vcversioner")
1677 (version "2.16.0.0")
1678 (source
1679 (origin
1680 (method url-fetch)
1681 (uri (pypi-uri "vcversioner" version))
1682 (sha256
1683 (base32
1684 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
1685 (build-system python-build-system)
1686 (synopsis "Python library for version number discovery")
1687 (description "Vcversioner is a Python library that inspects tagging
1688 information in a variety of version control systems in order to discover
1689 version numbers.")
1690 (home-page "https://github.com/habnabit/vcversioner")
1691 (license license:isc)))
1692
1693 (define-public python2-vcversioner
1694 (package-with-python2 python-vcversioner))
1695
1696 (define-public python-jsonschema
1697 (package
1698 (name "python-jsonschema")
1699 (version "2.6.0")
1700 (source (origin
1701 (method url-fetch)
1702 (uri
1703 (string-append
1704 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
1705 version ".tar.gz"))
1706 (sha256
1707 (base32
1708 "00kf3zmpp9ya4sydffpifn0j0mzm342a2vzh82p6r0vh10cg7xbg"))))
1709 (build-system python-build-system)
1710 (arguments
1711 '(#:phases
1712 (modify-phases %standard-phases
1713 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
1714 (native-inputs
1715 `(("python-nose" ,python-nose)
1716 ("python-vcversioner" ,python-vcversioner)))
1717 (home-page "https://github.com/Julian/jsonschema")
1718 (synopsis "Implementation of JSON Schema for Python")
1719 (description
1720 "Jsonschema is an implementation of JSON Schema for Python.")
1721 (license license:expat)
1722 (properties `((python2-variant . ,(delay python2-jsonschema))))))
1723
1724 (define-public python2-jsonschema
1725 (let ((jsonschema (package-with-python2
1726 (strip-python2-variant python-jsonschema))))
1727 (package (inherit jsonschema)
1728 (native-inputs
1729 `(("python2-mock" ,python2-mock)
1730 ,@(package-native-inputs jsonschema)))
1731 (propagated-inputs
1732 `(("python2-functools32" ,python2-functools32))))))
1733
1734 (define-public python-schema
1735 (package
1736 (name "python-schema")
1737 (version "0.6.6")
1738 (source
1739 (origin
1740 (method url-fetch)
1741 (uri (pypi-uri "schema" version))
1742 (sha256
1743 (base32
1744 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
1745 (build-system python-build-system)
1746 (native-inputs
1747 `(("python-pytest" ,python-pytest)))
1748 (home-page "https://github.com/keleshev/schema")
1749 (synopsis "Simple data validation library")
1750 (description
1751 "@code{python-schema} is a library for validating Python data
1752 structures, such as those obtained from config-files, forms, external
1753 services or command-line parsing, converted from JSON/YAML (or
1754 something else) to Python data-types.")
1755 (license license:psfl)))
1756
1757 (define-public python2-schema
1758 (package-with-python2 python-schema))
1759
1760 (define-public python-schema-0.5
1761 (package (inherit python-schema)
1762 (version "0.5.0")
1763 (source
1764 (origin
1765 (method url-fetch)
1766 (uri (pypi-uri "schema" version))
1767 (sha256
1768 (base32
1769 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
1770
1771 (define-public python2-schema-0.5
1772 (package-with-python2 python-schema-0.5))
1773
1774 (define-public python-kitchen
1775 (package
1776 (name "python-kitchen")
1777 (version "1.2.5")
1778 (source
1779 (origin
1780 (method url-fetch)
1781 (uri (pypi-uri "kitchen" version))
1782 (sha256
1783 (base32
1784 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
1785 (build-system python-build-system)
1786 (propagated-inputs
1787 `(("python-chardet" ,python-chardet)))
1788 (home-page "https://github.com/fedora-infra/kitchen")
1789 (synopsis "Python API for snippets")
1790 (description "@code{kitchen} module provides a python API for all sorts of
1791 little useful snippets of code that everybody ends up writing for their projects
1792 but never seem big enough to build an independent release. Use kitchen and stop
1793 cutting and pasting that code over and over.")
1794 (license (list license:lgpl2.1+
1795 ;; subprocess.py, test_subprocess.py,
1796 ;; kitchen/pycompat25/defaultdict.py:
1797 license:psfl))))
1798
1799 (define-public python2-kitchen
1800 (package-with-python2 python-kitchen))
1801
1802 (define-public python-unidecode
1803 (package
1804 (name "python-unidecode")
1805 (version "1.0.23")
1806 (source (origin
1807 (method url-fetch)
1808 (uri (pypi-uri "Unidecode" version))
1809 (sha256
1810 (base32
1811 "1ysjbr3nqfqj97h8zyj3v9pya413vkv7a1mzml80w37xx15kb1cb"))))
1812 (build-system python-build-system)
1813 (home-page "https://pypi.python.org/pypi/Unidecode")
1814 (synopsis "ASCII transliterations of Unicode text")
1815 (description
1816 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
1817 useful when integrating with legacy code that doesn't support Unicode, or for
1818 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
1819 machine identifiers from human-readable Unicode strings that should still be
1820 somewhat intelligible.")
1821 (license license:gpl2+)))
1822
1823 (define-public python2-unidecode
1824 (package-with-python2 python-unidecode))
1825
1826 (define-public python-pyjwt
1827 (package
1828 (name "python-pyjwt")
1829 (version "1.5.3")
1830 (source
1831 (origin
1832 (method url-fetch)
1833 (uri (pypi-uri "PyJWT" version))
1834 (sha256
1835 (base32
1836 "1rxsg14i33vm2i6lz0my628108c81k43v10n4h3p0gx62xdyf2sh"))
1837 (modules '((guix build utils)))
1838 (snippet
1839 '(begin
1840 (for-each delete-file-recursively
1841 (find-files "." "\\.pyc$"))
1842 #t))))
1843 (build-system python-build-system)
1844 (native-inputs
1845 `(("python-pytest" ,python-pytest)
1846 ("python-pytest-cov" ,python-pytest-cov)
1847 ("python-pytest-runner" ,python-pytest-runner)))
1848 (home-page "https://github.com/progrium/pyjwt")
1849 (synopsis "JSON Web Token implementation in Python")
1850 (description
1851 "PyJWT is a JSON Web Token implementation written in Python.")
1852 (license license:expat)))
1853
1854 (define-public python2-pyjwt
1855 (package-with-python2 python-pyjwt))
1856
1857 (define-public python-pykka
1858 (package
1859 (name "python-pykka")
1860 (version "1.2.1")
1861 (source
1862 (origin
1863 (method url-fetch)
1864 (uri (pypi-uri "Pykka" version))
1865 (sha256
1866 (base32
1867 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
1868 (build-system python-build-system)
1869 (native-inputs
1870 `(("python-mock" ,python-mock)
1871 ("python-nose" ,python-nose)
1872 ("python-gevent" ,python-gevent)
1873 ("python-eventlet" ,python-eventlet)))
1874 (home-page "https://www.pykka.org/")
1875 (synopsis "Pykka is a Python implementation of the actor model")
1876 (description
1877 "Pykka is a Python implementation of the actor model.
1878 The actor model introduces some simple rules to control the sharing
1879 of state and cooperation between execution units, which makes it
1880 easier to build concurrent applications.")
1881 (license license:asl2.0)))
1882
1883 (define-public python2-pykka
1884 (package-with-python2 python-pykka))
1885
1886 (define-public python-pympler
1887 (package
1888 (name "python-pympler")
1889 (home-page "https://pythonhosted.org/Pympler/")
1890 (version "0.5")
1891 (source (origin
1892 (method url-fetch)
1893 (uri (pypi-uri "Pympler" version))
1894 (sha256
1895 (base32
1896 "03qwsbilqgvnbl3a1jmpgixbr2kq6m3fvdlzyr3wdp01bwlc85kx"))))
1897 (build-system python-build-system)
1898 (arguments
1899 `(#:phases (modify-phases %standard-phases
1900 (delete 'check)
1901 (add-after 'install 'check
1902 (lambda* (#:key inputs outputs #:allow-other-keys)
1903 (add-installed-pythonpath inputs outputs)
1904 (invoke "python" "setup.py" "test"))))))
1905 (synopsis "Measure, monitor and analyze memory behavior")
1906 (description
1907 "Pympler is a development tool to measure, monitor and analyze
1908 the memory behavior of Python objects in a running Python application.
1909
1910 By pympling a Python application, detailed insight in the size and the
1911 lifetime of Python objects can be obtained. Undesirable or unexpected
1912 runtime behavior like memory bloat and other @samp{pymples} can easily
1913 be identified.
1914
1915 A web profiling frontend exposes process statistics, garbage
1916 visualisation and class tracker statistics.")
1917 (license license:asl2.0)))
1918
1919 (define-public python2-pympler
1920 (package-with-python2 python-pympler))
1921
1922 (define-public python-itsdangerous
1923 (package
1924 (name "python-itsdangerous")
1925 (version "0.24")
1926 (source
1927 (origin
1928 (method url-fetch)
1929 (uri (string-append
1930 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
1931 version ".tar.gz"))
1932 (sha256
1933 (base32
1934 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
1935 (build-system python-build-system)
1936 (home-page "https://github.com/mitsuhiko/itsdangerous")
1937 (synopsis "Python library for passing data to/from untrusted environments")
1938 (description
1939 "Itsdangerous provides various helpers to pass trusted data to untrusted
1940 environments and back.")
1941 (license license:bsd-3)))
1942
1943 (define-public python2-itsdangerous
1944 (package-with-python2 python-itsdangerous))
1945
1946 (define-public python-pyyaml
1947 (package
1948 (name "python-pyyaml")
1949 (version "3.13")
1950 (source
1951 (origin
1952 (method url-fetch)
1953 (uri (pypi-uri "PyYAML" version))
1954 (sha256
1955 (base32
1956 "1gx603g484z46cb74j9rzr6sjlh2vndxayicvlyhxdz98lhhkwry"))))
1957 (build-system python-build-system)
1958 (inputs
1959 `(("libyaml" ,libyaml)))
1960 (home-page "http://pyyaml.org/wiki/PyYAML")
1961 (synopsis "YAML parser and emitter for Python")
1962 (description
1963 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
1964 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
1965 API, and sensible error messages. PyYAML supports standard YAML tags and
1966 provides Python-specific tags that allow to represent an arbitrary Python
1967 object.")
1968 (license license:expat)))
1969
1970 (define-public python2-pyyaml
1971 (package-with-python2 python-pyyaml))
1972
1973 (define-public python-vine
1974 (package
1975 (name "python-vine")
1976 (version "1.1.4")
1977 (source
1978 (origin
1979 (method url-fetch)
1980 (uri (pypi-uri "vine" version))
1981 (sha256
1982 (base32
1983 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
1984 (build-system python-build-system)
1985 (native-inputs
1986 `(("python-pytest" ,python-pytest)
1987 ("python-case" ,python-case)))
1988 (home-page "https://github.com/celery/vine")
1989 (synopsis "Promises for Python")
1990 (description
1991 "@code{vine} provides a special implementation of promises in that it can
1992 be used both for \"promise of a value\" and lazy evaluation. The biggest
1993 upside for this is that everything in a promise can also be a promise,
1994 e.g. filters, callbacks and errbacks can all be promises.")
1995 (license license:bsd-3)))
1996
1997 (define-public python-virtualenv
1998 (package
1999 (name "python-virtualenv")
2000 (version "16.1.0")
2001 (source
2002 (origin
2003 (method url-fetch)
2004 (uri (pypi-uri "virtualenv" version))
2005 (sha256
2006 (base32
2007 "0242cg3hdq3qdvx5flyrki8lpwlgwf5k45c21ks5049fv7ygm6gq"))))
2008 (build-system python-build-system)
2009 (arguments
2010 `(#:phases
2011 (modify-phases %standard-phases
2012 (add-before 'check 'disable-failing-test
2013 (lambda _
2014 ;; Disable failing test. See upstream bug report
2015 ;; https://github.com/pypa/virtualenv/issues/957
2016 (substitute* "tests/test_virtualenv.py"
2017 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2018 #t)))))
2019 (native-inputs
2020 `(("python-mock" ,python-mock)
2021 ("python-pytest" ,python-pytest)))
2022 (home-page "https://virtualenv.pypa.io/")
2023 (synopsis "Virtual Python environment builder")
2024 (description
2025 "Virtualenv is a tool to create isolated Python environments.")
2026 (license license:expat)))
2027
2028 (define-public python2-virtualenv
2029 (package-with-python2 python-virtualenv))
2030
2031 (define-public python-markupsafe
2032 (package
2033 (name "python-markupsafe")
2034 (version "1.0")
2035 (source
2036 (origin
2037 (method url-fetch)
2038 (uri (string-append
2039 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
2040 version ".tar.gz"))
2041 (sha256
2042 (base32
2043 "0rdn1s8x9ni7ss8rfiacj7x1085lx8mh2zdwqslnw8xc3l4nkgm6"))))
2044 (build-system python-build-system)
2045 (home-page "https://github.com/mitsuhiko/markupsafe")
2046 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2047 (description
2048 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2049 for Python.")
2050 (license license:bsd-3)))
2051
2052 (define-public python2-markupsafe
2053 (package-with-python2 python-markupsafe))
2054
2055 (define-public python-jinja2
2056 (package
2057 (name "python-jinja2")
2058 (version "2.10")
2059 (source
2060 (origin
2061 (method url-fetch)
2062 (uri (pypi-uri "Jinja2" version))
2063 (sha256
2064 (base32
2065 "190l36hfw3wb2n3n68yacjabxyb1pnxwn7vjx96cmjj002xy2jzq"))))
2066 (build-system python-build-system)
2067 (propagated-inputs
2068 `(("python-markupsafe" ,python-markupsafe)))
2069 (home-page "http://jinja.pocoo.org/")
2070 (synopsis "Python template engine")
2071 (description
2072 "Jinja2 is a small but fast and easy to use stand-alone template engine
2073 written in pure Python.")
2074 (license license:bsd-3)))
2075
2076 (define-public python2-jinja2
2077 (package-with-python2 python-jinja2))
2078
2079 (define-public python-pystache
2080 (package
2081 (name "python-pystache")
2082 (version "0.5.4")
2083 (source (origin
2084 (method url-fetch)
2085 (uri (pypi-uri "pystache" version))
2086 (sha256
2087 (base32
2088 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2089 (build-system python-build-system)
2090 (arguments
2091 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2092 (home-page "http://defunkt.io/pystache/")
2093 (synopsis "Python logic-less template engine")
2094 (description
2095 "Pystache is a Python implementation of the framework agnostic,
2096 logic-free templating system Mustache.")
2097 (license license:expat)
2098 (properties `((python2-variant . ,(delay python2-pystache))))))
2099
2100 (define-public python2-pystache
2101 (package (inherit (package-with-python2
2102 (strip-python2-variant python-pystache)))
2103 (arguments
2104 `(#:python ,python-2
2105 #:phases
2106 (modify-phases %standard-phases
2107 (replace 'check
2108 (lambda _
2109 (zero? (system* "python" "test_pystache.py")))))))))
2110
2111 (define-public python-joblib
2112 (package
2113 (name "python-joblib")
2114 (version "0.13.0")
2115 (source (origin
2116 (method url-fetch)
2117 (uri (pypi-uri "joblib" version))
2118 (sha256
2119 (base32
2120 "0612nazad8dxmn3xghfrmjax6456l4xy6hn9cngs7vydi14ds7v5"))))
2121 (build-system python-build-system)
2122 (arguments
2123 `(#:phases
2124 (modify-phases %standard-phases
2125 (replace 'check
2126 (lambda _ (invoke "pytest" "-v" "joblib"))))))
2127 (native-inputs
2128 `(("python-pytest" ,python-pytest)))
2129 (home-page "https://joblib.readthedocs.io/")
2130 (synopsis "Using Python functions as pipeline jobs")
2131 (description
2132 "Joblib is a set of tools to provide lightweight pipelining in Python.
2133 In particular, joblib offers: transparent disk-caching of the output values
2134 and lazy re-evaluation (memoize pattern), easy simple parallel computing
2135 logging and tracing of the execution.")
2136 (license license:bsd-3)))
2137
2138 (define-public python2-joblib
2139 (package-with-python2 python-joblib))
2140
2141 (define-public python-docutils
2142 (package
2143 (name "python-docutils")
2144 (version "0.14")
2145 (source
2146 (origin
2147 (method url-fetch)
2148 (uri (pypi-uri "docutils" version))
2149 (sha256
2150 (base32
2151 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
2152 (build-system python-build-system)
2153 (arguments
2154 '(#:tests? #f)) ; no setup.py test command
2155 (home-page "http://docutils.sourceforge.net/")
2156 (synopsis "Python Documentation Utilities")
2157 (description
2158 "Docutils is a modular system for processing documentation into useful
2159 formats, such as HTML, XML, and LaTeX. For input Docutils supports
2160 reStructuredText.")
2161 ;; Most of the source code is public domain, but some source files are
2162 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2163 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2164
2165 (define-public python2-docutils
2166 (package-with-python2 python-docutils))
2167
2168 (define-public python-pygments
2169 (package
2170 (name "python-pygments")
2171 (version "2.2.0")
2172 (source
2173 (origin
2174 (method url-fetch)
2175 (uri (pypi-uri "Pygments" version))
2176 (sha256
2177 (base32
2178 "1k78qdvir1yb1c634nkv6rbga8wv4289xarghmsbbvzhvr311bnv"))))
2179 (build-system python-build-system)
2180 (arguments
2181 ;; FIXME: Tests require sphinx, which depends on this.
2182 '(#:tests? #f))
2183 (home-page "http://pygments.org/")
2184 (synopsis "Syntax highlighting")
2185 (description
2186 "Pygments is a syntax highlighting package written in Python.")
2187 (license license:bsd-2)))
2188
2189 (define-public python2-pygments
2190 (package-with-python2 python-pygments))
2191
2192 (define-public python-sphinxcontrib-websupport
2193 (package
2194 (name "python-sphinxcontrib-websupport")
2195 (version "1.1.0")
2196 (source (origin
2197 (method url-fetch)
2198 (uri (pypi-uri "sphinxcontrib-websupport" version))
2199 (sha256
2200 (base32
2201 "1ff3ix76xi1y6m99qxhaq5161ix9swwzydilvdya07mgbcvpzr4x"))))
2202 (build-system python-build-system)
2203 (arguments
2204 ;; FIXME: Tests depend on Sphinx, which depends on this.
2205 `(#:tests? #f))
2206 (home-page "http://sphinx-doc.org/")
2207 (synopsis "Sphinx API for web applications")
2208 (description "This package provides a Python API to easily integrate
2209 Sphinx documentation into your web application. It provides tools to
2210 integrate Sphinx documents in web templates and to handle searches.")
2211 (license license:bsd-3)))
2212
2213 (define-public python2-sphinxcontrib-websupport
2214 (package-with-python2 python-sphinxcontrib-websupport))
2215
2216 (define-public python-sphinx
2217 (package
2218 (name "python-sphinx")
2219 (version "1.7.7")
2220 (source
2221 (origin
2222 (method url-fetch)
2223 (uri (pypi-uri "Sphinx" version))
2224 (sha256
2225 (base32
2226 "0pkkbfj7cl157q550gcs45am5y78ps0h7q6455d64s1zmw01jlvi"))))
2227 (build-system python-build-system)
2228 (arguments
2229 `(#:phases
2230 (modify-phases %standard-phases
2231 (replace 'check
2232 (lambda _
2233 ;; Requires Internet access.
2234 (delete-file "tests/test_build_linkcheck.py")
2235 (substitute* "tests/test_build_latex.py"
2236 (("@pytest.mark.sphinx\\('latex', testroot='images'\\)")
2237 "@pytest.mark.skip()"))
2238 (when (which "python")
2239 ;; XXX: These tests are broken when using Python2:
2240 ;; <https://github.com/sphinx-doc/sphinx/issues/4710>.
2241 (delete-file "tests/test_api_translator.py")
2242 (delete-file "tests/test_setup_command.py"))
2243 (invoke "make" "test"))))))
2244 (propagated-inputs
2245 `(("python-imagesize" ,python-imagesize)
2246 ("python-sphinx-alabaster-theme"
2247 ,python-sphinx-alabaster-theme)
2248 ("python-babel" ,python-babel)
2249 ("python-snowballstemmer" ,python-snowballstemmer)
2250 ("python-docutils" ,python-docutils)
2251 ("python-jinja2" ,python-jinja2)
2252 ("python-packaging" ,python-packaging)
2253 ("python-pygments" ,python-pygments)
2254 ("python-requests" ,python-requests)
2255 ("python-six" ,python-six)
2256 ("python-sphinxcontrib-websupport" ,python-sphinxcontrib-websupport)))
2257 (native-inputs
2258 `(("graphviz" ,graphviz)
2259 ("imagemagick" ,imagemagick) ;for "convert"
2260 ("python-html5lib" ,python-html5lib)
2261 ("python-mock" ,python-mock)
2262 ("python-nose" ,python-nose)
2263 ("python-pytest" ,python-pytest)))
2264 (home-page "http://sphinx-doc.org/")
2265 (synopsis "Python documentation generator")
2266 (description "Sphinx is a tool that makes it easy to create documentation
2267 for Python projects or other documents consisting of multiple reStructuredText
2268 sources.")
2269 (license license:bsd-3)
2270 (properties `((python2-variant . ,(delay python2-sphinx))))))
2271
2272 (define-public python2-sphinx
2273 (let ((base (package-with-python2 (strip-python2-variant python-sphinx))))
2274 (package
2275 (inherit base)
2276 (native-inputs `(("python2-mock" ,python2-mock)
2277 ("python2-enum34" ,python2-enum34)
2278 ,@(package-native-inputs base)))
2279 (propagated-inputs `(("python2-pytz" ,python2-pytz)
2280 ("python2-typing" ,python2-typing)
2281 ,@(package-propagated-inputs base))))))
2282
2283 (define-public python-sphinx-gallery
2284 (package
2285 (name "python-sphinx-gallery")
2286 (version "0.1.13")
2287 (source (origin
2288 (method url-fetch)
2289 (uri (string-append "https://github.com/sphinx-gallery/sphinx-gallery"
2290 "/archive/v" version ".tar.gz"))
2291 (file-name (string-append name "-" version ".tar.gz"))
2292 (sha256
2293 (base32
2294 "03fs99mcb1r7qp0xixqv07vcz98sk21yq19ffdysi0infdcpzfkd"))))
2295 (build-system python-build-system)
2296 (arguments
2297 ;; FIXME: Tests attempt to download <https://docs.python.org/3/objects.inv>,
2298 ;; <https://docs.scipy.org/doc/numpy/objects.inv>, and
2299 ;; <https://matplotlib.org/objects.inv>.
2300 `(#:tests? #f))
2301 (native-inputs
2302 `(("python-pytest-runner" ,python-pytest-runner)))
2303 (home-page "https://sphinx-gallery.github.io/")
2304 (synopsis "Generate an examples gallery automatically")
2305 (description
2306 "@code{sphinx_gallery} is a Sphinx extension that builds an HTML version
2307 from any set of Python scripts and puts it into an examples gallery.")
2308 (license license:bsd-3)))
2309
2310 (define-public python2-sphinx-gallery
2311 (package-with-python2 python-sphinx-gallery))
2312
2313 (define-public python-sphinx-rtd-theme
2314 (package
2315 (name "python-sphinx-rtd-theme")
2316 (version "0.2.4")
2317 (source
2318 (origin
2319 (method url-fetch)
2320 (uri (pypi-uri "sphinx_rtd_theme" version))
2321 (sha256
2322 (base32
2323 "05rlhjzdyapr2w74jjs7mrm8hi69qskcr5vya9f9drpsys7lpxrd"))))
2324 (build-system python-build-system)
2325 (arguments '(#:tests? #f)) ; No tests.
2326 (propagated-inputs
2327 `(("python-sphinx" ,python-sphinx)))
2328 (home-page "https://github.com/snide/sphinx_rtd_theme/")
2329 (synopsis "ReadTheDocs.org theme for Sphinx")
2330 (description "A theme for Sphinx used by ReadTheDocs.org.")
2331 (license license:expat)))
2332
2333 (define-public python2-sphinx-rtd-theme
2334 (package-with-python2 python-sphinx-rtd-theme))
2335
2336 (define-public python-guzzle-sphinx-theme
2337 (package
2338 (name "python-guzzle-sphinx-theme")
2339 (version "0.7.11")
2340 (source
2341 (origin
2342 (method url-fetch)
2343 (uri (pypi-uri "guzzle_sphinx_theme" version))
2344 (sha256
2345 (base32
2346 "1rnkzrrsbnifn3vsb4pfaia3nlvgvw6ndpxp7lzjrh23qcwid34v"))))
2347 (build-system python-build-system)
2348 (propagated-inputs
2349 `(("python-sphinx" ,python-sphinx)))
2350 (home-page "https://github.com/guzzle/guzzle_sphinx_theme")
2351 (synopsis "Sphinx theme used by Guzzle")
2352 (description "This package provides guzzle_sphinx_theme, a theme for the
2353 Sphinx documentation system, used by @uref{http://docs.guzzlephp.org, Guzzle}
2354 and several other projects.")
2355 (license license:expat)))
2356
2357 (define-public python2-guzzle-sphinx-theme
2358 (package-with-python2 python-guzzle-sphinx-theme))
2359
2360 (define-public python-rst.linker
2361 (package
2362 (name "python-rst.linker")
2363 (version "1.10")
2364 (source
2365 (origin
2366 (method url-fetch)
2367 (uri (pypi-uri "rst.linker" version))
2368 (sha256
2369 (base32
2370 "0iqaacp7pj1s8avs4kc0qg0r7dscywaq37y6l9j14glqdikk0wdj"))))
2371 (build-system python-build-system)
2372 (propagated-inputs
2373 `(("python-dateutil" ,python-dateutil)
2374 ("python-six" ,python-six)))
2375 (native-inputs
2376 `(("python-setuptools-scm" ,python-setuptools-scm)))
2377 ;; Test would require path.py, which would introduce a cyclic dependence.
2378 (arguments `(#:tests? #f))
2379 ;; Note: As of version 1.7 the documentation is not worth building.
2380 (home-page "https://github.com/jaraco/rst.linker")
2381 (synopsis "Sphinx plugin to add links and timestamps")
2382 (description "rst.linker allows to automatically replace text by a
2383 reStructuredText external reference or timestamps. It's primary purpose is to
2384 augment the changelog, but it can be used for other documents, too.")
2385 (license license:expat)))
2386
2387 (define-public python2-rst.linker
2388 (package-with-python2 python-rst.linker))
2389
2390 (define-public python-feedgenerator
2391 (package
2392 (name "python-feedgenerator")
2393 (version "1.9")
2394 (source
2395 (origin
2396 (method url-fetch)
2397 (uri (pypi-uri "feedgenerator" version))
2398 (sha256
2399 (base32
2400 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
2401 (modules '((guix build utils)))
2402 (snippet
2403 '(begin
2404 ;; Remove pre-compiled .pyc files from source.
2405 (for-each delete-file-recursively
2406 (find-files "." "__pycache__" #:directories? #t))
2407 (for-each delete-file (find-files "." "\\.pyc$"))
2408 #t))))
2409 (build-system python-build-system)
2410 (propagated-inputs
2411 `(("python-pytz" ,python-pytz)
2412 ("python-six" ,python-six)))
2413 (home-page "https://github.com/getpelican/feedgenerator")
2414 (synopsis
2415 "Standalone version of Django's Atom/RSS feed generator")
2416 (description
2417 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2418 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
2419 (license license:bsd-3)))
2420
2421 (define-public python2-feedgenerator
2422 (package-with-python2 python-feedgenerator))
2423
2424 (define-public python-toml
2425 (package
2426 (name "python-toml")
2427 (version "0.9.4")
2428 (source
2429 (origin
2430 (method url-fetch)
2431 (uri (pypi-uri "toml" version))
2432 (sha256
2433 (base32
2434 "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf"))))
2435 (build-system python-build-system)
2436 (arguments
2437 `(#:tests? #f)) ;no tests suite in release
2438 (home-page "https://github.com/uiri/toml")
2439 (synopsis "Library for TOML")
2440 (description
2441 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
2442 Language (TOML) configuration files.")
2443 (license license:expat)))
2444
2445 (define-public python-black
2446 (package
2447 (name "python-black")
2448 (version "18.6b4")
2449 (source
2450 (origin
2451 (method url-fetch)
2452 (uri (pypi-uri "black" version))
2453 (sha256
2454 (base32
2455 "0i4sfqgz6w15vd50kbhi7g7rifgqlf8yfr8y78rypd56q64qn592"))))
2456 (build-system python-build-system)
2457 (arguments
2458 `(#:phases
2459 (modify-phases %standard-phases
2460 (add-after 'patch-source-shebangs 'patch-extra-shebangs
2461 (lambda _
2462 (let ((python3 (which "python3")))
2463 (substitute* '("tests/data/fmtonoff.py"
2464 "tests/data/string_prefixes.py"
2465 "tests/data/function.py")
2466 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
2467 (string-append "#!" python3 (if (string? minor-version)
2468 minor-version
2469 ""))))))))))
2470 (propagated-inputs
2471 `(("python-click" ,python-click)
2472 ("python-attrs" ,python-attrs)
2473 ("python-appdirs" ,python-appdirs)
2474 ("python-toml" ,python-toml)))
2475 (home-page "https://github.com/ambv/black")
2476 (synopsis "The uncompromising code formatter")
2477 (description "Black is the uncompromising Python code formatter.")
2478 (license license:expat)))
2479
2480 (define-public python-blinker
2481 (package
2482 (name "python-blinker")
2483 (version "1.4")
2484 (source
2485 (origin
2486 (method url-fetch)
2487 (uri (pypi-uri "blinker" version))
2488 (sha256
2489 (base32
2490 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
2491 (build-system python-build-system)
2492 (home-page "http://pythonhosted.org/blinker/")
2493 (synopsis "Fast, simple object-to-object and broadcast signaling")
2494 (description
2495 "Blinker provides a fast dispatching system that allows any number of
2496 interested parties to subscribe to events, or \"signals\".")
2497 (license license:expat)))
2498
2499 (define-public python2-blinker
2500 (package-with-python2 python-blinker))
2501
2502 (define-public pelican
2503 (package
2504 (name "pelican")
2505 (version "3.7.1")
2506 (source
2507 (origin
2508 (method url-fetch)
2509 (uri (pypi-uri "pelican" version))
2510 (sha256
2511 (base32
2512 "12spygavv9b6xpb5pgp7f0p3z0mms60nx6zrpx1yfkj68zz4flra"))))
2513 (build-system python-build-system)
2514 (propagated-inputs
2515 `(("python-feedgenerator" ,python-feedgenerator)
2516 ("python-jinja2" ,python-jinja2)
2517 ("python-pygments" ,python-pygments)
2518 ("python-docutils" ,python-docutils)
2519 ("python-pytz" ,python-pytz)
2520 ("python-blinker" ,python-blinker)
2521 ("python-unidecode" ,python-unidecode)
2522 ("python-six" ,python-six)
2523 ("python-dateutil" ,python-dateutil)
2524 ("python-markdown" ,python-markdown)))
2525 (home-page "https://getpelican.com/")
2526 (arguments
2527 `(;; XXX Requires a lot more packages to do unit tests :P
2528 #:tests? #f
2529 #:phases (modify-phases %standard-phases
2530 (add-before
2531 'install 'adjust-requires
2532 ;; Since feedgenerator is installed from git, it doesn't
2533 ;; conform to the version requirements.
2534 ;;
2535 ;; We *do have* "feedgenerator >= 1.6", but strip off the
2536 ;; version requirement so setuptools doesn't get confused.
2537 (lambda _
2538 (substitute* "setup.py"
2539 (("['\"]feedgenerator.*?['\"]")
2540 "'feedgenerator'")))))))
2541 (synopsis "Python-based static site publishing system")
2542 (description
2543 "Pelican is a tool to generate a static blog from reStructuredText,
2544 Markdown input files, and more. Pelican uses Jinja2 for templating
2545 and is very extensible.")
2546 (license license:agpl3+)))
2547
2548 (define-public python-scikit-image
2549 (package
2550 (name "python-scikit-image")
2551 (version "0.14.1")
2552 (source
2553 (origin
2554 (method url-fetch)
2555 (uri (pypi-uri "scikit-image" version))
2556 (sha256
2557 (base32 "0l1c3rl4s1jyv80i5hns4pgih09zrxfj7lygdc51w8sgyysb7ac6"))))
2558 (build-system python-build-system)
2559 (arguments
2560 ;; TODO: Some tests require running X11 server. Disable them?
2561 '(#:tests? #f))
2562 ;; See DEPENDS.txt for the list of build and run time requiremnts
2563 (propagated-inputs
2564 `(("python-cloudpickle" ,python-cloudpickle)
2565 ("python-dask" ,python-dask)
2566 ("python-matplotlib" ,python-matplotlib)
2567 ("python-networkx" ,python-networkx)
2568 ("python-numpy" ,python-numpy)
2569 ("python-pillow" ,python-pillow)
2570 ("python-pywavelets" ,python-pywavelets)
2571 ("python-scipy" ,python-scipy)
2572 ("python-six" ,python-six)))
2573 (native-inputs
2574 `(("python-cython" ,python-cython)))
2575 (home-page "http://scikit-image.org/")
2576 (synopsis "Image processing in Python")
2577 (description
2578 "Scikit-image is a collection of algorithms for image processing.")
2579 (license license:bsd-3)))
2580
2581 (define-public python2-scikit-image
2582 (package-with-python2 python-scikit-image))
2583
2584 (define-public python-cython
2585 (package
2586 (name "python-cython")
2587 (version "0.28.4")
2588 (source
2589 (origin
2590 (method url-fetch)
2591 (uri (pypi-uri "Cython" version))
2592 (sha256
2593 (base32
2594 "0imw9s2rbrh32clbl10csnwmig9p3nzkrd2baxxxfmnrsc42pb3n"))))
2595 (build-system python-build-system)
2596 ;; we need the full python package and not just the python-wrapper
2597 ;; because we need libpython3.3m.so
2598 (inputs
2599 `(("python" ,python)))
2600 (arguments
2601 `(#:phases
2602 (modify-phases %standard-phases
2603 (add-before 'check 'set-HOME
2604 ;; some tests require access to "$HOME/.cython"
2605 (lambda _ (setenv "HOME" "/tmp") #t))
2606
2607 ;; FIXME: These tests started failing on armhf after the 0.28 update
2608 ;; (commit c69d11c5930), both with an error such as this:
2609 ;; compiling (cpp) and running dictcomp ...
2610 ;; === C/C++ compiler error output: ===
2611 ;; ‘
2612 ;; dictcomp.cpp:5221: confused by earlier errors, bailing out
2613 ;; See <https://hydra.gnu.org/build/2948724> for logs.
2614 ,@(if (target-arm32?)
2615 `((add-before 'check 'disable-failing-tests
2616 (lambda _
2617 (let ((disabled-tests (open-file "tests/bugs.txt" "a")))
2618 (for-each (lambda (test)
2619 (format disabled-tests "~a\n" test))
2620 '("memslice" "dictcomp"))
2621 (close-port disabled-tests)))))
2622 '())
2623
2624 (replace 'check
2625 (lambda _
2626 ;; The "with_outer_raising" test fails with Python 3.7. See
2627 ;; https://github.com/cython/cython/issues/2454
2628 (delete-file "tests/run/generators_py.py")
2629 (invoke "python" "runtests.py" "-vv"))))))
2630 (home-page "http://cython.org/")
2631 (synopsis "C extensions for Python")
2632 (description "Cython is an optimising static compiler for both the Python
2633 programming language and the extended Cython programming language. It makes
2634 writing C extensions for Python as easy as Python itself.")
2635 (license license:asl2.0)
2636 (properties `((python2-variant . ,(delay python2-cython))))))
2637
2638 (define-public python2-cython
2639 (package (inherit (package-with-python2
2640 (strip-python2-variant python-cython)))
2641 (name "python2-cython")
2642 (inputs
2643 `(("python-2" ,python-2))))) ; this is not automatically changed
2644
2645 ;; The RPython toolchain currently does not support Python 3.
2646 (define-public python2-rpython
2647 (package
2648 (name "python2-rpython")
2649 (version "0.2.1")
2650 (source
2651 (origin
2652 (method url-fetch)
2653 (uri (pypi-uri "rpython" version))
2654 (sha256
2655 (base32
2656 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
2657 (build-system python-build-system)
2658 (arguments `(#:python ,python-2))
2659 (native-inputs
2660 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
2661 (home-page "https://rpython.readthedocs.org")
2662 (synopsis "Framework for implementing interpreters and virtual machines")
2663 (description "RPython is a translation and support framework for
2664 producing implementations of dynamic languages, emphasizing a clean separation
2665 between language specification and implementation aspects.")
2666 (license license:expat)))
2667
2668 ;; NOTE: when upgrading numpy please make sure that python-pandas and
2669 ;; python-scipy still build, as these three packages are often used together.
2670 (define-public python-numpy
2671 (package
2672 (name "python-numpy")
2673 (version "1.15.4")
2674 (source
2675 (origin
2676 (method url-fetch)
2677 (uri (string-append
2678 "https://github.com/numpy/numpy/releases/download/v"
2679 version "/numpy-" version ".tar.gz"))
2680 (sha256
2681 (base32
2682 "102vcl2qq4pjbm7a3d67vkkvn4466ngia1d8wi5avqwqh8j0jvkn"))))
2683 (build-system python-build-system)
2684 (inputs
2685 `(("openblas" ,openblas)
2686 ("lapack" ,lapack)))
2687 (native-inputs
2688 `(("python-cython" ,python-cython)
2689 ("python-pytest" ,python-pytest)
2690 ("gfortran" ,gfortran)))
2691 (arguments
2692 `(#:phases
2693 (modify-phases %standard-phases
2694 (add-before 'build 'configure-blas-lapack
2695 (lambda* (#:key inputs #:allow-other-keys)
2696 (call-with-output-file "site.cfg"
2697 (lambda (port)
2698 (format port
2699 "[openblas]
2700 libraries = openblas
2701 library_dirs = ~a/lib
2702 include_dirs = ~a/include
2703
2704 # backslash-n to make emacs happy
2705 \n[lapack]
2706 lapack_libs = lapack
2707 library_dirs = ~a/lib
2708 include_dirs = ~a/include
2709 "
2710 (assoc-ref inputs "openblas")
2711 (assoc-ref inputs "openblas")
2712 (assoc-ref inputs "lapack")
2713 (assoc-ref inputs "lapack"))))
2714 #t))
2715 (add-before 'build 'fix-executable-paths
2716 (lambda* (#:key inputs #:allow-other-keys)
2717 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
2718 ;; instead of /bin/sh.
2719 (substitute* "numpy/distutils/exec_command.py"
2720 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
2721 (string-append match-start (assoc-ref inputs "bash") match-end)))
2722 ;; Use "gcc" executable, not "cc".
2723 (substitute* "numpy/distutils/system_info.py"
2724 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
2725 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
2726 #t))
2727 ;; Tests can only be run after the library has been installed and not
2728 ;; within the source directory.
2729 (delete 'check)
2730 (add-after 'install 'check
2731 (lambda* (#:key outputs inputs #:allow-other-keys)
2732 ;; Make installed package available for running the tests
2733 (add-installed-pythonpath inputs outputs)
2734 ;; Make sure "f2py" etc is found.
2735 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
2736 ":" (getenv "PATH")))
2737 (with-directory-excursion "/tmp"
2738 (invoke "python" "-c"
2739 "import numpy; numpy.test(verbose=2)")))))))
2740 (home-page "http://www.numpy.org/")
2741 (synopsis "Fundamental package for scientific computing with Python")
2742 (description "NumPy is the fundamental package for scientific computing
2743 with Python. It contains among other things: a powerful N-dimensional array
2744 object, sophisticated (broadcasting) functions, tools for integrating C/C++
2745 and Fortran code, useful linear algebra, Fourier transform, and random number
2746 capabilities.")
2747 (license license:bsd-3)))
2748
2749 (define-public python2-numpy
2750 (package-with-python2 python-numpy))
2751
2752 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
2753 ;; interest only for legacy code going back to NumPy's predecessor
2754 ;; Numeric.
2755 (define-public python2-numpy-1.8
2756 (package (inherit python2-numpy)
2757 (version "1.8.2")
2758 (source
2759 (origin
2760 (method url-fetch)
2761 (uri (string-append
2762 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
2763 (file-name (string-append "python2-numpy-" version ".tar.gz"))
2764 (sha256
2765 (base32
2766 "0sc20gz1b17xnyrkp5frca3ql5qfalpv916hfg2kqxpwr6jg0f1g"))))
2767 (arguments
2768 (substitute-keyword-arguments (package-arguments python2-numpy)
2769 ((#:phases phases)
2770 `(modify-phases ,phases
2771 (replace 'configure-blas-lapack
2772 (lambda* (#:key inputs #:allow-other-keys)
2773 (call-with-output-file "site.cfg"
2774 (lambda (port)
2775 (format port
2776 "[openblas]
2777 libraries = openblas,lapack
2778 library_dirs = ~a/lib:~a/lib
2779 include_dirs = ~a/include:~a/include
2780 "
2781 (assoc-ref inputs "openblas")
2782 (assoc-ref inputs "lapack")
2783 (assoc-ref inputs "openblas")
2784 (assoc-ref inputs "lapack"))))
2785 #t))))))
2786 (native-inputs
2787 `(("python2-nose" ,python2-nose)))
2788 (description "NumPy is the fundamental package for scientific computing
2789 with Python. It contains among other things: a powerful N-dimensional array
2790 object, sophisticated (broadcasting) functions, tools for integrating C/C++
2791 and Fortran code, useful linear algebra, Fourier transform, and random number
2792 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
2793 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
2794 Numeric.")
2795 (license license:bsd-3)))
2796
2797 (define-public python-munch
2798 (package
2799 (name "python-munch")
2800 (version "2.0.4")
2801 (source
2802 (origin
2803 (method url-fetch)
2804 (uri (pypi-uri "munch" version))
2805 (sha256
2806 (base32
2807 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
2808 (build-system python-build-system)
2809 (home-page "https://github.com/Infinidat/munch")
2810 (synopsis "Dot-accessible dictionary")
2811 (description "Munch is a dot-accessible dictionary similar to JavaScript
2812 objects.")
2813 (license license:expat)))
2814
2815 (define-public python2-munch
2816 (package-with-python2 python-munch))
2817
2818 (define-public python-colormath
2819 (package
2820 (name "python-colormath")
2821 (version "3.0.0")
2822 (source
2823 (origin
2824 (method url-fetch)
2825 (uri (pypi-uri "colormath" version))
2826 (sha256
2827 (base32
2828 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
2829 (build-system python-build-system)
2830 (propagated-inputs
2831 `(("python-networkx" ,python-networkx)
2832 ("python-numpy" ,python-numpy)))
2833 (home-page "https://github.com/gtaylor/python-colormath")
2834 (synopsis "Color math and conversion library")
2835 (description
2836 "This is a Python library for color math and conversions.")
2837 (license license:bsd-3)))
2838
2839 (define-public python2-colormath
2840 (package-with-python2 python-colormath))
2841
2842 (define-public python-spectra
2843 (package
2844 (name "python-spectra")
2845 (version "0.0.11")
2846 (source
2847 (origin
2848 (method url-fetch)
2849 (uri (pypi-uri "spectra" version))
2850 (sha256
2851 (base32
2852 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
2853 (build-system python-build-system)
2854 (arguments
2855 `(#:phases
2856 (modify-phases %standard-phases
2857 (replace 'check
2858 (lambda _
2859 (zero? (system* "nosetests" "-v")))))))
2860 (propagated-inputs
2861 `(("python-colormath" ,python-colormath)))
2862 (native-inputs
2863 `(("python-nose" ,python-nose)))
2864 (home-page "https://github.com/jsvine/spectra")
2865 (synopsis "Color scales and color conversion")
2866 (description
2867 "This package provides a Python library intended to make color math,
2868 color scales, and color space conversion easy. It has support for:
2869
2870 @enumerate
2871 @item Color scales
2872 @item Color ranges
2873 @item Color blending
2874 @item Brightening/darkening colors
2875 @item Saturating/desaturating colors
2876 @item Conversion to/from multiple color spaces.
2877 @end enumerate\n")
2878 (license license:expat)))
2879
2880 (define-public python2-spectra
2881 (package-with-python2 python-spectra))
2882
2883 (define-public python-numpy-documentation
2884 (package
2885 (name "python-numpy-documentation")
2886 (version (package-version python-numpy))
2887 (source (package-source python-numpy))
2888 (build-system python-build-system)
2889 (native-inputs
2890 `(("python-matplotlib" ,python-matplotlib)
2891 ("python-numpy" ,python-numpy)
2892 ("pkg-config" ,pkg-config)
2893 ("python-sphinx" ,python-sphinx)
2894 ("python-numpydoc" ,python-numpydoc)
2895 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
2896 texlive-fonts-cm-super
2897 texlive-fonts-ec
2898 texlive-generic-ifxetex
2899 texlive-generic-pdftex
2900 texlive-latex-amsfonts
2901 texlive-latex-capt-of
2902 texlive-latex-cmap
2903 texlive-latex-environ
2904 texlive-latex-eqparbox
2905 texlive-latex-etoolbox
2906 texlive-latex-expdlist
2907 texlive-latex-fancyhdr
2908 texlive-latex-fancyvrb
2909 texlive-latex-fncychap
2910 texlive-latex-float
2911 texlive-latex-framed
2912 texlive-latex-geometry
2913 texlive-latex-graphics
2914 texlive-latex-hyperref
2915 texlive-latex-mdwtools
2916 texlive-latex-multirow
2917 texlive-latex-needspace
2918 texlive-latex-oberdiek
2919 texlive-latex-parskip
2920 texlive-latex-preview
2921 texlive-latex-tabulary
2922 texlive-latex-threeparttable
2923 texlive-latex-titlesec
2924 texlive-latex-trimspaces
2925 texlive-latex-ucs
2926 texlive-latex-upquote
2927 texlive-latex-url
2928 texlive-latex-varwidth
2929 texlive-latex-wrapfig)))
2930 ("texinfo" ,texinfo)
2931 ("perl" ,perl)
2932 ("scipy-sphinx-theme"
2933 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
2934 (method git-fetch)
2935 (uri (git-reference
2936 (url "https://github.com/scipy/scipy-sphinx-theme.git")
2937 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
2938 (sha256
2939 (base32
2940 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
2941 ,@(package-native-inputs python-numpy)))
2942 (arguments
2943 `(#:tests? #f ; we're only generating the documentation
2944 #:phases
2945 (modify-phases %standard-phases
2946 (delete 'build)
2947 (replace 'install
2948 (lambda* (#:key inputs outputs #:allow-other-keys)
2949 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
2950 (doc (string-append
2951 data "/doc/" ,name "-"
2952 ,(package-version python-numpy)))
2953 (info-reader (string-append data "/info"))
2954 (html (string-append doc "/html"))
2955 (scipy-sphinx-theme "scipy-sphinx-theme")
2956 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
2957 (pyver ,(string-append "PYVER=")))
2958
2959 ;; FIXME: this is needed to for texlive-union to generate
2960 ;; fonts, which are not found.
2961 (setenv "HOME" "/tmp")
2962
2963 (with-directory-excursion "doc"
2964 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
2965 (mkdir-p html)
2966 (system* "make" "html" pyver)
2967 (system* "make" "latex" "PAPER=a4" pyver)
2968 (system* "make" "-C" "build/latex"
2969 "all-pdf" "PAPER=a4" pyver)
2970 ;; FIXME: Generation of the info file fails.
2971 ;; (system* "make" "info" pyver)
2972 ;; (mkdir-p info)
2973 ;; (copy-file "build/texinfo/numpy.info"
2974 ;; (string-append info "/numpy.info"))
2975 (for-each (lambda (file)
2976 (copy-file (string-append "build/latex" file)
2977 (string-append doc file)))
2978 '("/numpy-ref.pdf" "/numpy-user.pdf"))
2979 (with-directory-excursion "build/html"
2980 (for-each (lambda (file)
2981 (let* ((dir (dirname file))
2982 (tgt-dir (string-append html "/" dir)))
2983 (unless (equal? "." dir)
2984 (mkdir-p tgt-dir))
2985 (install-file file html)))
2986 (find-files "." ".*")))))
2987 #t)))))
2988 (home-page (package-home-page python-numpy))
2989 (synopsis "Documentation for the python-numpy package")
2990 (description (package-description python-numpy))
2991 (license (package-license python-numpy))))
2992
2993 (define-public python2-numpy-documentation
2994 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
2995 (package
2996 (inherit numpy-documentation)
2997 (native-inputs `(("python2-functools32" ,python2-functools32)
2998 ,@(package-native-inputs numpy-documentation))))))
2999
3000 (define-public python-pygit2
3001 (package
3002 (name "python-pygit2")
3003 (version "0.27.3")
3004 (source
3005 (origin
3006 (method url-fetch)
3007 (uri (pypi-uri "pygit2" version))
3008 (sha256
3009 (base32
3010 "046ahvsb7a20sgvscqfm3cb32sp3sii4gim9vz7zzrkf7yz16xlv"))))
3011 (build-system python-build-system)
3012 (arguments
3013 '(#:phases
3014 (modify-phases %standard-phases
3015 ;; Remove after the next update. See:
3016 ;; https://github.com/libgit2/pygit2/pull/851
3017 (add-after 'unpack 'compile-with-cffi
3018 (lambda _
3019 (substitute* "setup.py"
3020 (("install_requires")
3021 "setup_requires=['cffi'],\n install_requires"))
3022 #t))
3023 (add-after 'unpack 'fix-dependency-versioning
3024 (lambda _
3025 (substitute* "setup.py"
3026 (("<") "<="))
3027 #t)))))
3028 (propagated-inputs
3029 `(("python-six" ,python-six)
3030 ("python-cffi" ,python-cffi)
3031 ("libgit2" ,libgit2)
3032 ("python-tox" ,python-tox)))
3033 (native-inputs
3034 `(("python-pytest" ,python-pytest)))
3035 (home-page "https://github.com/libgit2/pygit2")
3036 (synopsis "Python bindings for libgit2")
3037 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3038 library, libgit2 implements Git plumbing.")
3039 ;; GPL2.0 only, with linking exception.
3040 (license license:gpl2)))
3041
3042 (define-public python2-pygit2
3043 (package-with-python2 python-pygit2))
3044
3045 (define-public python-pyparsing
3046 (package
3047 (name "python-pyparsing")
3048 (version "2.2.1")
3049 (source
3050 (origin
3051 (method url-fetch)
3052 (uri (pypi-uri "pyparsing" version))
3053 (sha256
3054 (base32 "06dgd0iilvf8m0ssmfpcbh8l6jf0zkp8adbb84llksg17crfx4zl"))))
3055 (build-system python-build-system)
3056 (outputs '("out" "doc"))
3057 (arguments
3058 `(#:tests? #f ; no test target
3059 #:phases
3060 (modify-phases %standard-phases
3061 (add-after 'install 'install-doc
3062 (lambda* (#:key outputs #:allow-other-keys)
3063 (let* ((doc (string-append (assoc-ref outputs "doc")
3064 "/share/doc/" ,name "-" ,version))
3065 (html-doc (string-append doc "/html"))
3066 (examples (string-append doc "/examples")))
3067 (mkdir-p html-doc)
3068 (mkdir-p examples)
3069 (for-each
3070 (lambda (dir tgt)
3071 (map (lambda (file)
3072 (install-file file tgt))
3073 (find-files dir ".*")))
3074 (list "docs" "htmldoc" "examples")
3075 (list doc html-doc examples))
3076 #t))))))
3077 (home-page "https://github.com/pyparsing/pyparsing")
3078 (synopsis "Python parsing class library")
3079 (description
3080 "The pyparsing module is an alternative approach to creating and
3081 executing simple grammars, vs. the traditional lex/yacc approach, or the use
3082 of regular expressions. The pyparsing module provides a library of classes
3083 that client code uses to construct the grammar directly in Python code.")
3084 (license license:expat)))
3085
3086 (define-public python2-pyparsing
3087 (package-with-python2 python-pyparsing))
3088
3089 (define-public python-numpydoc
3090 (package
3091 (name "python-numpydoc")
3092 (version "0.8.0")
3093 (source
3094 (origin
3095 (method url-fetch)
3096 (uri (pypi-uri "numpydoc" version))
3097 (sha256
3098 (base32
3099 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
3100 (build-system python-build-system)
3101 (propagated-inputs
3102 `(("python-sphinx" ,python-sphinx)))
3103 (native-inputs
3104 `(("python-nose" ,python-nose)))
3105 (home-page "https://pypi.python.org/pypi/numpydoc")
3106 (synopsis
3107 "Numpy's Sphinx extensions")
3108 (description
3109 "Sphinx extension to support docstrings in Numpy format.")
3110 (license license:bsd-2)))
3111
3112 (define-public python2-numpydoc
3113 (package-with-python2 python-numpydoc))
3114
3115 (define-public python-numexpr
3116 (package
3117 (name "python-numexpr")
3118 (version "2.6.5")
3119 (source
3120 (origin
3121 (method url-fetch)
3122 (uri (pypi-uri "numexpr" version))
3123 (sha256
3124 (base32
3125 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3126 (build-system python-build-system)
3127 (arguments `(#:tests? #f)) ; no tests included
3128 (propagated-inputs
3129 `(("python-numpy" ,python-numpy)))
3130 (home-page "https://github.com/pydata/numexpr")
3131 (synopsis "Fast numerical expression evaluator for NumPy")
3132 (description
3133 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3134 expressions that operate on arrays are accelerated and use less memory than
3135 doing the same calculation in Python. In addition, its multi-threaded
3136 capabilities can make use of all your cores, which may accelerate
3137 computations, most specially if they are not memory-bounded (e.g. those using
3138 transcendental functions).")
3139 (license license:expat)))
3140
3141 (define-public python2-numexpr
3142 (package-with-python2 python-numexpr))
3143
3144 (define-public python-cycler
3145 (package
3146 (name "python-cycler")
3147 (version "0.10.0")
3148 (source (origin
3149 (method url-fetch)
3150 (uri (pypi-uri "cycler" version))
3151 (sha256
3152 (base32
3153 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3154 (build-system python-build-system)
3155 (arguments
3156 ;; XXX: The current version requires 'coveralls' which we don't have.
3157 ;; Enable this for the next release which uses 'python-pytest'.
3158 '(#:tests? #f))
3159 (propagated-inputs
3160 `(("python-six" ,python-six)))
3161 (home-page "http://matplotlib.org/cycler/")
3162 (synopsis "Composable keyword argument iterator")
3163 (description
3164 "When using @code{matplotlib} and plotting more than one line, it is
3165 common to want to be able to want to be able to cycle over one or more artist
3166 styles; but the plotting logic can quickly become involved.
3167 To address this and enable easy cycling over arbitrary @code{kwargs}, the
3168 @code{Cycler} class was developed.")
3169 (license license:bsd-3)))
3170
3171 (define-public python2-cycler
3172 (package-with-python2 python-cycler))
3173
3174 (define-public python-colorspacious
3175 (package
3176 (name "python-colorspacious")
3177 (version "1.1.0")
3178 (source
3179 (origin
3180 (method url-fetch)
3181 (uri (string-append "https://github.com/njsmith/colorspacious/archive/v"
3182 version ".tar.gz"))
3183 (file-name (string-append name "-" version))
3184 (sha256
3185 (base32 "1vflh5jm32qb0skza2i8pjacv09w6gq84fqpp2nj77s0rbmzgr4k"))))
3186 (build-system python-build-system)
3187 (propagated-inputs
3188 `(("python-numpy" ,python-numpy)))
3189 (native-inputs
3190 `(("python-nose" ,python-nose)))
3191 (arguments
3192 `(#:phases
3193 (modify-phases %standard-phases
3194 (replace 'check
3195 (lambda _
3196 (zero? (system* "nosetests" "--all-modules" "-v" "colorspacious")))))))
3197 (home-page "https://github.com/njsmith/colorspacious")
3198 (synopsis "Python library for colorspace conversions")
3199 (description "@code{colorspacious} is a Python library that lets you
3200 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3201 (license license:expat)))
3202
3203 (define-public python2-colorspacious
3204 (package-with-python2 python-colorspacious))
3205
3206 (define-public python-matplotlib
3207 (package
3208 (name "python-matplotlib")
3209 (version "2.2.3")
3210 (source
3211 (origin
3212 (method url-fetch)
3213 (uri (pypi-uri "matplotlib" version))
3214 (sha256
3215 (base32
3216 "1rcc7x9ig3hpchkc4cwdvym3y451w74275fxr455zkfagrsvymbk"))))
3217 (build-system python-build-system)
3218 (propagated-inputs ; the following packages are all needed at run time
3219 `(("python-cycler" ,python-cycler)
3220 ("python-kiwisolver" ,python-kiwisolver)
3221 ("python-pyparsing" ,python-pyparsing)
3222 ("python-pygobject" ,python-pygobject)
3223 ("gobject-introspection" ,gobject-introspection)
3224 ("python-tkinter" ,python "tk")
3225 ("python-dateutil" ,python-dateutil)
3226 ("python-numpy" ,python-numpy)
3227 ("python-pillow" ,python-pillow)
3228 ("python-pytz" ,python-pytz)
3229 ("python-six" ,python-six)
3230 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3231 ;; from 'gtk+') provides the required 'typelib' files used by
3232 ;; 'gobject-introspection'. The location of these files is set with the
3233 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3234 ;; is done automatically by a 'native-search-path' procedure. However,
3235 ;; at run-time the user must set this variable as follows:
3236 ;;
3237 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
3238 ("gtk+" ,gtk+)
3239 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3240 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3241 ;; object. For this reason we need to import both libraries.
3242 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3243 ("python-pycairo" ,python-pycairo)
3244 ;; XXX: qtwebkit cannot be built reliably.
3245 ("python-pyqt" ,python-pyqt-without-qtwebkit)
3246 ("python-cairocffi" ,python-cairocffi)))
3247 (inputs
3248 `(("libpng" ,libpng)
3249 ("imagemagick" ,imagemagick)
3250 ("freetype" ,freetype)
3251 ("cairo" ,cairo)
3252 ("glib" ,glib)
3253 ;; FIXME: Add backends when available.
3254 ;("python-wxpython" ,python-wxpython)
3255 ("tcl" ,tcl)
3256 ("tk" ,tk)))
3257 (native-inputs
3258 `(("pkg-config" ,pkg-config)
3259 ("python-nose" ,python-nose)
3260 ("python-mock" ,python-mock)))
3261 (arguments
3262 `(#:phases
3263 (modify-phases %standard-phases
3264 (add-before 'build 'configure-environment
3265 (lambda* (#:key outputs inputs #:allow-other-keys)
3266 (let ((cairo (assoc-ref inputs "cairo"))
3267 (gtk+ (assoc-ref inputs "gtk+")))
3268 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3269 ;; has not effect.
3270 (setenv "LD_LIBRARY_PATH"
3271 (string-append cairo "/lib:" gtk+ "/lib"))
3272 (setenv "HOME" (getcwd))
3273 (call-with-output-file "setup.cfg"
3274 (lambda (port)
3275 (format port "[directories]~%
3276 basedirlist = ~a,~a~%
3277 [rc_options]~%
3278 backend = TkAgg~%"
3279 (assoc-ref inputs "tcl")
3280 (assoc-ref inputs "tk")))))
3281 #t)))))
3282 (home-page "http://matplotlib.org")
3283 (synopsis "2D plotting library for Python")
3284 (description
3285 "Matplotlib is a Python 2D plotting library which produces publication
3286 quality figures in a variety of hardcopy formats and interactive environments
3287 across platforms. Matplotlib can be used in Python scripts, the python and
3288 ipython shell, web application servers, and six graphical user interface
3289 toolkits.")
3290 (license license:psfl)
3291 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3292
3293 (define-public python2-matplotlib
3294 (let ((matplotlib (package-with-python2
3295 (strip-python2-variant python-matplotlib))))
3296 (package (inherit matplotlib)
3297 ;; Make sure to use special packages for Python 2 instead
3298 ;; of those automatically rewritten by package-with-python2.
3299 (propagated-inputs
3300 `(("python2-pycairo" ,python2-pycairo)
3301 ("python2-backports-functools-lru-cache"
3302 ,python2-backports-functools-lru-cache)
3303 ("python2-functools32" ,python2-functools32)
3304 ("python2-pygobject-2" ,python2-pygobject-2)
3305 ("python2-subprocess32" ,python2-subprocess32)
3306 ("python2-tkinter" ,python-2 "tk")
3307 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3308 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
3309
3310 (define-public python-matplotlib-documentation
3311 (package
3312 (name "python-matplotlib-documentation")
3313 (version (package-version python-matplotlib))
3314 (source (package-source python-matplotlib))
3315 (build-system python-build-system)
3316 (native-inputs
3317 `(("python-matplotlib" ,python-matplotlib)
3318 ("python-colorspacious" ,python-colorspacious)
3319 ("python-sphinx" ,python-sphinx)
3320 ("python-sphinx-gallery" ,python-sphinx-gallery)
3321 ("python-numpydoc" ,python-numpydoc)
3322 ("python-ipython" ,python-ipython)
3323 ("python-mock" ,python-mock)
3324 ("graphviz" ,graphviz)
3325 ("texlive" ,texlive)
3326 ("texinfo" ,texinfo)
3327 ,@(package-native-inputs python-matplotlib)))
3328 (arguments
3329 `(#:tests? #f ; we're only generating documentation
3330 #:phases
3331 (modify-phases %standard-phases
3332 (replace 'build
3333 (lambda _
3334 (chdir "doc")
3335 ;; Produce pdf in 'A4' format.
3336 (substitute* "conf.py"
3337 (("latex_paper_size = 'letter'") "")
3338 ;; latex_paper_size is deprecated -> set paper size using
3339 ;; latex_elements
3340 (("latex_elements\\['pointsize'\\] = '11pt'" match)
3341 ;; insert at a point where latex_elements{} is defined:
3342 (string-append match "\nlatex_elements['papersize'] = 'a4paper'")))
3343 (invoke "make" "SPHINXBUILD=sphinx-build" "html" "latex" "texinfo")))
3344 (replace 'install
3345 (lambda* (#:key inputs outputs #:allow-other-keys)
3346 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3347 (doc (string-append data "/doc/python-matplotlib-" ,version))
3348 (info (string-append data "/info"))
3349 (html (string-append doc "/html")))
3350 (mkdir-p html)
3351 (mkdir-p info)
3352 (copy-recursively "build/html" html)
3353 (symlink (string-append html "/_images")
3354 (string-append info "/matplotlib-figures"))
3355 (with-directory-excursion "build/texinfo"
3356 (substitute* "matplotlib.texi"
3357 (("@image\\{([^,]*)" all file)
3358 (string-append "@image{matplotlib-figures/" file)))
3359 (symlink (string-append html "/_images")
3360 "./matplotlib-figures")
3361 (system* "makeinfo" "--no-split"
3362 "-o" "matplotlib.info" "matplotlib.texi"))
3363 (copy-file "build/texinfo/matplotlib.info"
3364 (string-append info "/matplotlib.info"))
3365 (copy-file "build/latex/Matplotlib.pdf"
3366 (string-append doc "/Matplotlib.pdf")))
3367 #t)))))
3368 (home-page (package-home-page python-matplotlib))
3369 (synopsis "Documentation for the python-matplotlib package")
3370 (description (package-description python-matplotlib))
3371 (license (package-license python-matplotlib))))
3372
3373 (define-public python2-matplotlib-documentation
3374 (package-with-python2 python-matplotlib-documentation))
3375
3376 (define-public python2-pysnptools
3377 (package
3378 (name "python2-pysnptools")
3379 (version "0.3.9")
3380 (source
3381 (origin
3382 (method url-fetch)
3383 (uri (pypi-uri "pysnptools" version ".zip"))
3384 (sha256
3385 (base32
3386 "1wybggjzz8zw7aav4pjsg2h22xp17a1lghrprza1pxwlm7wf96y2"))))
3387 (build-system python-build-system)
3388 (arguments
3389 `(#:python ,python-2)) ; only Python 2.7 is supported
3390 (propagated-inputs
3391 `(("python2-numpy" ,python2-numpy)
3392 ("python2-scipy" ,python2-scipy)
3393 ("python2-pandas" ,python2-pandas)))
3394 (native-inputs
3395 `(("python2-cython" ,python2-cython)))
3396 (native-inputs
3397 `(("unzip" ,unzip)))
3398 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
3399 (synopsis "Library for reading and manipulating genetic data")
3400 (description
3401 "PySnpTools is a library for reading and manipulating genetic data. It
3402 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
3403 those files. It can also efficiently manipulate ranges of integers using set
3404 operators such as union, intersection, and difference.")
3405 (license license:asl2.0)))
3406
3407 (define-public python-scipy
3408 (package
3409 (name "python-scipy")
3410 (version "1.1.0")
3411 (source
3412 (origin
3413 (method url-fetch)
3414 (uri (pypi-uri "scipy" version))
3415 (sha256
3416 (base32
3417 "1lfg686w6vv2m2dfs8v9d0bf2i18z7wz5vgzjnkgmpr4hi0550w7"))))
3418 (build-system python-build-system)
3419 (propagated-inputs
3420 `(("python-numpy" ,python-numpy)
3421 ("python-matplotlib" ,python-matplotlib)
3422 ("python-pyparsing" ,python-pyparsing)))
3423 (inputs
3424 `(("lapack" ,lapack)
3425 ("openblas" ,openblas)))
3426 (native-inputs
3427 `(("python-cython" ,python-cython)
3428 ("python-pytest" ,python-pytest)
3429 ("python-sphinx" ,python-sphinx)
3430 ("python-numpydoc" ,python-numpydoc)
3431 ("gfortran" ,gfortran)
3432 ("perl" ,perl)
3433 ("which" ,which)))
3434 (outputs '("out" "doc"))
3435 (arguments
3436 `(#:phases
3437 (modify-phases %standard-phases
3438 (add-after 'unpack 'disable-broken-tests
3439 (lambda _
3440 (substitute* "scipy/sparse/linalg/dsolve/tests/test_linsolve.py"
3441 (("^( +)def test_threads_parallel\\(self\\):" m indent)
3442 (string-append indent
3443 "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
3444 m)))
3445 (substitute* "scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py"
3446 (("^def test_parallel_threads\\(\\):" m)
3447 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
3448 m)))
3449 #t))
3450 (add-before 'build 'configure-openblas
3451 (lambda* (#:key inputs #:allow-other-keys)
3452 (call-with-output-file "site.cfg"
3453 (lambda (port)
3454 (format port
3455 "[blas]
3456 libraries = openblas
3457 library_dirs = ~a/lib
3458 include_dirs = ~a/include
3459
3460 # backslash-n to make emacs happy
3461 \n[atlas]
3462 library_dirs = ~a/lib
3463 atlas_libs = openblas
3464 "
3465 (assoc-ref inputs "openblas")
3466 (assoc-ref inputs "openblas")
3467 (assoc-ref inputs "openblas"))))
3468 #t))
3469 (add-after 'install 'install-doc
3470 (lambda* (#:key inputs outputs #:allow-other-keys)
3471 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3472 (doc (string-append data "/doc/" ,name "-" ,version))
3473 (html (string-append doc "/html"))
3474 (pyver ,(string-append "PYVER=" (version-major+minor
3475 (package-version python))))
3476 ;; By default it tries to run sphinx-build through the Python
3477 ;; interpreter which won't work with our shell wrapper.
3478 (sphinxbuild "SPHINXBUILD=LANG=C sphinx-build"))
3479 ;; Make installed package available for building the
3480 ;; documentation
3481 (add-installed-pythonpath inputs outputs)
3482 (with-directory-excursion "doc"
3483 ;; Fix generation of images for mathematical expressions.
3484 (substitute* (find-files "source" "conf\\.py")
3485 (("pngmath_use_preview = True")
3486 "pngmath_use_preview = False"))
3487 (mkdir-p html)
3488 (invoke "make" "html" pyver sphinxbuild)
3489 (with-directory-excursion "build/html"
3490 (for-each (lambda (file)
3491 (let* ((dir (dirname file))
3492 (tgt-dir (string-append html "/" dir)))
3493 (install-file file html)))
3494 (find-files "." ".*")))))
3495 #t))
3496 ;; Tests can only be run after the library has been installed and not
3497 ;; within the source directory.
3498 (delete 'check)
3499 (add-after 'install 'check
3500 (lambda* (#:key inputs outputs #:allow-other-keys)
3501 (add-installed-pythonpath inputs outputs)
3502 (with-directory-excursion "/tmp"
3503 (invoke "python" "-c"
3504 "import scipy; scipy.test(verbose=2)")))))))
3505 (home-page "https://www.scipy.org/")
3506 (synopsis "The Scipy library provides efficient numerical routines")
3507 (description "The SciPy library is one of the core packages that make up
3508 the SciPy stack. It provides many user-friendly and efficient numerical
3509 routines such as routines for numerical integration and optimization.")
3510 (properties `((python2-variant . ,(delay python2-scipy))))
3511 (license license:bsd-3)))
3512
3513 (define-public python2-scipy
3514 (package-with-python2
3515 (strip-python2-variant python-scipy)))
3516
3517 (define-public python-socksipy-branch
3518 (package
3519 (name "python-socksipy-branch")
3520 (version "1.01")
3521 (source
3522 (origin
3523 (method url-fetch)
3524 (uri (pypi-uri "SocksiPy-branch" version))
3525 (sha256
3526 (base32
3527 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
3528 (build-system python-build-system)
3529 (arguments
3530 `(#:tests? #f)) ; There are no tests
3531 (home-page "https://code.google.com/archive/p/socksipy-branch/")
3532 (synopsis "Python SOCKS module")
3533 (description
3534 "SocksiPy - A Python SOCKS client module. It provides a
3535 socket-like interface that supports connections to any TCP
3536 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
3537 The original version was developed by Dan Haim, this is a
3538 branch created by Mario Vilas to address some open issues,
3539 as the original project seems to have been abandoned circa 2007.")
3540 (license license:bsd-3)))
3541
3542 (define-public python2-socksipy-branch
3543 (package-with-python2 python-socksipy-branch))
3544
3545 (define-public python-pycodestyle
3546 (package
3547 (name "python-pycodestyle")
3548 (version "2.4.0")
3549 (source
3550 (origin
3551 (method url-fetch)
3552 (uri (pypi-uri "pycodestyle" version))
3553 (sha256
3554 (base32
3555 "0fhy4vnlgpjq4qd1wdnl6pvdw7rah0ypmn8c9mkhz8clsndskz6b"))))
3556 (build-system python-build-system)
3557 (home-page "https://pycodestyle.readthedocs.io/")
3558 (synopsis "Python style guide checker")
3559 (description "@code{pycodestyle} (formerly pep8) is a tool to check
3560 Python code against some of the style conventions in
3561 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
3562 (license license:expat)))
3563
3564 (define-public python2-pycodestyle
3565 (package-with-python2 python-pycodestyle))
3566
3567 (define-public python-multidict
3568 (package
3569 (name "python-multidict")
3570 (version "4.2.0")
3571 (source
3572 (origin
3573 (method url-fetch)
3574 (uri (pypi-uri "multidict" version))
3575 (sha256
3576 (base32
3577 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
3578 (build-system python-build-system)
3579 (native-inputs
3580 `(("python-pytest" ,python-pytest)
3581 ("python-pytest-runner" ,python-pytest-runner)))
3582 (home-page "https://github.com/aio-libs/multidict/")
3583 (synopsis "Multidict implementation")
3584 (description "Multidict is dict-like collection of key-value pairs
3585 where key might be occurred more than once in the container.")
3586 (license license:asl2.0)))
3587
3588 (define-public python-orderedmultidict
3589 (package
3590 (name "python-orderedmultidict")
3591 (version "0.7.11")
3592 (source
3593 (origin
3594 (method url-fetch)
3595 (uri (pypi-uri "orderedmultidict" version))
3596 (sha256
3597 (base32
3598 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
3599 (build-system python-build-system)
3600 (arguments
3601 `(#:phases
3602 (modify-phases %standard-phases
3603 (add-after 'unpack 'fix-tests
3604 (lambda _
3605 ;; The package uses nosetest for running the tests.
3606 ;; Adding this initfile allows to run the test suite
3607 ;; without requiring nosetest.
3608 (zero? (system* "touch" "tests/__init__.py")))))))
3609 (propagated-inputs
3610 `(("python-six" ,python-six)))
3611 (native-inputs
3612 `(("python-pycodestyle" ,python-pycodestyle)))
3613 (home-page "https://github.com/gruns/orderedmultidict")
3614 (synopsis "Python Ordered Multivalue Dictionary - omdict")
3615 (description "This package contains a library for ordered multivalue
3616 dictionaries. A multivalue dictionary is a dictionary that can store
3617 multiple values for the same key. An ordered multivalue dictionary is a
3618 multivalue dictionary that retains the order of insertions and deletions.")
3619 (license license:unlicense)))
3620
3621 (define-public python2-orderedmultidict
3622 (package-with-python2 python-orderedmultidict))
3623
3624 (define-public python-autopep8
3625 (package
3626 (name "python-autopep8")
3627 (version "1.3.5")
3628 (source
3629 (origin
3630 (method url-fetch)
3631 (uri (pypi-uri "autopep8" version))
3632 (sha256
3633 (base32
3634 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
3635 (build-system python-build-system)
3636 (propagated-inputs
3637 `(("python-pycodestyle" ,python-pycodestyle)))
3638 (home-page "https://github.com/hhatto/autopep8")
3639 (synopsis "Format Python code according to the PEP 8 style guide")
3640 (description
3641 "@code{autopep8} automatically formats Python code to conform to
3642 the PEP 8 style guide. It uses the pycodestyle utility to determine
3643 what parts of the code needs to be formatted. @code{autopep8} is
3644 capable of fixing most of the formatting issues that can be reported
3645 by pycodestyle.")
3646 (license (license:non-copyleft
3647 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
3648
3649 (define-public python2-autopep8
3650 (package-with-python2 python-autopep8))
3651
3652 (define-public python-distutils-extra
3653 (package
3654 (name "python-distutils-extra")
3655 (version "2.38")
3656 (source
3657 (origin
3658 (method url-fetch)
3659 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
3660 version "/+download/python-distutils-extra-"
3661 version ".tar.gz"))
3662 (sha256
3663 (base32
3664 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
3665 (build-system python-build-system)
3666 (home-page "https://launchpad.net/python-distutils-extra/")
3667 (synopsis "Enhancements to Python's distutils")
3668 (description
3669 "The python-distutils-extra module enables you to easily integrate
3670 gettext support, themed icons, and scrollkeeper-based documentation into
3671 Python's distutils.")
3672 (license license:gpl2)))
3673
3674 (define-public python2-distutils-extra
3675 (package-with-python2 python-distutils-extra))
3676
3677 (define-public python2-elib.intl
3678 (package
3679 (name "python2-elib.intl")
3680 (version "0.0.3")
3681 (source
3682 (origin
3683 ;; This project doesn't tag releases or publish tarballs, so we take
3684 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
3685 (method git-fetch)
3686 (uri (git-reference
3687 (url "https://github.com/dieterv/elib.intl.git")
3688 (commit "d09997cfef")))
3689 (file-name (string-append name "-" version "-checkout"))
3690 (sha256
3691 (base32
3692 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
3693 (build-system python-build-system)
3694 (arguments
3695 ;; incompatible with Python 3 (exception syntax)
3696 `(#:python ,python-2
3697 #:tests? #f))
3698 (home-page "https://github.com/dieterv/elib.intl")
3699 (synopsis "Enhanced internationalization for Python")
3700 (description
3701 "The elib.intl module provides enhanced internationalization (I18N)
3702 services for your Python modules and applications.")
3703 (license license:lgpl3+)))
3704
3705 (define-public python-olefile
3706 (package
3707 (name "python-olefile")
3708 (version "0.45.1")
3709 (source
3710 (origin
3711 (method url-fetch)
3712 (uri (string-append "https://github.com/decalage2/olefile/archive/v"
3713 version ".tar.gz"))
3714 (file-name (string-append name "-" version ".tar.gz"))
3715 (sha256
3716 (base32
3717 "18ai19zwagm6nli14k8bii31ipbab2rp7plrvsm6gmfql551a8ai"))))
3718 (build-system python-build-system)
3719 (home-page
3720 "https://www.decalage.info/python/olefileio")
3721 (synopsis "Read and write Microsoft OLE2 files.")
3722 (description
3723 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
3724 Storage or Compound Document, Microsoft Office). It is an improved version of
3725 the OleFileIO module from PIL, the Python Image Library.")
3726 (license license:bsd-3)))
3727
3728 (define-public python2-olefile
3729 (package-with-python2 python-olefile))
3730
3731 (define-public python-pillow
3732 (package
3733 (name "python-pillow")
3734 (version "5.4.1")
3735 (source
3736 (origin
3737 (method url-fetch)
3738 (uri (pypi-uri "Pillow" version))
3739 (sha256
3740 (base32
3741 "17waygkhhzjd75kajlfw9v57mbb41lcpg6cvkdijqd7smm76ccsj"))))
3742 (build-system python-build-system)
3743 (native-inputs
3744 `(("python-pytest" ,python-pytest)))
3745 (inputs
3746 `(("freetype" ,freetype)
3747 ("lcms" ,lcms)
3748 ("zlib" ,zlib)
3749 ("libjpeg" ,libjpeg)
3750 ("openjpeg" ,openjpeg)
3751 ("libtiff" ,libtiff)
3752 ("libwebp" ,libwebp)))
3753 (propagated-inputs
3754 `(("python-olefile" ,python-olefile)))
3755 (arguments
3756 `(#:phases
3757 (modify-phases %standard-phases
3758 (add-after 'unpack 'patch-ldconfig
3759 (lambda _
3760 (substitute* "setup.py"
3761 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
3762 (delete 'check) ; We must run checks after python-pillow is installed.
3763 (add-after 'install 'check-installed
3764 (lambda* (#:key outputs inputs #:allow-other-keys)
3765 (begin
3766 (setenv "HOME" (getcwd))
3767 ;; Make installed package available for running the tests.
3768 (add-installed-pythonpath inputs outputs)
3769 (invoke "python" "selftest.py" "--installed")
3770 (invoke "python" "-m" "pytest" "-vv")))))))
3771 (home-page "https://python-pillow.org")
3772 (synopsis "Fork of the Python Imaging Library")
3773 (description
3774 "The Python Imaging Library adds image processing capabilities to your
3775 Python interpreter. This library provides extensive file format support, an
3776 efficient internal representation, and fairly powerful image processing
3777 capabilities. The core image library is designed for fast access to data
3778 stored in a few basic pixel formats. It should provide a solid foundation for
3779 a general image processing tool.")
3780 (license (license:x11-style
3781 "http://www.pythonware.com/products/pil/license.htm"
3782 "The PIL Software License"))))
3783
3784 (define-public python2-pillow
3785 (package-with-python2 python-pillow))
3786
3787 (define-public python-pycparser
3788 (package
3789 (name "python-pycparser")
3790 (version "2.18")
3791 (source
3792 (origin
3793 (method url-fetch)
3794 (uri (pypi-uri "pycparser" version))
3795 (sha256
3796 (base32
3797 "09mjyw82ibqzl449g7swy8bfxnfpmas0815d2rkdjlcqw81wma4r"))))
3798 (outputs '("out" "doc"))
3799 (build-system python-build-system)
3800 (native-inputs
3801 `(("pkg-config" ,pkg-config)))
3802 (arguments
3803 `(#:phases
3804 (modify-phases %standard-phases
3805 (replace 'check
3806 (lambda _
3807 (with-directory-excursion "tests"
3808 (zero? (system* "python" "all_tests.py")))))
3809 (add-after 'install 'install-doc
3810 (lambda* (#:key outputs #:allow-other-keys)
3811 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3812 (doc (string-append data "/doc/" ,name "-" ,version))
3813 (examples (string-append doc "/examples")))
3814 (mkdir-p examples)
3815 (for-each (lambda (file)
3816 (copy-file (string-append "." file)
3817 (string-append doc file)))
3818 '("/README.rst" "/CHANGES" "/LICENSE"))
3819 (copy-recursively "examples" examples)))))))
3820 (home-page "https://github.com/eliben/pycparser")
3821 (synopsis "C parser in Python")
3822 (description
3823 "Pycparser is a complete parser of the C language, written in pure Python
3824 using the PLY parsing library. It parses C code into an AST and can serve as
3825 a front-end for C compilers or analysis tools.")
3826 (license license:bsd-3)))
3827
3828 (define-public python2-pycparser
3829 (package-with-python2 python-pycparser))
3830
3831 (define-public python-pywavelets
3832 (package
3833 (name "python-pywavelets")
3834 (version "1.0.1")
3835 (home-page "https://github.com/PyWavelets/pywt")
3836 (source (origin
3837 (method url-fetch)
3838 (uri (pypi-uri "PyWavelets" version))
3839 (sha256
3840 (base32
3841 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
3842 (build-system python-build-system)
3843 (arguments
3844 '(#:modules ((ice-9 ftw)
3845 (srfi srfi-1)
3846 (srfi srfi-26)
3847 (guix build utils)
3848 (guix build python-build-system))
3849 #:phases (modify-phases %standard-phases
3850 (replace 'check
3851 (lambda _
3852 (let ((cwd (getcwd))
3853 (libdir (find (cut string-prefix? "lib." <>)
3854 (scandir "build"))))
3855 (with-directory-excursion (string-append cwd "/build/" libdir)
3856 (invoke "nosetests" "-v" "."))))))))
3857 (native-inputs
3858 `(("python-matplotlib" ,python-matplotlib) ;for tests
3859 ("python-nose" ,python-nose)))
3860 (propagated-inputs
3861 `(("python-numpy" ,python-numpy)))
3862 (synopsis "Wavelet transforms in Python")
3863 (description
3864 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
3865 mathematical basis functions that are localized in both time and frequency.
3866 Wavelet transforms are time-frequency transforms employing wavelets. They are
3867 similar to Fourier transforms, the difference being that Fourier transforms are
3868 localized only in frequency instead of in time and frequency.")
3869 (license license:expat)))
3870
3871 (define-public python2-pywavelets
3872 (package-with-python2 python-pywavelets))
3873
3874 (define-public python-xcffib
3875 (package
3876 (name "python-xcffib")
3877 (version "0.6.0")
3878 (source
3879 (origin
3880 (method url-fetch)
3881 (uri (pypi-uri "xcffib" version))
3882 (sha256
3883 (base32
3884 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
3885 (build-system python-build-system)
3886 (inputs
3887 `(("libxcb" ,libxcb)))
3888 (propagated-inputs
3889 `(("python-cffi" ,python-cffi) ; used at run time
3890 ("python-six" ,python-six)))
3891 (arguments
3892 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
3893 #:tests? #f
3894 #:phases
3895 (modify-phases %standard-phases
3896 (add-after 'unpack 'fix-libxcb-path
3897 (lambda* (#:key inputs #:allow-other-keys)
3898 (let ((libxcb (assoc-ref inputs "libxcb")))
3899 (substitute* '("xcffib/__init__.py")
3900 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
3901 #t)))
3902 (add-after 'install 'install-doc
3903 (lambda* (#:key outputs #:allow-other-keys)
3904 (let ((doc (string-append (assoc-ref outputs "out") "/share"
3905 "/doc/" ,name "-" ,version)))
3906 (mkdir-p doc)
3907 (copy-file "README.md"
3908 (string-append doc "/README.md"))
3909 #t))))))
3910 (home-page "https://github.com/tych0/xcffib")
3911 (synopsis "XCB Python bindings")
3912 (description
3913 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
3914 support for Python 3 and PyPy. It is based on cffi.")
3915 (license license:expat)))
3916
3917 (define-public python2-xcffib
3918 (package-with-python2 python-xcffib))
3919
3920 (define-public python-cairocffi
3921 (package
3922 (name "python-cairocffi")
3923 (version "0.9.0")
3924 (source
3925 (origin
3926 (method url-fetch)
3927 (uri (pypi-uri "cairocffi" version))
3928 (sha256
3929 (base32
3930 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
3931 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
3932 (build-system python-build-system)
3933 (outputs '("out" "doc"))
3934 (inputs
3935 `(("glib" ,glib)
3936 ("gtk+" ,gtk+)
3937 ("gdk-pixbuf" ,gdk-pixbuf)
3938 ("cairo" ,cairo)
3939 ("pango" ,pango)))
3940 (native-inputs
3941 `(("pkg-config" ,pkg-config)
3942 ("python-pytest" ,python-pytest)
3943 ("python-pytest-cov" ,python-pytest-cov)
3944 ("python-pytest-runner" ,python-pytest-runner)
3945 ("python-sphinx" ,python-sphinx)
3946 ("python-docutils" ,python-docutils)))
3947 (propagated-inputs
3948 `(("python-xcffib" ,python-xcffib))) ; used at run time
3949 (arguments
3950 `(#:phases
3951 (modify-phases %standard-phases
3952 (add-after 'unpack 'patch-paths
3953 (lambda* (#:key inputs outputs #:allow-other-keys)
3954 (substitute* (find-files "." "\\.py$")
3955 (("dlopen\\(ffi, 'cairo'")
3956 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
3957 "/lib/libcairo.so.2'"))
3958 (("dlopen\\(ffi, 'gdk-3'")
3959 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
3960 "/lib/libgtk-3.so.0'"))
3961 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
3962 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
3963 "/lib/libgdk_pixbuf-2.0.so.0'"))
3964 (("dlopen\\(ffi, 'glib-2.0'")
3965 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
3966 "/lib/libglib-2.0.so.0'"))
3967 (("dlopen\\(ffi, 'gobject-2.0'")
3968 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
3969 "/lib/libgobject-2.0.so.0'"))
3970 (("dlopen\\(ffi, 'pangocairo-1.0'")
3971 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
3972 "/lib/libpangocairo-1.0.so.0'"))
3973 (("dlopen\\(ffi, 'pango-1.0'")
3974 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
3975 "/lib/libpango-1.0.so.0'")))
3976 #t))
3977 (add-after 'install 'install-doc
3978 (lambda* (#:key inputs outputs #:allow-other-keys)
3979 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3980 (doc (string-append data "/doc/" ,name "-" ,version))
3981 (html (string-append doc "/html")))
3982 (setenv "LD_LIBRARY_PATH"
3983 (string-append (assoc-ref inputs "cairo") "/lib" ":"
3984 (assoc-ref inputs "gdk-pixbuf") "/lib"))
3985 (setenv "LANG" "en_US.UTF-8")
3986 (mkdir-p html)
3987 (for-each (lambda (file)
3988 (copy-file (string-append "." file)
3989 (string-append doc file)))
3990 '("/README.rst" "/CHANGES" "/LICENSE"))
3991 (system* "python" "setup.py" "build_sphinx")
3992 (copy-recursively "docs/_build/html" html)
3993 #t))))))
3994 (home-page "https://github.com/Kozea/cairocffi")
3995 (synopsis "Python bindings and object-oriented API for Cairo")
3996 (description
3997 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
3998 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
3999 graphics library with support for multiple backends including image buffers,
4000 PNG, PostScript, PDF, and SVG file output.")
4001 (license license:bsd-3)))
4002
4003 (define-public python2-cairocffi
4004 (package-with-python2 python-cairocffi))
4005
4006 (define-public python-decorator
4007 (package
4008 (name "python-decorator")
4009 (version "4.3.0")
4010 (source
4011 (origin
4012 (method url-fetch)
4013 (uri (pypi-uri "decorator" version))
4014 (sha256
4015 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
4016 (build-system python-build-system)
4017 (home-page "https://pypi.python.org/pypi/decorator/")
4018 (synopsis "Python module to simplify usage of decorators")
4019 (description
4020 "The aim of the decorator module is to simplify the usage of decorators
4021 for the average programmer, and to popularize decorators usage giving examples
4022 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4023 etc. The core of this module is a decorator factory.")
4024 (license license:expat)))
4025
4026 (define-public python2-decorator
4027 (package-with-python2 python-decorator))
4028
4029 (define-public python-drmaa
4030 (package
4031 (name "python-drmaa")
4032 (version "0.7.7")
4033 (source
4034 (origin
4035 (method url-fetch)
4036 (uri (pypi-uri "drmaa" version))
4037 (sha256
4038 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4039 (build-system python-build-system)
4040 ;; The test suite requires libdrmaa which is provided by the cluster
4041 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4042 ;; should be set to the path of the libdrmaa library.
4043 (arguments '(#:tests? #f))
4044 (native-inputs
4045 `(("python-nose" ,python-nose)))
4046 (home-page "https://pypi.python.org/pypi/drmaa")
4047 (synopsis "Python bindings for the DRMAA library")
4048 (description
4049 "A Python package for Distributed Resource Management (DRM) job
4050 submission and control. This package is an implementation of the DRMAA 1.0
4051 Python language binding specification.")
4052 (license license:bsd-3)))
4053
4054 (define-public python2-drmaa
4055 (package-with-python2 python-drmaa))
4056
4057 (define-public python-grako
4058 (package
4059 (name "python-grako")
4060 (version "3.99.9")
4061 (source
4062 (origin
4063 (method url-fetch)
4064 (uri
4065 (pypi-uri "grako" version ".zip"))
4066 (sha256
4067 (base32
4068 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4069 (build-system python-build-system)
4070 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4071 (native-inputs
4072 `(("unzip" ,unzip)
4073 ("python-pytest" ,python-pytest)
4074 ("python-pytest-runner" ,python-pytest-runner)))
4075 (home-page "https://bitbucket.org/neogeny/grako")
4076 (synopsis "EBNF parser generator")
4077 (description
4078 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4079 memoizing PEG/Packrat parser in Python.")
4080 (license license:bsd-3)))
4081
4082 (define-public python2-grako
4083 (package-with-python2 python-grako))
4084
4085 (define-public python-gridmap
4086 (package
4087 (name "python-gridmap")
4088 (version "0.13.0")
4089 (source
4090 (origin
4091 (method url-fetch)
4092 (uri (string-append
4093 "https://github.com/pygridtools/gridmap/archive/v"
4094 version ".tar.gz"))
4095 (file-name (string-append name "-" version ".tar.gz"))
4096 (sha256
4097 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
4098 (build-system python-build-system)
4099 (arguments
4100 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4101 (propagated-inputs
4102 `(("python-psutil" ,python-psutil)
4103 ("python-drmaa" ,python-drmaa)
4104 ("python-pyzmq" ,python-pyzmq)))
4105 (home-page "https://github.com/pygridtools/gridmap")
4106 (synopsis "Create jobs on a cluster directly from Python")
4107 (description
4108 "Gridmap is a Python package to allow you to easily create jobs on the
4109 cluster directly from Python. You can directly map Python functions onto the
4110 cluster without needing to write any wrapper code yourself.")
4111 (license license:gpl3+)))
4112
4113 (define-public python2-gridmap
4114 (package-with-python2 python-gridmap))
4115
4116 (define-public python-honcho
4117 (package
4118 (name "python-honcho")
4119 (version "1.0.1")
4120 (source
4121 (origin
4122 (method url-fetch)
4123 (uri (string-append
4124 "https://github.com/nickstenning/honcho/archive/v"
4125 version ".tar.gz"))
4126 (file-name (string-append name "-" version ".tar.gz"))
4127 (sha256
4128 (base32 "0zizn61n5z5hq421hkypk9pw8s6fpxw30f4hsg7k4ivwzy3gjw9j"))))
4129 (build-system python-build-system)
4130 (native-inputs
4131 `(("python-pytest" ,python-pytest)
4132 ("python-mock" ,python-mock)
4133 ("python-tox" ,python-tox)
4134 ("which" ,which))) ;for tests
4135 (propagated-inputs
4136 `(("python-jinja2" ,python-jinja2)))
4137 (arguments
4138 `(#:phases
4139 (modify-phases %standard-phases
4140 (delete 'check)
4141 (add-after 'install 'check
4142 (lambda* (#:key outputs inputs #:allow-other-keys)
4143 ;; fix honcho path in testsuite
4144 (substitute* "tests/conftest.py"
4145 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
4146 "/bin/honcho" "'")))
4147 ;; It's easier to run tests after install.
4148 ;; Make installed package available for running the tests
4149 (add-installed-pythonpath inputs outputs)
4150 (zero? (system* "py.test" "-v")))))))
4151 (home-page "https://github.com/nickstenning/honcho")
4152 (synopsis "Manage Procfile-based applications")
4153 (description
4154 "A Procfile is a file which describes how to run an application
4155 consisting of serveral processes. honcho starts all listed processes.
4156 The output of all running processes is collected by honcho and
4157 displayed.")
4158 (license license:expat)))
4159
4160 (define-public python2-honcho
4161 (package-with-python2 python-honcho))
4162
4163 (define-public python-pexpect
4164 (package
4165 (name "python-pexpect")
4166 (version "4.6.0")
4167 (source
4168 (origin
4169 (method url-fetch)
4170 (uri (pypi-uri "pexpect" version))
4171 (sha256
4172 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
4173 (build-system python-build-system)
4174 (arguments
4175 `(#:phases
4176 (modify-phases %standard-phases
4177 (add-before 'check 'prepare-tests
4178 (lambda _
4179 (substitute* (find-files "tests")
4180 (("/bin/ls") (which "ls"))
4181 (("/bin/echo") (which "echo"))
4182 (("/bin/which") (which "which"))
4183 ;; Many tests try to use the /bin directory which
4184 ;; is not present in the build environment.
4185 ;; Use one that's non-empty and unlikely to change.
4186 (("/bin'") "/dev'"))
4187 ;; XXX: Socket connection test gets "Connection reset by peer".
4188 ;; Why does it not work? Delete for now.
4189 (delete-file "tests/test_socket.py")
4190 #t))
4191 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
4192 (native-inputs
4193 `(("python-nose" ,python-nose)
4194 ("python-pytest" ,python-pytest)
4195 ("man-db" ,man-db)
4196 ("which" ,which)
4197 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
4198 (propagated-inputs
4199 `(("python-ptyprocess" ,python-ptyprocess)))
4200 (home-page "http://pexpect.readthedocs.org/")
4201 (synopsis "Controlling interactive console applications")
4202 (description
4203 "Pexpect is a pure Python module for spawning child applications;
4204 controlling them; and responding to expected patterns in their output.
4205 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4206 child application and control it as if a human were typing commands.")
4207 (license license:isc)))
4208
4209 (define-public python2-pexpect
4210 (package-with-python2 python-pexpect))
4211
4212 (define-public python-setuptools-scm
4213 (package
4214 (name "python-setuptools-scm")
4215 (version "3.1.0")
4216 (source (origin
4217 (method url-fetch)
4218 (uri (pypi-uri "setuptools_scm" version))
4219 (sha256
4220 (base32
4221 "0h4bglwfz8b9prqljv8z3w9rgydfyxzaj05bm1y6zs5m6shz548i"))))
4222 (build-system python-build-system)
4223 (home-page "https://github.com/pypa/setuptools_scm/")
4224 (synopsis "Manage Python package versions in SCM metadata")
4225 (description
4226 "Setuptools_scm handles managing your Python package versions in
4227 @dfn{software configuration management} (SCM) metadata instead of declaring
4228 them as the version argument or in a SCM managed file.")
4229 (license license:expat)))
4230
4231 (define-public python2-setuptools-scm
4232 (package-with-python2 python-setuptools-scm))
4233
4234 (define-public python-pathpy
4235 (package
4236 (name "python-pathpy")
4237 (version "11.0.1")
4238 (source
4239 (origin
4240 (method url-fetch)
4241 (uri (pypi-uri "path.py" version))
4242 (sha256
4243 (base32 "07x15v8c7ry9bvycw294c9yq6ky9v2b0dalvgi6rn38ilh69vsz7"))))
4244 ;; (outputs '("out" "doc"))
4245 (build-system python-build-system)
4246 (propagated-inputs
4247 `(("python-appdirs" ,python-appdirs)))
4248 (native-inputs
4249 `(("python-setuptools-scm" ,python-setuptools-scm)
4250 ("python-sphinx" ,python-sphinx)
4251 ("python-rst.linker" ,python-rst.linker)
4252 ("python-pytest" ,python-pytest)
4253 ("python-pytest-runner" ,python-pytest-runner)))
4254 (arguments
4255 ;; FIXME: Documentation and tests require "jaraco.packaging".
4256 `(#:tests? #f))
4257 ;; #:phases
4258 ;; (modify-phases %standard-phases
4259 ;; (add-after 'build 'build-doc
4260 ;; (lambda _
4261 ;; (setenv "LANG" "en_US.UTF-8")
4262 ;; (zero? (system* "python" "setup.py" "build_sphinx"))))
4263 ;; (add-after 'install 'install-doc
4264 ;; (lambda* (#:key outputs #:allow-other-keys)
4265 ;; (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4266 ;; (doc (string-append data "/doc/" ,name "-" ,version))
4267 ;; (html (string-append doc "/html")))
4268 ;; (mkdir-p html)
4269 ;; (for-each (lambda (file)
4270 ;; (copy-file file (string-append doc "/" file)))
4271 ;; '("README.rst" "CHANGES.rst"))
4272 ;; (copy-recursively "build/sphinx/html" html)))))))
4273 (home-page "https://github.com/jaraco/path.py")
4274 (synopsis "Python module wrapper for built-in os.path")
4275 (description
4276 "@code{path.py} implements path objects as first-class entities, allowing
4277 common operations on files to be invoked on those path objects directly.")
4278 (license license:expat)))
4279
4280 (define-public python2-pathpy
4281 (package-with-python2 python-pathpy))
4282
4283 (define-public python-simplegeneric
4284 (package
4285 (name "python-simplegeneric")
4286 (version "0.8.1")
4287 (source
4288 (origin
4289 (method url-fetch)
4290 (uri (string-append "https://pypi.python.org/packages/source/s/"
4291 "simplegeneric/simplegeneric-" version ".zip"))
4292 (sha256
4293 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
4294 (build-system python-build-system)
4295 (native-inputs
4296 `(("unzip" ,unzip)))
4297 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
4298 (synopsis "Python module for simple generic functions")
4299 (description
4300 "The simplegeneric module lets you define simple single-dispatch generic
4301 functions, akin to Python’s built-in generic functions like @code{len()},
4302 @code{iter()} and so on. However, instead of using specially-named methods,
4303 these generic functions use simple lookup tables, akin to those used by
4304 e.g. @code{pickle.dump()} and other generic functions found in the Python
4305 standard library.")
4306 (license license:zpl2.1)))
4307
4308 (define-public python2-simplegeneric
4309 (package-with-python2 python-simplegeneric))
4310
4311 (define-public python-ipython-genutils
4312 ;; TODO: This package is retired, check if can be removed, see description.
4313 (package
4314 (name "python-ipython-genutils")
4315 (version "0.1.0")
4316 (source
4317 (origin
4318 (method url-fetch)
4319 (uri (string-append "https://pypi.python.org/packages/source/i/"
4320 "ipython_genutils/ipython_genutils-"
4321 version ".tar.gz"))
4322 (sha256
4323 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
4324 (build-system python-build-system)
4325 (arguments `(#:tests? #f)) ; no tests
4326 (home-page "https://ipython.org")
4327 (synopsis "Vestigial utilities from IPython")
4328 (description
4329 "This package provides retired utilities from IPython. No packages
4330 outside IPython/Jupyter should depend on it.
4331
4332 This package shouldn't exist. It contains some common utilities shared by
4333 Jupyter and IPython projects during The Big Split. As soon as possible, those
4334 packages will remove their dependency on this, and this package will go
4335 away.")
4336 (license license:bsd-3)))
4337
4338 (define-public python2-ipython-genutils
4339 (package-with-python2 python-ipython-genutils))
4340
4341 (define-public python-traitlets
4342 (package
4343 (name "python-traitlets")
4344 (version "4.3.2")
4345 (source
4346 (origin
4347 (method url-fetch)
4348 (uri (pypi-uri "traitlets" version))
4349 (sha256
4350 (base32
4351 "0dbq7sx26xqz5ixs711k5nc88p8a0nqyz6162pwks5dpcz9d4jww"))))
4352 (build-system python-build-system)
4353 (arguments
4354 `(#:phases
4355 (modify-phases %standard-phases
4356 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
4357 (propagated-inputs
4358 `(("python-ipython-genutils" ,python-ipython-genutils)
4359 ("python-decorator" ,python-decorator))) ;not needed for >4.3.2
4360 (native-inputs
4361 `(("python-pytest" ,python-pytest)))
4362 (properties `((python2-variant . ,(delay python2-traitlets))))
4363 (home-page "https://ipython.org")
4364 (synopsis "Configuration system for Python applications")
4365 (description
4366 "Traitlets is a framework that lets Python classes have attributes with
4367 type checking, dynamically calculated default values, and ‘on change’
4368 callbacks. The package also includes a mechanism to use traitlets for
4369 configuration, loading values from files or from command line arguments. This
4370 is a distinct layer on top of traitlets, so you can use traitlets in your code
4371 without using the configuration machinery.")
4372 (license license:bsd-3)))
4373
4374 (define-public python2-traitlets
4375 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
4376 (package
4377 (inherit traitlets)
4378 (propagated-inputs
4379 `(("python2-enum34" ,python2-enum34)
4380 ,@(package-propagated-inputs traitlets))))))
4381
4382 (define-public python-jupyter-core
4383 (package
4384 (name "python-jupyter-core")
4385 (version "4.4.0")
4386 (source
4387 (origin
4388 (method url-fetch)
4389 (uri (string-append (pypi-uri "jupyter_core" version)))
4390 (sha256
4391 (base32
4392 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
4393 (build-system python-build-system)
4394 ;; FIXME: not sure how to run the tests
4395 (arguments `(#:tests? #f))
4396 (propagated-inputs
4397 `(("python-traitlets" ,python-traitlets)))
4398 (home-page "http://jupyter.org/")
4399 (synopsis "Jupyter base package")
4400 (description
4401 "Jupyter core is the base package on which Jupyter projects rely.")
4402 (license license:bsd-3)))
4403
4404 (define-public python2-jupyter-core
4405 (package-with-python2 python-jupyter-core))
4406
4407 (define-public python-jupyter-client
4408 (package
4409 (name "python-jupyter-client")
4410 (version "5.2.4")
4411 (source
4412 (origin
4413 (method url-fetch)
4414 (uri (pypi-uri "jupyter_client" version))
4415 (sha256
4416 (base32
4417 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
4418 (build-system python-build-system)
4419 ;; Tests fail because of missing native python kernel which I assume is
4420 ;; provided by the ipython package, which we cannot use because it would
4421 ;; cause a dependency cycle.
4422 (arguments `(#:tests? #f))
4423 (propagated-inputs
4424 `(("python-pyzmq" ,python-pyzmq)
4425 ("python-traitlets" ,python-traitlets)
4426 ("python-jupyter-core" ,python-jupyter-core)))
4427 (home-page "http://jupyter.org/")
4428 (synopsis "Jupyter protocol implementation and client libraries")
4429 (description
4430 "The @code{jupyter_client} package contains the reference implementation
4431 of the Jupyter protocol. It also provides client and kernel management APIs
4432 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
4433 installing @code{kernelspec}s for use with Jupyter frontends.")
4434 (license license:bsd-3)))
4435
4436 (define-public python2-jupyter-client
4437 (package-with-python2 python-jupyter-client))
4438
4439 (define-public python-ipykernel
4440 (package
4441 (name "python-ipykernel")
4442 (version "5.1.0")
4443 (source
4444 (origin
4445 (method url-fetch)
4446 (uri (pypi-uri "ipykernel" version))
4447 (sha256
4448 (base32 "0br95qhrd5k65g10djngiy27hs0642301hlf2q142i8djabvzh0g"))))
4449 (build-system python-build-system)
4450 (arguments
4451 `(#:phases
4452 (modify-phases %standard-phases
4453 (replace 'check
4454 (lambda _
4455 (setenv "HOME" "/tmp")
4456 (invoke "pytest" "-v")
4457 #t)))))
4458 (propagated-inputs
4459 `(("python-ipython" ,python-ipython)
4460 ;; imported at runtime during connect
4461 ("python-jupyter-client" ,python-jupyter-client)))
4462 (native-inputs
4463 `(("python-pytest" ,python-pytest)
4464 ("python-nose" ,python-nose)))
4465 (home-page "https://ipython.org")
4466 (synopsis "IPython Kernel for Jupyter")
4467 (description
4468 "This package provides the IPython kernel for Jupyter.")
4469 (license license:bsd-3)))
4470
4471 (define-public python2-ipykernel
4472 (package-with-python2 python-ipykernel))
4473
4474 (define-public python-send2trash
4475 (package
4476 (name "python-send2trash")
4477 (version "1.5.0")
4478 (source
4479 (origin
4480 (method url-fetch)
4481 (uri (pypi-uri "send2trash" version))
4482 (sha256
4483 (base32
4484 "1ci8vcwjmjlp11ljj1ckrfmml9fkq1mclx2gr53y4zvhgp01q030"))))
4485 (build-system python-build-system)
4486 (home-page "https://github.com/hsoft/send2trash")
4487 (synopsis "Send files to trash")
4488 (description
4489 "This package provides a cross-platform mechanism to send files to the
4490 trash.")
4491 (license license:bsd-3)))
4492
4493 (define-public python2-send2trash
4494 (package-with-python2 python-send2trash))
4495
4496 ;; This is the latest release of the LTS version of ipython with support for
4497 ;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
4498 ;; dropped support for Python 2.7. We may want to rename this package.
4499 (define-public python-ipython
4500 (package
4501 (name "python-ipython")
4502 (version "5.8.0")
4503 (source
4504 (origin
4505 (method url-fetch)
4506 (uri (pypi-uri "ipython" version ".tar.gz"))
4507 (sha256
4508 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
4509 (build-system python-build-system)
4510 (outputs '("out" "doc"))
4511 (propagated-inputs
4512 `(("python-pyzmq" ,python-pyzmq)
4513 ("python-prompt-toolkit" ,python-prompt-toolkit-1)
4514 ("python-terminado" ,python-terminado)
4515 ("python-matplotlib" ,python-matplotlib)
4516 ("python-numpy" ,python-numpy)
4517 ("python-numpydoc" ,python-numpydoc)
4518 ("python-jinja2" ,python-jinja2)
4519 ("python-mistune" ,python-mistune)
4520 ("python-pexpect" ,python-pexpect)
4521 ("python-pickleshare" ,python-pickleshare)
4522 ("python-simplegeneric" ,python-simplegeneric)
4523 ("python-jsonschema" ,python-jsonschema)
4524 ("python-traitlets" ,python-traitlets)
4525 ("python-nbformat" ,python-nbformat)
4526 ("python-pygments" ,python-pygments)))
4527 (inputs
4528 `(("readline" ,readline)
4529 ("which" ,which)))
4530 (native-inputs
4531 `(("graphviz" ,graphviz)
4532 ("pkg-config" ,pkg-config)
4533 ("python-requests" ,python-requests) ;; for tests
4534 ("python-testpath" ,python-testpath)
4535 ("python-nose" ,python-nose)
4536 ("python-sphinx" ,python-sphinx)
4537 ("python-shpinx-rtd-theme" ,python-sphinx-rtd-theme)
4538 ;; FIXME: It's possible that a smaller union would work just as well.
4539 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
4540 texlive-fonts-ec
4541 texlive-generic-ifxetex
4542 texlive-generic-pdftex
4543 texlive-latex-amsfonts
4544 texlive-latex-capt-of
4545 texlive-latex-cmap
4546 texlive-latex-environ
4547 texlive-latex-eqparbox
4548 texlive-latex-etoolbox
4549 texlive-latex-expdlist
4550 texlive-latex-fancyhdr
4551 texlive-latex-fancyvrb
4552 texlive-latex-fncychap
4553 texlive-latex-float
4554 texlive-latex-framed
4555 texlive-latex-geometry
4556 texlive-latex-graphics
4557 texlive-latex-hyperref
4558 texlive-latex-mdwtools
4559 texlive-latex-multirow
4560 texlive-latex-oberdiek
4561 texlive-latex-parskip
4562 texlive-latex-preview
4563 texlive-latex-tabulary
4564 texlive-latex-threeparttable
4565 texlive-latex-titlesec
4566 texlive-latex-trimspaces
4567 texlive-latex-ucs
4568 texlive-latex-upquote
4569 texlive-latex-url
4570 texlive-latex-varwidth
4571 texlive-latex-wrapfig)))
4572 ("texinfo" ,texinfo)))
4573 (arguments
4574 `(#:phases
4575 (modify-phases %standard-phases
4576 (add-after 'install 'install-doc
4577 (lambda* (#:key inputs outputs #:allow-other-keys)
4578 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4579 (doc (string-append data "/doc/" ,name "-" ,version))
4580 (html (string-append doc "/html"))
4581 (man1 (string-append data "/man/man1"))
4582 (info (string-append data "/info"))
4583 (examples (string-append doc "/examples"))
4584 (python-arg (string-append "PYTHON=" (which "python"))))
4585 (setenv "LANG" "en_US.utf8")
4586 ;; Make installed package available for running the tests
4587 (add-installed-pythonpath inputs outputs)
4588 (with-directory-excursion "docs"
4589 ;; FIXME: pdf fails to build
4590 ;;(system* "make" "pdf" "PAPER=a4")
4591 (system* "make" python-arg "html")
4592 (system* "make" python-arg "info"))
4593 (copy-recursively "docs/man" man1)
4594 (copy-recursively "examples" examples)
4595 (copy-recursively "docs/build/html" html)
4596 ;; (copy-file "docs/build/latex/ipython.pdf"
4597 ;; (string-append doc "/ipython.pdf"))
4598 (mkdir-p info)
4599 (copy-file "docs/build/texinfo/ipython.info"
4600 (string-append info "/ipython.info"))
4601 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
4602 #t))
4603 ;; Tests can only be run after the library has been installed and not
4604 ;; within the source directory.
4605 (delete 'check)
4606 (add-after 'install 'check
4607 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
4608 (if tests?
4609 (begin
4610 ;; Make installed package available for running the tests
4611 (add-installed-pythonpath inputs outputs)
4612 (setenv "HOME" "/tmp/") ;; required by a test
4613 ;; We only test the core because one of the other tests
4614 ;; tries to import ipykernel.
4615 (invoke "python" "IPython/testing/iptest.py"
4616 "-v" "IPython/core/tests"))
4617 #t)))
4618 (add-before 'check 'fix-tests
4619 (lambda* (#:key inputs #:allow-other-keys)
4620 (substitute* "./IPython/utils/_process_posix.py"
4621 (("/usr/bin/env', 'which") (which "which")))
4622 (substitute* "./IPython/core/tests/test_inputtransformer.py"
4623 (("#!/usr/bin/env python")
4624 (string-append "#!" (which "python"))))
4625 ;; Disable 1 failing test
4626 (substitute* "./IPython/core/tests/test_magic.py"
4627 (("def test_dirops\\(\\):" all)
4628 (string-append "@dec.skipif(True)\n" all)))
4629 ;; This test introduces a circular dependency on ipykernel
4630 ;; (which depends on ipython).
4631 (delete-file "IPython/core/tests/test_display.py")
4632 ;; These tests throw errors for unknown reasons.
4633 (delete-file "IPython/extensions/tests/test_storemagic.py")
4634 (delete-file "IPython/core/tests/test_displayhook.py")
4635 (delete-file "IPython/core/tests/test_interactiveshell.py")
4636 (delete-file "IPython/core/tests/test_pylabtools.py")
4637 (delete-file "IPython/core/tests/test_paths.py")
4638 #t)))))
4639 (home-page "https://ipython.org")
4640 (synopsis "IPython is a tool for interactive computing in Python")
4641 (description
4642 "IPython provides a rich architecture for interactive computing with:
4643 Powerful interactive shells, a browser-based notebook, support for interactive
4644 data visualization, embeddable interpreters and tools for parallel
4645 computing.")
4646 (license license:bsd-3)
4647 (properties `((python2-variant . ,(delay python2-ipython))))))
4648
4649 (define-public python2-ipython
4650 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
4651 (package
4652 (inherit ipython)
4653 ;; FIXME: add pyreadline once available.
4654 (propagated-inputs
4655 `(("python2-backports-shutil-get-terminal-size"
4656 ,python2-backports-shutil-get-terminal-size)
4657 ("python2-pathlib2" ,python2-pathlib2)
4658 ,@(package-propagated-inputs ipython)))
4659 (native-inputs
4660 `(("python2-mock" ,python2-mock)
4661 ,@(package-native-inputs ipython))))))
4662
4663 (define-public python-urwid
4664 (package
4665 (name "python-urwid")
4666 (version "2.0.1")
4667 (source
4668 (origin
4669 (method url-fetch)
4670 (uri (pypi-uri "urwid" version))
4671 (sha256
4672 (base32
4673 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
4674 (build-system python-build-system)
4675 (home-page "http://urwid.org")
4676 (synopsis "Console user interface library for Python")
4677 (description
4678 "Urwid is a curses-based UI/widget library for Python. It includes many
4679 features useful for text console applications.")
4680 (license license:lgpl2.1+)))
4681
4682 (define-public python2-urwid
4683 (package-with-python2 python-urwid))
4684
4685 (define-public python-urwidtrees
4686 (package
4687 (name "python-urwidtrees")
4688 (version "1.0.2")
4689 (source
4690 (origin
4691 (method url-fetch)
4692 ;; package author intends on distributing via github rather than pypi:
4693 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
4694 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
4695 version ".tar.gz"))
4696 (file-name (string-append name "-" version ".tar.gz"))
4697 (sha256
4698 (base32
4699 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
4700 (build-system python-build-system)
4701 (arguments
4702 '(#:tests? #f)) ; no tests
4703 (propagated-inputs `(("python-urwid" ,python-urwid)))
4704 (home-page "https://github.com/pazz/urwidtrees")
4705 (synopsis "Tree widgets for urwid")
4706 (description "Urwidtrees is a Widget Container API for the @code{urwid}
4707 toolkit. Use it to build trees of widgets.")
4708 (license license:gpl3+)))
4709
4710 (define-public python2-urwidtrees
4711 (package-with-python2 python-urwidtrees))
4712
4713 (define-public python-ua-parser
4714 (package
4715 (name "python-ua-parser")
4716 (version "0.8.0")
4717 (source
4718 (origin
4719 (method url-fetch)
4720 (uri (pypi-uri "ua-parser" version))
4721 (sha256
4722 (base32
4723 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
4724 (build-system python-build-system)
4725 (arguments
4726 `(#:tests? #f)) ;no test suite in release
4727 (native-inputs
4728 `(("python-pyyaml" ,python-pyyaml)))
4729 (home-page "https://github.com/ua-parser/uap-python")
4730 (synopsis "User agent parser")
4731 (description
4732 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
4733 (license license:asl2.0)))
4734
4735 (define-public python2-ua-parser
4736 (package-with-python2 python-ua-parser))
4737
4738 (define-public python-user-agents
4739 (package
4740 (name "python-user-agents")
4741 (version "1.1.0")
4742 (source
4743 (origin
4744 (method url-fetch)
4745 (uri (pypi-uri "user-agents" version))
4746 (sha256
4747 (base32
4748 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
4749 (build-system python-build-system)
4750 (arguments
4751 `(#:tests? #f)) ;missing devices.json test file in release
4752 (propagated-inputs
4753 `(("python-ua-parser" ,python-ua-parser)))
4754 (home-page "https://github.com/selwin/python-user-agents")
4755 (synopsis "User Agent strings parsing library")
4756 (description
4757 "A library to identify devices (phones, tablets) and their capabilities by
4758 parsing (browser/HTTP) user agent strings.")
4759 (license license:expat)))
4760
4761 (define-public python2-user-agents
4762 (package-with-python2 python-user-agents))
4763
4764 (define-public python-dbus
4765 (package
4766 (name "python-dbus")
4767 (version "1.2.8")
4768 (source
4769 (origin
4770 (method url-fetch)
4771 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
4772 "dbus-python-" version ".tar.gz"))
4773 (sha256
4774 (base32
4775 "0vvvjmiwnc9cjlks3gcdk43ap7llhlpz7cm1wbw0nc2yfsxjpwdb"))))
4776 (build-system gnu-build-system)
4777 (arguments
4778 '(#:phases
4779 (modify-phases %standard-phases
4780 (add-before
4781 'check 'pre-check
4782 (lambda _
4783 ;; XXX: For the missing '/etc/machine-id'.
4784 (substitute* "test/run-test.sh"
4785 (("DBUS_FATAL_WARNINGS=1")
4786 "DBUS_FATAL_WARNINGS=0"))
4787 #t)))))
4788 (native-inputs
4789 `(("pkg-config" ,pkg-config)))
4790 (inputs
4791 `(("python" ,python-wrapper)
4792 ("dbus-glib" ,dbus-glib)))
4793 (synopsis "Python bindings for D-bus")
4794 (description "python-dbus provides bindings for libdbus, the reference
4795 implementation of D-Bus.")
4796 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
4797 (license license:expat)))
4798
4799 (define-public python2-dbus
4800 (package (inherit python-dbus)
4801 (name "python2-dbus")
4802 (inputs `(("python" ,python-2)
4803 ,@(alist-delete "python"
4804 (package-inputs python-dbus)
4805 equal?)))
4806 ;; FIXME: on Python 2, the test_utf8 fails with:
4807 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
4808 (arguments `(#:tests? #f))))
4809
4810 (define-public python-lxml
4811 (package
4812 (name "python-lxml")
4813 (version "4.2.5")
4814 (source
4815 (origin
4816 (method url-fetch)
4817 (uri (pypi-uri "lxml" version))
4818 (sha256
4819 (base32
4820 "0zw0y9hs0nflxhl9cs6ipwwh53szi3w2x06wl0k9cylyqac0cwin"))))
4821 (build-system python-build-system)
4822 (inputs
4823 `(("libxml2" ,libxml2)
4824 ("libxslt" ,libxslt)))
4825 (home-page "http://lxml.de/")
4826 (synopsis
4827 "Python XML processing library")
4828 (description
4829 "The lxml XML toolkit is a Pythonic binding for the C libraries
4830 libxml2 and libxslt.")
4831 (license license:bsd-3))) ; and a few more, see LICENSES.txt
4832
4833 (define-public python2-lxml
4834 (package-with-python2 python-lxml))
4835
4836 ;; beautifulsoup4 has a totally different namespace than 3.x,
4837 ;; and pypi seems to put it under its own name, so I guess we should too
4838 (define-public python-beautifulsoup4
4839 (package
4840 (name "python-beautifulsoup4")
4841 (version "4.6.3")
4842 (source
4843 (origin
4844 (method url-fetch)
4845 (uri (pypi-uri "beautifulsoup4" version))
4846 (sha256
4847 (base32
4848 "041dhalzjciw6qyzzq7a2k4h1yvyk76xigp35hv5ibnn448ydy4h"))))
4849 (build-system python-build-system)
4850 (arguments
4851 `(#:phases
4852 (modify-phases %standard-phases
4853 ;; The Python 2 source is the definitive source of beautifulsoup4. We
4854 ;; must use this conversion script when building with Python 3. The
4855 ;; conversion script also runs the tests.
4856 ;; For more information, see the file 'convert-py3k' in the source
4857 ;; distribution.
4858 (replace 'check
4859 (lambda _ (zero? (system* "./convert-py3k")))))))
4860 (home-page
4861 "https://www.crummy.com/software/BeautifulSoup/bs4/")
4862 (synopsis
4863 "Python screen-scraping library")
4864 (description
4865 "Beautiful Soup is a Python library designed for rapidly setting up
4866 screen-scraping projects. It offers Pythonic idioms for navigating,
4867 searching, and modifying a parse tree, providing a toolkit for
4868 dissecting a document and extracting what you need. It automatically
4869 converts incoming documents to Unicode and outgoing documents to UTF-8.")
4870 (license license:expat)
4871 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
4872
4873 (define-public python2-beautifulsoup4
4874 (package
4875 (inherit (package-with-python2
4876 (strip-python2-variant python-beautifulsoup4)))
4877 (arguments `(#:python ,python-2))))
4878
4879 (define-public python-netifaces
4880 (package
4881 (name "python-netifaces")
4882 (version "0.10.7")
4883 (source
4884 (origin
4885 (method url-fetch)
4886 (uri (pypi-uri "netifaces" version))
4887 (sha256
4888 (base32
4889 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
4890 (build-system python-build-system)
4891 (home-page "https://github.com/al45tair/netifaces")
4892 (synopsis
4893 "Python module for portable network interface information")
4894 (description
4895 "Netifaces is a Python module providing information on network
4896 interfaces in an easy and portable manner.")
4897 (license license:expat)))
4898
4899 (define-public python2-netifaces
4900 (package-with-python2 python-netifaces))
4901
4902 (define-public python-networkx
4903 (package
4904 (name "python-networkx")
4905 (version "2.2")
4906 (source
4907 (origin
4908 (method url-fetch)
4909 (uri (pypi-uri "networkx" version ".zip"))
4910 (sha256
4911 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
4912 (build-system python-build-system)
4913 ;; python-decorator is needed at runtime.
4914 (propagated-inputs
4915 `(("python-decorator" ,python-decorator)))
4916 (native-inputs
4917 `(("python-nose" ,python-nose)
4918 ("unzip" ,unzip)))
4919 (home-page "https://networkx.github.io/")
4920 (synopsis "Python module for creating and manipulating graphs and networks")
4921 (description
4922 "NetworkX is a Python package for the creation, manipulation, and study
4923 of the structure, dynamics, and functions of complex networks.")
4924 (license license:bsd-3)))
4925
4926 (define-public python2-networkx
4927 (package-with-python2 python-networkx))
4928
4929 (define-public python-datrie
4930 (package
4931 (name "python-datrie")
4932 (version "0.7.1")
4933 (source
4934 (origin
4935 (method url-fetch)
4936 (uri (pypi-uri "datrie" version))
4937 (sha256
4938 (base32
4939 "08r0if7dry2q7p34gf7ffyrlnf4bdvnprxgydlfxgfnvq8f3f4bs"))))
4940 (build-system python-build-system)
4941 (arguments
4942 `(#:phases (modify-phases %standard-phases
4943 (add-before 'build 'cythonize
4944 (lambda _
4945 ;; Regenerate Cython classes to solve ABI issues with Python
4946 ;; 3.7.0. See <https://github.com/pytries/datrie/issues/52>.
4947 (invoke "cython" "src/datrie.pyx" "src/cdatrie.pxd"
4948 "src/stdio_ext.pxd" "-a"))))))
4949 (native-inputs
4950 `(("python-cython" ,python-cython)
4951 ("python-hypothesis" ,python-hypothesis)
4952 ("python-pytest" ,python-pytest)
4953 ("python-pytest-runner" ,python-pytest-runner)))
4954 (home-page "https://github.com/kmike/datrie")
4955 (synopsis "Fast, efficiently stored trie for Python")
4956 (description
4957 "This package provides a fast, efficiently stored trie implementation for
4958 Python.")
4959 (license license:lgpl2.1+)))
4960
4961 (define-public snakemake
4962 (package
4963 (name "snakemake")
4964 (version "5.2.4")
4965 (source
4966 (origin
4967 (method url-fetch)
4968 (uri (pypi-uri "snakemake" version))
4969 (sha256
4970 (base32 "0gj0xxgiq3mp9qyyrbfzldiaq1giliqw0in64nqiz7vx49myqj7z"))))
4971 (build-system python-build-system)
4972 (arguments
4973 ;; TODO: Package missing test dependencies.
4974 '(#:tests? #f
4975 #:phases
4976 (modify-phases %standard-phases
4977 ;; For cluster execution Snakemake will call Python. Since there is
4978 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
4979 ;; this by calling the snakemake wrapper instead.
4980 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
4981 (lambda* (#:key outputs #:allow-other-keys)
4982 (substitute* "snakemake/executors.py"
4983 (("\\{sys.executable\\} -m snakemake")
4984 (string-append (assoc-ref outputs "out")
4985 "/bin/snakemake")))
4986 #t)))))
4987 (propagated-inputs
4988 `(("python-gitpython" ,python-gitpython)
4989 ("python-wrapt" ,python-wrapt)
4990 ("python-requests" ,python-requests)
4991 ("python-appdirs" ,python-appdirs)
4992 ("python-configargparse" ,python-configargparse)
4993 ("python-datrie" ,python-datrie)
4994 ("python-docutils" ,python-docutils)
4995 ("python-jinja2" ,python-jinja2)
4996 ("python-jsonschema" ,python-jsonschema)
4997 ("python-networkx" ,python-networkx)
4998 ("python-pyyaml" ,python-pyyaml)
4999 ("python-ratelimiter" ,python-ratelimiter)))
5000 (home-page "https://snakemake.readthedocs.io")
5001 (synopsis "Python-based execution environment for make-like workflows")
5002 (description
5003 "Snakemake aims to reduce the complexity of creating workflows by
5004 providing a clean and modern domain specific specification language (DSL) in
5005 Python style, together with a fast and comfortable execution environment.")
5006 (license license:expat)))
5007
5008 ;; This is currently needed for the pigx-* packages.
5009 (define-public snakemake-4
5010 (package (inherit snakemake)
5011 (version "4.4.0")
5012 (source
5013 (origin
5014 (method url-fetch)
5015 (uri (pypi-uri "snakemake" version))
5016 (sha256
5017 (base32 "0g0paia4z7w3srnqdmavq3hrb2x7qnpf81jx50njl0p7y4y0j8jv"))))
5018 (propagated-inputs
5019 `(("python-wrapt" ,python-wrapt)
5020 ("python-requests" ,python-requests)
5021 ("python-appdirs" ,python-appdirs)
5022 ("python-configargparse" ,python-configargparse)
5023 ("python-pyyaml" ,python-pyyaml)
5024 ("python-ratelimiter" ,python-ratelimiter)))))
5025
5026 (define-public python-pyqrcode
5027 (package
5028 (name "python-pyqrcode")
5029 (version "1.2.1")
5030 (source
5031 (origin
5032 (method url-fetch)
5033 (uri (pypi-uri "PyQRCode" version))
5034 (sha256
5035 (base32
5036 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
5037 (build-system python-build-system)
5038 (home-page
5039 "https://github.com/mnooner256/pyqrcode")
5040 (synopsis "QR code generator")
5041 (description
5042 "Pyqrcode is a QR code generator written purely in Python with
5043 SVG, EPS, PNG and terminal output.")
5044 (license license:bsd-3)))
5045
5046 (define-public python-seaborn
5047 (package
5048 (name "python-seaborn")
5049 (version "0.9.0")
5050 (source
5051 (origin
5052 (method url-fetch)
5053 (uri (pypi-uri "seaborn" version))
5054 (sha256
5055 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))))
5056 (build-system python-build-system)
5057 (arguments
5058 `(#:phases
5059 (modify-phases %standard-phases
5060 (add-before 'check 'start-xserver
5061 (lambda* (#:key inputs #:allow-other-keys)
5062 (let ((xorg-server (assoc-ref inputs "xorg-server")))
5063 ;; There must be a running X server and make check doesn't
5064 ;; start one. Therefore we must do it.
5065 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
5066 (setenv "DISPLAY" ":1")
5067 #t)))
5068 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
5069 (propagated-inputs
5070 `(("python-pandas" ,python-pandas)
5071 ("python-matplotlib" ,python-matplotlib)
5072 ("python-numpy" ,python-numpy)
5073 ("python-scipy" ,python-scipy)))
5074 (native-inputs
5075 `(("python-pytest" ,python-pytest)
5076 ("xorg-server" ,xorg-server)))
5077 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5078 (synopsis "Statistical data visualization")
5079 (description
5080 "Seaborn is a library for making attractive and informative statistical
5081 graphics in Python. It is built on top of matplotlib and tightly integrated
5082 with the PyData stack, including support for numpy and pandas data structures
5083 and statistical routines from scipy and statsmodels.")
5084 (license license:bsd-3)))
5085
5086 (define-public python2-seaborn
5087 (package-with-python2 python-seaborn))
5088
5089 (define-public python-mpmath
5090 (package
5091 (name "python-mpmath")
5092 (version "0.19")
5093 (source (origin
5094 (method url-fetch)
5095 (uri (string-append "http://mpmath.org/files/mpmath-"
5096 version ".tar.gz"))
5097 (sha256
5098 (base32
5099 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
5100 (build-system python-build-system)
5101 (arguments
5102 '(#:phases
5103 (modify-phases %standard-phases
5104 (replace 'check
5105 (lambda _
5106 (zero?
5107 (system* "python" "mpmath/tests/runtests.py" "-local")))))))
5108 (home-page "http://mpmath.org")
5109 (synopsis "Arbitrary-precision floating-point arithmetic in python")
5110 (description
5111 "@code{mpmath} can be used as an arbitrary-precision substitute for
5112 Python's float/complex types and math/cmath modules, but also does much
5113 more advanced mathematics.")
5114 (license license:bsd-3)))
5115
5116 (define-public python2-mpmath
5117 (package-with-python2 python-mpmath))
5118
5119 (define-public python-bigfloat
5120 (package
5121 (name "python-bigfloat")
5122 (version "0.3.0")
5123 (source
5124 (origin
5125 (method url-fetch)
5126 (uri (pypi-uri "bigfloat" version))
5127 (sha256
5128 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
5129 (build-system python-build-system)
5130 (inputs
5131 `(("mpfr" ,mpfr)))
5132 (home-page "https://github.com/mdickinson/bigfloat")
5133 (synopsis "Arbitrary precision floating-point arithmetic for Python")
5134 (description
5135 "This packages provides a Python interface to the MPFR library for
5136 multiprecision arithmetic.")
5137 (license license:lgpl3+)))
5138
5139 (define-public python2-bigfloat
5140 (package-with-python2 python-bigfloat))
5141
5142 (define-public python-sympy
5143 (package
5144 (name "python-sympy")
5145 (version "1.1.1")
5146 (source
5147 (origin
5148 (method url-fetch)
5149 (uri (string-append
5150 "https://github.com/sympy/sympy/releases/download/sympy-"
5151 version "/sympy-" version ".tar.gz"))
5152 (sha256
5153 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
5154 (build-system python-build-system)
5155 (arguments
5156 `(#:phases
5157 (modify-phases %standard-phases
5158 ;; Run the core tests after installation. By default it would run
5159 ;; *all* tests, which take a very long time to complete and are known
5160 ;; to be flaky.
5161 (delete 'check)
5162 (add-after 'install 'check
5163 (lambda* (#:key outputs #:allow-other-keys)
5164 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
5165 #t)))))
5166 (propagated-inputs
5167 `(("python-mpmath" ,python-mpmath)))
5168 (home-page "http://www.sympy.org/")
5169 (synopsis "Python library for symbolic mathematics")
5170 (description
5171 "SymPy is a Python library for symbolic mathematics. It aims to become a
5172 full-featured computer algebra system (CAS) while keeping the code as simple
5173 as possible in order to be comprehensible and easily extensible.")
5174 (license license:bsd-3)))
5175
5176 (define-public python2-sympy
5177 (package
5178 (inherit (package-with-python2 python-sympy))
5179 (arguments
5180 `(#:phases
5181 (modify-phases %standard-phases
5182 ;; Run the core tests after installation. By default it would run
5183 ;; *all* tests, which take a very long time to complete and are known
5184 ;; to be flaky.
5185 (delete 'check)
5186 (add-after 'install 'check
5187 (lambda* (#:key outputs #:allow-other-keys)
5188 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
5189 #t)))))))
5190
5191 (define-public python-q
5192 (package
5193 (name "python-q")
5194 (version "2.6")
5195 (source
5196 (origin
5197 (method url-fetch)
5198 (uri (pypi-uri "q" version))
5199 (sha256
5200 (base32
5201 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
5202 (build-system python-build-system)
5203 (home-page "https://github.com/zestyping/q")
5204 (synopsis "Quick-and-dirty debugging output for tired programmers")
5205 (description
5206 "q is a Python module for \"print\" style of debugging Python code. It
5207 provides convenient short API for print out of values, tracebacks, and
5208 falling into the Python interpreter.")
5209 (license license:asl2.0)))
5210
5211 (define-public python2-q
5212 (package-with-python2 python-q))
5213
5214 (define-public python2-xlib
5215 (package
5216 (name "python2-xlib")
5217 (version "0.14")
5218 (source (origin
5219 (method url-fetch)
5220 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
5221 "/" version "/"
5222 "python-xlib-" version ".tar.gz"))
5223 (sha256
5224 (base32
5225 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
5226 (build-system python-build-system)
5227 (arguments
5228 `(#:python ,python-2 ;Python 2 only
5229 #:tests? #f)) ;no tests
5230 (home-page "http://python-xlib.sourceforge.net/")
5231 (synopsis "Python X11 client library")
5232 (description
5233 "The Python X Library is intended to be a fully functional X client
5234 library for Python programs. It is useful to implement low-level X clients.
5235 It is written entirely in Python.")
5236 (license license:gpl2+)))
5237
5238 (define-public python-singledispatch
5239 (package
5240 (name "python-singledispatch")
5241 (version "3.4.0.3")
5242 (source
5243 (origin
5244 (method url-fetch)
5245 (uri (pypi-uri "singledispatch" version))
5246 (sha256
5247 (base32
5248 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
5249 (build-system python-build-system)
5250 (native-inputs
5251 `(("python-six" ,python-six))) ; required for conversion, not at run-time
5252 (home-page
5253 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
5254 (synopsis "Backport of singledispatch feature from Python 3.4")
5255 (description
5256 "This library brings functools.singledispatch from Python 3.4 to Python
5257 2.6-3.3.")
5258 (license license:expat)))
5259
5260 (define-public python2-singledispatch
5261 (package-with-python2 python-singledispatch))
5262
5263 ;; the python- version can be removed with python-3.5
5264 (define-public python-backports-abc
5265 (package
5266 (name "python-backports-abc")
5267 (version "0.5")
5268 (source
5269 (origin
5270 (method url-fetch)
5271 (uri (pypi-uri "backports_abc" version))
5272 (sha256
5273 (base32
5274 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
5275 (build-system python-build-system)
5276 (home-page "https://github.com/cython/backports_abc")
5277 (synopsis "Backport of additions to the 'collections.abc' module")
5278 (description
5279 "Python-backports-abc provides a backport of additions to the
5280 'collections.abc' module in Python-3.5.")
5281 (license license:psfl)))
5282
5283 (define-public python2-backports-abc
5284 (package-with-python2 python-backports-abc))
5285
5286 (define-public python-backports-csv
5287 (package
5288 (name "python-backports-csv")
5289 (version "1.0.5")
5290 (source
5291 (origin
5292 (method url-fetch)
5293 (uri (pypi-uri "backports.csv" version))
5294 (sha256
5295 (base32
5296 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
5297 (build-system python-build-system)
5298 (home-page "https://github.com/ryanhiebert/backports.csv")
5299 (synopsis "Backport of Python 3's csv module for Python 2")
5300 (description
5301 "Provides a backport of Python 3's @code{csv} module for parsing
5302 comma separated values. The API of the @code{csv} module in Python 2
5303 is drastically different from the @code{csv} module in Python 3.
5304 This is due, for the most part, to the difference between str in
5305 Python 2 and Python 3.")
5306 (license license:psfl)))
5307
5308 (define-public python2-backports-csv
5309 (package-with-python2 python-backports-csv))
5310
5311 (define-public python2-backports-shutil-get-terminal-size
5312 (package
5313 (name "python2-backports-shutil-get-terminal-size")
5314 (version "1.0.0")
5315 (source
5316 (origin
5317 (method url-fetch)
5318 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
5319 (sha256
5320 (base32
5321 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
5322 (build-system python-build-system)
5323 (arguments
5324 `(#:python ,python-2
5325 #:phases
5326 (modify-phases %standard-phases
5327 (replace 'check
5328 (lambda _
5329 (zero? (system* "py.test" "-v")))))))
5330 (native-inputs
5331 `(("python2-pytest" ,python2-pytest)))
5332 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
5333 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
5334 (description
5335 "This package provides a backport of the @code{get_terminal_size
5336 function} from Python 3.3's @code{shutil}.
5337 Unlike the original version it is written in pure Python rather than C,
5338 so it might be a tiny bit slower.")
5339 (license license:expat)))
5340
5341 (define-public python-waf
5342 (package
5343 (name "python-waf")
5344 (version "2.0.11")
5345 (source (origin
5346 (method url-fetch)
5347 (uri (string-append "https://waf.io/"
5348 "waf-" version ".tar.bz2"))
5349 (sha256
5350 (base32
5351 "13zrniwkmfqgsgzi9v5m1367fppp9yzrz6z2ny6hy8dmpb8mj4z4"))))
5352 (build-system python-build-system)
5353 (arguments
5354 '(#:phases
5355 (modify-phases %standard-phases
5356 (replace 'build
5357 (lambda _
5358 (invoke "python" "waf-light" "configure" "build")))
5359 (replace 'check
5360 (lambda _
5361 (invoke "python" "waf" "--version")))
5362 (replace 'install
5363 (lambda* (#:key outputs #:allow-other-keys)
5364 (let ((out (assoc-ref outputs "out")))
5365 (install-file "waf" (string-append out "/bin")))
5366 #t))
5367 ;; waf breaks when it is wrapped.
5368 (delete 'wrap))))
5369 (home-page "https://waf.io/")
5370 (synopsis "Python-based build system")
5371 (description
5372 "Waf is a Python-based framework for configuring, compiling and installing
5373 applications.")
5374 (license license:bsd-3)))
5375
5376 (define-public python2-waf
5377 (package-with-python2 python-waf))
5378
5379 (define-public python-pyzmq
5380 (package
5381 (name "python-pyzmq")
5382 (version "17.1.2")
5383 (source
5384 (origin
5385 (method url-fetch)
5386 (uri (pypi-uri "pyzmq" version))
5387 (sha256
5388 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
5389 (build-system python-build-system)
5390 (arguments
5391 `(#:configure-flags
5392 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
5393 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
5394 ;; --inplace' for 'python setup.py test' to work.
5395 #:tests? #f))
5396 (inputs
5397 `(("zeromq" ,zeromq)))
5398 (native-inputs
5399 `(("pkg-config" ,pkg-config)
5400 ("python-nose" ,python-nose)))
5401 (home-page "https://github.com/zeromq/pyzmq")
5402 (synopsis "Python bindings for 0MQ")
5403 (description
5404 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
5405 (license license:bsd-4)))
5406
5407 (define-public python2-pyzmq
5408 (package-with-python2 python-pyzmq))
5409
5410 (define-public python-pep8
5411 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
5412 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
5413 ;; some dependents' test suites, and nothing more.
5414 (package
5415 (name "python-pep8")
5416 (version "1.7.0")
5417 (source
5418 (origin
5419 (method url-fetch)
5420 (uri (pypi-uri "pep8" version))
5421 (sha256
5422 (base32
5423 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
5424 (build-system python-build-system)
5425 (home-page "https://pep8.readthedocs.org/")
5426 (synopsis "Python style guide checker")
5427 (description
5428 "This tools checks Python code against some of the style conventions in
5429 PEP 8.")
5430 (license license:expat)))
5431
5432 (define-public python2-pep8
5433 (package-with-python2 python-pep8))
5434
5435 (define-public python-pyflakes
5436 (package
5437 (name "python-pyflakes")
5438 (version "2.0.0")
5439 (source
5440 (origin
5441 (method url-fetch)
5442 (uri (pypi-uri "pyflakes" version))
5443 (sha256
5444 (base32
5445 "0jba28czyvimdc72llms3f17swp3i8jdcabf5w0j00adfbn64xls"))))
5446 (build-system python-build-system)
5447 (home-page
5448 "https://github.com/pyflakes/pyflakes")
5449 (synopsis "Passive checker of Python programs")
5450 (description
5451 "Pyflakes statically checks Python source code for common errors.")
5452 (license license:expat)))
5453
5454 (define-public python2-pyflakes
5455 (package-with-python2 python-pyflakes))
5456
5457 (define-public python-mccabe
5458 (package
5459 (name "python-mccabe")
5460 (version "0.6.1")
5461 (source
5462 (origin
5463 (method url-fetch)
5464 (uri (pypi-uri "mccabe" version))
5465 (sha256
5466 (base32
5467 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
5468 (build-system python-build-system)
5469 (native-inputs
5470 `(("python-pytest" ,python-pytest-bootstrap)
5471 ("python-pytest-runner" ,python-pytest-runner)))
5472 (home-page "https://github.com/flintwork/mccabe")
5473 (synopsis "McCabe checker, plugin for flake8")
5474 (description
5475 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
5476 complexity of Python source code.")
5477 (license license:expat)))
5478
5479 (define-public python2-mccabe
5480 (package-with-python2 python-mccabe))
5481
5482 (define-public python-mccabe-0.2.1
5483 (package (inherit python-mccabe)
5484 (version "0.2.1")
5485 (source
5486 (origin
5487 (method url-fetch)
5488 (uri (pypi-uri "mccabe" version))
5489 (sha256
5490 (base32
5491 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
5492
5493 (define-public python2-mccabe-0.2.1
5494 (package-with-python2 python-mccabe-0.2.1))
5495
5496 ;; Flake8 2.4.1 requires an older version of pep8.
5497 ;; This should be removed ASAP.
5498 (define-public python-pep8-1.5.7
5499 (package (inherit python-pep8)
5500 (version "1.5.7")
5501 (source
5502 (origin
5503 (method url-fetch)
5504 (uri (string-append
5505 "https://pypi.python.org/packages/source/p/pep8/pep8-"
5506 version
5507 ".tar.gz"))
5508 (sha256
5509 (base32
5510 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
5511 (arguments
5512 ;; XXX Tests not compatible with Python 3.5.
5513 '(#:tests? #f))))
5514
5515 (define-public python2-pep8-1.5.7
5516 (package-with-python2 python-pep8-1.5.7))
5517
5518 ;; Flake8 2.4.1 requires an older version of pyflakes.
5519 ;; This should be removed ASAP.
5520 (define-public python-pyflakes-0.8.1
5521 (package (inherit python-pyflakes)
5522 (version "0.8.1")
5523 (source
5524 (origin
5525 (method url-fetch)
5526 (uri (string-append
5527 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
5528 version
5529 ".tar.gz"))
5530 (sha256
5531 (base32
5532 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
5533 (arguments
5534 ;; XXX Tests not compatible with Python 3.5.
5535 '(#:tests? #f))))
5536
5537 (define-public python2-pyflakes-0.8.1
5538 (package-with-python2 python-pyflakes-0.8.1))
5539
5540 ;; This package is used by hypothesis which has thousands of dependent packages.
5541 ;; FIXME: Consolidate this with "python-flake8" below in the next rebuild cycle.
5542 (define-public python-flake8-3.5
5543 (package
5544 (name "python-flake8")
5545 (version "3.5.0")
5546 (source
5547 (origin
5548 (method url-fetch)
5549 (uri (pypi-uri "flake8" version))
5550 (sha256
5551 (base32
5552 "184b33grvvjmiwlv9kyd7yng9qv5ld24154j70z332xxg9gjclvj"))))
5553 (build-system python-build-system)
5554 (arguments
5555 `(#:phases
5556 (modify-phases %standard-phases
5557 ;; Two errors don't seem to have assigned codes.
5558 (add-after 'unpack 'delete-broken-test
5559 (lambda _ (delete-file "tests/unit/test_pyflakes_codes.py") #t))
5560 (add-after 'unpack 'fix-problem-with-pycodestyle
5561 (lambda _
5562 ;; See https://gitlab.com/pycqa/flake8/merge_requests/230
5563 ;; This should no longer be needed with the next release.
5564 (substitute* "setup.py"
5565 (("PEP8_PLUGIN\\('break_around_binary_operator'\\),")
5566 "PEP8_PLUGIN('break_after_binary_operator'),\
5567 PEP8_PLUGIN('break_before_binary_operator'),"))
5568 #t))
5569 (delete 'check)
5570 (add-after 'install 'check
5571 (lambda* (#:key inputs outputs #:allow-other-keys)
5572 (add-installed-pythonpath inputs outputs)
5573 (invoke "pytest" "-v")
5574 #t)))))
5575 (propagated-inputs
5576 `(("python-pycodestyle" ,python-pycodestyle)
5577 ("python-pyflakes" ,python-pyflakes)
5578 ("python-mccabe" ,python-mccabe)))
5579 (native-inputs
5580 `(("python-mock" ,python-mock)
5581 ("python-pytest" ,python-pytest-bootstrap)
5582 ("python-pytest-runner" ,python-pytest-runner)))
5583 (home-page "https://gitlab.com/pycqa/flake8")
5584 (synopsis
5585 "The modular source code checker: pep8, pyflakes and co")
5586 (description
5587 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
5588 (properties `((python2-variant . ,(delay python2-flake8-3.5))))
5589 (license license:expat)))
5590
5591 (define-public python2-flake8-3.5
5592 (let ((base (package-with-python2 (strip-python2-variant python-flake8-3.5))))
5593 (package (inherit base)
5594 (propagated-inputs
5595 `(("python2-configparser" ,python2-configparser)
5596 ("python2-enum34" ,python2-enum34)
5597 ,@(package-propagated-inputs base))))))
5598
5599 ;; Version 3.5.0 has compatibility issues with Pyflakes 2.0, so we need
5600 ;; this newer version. Keep it as a separate variable for now to avoid
5601 ;; rebuilding "python-hypothesis"; this should be removed in the next
5602 ;; rebuild cycle.
5603 (define-public python-flake8
5604 (package
5605 (inherit python-flake8-3.5)
5606 (version "3.6.0")
5607 (source (origin
5608 (method url-fetch)
5609 (uri (pypi-uri "flake8" version))
5610 (sha256
5611 (base32
5612 "0w0nprx22rbvrrkbfx9v5jc5gskbm08g219l7r8wai8zfswgadba"))))
5613 (arguments
5614 (substitute-keyword-arguments (package-arguments python-flake8-3.5)
5615 ((#:phases phases)
5616 `(modify-phases ,phases
5617 (delete 'delete-broken-test)
5618 (delete 'fix-problem-with-pycodestyle)))))
5619 (properties `((python2-variant . ,(delay python2-flake8))))))
5620
5621 (define-public python2-flake8
5622 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
5623 (package (inherit base)
5624 (propagated-inputs
5625 (package-propagated-inputs python2-flake8-3.5)))))
5626
5627 ;; python-hacking requires flake8 <2.6.0.
5628 (define-public python-flake8-2.5
5629 (package
5630 (inherit python-flake8)
5631 (version "2.5.5")
5632 (source (origin
5633 (method url-fetch)
5634 (uri (pypi-uri "flake8" version))
5635 (sha256
5636 (base32
5637 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
5638 (propagated-inputs
5639 `(("python-pep8" ,python-pep8)
5640 ,@(package-propagated-inputs python-flake8)))
5641 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
5642
5643 (define-public python2-flake8-2.5
5644 (package
5645 (inherit python2-flake8)
5646 (version (package-version python-flake8-2.5))
5647 (source (origin
5648 (inherit (package-source python-flake8-2.5))))
5649 (propagated-inputs
5650 `(("python2-pep8" ,python2-pep8)
5651 ,@(package-propagated-inputs python2-flake8)))))
5652
5653 (define-public python-flake8-polyfill
5654 (package
5655 (name "python-flake8-polyfill")
5656 (version "1.0.2")
5657 (source
5658 (origin
5659 (method url-fetch)
5660 (uri (pypi-uri "flake8-polyfill" version))
5661 (sha256
5662 (base32
5663 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
5664 (build-system python-build-system)
5665 (arguments
5666 '(#:phases
5667 (modify-phases %standard-phases
5668 (replace 'check
5669 (lambda _
5670 (setenv "PYTHONPATH"
5671 (string-append (getcwd) "/build/lib:"
5672 (getenv "PYTHONPATH")))
5673 (zero? (system* "py.test" "-v")))))))
5674 (native-inputs
5675 `(("python-flake8" ,python-flake8)
5676 ("python-mock" ,python-mock)
5677 ("python-pep8" ,python-pep8)
5678 ("python-pycodestyle" ,python-pycodestyle)
5679 ("python-pytest" ,python-pytest)))
5680 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
5681 (synopsis "Polyfill package for Flake8 plugins")
5682 (description
5683 "This package that provides some compatibility helpers for Flake8
5684 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
5685 (license license:expat)))
5686
5687 (define-public python2-flake8-polyfill
5688 (package-with-python2 python-flake8-polyfill))
5689
5690 (define-public python-mistune
5691 (package
5692 (name "python-mistune")
5693 (version "0.8.4")
5694 (source
5695 (origin
5696 (method url-fetch)
5697 (uri (pypi-uri "mistune" version))
5698 (sha256
5699 (base32
5700 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
5701 (build-system python-build-system)
5702 (native-inputs
5703 `(("python-nose" ,python-nose)
5704 ("python-cython" ,python-cython)))
5705 (home-page "https://github.com/lepture/mistune")
5706 (synopsis "Markdown parser in pure Python")
5707 (description "This package provides a fast markdown parser in pure
5708 Python.")
5709 (license license:bsd-3)))
5710
5711 (define-public python2-mistune
5712 (package-with-python2 python-mistune))
5713
5714 (define-public python-markdown
5715 (package
5716 (name "python-markdown")
5717 (version "3.0.1")
5718 (source
5719 (origin
5720 (method url-fetch)
5721 (uri (pypi-uri "Markdown" version))
5722 (sha256
5723 (base32
5724 "0z6v8649sr434d5r5zmrhydka7v7f9yas4bwcgkcs0650jdhybnh"))))
5725 (build-system python-build-system)
5726 (native-inputs
5727 `(("python-nose" ,python-nose)
5728 ("python-pyyaml" ,python-pyyaml)))
5729 (home-page "https://python-markdown.github.io/")
5730 (synopsis "Python implementation of Markdown")
5731 (description
5732 "This package provides a Python implementation of John Gruber's
5733 Markdown. The library features international input, various Markdown
5734 extensions, and several HTML output formats. A command line wrapper
5735 markdown_py is also provided to convert Markdown files to HTML.")
5736 (license license:bsd-3)))
5737
5738 (define-public python2-markdown
5739 (package-with-python2 python-markdown))
5740
5741 (define-public python-ptyprocess
5742 (package
5743 (name "python-ptyprocess")
5744 (version "0.5.2")
5745 (source
5746 (origin
5747 (method url-fetch)
5748 (uri (pypi-uri "ptyprocess" version))
5749 (sha256
5750 (base32
5751 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
5752 (build-system python-build-system)
5753 (native-inputs
5754 `(("python-nose" ,python-nose)))
5755 (arguments
5756 `(#:phases
5757 (modify-phases %standard-phases
5758 (replace 'check
5759 (lambda _
5760 (zero? (system* "nosetests")))))))
5761 (home-page "https://github.com/pexpect/ptyprocess")
5762 (synopsis "Run a subprocess in a pseudo terminal")
5763 (description
5764 "This package provides a Python library used to launch a subprocess in a
5765 pseudo terminal (pty), and interact with both the process and its pty.")
5766 (license license:isc)))
5767
5768 (define-public python2-ptyprocess
5769 (package-with-python2 python-ptyprocess))
5770
5771 (define-public python-cram
5772 (package
5773 (name "python-cram")
5774 (version "0.7")
5775 (home-page "https://bitheap.org/cram/")
5776 (source (origin
5777 (method url-fetch)
5778 (uri (list (string-append home-page "cram-"
5779 version ".tar.gz")
5780 (pypi-uri "cram" version)))
5781 (sha256
5782 (base32
5783 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
5784 (arguments
5785 '(#:phases
5786 (modify-phases %standard-phases
5787 (add-after 'unpack 'patch-source
5788 (lambda _
5789 (substitute* (find-files "cram" ".*\\.py$")
5790 ;; Replace default shell path.
5791 (("/bin/sh") (which "sh")))
5792 (substitute* (find-files "tests" ".*\\.t$")
5793 (("md5") "md5sum")
5794 (("/bin/bash") (which "bash"))
5795 (("/bin/sh") (which "sh")))
5796 (substitute* "cram/_test.py"
5797 ;; This hack works around a bug triggered by substituting
5798 ;; the /bin/sh paths. "tests/usage.t" compares the output of
5799 ;; "cram -h", which breaks the output at 80 characters. This
5800 ;; causes the line showing the default shell to break into two
5801 ;; lines, but the test expects a single line...
5802 (("env\\['COLUMNS'\\] = '80'")
5803 "env['COLUMNS'] = '160'"))
5804 #t))
5805 (delete 'check)
5806 (add-after 'install 'check
5807 ;; The test phase uses the built library and executable.
5808 ;; It's easier to run it after install since the build
5809 ;; directory contains version-specific PATH.
5810 (lambda* (#:key inputs outputs #:allow-other-keys)
5811 (add-installed-pythonpath inputs outputs)
5812 (setenv "PATH" (string-append (getenv "PATH") ":"
5813 (assoc-ref outputs "out") "/bin"))
5814 (zero? (system* "make" "test")))))))
5815 (build-system python-build-system)
5816 (native-inputs
5817 `(("python-coverage" ,python-coverage)
5818 ("which" ,which)))
5819 (synopsis "Simple testing framework for command line applications")
5820 (description
5821 "Cram is a functional testing framework for command line applications.
5822 Cram tests look like snippets of interactive shell sessions. Cram runs each
5823 command and compares the command output in the test with the command’s actual
5824 output.")
5825 (license license:gpl2+)))
5826
5827 (define-public python2-cram
5828 (package-with-python2 python-cram))
5829
5830 (define-public python-straight-plugin
5831 (package
5832 (name "python-straight-plugin")
5833 (version "1.4.1")
5834 (source
5835 (origin
5836 (method url-fetch)
5837 (uri (pypi-uri "straight.plugin" version))
5838 (sha256
5839 (base32
5840 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
5841 (build-system python-build-system)
5842 (home-page "https://github.com/ironfroggy/straight.plugin")
5843 (synopsis "Simple namespaced plugin facility")
5844 (description "Straight Plugin provides a type of plugin you can create from
5845 almost any existing Python modules, and an easy way for outside developers to
5846 add functionality and customization to your projects with their own plugins.")
5847 (license license:expat)))
5848
5849 (define-public python2-straight-plugin
5850 (package-with-python2 python-straight-plugin))
5851
5852 (define-public python-fonttools
5853 (package
5854 (name "python-fonttools")
5855 (version "3.28.0")
5856 (source (origin
5857 (method url-fetch)
5858 (uri (pypi-uri "fonttools" version ".zip"))
5859 (sha256
5860 (base32
5861 "0vsvjhidpb5kywpjgz1j3fywzkddxkb0afqai18qa3h6lqjyxwpb"))))
5862 (build-system python-build-system)
5863 (native-inputs
5864 `(("unzip" ,unzip)
5865 ("python-pytest" ,python-pytest)
5866 ("python-pytest-runner" ,python-pytest-runner)))
5867 (home-page "https://github.com/behdad/fonttools")
5868 (synopsis "Tools to manipulate font files")
5869 (description
5870 "FontTools/TTX is a library to manipulate font files from Python. It
5871 supports reading and writing of TrueType/OpenType fonts, reading and writing
5872 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
5873 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
5874 from an XML-based format.")
5875 (license license:expat)))
5876
5877 (define-public python2-fonttools
5878 (package-with-python2 python-fonttools))
5879
5880 (define-public python-ly
5881 (package
5882 (name "python-ly")
5883 (version "0.9.5")
5884 (source
5885 (origin
5886 (method url-fetch)
5887 (uri (pypi-uri name version))
5888 (sha256
5889 (base32
5890 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
5891 (build-system python-build-system)
5892 (arguments
5893 ;; FIXME: Some tests need network access.
5894 '(#:tests? #f))
5895 (synopsis "Tool and library for manipulating LilyPond files")
5896 (description "This package provides a Python library to parse, manipulate
5897 or create documents in LilyPond format. A command line program ly is also
5898 provided that can be used to do various manipulations with LilyPond files.")
5899 (home-page "https://pypi.python.org/pypi/python-ly")
5900 (license license:gpl2+)))
5901
5902 (define-public python-appdirs
5903 (package
5904 (name "python-appdirs")
5905 (version "1.4.3")
5906 (source
5907 (origin
5908 (method url-fetch)
5909 (uri (pypi-uri "appdirs" version))
5910 (sha256
5911 (base32
5912 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
5913 (build-system python-build-system)
5914 (home-page "https://github.com/ActiveState/appdirs")
5915 (synopsis
5916 "Determine platform-specific dirs, e.g. a \"user data dir\"")
5917 (description
5918 "This module provides a portable way of finding out where user data
5919 should be stored on various operating systems.")
5920 (license license:expat)))
5921
5922 (define-public python2-appdirs
5923 (package-with-python2 python-appdirs))
5924
5925 (define-public python-llfuse
5926 (package
5927 (name "python-llfuse")
5928 (version "1.3.5")
5929 (source (origin
5930 (method url-fetch)
5931 (uri (pypi-uri "llfuse" version ".tar.bz2"))
5932 (sha256
5933 (base32
5934 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
5935 (build-system python-build-system)
5936 (inputs
5937 `(("fuse" ,fuse)
5938 ("attr" ,attr)))
5939 (native-inputs
5940 `(("pkg-config" ,pkg-config)))
5941 (synopsis "Python bindings for FUSE")
5942 (description
5943 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
5944 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
5945 (license license:lgpl2.0+)
5946 (properties `((python2-variant . ,(delay python2-llfuse))))))
5947
5948 (define-public python2-llfuse
5949 (package (inherit (package-with-python2
5950 (strip-python2-variant python-llfuse)))
5951 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
5952
5953 ;; For attic-0.16
5954 (define-public python-llfuse-0.41
5955 (package (inherit python-llfuse)
5956 (version "0.41.1")
5957 (source (origin
5958 (method url-fetch)
5959 (uri (string-append
5960 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
5961 "llfuse-" version ".tar.bz2"))
5962 (sha256
5963 (base32
5964 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
5965 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
5966 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
5967 (license (list license:expat license:lgpl2.0+))))
5968
5969 (define-public python-msgpack
5970 (package
5971 (name "python-msgpack")
5972 (version "0.5.6")
5973 (source (origin
5974 (method url-fetch)
5975 (uri (pypi-uri "msgpack" version))
5976 (sha256
5977 (base32
5978 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
5979 (build-system python-build-system)
5980 (arguments
5981 `(#:modules ((guix build utils)
5982 (guix build python-build-system)
5983 (ice-9 ftw)
5984 (srfi srfi-1)
5985 (srfi srfi-26))
5986 #:phases
5987 (modify-phases %standard-phases
5988 (replace 'check
5989 (lambda _
5990 (let ((cwd (getcwd)))
5991 (setenv "PYTHONPATH"
5992 (string-append cwd "/build/"
5993 (find (cut string-prefix? "lib" <>)
5994 (scandir (string-append cwd "/build")))
5995 ":"
5996 (getenv "PYTHONPATH")))
5997 (invoke "pytest" "-v" "test")))))))
5998 (native-inputs
5999 `(("python-pytest" ,python-pytest)))
6000 (synopsis "MessagePack (de)serializer")
6001 (description "MessagePack is a fast, compact binary serialization format,
6002 suitable for similar data to JSON. This package provides CPython bindings for
6003 reading and writing MessagePack data.")
6004 (home-page "https://pypi.python.org/pypi/msgpack/")
6005 (license license:asl2.0)))
6006
6007 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
6008 ;; release 0.5. Some packages like borg still call it by the old name for now.
6009 ;; <https://bugs.gnu.org/30662>
6010 (define-public python-msgpack-transitional
6011 (package
6012 (inherit python-msgpack)
6013 (name "python-msgpack-transitional")
6014 (arguments
6015 (substitute-keyword-arguments (package-arguments python-msgpack)
6016 ((#:phases phases)
6017 `(modify-phases ,phases
6018 (add-after 'unpack 'configure-transitional
6019 (lambda _
6020 ;; Keep using the old name.
6021 (substitute* "setup.py"
6022 (("TRANSITIONAL = False")
6023 "TRANSITIONAL = 1"))
6024 #t))))))))
6025
6026 (define-public python2-msgpack
6027 (package-with-python2 python-msgpack))
6028
6029 (define-public python-netaddr
6030 (package
6031 (name "python-netaddr")
6032 (version "0.7.19")
6033 (source
6034 (origin
6035 (method url-fetch)
6036 (uri (pypi-uri "netaddr" version))
6037 (sha256
6038 (base32
6039 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
6040 (build-system python-build-system)
6041 (arguments `(#:tests? #f)) ;; No tests.
6042 (home-page "https://github.com/drkjam/netaddr/")
6043 (synopsis "Pythonic manipulation of network addresses")
6044 (description
6045 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6046 and MAC network addresses.")
6047 (license license:bsd-3)))
6048
6049 (define-public python2-netaddr
6050 (package-with-python2 python-netaddr))
6051
6052 (define-public python-wrapt
6053 (package
6054 (name "python-wrapt")
6055 (version "1.11.1")
6056 (source
6057 (origin
6058 (method url-fetch)
6059 (uri (pypi-uri "wrapt" version))
6060 (sha256
6061 (base32
6062 "0cqmysny1pz01jw26q48q5zasvns6507rwhgm6wcw743f0r01sja"))))
6063 (build-system python-build-system)
6064 (arguments
6065 ;; Tests are not included in the tarball, they are only available in the
6066 ;; git repository.
6067 `(#:tests? #f))
6068 (home-page "https://github.com/GrahamDumpleton/wrapt")
6069 (synopsis "Module for decorators, wrappers and monkey patching")
6070 (description
6071 "The aim of the wrapt module is to provide a transparent object proxy for
6072 Python, which can be used as the basis for the construction of function
6073 wrappers and decorator functions.")
6074 (license license:bsd-2)))
6075
6076 (define-public python2-wrapt
6077 (package-with-python2 python-wrapt))
6078
6079 (define-public python-xlrd
6080 (package
6081 (name "python-xlrd")
6082 (version "1.0.0")
6083 (source (origin
6084 (method url-fetch)
6085 (uri (pypi-uri "xlrd" version))
6086 (sha256
6087 (base32
6088 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
6089 (build-system python-build-system)
6090 (arguments
6091 `(#:phases
6092 (modify-phases %standard-phases
6093 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
6094 ;; run tests instead for now.
6095 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
6096 (native-inputs `(("python-nose" ,python-nose)))
6097 (home-page "http://www.python-excel.org/")
6098 (synopsis "Library for extracting data from Excel files")
6099 (description "This packages provides a library to extract data from
6100 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
6101 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
6102 Unicode-aware. It is not intended as an end-user tool.")
6103 (license license:bsd-3)))
6104
6105 (define-public python2-xlrd
6106 (package-with-python2 python-xlrd))
6107
6108 (define-public python-prettytable
6109 (package
6110 (name "python-prettytable")
6111 (version "0.7.2")
6112 (source
6113 (origin
6114 (method url-fetch)
6115 (uri (string-append
6116 "https://pypi.python.org/packages/source/P/PrettyTable/"
6117 "prettytable-" version ".tar.bz2"))
6118 (sha256
6119 (base32
6120 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
6121 (build-system python-build-system)
6122 (home-page "http://code.google.com/p/prettytable/")
6123 (synopsis "Display tabular data in an ASCII table format")
6124 (description
6125 "A library designed to represent tabular data in visually appealing ASCII
6126 tables. PrettyTable allows for selection of which columns are to be printed,
6127 independent alignment of columns (left or right justified or centred) and
6128 printing of sub-tables by specifying a row range.")
6129 (license license:bsd-3)))
6130
6131 (define-public python2-prettytable
6132 (package-with-python2 python-prettytable))
6133
6134 (define-public python-tables
6135 (package
6136 (name "python-tables")
6137 (version "3.4.4")
6138 (source
6139 (origin
6140 (method url-fetch)
6141 (uri (pypi-uri "tables" version))
6142 (sha256
6143 (base32
6144 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
6145 (modules '((guix build utils)))
6146 (snippet
6147 '(begin
6148 ;; Remove pre-compiled .pyc files from source.
6149 (for-each delete-file-recursively
6150 (find-files "." "__pycache__" #:directories? #t))
6151 (for-each delete-file (find-files "." "\\.pyc$"))
6152 #t))))
6153 (build-system python-build-system)
6154 (arguments
6155 `(;; FIXME: python-build-system does not pass configure-flags to "build"
6156 ;; or "check", so we must override the build and check phases.
6157 #:phases
6158 (modify-phases %standard-phases
6159 (add-after 'unpack 'use-gcc
6160 (lambda _
6161 (substitute* "setup.py"
6162 (("compiler = new_compiler\\(\\)" line)
6163 (string-append line
6164 "\ncompiler.set_executables(compiler='gcc',"
6165 "compiler_so='gcc',"
6166 "linker_exe='gcc',"
6167 "linker_so='gcc -shared')")))
6168 #t))
6169 (replace 'build
6170 (lambda* (#:key inputs #:allow-other-keys)
6171 (zero? (system* "python" "setup.py" "build"
6172 (string-append "--hdf5="
6173 (assoc-ref inputs "hdf5"))))))
6174 (replace 'check
6175 (lambda* (#:key inputs #:allow-other-keys)
6176 (zero? (system* "python" "setup.py" "check"
6177 (string-append "--hdf5="
6178 (assoc-ref inputs "hdf5")))))))))
6179 (propagated-inputs
6180 `(("python-numexpr" ,python-numexpr)
6181 ("python-numpy" ,python-numpy)))
6182 (native-inputs
6183 `(("python-cython" ,python-cython)
6184 ("pkg-config" ,pkg-config)))
6185 (inputs
6186 `(("hdf5" ,hdf5)
6187 ("bzip2" ,bzip2)
6188 ("zlib" ,zlib)))
6189 (home-page "http://www.pytables.org/")
6190 (synopsis "Hierarchical datasets for Python")
6191 (description "PyTables is a package for managing hierarchical datasets and
6192 designed to efficiently cope with extremely large amounts of data.")
6193 (license license:bsd-3)))
6194
6195 (define-public python2-tables
6196 (package-with-python2 python-tables))
6197
6198 (define-public python-pyasn1
6199 (package
6200 (name "python-pyasn1")
6201 (version "0.4.3")
6202 (source
6203 (origin
6204 (method url-fetch)
6205 (uri (pypi-uri "pyasn1" version))
6206 (sha256
6207 (base32
6208 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
6209 (build-system python-build-system)
6210 (home-page "http://pyasn1.sourceforge.net/")
6211 (synopsis "ASN.1 types and codecs")
6212 (description
6213 "This is an implementation of ASN.1 types and codecs in Python. It is
6214 suitable for a wide range of protocols based on the ASN.1 specification.")
6215 (license license:bsd-2)))
6216
6217 (define-public python2-pyasn1
6218 (package-with-python2 python-pyasn1))
6219
6220 (define-public python-pyasn1-modules
6221 (package
6222 (name "python-pyasn1-modules")
6223 (version "0.2.2")
6224 (source
6225 (origin
6226 (method url-fetch)
6227 (uri (pypi-uri "pyasn1-modules" version))
6228 (sha256
6229 (base32
6230 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
6231 (build-system python-build-system)
6232 (propagated-inputs
6233 `(("python-pyasn1" ,python-pyasn1)))
6234 (home-page "https://sourceforge.net/projects/pyasn1/")
6235 (synopsis "ASN.1 codec implementations")
6236 (description
6237 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
6238 implementations of ASN.1-based codecs and protocols.")
6239 (license license:bsd-3)))
6240
6241 (define-public python2-pyasn1-modules
6242 (package-with-python2 python-pyasn1-modules))
6243
6244 (define-public python-ipaddress
6245 (package
6246 (name "python-ipaddress")
6247 (version "1.0.22")
6248 (source (origin
6249 (method url-fetch)
6250 (uri (pypi-uri "ipaddress" version))
6251 (sha256
6252 (base32
6253 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
6254 (build-system python-build-system)
6255 (home-page "https://github.com/phihag/ipaddress")
6256 (synopsis "IP address manipulation library")
6257 (description
6258 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
6259 in Python. This library is used to create, poke at, and manipulate IPv4 and
6260 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
6261 module to older versions of Python.")
6262 (license license:psfl)))
6263
6264 (define-public python2-ipaddress
6265 (package-with-python2 python-ipaddress))
6266
6267 (define-public python2-ipaddr
6268 (package
6269 (name "python2-ipaddr")
6270 (version "2.1.11")
6271 (source
6272 (origin
6273 (method url-fetch)
6274 (uri (pypi-uri "ipaddr" version))
6275 (sha256
6276 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
6277 (build-system python-build-system)
6278 (arguments
6279 `(#:python ,python-2 ;version 2 only
6280 #:phases
6281 (modify-phases %standard-phases
6282 (replace 'check
6283 (lambda* _
6284 (zero? (system* "python" "ipaddr_test.py")))))))
6285 (home-page "https://github.com/google/ipaddr-py")
6286 (synopsis "IP address manipulation library")
6287 (description
6288 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
6289 IPv6 addresses and networks.
6290
6291 For new implementations you may prefer to use the standard module
6292 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
6293 versions of Python.")
6294 (license license:asl2.0)))
6295
6296 (define-public python-idna
6297 (package
6298 (name "python-idna")
6299 (version "2.7")
6300 (source
6301 (origin
6302 (method url-fetch)
6303 (uri (pypi-uri "idna" version))
6304 (sha256
6305 (base32
6306 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))
6307 (build-system python-build-system)
6308 (home-page "https://github.com/kjd/idna")
6309 (synopsis "Internationalized domain names in applications")
6310 (description
6311 "This is a library to support the Internationalised Domain Names in
6312 Applications (IDNA) protocol as specified in RFC 5891. This version of the
6313 protocol is often referred to as “IDNA2008” and can produce different results
6314 from the earlier standard from 2003. The library is also intended to act as a
6315 suitable drop-in replacement for the “encodings.idna” module that comes with
6316 the Python standard library but currently only supports the older 2003
6317 specification.")
6318 (license license:bsd-4)))
6319
6320 (define-public python2-idna
6321 (package-with-python2 python-idna))
6322
6323 (define-public python-idna-ssl
6324 (package
6325 (name "python-idna-ssl")
6326 (version "1.0.1")
6327 (source
6328 (origin
6329 (method url-fetch)
6330 (uri (pypi-uri "idna-ssl" version))
6331 (sha256
6332 (base32
6333 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
6334 (build-system python-build-system)
6335 (arguments
6336 `(#:tests? #f)) ;circular dependency with python-aiohttp
6337 (home-page "https://github.com/aio-libs/idna-ssl")
6338 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
6339 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
6340 domains support.")
6341 (license license:expat)))
6342
6343 (define-public python-pretend
6344 (package
6345 (name "python-pretend")
6346 (version "1.0.9")
6347 (source
6348 (origin
6349 (method url-fetch)
6350 (uri (string-append "https://pypi.python.org/packages/source/p/"
6351 "pretend/pretend-" version ".tar.gz"))
6352 (sha256
6353 (base32
6354 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
6355 (build-system python-build-system)
6356 (home-page "https://github.com/alex/pretend")
6357 (synopsis "Library for stubbing in Python")
6358 (description
6359 "Pretend is a library to make stubbing with Python easier. Stubbing is a
6360 technique for writing tests. You may hear the term mixed up with mocks,
6361 fakes, or doubles. Basically, a stub is an object that returns pre-canned
6362 responses, rather than doing any computation.")
6363 (license license:bsd-3)))
6364
6365 (define-public python2-pretend
6366 (package-with-python2 python-pretend))
6367
6368 (define-public python-pip
6369 (package
6370 (name "python-pip")
6371 (version "18.1")
6372 (source
6373 (origin
6374 (method url-fetch)
6375 (uri (pypi-uri "pip" version))
6376 (sha256
6377 (base32
6378 "188fclay154s520n43s7cxxlhdaiysvxf19zk8vr1xbyjyyr58n0"))))
6379 (build-system python-build-system)
6380 (arguments
6381 '(#:tests? #f)) ; there are no tests in the pypi archive.
6382 (home-page "https://pip.pypa.io/")
6383 (synopsis "Package manager for Python software")
6384 (description
6385 "Pip is a package manager for Python software, that finds packages on the
6386 Python Package Index (PyPI).")
6387 (license license:expat)))
6388
6389 (define-public python2-pip
6390 (package-with-python2 python-pip))
6391
6392 (define-public python-tlsh
6393 (package
6394 (name "python-tlsh")
6395 (version "3.4.5")
6396 (home-page "https://github.com/trendmicro/tlsh")
6397 (source (origin
6398 (method url-fetch)
6399 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
6400 version ".tar.gz"))
6401 (sha256
6402 (base32
6403 "1x1vahd4zg5kpyr9h9hs3fvh460p25rjy4cclwdnbbw8x3vc30q3"))
6404 (file-name (string-append name "-" version ".tar.gz"))))
6405 (build-system cmake-build-system)
6406 (arguments
6407 '(#:out-of-source? #f
6408 #:phases (modify-phases %standard-phases
6409 (replace
6410 'install
6411 (lambda* (#:key outputs #:allow-other-keys)
6412 ;; Build and install the Python bindings. The underlying
6413 ;; C++ library is apparently not meant to be installed.
6414 (let ((out (assoc-ref outputs "out")))
6415 (with-directory-excursion "py_ext"
6416 (and (system* "python" "setup.py" "build")
6417 (system* "python" "setup.py" "install"
6418 (string-append "--prefix=" out))))))))))
6419 (inputs `(("python" ,python-wrapper))) ;for the bindings
6420 (synopsis "Fuzzy matching library for Python")
6421 (description
6422 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
6423 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
6424 value which can be used for similarity comparisons. Similar objects have
6425 similar hash values, which allows for the detection of similar objects by
6426 comparing their hash values. The byte stream should have a sufficient amount
6427 of complexity; for example, a byte stream of identical bytes will not generate
6428 a hash value.")
6429 (license license:asl2.0)))
6430
6431 (define-public python2-tlsh
6432 (package
6433 (inherit python-tlsh)
6434 (name "python2-tlsh")
6435 (inputs `(("python" ,python-2)))))
6436
6437 (define-public python-termcolor
6438 (package
6439 (name "python-termcolor")
6440 (version "1.1.0")
6441 (source
6442 (origin
6443 (method url-fetch)
6444 (uri (pypi-uri "termcolor" version))
6445 (sha256
6446 (base32
6447 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
6448 (build-system python-build-system)
6449 (arguments
6450 ;; There are no tests.
6451 `(#:tests? #f))
6452 (home-page "https://pypi.python.org/pypi/termcolor")
6453 (synopsis "ANSII Color formatting for terminal output")
6454 (description
6455 "This package provides ANSII Color formatting for output in terminals.")
6456 (license license:expat)))
6457
6458 (define-public python2-termcolor
6459 (package-with-python2 python-termcolor))
6460
6461 (define-public python-libarchive-c
6462 (package
6463 (name "python-libarchive-c")
6464 (version "2.8")
6465 (source (origin
6466 (method url-fetch)
6467 (uri (pypi-uri "libarchive-c" version))
6468 (sha256
6469 (base32
6470 "0qg0v1s9c1xdk9philhnv8k6c6nicvnvfwlc0j9srg90jmdlvm06"))))
6471 (build-system python-build-system)
6472 (arguments
6473 '(#:phases (modify-phases %standard-phases
6474 (add-before
6475 'build 'reference-libarchive
6476 (lambda* (#:key inputs #:allow-other-keys)
6477 ;; Retain the absolute file name of libarchive.so.
6478 (let ((libarchive (assoc-ref inputs "libarchive")))
6479 (substitute* "libarchive/ffi.py"
6480 (("find_library\\('archive'\\)")
6481 (string-append "'" libarchive
6482 "/lib/libarchive.so'"))))))
6483 (replace 'check
6484 (lambda _ (invoke "pytest" "-vv"))))))
6485 (native-inputs
6486 `(("python-mock" ,python-mock)
6487 ("python-pytest" ,python-pytest)))
6488 (inputs
6489 `(("libarchive" ,libarchive)))
6490 (home-page "https://github.com/Changaco/python-libarchive-c")
6491 (synopsis "Python interface to libarchive")
6492 (description
6493 "This package provides Python bindings to libarchive, a C library to
6494 access possibly compressed archives in many different formats. It uses
6495 Python's @code{ctypes} foreign function interface (FFI).")
6496 (license license:lgpl2.0+)))
6497
6498 (define-public python2-libarchive-c
6499 (package-with-python2 python-libarchive-c))
6500
6501 (define-public python-file
6502 (package
6503 (inherit file)
6504 (name "python-file")
6505 (build-system python-build-system)
6506 (arguments
6507 '(#:tests? #f ;no tests
6508 #:configure-flags '("--single-version-externally-managed" "--root=/")
6509 #:phases (modify-phases %standard-phases
6510 (add-before 'build 'change-directory
6511 (lambda _
6512 (chdir "python")
6513 #t))
6514 (add-before 'build 'set-library-file-name
6515 (lambda* (#:key inputs #:allow-other-keys)
6516 (let ((file (assoc-ref inputs "file")))
6517 (substitute* "magic.py"
6518 (("find_library\\('magic'\\)")
6519 (string-append "'" file "/lib/libmagic.so'")))
6520 #t))))))
6521 (inputs `(("file" ,file)))
6522 (self-native-input? #f)
6523 (synopsis "Python bindings to the libmagic file type guesser. Note that
6524 this module and the python-magic module both provide a \"magic.py\" file;
6525 these two modules, which are different and were developed separately, both
6526 serve the same purpose: provide Python bindings for libmagic.")))
6527
6528 (define-public python2-file
6529 (package-with-python2 python-file))
6530
6531 (define-public python-debian
6532 (package
6533 (name "python-debian")
6534 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
6535 (version "0.1.28")
6536 (source
6537 (origin
6538 (method url-fetch)
6539 (uri (pypi-uri name version))
6540 (sha256
6541 (base32
6542 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
6543 (build-system python-build-system)
6544 (propagated-inputs
6545 `(("python-six" ,python-six)))
6546 (synopsis "Debian package related modules")
6547 (description
6548 ;; XXX: Use @enumerate instead of @itemize to work around
6549 ;; <http://bugs.gnu.org/21772>.
6550 "This package provides Python modules that abstract many formats of
6551 Debian-related files, such as:
6552
6553 @enumerate
6554 @item Debtags information;
6555 @item @file{debian/changelog} files;
6556 @item packages files, pdiffs;
6557 @item control files of single or multiple RFC822-style paragraphs---e.g.
6558 @file{debian/control}, @file{.changes}, @file{.dsc};
6559 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
6560 contained files and meta-information.
6561 @end enumerate\n")
6562
6563 ;; Modules are either GPLv2+ or GPLv3+.
6564 (license license:gpl3+)))
6565
6566 (define-public python2-debian
6567 (package-with-python2 python-debian))
6568
6569 (define-public python-nbformat
6570 (package
6571 (name "python-nbformat")
6572 (version "4.4.0")
6573 (source
6574 (origin
6575 (method url-fetch)
6576 (uri (pypi-uri "nbformat" version))
6577 (sha256
6578 (base32
6579 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
6580 (build-system python-build-system)
6581 (arguments `(#:tests? #f)) ; no test target
6582 (propagated-inputs
6583 `(("python-ipython-genutils" ,python-ipython-genutils)
6584 ("python-jsonschema" ,python-jsonschema)
6585 ("python-jupyter-core" ,python-jupyter-core)
6586 ("python-traitlets" ,python-traitlets)))
6587 (home-page "http://jupyter.org")
6588 (synopsis "Jupyter Notebook format")
6589 (description "This package provides the reference implementation of the
6590 Jupyter Notebook format and Python APIs for working with notebooks.")
6591 (license license:bsd-3)))
6592
6593 (define-public python2-nbformat
6594 (package-with-python2 python-nbformat))
6595
6596 (define-public python-bleach
6597 (package
6598 (name "python-bleach")
6599 (version "1.4.3")
6600 (source
6601 (origin
6602 (method url-fetch)
6603 (uri (pypi-uri "bleach" version))
6604 (sha256
6605 (base32
6606 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
6607 (build-system python-build-system)
6608 (propagated-inputs
6609 `(("python-html5lib" ,python-html5lib-0.9)
6610 ("python-six" ,python-six)))
6611 (native-inputs
6612 `(("python-nose" ,python-nose)))
6613 (home-page "https://github.com/jsocol/bleach")
6614 (synopsis "Whitelist-based HTML-sanitizing tool")
6615 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
6616 (license license:asl2.0)))
6617
6618 (define-public python2-bleach
6619 (package-with-python2 python-bleach))
6620
6621 (define-public python-entrypoints
6622 (package
6623 (name "python-entrypoints")
6624 (version "0.2.3")
6625 (source
6626 (origin
6627 (method url-fetch)
6628 (uri (string-append "https://github.com/takluyver/entrypoints/archive/"
6629 version ".tar.gz"))
6630 (file-name (string-append name "-" version ".tar.gz"))
6631 (sha256
6632 (base32
6633 "1pdvgfr5bxyvnfvxbsd3zi0dh3il71pc4k6rinx6zpps91b84a56"))))
6634 (build-system python-build-system)
6635 ;; The package does not come with a setup.py file, so we have to generate
6636 ;; one ourselves.
6637 (arguments
6638 `(#:tests? #f
6639 #:phases
6640 (modify-phases %standard-phases
6641 (add-after 'unpack 'create-setup.py
6642 (lambda _
6643 (call-with-output-file "setup.py"
6644 (lambda (port)
6645 (format port "\
6646 from setuptools import setup
6647 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
6648 " ,version))))))))
6649 (home-page "https://github.com/takluyver/entrypoints")
6650 (synopsis "Discover and load entry points from installed Python packages")
6651 (description "Entry points are a way for Python packages to advertise
6652 objects with some common interface. The most common examples are
6653 @code{console_scripts} entry points, which define shell commands by
6654 identifying a Python function to run. The @code{entrypoints} module contains
6655 functions to find and load entry points.")
6656 (license license:expat)))
6657
6658 (define-public python2-entrypoints
6659 (package-with-python2 python-entrypoints))
6660
6661 (define-public python-nbconvert
6662 (package
6663 (name "python-nbconvert")
6664 (version "5.0.0b1")
6665 (source
6666 (origin
6667 (method url-fetch)
6668 (uri (pypi-uri "nbconvert" version))
6669 (sha256
6670 (base32
6671 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
6672 (build-system python-build-system)
6673 (arguments
6674 `(;; The "bdist_egg" target is disabled by default, causing the installation
6675 ;; to fail.
6676 #:configure-flags (list "bdist_egg")
6677 ;; FIXME: 5 failures, 40 errors.
6678 #:tests? #f))
6679 ;; #:phases
6680 ;; (modify-phases %standard-phases
6681 ;; (replace 'check
6682 ;; (lambda _
6683 ;; (zero? (system* "py.test" "-v")))))
6684 (native-inputs
6685 `(("python-pytest" ,python-pytest)))
6686 (propagated-inputs
6687 `(("python-bleach" ,python-bleach)
6688 ("python-entrypoints" ,python-entrypoints)
6689 ("python-jinja2" ,python-jinja2)
6690 ("python-jupyter-core" ,python-jupyter-core)
6691 ("python-mistune" ,python-mistune)
6692 ("python-nbformat" ,python-nbformat)
6693 ("python-pygments" ,python-pygments)
6694 ("python-traitlets" ,python-traitlets)))
6695 (home-page "http://jupyter.org")
6696 (synopsis "Converting Jupyter Notebooks")
6697 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
6698 notebooks to various other formats via Jinja templates. It allows you to
6699 convert an @code{.ipynb} notebook file into various static formats including:
6700
6701 @enumerate
6702 @item HTML
6703 @item LaTeX
6704 @item PDF
6705 @item Reveal JS
6706 @item Markdown (md)
6707 @item ReStructured Text (rst)
6708 @item executable script
6709 @end enumerate\n")
6710 (license license:bsd-3)))
6711
6712 (define-public python2-nbconvert
6713 (package-with-python2 python-nbconvert))
6714
6715 (define-public python-prometheus-client
6716 (package
6717 (name "python-prometheus-client")
6718 (version "0.5.0")
6719 (source
6720 (origin
6721 (method url-fetch)
6722 (uri (pypi-uri "prometheus_client" version))
6723 (sha256
6724 (base32
6725 "0g7rpv1pq2lab1nfqdx98z9d3bqwc400alg1j4ynrpjkrbsizhg8"))))
6726 (build-system python-build-system)
6727 (arguments '(#:tests? #f)) ; tests are not included
6728 (propagated-inputs
6729 `(("python-twisted" ,python-twisted)))
6730 (home-page "https://github.com/prometheus/client_python")
6731 (synopsis "Python client for the Prometheus monitoring system")
6732 (description
6733 "This package provides a Python client for the Prometheus monitoring
6734 system.")
6735 (license license:asl2.0)))
6736
6737 (define-public python2-prometheus-client
6738 (package-with-python2 python-prometheus-client))
6739
6740 (define-public python-notebook
6741 (package
6742 (name "python-notebook")
6743 (version "5.7.4")
6744 (source (origin
6745 (method url-fetch)
6746 (uri (pypi-uri "notebook" version))
6747 (sha256
6748 (base32
6749 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
6750 (build-system python-build-system)
6751 (arguments
6752 `(#:phases
6753 (modify-phases %standard-phases
6754 (replace 'check
6755 (lambda _
6756 ;; These tests require a browser
6757 (delete-file-recursively "notebook/tests/selenium")
6758 ;; Some tests need HOME
6759 (setenv "HOME" "/tmp")
6760 ;; This file contains "warningfilters", which are not supported
6761 ;; by this version of nose.
6762 (delete-file "setup.cfg")
6763 (with-directory-excursion "/tmp"
6764 (invoke "nosetests" "-v"))
6765 #t)))))
6766 (propagated-inputs
6767 `(("python-jupyter-core" ,python-jupyter-core)
6768 ("python-nbformat" ,python-nbformat)
6769 ("python-nbconvert" ,python-nbconvert)
6770 ("python-prometheus-client" ,python-prometheus-client)
6771 ("python-send2trash" ,python-send2trash)
6772 ("python-terminado" ,python-terminado)))
6773 (native-inputs
6774 `(("python-nose" ,python-nose)
6775 ("python-sphinx" ,python-sphinx)
6776 ("python-requests" ,python-requests)))
6777 (home-page "http://jupyter.org/")
6778 (synopsis "Web-based notebook environment for interactive computing")
6779 (description
6780 "The Jupyter HTML notebook is a web-based notebook environment for
6781 interactive computing.")
6782 (properties `((python2-variant . ,(delay python2-notebook))))
6783 (license license:bsd-3)))
6784
6785 (define-public python2-notebook
6786 (let ((base (package-with-python2
6787 (strip-python2-variant python-notebook))))
6788 (package (inherit base)
6789 (native-inputs
6790 `(("python2-mock" ,python2-mock)
6791 ,@(package-native-inputs base)))
6792 (arguments
6793 (substitute-keyword-arguments (package-arguments base)
6794 ((#:phases phases)
6795 `(modify-phases ,phases
6796 (add-before 'check 'disable-test-case
6797 ;; The test requires network access to localhost. Curiously it
6798 ;; fails with Python 2 only. Simply make the test-case return
6799 ;; immediately.
6800 (lambda _
6801 (substitute*
6802 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
6803 (("formats = self.nbconvert_api") "return #")))))))))))
6804
6805 (define-public python-widgetsnbextension
6806 (package
6807 (name "python-widgetsnbextension")
6808 (version "3.4.2")
6809 (source
6810 (origin
6811 (method url-fetch)
6812 (uri (pypi-uri "widgetsnbextension" version))
6813 (sha256
6814 (base32
6815 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
6816 (build-system python-build-system)
6817 (propagated-inputs
6818 `(("python-ipykernel" ,python-ipykernel)
6819 ("python-notebook" ,python-notebook)))
6820 (native-inputs
6821 `(("python-certifi" ,python-certifi)
6822 ("python-nose" ,python-nose)))
6823 (home-page "https://ipython.org")
6824 (synopsis "IPython HTML widgets for Jupyter")
6825 (description "This package provides interactive HTML widgets for Jupyter
6826 notebooks.")
6827 (license license:bsd-3)))
6828
6829 (define-public python2-widgetsnbextension
6830 (package-with-python2 python-widgetsnbextension))
6831
6832 (define-public python-ipywidgets
6833 (package
6834 (name "python-ipywidgets")
6835 (version "5.2.2")
6836 (source
6837 (origin
6838 (method url-fetch)
6839 (uri (pypi-uri "ipywidgets" version))
6840 (sha256
6841 (base32
6842 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
6843 (build-system python-build-system)
6844 (propagated-inputs
6845 `(("python-ipython" ,python-ipython)
6846 ("python-traitlets" ,python-traitlets)
6847 ("python-widgetsnbextension" ,python-widgetsnbextension)))
6848 (native-inputs
6849 `(("python-nose" ,python-nose)
6850 ("python-pytest" ,python-pytest)))
6851 (home-page "https://ipython.org")
6852 (synopsis "IPython HTML widgets for Jupyter")
6853 (description "Ipywidgets are interactive HTML widgets for Jupyter
6854 notebooks and the IPython kernel. Notebooks come alive when interactive
6855 widgets are used. Users gain control of their data and can visualize changes
6856 in the data.")
6857 (license license:bsd-3)))
6858
6859 (define-public python2-ipywidgets
6860 (package-with-python2 python-ipywidgets))
6861
6862 (define-public python-jupyter-console
6863 (package
6864 (name "python-jupyter-console")
6865 (version "5.2.0")
6866 (source
6867 (origin
6868 (method url-fetch)
6869 (uri (pypi-uri "jupyter_console" version))
6870 (sha256
6871 (base32
6872 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
6873 (build-system python-build-system)
6874 ;; Tests only run in an TTY.
6875 (arguments `(#:tests? #f))
6876 (propagated-inputs
6877 `(("python-ipykernel" ,python-ipykernel)
6878 ("python-jupyter-client" ,python-jupyter-client)
6879 ("python-prompt-toolkit" ,python-prompt-toolkit-1)
6880 ("python-pygments" ,python-pygments)))
6881 (native-inputs
6882 `(("python-nose" ,python-nose)))
6883 (home-page "https://jupyter.org")
6884 (synopsis "Jupyter terminal console")
6885 (description "This package provides a terminal-based console frontend for
6886 Jupyter kernels. It also allows for console-based interaction with non-Python
6887 Jupyter kernels such as IJulia and IRKernel.")
6888 (license license:bsd-3)))
6889
6890 (define-public python2-jupyter-console
6891 (package-with-python2 python-jupyter-console))
6892
6893 ;; The python-ipython and python-jupyter-console require each other. To get
6894 ;; the functionality in both packages working, strip down the
6895 ;; python-jupyter-console package when using it as an input to python-ipython.
6896 (define python-jupyter-console-minimal
6897 (package
6898 (inherit python-jupyter-console)
6899 (name "python-jupyter-console-minimal")
6900 (arguments
6901 (substitute-keyword-arguments
6902 (package-arguments python-jupyter-console)
6903 ((#:phases phases)
6904 `(modify-phases ,phases
6905 (add-after 'install 'delete-bin
6906 (lambda* (#:key outputs #:allow-other-keys)
6907 ;; Delete the bin files, to avoid conflicts in profiles
6908 ;; where python-ipython and python-jupyter-console are
6909 ;; both present.
6910 (delete-file-recursively
6911 (string-append
6912 (assoc-ref outputs "out") "/bin"))))))))
6913 ;; Remove the python-ipython propagated input, to avoid the cycle
6914 (propagated-inputs
6915 (alist-delete
6916 "python-ipython"
6917 (package-propagated-inputs python-jupyter-console)))))
6918
6919 (define-public python-qtconsole
6920 (package
6921 (name "python-qtconsole")
6922 (version "4.4.3")
6923 (source
6924 (origin
6925 (method url-fetch)
6926 (uri (pypi-uri "qtconsole" version))
6927 (sha256
6928 (base32
6929 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
6930 (build-system python-build-system)
6931 (arguments
6932 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
6933 ;; but we only have the LTS version 5.x. This means that there might be
6934 ;; runtime errors, but since this is a dependency of the Jupyter package,
6935 ;; and Jupyter can be used without the qtconsole we can overlook this for
6936 ;; now.
6937 `(#:tests? #f
6938 #:phases
6939 (modify-phases %standard-phases
6940 (add-before 'check 'pre-check
6941 (lambda _
6942 (setenv "QT_QPA_PLATFORM" "offscreen")
6943 #t)))))
6944 (propagated-inputs
6945 `(("python-ipykernel" ,python-ipykernel)
6946 ("python-ipython" ,python-ipython)))
6947 (native-inputs
6948 `(("python-pytest" ,python-pytest)))
6949 (home-page "http://jupyter.org")
6950 (synopsis "Jupyter Qt console")
6951 (description "This package provides a Qt-based console for Jupyter with
6952 support for rich media output.")
6953 (license license:bsd-3)))
6954
6955 (define-public jupyter
6956 (package
6957 (name "jupyter")
6958 (version "1.0.0")
6959 (source
6960 (origin
6961 (method url-fetch)
6962 (uri (pypi-uri "jupyter" version))
6963 (sha256
6964 (base32
6965 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
6966 (build-system python-build-system)
6967 (arguments '(#:tests? #f)) ; there are none.
6968 (propagated-inputs
6969 `(("python-ipykernel" ,python-ipykernel)
6970 ("python-ipywidgets" ,python-ipywidgets)
6971 ("python-jupyter-console" ,python-jupyter-console)
6972 ("python-nbconvert" ,python-nbconvert)
6973 ("python-notebook" ,python-notebook)
6974 ("python-qtconsole" ,python-qtconsole)))
6975 (native-search-paths
6976 (list (search-path-specification
6977 (variable "JUPYTER_PATH")
6978 (files '("share/jupyter")))))
6979 (home-page "https://jupyter.org")
6980 (synopsis "Web application for interactive documents")
6981 (description
6982 "The Jupyter Notebook is a web application that allows you to create and
6983 share documents that contain live code, equations, visualizations and
6984 explanatory text. Uses include: data cleaning and transformation, numerical
6985 simulation, statistical modeling, machine learning and much more.")
6986 (license license:bsd-3)))
6987
6988 (define-public python-chardet
6989 (package
6990 (name "python-chardet")
6991 (version "3.0.4")
6992 (source
6993 (origin
6994 (method url-fetch)
6995 (uri (pypi-uri "chardet" version))
6996 (sha256
6997 (base32
6998 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
6999 (native-inputs
7000 `(("python-hypothesis" ,python-hypothesis)
7001 ("python-pytest" ,python-pytest)
7002 ("python-pytest-runner" ,python-pytest-runner)))
7003 (build-system python-build-system)
7004 (home-page "https://github.com/chardet/chardet")
7005 (synopsis "Universal encoding detector for Python 2 and 3")
7006 (description
7007 "This package provides @code{chardet}, a Python module that can
7008 automatically detect a wide range of file encodings.")
7009 (license license:lgpl2.1+)))
7010
7011 (define-public python2-chardet
7012 (package-with-python2 python-chardet))
7013
7014 (define-public python-docopt
7015 (package
7016 (name "python-docopt")
7017 (version "0.6.2")
7018 (source
7019 (origin
7020 (method url-fetch)
7021 ;; The release on PyPI does not include tests.
7022 (uri (string-append
7023 "https://github.com/docopt/docopt/archive/"
7024 version ".tar.gz"))
7025 (file-name (string-append name "-" version ".tar.gz"))
7026 (sha256
7027 (base32
7028 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
7029 (build-system python-build-system)
7030 (native-inputs
7031 `(("python-pytest" ,python-pytest)))
7032 (arguments
7033 `(#:phases
7034 (modify-phases %standard-phases
7035 (replace 'check
7036 (lambda _ (invoke "py.test"))))))
7037 (home-page "http://docopt.org")
7038 (synopsis "Command-line interface description language for Python")
7039 (description "This library allows the user to define a command-line
7040 interface from a program's help message rather than specifying it
7041 programatically with command-line parsers like @code{getopt} and
7042 @code{argparse}.")
7043 (license license:expat)))
7044
7045 (define-public python2-docopt
7046 (package-with-python2 python-docopt))
7047
7048 (define-public python-pythondialog
7049 (package
7050 (name "python-pythondialog")
7051 (version "3.4.0")
7052 (source
7053 (origin
7054 (method url-fetch)
7055 (uri (pypi-uri "pythondialog" version))
7056 (sha256
7057 (base32
7058 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
7059 (build-system python-build-system)
7060 (arguments
7061 `(#:phases
7062 (modify-phases %standard-phases
7063 (add-after 'unpack 'patch-path
7064 (lambda* (#:key inputs #:allow-other-keys)
7065 (let* ((dialog (assoc-ref inputs "dialog")))
7066 ;; Since this library really wants to grovel the search path, we
7067 ;; must hardcode dialog's store path into it.
7068 (substitute* "dialog.py"
7069 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
7070 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
7071 #t))))
7072 #:tests? #f)) ; no test suite
7073 (propagated-inputs
7074 `(("dialog" ,dialog)))
7075 (home-page "http://pythondialog.sourceforge.net/")
7076 (synopsis "Python interface to the UNIX dialog utility")
7077 (description "A Python wrapper for the dialog utility. Its purpose is to
7078 provide an easy to use, pythonic and comprehensive Python interface to dialog.
7079 This allows one to make simple text-mode user interfaces on Unix-like systems")
7080 (license license:lgpl2.1)
7081 (properties `((python2-variant . ,(delay python2-pythondialog))))))
7082
7083 (define-public python2-pythondialog
7084 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
7085 (package
7086 (inherit base)
7087 (version (package-version python-pythondialog))
7088 (source (origin
7089 (method url-fetch)
7090 (uri (pypi-uri "python2-pythondialog" version))
7091 (sha256
7092 (base32
7093 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
7094
7095 (define-public python-configobj
7096 (package
7097 (name "python-configobj")
7098 (version "5.0.6")
7099 (source (origin
7100 (method url-fetch)
7101 (uri (string-append
7102 "https://pypi.python.org/packages/source/c/configobj/"
7103 "configobj-" version ".tar.gz"))
7104 (sha256
7105 (base32
7106 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
7107 ;; Patch setup.py so it looks for python-setuptools, which is
7108 ;; required to parse the keyword 'install_requires' in setup.py.
7109 (patches (search-patches "python-configobj-setuptools.patch"))))
7110 (build-system python-build-system)
7111 (propagated-inputs
7112 `(("python-six" ,python-six)))
7113 (synopsis "Config file reading, writing and validation")
7114 (description "ConfigObj is a simple but powerful config file reader and
7115 writer: an ini file round tripper. Its main feature is that it is very easy to
7116 use, with a straightforward programmer’s interface and a simple syntax for
7117 config files.")
7118 (home-page "https://github.com/DiffSK/configobj")
7119 (license license:bsd-3)))
7120
7121 (define-public python2-configobj
7122 (package-with-python2 python-configobj))
7123
7124 (define-public python-configargparse
7125 (package
7126 (name "python-configargparse")
7127 (version "0.12.0")
7128 (source (origin
7129 (method url-fetch)
7130 (uri (pypi-uri "ConfigArgParse" version))
7131 (sha256
7132 (base32
7133 "0fgkiqh6r3rbkdq3k8c48m85g52k96686rw3a6jg4lcncrkpvk98"))))
7134 (build-system python-build-system)
7135 (native-inputs
7136 `(("python-pyyaml" ,python-pyyaml)))
7137 (arguments
7138 `(#:phases
7139 (modify-phases %standard-phases
7140 (replace 'check
7141 (lambda _
7142 ;; Bypass setuptools-shim because one test relies on "setup.py"
7143 ;; being the first argument passed to the python call.
7144 ;;
7145 ;; NOTE: Many tests do not run because they rely on Python's
7146 ;; built-in test.test_argparse, but we remove the unit tests from
7147 ;; our Python installation.
7148 (invoke "python" "setup.py" "test"))))))
7149 (synopsis "Replacement for argparse")
7150 (description "A drop-in replacement for argparse that allows options to also
7151 be set via config files and/or environment variables.")
7152 (home-page "https://github.com/bw2/ConfigArgParse")
7153 (license license:expat)))
7154
7155 (define-public python2-configargparse
7156 (package-with-python2 python-configargparse))
7157
7158 (define-public python-argparse-manpage
7159 (package
7160 (name "python-argparse-manpage")
7161 (version "1.1")
7162 (source
7163 (origin
7164 (method url-fetch)
7165 (uri (pypi-uri "argparse-manpage" version))
7166 (sha256
7167 (base32
7168 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
7169 (build-system python-build-system)
7170 (home-page "https://github.com/praiskup/argparse-manpage")
7171 (synopsis "Build manual page from Python's ArgumentParser object")
7172 (description
7173 "This package provides tools to build manual pages from Python's
7174 @code{ArgumentParser} object.")
7175 (license license:asl2.0)))
7176
7177 (define-public python2-contextlib2
7178 (package
7179 (name "python2-contextlib2")
7180 (version "0.5.5")
7181 (source
7182 (origin
7183 (method url-fetch)
7184 (uri (pypi-uri "contextlib2" version))
7185 (sha256
7186 (base32
7187 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
7188 (build-system python-build-system)
7189 (arguments
7190 `(#:python ,python-2
7191 #:phases
7192 (modify-phases %standard-phases
7193 (replace 'check
7194 (lambda _ (invoke "python" "test_contextlib2.py" "-v"))))))
7195 (native-inputs
7196 `(("python2-unittest2" ,python2-unittest2)))
7197 (home-page "http://contextlib2.readthedocs.org/")
7198 (synopsis "Tools for decorators and context managers")
7199 (description "This module is primarily a backport of the Python
7200 3.2 contextlib to earlier Python versions. Like contextlib, it
7201 provides utilities for common tasks involving decorators and context
7202 managers. It also contains additional features that are not part of
7203 the standard library.")
7204 (license license:psfl)))
7205
7206 (define-public python-texttable
7207 (package
7208 (name "python-texttable")
7209 (version "0.8.7")
7210 (source
7211 (origin
7212 (method url-fetch)
7213 (uri (pypi-uri "texttable" version))
7214 (sha256
7215 (base32
7216 "1liiiydgkg37i46a418aw19fyf6z3ds51wdwwpyjbs12x0phhf4a"))))
7217 (build-system python-build-system)
7218 (arguments '(#:tests? #f)) ; no tests
7219 (home-page "https://github.com/foutaise/texttable/")
7220 (synopsis "Python module for creating simple ASCII tables")
7221 (description "Texttable is a Python module for creating simple ASCII
7222 tables.")
7223 (license license:lgpl2.1+)))
7224
7225 (define-public python2-texttable
7226 (package-with-python2 python-texttable))
7227
7228 (define-public python-atomicwrites
7229 (package
7230 (name "python-atomicwrites")
7231 (version "1.1.5")
7232 (source (origin
7233 (method url-fetch)
7234 (uri (pypi-uri "atomicwrites" version))
7235 (sha256
7236 (base32
7237 "11bm90fwm2avvf4f3ib8g925w7jr4m11vcsinn1bi6ns4bm32214"))))
7238 (build-system python-build-system)
7239 (synopsis "Atomic file writes in Python")
7240 (description "Library for atomic file writes using platform dependent tools
7241 for atomic file system operations.")
7242 (home-page "https://github.com/untitaker/python-atomicwrites")
7243 (license license:expat)))
7244
7245 (define-public python2-atomicwrites
7246 (package-with-python2 python-atomicwrites))
7247
7248 (define-public python-click-threading
7249 (package
7250 (name "python-click-threading")
7251 (version "0.4.4")
7252 (source (origin
7253 (method url-fetch)
7254 (uri (pypi-uri "click-threading" version))
7255 (sha256
7256 (base32
7257 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
7258 (build-system python-build-system)
7259 (propagated-inputs
7260 `(("python-click" ,python-click)))
7261 (synopsis "Utilities for multithreading in Click")
7262 (description "This package provides utilities for multithreading in Click
7263 applications.")
7264 (home-page "https://github.com/click-contrib/click-threading")
7265 (license license:expat)))
7266
7267 (define-public python-click-log
7268 (package
7269 (name "python-click-log")
7270 (version "0.3.2")
7271 (source (origin
7272 (method url-fetch)
7273 (uri (pypi-uri "click-log" version))
7274 (sha256
7275 (base32
7276 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
7277 (build-system python-build-system)
7278 (propagated-inputs
7279 `(("python-click" ,python-click)))
7280 (synopsis "Logging for click applications")
7281 (description "This package provides a Python library for logging Click
7282 applications.")
7283 (home-page "https://github.com/click-contrib/click-log")
7284 (license license:expat)))
7285
7286 (define-public python-apipkg
7287 (package
7288 (name "python-apipkg")
7289 (version "1.4")
7290 (source (origin
7291 (method url-fetch)
7292 (uri (pypi-uri "apipkg" version))
7293 (sha256
7294 (base32
7295 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
7296 (build-system python-build-system)
7297 (native-inputs
7298 `(("python-pytest" ,python-pytest)))
7299 (synopsis "Namespace control and lazy-import mechanism")
7300 (description "With apipkg you can control the exported namespace of a Python
7301 package and greatly reduce the number of imports for your users. It is a small
7302 pure Python module that works on virtually all Python versions.")
7303 (home-page "https://github.com/pytest-dev/apipkg")
7304 (license license:expat)))
7305
7306 (define-public python2-apipkg
7307 (package-with-python2 python-apipkg))
7308
7309 (define-public python-execnet
7310 (package
7311 (name "python-execnet")
7312 (version "1.4.1")
7313 (source (origin
7314 (method url-fetch)
7315 (uri (pypi-uri "execnet" version))
7316 (sha256
7317 (base32
7318 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
7319 (build-system python-build-system)
7320 (arguments
7321 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
7322 ;; The two test failures are caused by the lack of an `ssh` executable.
7323 ;; The test suite can be run with pytest after the 'install' phase.
7324 #:tests? #f))
7325 (native-inputs
7326 `(("python-pytest" ,python-pytest)
7327 ("python-setuptools-scm" ,python-setuptools-scm)))
7328 (propagated-inputs
7329 `(("python-apipkg" ,python-apipkg)))
7330 (synopsis "Rapid multi-Python deployment")
7331 (description "Execnet provides a share-nothing model with
7332 channel-send/receive communication for distributing execution across many
7333 Python interpreters across version, platform and network barriers. It has a
7334 minimal and fast API targeting the following uses:
7335 @enumerate
7336 @item distribute tasks to (many) local or remote CPUs
7337 @item write and deploy hybrid multi-process applications
7338 @item write scripts to administer multiple environments
7339 @end enumerate")
7340 (home-page "http://codespeak.net/execnet/")
7341 (license license:expat)))
7342
7343 (define-public python2-execnet
7344 (package-with-python2 python-execnet))
7345
7346 (define-public python-icalendar
7347 (package
7348 (name "python-icalendar")
7349 (version "4.0.3")
7350 (source (origin
7351 (method url-fetch)
7352 (uri (pypi-uri "icalendar" version))
7353 (sha256
7354 (base32
7355 "0mk3dk1dxkcm46jy48v27j2w2349iv4sbimqj1yb5js43mx49hh7"))))
7356 (build-system python-build-system)
7357 (propagated-inputs
7358 `(("python-dateutil" ,python-dateutil)
7359 ("python-pytz" ,python-pytz)))
7360 (synopsis "Python library for parsing iCalendar files")
7361 (description "The icalendar package is a parser/generator of iCalendar
7362 files for use with Python.")
7363 (home-page "https://github.com/collective/icalendar")
7364 (license license:bsd-2)))
7365
7366 (define-public python-sphinxcontrib-newsfeed
7367 (package
7368 (name "python-sphinxcontrib-newsfeed")
7369 (version "0.1.4")
7370 (source (origin
7371 (method url-fetch)
7372 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
7373 (sha256
7374 (base32
7375 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
7376 (arguments '(#:tests? #f)) ; No tests.
7377 (build-system python-build-system)
7378 (propagated-inputs
7379 `(("python-sphinx" ,python-sphinx)))
7380 (synopsis "News Feed extension for Sphinx")
7381 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
7382 Blog, News or Announcements section to a Sphinx website.")
7383 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
7384 (license license:bsd-2)))
7385
7386 (define-public python-args
7387 (package
7388 (name "python-args")
7389 (version "0.1.0")
7390 (source (origin
7391 (method url-fetch)
7392 (uri (pypi-uri "args" version))
7393 (sha256
7394 (base32
7395 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
7396 (build-system python-build-system)
7397 (home-page "https://github.com/kennethreitz/args")
7398 (synopsis "Command-line argument parser")
7399 (description
7400 "This library provides a Python module to parse command-line arguments.")
7401 (license license:bsd-3)))
7402
7403 (define-public python2-args
7404 (package-with-python2 python-args))
7405
7406 (define-public python-clint
7407 (package
7408 (name "python-clint")
7409 (version "0.5.1")
7410 (source (origin
7411 (method url-fetch)
7412 (uri (pypi-uri "clint" version))
7413 (sha256
7414 (base32
7415 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
7416 (build-system python-build-system)
7417 (arguments
7418 '(#:phases
7419 (modify-phases %standard-phases
7420 (replace 'check
7421 (lambda _ (invoke "py.test" "-v"))))))
7422 (native-inputs
7423 `(("python-pytest" ,python-pytest)))
7424 (propagated-inputs
7425 `(("python-args" ,python-args)))
7426 (home-page "https://github.com/kennethreitz/clint")
7427 (synopsis "Command-line interface tools")
7428 (description
7429 "Clint is a Python module filled with a set of tools for developing
7430 command-line applications, including tools for colored and indented
7431 output, progress bar display, and pipes.")
7432 (license license:isc)))
7433
7434 (define-public python2-clint
7435 (package-with-python2 python-clint))
7436
7437 (define-public python-astor
7438 (package
7439 (name "python-astor")
7440 (version "0.5")
7441 (source (origin
7442 (method url-fetch)
7443 (uri (pypi-uri "astor" version))
7444 (sha256
7445 (base32
7446 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
7447 (build-system python-build-system)
7448 (home-page "https://github.com/berkerpeksag/astor")
7449 (synopsis "Read and write Python ASTs")
7450 (description
7451 "Astor is designed to allow easy manipulation of Python source via the
7452 Abstract Syntax Tree.")
7453 (license license:bsd-3)))
7454
7455 (define-public python2-astor
7456 (package-with-python2 python-astor))
7457
7458 (define-public python-rply
7459 (package
7460 (name "python-rply")
7461 (version "0.7.5")
7462 (source (origin
7463 (method url-fetch)
7464 (uri (pypi-uri "rply" version))
7465 (sha256
7466 (base32
7467 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
7468 (build-system python-build-system)
7469 (propagated-inputs
7470 `(("python-appdirs" ,python-appdirs)))
7471 (home-page "https://github.com/alex/rply")
7472 (synopsis "Parser generator for Python")
7473 (description
7474 "This package provides a pure Python based parser generator, that also
7475 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
7476 with a new public API, and RPython support.")
7477 (license license:bsd-3)))
7478
7479 (define-public python2-rply
7480 (package-with-python2 python-rply))
7481
7482 (define-public python-hy
7483 (package
7484 (name "python-hy")
7485 (version "0.13.0")
7486 (source (origin
7487 (method url-fetch)
7488 (uri (pypi-uri "hy" version))
7489 (sha256
7490 (base32
7491 "19sfymaksx9jhksfnb15ahid46mzrhdfzz6yy2craz2qnzvpmky8"))))
7492 (build-system python-build-system)
7493 (arguments
7494 '(#:phases
7495 (modify-phases %standard-phases
7496 (replace 'check
7497 (lambda _
7498 ;; Tests require write access to HOME.
7499 (setenv "HOME" "/tmp")
7500 (invoke "nosetests"))))))
7501 (native-inputs
7502 `(("python-coverage" ,python-coverage)
7503 ("python-nose" ,python-nose)))
7504 (propagated-inputs
7505 `(("python-astor" ,python-astor)
7506 ("python-clint" ,python-clint)
7507 ("python-rply" ,python-rply)))
7508 (home-page "http://hylang.org/")
7509 (synopsis "Lisp frontend to Python")
7510 (description
7511 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
7512 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
7513 Python at your fingertips, in Lisp form.")
7514 (license license:expat)))
7515
7516 (define-public python2-hy
7517 (package-with-python2 python-hy))
7518
7519 (define-public python2-functools32
7520 (package
7521 (name "python2-functools32")
7522 (version "3.2.3-2")
7523 (source
7524 (origin
7525 (method url-fetch)
7526 (uri (pypi-uri "functools32" version))
7527 (sha256
7528 (base32
7529 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
7530 (build-system python-build-system)
7531 (arguments
7532 `(#:python ,python-2
7533 #:tests? #f)) ; no test target
7534 (home-page "https://github.com/MiCHiLU/python-functools32")
7535 (synopsis
7536 "Backport of the functools module from Python 3.2.3")
7537 (description
7538 "This package is a backport of the @code{functools} module from Python
7539 3.2.3 for use with older versions of Python and PyPy.")
7540 (license license:expat)))
7541
7542 (define-public python2-subprocess32
7543 (package
7544 (name "python2-subprocess32")
7545 (version "3.2.7")
7546 (source (origin
7547 (method url-fetch)
7548 (uri (pypi-uri "subprocess32" version))
7549 (sha256
7550 (base32
7551 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
7552 (patches
7553 (search-patches "python2-subprocess32-disable-input-test.patch"))))
7554 (build-system python-build-system)
7555 (arguments
7556 `(#:python ,python-2
7557 ;; The test suite fails with Python > 2.7.13:
7558 ;; import test.support
7559 ;; ImportError: No module named support
7560 #:tests? #f
7561 #:phases
7562 (modify-phases %standard-phases
7563 (add-after 'unpack 'patch-/bin/sh
7564 (lambda _
7565 (substitute* '("subprocess32.py"
7566 "test_subprocess32.py")
7567 (("/bin/sh") (which "sh")))
7568 #t)))))
7569 (home-page "https://github.com/google/python-subprocess32")
7570 (synopsis "Backport of the subprocess module from Python 3.2")
7571 (description
7572 "This is a backport of the @code{subprocess} standard library module
7573 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
7574 new features. On POSIX systems it is guaranteed to be reliable when used
7575 in threaded applications. It includes timeout support from Python 3.3 but
7576 otherwise matches 3.2’s API.")
7577 (license license:psfl)))
7578
7579 (define-public python2-futures
7580 (package
7581 (name "python2-futures")
7582 (version "3.2.0")
7583 (source
7584 (origin
7585 (method url-fetch)
7586 (uri (pypi-uri "futures" version))
7587 (sha256
7588 (base32
7589 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
7590 (build-system python-build-system)
7591 (arguments `(#:python ,python-2
7592 ;; FIXME: Python 2.7.14 moved the test.support library,
7593 ;; but our package has not yet been adjusted. Enable
7594 ;; tests when the python2 package has been fixed.
7595 #:tests? #f))
7596 (home-page "https://github.com/agronholm/pythonfutures")
7597 (synopsis
7598 "Backport of the concurrent.futures package from Python 3.2")
7599 (description
7600 "The concurrent.futures module provides a high-level interface for
7601 asynchronously executing callables. This package backports the
7602 concurrent.futures package from Python 3.2")
7603 (license license:bsd-3)))
7604
7605 (define-public python-promise
7606 (package
7607 (name "python-promise")
7608 (version "0.4.2")
7609 (source
7610 (origin
7611 (method url-fetch)
7612 (uri (pypi-uri "promise" version))
7613 (sha256
7614 (base32
7615 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
7616 (build-system python-build-system)
7617 ;; Tests wants python-futures, which is a python2 only program, and
7618 ;; can't be found by python-promise at test time.
7619 (arguments `(#:tests? #f))
7620 (home-page "https://github.com/syrusakbary/promise")
7621 (synopsis "Promises/A+ implementation for Python")
7622 (description
7623 "Promises/A+ implementation for Python")
7624 (properties `((python2-variant . ,(delay python2-promise))))
7625 (license license:expat)))
7626
7627 (define-public python2-promise
7628 (let ((promise (package-with-python2
7629 (strip-python2-variant python-promise))))
7630 (package (inherit promise)
7631 (arguments (substitute-keyword-arguments (package-arguments promise)
7632 ((#:tests? _) #t)))
7633 (native-inputs
7634 `(("python2-futures" ,python2-futures)
7635 ("python2-pytest" ,python2-pytest)
7636 ,@(package-native-inputs promise))))))
7637
7638 (define-public python-colorama
7639 (package
7640 (name "python-colorama")
7641 (version "0.3.9")
7642 (source
7643 (origin
7644 (method url-fetch)
7645 (uri (pypi-uri "colorama" version))
7646 (sha256
7647 (base32
7648 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
7649 (build-system python-build-system)
7650 (synopsis "Colored terminal text rendering for Python")
7651 (description "Colorama is a Python library for rendering colored terminal
7652 text.")
7653 (home-page "https://pypi.python.org/pypi/colorama")
7654 (license license:bsd-3)))
7655
7656 (define-public python2-colorama
7657 (package-with-python2 python-colorama))
7658
7659 (define-public python-rsa
7660 (package
7661 (name "python-rsa")
7662 (version "3.4.2")
7663 (source
7664 (origin
7665 (method url-fetch)
7666 (uri (pypi-uri "rsa" version))
7667 (sha256
7668 (base32
7669 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
7670 (build-system python-build-system)
7671 (propagated-inputs
7672 `(("python-pyasn1" ,python-pyasn1)))
7673 (synopsis "Pure-Python RSA implementation")
7674 (description "Python-RSA is a pure-Python RSA implementation. It supports
7675 encryption and decryption, signing and verifying signatures, and key
7676 generation according to PKCS#1 version 1.5. It can be used as a Python
7677 library as well as on the command line.")
7678 (home-page "https://stuvel.eu/rsa")
7679 (license license:asl2.0)))
7680
7681 (define-public python2-rsa
7682 (package-with-python2 python-rsa))
7683
7684 (define-public python-pluggy
7685 (package
7686 (name "python-pluggy")
7687 (version "0.7.1")
7688 (source
7689 (origin
7690 (method url-fetch)
7691 (uri (pypi-uri "pluggy" version))
7692 (sha256
7693 (base32
7694 "1qbn70mksmr03hac6jgp6fiqc4l7859z8dchx2x950vhlij87swm"))))
7695 (build-system python-build-system)
7696 (native-inputs
7697 `(("python-setuptools-scm" ,python-setuptools-scm)))
7698 (synopsis "Plugin and hook calling mechanism for Python")
7699 (description "Pluggy is an extraction of the plugin manager as used by
7700 Pytest but stripped of Pytest specific details.")
7701 (home-page "https://pypi.python.org/pypi/pluggy")
7702 (license license:expat)))
7703
7704 (define-public python2-pluggy
7705 (package-with-python2 python-pluggy))
7706
7707 (define-public python-tox
7708 (package
7709 (name "python-tox")
7710 (version "2.8.1")
7711 (source
7712 (origin
7713 (method url-fetch)
7714 (uri (pypi-uri "tox" version))
7715 (sha256
7716 (base32
7717 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
7718 (build-system python-build-system)
7719 (arguments
7720 ;; FIXME: Tests require pytest-timeout, which itself requires
7721 ;; pytest>=2.8.0 for installation.
7722 '(#:tests? #f))
7723 (propagated-inputs
7724 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
7725 ("python-py" ,python-py)
7726 ("python-virtualenv" ,python-virtualenv)))
7727 (native-inputs
7728 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
7729 ("python-pytest" ,python-pytest) ; >= 2.3.5
7730 ("python-setuptools-scm" ,python-setuptools-scm)))
7731 (home-page "http://tox.testrun.org/")
7732 (synopsis "Virtualenv-based automation of test activities")
7733 (description "Tox is a generic virtualenv management and test command line
7734 tool. It can be used to check that a package installs correctly with
7735 different Python versions and interpreters, or run tests in each type of
7736 supported environment, or act as a frontend to continuous integration
7737 servers.")
7738 (license license:expat)))
7739
7740 (define-public python2-tox
7741 (package-with-python2 python-tox))
7742
7743 (define-public python-jmespath
7744 (package
7745 (name "python-jmespath")
7746 (version "0.9.3")
7747 (source
7748 (origin
7749 (method url-fetch)
7750 (uri (pypi-uri "jmespath" version))
7751 (sha256
7752 (base32
7753 "0r7wc7fsxmlwzxx9j1j7rms06c6xs6d4sysirdhz1jk2mb4x90ba"))))
7754 (build-system python-build-system)
7755 (native-inputs
7756 `(("python-nose" ,python-nose)))
7757 (synopsis "JSON Matching Expressions")
7758 (description "JMESPath (pronounced “james path”) is a Python library that
7759 allows one to declaratively specify how to extract elements from a JSON
7760 document.")
7761 (home-page "https://github.com/jmespath/jmespath.py")
7762 (license license:expat)))
7763
7764 (define-public python2-jmespath
7765 (package-with-python2 python-jmespath))
7766
7767 (define-public python-botocore
7768 (package
7769 (name "python-botocore")
7770 (version "1.8.43")
7771 (source
7772 (origin
7773 (method url-fetch)
7774 (uri (pypi-uri "botocore" version))
7775 (sha256
7776 (base32
7777 "12cqpbnz3vfv41mp9admvciw7bc7hz57sjpqs2bxaw9wnfmbw5lg"))))
7778 (build-system python-build-system)
7779 (arguments
7780 ;; FIXME: Many tests are failing.
7781 '(#:tests? #f))
7782 (propagated-inputs
7783 `(("python-dateutil" ,python-dateutil)
7784 ("python-docutils" ,python-docutils)
7785 ("python-jmespath" ,python-jmespath)))
7786 (native-inputs
7787 `(("python-mock" ,python-mock)
7788 ("python-nose" ,python-nose)
7789 ("behave" ,behave)
7790 ("python-tox" ,python-tox)
7791 ("python-wheel" ,python-wheel)))
7792 (home-page "https://github.com/boto/botocore")
7793 (synopsis "Low-level interface to AWS")
7794 (description "Botocore is a Python library that provides a low-level
7795 interface to the Amazon Web Services (AWS) API.")
7796 (license license:asl2.0)))
7797
7798 (define-public python2-botocore
7799 (package-with-python2 python-botocore))
7800
7801 (define-public python-xdo
7802 (package
7803 (name "python-xdo")
7804 (version "0.3")
7805 (source (origin
7806 (method url-fetch)
7807 (uri (string-append
7808 "http://http.debian.net/debian/pool/main/p/python-xdo/"
7809 "python-xdo_" version ".orig.tar.gz"))
7810 (sha256
7811 (base32
7812 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
7813 (build-system python-build-system)
7814 (arguments
7815 '(#:phases
7816 (modify-phases %standard-phases
7817 (add-before 'install 'patch-libxdo-path
7818 ;; Hardcode the path of dynamically loaded libxdo library.
7819 (lambda* (#:key inputs #:allow-other-keys)
7820 (let ((libxdo (string-append
7821 (assoc-ref inputs "xdotool")
7822 "/lib/libxdo.so")))
7823 (substitute* "xdo/_xdo.py"
7824 (("find_library\\(\"xdo\"\\)")
7825 (simple-format #f "\"~a\"" libxdo)))
7826 #t))))
7827 #:tests? #f)) ; no tests provided
7828 (propagated-inputs
7829 `(("python-six" ,python-six)))
7830 (inputs
7831 `(("xdotool" ,xdotool)
7832 ("libX11" ,libx11)))
7833 (home-page "https://tracker.debian.org/pkg/python-xdo")
7834 (synopsis "Python library for simulating X11 keyboard/mouse input")
7835 (description "Provides bindings to libxdo for manipulating X11 via simulated
7836 input. (Note that this is mostly a legacy library; you may wish to look at
7837 python-xdo for newer bindings.)")
7838 (license license:bsd-3)))
7839
7840 (define-public python2-xdo
7841 (package-with-python2 python-xdo))
7842
7843 (define-public python-mako
7844 (package
7845 (name "python-mako")
7846 (version "1.0.7")
7847 (source
7848 (origin
7849 (method url-fetch)
7850 (uri (pypi-uri "Mako" version))
7851 (sha256
7852 (base32
7853 "1bi5gnr8r8dva06qpyx4kgjc6spm2k1y908183nbbaylggjzs0jf"))))
7854 (build-system python-build-system)
7855 (propagated-inputs
7856 `(("python-markupsafe" ,python-markupsafe)))
7857 (native-inputs
7858 `(("python-mock" ,python-mock)
7859 ("python-nose" ,python-nose)
7860 ("python-pytest" ,python-pytest)))
7861 (home-page "http://www.makotemplates.org/")
7862 (synopsis "Templating language for Python")
7863 (description "Mako is a templating language for Python that compiles
7864 templates into Python modules.")
7865 (license license:expat)))
7866
7867 (define-public python2-mako
7868 (package-with-python2 python-mako))
7869
7870 (define-public python-waitress
7871 (package
7872 (name "python-waitress")
7873 (version "1.1.0")
7874 (source
7875 (origin
7876 (method url-fetch)
7877 (uri (pypi-uri "waitress" version))
7878 (patches (search-patches "python-waitress-fix-tests.patch"))
7879 (sha256
7880 (base32
7881 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
7882 (build-system python-build-system)
7883 (home-page "https://github.com/Pylons/waitress")
7884 (synopsis "Waitress WSGI server")
7885 (description "Waitress is meant to be a production-quality pure-Python WSGI
7886 server with very acceptable performance.")
7887 (license license:zpl2.1)))
7888
7889 (define-public python2-waitress
7890 (package-with-python2 python-waitress))
7891
7892 (define-public python-pyquery
7893 (package
7894 (name "python-pyquery")
7895 (version "1.2.17")
7896 (source
7897 (origin
7898 (method url-fetch)
7899 (uri (pypi-uri "pyquery" version))
7900 (sha256
7901 (base32
7902 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
7903 (build-system python-build-system)
7904 (native-inputs
7905 `(("python-webob" ,python-webob)
7906 ("python-webtest" ,python-webtest)))
7907 (propagated-inputs
7908 `(("python-lxml" ,python-lxml)
7909 ("python-cssselect" ,python-cssselect)))
7910 (home-page "https://github.com/gawel/pyquery")
7911 (synopsis "Make jQuery-like queries on xml documents")
7912 (description "pyquery allows you to make jQuery queries on xml documents.
7913 The API is as much as possible the similar to jQuery. pyquery uses lxml for
7914 fast xml and html manipulation.")
7915 (license license:bsd-3)))
7916
7917 (define-public python2-pyquery
7918 (package-with-python2 python-pyquery))
7919
7920 (define-public python-anyjson
7921 (package
7922 (name "python-anyjson")
7923 (version "0.3.3")
7924 (source
7925 (origin
7926 (method url-fetch)
7927 (uri (pypi-uri "anyjson" version))
7928 (sha256
7929 (base32
7930 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
7931 (build-system python-build-system)
7932 (arguments
7933 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
7934 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
7935 ;; whatever) so this transformation needs to be done before the tests
7936 ;; can be run. Maybe we could add a build step to transform beforehand
7937 ;; but it could be annoying/difficult.
7938 ;; We can enable tests for the Python 2 version, though, and do below.
7939 #:tests? #f))
7940 (home-page "https://bitbucket.org/runeh/anyjson/")
7941 (synopsis
7942 "Wraps best available JSON implementation in a common interface")
7943 (description
7944 "Anyjson loads whichever is the fastest JSON module installed
7945 and provides a uniform API regardless of which JSON implementation is used.")
7946 (license license:bsd-3)
7947 (properties `((python2-variant . ,(delay python2-anyjson))))))
7948
7949 (define-public python2-anyjson
7950 (let ((anyjson (package-with-python2
7951 (strip-python2-variant python-anyjson))))
7952 (package
7953 (inherit anyjson)
7954 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
7955 #:tests? #t
7956 ,@(package-arguments anyjson)))
7957 (native-inputs `(("python2-nose" ,python2-nose))))))
7958
7959 (define-public python-amqp
7960 (package
7961 (name "python-amqp")
7962 (version "2.3.2")
7963 (source
7964 (origin
7965 (method url-fetch)
7966 (uri (pypi-uri "amqp" version))
7967 (sha256
7968 (base32
7969 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
7970 (build-system python-build-system)
7971 (native-inputs
7972 `(("python-case" ,python-case)
7973 ("python-pytest-sugar" ,python-pytest-sugar)
7974 ("python-mock" ,python-mock)))
7975 (propagated-inputs
7976 `(("python-vine" ,python-vine)))
7977 (home-page "https://github.com/celery/py-amqp")
7978 (synopsis
7979 "Low-level AMQP client for Python (fork of amqplib)")
7980 (description
7981 "This is a fork of amqplib which was originally written by Barry Pederson.
7982 It is maintained by the Celery project, and used by kombu as a pure python
7983 alternative when librabbitmq is not available.")
7984 (license license:lgpl2.1+)
7985 (properties `((python2-variant . ,(delay python2-amqp))))))
7986
7987 (define-public python2-amqp
7988 (let ((amqp (package-with-python2
7989 (strip-python2-variant python-amqp))))
7990 (package
7991 (inherit amqp)
7992 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
7993 ;; unmaintained. Weirdly, does not do this on the python 3
7994 ;; version?
7995 #:tests? #f
7996 ,@(package-arguments amqp))))))
7997
7998 (define-public python-txamqp
7999 (package
8000 (name "python-txamqp")
8001 (version "0.8.2")
8002 (source
8003 (origin
8004 (method url-fetch)
8005 (uri (pypi-uri "txAMQP" version))
8006 (sha256
8007 (base32
8008 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
8009 (build-system python-build-system)
8010 (propagated-inputs
8011 `(("python-six" ,python-six)
8012 ("python-twisted" ,python-twisted)))
8013 (home-page "https://github.com/txamqp/txamqp")
8014 (synopsis "Communicate with AMQP peers and brokers using Twisted")
8015 (description
8016 "This package provides a Python library for communicating with AMQP peers
8017 and brokers using the asynchronous networking framework Twisted. It contains
8018 all the necessary code to connect, send and receive messages to/from an
8019 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
8020 also includes support for using Thrift RPC over AMQP in Twisted
8021 applications.")
8022 (license license:asl2.0)))
8023
8024 (define-public python2-txamqp
8025 (package-with-python2 python-txamqp))
8026
8027 (define-public python-kombu
8028 (package
8029 (name "python-kombu")
8030 (version "4.2.2")
8031 (source
8032 (origin
8033 (method url-fetch)
8034 (uri (pypi-uri "kombu" version))
8035 (sha256
8036 (base32
8037 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
8038 (build-system python-build-system)
8039 (native-inputs
8040 `(("python-mock" ,python-mock)
8041 ("python-case" ,python-case)
8042 ("python-pyro4" ,python-pyro4)
8043 ("python-pytest-sugar" ,python-pytest-sugar)
8044 ("python-pytz" ,python-pytz)))
8045 (propagated-inputs
8046 `(("python-anyjson" ,python-anyjson)
8047 ("python-amqp" ,python-amqp)
8048 ("python-redis" ,python-redis)))
8049 (home-page "https://kombu.readthedocs.io")
8050 (synopsis "Message passing library for Python")
8051 (description "The aim of Kombu is to make messaging in Python as easy as
8052 possible by providing an idiomatic high-level interface for the AMQ protocol,
8053 and also provide proven and tested solutions to common messaging problems.
8054 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
8055 message orientation, queuing, routing, reliability and security, for which the
8056 RabbitMQ messaging server is the most popular implementation.")
8057 (license license:bsd-3)
8058 (properties `((python2-variant . ,(delay python2-kombu))))))
8059
8060 (define-public python2-kombu
8061 (let ((kombu (package-with-python2
8062 (strip-python2-variant python-kombu))))
8063 (package
8064 (inherit kombu)
8065 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
8066 ;; It works fine on the python3 variant.
8067 #:tests? #f
8068 ,@(package-arguments kombu)))
8069 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8070 ,@(package-native-inputs kombu))))))
8071
8072 (define-public python-billiard
8073 (package
8074 (name "python-billiard")
8075 (version "3.5.0.5")
8076 (source
8077 (origin
8078 (method url-fetch)
8079 (uri (pypi-uri "billiard" version))
8080 (sha256
8081 (base32
8082 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
8083 (build-system python-build-system)
8084 (native-inputs
8085 `(("python-case" ,python-case)
8086 ("python-pytest" ,python-pytest)))
8087 (home-page "https://github.com/celery/billiard")
8088 (synopsis
8089 "Python multiprocessing fork with improvements and bugfixes")
8090 (description
8091 "Billiard is a fork of the Python 2.7 multiprocessing package. The
8092 multiprocessing package itself is a renamed and updated version of R Oudkerk's
8093 pyprocessing package. This standalone variant is intended to be compatible with
8094 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
8095 (license license:bsd-3)
8096 (properties `((python2-variant . ,(delay python2-billiard))))))
8097
8098 (define-public python2-billiard
8099 (let ((billiard (package-with-python2
8100 (strip-python2-variant python-billiard))))
8101 (package
8102 (inherit billiard)
8103 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8104 ("python2-mock" ,python2-mock)
8105 ,@(package-native-inputs billiard))))))
8106
8107 (define-public python-celery
8108 (package
8109 (name "python-celery")
8110 (version "4.2.1")
8111 (source
8112 (origin
8113 (method url-fetch)
8114 (uri (pypi-uri "celery" version))
8115 (sha256
8116 (base32
8117 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
8118 (build-system python-build-system)
8119 (arguments
8120 '(;; TODO The tests fail with Python 3.7
8121 ;; https://github.com/celery/celery/issues/4849
8122 #:tests? #f
8123 #:phases
8124 (modify-phases %standard-phases
8125 (add-after 'unpack 'patch-requirements
8126 (lambda _
8127 (substitute* "requirements/test.txt"
8128 (("pytest>=3\\.0,<3\\.3")
8129 "pytest>=3.0"))
8130 #t)))))
8131 (native-inputs
8132 `(("python-case" ,python-case)
8133 ("python-pytest" ,python-pytest)))
8134 (propagated-inputs
8135 `(("python-pytz" ,python-pytz)
8136 ("python-billiard" ,python-billiard)
8137 ("python-kombu" ,python-kombu)))
8138 (home-page "https://celeryproject.org")
8139 (synopsis "Distributed Task Queue")
8140 (description "Celery is an asynchronous task queue/job queue based on
8141 distributed message passing. It is focused on real-time operation, but
8142 supports scheduling as well. The execution units, called tasks, are executed
8143 concurrently on a single or more worker servers using multiprocessing,
8144 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
8145 synchronously (wait until ready).")
8146 (license license:bsd-3)
8147 (properties `((python2-variant . ,(delay python2-celery))))))
8148
8149 (define-public python2-celery
8150 (let ((celery (package-with-python2
8151 (strip-python2-variant python-celery))))
8152 (package
8153 (inherit celery)
8154 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8155 ("python2-mock" ,python2-mock)
8156 ,@(package-native-inputs celery))))))
8157
8158 (define-public python-translitcodec
8159 (package
8160 (name "python-translitcodec")
8161 (version "0.4.0")
8162 (source
8163 (origin
8164 (method url-fetch)
8165 (uri (pypi-uri "translitcodec" version))
8166 (sha256
8167 (base32
8168 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
8169 (build-system python-build-system)
8170 (arguments
8171 `(#:tests? #f)) ; no tests provided
8172 (home-page
8173 "https://github.com/claudep/translitcodec")
8174 (synopsis
8175 "Unicode to 8-bit charset transliteration codec")
8176 (description
8177 "This package contains codecs for transliterating ISO 10646 texts into
8178 best-effort representations using smaller coded character sets (ASCII,
8179 ISO 8859, etc.).")
8180 (license license:expat)))
8181
8182 (define-public python2-translitcodec
8183 (package-with-python2 python-translitcodec))
8184
8185 (define-public python-editor
8186 (package
8187 (name "python-editor")
8188 (version "0.5")
8189 (source
8190 (origin
8191 (method url-fetch)
8192 (uri (pypi-uri "python-editor" version))
8193 (sha256
8194 (base32
8195 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
8196 (build-system python-build-system)
8197 (home-page
8198 "https://github.com/fmoo/python-editor")
8199 (synopsis
8200 "Programmatically open an editor, capture the result")
8201 (description
8202 "python-editor is a library that provides the editor module for
8203 programmatically interfacing with your system's $EDITOR.")
8204 (license license:asl2.0)))
8205
8206 (define-public python2-editor
8207 (package-with-python2 python-editor))
8208
8209 (define-public python-sphinxcontrib-programoutput
8210 (package
8211 (name "python-sphinxcontrib-programoutput")
8212 (version "0.10")
8213 (source (origin
8214 (method url-fetch)
8215 (uri (pypi-uri "sphinxcontrib-programoutput" version))
8216 (sha256
8217 (base32
8218 "153hhnlbx4688zj9wd64819ps5znc2jlyp5crkgzvn5hxgy99vpx"))))
8219 (build-system python-build-system)
8220 (arguments
8221 ;; FIXME: Many tests are failing and the upstream is gone.
8222 '(#:tests? #f))
8223 (propagated-inputs
8224 `(("python-sphinx" ,python-sphinx)))
8225 (synopsis "Sphinx extension to include program output")
8226 (description "A Sphinx extension to literally insert the output of arbitrary
8227 commands into documents, helping you to keep your command examples up to date.")
8228 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
8229 (license license:bsd-2)))
8230
8231 (define-public python2-sphinxcontrib-programoutput
8232 (package-with-python2 python-sphinxcontrib-programoutput))
8233
8234 (define-public python-sphinx-repoze-autointerface
8235 (package
8236 (name "python-sphinx-repoze-autointerface")
8237 (version "0.8")
8238 (source (origin
8239 (method url-fetch)
8240 (uri (pypi-uri "repoze.sphinx.autointerface" version))
8241 (sha256
8242 (base32
8243 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
8244 (build-system python-build-system)
8245 (arguments '(#:tests? #f)) ; No tests.
8246 (propagated-inputs
8247 `(("python-sphinx" ,python-sphinx)
8248 ("python-zope-interface" ,python-zope-interface)))
8249 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
8250 (description "This package defines an extension for the Sphinx documentation
8251 system. The extension allows generation of API documentation by
8252 introspection of @code{zope.interface} instances in code.")
8253 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
8254 (license license:repoze)))
8255
8256 (define-public python2-sphinx-repoze-autointerface
8257 (package-with-python2 python-sphinx-repoze-autointerface))
8258
8259 (define-public python-vobject
8260 (package
8261 (name "python-vobject")
8262 (version "0.9.5")
8263 (source (origin
8264 (method url-fetch)
8265 (uri (pypi-uri "vobject" version))
8266 (sha256
8267 (base32
8268 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
8269 (build-system python-build-system)
8270 (arguments
8271 '(;; The test suite relies on some non-portable Windows interfaces.
8272 #:tests? #f))
8273 (propagated-inputs
8274 `(("python-dateutil" ,python-dateutil)
8275 ("python-pyicu" ,python-pyicu)))
8276 (synopsis "Parse and generate vCard and vCalendar files")
8277 (description "Vobject is intended to be a full featured Python package for
8278 parsing and generating vCard and vCalendar files. Currently, iCalendar files
8279 are supported and well tested. vCard 3.0 files are supported, and all data
8280 should be imported, but only a few components are understood in a sophisticated
8281 way.")
8282 (home-page "http://eventable.github.io/vobject/")
8283 (license license:asl2.0)))
8284
8285 (define-public python2-vobject
8286 (package-with-python2 python-vobject))
8287
8288 (define-public python-munkres
8289 (package
8290 (name "python-munkres")
8291 (version "1.0.8")
8292 (source (origin
8293 (method url-fetch)
8294 (uri (pypi-uri "munkres" version))
8295 (sha256
8296 (base32
8297 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
8298 (build-system python-build-system)
8299 (arguments
8300 '(#:tests? #f)) ; no test suite
8301 (home-page "http://software.clapper.org/munkres/")
8302 (synopsis "Implementation of the Munkres algorithm")
8303 (description "The Munkres module provides an implementation of the Munkres
8304 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
8305 useful for solving the Assignment Problem.")
8306 (license license:bsd-3)))
8307
8308 (define-public python2-munkres
8309 (package-with-python2 python-munkres))
8310
8311 (define-public python-whoosh
8312 (package
8313 (name "python-whoosh")
8314 (version "2.7.4")
8315 (source
8316 (origin
8317 (method url-fetch)
8318 (uri (pypi-uri "Whoosh" version))
8319 (sha256
8320 (base32
8321 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
8322 (build-system python-build-system)
8323 (native-inputs
8324 `(("python-pytest" ,python-pytest)))
8325 (home-page "https://bitbucket.org/mchaput/whoosh")
8326 (synopsis "Full text indexing, search, and spell checking library")
8327 (description
8328 "Whoosh is a fast, pure-Python full text indexing, search, and spell
8329 checking library.")
8330 (license license:bsd-2)))
8331
8332 (define-public python2-whoosh
8333 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
8334 (package (inherit whoosh)
8335 (propagated-inputs
8336 `(("python2-backport-ssl-match-hostname"
8337 ,python2-backport-ssl-match-hostname)
8338 ,@(package-propagated-inputs whoosh))))))
8339
8340 (define-public python-pathlib
8341 (package
8342 (name "python-pathlib")
8343 (version "1.0.1")
8344 (source (origin
8345 (method url-fetch)
8346 (uri (pypi-uri "pathlib" version))
8347 (sha256
8348 (base32
8349 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
8350 (build-system python-build-system)
8351 ;; The tests depend on the internal "test" module, which does not provide
8352 ;; a stable interface.
8353 (arguments `(#:tests? #f))
8354 (home-page "https://pathlib.readthedocs.org/")
8355 (synopsis "Object-oriented file system paths")
8356 (description "Pathlib offers a set of classes to handle file system paths.
8357 It offers the following advantages over using string objects:
8358
8359 @enumerate
8360 @item No more cumbersome use of os and os.path functions. Everything can
8361 be done easily through operators, attribute accesses, and method calls.
8362 @item Embodies the semantics of different path types. For example,
8363 comparing Windows paths ignores casing.
8364 @item Well-defined semantics, eliminating any inconsistencies or
8365 ambiguities (forward vs. backward slashes, etc.).
8366 @end enumerate
8367
8368 Note: In Python 3.4, pathlib is now part of the standard library. For other
8369 Python versions please consider python-pathlib2 instead, which tracks the
8370 standard library module. This module (python-pathlib) isn't maintained
8371 anymore.")
8372 (license license:expat)))
8373
8374 (define-public python2-pathlib
8375 (package-with-python2 python-pathlib))
8376
8377 (define-public python2-pathlib2
8378 (package
8379 (name "python2-pathlib2")
8380 (version "2.3.2")
8381 (source (origin
8382 (method url-fetch)
8383 (uri (pypi-uri "pathlib2" version))
8384 (sha256
8385 (base32
8386 "10yb0iv5x2hs631rcppkhbddx799d3h8pcwmkbh2a66ns3w71ccf"))))
8387 (build-system python-build-system)
8388 ;; We only need the the Python 2 variant, since for Python 3 our minimum
8389 ;; version is 3.4 which already includes this package as part of the
8390 ;; standard library.
8391 (arguments
8392 `(#:python ,python-2))
8393 (propagated-inputs
8394 `(("python2-scandir" ,python2-scandir)
8395 ("python2-six" ,python2-six)))
8396 (home-page "https://pypi.python.org/pypi/pathlib2/")
8397 (synopsis "Object-oriented file system paths - backport of standard
8398 pathlib module")
8399 (description "The goal of pathlib2 is to provide a backport of standard
8400 pathlib module which tracks the standard library module, so all the newest
8401 features of the standard pathlib can be used also on older Python versions.
8402
8403 Pathlib offers a set of classes to handle file system paths. It offers the
8404 following advantages over using string objects:
8405
8406 @enumerate
8407 @item No more cumbersome use of os and os.path functions. Everything can
8408 be done easily through operators, attribute accesses, and method calls.
8409 @item Embodies the semantics of different path types. For example,
8410 comparing Windows paths ignores casing.
8411 @item Well-defined semantics, eliminating any inconsistencies or
8412 ambiguities (forward vs. backward slashes, etc.).
8413 @end enumerate")
8414 (license license:expat)))
8415
8416 (define-public python2-pathlib2-bootstrap
8417 (hidden-package
8418 (package
8419 (inherit python2-pathlib2)
8420 (name "python2-pathlib2-bootstrap")
8421 (propagated-inputs
8422 `(("python2-scandir" ,python2-scandir)
8423 ("python2-six" ,python2-six-bootstrap))))))
8424
8425 (define-public python-jellyfish
8426 (package
8427 (name "python-jellyfish")
8428 (version "0.5.6")
8429 (source (origin
8430 (method url-fetch)
8431 (uri (pypi-uri "jellyfish" version))
8432 (sha256
8433 (base32
8434 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
8435 (build-system python-build-system)
8436 (native-inputs
8437 `(("python-pytest" ,python-pytest)))
8438 (home-page "https://github.com/jamesturk/jellyfish")
8439 (synopsis "Approximate and phonetic matching of strings")
8440 (description "Jellyfish uses a variety of string comparison and phonetic
8441 encoding algorithms to do fuzzy string matching.")
8442 (license license:bsd-2)
8443 (properties `((python2-variant . ,(delay python2-jellyfish))))))
8444
8445 (define-public python2-jellyfish
8446 (let ((jellyfish (package-with-python2
8447 (strip-python2-variant python-jellyfish))))
8448 (package (inherit jellyfish)
8449 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
8450 ,@(package-native-inputs jellyfish))))))
8451
8452 (define-public python2-unicodecsv
8453 (package
8454 (name "python2-unicodecsv")
8455 (version "0.14.1")
8456 (source (origin
8457 (method url-fetch)
8458 ;; The test suite is not included in the PyPi release.
8459 ;; https://github.com/jdunck/python-unicodecsv/issues/19
8460 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
8461 "archive/" version ".tar.gz"))
8462 (file-name (string-append name "-" version ".tar.gz"))
8463 (sha256
8464 (base32
8465 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
8466 (build-system python-build-system)
8467 (arguments
8468 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
8469 #:python ,python-2))
8470 (native-inputs
8471 `(("python2-unittest2" ,python2-unittest2)))
8472 (home-page "https://github.com/jdunck/python-unicodecsv")
8473 (synopsis "Unicode CSV module for Python 2")
8474 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
8475 module, adding support for Unicode strings.")
8476 (license license:bsd-2)))
8477
8478 (define-public python-rarfile
8479 (package
8480 (name "python-rarfile")
8481 (version "2.8")
8482 (source (origin
8483 (method url-fetch)
8484 (uri (pypi-uri "rarfile" version))
8485 (sha256
8486 (base32
8487 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
8488 (build-system python-build-system)
8489 (arguments
8490 '(#:phases
8491 (modify-phases %standard-phases
8492 (replace 'check
8493 ;; Many tests fail, but the installation proceeds.
8494 (lambda _ (zero? (system* "make" "-C" "test" "test")))))))
8495 (native-inputs
8496 `(("which" ,which))) ; required for tests
8497 (propagated-inputs
8498 `(("libarchive" ,libarchive)))
8499 (home-page "https://github.com/markokr/rarfile")
8500 (synopsis "RAR archive reader for Python")
8501 (description "This is Python module for RAR archive reading. The interface
8502 is made as zipfile like as possible.")
8503 (license license:isc)))
8504
8505 (define-public python2-rarfile
8506 (package-with-python2 python-rarfile))
8507
8508 (define-public python-magic
8509 (package
8510 (name "python-magic")
8511 (version "0.4.15")
8512 (source
8513 (origin
8514 (method url-fetch)
8515 (uri (pypi-uri "python-magic" version))
8516 (sha256
8517 (base32
8518 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
8519 (file-name (string-append name "-" version "-checkout"))))
8520 (build-system python-build-system)
8521 (arguments
8522 ;; The tests are unreliable, so don't run them. The tests fail
8523 ;; under Python3 because they were written for Python2 and
8524 ;; contain import statements that do not work in Python3. One of
8525 ;; the tests fails under Python2 because its assertions are
8526 ;; overly stringent; it relies on comparing output strings which
8527 ;; are brittle and can change depending on the version of
8528 ;; libmagic being used and the system on which the test is
8529 ;; running. In my case, under GuixSD 0.10.0, only one test
8530 ;; failed, and it seems to have failed only because the version
8531 ;; of libmagic that is packaged in Guix outputs a slightly
8532 ;; different (but not wrong) string than the one that the test
8533 ;; expected.
8534 '(#:tests? #f
8535 #:phases (modify-phases %standard-phases
8536 ;; Replace a specific method call with a hard-coded
8537 ;; path to the necessary libmagic.so file in the
8538 ;; store. If we don't do this, then the method call
8539 ;; will fail to find the libmagic.so file, which in
8540 ;; turn will cause any application using
8541 ;; python-magic to fail.
8542 (add-before 'build 'hard-code-path-to-libmagic
8543 (lambda* (#:key inputs #:allow-other-keys)
8544 (let ((file (assoc-ref inputs "file")))
8545 (substitute* "magic.py"
8546 (("ctypes.util.find_library\\('magic'\\)")
8547 (string-append "'" file "/lib/libmagic.so'")))
8548 #t)))
8549 (add-before 'install 'disable-egg-compression
8550 (lambda _
8551 (let ((port (open-file "setup.cfg" "a")))
8552 (display "\n[easy_install]\nzip_ok = 0\n"
8553 port)
8554 (close-port port)
8555 #t))))))
8556 (inputs
8557 ;; python-magic needs to be able to find libmagic.so.
8558 `(("file" ,file)))
8559 (home-page
8560 "https://github.com/ahupp/python-magic")
8561 (synopsis
8562 "File type identification using libmagic")
8563 (description
8564 "This module uses ctypes to access the libmagic file type
8565 identification library. It makes use of the local magic database and
8566 supports both textual and MIME-type output. Note that this module and
8567 the python-file module both provide a \"magic.py\" file; these two
8568 modules, which are different and were developed separately, both serve
8569 the same purpose: to provide Python bindings for libmagic.")
8570 (license license:expat)))
8571
8572 (define-public python2-magic
8573 (package-with-python2 python-magic))
8574
8575 (define-public python2-s3cmd
8576 (package
8577 (name "python2-s3cmd")
8578 (version "1.6.1")
8579 (source
8580 (origin
8581 (method url-fetch)
8582 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
8583 "s3cmd-" version ".tar.gz"))
8584 (sha256
8585 (base32
8586 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
8587 (build-system python-build-system)
8588 (arguments
8589 ;; s3cmd is written for python2 only and contains no tests.
8590 `(#:python ,python-2
8591 #:tests? #f))
8592 (propagated-inputs
8593 `(("python2-dateutil" ,python2-dateutil)
8594 ;; The python-file package also provides a magic.py module.
8595 ;; This is an unfortunate state of affairs; however, s3cmd
8596 ;; fails to install if it cannot find specifically the
8597 ;; python-magic package. Thus we include it, instead of using
8598 ;; python-file. Ironically, s3cmd sometimes works better
8599 ;; without libmagic bindings at all:
8600 ;; https://github.com/s3tools/s3cmd/issues/198
8601 ("python2-magic" ,python2-magic)))
8602 (home-page "http://s3tools.org/s3cmd")
8603 (synopsis "Command line tool for S3-compatible storage services")
8604 (description
8605 "S3cmd is a command line tool for uploading, retrieving and managing data
8606 in storage services that are compatible with the Amazon Simple Storage
8607 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
8608 GnuPG encryption, and more. It also supports management of Amazon's
8609 CloudFront content delivery network.")
8610 (license license:gpl2+)))
8611
8612 (define-public python-pkgconfig
8613 (package
8614 (name "python-pkgconfig")
8615 (version "1.3.1")
8616 (source
8617 (origin
8618 (method url-fetch)
8619 (uri (pypi-uri "pkgconfig" version))
8620 (sha256
8621 (base32
8622 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
8623 (build-system python-build-system)
8624 (native-inputs
8625 `(("python-nose" ,python-nose)))
8626 (inputs
8627 `(("pkg-config" ,pkg-config)))
8628 (arguments
8629 `(#:phases
8630 (modify-phases %standard-phases
8631 (add-before 'build 'patch
8632 ;; Hard-code the path to pkg-config.
8633 (lambda _
8634 (substitute* "pkgconfig/pkgconfig.py"
8635 (("cmd = 'pkg-config")
8636 (string-append "cmd = '" (which "pkg-config"))))
8637 #t))
8638 (replace 'check
8639 (lambda _
8640 (invoke "nosetests" "test.py"))))))
8641 (home-page "https://github.com/matze/pkgconfig")
8642 (synopsis "Python interface for pkg-config")
8643 (description "This module provides a Python interface to pkg-config. It
8644 can be used to find all pkg-config packages, check if a package exists,
8645 check if a package meets certain version requirements, query CFLAGS and
8646 LDFLAGS and parse the output to build extensions with setup.py.")
8647 (license license:expat)))
8648
8649 (define-public python2-pkgconfig
8650 (package-with-python2 python-pkgconfig))
8651
8652 (define-public python-bz2file
8653 (package
8654 (name "python-bz2file")
8655 (version "0.98")
8656 (source
8657 (origin
8658 (method url-fetch)
8659 (uri (pypi-uri "bz2file" version))
8660 (sha256
8661 (base32
8662 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
8663 (build-system python-build-system)
8664 (arguments
8665 `(#:tests? #f)) ; Tests use deprecated python modules.
8666 (home-page "https://github.com/nvawda/bz2file")
8667 (synopsis "Read and write bzip2-compressed files")
8668 (description
8669 "Bz2file is a Python library for reading and writing bzip2-compressed
8670 files. It contains a drop-in replacement for the I/O interface in the
8671 standard library's @code{bz2} module, including features from the latest
8672 development version of CPython that are not available in older releases.")
8673 (license license:asl2.0)))
8674
8675 (define-public python2-bz2file
8676 (package-with-python2 python-bz2file))
8677
8678 (define-public python-future
8679 (package
8680 (name "python-future")
8681 (version "0.16.0")
8682 (source
8683 (origin
8684 (method url-fetch)
8685 (uri (pypi-uri "future" version))
8686 (sha256
8687 (base32
8688 "1nzy1k4m9966sikp0qka7lirh8sqrsyainyf8rk97db7nwdfv773"))))
8689 (build-system python-build-system)
8690 ;; Many tests connect to the network or are otherwise flawed.
8691 ;; https://github.com/PythonCharmers/python-future/issues/210
8692 (arguments
8693 `(#:tests? #f))
8694 (home-page "http://python-future.org")
8695 (synopsis "Single-source support for Python 3 and 2")
8696 (description
8697 "@code{python-future} is the missing compatibility layer between Python 2 and
8698 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
8699 to support both Python 2 and Python 3 with minimal overhead.")
8700 (license license:expat)))
8701
8702 (define-public python2-future
8703 (package-with-python2 python-future))
8704
8705 (define-public python-cysignals
8706 (package
8707 (name "python-cysignals")
8708 (version "1.9.0")
8709 (source
8710 (origin
8711 (method url-fetch)
8712 (uri (pypi-uri "cysignals" version))
8713 (sha256
8714 (base32
8715 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
8716 (build-system python-build-system)
8717 (native-inputs
8718 `(("python-cython" ,python-cython)
8719 ("python-sphinx" ,python-sphinx)))
8720 (inputs
8721 `(("pari-gp" ,pari-gp)))
8722 (arguments
8723 `(#:modules ((guix build python-build-system)
8724 ((guix build gnu-build-system) #:prefix gnu:)
8725 (guix build utils))
8726 ;; FIXME: Tests are executed after installation and currently fail
8727 ;; when not installing into standard locations; the author is working
8728 ;; on a fix.
8729 #:tests? #f
8730 #:phases
8731 (modify-phases %standard-phases
8732 (add-before
8733 'build 'configure
8734 (assoc-ref gnu:%standard-phases 'configure)))))
8735 (home-page
8736 "https://github.com/sagemath/cysignals")
8737 (synopsis
8738 "Handling of interrupts and signals for Cython")
8739 (description
8740 "The cysignals package provides mechanisms to handle interrupts (and
8741 other signals and errors) in Cython code, using two related approaches,
8742 for mixed Cython/Python code or external C libraries and pure Cython code,
8743 respectively.")
8744 (license license:lgpl3+)))
8745
8746 (define-public python2-cysignals
8747 (package-with-python2 python-cysignals))
8748
8749 (define-public python2-shedskin
8750 (package
8751 (name "python2-shedskin")
8752 (version "0.9.4")
8753 (source
8754 (origin
8755 (method url-fetch)
8756 (uri (string-append "https://github.com/shedskin/shedskin/"
8757 "releases/download/v" version
8758 "/shedskin-" version ".tgz"))
8759 (sha256
8760 (base32
8761 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
8762 (build-system python-build-system)
8763 (arguments
8764 `(#:python ,python-2
8765 #:phases (modify-phases %standard-phases
8766 (add-after 'unpack 'fix-resulting-include-libs
8767 (lambda* (#:key inputs #:allow-other-keys)
8768 (let ((libgc (assoc-ref inputs "libgc"))
8769 (pcre (assoc-ref inputs "pcre")))
8770 (substitute* "shedskin/makefile.py"
8771 (("variable == 'CCFLAGS':[ ]*")
8772 (string-append "variable == 'CCFLAGS':\n"
8773 " line += ' -I " pcre "/include"
8774 " -I " libgc "/include'"))
8775 (("variable == 'LFLAGS':[ ]*")
8776 (string-append "variable == 'LFLAGS':\n"
8777 " line += ' -L" pcre "/lib"
8778 " -L " libgc "/lib'")))
8779 #t))))))
8780 (inputs `(("pcre" ,pcre)
8781 ("libgc" ,libgc)))
8782 (home-page "https://shedskin.github.io/")
8783 (synopsis "Experimental Python-2 to C++ Compiler")
8784 (description (string-append "This is an experimental compiler for a subset of
8785 Python. It generates C++ code and a Makefile."))
8786 (license (list license:gpl3 license:bsd-3 license:expat))))
8787
8788 (define-public python2-rope
8789 (package
8790 (name "python2-rope")
8791 (version "0.10.3")
8792 (source
8793 (origin
8794 (method url-fetch)
8795 (uri (pypi-uri "rope" version))
8796 (sha256
8797 (base32
8798 "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
8799 (arguments
8800 ;; Rope is currently python-2 only.
8801 ;; https://github.com/python-rope/rope/issues/57
8802 `(#:python ,python-2))
8803 (build-system python-build-system)
8804 (native-inputs
8805 `(("python2-unittest2" ,python2-unittest2)))
8806 (home-page "https://github.com/python-rope/rope")
8807 (synopsis "Refactoring library for Python")
8808 (description "Rope is a refactoring library for Python. It facilitates
8809 the renaming, moving and extracting of attributes, functions, modules, fields
8810 and parameters in Python 2 source code. These refactorings can also be applied
8811 to occurrences in strings and comments.")
8812 (license license:gpl2)))
8813
8814 (define-public python-py3status
8815 (package
8816 (name "python-py3status")
8817 (version "3.7")
8818 (source
8819 (origin
8820 (method url-fetch)
8821 (uri (pypi-uri "py3status" version))
8822 (sha256
8823 (base32
8824 "0shxcfz4wcczj0mhwp4w0dvwd2fdd9bgprq8slim1519iiqzgwhq"))))
8825 (build-system python-build-system)
8826 (inputs
8827 `(("file" ,file)))
8828 (arguments
8829 '(#:phases
8830 (modify-phases %standard-phases
8831 ;; 'file' is used for detection of configuration file encoding
8832 ;; let's make link the dependency to particular input
8833 (add-before 'build 'patch-file-path
8834 (lambda* (#:key inputs #:allow-other-keys)
8835 (let ((file-path (assoc-ref inputs "file")))
8836 (substitute* "py3status/parse_config.py"
8837 (("\\['file', '-b'")
8838 (string-append "['" file-path "/bin/file', '-b'")))
8839 #t))))
8840 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
8841 (home-page "https://github.com/ultrabug/py3status")
8842 (synopsis "Extensible i3status wrapper written in Python")
8843 (description "py3status is an i3status wrapper which extends i3status
8844 functionality in a modular way, allowing you to extend your panel with your
8845 own code, responding to click events and updating clock every second.")
8846 (license license:bsd-3)))
8847
8848 (define-public python-tblib
8849 (package
8850 (name "python-tblib")
8851 (version "1.3.2")
8852 (source (origin
8853 (method url-fetch)
8854 (uri (pypi-uri "tblib" version))
8855 (sha256 (base32
8856 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
8857 (build-system python-build-system)
8858 (arguments
8859 `(#:phases
8860 (modify-phases %standard-phases
8861 (add-before 'check 'adjust-tests
8862 (lambda _
8863 (when (which "python3")
8864 ;; Adjust the example output to match that of Python 3.7:
8865 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
8866 (substitute* "README.rst"
8867 (("Exception\\('fail',") "Exception('fail'"))
8868 #t)))
8869 (replace 'check
8870 (lambda _
8871 ;; Upstream runs tests after installation and the package itself
8872 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
8873 ;; found.
8874 (setenv "PYTHONPATH"
8875 (string-append (getcwd) "/build/lib:"
8876 (getenv "PYTHONPATH")))
8877 (invoke "py.test" "-vv" "tests" "README.rst"))))))
8878 (native-inputs
8879 `(("python-pytest" ,python-pytest)
8880 ("python-six" ,python-six)))
8881 (home-page "https://github.com/ionelmc/python-tblib")
8882 (synopsis "Traceback serialization library")
8883 (description
8884 "Traceback serialization allows you to:
8885
8886 @enumerate
8887 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
8888 different processes. This allows better error handling when running code over
8889 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
8890
8891 @item Parse traceback strings and raise with the parsed tracebacks.
8892 @end enumerate\n")
8893 (license license:bsd-3)))
8894
8895 (define-public python2-tblib
8896 (package-with-python2 python-tblib))
8897
8898 (define-public python-greenlet
8899 (package
8900 (name "python-greenlet")
8901 (version "0.4.15")
8902 (source (origin
8903 (method url-fetch)
8904 (uri (pypi-uri "greenlet" version))
8905 (sha256
8906 (base32
8907 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
8908 (build-system python-build-system)
8909 (home-page "https://greenlet.readthedocs.io/")
8910 (synopsis "Lightweight in-process concurrent programming")
8911 (description
8912 "Greenlet package is a spin-off of Stackless, a version of CPython
8913 that supports micro-threads called \"tasklets\". Tasklets run
8914 pseudo-concurrently (typically in a single or a few OS-level threads) and
8915 are synchronized with data exchanges on \"channels\".")
8916 (license (list license:psfl license:expat))))
8917
8918 (define-public python2-greenlet
8919 (package-with-python2 python-greenlet))
8920
8921 (define-public python-objgraph
8922 (package
8923 (name "python-objgraph")
8924 (version "3.4.0")
8925 (source
8926 (origin
8927 (method url-fetch)
8928 (uri (pypi-uri "objgraph" version))
8929 (sha256
8930 (base32
8931 "184m09am5gpbqfaiy7l0hwh476mczbrly1dffs0rw2p1d1i2q32a"))))
8932 (build-system python-build-system)
8933 (propagated-inputs
8934 `(("python-graphviz" ,python-graphviz)))
8935 (native-inputs
8936 `(("python-mock" ,python-mock)
8937 ("graphviz" ,graphviz)))
8938 (home-page "https://mg.pov.lt/objgraph/")
8939 (synopsis "Draw Python object reference graphs with graphviz")
8940 (description
8941 "This package provides tools to draw Python object reference graphs with
8942 graphviz.")
8943 (license license:expat)))
8944
8945 (define-public python-gevent
8946 (package
8947 (name "python-gevent")
8948 (version "1.3.7")
8949 (source (origin
8950 (method url-fetch)
8951 (uri (pypi-uri "gevent" version))
8952 (sha256
8953 (base32
8954 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
8955 (modules '((guix build utils)))
8956 (snippet
8957 '(begin
8958 ;; unbunding libev and c-ares
8959 (delete-file-recursively "deps")
8960 #t))))
8961 (build-system python-build-system)
8962 (arguments
8963 `(#:modules ((ice-9 ftw)
8964 (ice-9 match)
8965 (srfi srfi-26)
8966 (guix build utils)
8967 (guix build python-build-system))
8968 #:phases (modify-phases %standard-phases
8969 (add-after 'unpack 'unpack-libev
8970 (lambda* (#:key inputs #:allow-other-keys)
8971 (mkdir-p "deps/libev")
8972 ;; FIXME: gevent requires building libev, even though
8973 ;; it only links against the proper one.
8974 (invoke "tar" "-xf" (assoc-ref inputs "libev-source")
8975 "--strip-components=1" "-C" "deps/libev")))
8976 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
8977 (lambda _
8978 (substitute* "src/gevent/subprocess.py"
8979 (("/bin/sh") (which "sh")))
8980 (for-each (lambda (file)
8981 (substitute* file
8982 (("/bin/sh") (which "sh"))
8983 (("/bin/true") (which "true"))))
8984 (find-files "src/greentest" "\\.py$"))
8985 #t))
8986 (add-before 'build 'do-not-use-bundled-sources
8987 (lambda* (#:key inputs #:allow-other-keys)
8988 (setenv "CONFIG_SHELL" (which "bash"))
8989 (setenv "LIBEV_EMBED" "false")
8990 (setenv "CARES_EMBED" "false")
8991 (setenv "EMBED" "false")
8992
8993 (let ((greenlet (string-append
8994 (assoc-ref inputs "python-greenlet")
8995 "/include")))
8996 (match (scandir greenlet
8997 (lambda (item)
8998 (string-prefix? "python" item)))
8999 ((python)
9000 (setenv "CPATH"
9001 (string-append greenlet "/" python)))))
9002 #t))
9003 (add-before 'check 'skip-timer-test
9004 (lambda _
9005 ;; XXX: Skip 'TestTimerResolution', which appears to be
9006 ;; unreliable.
9007 (substitute* "src/greentest/test__core_timer.py"
9008 (("not greentest.RUNNING_ON_CI") "False"))
9009 #t))
9010 (replace 'check
9011 (lambda _
9012 ;; Make sure the build directory is on PYTHONPATH.
9013 (setenv "PYTHONPATH"
9014 (string-append
9015 (getenv "PYTHONPATH") ":"
9016 (getcwd) "/build/"
9017 (car (scandir "build" (cut string-prefix? "lib." <>)))))
9018 (with-directory-excursion "src/greentest"
9019 ;; XXX: Many tests require network access. Instead we only
9020 ;; run known-good tests. Unfortunately we cannot use
9021 ;; recursion here since this directory also contains
9022 ;; Python-version-specific subfolders.
9023 (apply invoke "python" "testrunner.py" "--config"
9024 "known_failures.py"
9025 (scandir "." (cut regexp-exec
9026 (make-regexp "test_+(subprocess|core)")
9027 <>)))))))))
9028 (propagated-inputs
9029 `(("python-greenlet" ,python-greenlet)
9030 ("python-objgraph" ,python-objgraph)))
9031 (native-inputs
9032 `(("libev-source" ,(package-source libev))
9033 ("python-six" ,python-six)))
9034 (inputs
9035 `(("c-ares" ,c-ares)
9036 ("libev" ,libev)))
9037 (home-page "http://www.gevent.org/")
9038 (synopsis "Coroutine-based network library")
9039 (description
9040 "gevent is a coroutine-based Python networking library that uses greenlet
9041 to provide a high-level synchronous API on top of the libev event loop.")
9042 (license license:expat)
9043 (properties `((python2-variant . ,(delay python2-gevent))))))
9044
9045 (define-public python2-gevent
9046 (let ((base (package-with-python2
9047 (strip-python2-variant python-gevent))))
9048 (package
9049 (inherit base)
9050 (native-inputs `(,@(package-native-inputs python-gevent)
9051 ("python-mock" ,python2-mock))))))
9052
9053 (define-public python-fastimport
9054 (package
9055 (name "python-fastimport")
9056 (version "0.9.6")
9057 (source
9058 (origin
9059 (method url-fetch)
9060 (uri (pypi-uri "fastimport" version))
9061 (sha256
9062 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
9063 (build-system python-build-system)
9064 (home-page "https://github.com/jelmer/python-fastimport")
9065 (synopsis "VCS fastimport parser and generator in Python")
9066 (description "This package provides a parser for and generator of the Git
9067 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
9068 format.")
9069 (license license:gpl2+)))
9070
9071 (define-public python2-fastimport
9072 (package-with-python2 python-fastimport))
9073
9074 (define-public python-twisted
9075 (package
9076 (name "python-twisted")
9077 (version "17.1.0")
9078 (source (origin
9079 (method url-fetch)
9080 (uri (pypi-uri "Twisted" version ".tar.bz2"))
9081 (sha256
9082 (base32
9083 "1p245mg15hkxp7hy5cyq2fgvlgjkb4cg0gwkwd148nzy1bbi3wnv"))))
9084 (build-system python-build-system)
9085 (arguments
9086 '(#:tests? #f)) ; FIXME: Some tests are failing.
9087 ;; #:phases
9088 ;; (modify-phases %standard-phases
9089 ;; (replace 'check
9090 ;; (lambda _
9091 ;; (zero? (system* "./bin/trial" "twisted")))))
9092 (propagated-inputs
9093 `(("python-zope-interface" ,python-zope-interface)
9094 ("python-incremental" ,python-incremental)
9095 ("python-constantly" ,python-constantly)
9096 ("python-automat" ,python-automat)))
9097 (home-page "https://twistedmatrix.com/")
9098 (synopsis "Asynchronous networking framework written in Python")
9099 (description
9100 "Twisted is an extensible framework for Python programming, with special
9101 focus on event-based network programming and multiprotocol integration.")
9102 (license license:expat)))
9103
9104 (define-public python2-twisted
9105 (package-with-python2 python-twisted))
9106
9107 (define-public python-pika
9108 (package
9109 (name "python-pika")
9110 (version "0.12.0")
9111 (source
9112 (origin
9113 (method url-fetch)
9114 (uri (pypi-uri "pika" version))
9115 (sha256
9116 (base32
9117 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
9118 (build-system python-build-system)
9119 (native-inputs
9120 `(("python-pyev" ,python-pyev)
9121 ("python-tornado" ,python-tornado)
9122 ("python-twisted" ,python-twisted)))
9123 (home-page "https://pika.readthedocs.org")
9124 (synopsis "Pure Python AMQP Client Library")
9125 (description
9126 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
9127 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
9128 network support library.")
9129 (license license:bsd-3)))
9130
9131 (define-public python2-pika
9132 (package-with-python2 python-pika))
9133
9134 (define-public python-ply
9135 (package
9136 (name "python-ply")
9137 (version "3.10")
9138 (source
9139 (origin
9140 (method url-fetch)
9141 (uri (pypi-uri "ply" version))
9142 (sha256
9143 (base32
9144 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
9145 (build-system python-build-system)
9146 (home-page "http://www.dabeaz.com/ply/")
9147 (synopsis "Python Lex & Yacc")
9148 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
9149 It uses LR parsing and does extensive error checking.")
9150 (license license:bsd-3)))
9151
9152 (define-public python2-ply
9153 (package-with-python2 python-ply))
9154
9155 (define-public python-tabulate
9156 (package
9157 (name "python-tabulate")
9158 (version "0.7.7")
9159 (source (origin
9160 (method url-fetch)
9161 (uri (pypi-uri "tabulate" version))
9162 (sha256
9163 (base32
9164 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
9165 (build-system python-build-system)
9166 (arguments
9167 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
9168 ;; and the latest release is not tagged in the upstream repository.
9169 '(#:tests? #f))
9170 (home-page "https://bitbucket.org/astanin/python-tabulate")
9171 (synopsis "Pretty-print tabular data")
9172 (description
9173 "Tabulate is a library and command-line utility to pretty-print tabular
9174 data in Python.")
9175 (license license:expat)))
9176
9177 (define-public python2-tabulate
9178 (package-with-python2 python-tabulate))
9179
9180 (define-public python-kazoo
9181 (package
9182 (name "python-kazoo")
9183 (version "2.4.0")
9184 (source
9185 (origin
9186 (method url-fetch)
9187 (uri (pypi-uri "kazoo" version))
9188 (sha256
9189 (base32
9190 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
9191 (build-system python-build-system)
9192 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
9193 (propagated-inputs
9194 `(("python-six" ,python-six)))
9195 (home-page "https://kazoo.readthedocs.org")
9196 (synopsis "High-level Zookeeper client library")
9197 (description
9198 "Kazoo is a Python client library for the Apache Zookeeper distributed
9199 application service. It is designed to be easy to use and to avoid common
9200 programming errors.")
9201 (license license:asl2.0)))
9202
9203 (define-public python2-kazoo
9204 (package-with-python2 python-kazoo))
9205
9206 (define-public python-pykafka
9207 (package
9208 (name "python-pykafka")
9209 (version "2.4.0")
9210 (source (origin
9211 (method url-fetch)
9212 (uri (string-append
9213 "https://pypi.python.org/packages/8b/3e/"
9214 "384eeff406b06315738b62483fd2126c6e4f544167116b17cc04ea7d2a59/"
9215 "pykafka-" version ".tar.gz"))
9216 (sha256
9217 (base32
9218 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
9219 (build-system python-build-system)
9220 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
9221 (propagated-inputs
9222 `(("python-gevent" ,python-gevent)
9223 ("python-kazoo" ,python-kazoo)
9224 ("python-tabulate" ,python-tabulate)))
9225 (inputs
9226 `(("librdkafka" ,librdkafka)))
9227 (home-page "https://pykafka.readthedocs.io/")
9228 (synopsis "Apache Kafka client for Python")
9229 (description
9230 "PyKafka is a client for the Apache Kafka distributed messaging system.
9231 It includes Python implementations of Kafka producers and consumers, which
9232 are optionally backed by a C extension built on librdkafka.")
9233 (license license:asl2.0)))
9234
9235 (define-public python2-pykafka
9236 (package-with-python2 python-pykafka))
9237
9238 (define-public python-wcwidth
9239 (package
9240 (name "python-wcwidth")
9241 (version "0.1.7")
9242 (source
9243 (origin
9244 (method url-fetch)
9245 (uri (pypi-uri "wcwidth" version))
9246 (sha256
9247 (base32
9248 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
9249 (build-system python-build-system)
9250 (home-page "https://github.com/jquast/wcwidth")
9251 (synopsis "Measure number of terminal column cells of wide-character codes")
9252 (description "Wcwidth measures the number of terminal column cells of
9253 wide-character codes. It is useful for those implementing a terminal emulator,
9254 or programs that carefully produce output to be interpreted by one. It is a
9255 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
9256 specified in POSIX.1-2001 and POSIX.1-2008.")
9257 (license license:expat)))
9258
9259 (define-public python2-wcwidth
9260 (package-with-python2 python-wcwidth))
9261
9262 (define-public python2-jsonrpclib
9263 (package
9264 (name "python2-jsonrpclib")
9265 (version "0.1.7")
9266 (source (origin
9267 (method url-fetch)
9268 (uri (string-append
9269 "https://pypi.python.org/packages/source/j/jsonrpclib/"
9270 "jsonrpclib-" version ".tar.gz"))
9271 (sha256
9272 (base32
9273 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
9274 (build-system python-build-system)
9275 (arguments
9276 `(#:tests? #f
9277 #:python ,python-2))
9278 (home-page "https://github.com/joshmarshall/jsonrpclib/")
9279 (synopsis "Implementation of JSON-RPC specification for Python")
9280 (description
9281 "This library is an implementation of the JSON-RPC specification.
9282 It supports both the original 1.0 specification, as well as the
9283 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
9284 etc.")
9285 (license license:asl2.0)))
9286
9287 (define-public python-chai
9288 (package
9289 (name "python-chai")
9290 (version "1.1.2")
9291 (source (origin
9292 (method url-fetch)
9293 (uri (pypi-uri "chai" version))
9294 (sha256
9295 (base32
9296 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
9297 (build-system python-build-system)
9298 (home-page "https://github.com/agoragames/chai")
9299 (synopsis "Mocking framework for Python")
9300 (description
9301 "Chai provides an api for mocking, stubbing and spying your python
9302 objects, patterned after the Mocha library for Ruby.")
9303 (license license:bsd-3)))
9304
9305 (define-public python2-chai
9306 (package-with-python2 python-chai))
9307
9308 (define-public python-inflection
9309 (package
9310 (name "python-inflection")
9311 (version "0.3.1")
9312 (source
9313 (origin (method url-fetch)
9314 (uri (pypi-uri "inflection" version))
9315 (sha256
9316 (base32
9317 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
9318 (build-system python-build-system)
9319 (native-inputs
9320 `(("python-pytest" ,python-pytest)))
9321 (home-page "https://github.com/jpvanhal/inflection")
9322 (synopsis "Python string transformation library")
9323 (description
9324 "Inflection is a string transformation library. It singularizes
9325 and pluralizes English words, and transforms strings from CamelCase to
9326 underscored string.")
9327 (license license:expat)))
9328
9329 (define-public python2-inflection
9330 (package-with-python2 python-inflection))
9331
9332 (define-public python-pylev
9333 (package
9334 (name "python-pylev")
9335 (version "1.3.0")
9336 (source (origin
9337 (method url-fetch)
9338 (uri (pypi-uri "pylev" version))
9339 (sha256
9340 (base32
9341 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
9342 (build-system python-build-system)
9343 (home-page "https://github.com/toastdriven/pylev")
9344 (synopsis "Levenshtein distance implementation in Python")
9345 (description "Pure Python Levenshtein implementation, based off the
9346 Wikipedia code samples at
9347 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
9348 (license license:bsd-3)))
9349
9350 (define-public python2-pylev
9351 (package-with-python2 python-pylev))
9352
9353 (define-public python-cleo
9354 (package
9355 (name "python-cleo")
9356 (version "0.6.1")
9357 (source (origin
9358 (method url-fetch)
9359 (uri (pypi-uri "cleo" version))
9360 (sha256
9361 (base32
9362 "0q1cf0szr0d54am4pypzwdnm74zpladdsinad94c2fz5i06fdpf7"))))
9363 (build-system python-build-system)
9364 (native-inputs
9365 `(;; For testing
9366 ("python-mock" ,python-mock)
9367 ("python-pytest-mock" ,python-pytest-mock)
9368 ("python-pytest" ,python-pytest)))
9369 (propagated-inputs
9370 `(("python-backpack" ,python-backpack)
9371 ("python-pastel" ,python-pastel)
9372 ("python-pylev" ,python-pylev)))
9373 (home-page "https://github.com/sdispater/cleo")
9374 (synopsis "Command-line arguments library for Python")
9375 (description
9376 "Cleo allows you to create command-line commands with signature in
9377 docstring and colored output.")
9378 (license license:expat)))
9379
9380 (define-public python2-cleo
9381 (package-with-python2 python-cleo))
9382
9383 (define-public python-lazy-object-proxy
9384 (package
9385 (name "python-lazy-object-proxy")
9386 (version "1.3.1")
9387 (source (origin
9388 (method url-fetch)
9389 (uri (pypi-uri "lazy-object-proxy" version))
9390 (sha256
9391 (base32
9392 "0yha7q9bhw857fwaby785d63mffhngl9npwzlk9i0pwlkwvbx4gb"))))
9393 (build-system python-build-system)
9394 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
9395 (synopsis "Lazy object proxy for python")
9396 (description
9397 "Lazy object proxy is an object that wraps a callable but defers the call
9398 until the object is actually required, and caches the result of said call.")
9399 (license license:bsd-2)))
9400
9401 (define-public python2-lazy-object-proxy
9402 (package-with-python2 python-lazy-object-proxy))
9403
9404 (define-public python-dnspython
9405 (package
9406 (name "python-dnspython")
9407 (version "1.15.0")
9408 (source (origin
9409 (method url-fetch)
9410 (uri (string-append "http://www.dnspython.org/kits/"
9411 version "/dnspython-" version ".tar.gz"))
9412 (sha256
9413 (base32
9414 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
9415 (build-system python-build-system)
9416 (arguments '(#:tests? #f)) ; XXX: requires internet access
9417 (home-page "http://www.dnspython.org")
9418 (synopsis "DNS toolkit for Python")
9419 (description
9420 "dnspython is a DNS toolkit for Python. It supports almost all record
9421 types. It can be used for queries, zone transfers, and dynamic updates.
9422 It supports TSIG authenticated messages and EDNS0.")
9423 (license license:expat)))
9424
9425 (define-public python2-dnspython
9426 (package-with-python2 python-dnspython))
9427
9428 (define-public python-email-validator
9429 (package
9430 (name "python-email-validator")
9431 (version "1.0.2")
9432 (source
9433 (origin (method url-fetch)
9434 (uri (pypi-uri "email_validator" version))
9435 (sha256
9436 (base32
9437 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
9438 (build-system python-build-system)
9439 (arguments
9440 '(#:phases
9441 (modify-phases %standard-phases
9442 (add-before 'build 'use-dnspython
9443 (lambda _
9444 (substitute* "setup.py"
9445 (("dnspython3") "dnspython"))
9446 #t)))))
9447 (propagated-inputs
9448 `(("python-dnspython" ,python-dnspython)
9449 ("python-idna" ,python-idna)))
9450 (home-page "https://github.com/JoshData/python-email-validator")
9451 (synopsis "Email address validation library for Python")
9452 (description
9453 "This library validates email address syntax and deliverability.")
9454 (license license:cc0)))
9455
9456 (define-public python2-email-validator
9457 (package-with-python2 python-email-validator))
9458
9459 (define-public python-ukpostcodeparser
9460 (package
9461 (name "python-ukpostcodeparser")
9462 (version "1.0.3")
9463 (source (origin
9464 (method url-fetch)
9465 (uri (pypi-uri "UkPostcodeParser" version))
9466 (sha256
9467 (base32
9468 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
9469 (build-system python-build-system)
9470 (home-page "https://github.com/hamstah/ukpostcodeparser")
9471 (synopsis "UK Postcode parser for Python")
9472 (description
9473 "This library provides the @code{parse_uk_postcode} function for
9474 parsing UK postcodes.")
9475 (license license:expat)))
9476
9477 (define-public python2-ukpostcodeparser
9478 (package-with-python2 python-ukpostcodeparser))
9479
9480 (define-public python-faker
9481 (package
9482 (name "python-faker")
9483 (version "0.7.9")
9484 (source (origin
9485 (method url-fetch)
9486 (uri (pypi-uri "Faker" version))
9487 (sha256
9488 (base32
9489 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
9490 (patches
9491 (search-patches "python-faker-fix-build-32bit.patch"))
9492 (modules '((guix build utils)))
9493 (snippet
9494 '(begin
9495 (for-each delete-file (find-files "." "\\.pyc$"))
9496 #t))))
9497 (build-system python-build-system)
9498 (arguments
9499 '(#:phases
9500 (modify-phases %standard-phases
9501 (replace 'check
9502 (lambda _
9503 (zero? (system* "python" "-m" "unittest" "-v" "tests")))))))
9504 (native-inputs
9505 `(;; For testing
9506 ("python-email-validator" ,python-email-validator)
9507 ("python-mock" ,python-mock)
9508 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
9509 (propagated-inputs
9510 `(("python-dateutil" ,python-dateutil)
9511 ("python-six" ,python-six)))
9512 (home-page "https://github.com/joke2k/faker")
9513 (synopsis "Python package that generates fake data")
9514 (description
9515 "Faker is a Python package that generates fake data such as names,
9516 addresses, and phone numbers.")
9517 (license license:expat)
9518 (properties `((python2-variant . ,(delay python2-faker))))))
9519
9520 (define-public python2-faker
9521 (let ((base (package-with-python2 (strip-python2-variant
9522 python-faker))))
9523 (package
9524 (inherit base)
9525 (propagated-inputs
9526 `(("python2-ipaddress" ,python2-ipaddress)
9527 ,@(package-propagated-inputs base))))))
9528
9529 (define-public python-pyaml
9530 (package
9531 (name "python-pyaml")
9532 (version "18.11.0")
9533 (source (origin
9534 (method url-fetch)
9535 (uri (pypi-uri "pyaml" version))
9536 (sha256
9537 (base32
9538 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
9539 (build-system python-build-system)
9540 (native-inputs
9541 `(("python-unidecode" ,python-unidecode)))
9542 (propagated-inputs
9543 `(("python-pyyaml" ,python-pyyaml)))
9544 (home-page "https://github.com/mk-fg/pretty-yaml")
9545 (synopsis "YAML pretty-print library for Python")
9546 (description
9547 "pyaml is a PyYAML based python module to produce pretty and readable
9548 YAML-serialized data.")
9549 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
9550
9551 (define-public python2-pyaml
9552 (package-with-python2 python-pyaml))
9553
9554 (define-public python-backpack
9555 (package
9556 (name "python-backpack")
9557 (version "0.1")
9558 (source
9559 (origin
9560 (method url-fetch)
9561 (uri (pypi-uri "backpack" version))
9562 (sha256
9563 (base32
9564 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
9565 (build-system python-build-system)
9566 (native-inputs
9567 `(("python-pytest" ,python-pytest)
9568 ("python-nose" ,python-nose)))
9569 (propagated-inputs
9570 `(("python-simplejson" ,python-simplejson)))
9571 (home-page "https://github.com/sdispater/backpack")
9572 (synopsis "Utilities for working with Python collections")
9573 (description "Backpack provides some useful utilities for working with
9574 collections of data.")
9575 (license license:expat)))
9576
9577 (define-public python2-backpack
9578 (package-with-python2 python-backpack))
9579
9580 (define-public python-prompt-toolkit
9581 (package
9582 (name "python-prompt-toolkit")
9583 (version "2.0.7")
9584 (source
9585 (origin
9586 (method url-fetch)
9587 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
9588 (sha256
9589 (base32
9590 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
9591 (build-system python-build-system)
9592 (arguments
9593 `(#:phases
9594 (modify-phases %standard-phases
9595 (delete 'check)
9596 (add-after 'install 'post-install-check
9597 (lambda* (#:key inputs outputs #:allow-other-keys)
9598 ;; HOME is needed for the test
9599 ;; "test_pathcompleter_can_expanduser".
9600 (setenv "HOME" "/tmp")
9601 (add-installed-pythonpath inputs outputs)
9602 (invoke "py.test"))))))
9603 (propagated-inputs
9604 `(("python-wcwidth" ,python-wcwidth)
9605 ("python-six" ,python-six)
9606 ("python-pygments" ,python-pygments)))
9607 (native-inputs
9608 `(("python-pytest" ,python-pytest)))
9609 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
9610 (synopsis "Library for building command line interfaces in Python")
9611 (description
9612 "Prompt-Toolkit is a library for building interactive command line
9613 interfaces in Python. It's like GNU Readline but it also features syntax
9614 highlighting while typing, out-of-the-box multi-line input editing, advanced
9615 code completion, incremental search, support for Chinese double-width
9616 characters, mouse support, and auto suggestions.")
9617 (license license:bsd-3)))
9618
9619 (define-public python2-prompt-toolkit
9620 (package-with-python2 python-prompt-toolkit))
9621
9622 (define-public python-prompt-toolkit-1
9623 (package (inherit python-prompt-toolkit)
9624 (version "1.0.15")
9625 (source
9626 (origin
9627 (method url-fetch)
9628 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
9629 (sha256
9630 (base32
9631 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
9632
9633 (define-public python2-prompt-toolkit-1
9634 (package-with-python2 python-prompt-toolkit-1))
9635
9636 (define-public python-jedi
9637 (package
9638 (name "python-jedi")
9639 (version "0.13.1")
9640 (source
9641 (origin
9642 (method url-fetch)
9643 (uri (pypi-uri "jedi" version))
9644 (sha256
9645 (base32
9646 "0j11q42g5vjkyhhjpyy8nb0gdxs78m3rpjai7p1hvgpyl9rkyjdp"))))
9647 (build-system python-build-system)
9648 (arguments
9649 `( ;; Many tests are failing with Python 3.7.x as of version 0.13.1 (see:
9650 ;; https://github.com/davidhalter/jedi/issues/1263)
9651 #:tests? #f
9652 #:phases
9653 (modify-phases %standard-phases
9654 (replace 'check
9655 (lambda* (#:key tests? #:allow-other-keys)
9656 (when tests?
9657 (invoke "py.test" "-vv")))))))
9658 (native-inputs
9659 `(("python-pytest" ,python-pytest)
9660 ("python-docopt" ,python-docopt)))
9661 (propagated-inputs
9662 `(("python-parso" ,python-parso)))
9663 (home-page "https://github.com/davidhalter/jedi")
9664 (synopsis "Autocompletion and static analysis library for Python")
9665 (description
9666 "Jedi is a static analysis tool for Python that can be used in Integrated
9667 Development Environments (@dfn{IDE}s) and text editors. It understands Python
9668 on a deeper level than many other static analysis frameworks for Python.
9669
9670 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
9671 well.")
9672 (license license:expat)))
9673
9674 (define-public python2-jedi
9675 (package-with-python2 python-jedi))
9676
9677 (define-public ptpython
9678 (package
9679 (name "ptpython")
9680 (version "0.34")
9681 (source (origin
9682 (method url-fetch)
9683 (uri (pypi-uri "ptpython" version))
9684 (sha256
9685 (base32
9686 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
9687 (build-system python-build-system)
9688 (arguments
9689 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
9690 (propagated-inputs
9691 `(("python-docopt" ,python-docopt)
9692 ("python-jedi" ,python-jedi)
9693 ("python-prompt-toolkit" ,python-prompt-toolkit)
9694 ("python-pygments" ,python-pygments)))
9695 (home-page "https://github.com/jonathanslenders/ptpython")
9696 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
9697 (description
9698 "ptpython is a Python read-eval-print loop with IDE-like features.
9699 It supports syntax highlighting, multiline editing, autocompletion, mouse,
9700 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
9701 etc.")
9702 (license license:bsd-3)
9703 (properties `((python2-variant . ,(delay ptpython-2))))))
9704
9705 (define-public ptpython-2
9706 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
9707 (package
9708 (inherit base)
9709 (name "ptpython2"))))
9710
9711 (define-public python-stem
9712 (package
9713 (name "python-stem")
9714 (version "1.7.0")
9715 (source
9716 (origin
9717 (method url-fetch)
9718 (uri (pypi-uri "stem" version))
9719 (sha256
9720 (base32
9721 "1awiglfiajnx2hva9aqpj3fmdvdb4qg7cwnlfyih827m68y3cq8v"))))
9722 (build-system python-build-system)
9723 (arguments
9724 `(#:phases
9725 (modify-phases %standard-phases
9726 (replace 'check
9727 (lambda _
9728 (invoke "./run_tests.py" "--unit")
9729 #t)))))
9730 (native-inputs
9731 `(("python-mock" ,python-mock)
9732 ("python-pycodestyle" ,python-pycodestyle)
9733 ("python-pyflakes" ,python-pyflakes)))
9734 (home-page "https://stem.torproject.org/")
9735 (synopsis
9736 "Python controller library that allows applications to interact with Tor")
9737 (description
9738 "Stem is a Python controller library for Tor. With it you can use Tor's
9739 control protocol to script against the Tor process and read descriptor data
9740 relays publish about themselves.")
9741 (license license:lgpl3)))
9742
9743 (define-public python2-stem
9744 (package-with-python2 python-stem))
9745
9746 (define-public python-pyserial
9747 (package
9748 (name "python-pyserial")
9749 (version "3.1.1")
9750 (source
9751 (origin
9752 (method url-fetch)
9753 (uri (pypi-uri "pyserial" version))
9754 (sha256
9755 (base32
9756 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
9757 (build-system python-build-system)
9758 (arguments
9759 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
9760 ;; #:phases
9761 ;; (modify-phases %standard-phases
9762 ;; (replace 'check
9763 ;; (lambda _
9764 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
9765 (home-page
9766 "https://github.com/pyserial/pyserial")
9767 (synopsis "Python Serial Port Bindings")
9768 (description "@code{pyserial} provide serial port bindings for Python. It
9769 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
9770 and/or Xon/Xoff. The port is accessed in RAW mode.")
9771 (license license:bsd-3)))
9772
9773 (define-public python2-pyserial
9774 (package-with-python2 python-pyserial))
9775
9776 (define-public python-kivy
9777 (package
9778 (name "python-kivy")
9779 (version "1.10.1")
9780 (source
9781 (origin
9782 (method url-fetch)
9783 (uri (pypi-uri "Kivy" version))
9784 (file-name (string-append name "-" version ".tar.gz"))
9785 (sha256
9786 (base32
9787 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
9788 (build-system python-build-system)
9789 (arguments
9790 `(#:tests? #f ; Tests require many optional packages
9791 #:phases
9792 (modify-phases %standard-phases
9793 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
9794 (lambda* (#:key inputs #:allow-other-keys)
9795 (setenv "KIVY_SDL2_PATH"
9796 (string-append (assoc-ref inputs "sdl-union")
9797 "/include/SDL2"))
9798 #t)))))
9799 (native-inputs
9800 `(("git" ,git)
9801 ("pkg-config" ,pkg-config)
9802 ("python-cython" ,python-cython)))
9803 (inputs
9804 `(("gstreamer" ,gstreamer)
9805 ("mesa" ,mesa)
9806 ("sdl-union"
9807 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
9808 (home-page "http://kivy.org")
9809 (synopsis
9810 "Multitouch application framework")
9811 (description
9812 "A software library for rapid development of
9813 hardware-accelerated multitouch applications.")
9814 (license license:expat)))
9815
9816 (define-public python2-kivy
9817 (package-with-python2 python-kivy))
9818
9819 (define-public python-kivy-next
9820 (deprecated-package "python-kivy-next" python-kivy))
9821
9822 (define-public python2-kivy-next
9823 (deprecated-package "python2-kivy-next" python2-kivy))
9824
9825 (define-public python-binaryornot
9826 (package
9827 (name "python-binaryornot")
9828 (version "0.4.4")
9829 (source (origin
9830 (method url-fetch)
9831 (uri (pypi-uri "binaryornot" version))
9832 (sha256
9833 (base32
9834 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
9835 (build-system python-build-system)
9836 (propagated-inputs
9837 `(("python-chardet" ,python-chardet)
9838 ("python-hypothesis" ,python-hypothesis)))
9839 (home-page "https://github.com/audreyr/binaryornot")
9840 (synopsis "Package to check if a file is binary or text")
9841 (description "Ultra-lightweight pure Python package to check if a file is
9842 binary or text.")
9843 (license license:bsd-3)
9844 (properties `((python2-variant . ,(delay python2-binaryornot))))))
9845
9846 (define-public python2-binaryornot
9847 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
9848 (package (inherit base)
9849 (propagated-inputs
9850 `(("python2-enum34" ,python2-enum34)
9851 ,@(package-propagated-inputs base))))))
9852
9853 (define-public python-nltk
9854 (package
9855 (name "python-nltk")
9856 (version "3.2.1")
9857 (source (origin
9858 (method url-fetch)
9859 (uri (pypi-uri "nltk" version))
9860 (sha256
9861 (base32
9862 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
9863 (build-system python-build-system)
9864 (arguments
9865 '(;; The tests require some extra resources to be downloaded.
9866 ;; TODO Try packaging these resources.
9867 #:tests? #f))
9868 (home-page "http://nltk.org/")
9869 (synopsis "Natural Language Toolkit")
9870 (description "It provides interfaces to over 50 corpora and lexical
9871 resources such as WordNet, along with a suite of text processing libraries
9872 for classification, tokenization, stemming, tagging, parsing, and semantic
9873 reasoning, wrappers for natural language processing libraries.")
9874 (license license:asl2.0)))
9875
9876 (define-public python2-nltk
9877 (package-with-python2 python-nltk))
9878
9879 (define-public python-pymongo
9880 (package
9881 (name "python-pymongo")
9882 (version "3.7.2")
9883 (source (origin
9884 (method url-fetch)
9885 (uri (pypi-uri "pymongo" version))
9886 (sha256
9887 (base32
9888 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
9889 (build-system python-build-system)
9890 (propagated-inputs
9891 `(("python-certifi" ,python-certifi)))
9892 (home-page "https://github.com/mongodb/mongo-python-driver")
9893 (synopsis "Python driver for MongoDB")
9894 (description "Python driver for MongoDB.")
9895 (license license:asl2.0)))
9896
9897 (define-public python2-pymongo
9898 (package-with-python2 python-pymongo))
9899
9900 (define-public python-sh
9901 (package
9902 (name "python-sh")
9903 (version "1.11")
9904 (source (origin
9905 (method url-fetch)
9906 (uri (pypi-uri "sh" version))
9907 (sha256
9908 (base32
9909 "192r0mpv6dmkysjzhc43ddffiwb5g7c76bgr1mb1z2xz9awbj3sr"))))
9910 (build-system python-build-system)
9911 (arguments
9912 `(#:tests? #f)) ; no tests
9913 (home-page "https://github.com/amoffat/sh")
9914 (synopsis "Python subprocess interface")
9915 (description "Abstracts process invocation by providing a function
9916 interface for programs.")
9917 (license license:expat)))
9918
9919 (define-public python2-sh
9920 (package-with-python2 python-sh))
9921
9922 (define-public python-consul
9923 (package
9924 (name "python-consul")
9925 (version "0.6.1")
9926 (source
9927 (origin
9928 (method url-fetch)
9929 (uri (pypi-uri "python-consul" version))
9930 (sha256
9931 (base32
9932 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
9933 (build-system python-build-system)
9934 (arguments
9935 '(#:tests? #f)) ; The tests are not distributed
9936 (propagated-inputs
9937 `(("python-requests" ,python-requests)
9938 ("python-six" ,python-six)))
9939 (home-page "https://github.com/cablehead/python-consul")
9940 (synopsis "Python client for Consul")
9941 (description
9942 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
9943 discovery, monitoring and configuration.")
9944 (license license:expat)))
9945
9946 (define-public python2-consul
9947 (package-with-python2 python-consul))
9948
9949 (define-public python-schematics
9950 (package
9951 (name "python-schematics")
9952 (version "1.1.1")
9953 (source
9954 (origin
9955 (method url-fetch)
9956 (uri (string-append
9957 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
9958 (file-name (string-append name "-" version ".tar.gz"))
9959 (sha256
9960 (base32
9961 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
9962 (build-system python-build-system)
9963 (propagated-inputs
9964 `(("python-six" ,python-six)))
9965 (arguments
9966 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
9967 ; version requirements (eg python-coveralls)
9968 (home-page "https://github.com/schematics/schematics")
9969 (synopsis "Python Data Structures for Humans")
9970 (description "Python Data Structures for Humans.")
9971 (license license:bsd-3)))
9972
9973 (define-public python2-schematics
9974 (package-with-python2 python-schematics))
9975
9976 (define-public python-odfpy
9977 (package
9978 (name "python-odfpy")
9979 (version "1.3.3")
9980 (source (origin
9981 (method url-fetch)
9982 (uri (pypi-uri "odfpy" version))
9983 (sha256
9984 (base32
9985 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
9986 (arguments
9987 `(#:modules ((srfi srfi-1)
9988 (guix build python-build-system)
9989 (guix build utils))
9990 #:phases
9991 (modify-phases %standard-phases
9992 (replace 'check
9993 ;; The test runner invokes python2 and python3 for test*.py.
9994 ;; To avoid having both in inputs, we replicate it here.
9995 (lambda _
9996 (every (lambda (test-file)
9997 (zero? (system* "python" test-file)))
9998 (find-files "tests" "^test.*\\.py$")))))))
9999 (build-system python-build-system)
10000 (home-page "https://github.com/eea/odfpy")
10001 (synopsis "Python API and tools to manipulate OpenDocument files")
10002 (description "Collection of libraries and utility programs written in
10003 Python to manipulate OpenDocument 1.2 files.")
10004 (license
10005 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
10006 ;; number of files with other licenses.
10007 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
10008
10009 (define-public python2-odfpy
10010 (package-with-python2 python-odfpy))
10011
10012 (define-public python-natsort
10013 (package
10014 (name "python-natsort")
10015 (version "5.4.1")
10016 (source (origin
10017 (method url-fetch)
10018 (uri (pypi-uri "natsort" version))
10019 (sha256
10020 (base32
10021 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
10022 (build-system python-build-system)
10023 (arguments
10024 `(#:modules ((guix build utils)
10025 (guix build python-build-system)
10026 (srfi srfi-1)
10027 (srfi srfi-26)
10028 (ice-9 ftw))
10029 #:phases
10030 (modify-phases %standard-phases
10031 (add-before 'check 'set-cachedir
10032 ;; Tests require write access to $HOME by default
10033 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
10034 (replace 'check
10035 (lambda _
10036 (let ((cwd (getcwd)))
10037 (setenv "PYTHONPATH"
10038 (string-append
10039 cwd "/build/"
10040 (find (cut string-prefix? "lib" <>)
10041 (scandir (string-append cwd "/build")))
10042 ":"
10043 (getenv "PYTHONPATH")))
10044 (invoke "pytest" "-v")))))))
10045 (native-inputs
10046 `(("python-hypothesis" ,python-hypothesis)
10047 ("python-pytest-cov" ,python-pytest-cov)
10048 ("python-pytest-mock" ,python-pytest-mock)
10049 ("python-pytest" ,python-pytest)))
10050 (propagated-inputs ; TODO: Add python-fastnumbers.
10051 `(("python-pyicu" ,python-pyicu)))
10052 (home-page "https://github.com/SethMMorton/natsort")
10053 (synopsis "Natural sorting for python and shell")
10054 (description
10055 "Natsort lets you apply natural sorting on lists instead of
10056 lexicographical. If you use the built-in @code{sorted} method in python
10057 on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
10058 returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
10059 function @code{natsorted} that identifies numbers and sorts them separately
10060 from strings. It can also sort version numbers, real numbers, mixed types
10061 and more, and comes with a shell command @command{natsort} that exposes this
10062 functionality in the command line.")
10063 (license license:expat)
10064 (properties `((python2-variant . ,(delay python2-natsort))))))
10065
10066 (define-public python2-natsort
10067 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
10068 (package (inherit base)
10069 (native-inputs
10070 `(("python2-pathlib" ,python2-pathlib)
10071 ,@(package-native-inputs base))))))
10072
10073 (define-public python-glances
10074 (package
10075 (name "python-glances")
10076 (version "3.0.2")
10077 (source
10078 (origin
10079 (method url-fetch)
10080 (uri (pypi-uri "Glances" version))
10081 (sha256
10082 (base32
10083 "09fxysfp1n16csqvzvawy74qm6a94nvwjf3vcf5gkqp4i6k4vjjy"))))
10084 (build-system python-build-system)
10085 (propagated-inputs
10086 `(("python-psutil" ,python-psutil)))
10087 (home-page
10088 "https://github.com/nicolargo/glances")
10089 (synopsis
10090 "A cross-platform curses-based monitoring tool")
10091 (description
10092 "Glances is a curses-based monitoring tool for a wide variety of platforms.
10093 Glances uses the PsUtil library to get information from your system. It monitors
10094 CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
10095 (license license:lgpl3+)))
10096
10097 (define-public python2-glances
10098 (package-with-python2 python-glances))
10099
10100 (define-public python-graphql-core
10101 (package
10102 (name "python-graphql-core")
10103 (version "0.5.3")
10104 (source
10105 (origin
10106 (method url-fetch)
10107 (uri (pypi-uri "graphql-core" version))
10108 (sha256
10109 (base32
10110 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
10111 (build-system python-build-system)
10112 (arguments
10113 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
10114 #:phases
10115 (modify-phases %standard-phases
10116 (add-after 'unpack 'patch-hardcoded-version
10117 (lambda _ (substitute*
10118 "setup.py"
10119 (("'gevent==1.1rc1'") "'gevent'"))
10120 #t)))))
10121 (native-inputs
10122 `(("python-gevent" ,python-gevent)
10123 ("python-mock" ,python-mock)
10124 ("python-pytest-mock" ,python-pytest-mock)))
10125 (propagated-inputs
10126 `(("python-promise" ,python-promise)
10127 ("python-six" ,python-six)))
10128 (home-page "https://github.com/graphql-python/graphql-core")
10129 (synopsis "GraphQL implementation for Python")
10130 (description
10131 "GraphQL implementation for Python. GraphQL is a data query language and
10132 runtime designed and used to request and deliver data to mobile and web apps.
10133 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
10134 to Python.")
10135 (license license:expat)))
10136
10137 (define-public python2-graphql-core
10138 (package-with-python2 python-graphql-core))
10139
10140 (define-public python-graphql-relay
10141 (package
10142 (name "python-graphql-relay")
10143 (version "0.4.5")
10144 (source
10145 (origin
10146 (method url-fetch)
10147 (uri (pypi-uri "graphql-relay" version))
10148 (sha256
10149 (base32
10150 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
10151 (build-system python-build-system)
10152 (arguments
10153 '(#:tests? #f)) ; The tests are not distributed
10154 (propagated-inputs
10155 `(("python-graphql-core" ,python-graphql-core)
10156 ("python-promise" ,python-promise)
10157 ("python-six" ,python-six)))
10158 (home-page "https://github.com/graphql-python/graphql-relay-py")
10159 (synopsis "Relay implementation for Python")
10160 (description
10161 "This is a library to allow the easy creation of Relay-compliant servers
10162 using the GraphQL Python reference implementation of a GraphQL server. It
10163 should be noted that the code is a exact port of the original
10164 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
10165 from Facebook.")
10166 (license license:expat)))
10167
10168 (define-public python2-graphql-relay
10169 (package-with-python2 python-graphql-relay))
10170
10171 (define-public python-graphene
10172 (package
10173 (name "python-graphene")
10174 (version "0.10.2")
10175 (source
10176 (origin
10177 (method url-fetch)
10178 (uri (pypi-uri "graphene" version))
10179 (sha256
10180 (base32
10181 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
10182 (build-system python-build-system)
10183 (propagated-inputs
10184 `(("python-graphql-core" ,python-graphql-core)
10185 ("python-graphql-relay" ,python-graphql-relay)
10186 ("python-iso8601" ,python-iso8601)
10187 ("python-promise" ,python-promise)
10188 ("python-six" ,python-six)))
10189 (arguments
10190 `(#:tests? #f)) ; no tests/ in the PyPI tarball
10191 (home-page "http://graphene-python.org/")
10192 (synopsis "GraphQL Framework for Python")
10193 (description
10194 "Graphene is a Python library for building GraphQL schemas/types.
10195 A GraphQL schema describes your data model, and provides a GraphQL server
10196 with an associated set of resolve methods that know how to fetch data.")
10197 (properties `((python2-variant . ,(delay python2-graphene))))
10198 (license license:expat)))
10199
10200 (define-public python2-graphene
10201 (let ((base (package-with-python2
10202 (strip-python2-variant python-graphene))))
10203 (package (inherit base)
10204 (native-inputs
10205 `(("python2-sqlalchemy" ,python2-sqlalchemy)
10206 ,@(package-native-inputs base))))))
10207
10208 (define-public python-nautilus
10209 (package
10210 (name "python-nautilus")
10211 (version "0.4.9")
10212 (source
10213 (origin
10214 (method url-fetch)
10215 (uri (pypi-uri "nautilus" version))
10216 (sha256
10217 (base32
10218 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
10219 (build-system python-build-system)
10220 (arguments `(#:tests? #f)) ; fails to import test modules
10221 (propagated-inputs
10222 `(("python-bcrypt" ,python-bcrypt)
10223 ("python-click" ,python-click)
10224 ("python-consul" ,python-consul)
10225 ("python-graphene" ,python-graphene)
10226 ("python-jinja2" ,python-jinja2)
10227 ("python-peewee" ,python-peewee)
10228 ("python-pika" ,python-pika)
10229 ("python-tornado" ,python-tornado)
10230 ("python-wtforms" ,python-wtforms)))
10231 (native-inputs
10232 `(("python-nose2" ,python-nose2)))
10233 (home-page "https://github.com/AlecAivazis/nautilus")
10234 (synopsis "Library for creating microservice applications")
10235 (description
10236 "Nautilus is a framework for flux based microservices that looks to
10237 provide extendible implementations of common aspects of a cloud so that you can
10238 focus on building massively scalable web applications.")
10239 (license license:expat)))
10240
10241 (define-public python-snowballstemmer
10242 (package
10243 (name "python-snowballstemmer")
10244 (version "1.2.1")
10245 (source (origin
10246 (method url-fetch)
10247 (uri (pypi-uri "snowballstemmer" version))
10248 (sha256
10249 (base32
10250 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
10251 (build-system python-build-system)
10252 (arguments
10253 `(;; No tests exist
10254 #:tests? #f))
10255 (home-page "https://github.com/shibukawa/snowball_py")
10256 (synopsis "Snowball stemming library collection for Python")
10257 (description "This package provides 16 word stemmer algorithms generated
10258 from Snowball algorithms. It includes the 15 original ones plus the Poerter
10259 English stemmer.")
10260 (license license:bsd-3)))
10261
10262 (define-public python2-snowballstemmer
10263 (package-with-python2 python-snowballstemmer))
10264
10265 (define-public python-sphinx-cloud-sptheme
10266 (package
10267 (name "python-sphinx-cloud-sptheme")
10268 (version "1.8.0")
10269 (source (origin
10270 (method url-fetch)
10271 (uri (pypi-uri "cloud_sptheme" version))
10272 (sha256
10273 (base32
10274 "1dniqb6a39yh786f86c4jn666rwnyi1jvzn4616zhcchb7sfdshd"))))
10275 (build-system python-build-system)
10276 ;; FIXME: The 'pypi' release archive does not contain tests.
10277 (arguments '(#:tests? #f))
10278 (native-inputs
10279 `(("python-sphinx" ,python-sphinx)))
10280 (home-page "https://bitbucket.org/ecollins/cloud_sptheme")
10281 (synopsis "'Cloud' theme for Sphinx documenter")
10282 (description "This package contains the \"Cloud\" theme for Sphinx and some
10283 related extensions.")
10284 (license license:bsd-3)))
10285
10286 (define-public python2-sphinx-cloud-sptheme
10287 (package-with-python2 python-sphinx-cloud-sptheme))
10288
10289 (define-public python-sphinx-alabaster-theme
10290 (package
10291 (name "python-sphinx-alabaster-theme")
10292 (version "0.7.12")
10293 (source (origin
10294 (method url-fetch)
10295 (uri (pypi-uri "alabaster" version))
10296 (sha256
10297 (base32
10298 "00nwwjj2d2ym4s2kk217x7jkx1hnczc3fvm8yxbqmsp6b0nxfqd6"))))
10299 (build-system python-build-system)
10300 (propagated-inputs
10301 `(("python-pygments" ,python-pygments)))
10302 (home-page "https://alabaster.readthedocs.io/")
10303 (synopsis "Configurable sidebar-enabled Sphinx theme")
10304 (description "Alabaster is a visually (c)lean, responsive, configurable
10305 theme for the Sphinx documentation system. It's the default theme of Sphinx.")
10306 (license license:bsd-3)))
10307
10308 (define-public python2-sphinx-alabaster-theme
10309 (package-with-python2 python-sphinx-alabaster-theme))
10310
10311 (define-public python-setproctitle
10312 (package
10313 (name "python-setproctitle")
10314 (version "1.1.10")
10315 (source
10316 (origin
10317 (method url-fetch)
10318 (uri (pypi-uri "setproctitle" version))
10319 (sha256
10320 (base32
10321 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
10322 (build-system python-build-system)
10323 (arguments
10324 '(#:phases
10325 (modify-phases %standard-phases
10326 (add-before 'check 'patch-Makefile
10327 ;; Stricly this is only required for the python2 variant.
10328 ;; But adding a phase in an inherited package seems to be
10329 ;; cumbersum. So we patch even for python3.
10330 (lambda _
10331 (let ((nose (assoc-ref %build-inputs "python2-nose")))
10332 (when nose
10333 (substitute* "Makefile"
10334 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
10335 (string-append nose "/bin/nosetests "))))
10336 #t)))
10337 (replace 'check
10338 (lambda _
10339 (setenv "PYTHON" (or (which "python3") (which "python")))
10340 (setenv "PYCONFIG" (or (which "python3-config")
10341 (which "python-config")))
10342 (setenv "CC" "gcc")
10343 ;; No need to extend PYTHONPATH to find the built package, since
10344 ;; the Makefile will build anyway
10345 (invoke "make" "check"))))))
10346 (native-inputs
10347 `(("procps" ,procps))) ; required for tests
10348 (home-page
10349 "https://github.com/dvarrazzo/py-setproctitle")
10350 (synopsis
10351 "Setproctitle implementation for Python to customize the process title")
10352 (description "The library allows a process to change its title (as displayed
10353 by system tools such as ps and top).
10354
10355 Changing the title is mostly useful in multi-process systems, for
10356 example when a master process is forked: changing the children's title
10357 allows to identify the task each process is busy with. The technique
10358 is used by PostgreSQL and the OpenSSH Server for example.")
10359 (license license:bsd-3)
10360 (properties `((python2-variant . ,(delay python2-setproctitle))))))
10361
10362 (define-public python2-setproctitle
10363 (let ((base (package-with-python2
10364 (strip-python2-variant python-setproctitle))))
10365 (package
10366 (inherit base)
10367 (native-inputs `(("python2-nose" ,python2-nose)
10368 ,@(package-native-inputs base))))))
10369
10370 (define-public python-validictory
10371 (package
10372 (name "python-validictory")
10373 (version "1.0.1")
10374 (source
10375 (origin
10376 (method url-fetch)
10377 (uri (pypi-uri "validictory" version))
10378 (sha256
10379 (base32
10380 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
10381 (build-system python-build-system)
10382 (arguments
10383 '(#:phases
10384 (modify-phases %standard-phases
10385 (add-after 'unpack 'bootstrap
10386 ;; Move the tests out of the package directory to avoid
10387 ;; packaging them.
10388 (lambda* _
10389 (rename-file "validictory/tests" "tests")
10390 (delete-file "tests/__init__.py")))
10391 (replace 'check
10392 (lambda _
10393 ;; Extend PYTHONPATH so the built package will be found.
10394 (setenv "PYTHONPATH"
10395 (string-append (getcwd) "/build/lib:"
10396 (getenv "PYTHONPATH")))
10397 (zero? (system* "py.test" "-vv" )))))))
10398 (native-inputs
10399 `(("python-pytest" ,python-pytest)))
10400 (home-page
10401 "https://github.com/jamesturk/validictory")
10402 (synopsis "General purpose Python data validator")
10403 (description "It allows validation of arbitrary Python data structures.
10404
10405 The schema format is based on the JSON Schema
10406 proposal (http://json-schema.org), so combined with json the library is also
10407 useful as a validator for JSON data.")
10408 (license license:expat)))
10409
10410 (define-public python2-validictory
10411 (package-with-python2 python-validictory))
10412
10413 (define-public python-pyelftools
10414 (package
10415 (name "python-pyelftools")
10416 (version "0.25")
10417 (source
10418 (origin
10419 (method url-fetch)
10420 (uri (pypi-uri "pyelftools" version))
10421 (sha256
10422 (base32
10423 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
10424 (build-system python-build-system)
10425 (arguments
10426 `(#:phases
10427 (modify-phases %standard-phases
10428 (add-before 'check 'set-pythonpath
10429 (lambda _
10430 (setenv "PYTHONPATH"
10431 (string-append
10432 (getcwd) "/test/"
10433 ":" (getenv "PYTHONPATH")))
10434 #t)))))
10435 (home-page
10436 "https://github.com/eliben/pyelftools")
10437 (synopsis
10438 "Analyze binary and library file information")
10439 (description "This Python library provides interfaces for parsing and
10440 analyzing two binary and library file formats; the Executable and Linking
10441 Format (ELF), and debugging information in the Debugging With Attributed
10442 Record Format (DWARF).")
10443 (license license:public-domain)))
10444
10445 (define-public python-pyev
10446 (package
10447 (name "python-pyev")
10448 (version "0.9.0")
10449 (source
10450 (origin
10451 (method url-fetch)
10452 (uri (pypi-uri "pyev" version))
10453 (sha256
10454 (base32
10455 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
10456 (build-system python-build-system)
10457 (arguments
10458 `(#:tests? #f ; no test suite
10459 #:phases
10460 (modify-phases %standard-phases
10461 (add-after 'unpack 'patch
10462 (lambda* (#:key inputs #:allow-other-keys)
10463 (let ((libev (string-append (assoc-ref inputs "libev")
10464 "/lib/libev.so.4")))
10465 (substitute* "setup.py"
10466 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
10467 (string-append "libev_dll_name = \"" libev "\"")))))))))
10468 (inputs
10469 `(("libev" ,libev)))
10470 (home-page "http://pythonhosted.org/pyev/")
10471 (synopsis "Python libev interface")
10472 (description "Pyev provides a Python interface to libev.")
10473 (license license:gpl3)))
10474
10475 (define-public python2-pyev
10476 (package-with-python2 python-pyev))
10477
10478 (define-public python-imagesize
10479 (package
10480 (name "python-imagesize")
10481 (version "1.1.0")
10482 (source
10483 (origin
10484 (method url-fetch)
10485 (uri (pypi-uri "imagesize" version))
10486 (sha256
10487 (base32
10488 "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk"))))
10489 (build-system python-build-system)
10490 (home-page "https://github.com/shibukawa/imagesize_py")
10491 (synopsis "Gets image size of files in various formats in Python")
10492 (description
10493 "This package allows determination of image size from
10494 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
10495 (license license:expat)))
10496
10497 (define-public python2-imagesize
10498 (package-with-python2 python-imagesize))
10499
10500 (define-public python-termstyle
10501 (package
10502 (name "python-termstyle")
10503 (version "0.1.11")
10504 (source
10505 (origin
10506 (method url-fetch)
10507 (uri (pypi-uri "termstyle" version))
10508 (sha256
10509 (base32
10510 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
10511 (build-system python-build-system)
10512 (arguments
10513 '(#:phases
10514 (modify-phases %standard-phases
10515 (replace 'check
10516 (lambda _
10517 (zero? (system* "python" "test3.py")))))))
10518 (home-page "https://github.com/gfxmonk/termstyle")
10519 (synopsis "Console text coloring for Python")
10520 (description "This package provides console text coloring for Python.")
10521 (license license:bsd-3)))
10522
10523 (define-public python-argcomplete
10524 (package
10525 (name "python-argcomplete")
10526 (version "1.7.0")
10527 (source
10528 (origin
10529 (method url-fetch)
10530 (uri (pypi-uri "argcomplete" version))
10531 (sha256
10532 (base32
10533 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
10534 (build-system python-build-system)
10535 (native-inputs
10536 `(("python-pexpect" ,python-pexpect)
10537 ("tcsh" ,tcsh)
10538 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
10539 (home-page "https://github.com/kislyuk/argcomplete")
10540 (synopsis "Shell tab completion for Python argparse")
10541 (description "argcomplete provides extensible command line tab completion
10542 of arguments and options for Python scripts using @code{argparse}. It's
10543 particularly useful for programs with many options or sub-parsers that can
10544 dynamically suggest completions; for example, when browsing resources over the
10545 network.")
10546 (license license:asl2.0)))
10547
10548 (define-public python2-argcomplete
10549 (package-with-python2 python-argcomplete))
10550
10551 (define-public python-xopen
10552 (package
10553 (name "python-xopen")
10554 (version "0.3.3")
10555 (source
10556 (origin
10557 (method url-fetch)
10558 (uri (pypi-uri "xopen" version))
10559 (sha256
10560 (base32
10561 "1a0wbil552wsmklwd89ssmgz3pjd86qa9i7jh8wqb9wslc8a2qjr"))
10562 (file-name (string-append name "-" version ".tar.gz"))))
10563 (build-system python-build-system)
10564 (home-page "https://github.com/marcelm/xopen/")
10565 (synopsis "Open compressed files transparently")
10566 (description "This module provides an @code{xopen} function that works like
10567 Python's built-in @code{open} function, but can also deal with compressed files.
10568 Supported compression formats are gzip, bzip2 and, xz, and are automatically
10569 recognized by their file extensions. The focus is on being as efficient as
10570 possible on all supported Python versions.")
10571 (license license:expat)))
10572
10573 (define-public python2-xopen
10574 (let ((base (package-with-python2
10575 (strip-python2-variant python-xopen))))
10576 (package
10577 (inherit base)
10578 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
10579 ,@(package-propagated-inputs base))))))
10580
10581 (define-public python-cheetah
10582 (package
10583 (name "python-cheetah")
10584 (version "3.1.0")
10585 (source
10586 (origin
10587 (method url-fetch)
10588 (uri (pypi-uri "Cheetah3" version))
10589 (sha256
10590 (base32
10591 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
10592 (build-system python-build-system)
10593 (arguments
10594 `(#:modules ((guix build utils)
10595 (guix build python-build-system)
10596 (ice-9 ftw)
10597 (srfi srfi-1)
10598 (srfi srfi-26))
10599 #:phases (modify-phases %standard-phases
10600 (add-after 'unpack 'use-absolute-python
10601 (lambda _
10602 (substitute* "Cheetah/CheetahWrapper.py"
10603 (("#!/usr/bin/env python")
10604 (string-append "#!" (which "python"))))
10605 #t))
10606 (replace 'check
10607 (lambda _
10608 (let ((cwd (getcwd)))
10609 (setenv "PYTHONPATH"
10610 (string-append
10611 cwd "/build/"
10612 (find (cut string-prefix? "lib" <>)
10613 (scandir (string-append cwd "/build")))
10614 ":" (getenv "PYTHONPATH")))
10615 (setenv "PATH"
10616 (string-append (getenv "PATH")
10617 ":" cwd "/bin"))
10618 (setenv "TMPDIR" "/tmp")
10619
10620 (substitute* "Cheetah/Tests/Test.py"
10621 (("unittest.TextTestRunner\\(\\)")
10622 "unittest.TextTestRunner(verbosity=2)"))
10623
10624 (invoke "python" "Cheetah/Tests/Test.py")))))))
10625 (propagated-inputs
10626 `(("python-markdown" ,python-markdown))) ;optional
10627 (home-page "http://cheetahtemplate.org/")
10628 (synopsis "Template engine")
10629 (description "Cheetah is a text-based template engine and Python code
10630 generator.
10631
10632 Cheetah can be used as a standalone templating utility or referenced as
10633 a library from other Python applications. It has many potential uses,
10634 but web developers looking for a viable alternative to ASP, JSP, PHP and
10635 PSP are expected to be its principle user group.
10636
10637 Features:
10638 @enumerate
10639 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
10640 text-based format.
10641 @item Cleanly separates content, graphic design, and program code.
10642 @item Blends the power and flexibility of Python with a simple template language
10643 that non-programmers can understand.
10644 @item Gives template writers full access to any Python data structure, module,
10645 function, object, or method in their templates.
10646 @item Makes code reuse easy by providing an object-orientated interface to
10647 templates that is accessible from Python code or other Cheetah templates.
10648 One template can subclass another and selectively reimplement sections of it.
10649 @item Provides a simple, yet powerful, caching mechanism that can dramatically
10650 improve the performance of a dynamic website.
10651 @item Compiles templates into optimized, yet readable, Python code.
10652 @end enumerate")
10653 (license (license:x11-style "file://LICENSE"))))
10654
10655 (define-public python2-cheetah
10656 (package-with-python2 python-cheetah))
10657
10658 (define-public python-dulwich
10659 (package
10660 (name "python-dulwich")
10661 (version "0.18.6")
10662 (source
10663 (origin
10664 (method url-fetch)
10665 (uri (list (string-append "https://www.dulwich.io/releases/"
10666 "dulwich-" version ".tar.gz")
10667 (pypi-uri "dulwich" version)))
10668 (sha256
10669 (base32
10670 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
10671 (build-system python-build-system)
10672 (arguments
10673 `(#:phases
10674 (modify-phases %standard-phases
10675 (add-before 'check 'fix-tests
10676 (lambda* (#:key inputs #:allow-other-keys)
10677 ;; The tests use Popen with a custom environment which doesn't
10678 ;; include PATH.
10679 (substitute* "dulwich/tests/compat/utils.py"
10680 (("'git'") (string-append "'"
10681 (which "git")
10682 "'")))
10683 (substitute* '("dulwich/tests/test_repository.py"
10684 "dulwich/tests/test_hooks.py")
10685 (("#!/bin/sh") (string-append "#!" (which "sh"))))
10686 (setenv "TEST_RUNNER" "unittest")
10687 (setenv "PYTHONHASHSEED" "random")
10688 #t)))))
10689 (propagated-inputs
10690 `(("python-fastimport" ,python-fastimport)))
10691 (native-inputs
10692 `(("python-mock" ,python-mock)
10693 ("python-geventhttpclient" ,python-geventhttpclient)
10694 ("git" ,git)))
10695 (home-page "https://www.dulwich.io/")
10696 (synopsis "Git implementation in Python")
10697 (description "Dulwich is an implementation of the Git file formats and
10698 protocols written in pure Python.")
10699 ;; Can be used with either license.
10700 (license (list license:asl2.0 license:gpl2+))))
10701
10702 (define-public python2-dulwich
10703 (package-with-python2 python-dulwich))
10704
10705 (define-public python-pbkdf2
10706 (package
10707 (name "python-pbkdf2")
10708 (version "1.3")
10709 (source
10710 (origin
10711 (method url-fetch)
10712 (uri (pypi-uri "pbkdf2" version))
10713 (sha256
10714 (base32
10715 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
10716 (build-system python-build-system)
10717 (arguments
10718 '(#:phases
10719 (modify-phases %standard-phases
10720 (replace 'check
10721 (lambda _
10722 (setenv "PYTHONPATH"
10723 (string-append (getcwd) "/build/lib:"
10724 (getenv "PYTHONPATH")))
10725 (zero? (system* "python" "test/test_pbkdf2.py")))))))
10726 (propagated-inputs
10727 `(("python-pycrypto" ,python-pycrypto))) ; optional
10728 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
10729 (synopsis "Password-based key derivation")
10730 (description "This module implements the password-based key derivation
10731 function, PBKDF2, specified in RSA PKCS#5 v2.0.
10732
10733 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
10734 is part of the RSA Public Key Cryptography Standards series. The provided
10735 implementation takes a password or a passphrase and a salt value (and
10736 optionally a iteration count, a digest module, and a MAC module) and provides
10737 a file-like object from which an arbitrarly-sized key can be read.")
10738 (license license:expat)))
10739
10740 (define-public python2-pbkdf2
10741 (package-with-python2 python-pbkdf2))
10742
10743 (define-public python-qrcode
10744 (package
10745 (name "python-qrcode")
10746 (version "6.0")
10747 (source
10748 (origin
10749 (method url-fetch)
10750 (uri (pypi-uri "qrcode" version))
10751 (sha256
10752 (base32
10753 "1gz1g2n9kqwqkak78aavr354z1v3yyiksk7q6xp5hi1zr6s0syq3"))))
10754 (build-system python-build-system)
10755 (arguments
10756 ;; FIXME: Tests require packaging 'pymaging'.
10757 '(#:tests? #f))
10758 (propagated-inputs
10759 `(("python-lxml" ,python-lxml) ; for SVG output
10760 ("python-pillow" ,python-pillow) ; for PNG output
10761 ("python-six" ,python-six)))
10762 (inputs
10763 `(;; The setup.cfg file needs to be used, and support for this requires
10764 ;; at least version 30.3.0 of setuptools
10765 ("python-setuptools" ,python-setuptools)))
10766 (home-page "https://github.com/lincolnloop/python-qrcode")
10767 (synopsis "QR Code image generator")
10768 (description "This package provides a pure Python QR Code generator
10769 module. It uses the Python Imaging Library (PIL) to allow for the generation
10770 of QR Codes.
10771
10772 In addition this package provides a command line tool to generate QR codes and
10773 either write these QR codes to a file or do the output as ascii art at the
10774 console.")
10775 (license license:bsd-3)))
10776
10777 (define-public python2-qrcode
10778 (package-with-python2 python-qrcode))
10779
10780 (define-public python-rst2ansi
10781 (package
10782 (name "python-rst2ansi")
10783 (version "0.1.5")
10784 (source
10785 (origin
10786 (method url-fetch)
10787 (uri (pypi-uri "rst2ansi" version))
10788 (sha256
10789 (base32
10790 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
10791 (build-system python-build-system)
10792 (propagated-inputs
10793 `(("python-docutils" ,python-docutils)))
10794 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
10795 (synopsis "Convert RST to ANSI-decorated console output")
10796 (description
10797 "Python module dedicated to rendering RST (reStructuredText) documents
10798 to ansi-escaped strings suitable for display in a terminal.")
10799 (license license:expat)))
10800
10801 (define-public python-ansi2html
10802 (package
10803 (name "python-ansi2html")
10804 (version "1.2.0")
10805 (source
10806 (origin
10807 (method url-fetch)
10808 (uri (pypi-uri "ansi2html" version))
10809 (sha256
10810 (base32
10811 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
10812 (build-system python-build-system)
10813 (native-inputs
10814 `(("python-mock" ,python-mock)
10815 ("python-nose" ,python-nose)))
10816 (propagated-inputs
10817 `(("python-six" ,python-six)))
10818 (home-page "https://github.com/ralphbean/ansi2html")
10819 (synopsis "Convert ANSI-decorated console output to HTML")
10820 (description
10821 "@command{ansi2html} is a Python library and command line utility for
10822 convering text with ANSI color codes to HTML or LaTeX.")
10823 (license license:gpl3+)))
10824
10825 (define-public python2-ansi2html
10826 (package-with-python2 python-ansi2html))
10827
10828 (define-public python-ddt
10829 (package
10830 (name "python-ddt")
10831 (version "1.1.3")
10832 (source
10833 (origin
10834 (method url-fetch)
10835 (uri (pypi-uri "ddt" version))
10836 (sha256
10837 (base32
10838 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
10839 (build-system python-build-system)
10840 (native-inputs
10841 `(("python-mock" ,python-mock)
10842 ("python-nose" ,python-nose)))
10843 (propagated-inputs
10844 `(("python-six" ,python-six)
10845 ("python-pyyaml" ,python-pyyaml)))
10846 (home-page "https://github.com/txels/ddt")
10847 (synopsis "Data-Driven Tests")
10848 (description
10849 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
10850 running it with different test data, and make it appear as multiple test
10851 cases.")
10852 (license license:expat)))
10853
10854 (define-public python2-ddt
10855 (package-with-python2 python-ddt))
10856
10857 (define-public python-pycountry
10858 (package
10859 (name "python-pycountry")
10860 (version "18.5.26")
10861 (source
10862 (origin
10863 (method url-fetch)
10864 (uri (pypi-uri "pycountry" version))
10865 (sha256
10866 (base32
10867 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
10868 (build-system python-build-system)
10869 (home-page "https://bitbucket.org/flyingcircus/pycountry")
10870 (synopsis "ISO databases for languages, countries, currencies, etc.")
10871 (description
10872 "@code{pycountry} provides the ISO databases for the standards:
10873 @enumerate
10874 @item 639-3 (Languages)
10875 @item 3166 (Countries)
10876 @item 3166-3 (Deleted Countries)
10877 @item 3166-2 (Subdivisions of countries)
10878 @item 4217 (Currencies)
10879 @item 15924 (Scripts)
10880 @end enumerate
10881 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
10882 through a Python API.")
10883 (license license:lgpl2.1+)))
10884
10885 (define-public python2-pycountry
10886 (package-with-python2 python-pycountry))
10887
10888 (define-public python-pycosat
10889 (package
10890 (name "python-pycosat")
10891 (version "0.6.1")
10892 (source
10893 (origin
10894 (method url-fetch)
10895 (uri (pypi-uri "pycosat" version))
10896 (sha256
10897 (base32
10898 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
10899 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
10900 (build-system python-build-system)
10901 (home-page "https://github.com/ContinuumIO/pycosat")
10902 (synopsis "Bindings to picosat (a SAT solver)")
10903 (description
10904 "This package provides efficient Python bindings to @code{picosat} on
10905 the C level. When importing pycosat, the @code{picosat} solver becomes part
10906 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
10907 Problem} (SAT) solver.")
10908 (license license:expat)))
10909
10910 (define-public python2-pycosat
10911 (package-with-python2 python-pycosat))
10912
10913 (define-public python2-ruamel.ordereddict
10914 (package
10915 (name "python2-ruamel.ordereddict")
10916 (version "0.4.9")
10917 (source
10918 (origin
10919 (method url-fetch)
10920 (uri (pypi-uri "ruamel.ordereddict" version))
10921 (sha256
10922 (base32
10923 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
10924 (build-system python-build-system)
10925 (arguments
10926 `(#:python ,python-2
10927 #:phases
10928 (modify-phases %standard-phases
10929 (delete 'check)
10930 (add-after 'install 'check
10931 (lambda* (#:key inputs outputs #:allow-other-keys)
10932 (add-installed-pythonpath inputs outputs)
10933 (zero? (system* "python" "test/testordereddict.py")))))))
10934 (home-page "https://bitbucket.org/ruamel/ordereddict")
10935 (synopsis "Version of dict that keeps keys in insertion order")
10936 (description
10937 "This is an implementation of an ordered dictionary with @dfn{Key
10938 Insertion Order} (KIO: updates of values do not affect the position of the
10939 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
10940 removed and put at the back). The standard library module @code{OrderedDict},
10941 implemented later, implements a subset of @code{ordereddict} functionality.
10942 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
10943 Order} (KSO, no sorting function can be specified, but a transform can be
10944 specified to apply on the key before comparison (e.g. @code{string.lower})).")
10945 (license license:expat)))
10946
10947 (define-public python-pypeg2
10948 (package
10949 (name "python-pypeg2")
10950 (version "2.15.2")
10951 (source
10952 (origin
10953 (method url-fetch)
10954 (uri (pypi-uri "pyPEG2" version))
10955 (sha256
10956 (base32
10957 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
10958 (build-system python-build-system)
10959 (propagated-inputs `(("python-lxml" ,python-lxml)))
10960 (arguments
10961 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
10962 '(#:tests? #f))
10963 (home-page "https://fdik.org/pyPEG/")
10964 (synopsis "Parsering Expression Grammars in Python")
10965 (description "PyPEG is an intrinsic parser interpreter framework for
10966 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
10967 parse many formal languages.")
10968 (license license:gpl2)))
10969
10970 (define-public python-incremental
10971 (package
10972 (name "python-incremental")
10973 (version "17.5.0")
10974 (source
10975 (origin
10976 (method url-fetch)
10977 (uri (pypi-uri "incremental" version))
10978 (sha256
10979 (base32
10980 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
10981 (build-system python-build-system)
10982 (home-page "https://github.com/hawkowl/incremental")
10983 (synopsis "Library for versioning Python projects")
10984 (description "Incremental is a small library that versions your Python
10985 projects.")
10986 (license license:expat)))
10987
10988 (define-public python2-incremental
10989 (package-with-python2 python-incremental))
10990
10991 (define-public python-invoke
10992 (package
10993 (name "python-invoke")
10994 (home-page "http://www.pyinvoke.org/")
10995 (version "1.1.0")
10996 (source (origin
10997 (method url-fetch)
10998 (uri (pypi-uri "invoke" version))
10999 (sha256
11000 (base32
11001 "0aiy1xvk1f91246zxd1zqrm679vdvd10h843a2na41cqr3cflpi6"))))
11002 (build-system python-build-system)
11003 (arguments
11004 ;; XXX: Requires many dependencies that are not yet in Guix.
11005 `(#:tests? #f))
11006 (synopsis "Pythonic task execution")
11007 (description
11008 "Invoke is a Python task execution tool and library, drawing inspiration
11009 from various sources to arrive at a powerful and clean feature set. It is
11010 evolved from the Fabric project, but focuses on local and abstract concerns
11011 instead of servers and network commands.")
11012 (license license:bsd-3)))
11013
11014 (define-public python2-invoke
11015 (package-with-python2 python-invoke))
11016
11017 (define-public python-automat
11018 (package
11019 (name "python-automat")
11020 (version "0.6.0")
11021 (source (origin
11022 (method url-fetch)
11023 (uri (pypi-uri "Automat" version))
11024 (sha256
11025 (base32
11026 "1a7nsrljysfmdqmpn2apfa1gg6rfah4y9sizvns8gb08rx7d07rw"))))
11027 (build-system python-build-system)
11028 ;; We disable the tests because they require python-twisted, while
11029 ;; python-twisted depends on python-automat. Twisted is optional, but the
11030 ;; tests fail if it is not available. Also see
11031 ;; <https://github.com/glyph/automat/issues/71>.
11032 (arguments '(#:tests? #f))
11033 (native-inputs
11034 `(("python-m2r" ,python-m2r)
11035 ("python-setuptools-scm" ,python-setuptools-scm)
11036 ("python-graphviz" ,python-graphviz)))
11037 (propagated-inputs
11038 `(("python-six" ,python-six)
11039 ("python-attrs" ,python-attrs)))
11040 (home-page "https://github.com/glyph/Automat")
11041 (synopsis "Self-service finite-state machines")
11042 (description "Automat is a library for concise, idiomatic Python
11043 expression of finite-state automata (particularly deterministic finite-state
11044 transducers).")
11045 (license license:expat)))
11046
11047 (define-public python2-automat
11048 (package-with-python2 python-automat))
11049
11050 (define-public python-m2r
11051 (package
11052 (name "python-m2r")
11053 (version "0.1.12")
11054 (source (origin
11055 (method url-fetch)
11056 (uri (pypi-uri "m2r" version))
11057 (sha256
11058 (base32
11059 "1axrwnf425sz4qz3c0qc7yhhki4myzb8rki7pczcsgzznzmqdyxd"))))
11060 (build-system python-build-system)
11061 (propagated-inputs
11062 `(("python-docutils" ,python-docutils)
11063 ("python-mistune" ,python-mistune)))
11064 (native-inputs
11065 `(("python-pygments" ,python-pygments)
11066 ("python-mock" ,python-mock)))
11067 (home-page "https://github.com/miyakogi/m2r")
11068 (synopsis "Markdown to reStructuredText converter")
11069 (description "M2R converts a markdown file including reST markups to valid
11070 reST format.")
11071 (license license:expat)))
11072
11073 (define-public python2-m2r
11074 (package-with-python2 python-m2r))
11075
11076 (define-public python-constantly
11077 (package
11078 (name "python-constantly")
11079 (version "15.1.0")
11080 (source (origin
11081 (method url-fetch)
11082 (uri (pypi-uri "constantly" version))
11083 (sha256
11084 (base32
11085 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
11086 (build-system python-build-system)
11087 (home-page "https://github.com/twisted/constantly")
11088 (synopsis "Symbolic constants in Python")
11089 (description "Constantly is a Python library that provides symbolic
11090 constant support. It includes collections and constants with text, numeric,
11091 and bit flag values.")
11092 (license license:expat)))
11093
11094 (define-public python2-constantly
11095 (package-with-python2 python-constantly))
11096
11097 (define-public python-attrs
11098 (package
11099 (name "python-attrs")
11100 (version "18.2.0")
11101 (source (origin
11102 (method url-fetch)
11103 (uri (pypi-uri "attrs" version))
11104 (sha256
11105 (base32
11106 "0s9ydh058wmmf5v391pym877x4ahxg45dw6a0w4c7s5wgpigdjqh"))))
11107 (build-system python-build-system)
11108 (arguments
11109 `(#:modules ((guix build utils)
11110 (guix build python-build-system)
11111 (ice-9 ftw)
11112 (srfi srfi-1)
11113 (srfi srfi-26))
11114 #:phases (modify-phases %standard-phases
11115 (replace 'check
11116 (lambda _
11117 (let ((cwd (getcwd)))
11118 (setenv "PYTHONPATH"
11119 (string-append
11120 cwd "/build/"
11121 (find (cut string-prefix? "lib" <>)
11122 (scandir (string-append cwd "/build")))
11123 ":"
11124 (getenv "PYTHONPATH")))
11125 (invoke "python" "-m" "pytest")))))))
11126 (native-inputs
11127 `(("python-coverage" ,python-coverage)
11128 ("python-hypothesis" ,python-hypothesis)
11129 ("python-pympler" ,python-pympler)
11130 ("python-pytest" ,python-pytest)
11131 ("python-six" ,python-six)
11132 ("python-sphinx" ,python-sphinx)
11133 ("python-zope-interface" ,python-zope-interface)))
11134 (home-page "https://github.com/python-attrs/attrs/")
11135 (synopsis "Attributes without boilerplate")
11136 (description "@code{attrs} is a Python package with class decorators that
11137 ease the chores of implementing the most common attribute-related object
11138 protocols.")
11139 (license license:expat)))
11140
11141 (define-public python2-attrs
11142 (package-with-python2 python-attrs))
11143
11144 (define-public python-attrs-bootstrap
11145 (package
11146 (inherit python-attrs)
11147 (name "python-attrs-bootstrap")
11148 ;; Keep this on a fixed version so python-attrs can be updated without
11149 ;; triggering a mass-rebuild. FIXME: Update this in the next rebuild cycle.
11150 (version "17.4.0")
11151 (source (origin
11152 (method url-fetch)
11153 (uri (pypi-uri "attrs" version))
11154 (sha256
11155 (base32
11156 "1jafnn1kzd6qhxgprhx6y6ik1r5m2rilx25syzcmq03azp660y8w"))))
11157 (native-inputs `())
11158 (arguments `(#:tests? #f))))
11159
11160 (define-public python2-attrs-bootstrap
11161 (package-with-python2 python-attrs-bootstrap))
11162
11163 (define-public python2-cliapp
11164 (package
11165 (name "python2-cliapp")
11166 (version "1.20170823")
11167 (source
11168 (origin
11169 (method url-fetch)
11170 (uri (string-append
11171 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
11172 version ".tar.gz"))
11173 (sha256
11174 (base32
11175 "1i9gik0xrj6jmi95s5w988jl1y265baz5xm5pbqdyvsh8h9ln6yq"))))
11176 (build-system python-build-system)
11177 (arguments
11178 `(#:python ,python-2
11179 #:phases
11180 (modify-phases %standard-phases
11181 ;; check phase needs to be run before the build phase. If not,
11182 ;; coverage-test-runner looks for tests for the built source files,
11183 ;; and fails.
11184 (delete 'check)
11185 (add-before 'build 'check
11186 (lambda _
11187 ;; Disable python3 tests
11188 (substitute* "check"
11189 (("python3") "# python3"))
11190 (zero? (system* "./check")))))))
11191 (native-inputs
11192 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
11193 ("python2-pep8" ,python2-pep8)))
11194 (propagated-inputs
11195 `(("python2-pyaml" ,python2-pyaml)))
11196 (home-page "https://liw.fi/cliapp/")
11197 (synopsis "Python framework for command line programs")
11198 (description "@code{python2-cliapp} is a python framework for
11199 command line programs. It contains the typical stuff such programs
11200 need to do, such as parsing the command line for options, and
11201 iterating over input files.")
11202 (license license:gpl2+)))
11203
11204 (define-public python2-ttystatus
11205 (package
11206 (name "python2-ttystatus")
11207 (version "0.35")
11208 (source
11209 (origin
11210 (method url-fetch)
11211 (uri (string-append
11212 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
11213 version ".tar.gz"))
11214 (sha256
11215 (base32
11216 "0vivqbw7ddhsq1zj3g9cvvv4f0phl0pis2smsnwcr2szz2fk3hl6"))))
11217 (build-system python-build-system)
11218 (native-inputs
11219 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
11220 ("python2-pep8" ,python2-pep8)))
11221 (arguments
11222 `(#:python ,python-2
11223 #:phases
11224 (modify-phases %standard-phases
11225 ;; check phase needs to be run before the build phase. If not,
11226 ;; coverage-test-runner looks for tests for the built source files,
11227 ;; and fails.
11228 (delete 'check)
11229 (add-before 'build 'check
11230 (lambda _
11231 (zero? (system* "make" "check")))))))
11232 (home-page "https://liw.fi/ttystatus/")
11233 (synopsis "Python library for showing progress reporting and
11234 status updates on terminals")
11235 (description "@code{python2-ttystatus} is a python library for
11236 showing progress reporting and status updates on terminals, for
11237 command line programs. Output is automatically adapted to the width
11238 of the terminal: truncated if it does not fit, and resized if the
11239 terminal size changes.")
11240 (license license:gpl3+)))
11241
11242 (define-public python2-tracing
11243 (package
11244 (name "python2-tracing")
11245 (version "0.10")
11246 (source
11247 (origin
11248 (method url-fetch)
11249 (uri (string-append
11250 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
11251 version ".tar.gz"))
11252 (sha256
11253 (base32
11254 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
11255 (build-system python-build-system)
11256 (arguments
11257 `(#:python ,python-2))
11258 (home-page "https://liw.fi/tracing/")
11259 (synopsis "Python debug logging helper")
11260 (description "@code{python2-tracing} is a python library for
11261 logging debug messages. It provides a way to turn debugging messages
11262 on and off, based on the filename they occur in. It is much faster
11263 than using @code{logging.Filter} to accomplish the same thing, which
11264 matters when code is run in production mode. The actual logging still
11265 happens using the @code{logging} library.")
11266 (license license:gpl3+)))
11267
11268 (define-public python2-larch
11269 (package
11270 (name "python2-larch")
11271 (version "1.20151025")
11272 (source
11273 (origin
11274 (method url-fetch)
11275 (uri (string-append
11276 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
11277 version ".tar.gz"))
11278 (patches (search-patches
11279 "python2-larch-coverage-4.0a6-compatibility.patch"))
11280 (sha256
11281 (base32
11282 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
11283 (build-system python-build-system)
11284 (arguments
11285 `(#:python ,python-2
11286 #:phases
11287 (modify-phases %standard-phases
11288 ;; check phase needs to be run before the build phase. If not,
11289 ;; coverage-test-runner looks for tests for the built source files,
11290 ;; and fails.
11291 (delete 'check)
11292 (add-before 'build 'check
11293 (lambda _
11294 (zero? (system* "make" "check")))))))
11295 (native-inputs
11296 `(("cmdtest" ,cmdtest)
11297 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
11298 (propagated-inputs
11299 `(("python2-tracing" ,python2-tracing)))
11300 (home-page "https://liw.fi/larch/")
11301 (synopsis "Python copy-on-write B-tree library")
11302 (description "@code{python2-larch} is an implementation of
11303 particular kind of B-tree, based on research by Ohad Rodeh. See
11304 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
11305 on the data structure.
11306
11307 The distinctive feature of this B-tree is that a node is never
11308 (conceptually) modified. Instead, all updates are done by
11309 copy-on-write. This makes it easy to clone a tree, and modify only the
11310 clone, while other processes access the original tree.")
11311 (license license:gpl3+)))
11312
11313 (define-public python-astroid
11314 (package
11315 (name "python-astroid")
11316 (version "2.1.0")
11317 (source
11318 (origin
11319 (method url-fetch)
11320 (uri (pypi-uri "astroid" version))
11321 (sha256
11322 (base32
11323 "08hz675knh4294bancdapql392fmbjyimhbyrmfkz1ka7l035c1m"))))
11324 (build-system python-build-system)
11325 (propagated-inputs
11326 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
11327 ("python-six" ,python-six)
11328 ("python-wrapt" ,python-wrapt)))
11329 (native-inputs
11330 `(("python-dateutil" ,python-dateutil)
11331 ("python-nose" ,python-nose)
11332 ("python-pytest" ,python-pytest)
11333 ("python-pytest-runner" ,python-pytest-runner)))
11334 (arguments
11335 `(#:phases
11336 (modify-phases %standard-phases
11337 (add-after 'unpack 'remove-spurious-test
11338 (lambda _
11339 ;; This can be removed after upgrading from python-3.7
11340 ;; https://github.com/PyCQA/astroid/issues/593
11341 ;; https://bugs.python.org/issue34056
11342 (delete-file "astroid/tests/unittest_modutils.py")
11343 #t))
11344 (replace 'check
11345 (lambda _
11346 (invoke "pytest" "astroid"))))))
11347 (home-page "https://github.com/PyCQA/astroid")
11348 (synopsis "Common base representation of python source code for pylint and
11349 other projects")
11350 (description "@code{python-astroid} provides a common base representation
11351 of python source code for projects such as pychecker, pyreverse, pylint, etc.
11352
11353 It provides a compatible representation which comes from the _ast module. It
11354 rebuilds the tree generated by the builtin _ast module by recursively walking
11355 down the AST and building an extended ast. The new node classes have
11356 additional methods and attributes for different usages. They include some
11357 support for static inference and local name scopes. Furthermore, astroid
11358 builds partial trees by inspecting living objects.")
11359 (license license:lgpl2.1+)
11360 (properties `((python2-variant . ,(delay python2-astroid))))))
11361
11362 (define-public python2-astroid
11363 (let ((base (package-with-python2
11364 (strip-python2-variant python-astroid))))
11365 (package (inherit base)
11366 ;; Version 2.x removes python2 support.
11367 (version "1.6.5")
11368 (source
11369 (origin
11370 (method url-fetch)
11371 (uri (pypi-uri "astroid" version))
11372 (sha256
11373 (base32
11374 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
11375 (arguments
11376 (substitute-keyword-arguments (package-arguments base)
11377 ((#:phases phases)
11378 `(modify-phases ,phases
11379 (add-after 'unpack 'remove-spurious-test
11380 (lambda _
11381 ;; https://github.com/PyCQA/astroid/issues/276
11382 (delete-file "astroid/tests/unittest_brain.py")
11383 #t))
11384 (replace 'check
11385 (lambda _
11386 (invoke"python" "-m" "unittest" "discover"
11387 "-p" "unittest*.py")))))))
11388 (native-inputs `())
11389 (propagated-inputs
11390 `(("python2-backports-functools-lru-cache"
11391 ,python2-backports-functools-lru-cache)
11392 ("python2-enum34" ,python2-enum34)
11393 ("python2-singledispatch" ,python2-singledispatch)
11394 ,@(package-propagated-inputs base))))))
11395
11396 (define-public python-isort
11397 (package
11398 (name "python-isort")
11399 (version "4.2.5")
11400 (source
11401 (origin
11402 (method url-fetch)
11403 (uri (string-append
11404 "https://github.com/timothycrosley/isort/archive/"
11405 version ".tar.gz"))
11406 (file-name (string-append name "-" version ".tar.gz"))
11407 (sha256
11408 (base32
11409 "0zsrgkb0krn5476yncy5dd56k7dk34zqb4bnlvwy44ixgilyjmfh"))))
11410 (build-system python-build-system)
11411 (native-inputs
11412 `(("python-mock" ,python-mock)
11413 ("python-pytest" ,python-pytest)))
11414 (home-page "https://github.com/timothycrosley/isort")
11415 (synopsis "Python utility/library to sort python imports")
11416 (description "@code{python-isort} is a python utility/library to sort
11417 imports alphabetically, and automatically separated into sections. It
11418 provides a command line utility, a python library and plugins for various
11419 editors.")
11420 (license license:expat)))
11421
11422 (define-public python2-isort
11423 (package-with-python2 python-isort))
11424
11425 (define-public python2-backports-functools-lru-cache
11426 (package
11427 (name "python2-backports-functools-lru-cache")
11428 (version "1.5")
11429 (source
11430 (origin
11431 (method url-fetch)
11432 ;; only the pypi tarballs contain the necessary metadata
11433 (uri (pypi-uri "backports.functools_lru_cache" version))
11434 (sha256
11435 (base32
11436 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
11437 (build-system python-build-system)
11438 (native-inputs
11439 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
11440 (arguments
11441 `(#:python ,python-2))
11442 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
11443 (synopsis "Backport of functools.lru_cache from Python 3.3")
11444 (description "@code{python2-backports-functools-lru-cache} is a backport
11445 of @code{functools.lru_cache} from python 3.3.")
11446 (license license:expat)))
11447
11448 (define-public python-configparser
11449 (package
11450 (name "python-configparser")
11451 (version "3.5.0")
11452 (source
11453 (origin
11454 (method url-fetch)
11455 (uri (string-append
11456 "https://bitbucket.org/ambv/configparser/get/"
11457 version ".tar.bz2"))
11458 (file-name (string-append name "-" version ".tar.gz"))
11459 (sha256
11460 (base32
11461 "0waq40as14abwzbb321hfz4vr1fi363nscy32ga14qvfygrg96wa"))))
11462 (build-system python-build-system)
11463 (home-page "http://docs.python.org/py3k/library/configparser.html")
11464 (synopsis "Backport of configparser from python 3.5")
11465 (description "@code{python-configparser} is a backport of
11466 @code{configparser} from Python 3.5 so that it can be used directly
11467 in other versions.")
11468 (license license:expat)))
11469
11470 (define-public python2-configparser
11471 (package-with-python2 python-configparser))
11472
11473 (define-public python-mando
11474 (package
11475 (name "python-mando")
11476 (version "0.6.4")
11477 (source (origin
11478 (method url-fetch)
11479 (uri (pypi-uri "mando" version))
11480 (sha256
11481 (base32
11482 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
11483 (build-system python-build-system)
11484 (propagated-inputs
11485 `(("python-rst2ansi" ,python-rst2ansi)
11486 ("python-six" ,python-six)))
11487 (native-inputs
11488 `(("python-pytest" ,python-pytest)))
11489 (home-page "https://mando.readthedocs.org/")
11490 (synopsis
11491 "Wrapper around argparse, allowing creation of complete CLI applications")
11492 (description
11493 "This package is a wrapper around argparse, allowing you to write complete CLI
11494 applications in seconds while maintaining all the flexibility.")
11495 (license license:expat)))
11496
11497 (define-public python2-mando
11498 (package-with-python2 python-mando))
11499
11500 (define-public python-fudge
11501 (package
11502 (name "python-fudge")
11503 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
11504 ;; package, which is currently the only use of this package.
11505 (version "0.9.6")
11506 (source
11507 (origin
11508 (method url-fetch)
11509 (uri (pypi-uri "fudge" version))
11510 (sha256
11511 (base32
11512 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
11513 (build-system python-build-system)
11514 (arguments
11515 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
11516 (home-page "https://github.com/fudge-py/fudge")
11517 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
11518 (description
11519 "Fudge is a Python module for using fake objects (mocks and stubs) to
11520 test real ones.
11521
11522 In readable Python code, you declare the methods available on your fake object
11523 and how they should be called. Then you inject that into your application and
11524 start testing. This declarative approach means you don’t have to record and
11525 playback actions and you don’t have to inspect your fakes after running code.
11526 If the fake object was used incorrectly then you’ll see an informative
11527 exception message with a traceback that points to the culprit.")
11528 (license license:expat)))
11529
11530 (define-public python2-fudge
11531 (package-with-python2 python-fudge))
11532
11533 (define-public python-mwclient
11534 (package
11535 (name "python-mwclient")
11536 (version "0.8.4")
11537 (source
11538 (origin
11539 (method url-fetch)
11540 ;; The PyPI version wouldn't contain tests.
11541 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
11542 "v" version ".tar.gz"))
11543 (file-name (string-append name "-" version ".tar.gz"))
11544 (sha256
11545 (base32
11546 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
11547 (build-system python-build-system)
11548 (propagated-inputs
11549 `(("python-requests" ,python-requests)
11550 ("python-requests-oauthlib"
11551 ,python-requests-oauthlib)
11552 ("python-six" ,python-six)))
11553 (native-inputs
11554 `(("python-mock" ,python-mock)
11555 ("python-pytest" ,python-pytest)
11556 ("python-pytest-pep8" ,python-pytest-pep8)
11557 ("python-pytest-cache" ,python-pytest-cache)
11558 ("python-pytest-cov" ,python-pytest-cov)
11559 ("python-responses" ,python-responses)))
11560 (home-page "https://github.com/btongminh/mwclient")
11561 (synopsis "MediaWiki API client")
11562 (description "This package provides a MediaWiki API client.")
11563 (license license:expat)))
11564
11565 (define-public python2-mwclient
11566 (package-with-python2 python-mwclient))
11567
11568 (define-public python-utils
11569 (package
11570 (name "python-utils")
11571 (version "2.1.0")
11572 (source (origin
11573 (method url-fetch)
11574 (uri (pypi-uri "python-utils" version))
11575 (sha256
11576 (base32
11577 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
11578 (build-system python-build-system)
11579 (native-inputs
11580 `(("pytest-runner" ,python-pytest-runner)
11581 ("pytest" ,python-pytest)
11582 ("six" ,python-six)))
11583 (home-page "https://github.com/WoLpH/python-utils")
11584 (synopsis "Convenient utilities not included with the standard Python install")
11585 (description
11586 "Python Utils is a collection of small Python functions and classes which
11587 make common patterns shorter and easier.")
11588 (license license:bsd-2)))
11589
11590 (define-public python2-utils
11591 (package-with-python2 python-utils))
11592
11593 (define-public python-sphinx-me
11594 (package
11595 (name "python-sphinx-me")
11596 (version "0.3")
11597 (source
11598 (origin
11599 (method url-fetch)
11600 (uri (pypi-uri "sphinx-me" version))
11601 (sha256
11602 (base32
11603 "06jzgp213zihnvpcy2y5jy3ykid3apc2ncp2pg6a2g05lhiziglq"))))
11604 (build-system python-build-system)
11605 (home-page "https://github.com/stephenmcd/sphinx-me")
11606 (synopsis "Create a Sphinx documentation shell")
11607 (description
11608 "Create a Sphinx documentation shell for your project and include the
11609 README file as the documentation index. It handles extracting the required
11610 meta data such as the project name, author and version from your project for
11611 use in your Sphinx docs.")
11612 (license license:bsd-2)))
11613
11614 (define-public python2-sphinx-me
11615 (package-with-python2 python-sphinx-me))
11616
11617 (define-public python-diff-match-patch
11618 (package
11619 (name "python-diff-match-patch")
11620 (version "20121119")
11621 (source
11622 (origin
11623 (method url-fetch)
11624 (uri (pypi-uri "diff-match-patch" version))
11625 (sha256
11626 (base32
11627 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
11628 (build-system python-build-system)
11629 (home-page "https://code.google.com/p/google-diff-match-patch")
11630 (synopsis "Synchronize plain text")
11631 (description "Diff Match and Patch libraries offer robust algorithms to
11632 perform the operations required for synchronizing plain text.")
11633 (license license:asl2.0)))
11634
11635 (define-public python2-diff-match-patch
11636 (package-with-python2 python-diff-match-patch))
11637
11638 (define-public python-dirsync
11639 (package
11640 (name "python-dirsync")
11641 (version "2.2.3")
11642 (source
11643 (origin
11644 (method url-fetch)
11645 (uri (pypi-uri "dirsync" version))
11646 (sha256
11647 (base32
11648 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
11649 (build-system python-build-system)
11650 (propagated-inputs
11651 `(("six" ,python-six)))
11652 (home-page "https://bitbucket.org/tkhyn/dirsync")
11653 (synopsis "Advanced directory tree synchronisation tool")
11654 (description "Advanced directory tree synchronisation tool.")
11655 (license license:expat)))
11656
11657 (define-public python2-dirsync
11658 (package-with-python2 python-dirsync))
11659
11660 (define-public python-levenshtein
11661 (package
11662 (name "python-levenshtein")
11663 (version "0.12.0")
11664 (source
11665 (origin
11666 (method url-fetch)
11667 (uri (pypi-uri "python-Levenshtein" version))
11668 (sha256
11669 (base32
11670 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
11671 (build-system python-build-system)
11672 (home-page "https://github.com/ztane/python-Levenshtein")
11673 (synopsis "Fast computation of Levenshtein distance and string similarity")
11674 (description
11675 "The Levenshtein Python C extension module contains functions for fast computation of
11676 @enumerate
11677 @item Levenshtein (edit) distance, and edit operations
11678 @item string similarity
11679 @item approximate median strings, and generally string averaging
11680 @item string sequence and set similarity
11681 @end enumerate
11682 It supports both normal and Unicode strings.")
11683 (license license:gpl2+)))
11684
11685 (define-public python2-levenshtein
11686 (package-with-python2 python-levenshtein))
11687
11688 (define-public python-scandir
11689 (package
11690 (name "python-scandir")
11691 (version "1.9.0")
11692 (source
11693 (origin
11694 (method url-fetch)
11695 (uri (pypi-uri "scandir" version))
11696 (sha256
11697 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
11698 (build-system python-build-system)
11699 (arguments
11700 `(#:phases (modify-phases %standard-phases
11701 (replace 'check
11702 (lambda _
11703 (invoke "python" "test/run_tests.py"))))))
11704 (home-page "https://github.com/benhoyt/scandir")
11705 (synopsis "Directory iteration function")
11706 (description
11707 "Directory iteration function like os.listdir(), except that instead of
11708 returning a list of bare filenames, it yields DirEntry objects that include
11709 file type and stat information along with the name. Using scandir() increases
11710 the speed of os.walk() by 2-20 times (depending on the platform and file
11711 system) by avoiding unnecessary calls to os.stat() in most cases.
11712
11713 This package is part of the Python standard library since version 3.5.")
11714 (license license:bsd-3)))
11715
11716 (define-public python2-scandir
11717 (package-with-python2 python-scandir))
11718
11719 (define-public python2-stemming
11720 (package
11721 (name "python2-stemming")
11722 (version "1.0.1")
11723 (source
11724 (origin
11725 (method url-fetch)
11726 (uri (pypi-uri "stemming" version))
11727 (sha256
11728 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
11729 (build-system python-build-system)
11730 (arguments
11731 `(#:python ,python-2))
11732 (home-page "https://bitbucket.org/mchaput/stemming/overview")
11733 (synopsis "Python implementations of various stemming algorithms")
11734 (description
11735 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
11736 stemming algorithms for English. These implementations are straightforward and
11737 efficient, unlike some Python versions of the same algorithms available on the
11738 Web. This package is an extraction of the stemming code included in the Whoosh
11739 search engine.")
11740 (license license:public-domain)))
11741
11742 (define-public python-factory-boy
11743 (package
11744 (name "python-factory-boy")
11745 (version "2.8.1")
11746 (source
11747 (origin
11748 (method url-fetch)
11749 (uri (pypi-uri "factory_boy" version))
11750 (sha256
11751 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
11752 (build-system python-build-system)
11753 (arguments
11754 ;; Tests are not included in the tarball.
11755 `(#:tests? #f))
11756 (propagated-inputs
11757 `(("faker" ,python-faker)))
11758 (home-page "https://github.com/benhoyt/scandir")
11759 (synopsis "Versatile test fixtures replacement")
11760 (description
11761 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
11762
11763 As a fixtures replacement tool, it aims to replace static, hard to maintain
11764 fixtures with easy-to-use factories for complex object.
11765
11766 Instead of building an exhaustive test setup with every possible combination
11767 of corner cases, factory_boy allows you to use objects customized for the
11768 current test, while only declaring the test-specific fields")
11769 (license license:expat)))
11770
11771 (define-public python2-factory-boy
11772 (package-with-python2 python-factory-boy))
11773
11774 (define-public python-translate-toolkit
11775 (package
11776 (name "python-translate-toolkit")
11777 (version "2.1.0")
11778 (source
11779 (origin
11780 (method url-fetch)
11781 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
11782 (sha256
11783 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
11784 (build-system python-build-system)
11785 (native-inputs
11786 `(("python-pytest" ,python-pytest)
11787 ("python-sphinx" ,python-sphinx)))
11788 (propagated-inputs
11789 `(("python-babel" ,python-babel)
11790 ("python-beautifulsoup4" ,python-beautifulsoup4)
11791 ("python-chardet" ,python-chardet)
11792 ("python-diff-match-patch" ,python-diff-match-patch)
11793 ("python-levenshtein" ,python-levenshtein)
11794 ("python-lxml" ,python-lxml)
11795 ("python-six" ,python-six)
11796 ("python-vobject" ,python-vobject)
11797 ("python-pyyaml" ,python-pyyaml)))
11798 (arguments
11799 ;; TODO: tests are not run, because they end with
11800 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
11801 ;; 'parse_funcs'
11802 ;; during test setup.
11803 `(#:tests? #f))
11804 (home-page "http://toolkit.translatehouse.org")
11805 (synopsis "Tools and API for translation and localization engineering")
11806 (description
11807 "Tools and API for translation and localization engineering. It contains
11808 several utilities, as well as an API for building localization tools.")
11809 (license license:gpl2+)))
11810
11811 (define-public python2-translate-toolkit
11812 (package-with-python2 python-translate-toolkit))
11813
11814 (define-public python-packaging
11815 (package
11816 (name "python-packaging")
11817 (version "18.0")
11818 (source
11819 (origin
11820 (method url-fetch)
11821 (uri (pypi-uri "packaging" version))
11822 (sha256
11823 (base32
11824 "01wq9c53ix5rz6qg2c98gy8n4ff768rmanifm8m5jpjiaizj51h8"))))
11825 (build-system python-build-system)
11826 (arguments
11827 `(#:phases (modify-phases %standard-phases
11828 (replace 'check
11829 (lambda _ (invoke "py.test" "-vv"))))))
11830 (native-inputs
11831 `(("python-pretend" ,python-pretend)
11832 ("python-pytest" ,python-pytest)))
11833 (propagated-inputs
11834 `(("python-pyparsing" ,python-pyparsing)
11835 ("python-six" ,python-six)))
11836 (home-page "https://github.com/pypa/packaging")
11837 (synopsis "Core utilities for Python packages")
11838 (description "Packaging is a Python module for dealing with Python packages.
11839 It offers an interface for working with package versions, names, and dependency
11840 information.")
11841 ;; From 'LICENSE': This software is made available under the terms of
11842 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
11843 ;; Contributions to this software is made under the terms of *both* these
11844 ;; licenses.
11845 (license (list license:asl2.0 license:bsd-2))))
11846
11847 (define-public python2-packaging
11848 (package-with-python2 python-packaging))
11849
11850 (define-public python-relatorio
11851 (package
11852 (name "python-relatorio")
11853 (version "0.8.0")
11854 (source
11855 (origin
11856 (method url-fetch)
11857 (uri (pypi-uri "relatorio" version))
11858 (sha256
11859 (base32
11860 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
11861 (build-system python-build-system)
11862 (propagated-inputs
11863 `(("python-lxml" ,python-lxml)
11864 ("python-genshi" ,python-genshi)))
11865 (native-inputs
11866 `(("python-magic" ,python-magic)))
11867 (home-page "https://relatorio.tryton.org/")
11868 (synopsis "Templating library able to output ODT and PDF files")
11869 (description "Relatorio is a templating library which provides a way to
11870 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
11871 for more filetypes can be easily added by creating plugins for them.")
11872 (license license:gpl3+)))
11873
11874 (define-public python2-relatorio
11875 (package-with-python2 python-relatorio))
11876
11877 (define-public python-radon
11878 (package
11879 (name "python-radon")
11880 (version "2.2.0")
11881 (source
11882 (origin
11883 (method url-fetch)
11884 (uri (pypi-uri "radon" version))
11885 (sha256
11886 (base32
11887 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
11888 (build-system python-build-system)
11889 (arguments
11890 `(#:phases (modify-phases %standard-phases
11891 (replace 'check
11892 (lambda _
11893 (invoke "python" "radon/tests/run.py"))))))
11894 (propagated-inputs
11895 `(("python-colorama" ,python-colorama)
11896 ("python-flake8-polyfill" ,python-flake8-polyfill)
11897 ("python-mando" ,python-mando)))
11898 (native-inputs
11899 `(("python-pytest" ,python-pytest)
11900 ("python-pytest-mock" ,python-pytest-mock)))
11901 (home-page "https://radon.readthedocs.org/")
11902 (synopsis "Code Metrics in Python")
11903 (description "Radon is a Python tool which computes various code metrics.
11904 Supported metrics are:
11905 @itemize @bullet
11906 @item raw metrics: SLOC, comment lines, blank lines, &c.
11907 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
11908 @item Halstead metrics (all of them)
11909 @item the Maintainability Index (a Visual Studio metric)
11910 @end itemize")
11911 (license license:expat)))
11912
11913 (define-public python2-radon
11914 (package-with-python2 python-radon))
11915
11916 (define-public python-sure
11917 (package
11918 (name "python-sure")
11919 (version "1.4.11")
11920 (source
11921 (origin
11922 (method url-fetch)
11923 (uri (pypi-uri "sure" version))
11924 (sha256
11925 (base32
11926 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
11927 (build-system python-build-system)
11928 (propagated-inputs
11929 `(("python-mock" ,python-mock)
11930 ("python-six" ,python-six)))
11931 (native-inputs
11932 `(("python-nose" ,python-nose)))
11933 (home-page "https://github.com/gabrielfalcao/sure")
11934 (synopsis "Automated testing library in python for python")
11935 (description
11936 "Sure is a python library that leverages a DSL for writing assertions.
11937 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
11938 (license license:gpl3+)))
11939
11940 (define-public python2-sure
11941 (package-with-python2 python-sure))
11942
11943 (define-public python2-couleur
11944 ;; This package does not seem to support python3 at all, hence,
11945 ;; only the python2 variant definition is provided.
11946 (package
11947 (name "python2-couleur")
11948 (version "0.6.2")
11949 (source
11950 (origin
11951 (method url-fetch)
11952 (uri (pypi-uri "couleur" version))
11953 (sha256
11954 (base32
11955 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
11956 (build-system python-build-system)
11957 (arguments
11958 `(#:python ,python-2))
11959 (home-page "https://github.com/gabrielfalcao/couleur")
11960 (synopsis
11961 "ANSI terminal tool for python, colored shell and other handy fancy features")
11962 (description
11963 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
11964 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
11965 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
11966 ;; https://github.com/gabrielfalcao/couleur/issues/11
11967 (license license:lgpl3+)))
11968
11969 (define-public python-misaka
11970 (package
11971 (name "python-misaka")
11972 (version "2.1.0")
11973 (source
11974 (origin
11975 (method url-fetch)
11976 (uri (pypi-uri "misaka" version))
11977 (sha256
11978 (base32
11979 "1yqrq3a5rracirmvk52n28nn6ckdaz897gnigv89a9gmyn87sqw7"))))
11980 (build-system python-build-system)
11981 (arguments
11982 `(;; Line 37 of setup.py calls self.run_command('develop')
11983 ;; in the 'check' phase. This command seems to be trying
11984 ;; to write to
11985 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
11986 ;; for which it does not have the permission to write.
11987 #:tests? #f))
11988 (propagated-inputs
11989 `(("python-cffi" ,python-cffi)))
11990 (home-page "https://github.com/FSX/misaka")
11991 (synopsis "Python binding for Hoedown")
11992 (description
11993 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
11994 library written in C. It features a fast HTML renderer and functionality to make custom
11995 renderers (e.g. man pages or LaTeX).")
11996 (license license:expat)))
11997
11998 (define-public python2-misaka
11999 (package-with-python2 python-misaka))
12000
12001 (define-public python2-steadymark
12002 ;; This is forced into being a python2 only variant
12003 ;; due to its dependence on couleur that has no support
12004 ;; for python3
12005 (package
12006 (name "python2-steadymark")
12007 (version "0.7.3")
12008 (source
12009 (origin
12010 (method url-fetch)
12011 (uri (pypi-uri "steadymark" version))
12012 (sha256
12013 (base32
12014 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
12015 (build-system python-build-system)
12016 (native-inputs
12017 `(("python-couleur" ,python2-couleur)
12018 ("python-sure" ,python2-sure)
12019 ("python-misaka" ,python2-misaka)))
12020 (arguments
12021 `(#:python ,python-2
12022 #:phases
12023 (modify-phases %standard-phases
12024 (add-before 'build 'patch-setup-py
12025 (lambda _
12026 ;; Update requirements from dependency==version
12027 ;; to dependency>=version
12028 (substitute* "setup.py"
12029 (("==") ">="))
12030 #t)))))
12031 (home-page "https://github.com/gabrielfalcao/steadymark")
12032 (synopsis "Markdown-based test runner for python")
12033 (description
12034 "@code{Steadymark} allows documentation to be written in github-flavoured
12035 markdown. The documentation may contain snippets of code surrounded by python
12036 code blocks and @code{Steadymark} will find these snippets and run them, making
12037 sure that there are no old malfunctional examples in the documentation examples.")
12038 (license license:expat)))
12039
12040 (define-public python-jsonpointer
12041 (package
12042 (name "python-jsonpointer")
12043 (version "1.10")
12044 (source
12045 (origin
12046 (method url-fetch)
12047 (uri (pypi-uri "jsonpointer" version))
12048 (sha256
12049 (base32
12050 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
12051 (build-system python-build-system)
12052 (home-page "https://github.com/stefankoegl/python-json-pointer")
12053 (synopsis "Identify specific nodes in a JSON document")
12054 (description "@code{jsonpointer} allows you to access specific nodes
12055 by path in a JSON document (see RFC 6901).")
12056 (license license:bsd-3)))
12057
12058 (define-public python2-jsonpointer
12059 (package-with-python2 python-jsonpointer))
12060
12061 (define-public python-jsonpatch
12062 (package
12063 (name "python-jsonpatch")
12064 (version "1.16")
12065 (source
12066 (origin
12067 (method url-fetch)
12068 ;; pypi version lacks tests.js
12069 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12070 "archive/v" version ".tar.gz"))
12071 (file-name (string-append name "-" version ".tar.gz"))
12072 (sha256
12073 (base32
12074 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
12075 (build-system python-build-system)
12076 (native-inputs
12077 `(("python-jsonpointer" ,python-jsonpointer)))
12078 (home-page "https://github.com/stefankoegl/python-json-patch")
12079 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
12080 (description "@code{jsonpatch} is a library and program that allows
12081 applying JSON Patches according to RFC 6902.")
12082 (license license:bsd-3)))
12083
12084 (define-public python2-jsonpatch
12085 (package-with-python2 python-jsonpatch))
12086
12087 (define-public python-jsonpatch-0.4
12088 (package (inherit python-jsonpatch)
12089 (name "python-jsonpatch")
12090 (version "0.4")
12091 (source
12092 (origin
12093 (method url-fetch)
12094 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12095 "archive/v" version ".tar.gz"))
12096 (file-name (string-append name "-" version ".tar.gz"))
12097 (sha256
12098 (base32
12099 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
12100
12101 (define-public python2-jsonpatch-0.4
12102 (package-with-python2 python-jsonpatch-0.4))
12103
12104 (define-public python-rfc3986
12105 (package
12106 (name "python-rfc3986")
12107 (version "1.1.0")
12108 (source (origin
12109 (method url-fetch)
12110 (uri (pypi-uri "rfc3986" version))
12111 (sha256
12112 (base32
12113 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
12114 (build-system python-build-system)
12115 (arguments
12116 `(#:modules ((guix build utils)
12117 (guix build python-build-system)
12118 (ice-9 ftw)
12119 (srfi srfi-1)
12120 (srfi srfi-26))
12121 #:phases
12122 (modify-phases %standard-phases
12123 (replace 'check
12124 (lambda _
12125 (let ((cwd (getcwd)))
12126 (setenv "PYTHONPATH"
12127 (string-append cwd "/build/"
12128 (find (cut string-prefix? "lib" <>)
12129 (scandir (string-append cwd "/build")))
12130 ":"
12131 (getenv "PYTHONPATH")))
12132 (invoke "pytest" "-v")))))))
12133 (native-inputs
12134 `(("python-pytest" ,python-pytest)))
12135 (home-page "https://rfc3986.readthedocs.io/")
12136 (synopsis "Parse and validate URI references")
12137 (description
12138 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
12139 validation and authority parsing. This module also supports RFC@tie{}6874
12140 which adds support for zone identifiers to IPv6 addresses.")
12141 (license license:asl2.0)))
12142
12143 (define-public python2-rfc3986
12144 (package-with-python2 python-rfc3986))
12145
12146 (define-public python-rfc3987
12147 (package
12148 (name "python-rfc3987")
12149 (version "1.3.7")
12150 (source
12151 (origin
12152 (method url-fetch)
12153 (uri (pypi-uri "rfc3987" version))
12154 (sha256
12155 (base32
12156 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
12157 (build-system python-build-system)
12158 (home-page "https://pypi.python.org/pypi/rfc3987")
12159 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
12160 (description "@code{rfc3987} provides routines for parsing and
12161 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
12162 (license license:gpl3+)))
12163
12164 (define-public python2-rfc3987
12165 (package-with-python2 python-rfc3987))
12166
12167 (define-public python-validate-email
12168 (package
12169 (name "python-validate-email")
12170 (version "1.3")
12171 (source
12172 (origin
12173 (method url-fetch)
12174 (uri (pypi-uri "validate_email" version))
12175 (sha256
12176 (base32
12177 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
12178 (build-system python-build-system)
12179 (home-page "https://github.com/syrusakbary/validate_email")
12180 (synopsis "Verifies if an email address is valid and really exists")
12181 (description "@code{validate_email} can be used to verify if an email
12182 address is valid and really exists.")
12183 (license license:lgpl3+)))
12184
12185 (define-public python2-validate-email
12186 (package-with-python2 python-validate-email))
12187
12188 (define-public python-flex
12189 (package
12190 (name "python-flex")
12191 (version "6.10.0")
12192 (source
12193 (origin
12194 (method url-fetch)
12195 (uri (pypi-uri "flex" version))
12196 (sha256
12197 (base32
12198 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
12199 (build-system python-build-system)
12200 (propagated-inputs
12201 `(("python-click" ,python-click)
12202 ("python-iso8601" ,python-iso8601)
12203 ("python-jsonpointer" ,python-jsonpointer)
12204 ("python-pyyaml" ,python-pyyaml)
12205 ("python-requests" ,python-requests)
12206 ("python-rfc3987" ,python-rfc3987)
12207 ("python-six" ,python-six)
12208 ("python-validate-email" ,python-validate-email)))
12209 (home-page "https://github.com/pipermerriam/flex")
12210 (synopsis "Validates Swagger schemata")
12211 (description "@code{flex} can be used to validate Swagger schemata.")
12212 (license license:bsd-3)))
12213
12214 (define-public python2-flex
12215 (package-with-python2 python-flex))
12216
12217 (define-public python-marshmallow
12218 (package
12219 (name "python-marshmallow")
12220 (version "3.0.0b14")
12221 (source
12222 (origin
12223 (method url-fetch)
12224 (uri (pypi-uri "marshmallow" version))
12225 (sha256
12226 (base32
12227 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
12228 (build-system python-build-system)
12229 (propagated-inputs
12230 `(("python-dateutil" ,python-dateutil)
12231 ("python-simplejson" ,python-simplejson)))
12232 (native-inputs
12233 `(("python-pytest" ,python-pytest)
12234 ("python-pytz" ,python-pytz)))
12235 (home-page "https://github.com/marshmallow-code/marshmallow")
12236 (synopsis "Convert complex datatypes to and from native
12237 Python datatypes.")
12238 (description "@code{marshmallow} provides a library for converting
12239 complex datatypes to and from native Python datatypes.")
12240 (license license:expat)))
12241
12242 (define-public python2-marshmallow
12243 (package-with-python2 python-marshmallow))
12244
12245 (define-public python-apispec
12246 (package
12247 (name "python-apispec")
12248 (version "0.25.3")
12249 (source
12250 (origin
12251 (method url-fetch)
12252 (uri (pypi-uri "apispec" version))
12253 (sha256
12254 (base32
12255 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
12256 (build-system python-build-system)
12257 (propagated-inputs
12258 `(("python-pyyaml" ,python-pyyaml)))
12259 (native-inputs
12260 `(("python-pytest" ,python-pytest)
12261 ("python-flask" ,python-flask)
12262 ("python-marshmallow" ,python-marshmallow)
12263 ("python-tornado" ,python-tornado)
12264 ("python-bottle" ,python-bottle)
12265 ("python-mock" ,python-mock)))
12266 (home-page "https://github.com/marshmallow-code/apispec")
12267 (synopsis "Swagger 2.0 API specification generator")
12268 (description "@code{python-apispec} is a pluggable API specification
12269 generator. Currently supports the OpenAPI specification (f.k.a.
12270 Swagger 2.0).")
12271 (license license:expat)))
12272
12273 (define-public python2-apispec
12274 (package-with-python2 python-apispec))
12275
12276 (define-public python-flasgger
12277 (package
12278 (name "python-flasgger")
12279 (version "0.6.3")
12280 (source
12281 (origin
12282 (method url-fetch)
12283 (uri (string-append "https://github.com/rochacbruno/flasgger/archive/"
12284 version ".tar.gz"))
12285 (file-name (string-append name "-" version ".tar.gz"))
12286 (sha256
12287 (base32
12288 "1gqzlm0rb55fdpsy5ipkganlx9cnpi454fqyycr03jm22zql14ay"))))
12289 (build-system python-build-system)
12290 (arguments
12291 `(#:phases
12292 (modify-phases %standard-phases
12293 (replace 'check
12294 (lambda* (#:key inputs outputs #:allow-other-keys)
12295 (substitute* "Makefile"
12296 (("flake8 flasgger --ignore=F403")
12297 "flake8 flasgger --ignore=E731,F403"))
12298 (setenv "PYTHONPATH" (string-append (getcwd)
12299 ":"
12300 (getenv "PYTHONPATH")))
12301 (zero? (system* "py.test")))))))
12302 (propagated-inputs
12303 `(("python-flask" ,python-flask)
12304 ("python-pyyaml" ,python-pyyaml)
12305 ("python-jsonschema" ,python-jsonschema)
12306 ("python-mistune" ,python-mistune)
12307 ("python-six" ,python-six)))
12308 (native-inputs
12309 `(("python-decorator" ,python-decorator)
12310 ("python-flake8" ,python-flake8)
12311 ("python-flask-restful" ,python-flask-restful)
12312 ("python-flex" ,python-flex)
12313 ("python-pytest" ,python-pytest)
12314 ("python-pytest-cov" ,python-pytest-cov)
12315 ("python-marshmallow" ,python-marshmallow)
12316 ("python-apispec" ,python-apispec)))
12317 (home-page "https://github.com/rochacbruno/flasgger/")
12318 (synopsis "Extract Swagger specs from your Flask project")
12319 (description "@code{python-flasgger} allows extracting Swagger specs
12320 from your Flask project. It is a fork of Flask-Swagger.")
12321 (license license:expat)))
12322
12323 (define-public python2-flasgger
12324 (package-with-python2 python-flasgger))
12325
12326 (define-public python-swagger-spec-validator
12327 (package
12328 (name "python-swagger-spec-validator")
12329 (version "2.1.0")
12330 (source
12331 (origin
12332 (method url-fetch)
12333 (uri (pypi-uri "swagger-spec-validator" version))
12334 (sha256
12335 (base32
12336 "13hkpn2lycwr0468yqhjb3kwszqf7hjwlq61w7vdxq1caz31k4nw"))))
12337 (build-system python-build-system)
12338 (propagated-inputs
12339 `(("python-jsonschema" ,python-jsonschema)
12340 ("python-six" ,python-six)))
12341 (home-page
12342 "https://github.com/Yelp/swagger_spec_validator")
12343 (synopsis "Validation of Swagger specifications")
12344 (description "@code{swagger_spec_validator} provides a library for
12345 validating Swagger API specifications.")
12346 (license license:asl2.0)))
12347
12348 (define-public python2-swagger-spec-validator
12349 (package-with-python2 python-swagger-spec-validator))
12350
12351 (define-public python-apache-libcloud
12352 (package
12353 (name "python-apache-libcloud")
12354 (version "2.4.0")
12355 (source
12356 (origin
12357 (method url-fetch)
12358 (uri (pypi-uri "apache-libcloud" version))
12359 (sha256
12360 (base32
12361 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
12362 (build-system python-build-system)
12363 (arguments
12364 `(#:phases
12365 (modify-phases %standard-phases
12366 (add-after 'unpack 'patch-ssh
12367 (lambda* (#:key inputs #:allow-other-keys)
12368 (substitute* "libcloud/compute/ssh.py"
12369 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
12370 "/bin/ssh" "'")))
12371 #t))
12372 (add-after 'unpack 'patch-tests
12373 (lambda _
12374 (substitute* "./libcloud/test/test_file_fixtures.py"
12375 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
12376 (("def _ascii") "def _raw_data(self, method, url, body, headers):
12377 return (httplib.OK,
12378 \"1234abcd\",
12379 {\"test\": \"value\"},
12380 httplib.responses[httplib.OK])
12381 def _ascii"))
12382 (substitute* "libcloud/test/compute/test_ssh_client.py"
12383 (("class ShellOutSSHClientTests")
12384 "@unittest.skip(\"Guix container doesn't have ssh service\")
12385 class ShellOutSSHClientTests")
12386 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
12387 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
12388 (("'.xF0', '.x90', '.x8D', '.x88'")
12389 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
12390 #t))
12391 (add-before 'check 'copy-secret
12392 (lambda _
12393 (copy-file "libcloud/test/secrets.py-dist"
12394 "libcloud/test/secrets.py")
12395 #t)))))
12396 (inputs
12397 `(("openssh" ,openssh)))
12398 (propagated-inputs
12399 `(("python-paramiko" ,python-paramiko)
12400 ("python-requests" ,python-requests)))
12401 (native-inputs
12402 `(("python-lockfile" ,python-lockfile)
12403 ("python-mock" ,python-mock)
12404 ("python-pytest" ,python-pytest)
12405 ("python-pytest-runner" ,python-pytest-runner)
12406 ("python-requests-mock" ,python-requests-mock)))
12407 (home-page "https://libcloud.apache.org/")
12408 (synopsis "Unified Cloud API")
12409 (description "@code{libcloud} is a Python library for interacting with
12410 many of the popular cloud service providers using a unified API.")
12411 (license license:asl2.0)))
12412
12413 (define-public python2-apache-libcloud
12414 (package-with-python2 python-apache-libcloud))
12415
12416 (define-public python-smmap2
12417 (package
12418 (name "python-smmap2")
12419 (version "2.0.3")
12420 (source
12421 (origin
12422 (method url-fetch)
12423 (uri (pypi-uri "smmap2" version))
12424 (sha256
12425 (base32
12426 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
12427 (build-system python-build-system)
12428 (native-inputs
12429 `(("python-nosexcover" ,python-nosexcover)))
12430 (home-page "https://github.com/Byron/smmap")
12431 (synopsis "Python sliding window memory map manager")
12432 (description "@code{smmap2} is a pure Python implementation of a sliding
12433 window memory map manager.")
12434 (license license:bsd-3)))
12435
12436 (define-public python2-smmap2
12437 (package-with-python2 python-smmap2))
12438
12439 (define-public python-regex
12440 (package
12441 (name "python-regex")
12442 (version "2017.06.07")
12443 (source (origin
12444 (method url-fetch)
12445 (uri (pypi-uri "regex" version))
12446 (sha256
12447 (base32
12448 "06r6b7yigikbj3a72whl85r2b64pj1r0ypmw9yalmkm0wnxq8mz4"))))
12449 (build-system python-build-system)
12450 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
12451 (synopsis "Alternative regular expression module")
12452 (description "This regular expression implementation is backwards-
12453 compatible with the standard @code{re} module, but offers additional
12454 functionality like full case-folding for case-insensitive matches in Unicode.")
12455 (license license:psfl)))
12456
12457 (define-public python2-regex
12458 (package-with-python2 python-regex))
12459
12460 (define-public python2-pyopengl
12461 (package
12462 (name "python2-pyopengl")
12463 (version "3.1.0")
12464 (source
12465 (origin
12466 (method url-fetch)
12467 (uri (pypi-uri "PyOpenGL" version))
12468 (sha256
12469 (base32
12470 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
12471 (arguments
12472 `(#:python ,python-2))
12473 (build-system python-build-system)
12474 (home-page "http://pyopengl.sourceforge.net")
12475 (synopsis "Standard OpenGL bindings for Python")
12476 (description
12477 "PyOpenGL is the most common cross platform Python binding to OpenGL and
12478 related APIs. The binding is created using the standard @code{ctypes}
12479 library.")
12480 (license license:bsd-3)))
12481
12482 (define-public python2-pyopengl-accelerate
12483 (package
12484 (inherit python2-pyopengl)
12485 (name "python2-pyopengl-accelerate")
12486 (version "3.1.0")
12487 (source
12488 (origin
12489 (method url-fetch)
12490 (uri (pypi-uri "PyOpenGL-accelerate" version))
12491 (sha256
12492 (base32
12493 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
12494 (synopsis "Acceleration code for PyOpenGL")
12495 (description
12496 "This is the Cython-coded accelerator module for PyOpenGL.")))
12497
12498 (define-public python-rencode
12499 (package
12500 (name "python-rencode")
12501 (version "1.0.5")
12502 (source
12503 (origin
12504 (method url-fetch)
12505 (uri (pypi-uri "rencode" version))
12506 (sha256
12507 (base32
12508 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
12509 (build-system python-build-system)
12510 (arguments
12511 `(#:phases
12512 (modify-phases %standard-phases
12513 (add-before 'check 'delete-bogus-test
12514 ;; This test requires /home/aresch/Downloads, which is not provided by
12515 ;; the build environment.
12516 (lambda _
12517 (delete-file "rencode/t.py")
12518 #t)))))
12519 (native-inputs `(("pkg-config" ,pkg-config)
12520 ("python-cython" ,python-cython)))
12521 (home-page "https://github.com/aresch/rencode")
12522 (synopsis "Serialization of heterogeneous data structures")
12523 (description
12524 "The @code{rencode} module is a data structure serialization library,
12525 similar to @code{bencode} from the BitTorrent project. For complex,
12526 heterogeneous data structures with many small elements, r-encoding stake up
12527 significantly less space than b-encodings. This version of rencode is a
12528 complete rewrite in Cython to attempt to increase the performance over the
12529 pure Python module.")
12530 (license license:bsd-3)))
12531
12532 (define-public python2-rencode
12533 (package-with-python2 python-rencode))
12534
12535 (define-public python-xenon
12536 (package
12537 (name "python-xenon")
12538 (version "0.5.4")
12539 (source
12540 (origin
12541 (method url-fetch)
12542 (uri (pypi-uri "xenon" version))
12543 (sha256
12544 (base32
12545 "029cbhysg2vr5n4jz8gpg2793f8wkwnqpr1qgv6c1dn685vy31mc"))))
12546 (build-system python-build-system)
12547 (native-inputs
12548 `(("python-pyyaml" ,python-pyyaml)
12549 ("python-radon" ,python-radon)
12550 ("python-requests" ,python-requests)
12551 ("python-flake8" ,python-flake8)
12552 ("python-tox" ,python-tox)))
12553 (arguments
12554 `(#:phases
12555 (modify-phases %standard-phases
12556 (add-before 'build 'patch-test-requirements
12557 (lambda _
12558 ;; Remove httpretty dependency for tests.
12559 (substitute* "setup.py"
12560 (("httpretty") ""))
12561 #t)))))
12562 (home-page "https://xenon.readthedocs.org/")
12563 (synopsis "Monitor code metrics for Python on your CI server")
12564 (description
12565 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
12566 Ideally, @code{xenon} is run every time code is committed. Through command
12567 line options, various thresholds can be set for the complexity of code. It
12568 will fail (i.e. it will exit with a non-zero exit code) when any of these
12569 requirements is not met.")
12570 (license license:expat)))
12571
12572 (define-public python2-xenon
12573 (package-with-python2 python-xenon))
12574
12575 (define-public python-pysocks
12576 (package
12577 (name "python-pysocks")
12578 (version "1.6.8")
12579 (source
12580 (origin
12581 (method url-fetch)
12582 (uri (pypi-uri "PySocks" version))
12583 (sha256
12584 (base32
12585 "0wn6xafwy9c1gamwljw3fyvih5w19qy9xp39zmv8c90ai5ajrr9z"))))
12586 (build-system python-build-system)
12587 (arguments `(#:tests? #f))
12588 (home-page "https://github.com/Anorov/PySocks")
12589 (synopsis "SOCKS client module")
12590 (description "@code{pysocks} is an updated and semi-actively maintained
12591 version of @code{SocksiPy} with bug fixes and extra features.")
12592 (license license:bsd-3)))
12593
12594 (define-public python2-pysocks
12595 (package-with-python2 python-pysocks))
12596
12597 (define-public python-pydiff
12598 (package
12599 (name "python-pydiff")
12600 (version "0.2")
12601 (source
12602 (origin
12603 (method url-fetch)
12604 (uri (pypi-uri "pydiff" version))
12605 (sha256
12606 (base32
12607 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
12608 (build-system python-build-system)
12609 (home-page "https://github.com/myint/pydiff")
12610 (synopsis "Library to diff two Python files at the bytecode level")
12611 (description
12612 "@code{pydiff} makes it easy to look for actual code changes while
12613 ignoring formatting changes.")
12614 (license license:expat)))
12615
12616 (define-public python2-pydiff
12617 (package-with-python2 python-pydiff))
12618
12619 (define-public python-tqdm
12620 (package
12621 (name "python-tqdm")
12622 (version "4.19.6")
12623 (source
12624 (origin
12625 (method url-fetch)
12626 (uri (pypi-uri "tqdm" version))
12627 (sha256
12628 (base32
12629 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
12630 (build-system python-build-system)
12631 (native-inputs
12632 `(("python-flake8" ,python-flake8)
12633 ("python-nose" ,python-nose)
12634 ("python-coverage" ,python-coverage)))
12635 (home-page "https://github.com/tqdm/tqdm")
12636 (synopsis "Fast, extensible progress meter")
12637 (description
12638 "Make loops show a progress bar on the console by just wrapping any
12639 iterable with @code{|tqdm(iterable)|}. Offers many options to define
12640 design and layout.")
12641 (license (list license:mpl2.0 license:expat))))
12642
12643 (define-public python2-tqdm
12644 (package-with-python2 python-tqdm))
12645
12646 (define-public python-pkginfo
12647 (package
12648 (name "python-pkginfo")
12649 (version "1.4.2")
12650 (source
12651 (origin
12652 (method url-fetch)
12653 (uri (pypi-uri "pkginfo" version))
12654 (sha256
12655 (base32
12656 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
12657 (build-system python-build-system)
12658 (arguments
12659 ;; The tests are broken upstream.
12660 '(#:tests? #f))
12661 (home-page
12662 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
12663 (synopsis
12664 "Query metadatdata from sdists, bdists, and installed packages")
12665 (description
12666 "API to query the distutils metadata written in @file{PKG-INFO} inside a
12667 source distriubtion (an sdist) or a binary distribution (e.g., created by
12668 running bdist_egg). It can also query the EGG-INFO directory of an installed
12669 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
12670 created by running @code{python setup.py develop}).")
12671 (license license:expat)))
12672
12673 (define-public python2-pkginfo
12674 (package-with-python2 python-pkginfo))
12675
12676 (define-public python-twine
12677 (package
12678 (name "python-twine")
12679 (version "1.9.1")
12680 (source
12681 (origin
12682 (method url-fetch)
12683 (uri (pypi-uri "twine" version))
12684 (sha256
12685 (base32
12686 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
12687 (build-system python-build-system)
12688 (propagated-inputs
12689 `(("python-tqdm" ,python-tqdm)
12690 ("python-pkginfo" ,python-pkginfo)
12691 ("python-requests" ,python-requests)
12692 ("python-requests-toolbelt" ,python-requests-toolbelt)))
12693 (home-page "https://github.com/pypa/twine")
12694 (synopsis "Collection of utilities for interacting with PyPI")
12695 (description
12696 "@code{twine} currently supports registering projects and uploading
12697 distributions. It authenticates the user over HTTPS, allows them to pre-sign
12698 their files and supports any packaging format (including wheels).")
12699 (license license:asl2.0)))
12700
12701 (define-public python2-twine
12702 (package-with-python2 python-twine))
12703
12704 (define-public python-linecache2
12705 (package
12706 (name "python-linecache2")
12707 (version "1.0.0")
12708 (source
12709 (origin
12710 (method url-fetch)
12711 (uri (pypi-uri "linecache2" version))
12712 (sha256
12713 (base32
12714 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
12715 (build-system python-build-system)
12716 (arguments
12717 `(;; The tests depend on unittest2, and our version is a bit too old.
12718 #:tests? #f))
12719 (native-inputs
12720 `(("python-pbr" ,python-pbr-minimal)))
12721 (home-page
12722 "https://github.com/testing-cabal/linecache2")
12723 (synopsis "Backports of the linecache module")
12724 (description
12725 "The linecache module allows one to get any line from any file, while
12726 attempting to optimize internally, using a cache, the common case where many
12727 lines are read from a single file.")
12728 (license license:psfl)))
12729
12730 (define-public python2-linecache2
12731 (package-with-python2 python-linecache2))
12732
12733 (define-public python-traceback2
12734 (package
12735 (name "python-traceback2")
12736 (version "1.4.0")
12737 (source
12738 (origin
12739 (method url-fetch)
12740 (uri (pypi-uri "traceback2" version))
12741 (sha256
12742 (base32
12743 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
12744 (build-system python-build-system)
12745 (arguments
12746 `(;; python-traceback2 and python-unittest2 depend on one another.
12747 #:tests? #f))
12748 (native-inputs
12749 `(("python-pbr" ,python-pbr-minimal)))
12750 (propagated-inputs
12751 `(("python-linecache2" ,python-linecache2)))
12752 (home-page
12753 "https://github.com/testing-cabal/traceback2")
12754 (synopsis "Backports of the traceback module")
12755 (description
12756 "This module provides a standard interface to extract, format and print
12757 stack traces of Python programs. It exactly mimics the behavior of the Python
12758 interpreter when it prints a stack trace.")
12759 (license license:psfl)))
12760
12761 (define-public python2-traceback2
12762 (package-with-python2 python-traceback2))
12763
12764 (define-public python-ratelimiter
12765 (package
12766 (name "python-ratelimiter")
12767 (version "1.2.0")
12768 (source
12769 (origin
12770 (method url-fetch)
12771 (uri (pypi-uri "ratelimiter" version))
12772 (sha256
12773 (base32
12774 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
12775 (build-system python-build-system)
12776 (arguments
12777 '(#:tests? #f)) ; There are no tests in the pypi archive.
12778 (home-page "https://github.com/RazerM/ratelimiter")
12779 (synopsis "Simple rate limiting object")
12780 (description
12781 "The @code{ratelimiter} module ensures that an operation will not be
12782 executed more than a given number of times during a given period.")
12783 (license license:asl2.0)))
12784
12785 (define-public python2-ratelimiter
12786 (package-with-python2 python-ratelimiter))
12787
12788 (define-public python-dukpy
12789 (package
12790 (name "python-dukpy")
12791 (version "0.3")
12792 (source
12793 (origin
12794 (method url-fetch)
12795 (uri (string-append "https://github.com/kovidgoyal/dukpy/archive/v"
12796 version ".tar.gz"))
12797 (file-name (string-append name "-" version ".tar.gz"))
12798 (sha256
12799 (base32
12800 "0pj39rfwlzivqm5hkrsza7gssg6ggpxlq5ivc8f3h7x5pfgc6y6c"))))
12801 (build-system python-build-system)
12802 (home-page "https://github.com/kovidgoyal/dukpy")
12803 (synopsis "Run JavaScript in python")
12804 (description
12805 "dukpy is a JavaScript runtime environment for Python using the duktape
12806 embeddable JavaScript engine.")
12807 ;; Dukpy is licensed under MIT like the embedded duktape library,
12808 ;; with 'errors.c' as GPL3.
12809 (license (list license:expat license:gpl3))))
12810
12811 (define-public python2-dukpy
12812 (package-with-python2 python-dukpy))
12813
12814 (define-public python-jsonrpclib-pelix
12815 (package
12816 (name "python-jsonrpclib-pelix")
12817 (version "0.3.2")
12818 (source
12819 (origin
12820 (method url-fetch)
12821 (uri (pypi-uri "jsonrpclib-pelix" version))
12822 (sha256
12823 (base32
12824 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
12825 (build-system python-build-system)
12826 (arguments
12827 `(#:tests? #f)) ; no tests in PyPI tarball
12828 (home-page "https://github.com/tcalmant/jsonrpclib/")
12829 (synopsis "JSON-RPC 2.0 client library for Python")
12830 (description
12831 "This library implements the JSON-RPC v2.0
12832 specification (backwards-compatible) as a client library for Python. This
12833 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
12834 services.")
12835 (license license:asl2.0)))
12836
12837 (define-public python2-jsonrpclib-pelix
12838 (package-with-python2 python-jsonrpclib-pelix))
12839
12840 (define-public python-setuptools-scm-git-archive
12841 (package
12842 (name "python-setuptools-scm-git-archive")
12843 (version "1.0")
12844 (source
12845 (origin
12846 (method url-fetch)
12847 (uri (pypi-uri "setuptools_scm_git_archive" version))
12848 (sha256
12849 (base32
12850 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
12851 (build-system python-build-system)
12852 (native-inputs
12853 `(("python-pytest" ,python-pytest)))
12854 (propagated-inputs
12855 `(("python-setuptools-scm" ,python-setuptools-scm)))
12856 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
12857 (synopsis "Setuptools_scm plugin for git archives")
12858 (description
12859 "The setuptools_scm_git_archive package is a plugin to
12860 setuptools_scm, which supports obtaining versions from git archives that
12861 belong to tagged versions.")
12862 (license license:expat)))
12863
12864 (define-public python2-setuptools-scm-git-archive
12865 (package-with-python2 python-setuptools-scm-git-archive))
12866
12867 (define-public python-pyclipper
12868 (package
12869 (name "python-pyclipper")
12870 (version "1.1.0.post1")
12871 (source
12872 (origin
12873 (method url-fetch)
12874 (uri (pypi-uri "pyclipper" version ".zip"))
12875 (sha256
12876 (base32
12877 "0ldbkbnx94an4zzrwb1sxmg6k0jgk4cwmvcdyy8y5k1zslc612wa"))
12878 (modules '((guix build utils)))
12879 (snippet
12880 '(begin
12881 ;; This file is generated by Cython.
12882 (delete-file "pyclipper/pyclipper.cpp") #t))))
12883 (build-system python-build-system)
12884 (arguments
12885 `(#:phases
12886 (modify-phases %standard-phases
12887 (add-before 'build 'cythonize-sources
12888 (lambda _
12889 (with-directory-excursion "pyclipper"
12890 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
12891 (propagated-inputs
12892 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
12893 (native-inputs
12894 `(("python-cython" ,python-cython)
12895 ("python-pytest" ,python-pytest)
12896 ("python-pytest-runner" ,python-pytest-runner)
12897 ("python-unittest2" ,python-unittest2)
12898 ("unzip" ,unzip)))
12899 (home-page "https://github.com/greginvm/pyclipper")
12900 (synopsis "Wrapper for Angus Johnson's Clipper library")
12901 (description
12902 "Pyclipper is a Cython wrapper for the C++ translation of the
12903 Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
12904 (license license:expat)))
12905
12906 (define-public python2-pyclipper
12907 (package-with-python2 python-pyclipper))
12908
12909 (define-public python2-booleanoperations
12910 (package
12911 (name "python2-booleanoperations")
12912 (version "0.7.1")
12913 (source
12914 (origin
12915 (method url-fetch)
12916 (uri (pypi-uri "booleanOperations" version ".zip"))
12917 (sha256
12918 (base32
12919 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
12920 (build-system python-build-system)
12921 (arguments
12922 `(#:python ,python-2))
12923 (native-inputs
12924 `(("unzip" ,unzip)
12925 ("python2-pytest" ,python2-pytest)
12926 ("python2-pytest-runner" ,python2-pytest-runner)))
12927 (propagated-inputs
12928 `(("python-fonttools" ,python2-fonttools)
12929 ("python-pyclipper" ,python2-pyclipper)
12930 ("python-ufolib" ,python2-ufolib)))
12931 (home-page "https://github.com/typemytype/booleanOperations")
12932 (synopsis "Boolean operations on paths")
12933 (description
12934 "BooleanOperations provides a Python library that enables
12935 boolean operations on paths.")
12936 (license license:expat)))
12937
12938 (define-public python-tempdir
12939 (package
12940 (name "python-tempdir")
12941 (version "0.7.1")
12942 (source
12943 (origin
12944 (method url-fetch)
12945 (uri (pypi-uri "tempdir" version))
12946 (sha256
12947 (base32
12948 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
12949 (build-system python-build-system)
12950 (home-page "https://pypi.org/project/tempdir/")
12951 (arguments
12952 ;; the package has no tests
12953 '(#:tests? #f))
12954 (synopsis "Python library for managing temporary directories")
12955 (description
12956 "This library manages temporary directories that are automatically
12957 deleted with all their contents when they are no longer needed. It is
12958 particularly convenient for use in tests.")
12959 (license license:expat)))
12960
12961 (define-public python2-tempdir
12962 (package-with-python2 python-tempdir))
12963
12964 (define-public python-activepapers
12965 (package
12966 (name "python-activepapers")
12967 (version "0.2.2")
12968 (source
12969 (origin
12970 (method url-fetch)
12971 (uri (pypi-uri "ActivePapers.Py" version))
12972 (sha256
12973 (base32
12974 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
12975 (build-system python-build-system)
12976 (arguments
12977 `(#:modules ((ice-9 ftw)
12978 (srfi srfi-1)
12979 (guix build utils)
12980 (guix build python-build-system))
12981
12982 #:phases
12983 (modify-phases %standard-phases
12984 (add-after 'unpack 'delete-python2-code
12985 (lambda _
12986 (for-each delete-file
12987 '("lib/activepapers/builtins2.py"
12988 "lib/activepapers/standardlib2.py"
12989 "lib/activepapers/utility2.py"))))
12990 (replace 'check
12991 (lambda _
12992 ;; Deactivate the test cases that download files
12993 (setenv "NO_NETWORK_ACCESS" "1")
12994 ;; For some strange reason, some tests fail if nosetests runs all
12995 ;; test modules in a single execution. They pass if each test
12996 ;; module is run individually.
12997 (for-each (lambda (filename)
12998 (invoke "nosetests"
12999 (string-append "tests/" filename)))
13000 (scandir "tests"
13001 (lambda (filename)
13002 (string-suffix? ".py" filename)))))))))
13003 (native-inputs
13004 `(("python-tempdir" ,python-tempdir)
13005 ("python-nose" ,python-nose)))
13006 (propagated-inputs
13007 `(("python-h5py" ,python-h5py)))
13008 (home-page "http://www.activepapers.org/")
13009 (synopsis "Executable papers for scientific computing")
13010 (description
13011 "ActivePapers is a tool for working with executable papers, which
13012 combine data, code, and documentation in single-file packages,
13013 suitable for publication as supplementary material or on repositories
13014 such as figshare or Zenodo.")
13015 (properties `((python2-variant . ,(delay python2-activepapers))))
13016 (license license:bsd-3)))
13017
13018 (define-public python2-activepapers
13019 (let ((base (package-with-python2
13020 (strip-python2-variant python-activepapers))))
13021 (package
13022 (inherit base)
13023 (arguments
13024 (substitute-keyword-arguments (package-arguments base)
13025 ((#:phases phases)
13026 `(modify-phases ,phases
13027 (delete 'delete-python2-code)
13028 (add-after 'unpack 'delete-python3-code
13029 (lambda _
13030 (for-each delete-file
13031 '("lib/activepapers/builtins3.py"
13032 "lib/activepapers/standardlib3.py"
13033 "lib/activepapers/utility3.py")))))))))))
13034
13035 (define-public python-semver
13036 (package
13037 (name "python-semver")
13038 (version "2.7.9")
13039 (source
13040 (origin
13041 (method url-fetch)
13042 (uri (pypi-uri "semver" version))
13043 (sha256
13044 (base32
13045 "0hhgqppchv59rqj0yzi1prdg2nfsywqmjsqy2rycyxm0hvxmbyqz"))))
13046 (build-system python-build-system)
13047 (arguments
13048 `(#:phases
13049 (modify-phases %standard-phases
13050 (add-after 'unpack 'patch-test-requirements
13051 (lambda _
13052 (substitute* "setup.py"
13053 ;; Our Python is new enough.
13054 (("'virtualenv<14\\.0\\.0'") "'virtualenv'"))
13055 #t)))))
13056 (native-inputs
13057 `(("python-tox" ,python-tox)
13058 ("python-virtualenv" ,python-virtualenv)))
13059 (home-page "https://github.com/k-bx/python-semver")
13060 (synopsis "Python helper for Semantic Versioning")
13061 (description "This package provides a Python library for
13062 @url{Semantic Versioning, http://semver.org/}.")
13063 (license license:bsd-3)))
13064
13065 (define-public python2-semver
13066 (package-with-python2 python-semver))
13067
13068 (define-public python-pyro4
13069 (package
13070 (name "python-pyro4")
13071 (version "4.74")
13072 (source
13073 (origin
13074 (method url-fetch)
13075 (uri (pypi-uri "Pyro4" version))
13076 (sha256
13077 (base32
13078 "0pzp7c6q3vvkxq0wy9lr6wd5wky40sajz69g697i5rb2q497pvc9"))))
13079 (build-system python-build-system)
13080 (propagated-inputs
13081 `(("python-serpent" ,python-serpent)))
13082 (home-page "https://pyro4.readthedocs.io")
13083 (synopsis "Distributed object middleware for Python")
13084 (description
13085 "Pyro enables you to build applications in which objects can talk to each
13086 other over the network. You can just use normal Python method calls to call
13087 objects on other machines, also known as remote procedure calls (RPC).")
13088 (license license:expat)))
13089
13090 (define-public python2-pyro
13091 (package
13092 (name "python2-pyro")
13093 (version "3.16")
13094 (source
13095 (origin
13096 (method url-fetch)
13097 (uri (pypi-uri "Pyro" version))
13098 (file-name (string-append "Pyro-" version ".tar.gz"))
13099 (sha256
13100 (base32
13101 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
13102 (build-system python-build-system)
13103 (arguments
13104 ;; Pyro is not compatible with Python 3
13105 `(#:python ,python-2
13106 ;; Pyro has no test cases for automatic execution
13107 #:tests? #f))
13108 (home-page "http://pythonhosted.org/Pyro/")
13109 (synopsis "Distributed object manager for Python")
13110 (description "Pyro is a Distributed Object Technology system
13111 written in Python that is designed to be easy to use. It resembles
13112 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
13113 which is a system and language independent Distributed Object Technology
13114 and has much more to offer than Pyro or RMI. Pyro 3.x is no
13115 longer maintained. New projects should use Pyro4 instead, which
13116 is the new Pyro version that is actively developed.")
13117 (license license:expat)))
13118
13119 (define-public python2-scientific
13120 (package
13121 (name "python2-scientific")
13122 (version "2.9.4")
13123 (source
13124 (origin
13125 (method url-fetch)
13126 (uri (string-append "https://bitbucket.org/khinsen/"
13127 "scientificpython/downloads/ScientificPython-"
13128 version ".tar.gz"))
13129 (file-name (string-append "ScientificPython-" version ".tar.gz"))
13130 (sha256
13131 (base32
13132 "0fc69zhlsn9d2jvbzyjl9ah53vj598h84nkq230c83ahfvgzx5y3"))))
13133 (build-system python-build-system)
13134 (inputs
13135 `(("netcdf" ,netcdf)))
13136 (propagated-inputs
13137 `(("python-numpy" ,python2-numpy-1.8)
13138 ("python-pyro" ,python2-pyro)))
13139 (arguments
13140 ;; ScientificPython is not compatible with Python 3
13141 `(#:python ,python-2
13142 #:tests? #f ; No test suite
13143 #:phases
13144 (modify-phases %standard-phases
13145 (replace 'build
13146 (lambda* (#:key inputs #:allow-other-keys)
13147 (zero? (system* "python" "setup.py" "build"
13148 (string-append "--netcdf_prefix="
13149 (assoc-ref inputs "netcdf")))))))))
13150 (home-page "https://bitbucket.org/khinsen/scientificpython")
13151 (synopsis "Python modules for scientific computing")
13152 (description "ScientificPython is a collection of Python modules that are
13153 useful for scientific computing. Most modules are rather general (Geometry,
13154 physical units, automatic derivatives, ...) whereas others are more
13155 domain-specific (e.g. netCDF and PDB support). The library is currently
13156 not actively maintained and works only with Python 2 and NumPy < 1.9.")
13157 (license license:cecill-c)))
13158
13159 (define-public python2-mmtk
13160 (package
13161 (name "python2-mmtk")
13162 (version "2.7.11")
13163 (source
13164 (origin
13165 (method url-fetch)
13166 (uri (string-append "https://bitbucket.org/khinsen/"
13167 "mmtk/downloads/MMTK-" version ".tar.gz"))
13168 (file-name (string-append "MMTK-" version ".tar.gz"))
13169 (sha256
13170 (base32
13171 "1d0nnjx4lwsvh8f99vv1r6gi50d93yba0adkz8b4zgv4za4c5862"))))
13172 (build-system python-build-system)
13173 (native-inputs
13174 `(("netcdf" ,netcdf)))
13175 (propagated-inputs
13176 `(("python-scientific" ,python2-scientific)
13177 ("python-tkinter" ,python-2 "tk")))
13178 (arguments
13179 `(#:python ,python-2
13180 #:tests? #f
13181 #:phases
13182 (modify-phases %standard-phases
13183 (add-before 'build 'includes-from-scientific
13184 (lambda* (#:key inputs #:allow-other-keys)
13185 (mkdir-p "Include/Scientific")
13186 (copy-recursively
13187 (string-append
13188 (assoc-ref inputs "python-scientific")
13189 "/include/python2.7/Scientific")
13190 "Include/Scientific"))))))
13191 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
13192 (synopsis "Python library for molecular simulation")
13193 (description "MMTK is a library for molecular simulations with an emphasis
13194 on biomolecules. It provides widely used methods such as Molecular Dynamics
13195 and normal mode analysis, but also basic routines for implementing new methods
13196 for simulation and analysis. The library is currently not actively maintained
13197 and works only with Python 2 and NumPy < 1.9.")
13198 (license license:cecill-c)))
13199
13200 (define-public python-phonenumbers
13201 (package
13202 (name "python-phonenumbers")
13203 (version "8.9.1")
13204 (source
13205 (origin
13206 (method url-fetch)
13207 (uri (pypi-uri "phonenumbers" version))
13208 (sha256
13209 (base32
13210 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
13211 (build-system python-build-system)
13212 (home-page
13213 "https://github.com/daviddrysdale/python-phonenumbers")
13214 (synopsis
13215 "Python library for dealing with international phone numbers")
13216 (description
13217 "This package provides a Python port of Google's libphonenumber library.")
13218 (license license:asl2.0)))
13219
13220 (define-public python2-phonenumbers
13221 (package-with-python2 python-phonenumbers))
13222
13223 (define-public python-send2trash
13224 (package
13225 (name "python-send2trash")
13226 (version "1.4.2")
13227 (source
13228 (origin (method url-fetch)
13229 ;; Source tarball on PyPI doesn't include tests.
13230 (uri (string-append "https://github.com/hsoft/send2trash/archive/"
13231 version ".tar.gz"))
13232 (file-name (string-append name "-" version ".tar.gz"))
13233 (sha256
13234 (base32
13235 "0ffyhwjyx61slkdy38iwjc4gmj7fj9gs2q58f075gwvq630pzm9z"))))
13236 (build-system python-build-system)
13237 (arguments
13238 '(#:phases
13239 (modify-phases %standard-phases
13240 (add-before 'check 'pre-check
13241 (lambda _
13242 (mkdir-p "/tmp/foo")
13243 (setenv "HOME" "/tmp/foo")
13244 #t)))))
13245 (home-page "https://github.com/hsoft/send2trash")
13246 (synopsis "Send files to the user's @file{~/Trash} directory")
13247 (description "This package provides a Python library to send files to the
13248 user's @file{~/Trash} directory.")
13249 (license license:bsd-3)))
13250
13251 (define-public python2-send2trash
13252 (package
13253 (inherit (package-with-python2 python-send2trash))
13254 (arguments
13255 (substitute-keyword-arguments (package-arguments python-send2trash)
13256 ((#:phases phases)
13257 `(modify-phases ,phases
13258 (add-before 'check 'setenv
13259 (lambda _
13260 (setenv "PYTHONPATH"
13261 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
13262 #t))))))
13263 (properties `((python2-variant . ,(delay python-send2trash))))))
13264
13265 (define-public python-yapf
13266 (package
13267 (name "python-yapf")
13268 (version "0.24.0")
13269 (source
13270 (origin
13271 (method url-fetch)
13272 (uri (pypi-uri "yapf" version))
13273 (sha256
13274 (base32
13275 "0anwby0ydmyzcsgjc5dn1ryddwvii4dq61vck447q0n96npnzfyf"))))
13276 (build-system python-build-system)
13277 (home-page "https://github.com/google/yapf")
13278 (synopsis "Formatter for Python code")
13279 (description "YAPF is a formatter for Python code. It's based off of
13280 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
13281 takes the code and reformats it to the best formatting that conforms to the
13282 style guide, even if the original code didn't violate the style guide.")
13283 (license license:asl2.0)))
13284
13285 (define-public python2-yapf
13286 (package-with-python2 python-yapf))
13287
13288 (define-public python-gyp
13289 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
13290 (revision "0"))
13291 (package
13292 (name "python-gyp")
13293 ;; Google does not release versions,
13294 ;; based on second most recent commit date.
13295 (version (git-version "0.0.0" revision commit))
13296 (source
13297 (origin
13298 ;; Google does not release tarballs,
13299 ;; git checkout is needed.
13300 (method git-fetch)
13301 (uri (git-reference
13302 (url "https://chromium.googlesource.com/external/gyp")
13303 (commit commit)))
13304 (file-name (git-file-name name version))
13305 (sha256
13306 (base32
13307 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
13308 (build-system python-build-system)
13309 (home-page "https://gyp.gsrc.io/")
13310 (synopsis "GYP is a Meta-Build system")
13311 (description
13312 "GYP builds build systems for large, cross platform applications.
13313 It can be used to generate XCode projects, Visual Studio projects, Ninja build
13314 files, and Makefiles.")
13315 (license license:bsd-3))))
13316
13317 (define-public python2-gyp
13318 (package-with-python2 python-gyp))
13319
13320 (define-public python-whatever
13321 (package
13322 (name "python-whatever")
13323 (version "0.5")
13324 (source
13325 (origin
13326 (method url-fetch)
13327 (uri (string-append "https://github.com/Suor/whatever/archive/" version
13328 ".tar.gz"))
13329 (sha256
13330 (base32
13331 "1iqvnaf0zpc6b4rvbqq4xy45mszcscyzpzknv8wg6j84pbp22sap"))
13332 (file-name (string-append name "-" version ".tar.gz"))))
13333 (build-system python-build-system)
13334 (arguments
13335 `(#:phases
13336 (modify-phases %standard-phases
13337 (replace 'check
13338 (lambda _
13339 (invoke "py.test"))))))
13340 (native-inputs
13341 `(("python-pytest" ,python-pytest)))
13342 (home-page "http://github.com/Suor/whatever")
13343 (synopsis "Make anonymous functions by partial application of operators")
13344 (description "@code{whatever} provides an easy way to make anonymous
13345 functions by partial application of operators.")
13346 (license license:bsd-3)))
13347
13348 (define-public python2-whatever
13349 (package-with-python2 python-whatever))
13350
13351 (define-public python-funcy
13352 (package
13353 (name "python-funcy")
13354 (version "1.10")
13355 (source
13356 (origin
13357 (method url-fetch)
13358 (uri (string-append "https://github.com/Suor/funcy/archive/" version
13359 ".tar.gz"))
13360 (sha256
13361 (base32
13362 "1fanxivsip29vgarw6dn39xym3q4pbxcpa11plpp548lvxajpahz"))
13363 (file-name (string-append name "-" version ".tar.gz"))))
13364 (build-system python-build-system)
13365 (arguments
13366 `(#:phases
13367 (modify-phases %standard-phases
13368 (replace 'check
13369 (lambda _
13370 (invoke "py.test"))))))
13371 (native-inputs
13372 `(("python-pytest" ,python-pytest)
13373 ("python-whatever" ,python-whatever)))
13374 (home-page "http://github.com/Suor/funcy")
13375 (synopsis "Functional tools")
13376 (description "@code{funcy} is a library that provides functional tools.
13377 Examples are:
13378 @enumerate
13379 @item merge - Merges collections of the same type
13380 @item walk - Type-preserving map
13381 @item select - Selects a part of a collection
13382 @item take - Takes the first n items of a collection
13383 @item first - Takes the first item of a collection
13384 @item remove - Predicated-removes items of a collection
13385 @item concat - Concatenates two collections
13386 @item flatten - Flattens a collection with subcollections
13387 @item distinct - Returns only distinct items
13388 @item split - Predicated-splits a collection
13389 @item split_at - Splits a collection at a given item
13390 @item group_by - Groups items by group
13391 @item pairwise - Pairs off adjacent items
13392 @item partial - Partially-applies a function
13393 @item curry - Curries a function
13394 @item compose - Composes functions
13395 @item complement - Complements a predicate
13396 @item all_fn - \"all\" with predicate
13397 @end enumerate")
13398 (license license:bsd-3)))
13399
13400 (define-public python2-funcy
13401 (package-with-python2 python-funcy))
13402
13403 (define-public python-isoweek
13404 (package
13405 (name "python-isoweek")
13406 (version "1.3.3")
13407 (source
13408 (origin
13409 (method url-fetch)
13410 (uri (pypi-uri "isoweek" version))
13411 (sha256
13412 (base32
13413 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
13414 (build-system python-build-system)
13415 (home-page "https://github.com/gisle/isoweek")
13416 (synopsis "Objects representing a week")
13417 (description "The @code{isoweek} module provide the class Week that
13418 implements the week definition of ISO 8601. This standard also defines
13419 a notation for identifying weeks; yyyyWww (where the W is a literal).
13420 Week instances stringify to this form.")
13421 (license license:bsd-3)))
13422
13423 (define-public python2-isoweek
13424 (package-with-python2 python-isoweek))
13425
13426 (define-public python-tokenize-rt
13427 (package
13428 (name "python-tokenize-rt")
13429 (version "2.0.1")
13430 (source
13431 (origin
13432 (method url-fetch)
13433 (uri (pypi-uri "tokenize-rt" version))
13434 (sha256
13435 (base32
13436 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
13437 (build-system python-build-system)
13438 (home-page "https://github.com/asottile/tokenize-rt")
13439 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
13440 (description
13441 "This Python library is a wrapper around @code{tokenize} from the Python
13442 standard library. It provides two additional tokens @code{ESCAPED_NL} and
13443 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
13444 and @code{tokens_to_src} to roundtrip.")
13445 (license license:expat)))
13446
13447 (define-public python-future-fstrings
13448 (package
13449 (name "python-future-fstrings")
13450 (version "0.4.1")
13451 (source
13452 (origin
13453 (method url-fetch)
13454 (uri (pypi-uri "future_fstrings" version))
13455 (sha256
13456 (base32
13457 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
13458 (build-system python-build-system)
13459 (propagated-inputs
13460 `(("python-tokenize-rt" ,python-tokenize-rt)))
13461 (home-page "https://github.com/asottile/future-fstrings")
13462 (synopsis "Backport of fstrings to Python < 3.6")
13463 (description
13464 "This package provides a UTF-8 compatible encoding
13465 @code{future_fstrings}, which performs source manipulation. It decodes the
13466 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
13467 @code{f} strings.")
13468 (license license:expat)))
13469
13470 (define-public python-typing
13471 (package
13472 (name "python-typing")
13473 (version "3.6.6")
13474 (source
13475 (origin
13476 (method url-fetch)
13477 (uri (pypi-uri "typing" version))
13478 (sha256
13479 (base32
13480 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
13481 (build-system python-build-system)
13482 (home-page "https://docs.python.org/3/library/typing.html")
13483 (synopsis "Type hints for Python")
13484 (description "This is a backport of the standard library @code{typing}
13485 module to Python versions older than 3.5. Typing defines a standard notation
13486 for Python function and variable type annotations. The notation can be used
13487 for documenting code in a concise, standard format, and it has been designed
13488 to also be used by static and runtime type checkers, static analyzers, IDEs
13489 and other tools.")
13490 (license license:psfl)))
13491
13492 (define-public python2-typing
13493 (package-with-python2 python-typing))
13494
13495 (define-public bpython
13496 (package
13497 (name "bpython")
13498 (version "0.17.1")
13499 (source
13500 (origin
13501 (method url-fetch)
13502 (uri (pypi-uri "bpython" version))
13503 (sha256
13504 (base32
13505 "0bxhxi5zxdkrf8b4gwn0d363kdz3qnypjwhm1aydki53ph8ca1w9"))))
13506 (build-system python-build-system)
13507 (arguments
13508 `(#:phases
13509 (modify-phases %standard-phases
13510 (add-after 'unpack 'remove-failing-test
13511 (lambda _
13512 ;; Remove failing test. FIXME: make it pass
13513 (delete-file "bpython/test/test_args.py")
13514 #t))
13515 (add-after 'wrap 'add-aliases
13516 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
13517 (lambda* (#:key outputs #:allow-other-keys)
13518 (let ((out (assoc-ref outputs "out")))
13519 (for-each
13520 (lambda (old new)
13521 (symlink old (string-append out "/bin/" new)))
13522 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
13523 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
13524 #t)))))
13525 (propagated-inputs
13526 `(("python-pygments" ,python-pygments)
13527 ("python-requests" ,python-requests)
13528 ("python-babel" ,python-babel) ; optional, for internationalization
13529 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
13530 ("python-greenlet" ,python-greenlet)
13531 ("python-urwid" ,python-urwid) ; for bpython-urwid only
13532 ("python-six" ,python-six)))
13533 (native-inputs
13534 `(("python-sphinx" ,python-sphinx)
13535 ("python-mock" ,python-mock)))
13536 (home-page "https://bpython-interpreter.org/")
13537 (synopsis "Fancy interface to the Python interpreter")
13538 (description "Bpython is a fancy interface to the Python
13539 interpreter. bpython's main features are
13540
13541 @enumerate
13542 @item in-line syntax highlighting,
13543 @item readline-like autocomplete with suggestions displayed as you type,
13544 @item expected parameter list for any Python function,
13545 @item \"rewind\" function to pop the last line of code from memory and
13546 re-evaluate,
13547 @item send the code you've entered off to a pastebin,
13548 @item save the code you've entered to a file, and
13549 @item auto-indentation.
13550 @end enumerate")
13551 (license license:expat)))
13552
13553 (define-public bpython2
13554 (let ((base (package-with-python2
13555 (strip-python2-variant bpython))))
13556 (package (inherit base)
13557 (name "bpython2")
13558 (arguments
13559 `(#:python ,python-2
13560 #:phases
13561 (modify-phases %standard-phases
13562 (add-after 'unpack 'remove-failing-test
13563 (lambda _
13564 ;; Remove failing test. FIXME: make it pass
13565 (delete-file "bpython/test/test_args.py")
13566 ;; Disable failing test-cases (renaming inhibits they are
13567 ;; discovered)
13568 (substitute* "bpython/test/test_curtsies_repl.py"
13569 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
13570 (string-append a "xxx_off_" b))
13571 (("^(\\s*def )(test_complex\\W)" _ a b)
13572 (string-append a "xxx_off_" b)))
13573 #t))
13574 (add-before 'build 'rename-scripts
13575 ;; rename the scripts to bypthon2, bpdb2, etc.
13576 (lambda _
13577 (substitute* "setup.py"
13578 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
13579 (string-append name "2" rest "\n"))
13580 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
13581 (string-append name "2" (or sub "") rest "\n")))
13582 #t))))))))
13583
13584 (define-public python-pyinotify
13585 (package
13586 (name "python-pyinotify")
13587 (version "0.9.6")
13588 (source (origin
13589 (method url-fetch)
13590 (uri (pypi-uri "pyinotify" version))
13591 (sha256
13592 (base32
13593 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
13594 (build-system python-build-system)
13595 (arguments `(#:tests? #f)) ;no tests
13596 (home-page "https://github.com/seb-m/pyinotify")
13597 (synopsis "Python library for monitoring inotify events")
13598 (description
13599 "@code{pyinotify} provides a Python interface for monitoring
13600 file system events on Linux.")
13601 (license license:expat)))
13602
13603 (define-public python2-pyinotify
13604 (package-with-python2 python-pyinotify))
13605
13606 ;; Ada parser uses this version.
13607 (define-public python2-quex-0.67.3
13608 (package
13609 (name "python2-quex")
13610 (version "0.67.3")
13611 (source
13612 (origin
13613 (method url-fetch)
13614 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
13615 (version-major+minor version)
13616 "/quex-" version ".zip"))
13617 (sha256
13618 (base32
13619 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
13620 (build-system python-build-system)
13621 (native-inputs
13622 `(("unzip" ,unzip)))
13623 (arguments
13624 `(#:python ,python-2
13625 #:tests? #f
13626 #:phases
13627 (modify-phases %standard-phases
13628 (delete 'configure)
13629 (delete 'build)
13630 (replace 'install
13631 (lambda* (#:key outputs #:allow-other-keys)
13632 (let* ((out (assoc-ref outputs "out"))
13633 (share/quex (string-append out "/share/quex"))
13634 (bin (string-append out "/bin")))
13635 (copy-recursively "." share/quex)
13636 (mkdir-p bin)
13637 (symlink (string-append share/quex "/quex-exe.py")
13638 (string-append bin "/quex"))
13639 #t))))))
13640 (native-search-paths
13641 (list (search-path-specification
13642 (variable "QUEX_PATH")
13643 (files '("share/quex")))))
13644 (home-page "http://quex.sourceforge.net/")
13645 (synopsis "Lexical analyzer generator in Python")
13646 (description "@code{quex} is a lexical analyzer generator in Python.")
13647 (license license:lgpl2.1+))) ; Non-military
13648
13649 (define-public python2-quex
13650 (package (inherit python2-quex-0.67.3)
13651 (name "python2-quex")
13652 (version "0.68.1")
13653 (source
13654 (origin
13655 (method url-fetch)
13656 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
13657 (sha256
13658 (base32
13659 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
13660 (file-name (string-append name "-" version ".tar.gz"))))))
13661
13662 (define-public python-more-itertools
13663 (package
13664 (name "python-more-itertools")
13665 (version "4.3.0")
13666 (source
13667 (origin
13668 (method url-fetch)
13669 (uri (pypi-uri "more-itertools" version))
13670 (sha256
13671 (base32
13672 "17h3na0rdh8xq30w4b9pizgkdxmm51896bxw600x84jflg9vaxn4"))))
13673 (build-system python-build-system)
13674 (arguments
13675 `(,@(if (any (cute string-prefix? <> (or (%current-system)
13676 (%current-target-system)))
13677 '("armhf" "i686"))
13678 '(#:phases
13679 (modify-phases %standard-phases
13680 ;; This is required for 32-bit hardware.
13681 ;; TODO: Try to remove this when upgrading.
13682 (add-after 'unpack 'patch-test
13683 (lambda _
13684 (substitute* "more_itertools/tests/test_more.py"
13685 (("10 \\*\\* 10") "9 ** 9"))
13686 #t))))
13687 '())))
13688 (propagated-inputs
13689 `(("python-six" ,python-six-bootstrap)))
13690 (home-page "https://github.com/erikrose/more-itertools")
13691 (synopsis "More routines for operating on iterables, beyond itertools")
13692 (description "Python's built-in @code{itertools} module implements a
13693 number of iterator building blocks inspired by constructs from APL, Haskell,
13694 and SML. @code{more-itertools} includes additional building blocks for
13695 working with iterables.")
13696 (license license:expat)))
13697
13698 (define-public python2-more-itertools
13699 (package-with-python2 python-more-itertools))
13700
13701 (define-public python-latexcodec
13702 (package
13703 (name "python-latexcodec")
13704 (version "1.0.5")
13705 (source
13706 (origin
13707 (method url-fetch)
13708 (uri (pypi-uri "latexcodec" version))
13709 (sha256
13710 (base32
13711 "0zdd1gf24i83ykadx0y30n3001j43scqr2saql3vckk5c39dj1wn"))))
13712 (build-system python-build-system)
13713 (inputs
13714 `(("python-six" ,python-six)))
13715 (home-page "https://readthedocs.org/projects/latexcodec/")
13716 (synopsis "Work with LaTeX code in Python")
13717 (description "Lexer and codec to work with LaTeX code in Python.")
13718 (license license:expat)))
13719
13720 (define-public python-pybtex
13721 (package
13722 (name "python-pybtex")
13723 (version "0.21")
13724 (source
13725 (origin
13726 (method url-fetch)
13727 (uri (pypi-uri "pybtex" version))
13728 (sha256
13729 (base32
13730 "00300j8dn5pxq4ndxmfmbmycg2znawkqs49val2x6jlmfiy6r2mg"))))
13731 (build-system python-build-system)
13732 (native-inputs
13733 `(("python-nose" ,python-nose)))
13734 (inputs
13735 `(("python-latexcodec" ,python-latexcodec)
13736 ("python-pyyaml" ,python-pyyaml)
13737 ("python-six" ,python-six)))
13738 (arguments
13739 `(#:test-target "nosetests"))
13740 (home-page "https://pybtex.org/")
13741 (synopsis "BibTeX-compatible bibliography processor")
13742 (description "Pybtex is a BibTeX-compatible bibliography processor written
13743 in Python. You can simply type pybtex instead of bibtex.")
13744 (license license:expat)))
13745
13746 (define-public python-onetimepass
13747 (package
13748 (name "python-onetimepass")
13749 (version "1.0.1")
13750 (source
13751 (origin
13752 (method url-fetch)
13753 (uri (pypi-uri "onetimepass" version))
13754 (sha256
13755 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
13756 (build-system python-build-system)
13757 (propagated-inputs `(("python-six" ,python-six)))
13758 (home-page "https://github.com/tadeck/onetimepass/")
13759 (synopsis "One-time password library")
13760 (description "Python one-time password library for HMAC-based (HOTP) and
13761 time-based (TOTP) passwords.")
13762 (license license:expat)))
13763
13764 (define-public python-parso
13765 (package
13766 (name "python-parso")
13767 (version "0.3.1")
13768 (source
13769 (origin
13770 (method url-fetch)
13771 (uri (pypi-uri "parso" version))
13772 (sha256
13773 (base32
13774 "18p89iwcm8mnf380f92g9w0bhx5km8wxp392vvjcq4y1ld1llw1m"))))
13775 (native-inputs
13776 `(("python-pytest" ,python-pytest)))
13777 (build-system python-build-system)
13778 (home-page "https://github.com/davidhalter/parso")
13779 (synopsis "Python Parser")
13780 (description "Parso is a Python parser that supports error recovery and
13781 round-trip parsing for different Python versions (in multiple Python versions).
13782 Parso is also able to list multiple syntax errors in your Python file.")
13783 (license license:expat)))
13784
13785 (define-public python2-parso
13786 (package-with-python2 python-parso))
13787
13788 (define-public python-async-generator
13789 (package
13790 (name "python-async-generator")
13791 (version "1.9")
13792 (source
13793 (origin
13794 (method url-fetch)
13795 (uri (pypi-uri "async_generator" version))
13796 (sha256
13797 (base32
13798 "0wc3hidz1q85cja93k5pzybn0fprfnqyrv4qlkdqdzklc5f4dmdp"))))
13799 (build-system python-build-system)
13800 (native-inputs
13801 `(("python-pytest" ,python-pytest)))
13802 (home-page "https://github.com/python-trio/async_generator")
13803 (synopsis "Async generators and context managers for Python 3.5+")
13804 (description "@code{async_generator} back-ports Python 3.6's native async
13805 generators and Python 3.7's context managers into Python 3.5.")
13806 ;; Dual licensed.
13807 (license (list license:expat license:asl2.0))))
13808
13809 (define-public python-async-timeout
13810 (package
13811 (name "python-async-timeout")
13812 (version "3.0.1")
13813 (source
13814 (origin
13815 (method url-fetch)
13816 (uri (pypi-uri "async-timeout" version))
13817 (sha256
13818 (base32
13819 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
13820 (build-system python-build-system)
13821 (home-page "https://github.com/aio-libs/async_timeout/")
13822 (synopsis "Timeout context manager for asyncio programs")
13823 (description "@code{async-timeout} provides a timeout timeout context
13824 manager compatible with @code{asyncio}.")
13825 (license license:asl2.0)))
13826
13827 (define-public python-glob2
13828 (package
13829 (name "python-glob2")
13830 (version "0.6")
13831 (source (origin
13832 (method url-fetch)
13833 (uri (string-append
13834 "https://github.com/miracle2k/python-glob2/archive/"
13835 version
13836 ".tar.gz"))
13837 (sha256
13838 (base32
13839 "0ja168f0dz4kbz4m06dm0rd3acaypk6hjx2km541pw22y9s40mag"))
13840 (file-name (string-append name "-" version ".tar.gz"))))
13841 (build-system python-build-system)
13842 (home-page "https://github.com/miracle2k/python-glob2/")
13843 (synopsis "Extended Version of the python buildin glob module")
13844 (description "This is an extended version of the Python
13845 @url{http://docs.python.org/library/glob.html, built-in glob module} which
13846 adds:
13847
13848 @itemize
13849 @item The ability to capture the text matched by glob patterns, and return
13850 those matches alongside the file names.
13851 @item A recursive @code{**} globbing syntax, akin for example to the
13852 @code{globstar} option of Bash.
13853 @item The ability to replace the file system functions used, in order to glob
13854 on virtual file systems.
13855 @item Compatible with Python 2 and Python 3 (tested with 3.3).
13856 @end itemize
13857
13858 Glob2 currently based on the glob code from Python 3.3.1.")
13859 (license license:bsd-2)))
13860
13861 (define-public python2-glob2
13862 (package-with-python2 python-glob2))
13863
13864 (define-public python-gipc
13865 (package
13866 (name "python-gipc")
13867 (version "0.6.0")
13868 (source
13869 (origin
13870 (method url-fetch)
13871 (uri (pypi-uri "gipc" version ".zip"))
13872 (sha256
13873 (base32
13874 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
13875 (build-system python-build-system)
13876 (native-inputs
13877 `(("unzip" ,unzip)))
13878 (propagated-inputs
13879 `(("python-gevent" ,python-gevent)))
13880 (home-page "http://gehrcke.de/gipc")
13881 (synopsis "Child process management in the context of gevent")
13882 (description "Usage of Python's multiprocessing package in a
13883 gevent-powered application may raise problems. With @code{gipc},
13884 process-based child processes can safely be created anywhere within a
13885 gevent-powered application.")
13886 (license license:expat)))
13887
13888 (define-public python2-gipc
13889 (package-with-python2 python-gipc))
13890
13891 (define-public python-fusepy
13892 (package
13893 (name "python-fusepy")
13894 (version "2.0.4")
13895 (source
13896 (origin
13897 (method url-fetch)
13898 (uri (pypi-uri "fusepy" version))
13899 (sha256
13900 (base32
13901 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
13902 (build-system python-build-system)
13903 (arguments
13904 `(#:phases
13905 (modify-phases %standard-phases
13906 (add-before 'build 'set-library-file-name
13907 (lambda* (#:key inputs #:allow-other-keys)
13908 (let ((fuse (assoc-ref inputs "fuse")))
13909 (substitute* "fuse.py"
13910 (("find_library\\('fuse'\\)")
13911 (string-append "'" fuse "/lib/libfuse.so'")))
13912 #t))))))
13913 (propagated-inputs
13914 `(("fuse" ,fuse)))
13915 (home-page "https://github.com/fusepy/fusepy")
13916 (synopsis "Simple ctypes bindings for FUSE")
13917 (description "Python module that provides a simple interface to FUSE and
13918 MacFUSE. The binding is created using the standard @code{ctypes} library.")
13919 (license license:isc)))
13920
13921 (define-public python2-fusepy
13922 (package-with-python2 python-fusepy))
13923
13924 (define-public python2-gdrivefs
13925 (package
13926 (name "python2-gdrivefs")
13927 (version "0.14.9")
13928 (source
13929 (origin
13930 (method url-fetch)
13931 (uri (pypi-uri "gdrivefs" version))
13932 (sha256
13933 (base32
13934 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
13935 (build-system python-build-system)
13936 (arguments
13937 `(#:python ,python-2
13938 #:phases
13939 (modify-phases %standard-phases
13940 (add-before 'build 'patch-setup-py
13941 (lambda _
13942 ;; Update requirements from dependency==version
13943 ;; to dependency>=version
13944 (substitute* "gdrivefs/resources/requirements.txt"
13945 (("==") ">="))
13946 #t)))))
13947 (native-inputs
13948 `(("python2-gipc" ,python2-gipc)
13949 ("python2-gevent" ,python2-gevent)
13950 ("python2-greenlet" ,python2-greenlet)
13951 ("python2-httplib2" ,python2-httplib2)
13952 ("python2-uritemplate" ,python2-uritemplate)
13953 ("python2-oauth2client" ,python2-oauth2client)
13954 ("python2-six" ,python2-six)))
13955 (propagated-inputs
13956 `(("python2-dateutil" ,python2-dateutil)
13957 ("python2-fusepy" ,python2-fusepy)
13958 ("python2-google-api-client" ,python2-google-api-client)))
13959 (home-page "https://github.com/dsoprea/GDriveFS")
13960 (synopsis "Mount Google Drive as a local file system")
13961 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
13962 under Python 2.7.")
13963 (license license:gpl2)))
13964
13965 (define-public pybind11
13966 (package
13967 (name "pybind11")
13968 (version "2.2.4")
13969 (source (origin
13970 (method git-fetch)
13971 (uri (git-reference
13972 (url "https://github.com/pybind/pybind11.git")
13973 (commit (string-append "v" version))))
13974 (sha256
13975 (base32
13976 "0pa79ymcasv8br5ifbx7878id5py2jpjac3i20cqxr6gs9l6ivlv"))
13977 (file-name (git-file-name name version))))
13978 (build-system cmake-build-system)
13979 (native-inputs
13980 `(("python" ,python)
13981 ("python-pytest" ,python-pytest)))
13982 (arguments
13983 `(#:test-target "check"))
13984 (home-page "https://github.com/pybind/pybind11/")
13985 (synopsis "Seamless operability between C++11 and Python")
13986 (description "pybind11 is a lightweight header-only library that exposes
13987 C++ types in Python and vice versa, mainly to create Python bindings of
13988 existing C++ code. Its goals and syntax are similar to the excellent
13989 Boost.Python library by David Abrahams: to minimize boilerplate code in
13990 traditional extension modules by inferring type information using compile-time
13991 introspection.")
13992 (license license:expat)))
13993
13994 (define-public python-fasteners
13995 (package
13996 (name "python-fasteners")
13997 (version "0.14.1")
13998 (source
13999 (origin
14000 (method url-fetch)
14001 (uri (pypi-uri "fasteners" version))
14002 (sha256
14003 (base32
14004 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
14005 (build-system python-build-system)
14006 (propagated-inputs
14007 `(("python-monotonic" ,python-monotonic)
14008 ("python-six" ,python-six)
14009 ("python-testtools" ,python-testtools)))
14010 (home-page "https://github.com/harlowja/fasteners")
14011 (synopsis "Python package that provides useful locks")
14012 (description
14013 "This package provides a Python program that provides following locks:
14014
14015 @itemize
14016 @item Locking decorator
14017 @item Reader-writer locks
14018 @item Inter-process locks
14019 @item Generic helpers
14020 @end itemize\n")
14021 (properties `((python2-variant . ,(delay python2-fasteners))))
14022 (license license:asl2.0)))
14023
14024 (define-public python2-fasteners
14025 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
14026 (package
14027 (inherit base)
14028 (propagated-inputs
14029 `(("python2-futures" ,python2-futures)
14030 ,@(package-propagated-inputs base))))))
14031
14032 (define-public python-requests-file
14033 (package
14034 (name "python-requests-file")
14035 (version "1.4.3")
14036 (source
14037 (origin
14038 (method url-fetch)
14039 (uri (pypi-uri "requests-file" version))
14040 (sha256
14041 (base32
14042 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
14043 (build-system python-build-system)
14044 (propagated-inputs
14045 `(("python-requests" ,python-requests)
14046 ("python-six" ,python-six)))
14047 (home-page
14048 "https://github.com/dashea/requests-file")
14049 (synopsis "File transport adapter for Requests")
14050 (description
14051 "Requests-File is a transport adapter for use with the Requests Python
14052 library to allow local filesystem access via file:// URLs.")
14053 (license license:asl2.0)))
14054
14055 (define-public python2-requests-file
14056 (package-with-python2 python-requests-file))
14057
14058 (define-public python-tldextract
14059 (package
14060 (name "python-tldextract")
14061 (version "2.2.0")
14062 (source
14063 (origin
14064 (method url-fetch)
14065 (uri (pypi-uri "tldextract" version))
14066 (sha256
14067 (base32
14068 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
14069 (build-system python-build-system)
14070 (native-inputs
14071 `(("python-pytest" ,python-pytest)
14072 ("python-responses" ,python-responses)))
14073 (propagated-inputs
14074 `(("python-idna" ,python-idna)
14075 ("python-requests" ,python-requests)
14076 ("python-requests-file" ,python-requests-file)))
14077 (home-page
14078 "https://github.com/john-kurkowski/tldextract")
14079 (synopsis
14080 "Separate the TLD from the registered domain and subdomains of a URL")
14081 (description
14082 "TLDExtract accurately separates the TLD from the registered domain and
14083 subdomains of a URL, using the Public Suffix List. By default, this includes
14084 the public ICANN TLDs and their exceptions. It can optionally support the
14085 Public Suffix List's private domains as well.")
14086 (license license:bsd-3)))
14087
14088 (define-public python2-tldextract
14089 (package-with-python2 python-tldextract))
14090
14091 (define-public python-pynamecheap
14092 (package
14093 (name "python-pynamecheap")
14094 (version "0.0.3")
14095 (source
14096 (origin
14097 (method url-fetch)
14098 (uri (pypi-uri "PyNamecheap" version))
14099 (sha256
14100 (base32
14101 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
14102 (build-system python-build-system)
14103 (propagated-inputs
14104 `(("python-requests" ,python-requests)))
14105 (home-page
14106 "https://github.com/Bemmu/PyNamecheap")
14107 (synopsis
14108 "Namecheap API client in Python")
14109 (description
14110 "PyNamecheap is a Namecheap API client in Python.")
14111 (license license:expat)))
14112
14113 (define-public python2-pynamecheap
14114 (package-with-python2 python-pynamecheap))
14115
14116 (define-public python-dns-lexicon
14117 (package
14118 (name "python-dns-lexicon")
14119 (version "2.4.0")
14120 (source
14121 (origin
14122 (method url-fetch)
14123 (uri (pypi-uri "dns-lexicon" version))
14124 (sha256
14125 (base32
14126 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
14127 (build-system python-build-system)
14128 (arguments
14129 `(#:tests? #f)) ;requires internet access
14130 (propagated-inputs
14131 `(("python-future" ,python-future)
14132 ("python-pynamecheap" ,python-pynamecheap)
14133 ("python-requests" ,python-requests)
14134 ("python-tldextract" ,python-tldextract)
14135 ("python-urllib3" ,python-urllib3)))
14136 (home-page "https://github.com/AnalogJ/lexicon")
14137 (synopsis
14138 "Manipulate DNS records on various DNS providers")
14139 (description
14140 "Lexicon provides a way to manipulate DNS records on multiple DNS
14141 providers in a standardized way. It has a CLI but it can also be used as a
14142 Python library. It was designed to be used in automation, specifically with
14143 Let's Encrypt.")
14144 (license license:expat)))
14145
14146 (define-public python2-dns-lexicon
14147 (package-with-python2 python-dns-lexicon))
14148
14149 (define-public python-commandlines
14150 (package
14151 (name "python-commandlines")
14152 (version "0.4.1")
14153 (source
14154 (origin
14155 (method url-fetch)
14156 (uri (pypi-uri "commandlines" version))
14157 (sha256
14158 (base32
14159 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
14160 (build-system python-build-system)
14161 (home-page "https://github.com/chrissimpkins/commandlines")
14162 (synopsis "Command line argument to object parsing library")
14163 (description
14164 "@code{Commandlines} is a Python library for command line application
14165 development that supports command line argument parsing, command string
14166 validation testing and application logic.")
14167 (license license:expat)))
14168
14169 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
14170 ;; python-numba. They have a very unflexible relationship.
14171 (define-public python-numba
14172 (package
14173 (name "python-numba")
14174 (version "0.39.0")
14175 (source
14176 (origin
14177 (method url-fetch)
14178 (uri (pypi-uri "numba" version))
14179 (sha256
14180 (base32
14181 "1bibvkwga1v8293i9ivl469d8bzgabn3vgr2ig7c1i68v8frsx07"))))
14182 (build-system python-build-system)
14183 (arguments
14184 `(#:modules ((guix build utils)
14185 (guix build python-build-system)
14186 (ice-9 ftw)
14187 (srfi srfi-1)
14188 (srfi srfi-26))
14189 #:phases
14190 (modify-phases %standard-phases
14191 (add-after 'unpack 'disable-proprietary-features
14192 (lambda _
14193 (setenv "NUMBA_DISABLE_HSA" "1")
14194 (setenv "NUMBA_DISABLE_CUDA" "1")
14195 #t))
14196 (add-after 'unpack 'remove-failing-tests
14197 (lambda _
14198 ;; FIXME: these tests fail for unknown reasons:
14199 ;; test_non_writable_pycache, test_non_creatable_pycache, and
14200 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
14201 (substitute* "numba/tests/test_dispatcher.py"
14202 (("def test(_non_writable_pycache)" _ m)
14203 (string-append "def guix_skip" m))
14204 (("def test(_non_creatable_pycache)" _ m)
14205 (string-append "def guix_skip" m))
14206 (("def test(_frozen)" _ m)
14207 (string-append "def guix_skip" m)))
14208
14209 ;; These tests fail because we don't run the tests from the build
14210 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
14211 ;; They ar in numba.tests.test_pycc.TestDistutilsSupport.
14212 (substitute* "numba/tests/test_pycc.py"
14213 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
14214 (string-append "def guix_skip" m)))
14215 #t))
14216 (replace 'check
14217 (lambda _
14218 (let ((cwd (getcwd)))
14219 (setenv "PYTHONPATH"
14220 (string-append cwd "/build/"
14221 (find (cut string-prefix? "lib" <>)
14222 (scandir (string-append cwd "/build")))
14223 ":"
14224 (getenv "PYTHONPATH")))
14225 ;; Something is wrong with the PYTHONPATH when running the
14226 ;; tests from the build directory, as it complains about not being
14227 ;; able to import certain modules.
14228 (with-directory-excursion "/tmp"
14229 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
14230 #t)))))
14231 (propagated-inputs
14232 `(("python-llvmlite" ,python-llvmlite)
14233 ("python-numpy" ,python-numpy)
14234 ("python-singledispatch" ,python-singledispatch)))
14235 ;; Needed for tests.
14236 (inputs
14237 `(("python-jinja2" ,python-jinja2)
14238 ("python-pygments" ,python-pygments)))
14239 (home-page "https://numba.pydata.org")
14240 (synopsis "Compile Python code using LLVM")
14241 (description "Numba gives you the power to speed up your applications with
14242 high performance functions written directly in Python. With a few
14243 annotations, array-oriented and math-heavy Python code can be just-in-time
14244 compiled to native machine instructions, similar in performance to C, C++ and
14245 Fortran, without having to switch languages or Python interpreters.
14246
14247 Numba works by generating optimized machine code using the LLVM compiler
14248 infrastructure at import time, runtime, or statically (using the included pycc
14249 tool).")
14250 (license license:bsd-3)))
14251
14252 (define-public python-anndata
14253 (package
14254 (name "python-anndata")
14255 (version "0.6.9")
14256 (source
14257 (origin
14258 (method url-fetch)
14259 (uri (pypi-uri "anndata" version))
14260 (sha256
14261 (base32
14262 "1fh461xyyc7pcrjfgd013bdc2alf53r46ss3gfw3431mbb1gappi"))))
14263 (build-system python-build-system)
14264 (propagated-inputs
14265 `(("python-h5py" ,python-h5py)
14266 ("python-natsort" ,python-natsort)
14267 ("python-pandas" ,python-pandas)
14268 ("python-scipy" ,python-scipy)))
14269 (home-page "https://github.com/theislab/anndata")
14270 (synopsis "Annotated data for data analysis pipelines")
14271 (description "Anndata is a package for simple (functional) high-level APIs
14272 for data analysis pipelines. In this context, it provides an efficient,
14273 scalable way of keeping track of data together with learned annotations and
14274 reduces the code overhead typically encountered when using a mostly
14275 object-oriented library such as @code{scikit-learn}.")
14276 (license license:bsd-3)))
14277
14278 (define-public python-dill
14279 (package
14280 (name "python-dill")
14281 (version "0.2.8.2")
14282 (source
14283 (origin
14284 (method url-fetch)
14285 (uri (pypi-uri "dill" version))
14286 (sha256
14287 (base32
14288 "1cymzn9fxwdy33h21zkk4gqgzvd25110hh3zdqnvnwa3p52c4kb2"))))
14289 (build-system python-build-system)
14290 ;; FIXME: The check phase fails with "don't know how to make test".
14291 (arguments '(#:tests? #f))
14292 (home-page "https://pypi.org/project/dill")
14293 (synopsis "Serialize all of Python")
14294 (description "Dill extends Python's @code{pickle} module for serializing
14295 and de-serializing Python objects to the majority of the built-in Python
14296 types. Dill provides the user the same interface as the @code{pickle} module,
14297 and also includes some additional features. In addition to pickling Python
14298 objects, @code{dill} provides the ability to save the state of an interpreter
14299 session in a single command. Hence, it would be feasable to save a
14300 interpreter session, close the interpreter, ship the pickled file to another
14301 computer, open a new interpreter, unpickle the session and thus continue from
14302 the saved state of the original interpreter session.")
14303 (license license:bsd-3)))
14304
14305 (define-public python-multiprocess
14306 (package
14307 (name "python-multiprocess")
14308 (version "0.70.6.1")
14309 (source
14310 (origin
14311 (method url-fetch)
14312 (uri (pypi-uri "multiprocess" version))
14313 (sha256
14314 (base32
14315 "1ip5caz67b3q0553mr8gm8xwsb8x500jn8ml0gihgyfy52m2ypcq"))))
14316 (build-system python-build-system)
14317 (propagated-inputs
14318 `(("python-dill" ,python-dill)))
14319 (home-page "https://pypi.org/project/multiprocess")
14320 (synopsis "Multiprocessing and multithreading in Python")
14321 (description
14322 "This package is a fork of the multiprocessing Python package, a package
14323 which supports the spawning of processes using the API of the standard
14324 library's @code{threading} module.")
14325 (license license:bsd-3)))
14326
14327 (define-public python-toolz
14328 (package
14329 (name "python-toolz")
14330 (version "0.9.0")
14331 (source
14332 (origin
14333 (method url-fetch)
14334 (uri (pypi-uri "toolz" version))
14335 (sha256
14336 (base32
14337 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
14338 (build-system python-build-system)
14339 ;; FIXME: tests cannot be computed: "Can't perform this operation for
14340 ;; unregistered loader type"
14341 (arguments '(#:tests? #f))
14342 (home-page "https://github.com/pytoolz/toolz/")
14343 (synopsis "List processing tools and functional utilities")
14344 (description
14345 "This package provides a set of utility functions for iterators,
14346 functions, and dictionaries.")
14347 (license license:bsd-3)))
14348
14349 (define-public python2-toolz
14350 (package-with-python2 python-toolz))
14351
14352 (define-public python-cytoolz
14353 (package
14354 (name "python-cytoolz")
14355 (version "0.9.0.1")
14356 (source
14357 (origin
14358 (method url-fetch)
14359 (uri (pypi-uri "cytoolz" version))
14360 (sha256
14361 (base32
14362 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
14363 (build-system python-build-system)
14364 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
14365 ;; 'exceptions'"
14366 (arguments '(#:tests? #f))
14367 (propagated-inputs
14368 `(("python-toolz" ,python-toolz)))
14369 (native-inputs
14370 `(("python-cython" ,python-cython)))
14371 (home-page "https://github.com/pytoolz/cytoolz")
14372 (synopsis "High performance functional utilities")
14373 (description
14374 "The cytoolz package implements the same API as provided by toolz. The
14375 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
14376 that is accessible to other projects developed in Cython.")
14377 (license license:bsd-3)))
14378
14379 (define-public python-sortedcontainers
14380 (package
14381 (name "python-sortedcontainers")
14382 (version "2.0.4")
14383 (source
14384 (origin
14385 (method url-fetch)
14386 (uri (pypi-uri "sortedcontainers" version))
14387 (sha256
14388 (base32
14389 "10hrk2k0hbf9x78vd3f0lj277m1yzfhzzxr0hja718liwb398wk0"))))
14390 (build-system python-build-system)
14391 (native-inputs
14392 `(("python-tox" ,python-tox)))
14393 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
14394 (synopsis "Sorted List, Sorted Dict, Sorted Set")
14395 (description
14396 "This package provides a sorted collections library, written in
14397 pure-Python.")
14398 (license license:asl2.0)))
14399
14400 (define-public python-cloudpickle
14401 (package
14402 (name "python-cloudpickle")
14403 (version "0.6.1")
14404 (source
14405 (origin
14406 (method url-fetch)
14407 (uri (pypi-uri "cloudpickle" version))
14408 (sha256
14409 (base32
14410 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
14411 (build-system python-build-system)
14412 ;; FIXME: there are 5 errors in 122 tests:
14413 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
14414 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
14415 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
14416 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
14417 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
14418 ;; TypeError: cannot serialize '_io.BufferedRandom' object
14419 (arguments '(#:tests? #f))
14420 (native-inputs
14421 `(("python-pytest" ,python-pytest)
14422 ("python-mock" ,python-mock)
14423 ("python-tornado" ,python-tornado)))
14424 (home-page "https://github.com/cloudpipe/cloudpickle")
14425 (synopsis "Extended pickling support for Python objects")
14426 (description
14427 "Cloudpickle makes it possible to serialize Python constructs not
14428 supported by the default pickle module from the Python standard library. It
14429 is especially useful for cluster computing where Python expressions are
14430 shipped over the network to execute on remote hosts, possibly close to the
14431 data.")
14432 (license license:bsd-3)))
14433
14434 (define-public python2-cloudpickle
14435 (package-with-python2 python-cloudpickle))
14436
14437 (define-public python-locket
14438 (package
14439 (name "python-locket")
14440 (version "0.2.0")
14441 (source
14442 (origin
14443 (method url-fetch)
14444 (uri (pypi-uri "locket" version))
14445 (sha256
14446 (base32
14447 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
14448 (build-system python-build-system)
14449 (home-page "https://github.com/mwilliamson/locket.py")
14450 (synopsis "File-based locks for Python")
14451 (description
14452 "Locket implements a lock that can be used by multiple processes provided
14453 they use the same path.")
14454 (license license:bsd-2)))
14455
14456 (define-public python2-locket
14457 (package-with-python2 python-locket))
14458
14459 (define-public python-blosc
14460 (package
14461 (name "python-blosc")
14462 (version "1.5.1")
14463 (source
14464 (origin
14465 (method url-fetch)
14466 (uri (pypi-uri "blosc" version))
14467 (sha256
14468 (base32
14469 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
14470 (build-system python-build-system)
14471 ;; FIXME: all tests pass, but then this error is printed:
14472 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
14473 (arguments '(#:tests? #f))
14474 (propagated-inputs
14475 `(("python-numpy" ,python-numpy)))
14476 (home-page "https://github.com/blosc/python-blosc")
14477 (synopsis "Python wrapper for the Blosc data compressor library")
14478 (description "Blosc is a high performance compressor optimized for binary
14479 data. It has been designed to transmit data to the processor cache faster
14480 than the traditional, non-compressed, direct memory fetch approach via a
14481 @code{memcpy()} system call.
14482
14483 Blosc works well for compressing numerical arrays that contains data with
14484 relatively low entropy, like sparse data, time series, grids with
14485 regular-spaced values, etc.
14486
14487 This Python package wraps the Blosc library.")
14488 (license license:bsd-3)))
14489
14490 (define-public python2-blosc
14491 (package-with-python2 python-blosc))
14492
14493 (define-public python-partd
14494 (package
14495 (name "python-partd")
14496 (version "0.3.9")
14497 (source
14498 (origin
14499 (method url-fetch)
14500 (uri (pypi-uri "partd" version))
14501 (sha256
14502 (base32
14503 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
14504 (build-system python-build-system)
14505 (propagated-inputs
14506 `(("python-blosc" ,python-blosc)
14507 ("python-locket" ,python-locket)
14508 ("python-numpy" ,python-numpy)
14509 ("python-pandas" ,python-pandas)
14510 ("python-pyzmq" ,python-pyzmq)
14511 ("python-toolz" ,python-toolz)))
14512 (home-page "https://github.com/dask/partd/")
14513 (synopsis "Appendable key-value storage")
14514 (description "Partd stores key-value pairs. Values are raw bytes. We
14515 append on old values. Partd excels at shuffling operations.")
14516 (license license:bsd-3)))
14517
14518 (define-public python2-partd
14519 (package-with-python2 python-partd))
14520
14521 (define-public python-dask
14522 (package
14523 (name "python-dask")
14524 (version "1.0.0")
14525 (source
14526 (origin
14527 (method url-fetch)
14528 (uri (pypi-uri "dask" version))
14529 (sha256
14530 (base32
14531 "1xwz8h020ipwav2p5gcq9pskya1cvzd6hjyvd06dvr3w5lxlmym1"))))
14532 (build-system python-build-system)
14533 ;; A single test out of 5000+ fails. This test is marked as xfail when
14534 ;; pytest-xdist is used.
14535 (arguments
14536 `(#:phases
14537 (modify-phases %standard-phases
14538 (add-after 'unpack 'disable-broken-test
14539 (lambda _
14540 (substitute* "dask/tests/test_threaded.py"
14541 (("def test_interrupt\\(\\)" m)
14542 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
14543 m)))
14544 (when (which "python2")
14545 ;; This test fails with recent Pandas:
14546 ;; <https://github.com/dask/dask/issues/3794>.
14547 (substitute* "dask/dataframe/tests/test_dataframe.py"
14548 (("def test_info\\(\\)" m)
14549 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
14550 m))))
14551 #t))
14552 (replace 'check
14553 (lambda _ (invoke "pytest" "-vv"))))))
14554 (propagated-inputs
14555 `(("python-cloudpickle" ,python-cloudpickle)
14556 ("python-numpy" ,python-numpy)
14557 ("python-pandas" ,python-pandas)
14558 ("python-partd" ,python-partd)
14559 ("python-toolz" ,python-toolz)
14560 ("python-pyyaml" ,python-pyyaml)))
14561 (native-inputs
14562 `(("python-pytest" ,python-pytest)
14563 ("python-pytest-runner" ,python-pytest-runner)))
14564 (home-page "https://github.com/dask/dask/")
14565 (synopsis "Parallel computing with task scheduling")
14566 (description
14567 "Dask is a flexible parallel computing library for analytics. It
14568 consists of two components: dynamic task scheduling optimized for computation,
14569 and large data collections like parallel arrays, dataframes, and lists that
14570 extend common interfaces like NumPy, Pandas, or Python iterators to
14571 larger-than-memory or distributed environments. These parallel collections
14572 run on top of the dynamic task schedulers. ")
14573 (license license:bsd-3)))
14574
14575 (define-public python2-dask
14576 (package-with-python2 python-dask))
14577
14578 (define-public python-ilinkedlist
14579 (package
14580 (name "python-ilinkedlist")
14581 (version "0.4.0")
14582 (source
14583 (origin
14584 (method url-fetch)
14585 (uri (pypi-uri "ilinkedlist" version))
14586 (sha256
14587 (base32
14588 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
14589 (build-system python-build-system)
14590 (native-inputs `(("python-pytest" ,python-pytest)))
14591 (inputs `(("python" ,python)))
14592 (home-page "https://github.com/luther9/ilinkedlist-py")
14593 (synopsis "Immutable linked list library")
14594 (description
14595 "This is a implementation of immutable linked lists for Python. It
14596 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
14597 Since a linked list is treated as immutable, it is hashable, and its length
14598 can be retrieved in constant time. Some of the terminology is inspired by
14599 LISP. It is possible to create an improper list by creating a @code{Pair}
14600 with a non-list @code{cdr}.")
14601 (license license:gpl3+)))
14602
14603 (define-public python-readlike
14604 (package
14605 (name "python-readlike")
14606 (version "0.1.3")
14607 (source
14608 (origin
14609 (method url-fetch)
14610 (uri (pypi-uri "readlike" version))
14611 (sha256
14612 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
14613 (build-system python-build-system)
14614 (home-page "https://github.com/jangler/readlike")
14615 (synopsis "GNU Readline-like line editing module")
14616 (description
14617 "This Python module provides line editing functions similar to the default
14618 Emacs-style ones of GNU Readline. Unlike the Python standard library's
14619 @code{readline} package, this one allows access to those capabilties in settings
14620 outside of a standard command-line interface. It is especially well-suited to
14621 interfacing with Urwid, due to a shared syntax for describing key inputs.
14622
14623 Currently, all stateless Readline commands are implemented. Yanking and history
14624 are not supported.")
14625 (license license:expat)))
14626
14627 (define-public python2-readlike
14628 (package-with-python2 python-readlike))
14629
14630 (define-public python-reparser
14631 (package
14632 (name "python-reparser")
14633 (version "1.4.3")
14634 (source
14635 (origin
14636 (method url-fetch)
14637 (uri (pypi-uri "ReParser" version))
14638 (sha256
14639 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
14640 (build-system python-build-system)
14641 (home-page "https://github.com/xmikos/reparser")
14642 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
14643 (description
14644 "This Python library provides a simple lexer/parser for inline markup based
14645 on regular expressions.")
14646 (license license:expat)))
14647
14648 (define-public python2-reparser
14649 (let ((reparser (package-with-python2
14650 (strip-python2-variant python-reparser))))
14651 (package (inherit reparser)
14652 (propagated-inputs
14653 `(("python2-enum34" ,python2-enum34)
14654 ,@(package-propagated-inputs reparser))))))
14655
14656 (define-public python-precis-i18n
14657 (package
14658 (name "python-precis-i18n")
14659 (version "1.0.0")
14660 (source
14661 (origin
14662 (method url-fetch)
14663 (uri (pypi-uri "precis_i18n" version))
14664 (sha256
14665 (base32
14666 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
14667 (build-system python-build-system)
14668 (home-page "https://github.com/byllyfish/precis_i18n")
14669 (synopsis "Implementation of the PRECIS framework")
14670 (description
14671 "This module implements the PRECIS Framework as described in RFC 8264,
14672 RFC 8265 and RFC 8266.")
14673 (license license:expat)))
14674
14675 (define-public python-absl-py
14676 (package
14677 (name "python-absl-py")
14678 (version "0.6.1")
14679 (source
14680 (origin
14681 (method url-fetch)
14682 (uri (pypi-uri "absl-py" version))
14683 (sha256
14684 (base32
14685 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
14686 (build-system python-build-system)
14687 (propagated-inputs
14688 `(("python-six" ,python-six)))
14689 (home-page "https://github.com/abseil/abseil-py")
14690 (synopsis "Abseil Python common libraries")
14691 (description
14692 "This package provides the Abseil Python Common Libraries, a collection
14693 of Python libraries for building Python applications.")
14694 (license license:asl2.0)))
14695
14696 (define-public python-astor
14697 (package
14698 (name "python-astor")
14699 (version "0.7.1")
14700 (source
14701 (origin
14702 (method url-fetch)
14703 (uri (pypi-uri "astor" version))
14704 (sha256
14705 (base32
14706 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
14707 (build-system python-build-system)
14708 ;; FIXME: There are two errors and two test failures.
14709 (arguments `(#:tests? #f))
14710 (home-page "https://github.com/berkerpeksag/astor")
14711 (synopsis "Read/rewrite/write Python ASTs")
14712 (description "Astor is designed to allow easy manipulation of Python
14713 source via the AST.")
14714 (license license:bsd-3)))
14715
14716 (define-public python-grpcio
14717 (package
14718 (name "python-grpcio")
14719 (version "1.17.1")
14720 (source
14721 (origin
14722 (method url-fetch)
14723 (uri (pypi-uri "grpcio" version))
14724 (sha256
14725 (base32
14726 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
14727 (build-system python-build-system)
14728 (propagated-inputs
14729 `(("python-six" ,python-six)))
14730 (home-page "https://grpc.io")
14731 (synopsis "HTTP/2-based RPC framework")
14732 (description "This package provides a Python library for communicating
14733 with the HTTP/2-based RPC framework gRPC.")
14734 (license license:asl2.0)))
14735
14736 (define-public python-astunparse
14737 (package
14738 (name "python-astunparse")
14739 (version "1.6.1")
14740 (source
14741 (origin
14742 (method url-fetch)
14743 (uri (pypi-uri "astunparse" version))
14744 (sha256
14745 (base32
14746 "1jhidwyrqn17avqh9xnnm3wd7q7aahaq009cba67g86y6gxicyyj"))))
14747 (build-system python-build-system)
14748 (arguments '(#:tests? #f)) ; there are none
14749 (propagated-inputs
14750 `(("python-six" ,python-six)
14751 ("python-wheel" ,python-wheel)))
14752 (home-page "https://github.com/simonpercivall/astunparse")
14753 (synopsis "AST unparser for Python")
14754 (description "This package provides an AST unparser for Python. It is a
14755 factored out version of @code{unparse} found in the Python source
14756 distribution.")
14757 (license license:bsd-3)))
14758
14759 (define-public python-gast
14760 (package
14761 (name "python-gast")
14762 (version "0.2.0")
14763 (source
14764 (origin
14765 (method url-fetch)
14766 (uri (pypi-uri "gast" version))
14767 (sha256
14768 (base32
14769 "0c296xm1vz9x4w4inmdl0k8mnc0i9arw94si2i7pglpc461r0s3h"))))
14770 (build-system python-build-system)
14771 (propagated-inputs
14772 `(("python-astunparse" ,python-astunparse)))
14773 (home-page "https://pypi.org/project/gast/")
14774 (synopsis "Generic Python AST that abstracts the underlying Python version")
14775 (description
14776 "GAST provides a compatibility layer between the AST of various Python
14777 versions, as produced by @code{ast.parse} from the standard @code{ast}
14778 module.")
14779 (license license:bsd-3)))
14780
14781 (define-public python-wikidata
14782 (package
14783 (name "python-wikidata")
14784 (version "0.6.1")
14785 (source
14786 (origin
14787 (method url-fetch)
14788 (uri (pypi-uri "Wikidata" version))
14789 (sha256
14790 (base32
14791 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
14792 (build-system python-build-system)
14793 (propagated-inputs
14794 `(("python-babel" ,python-babel)))
14795 (home-page "https://github.com/dahlia/wikidata")
14796 (synopsis "Wikidata client library")
14797 (description
14798 "This package provides a Python interface to
14799 @url{https://www.wikidata.org/, Wikidata}.")
14800 (properties '((upstream-name . "Wikidata")))
14801 (license license:gpl3+)))
14802
14803 (define-public python-doctest-ignore-unicode
14804 (package
14805 (name "python-doctest-ignore-unicode")
14806 (version "0.1.2")
14807 (source
14808 (origin
14809 (method url-fetch)
14810 (uri (pypi-uri "doctest-ignore-unicode" version))
14811 (sha256
14812 (base32
14813 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
14814 (build-system python-build-system)
14815 (native-inputs
14816 `(("python-nose" ,python-nose)))
14817 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
14818 (synopsis "Ignore Unicode literal prefixes in doctests")
14819 (description
14820 "This package adds support for a flag to ignore Unicode literal prefixes
14821 in doctests.")
14822 (license license:asl2.0)))
14823
14824 (define-public python-attr
14825 (package
14826 (name "python-attr")
14827 (version "0.3.1")
14828 (source
14829 (origin
14830 (method url-fetch)
14831 (uri (pypi-uri "attr" version))
14832 (sha256
14833 (base32
14834 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
14835 (build-system python-build-system)
14836 (home-page "https://github.com/denis-ryzhkov/attr")
14837 (synopsis "Decorator for attributes of target function or class")
14838 (description "Simple decorator to set attributes of target function or
14839 class in a @acronym{DRY, Don't Repeat Yourself} way.")
14840 (license license:expat)))