gnu: python2-pystache: Use INVOKE.
[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, 2019 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-check)
117 #:use-module (gnu packages python-crypto)
118 #:use-module (gnu packages python-web)
119 #:use-module (gnu packages qt)
120 #:use-module (gnu packages readline)
121 #:use-module (gnu packages sdl)
122 #:use-module (gnu packages search)
123 #:use-module (gnu packages shells)
124 #:use-module (gnu packages ssh)
125 #:use-module (gnu packages terminals)
126 #:use-module (gnu packages tex)
127 #:use-module (gnu packages texinfo)
128 #:use-module (gnu packages time)
129 #:use-module (gnu packages tls)
130 #:use-module (gnu packages version-control)
131 #:use-module (gnu packages video)
132 #:use-module (gnu packages web)
133 #:use-module (gnu packages base)
134 #:use-module (gnu packages xml)
135 #:use-module (gnu packages xorg)
136 #:use-module (gnu packages xdisorg)
137 #:use-module (gnu packages tcl)
138 #:use-module (gnu packages bdw-gc)
139 #:use-module (guix packages)
140 #:use-module (guix download)
141 #:use-module (guix git-download)
142 #:use-module (guix utils)
143 #:use-module (guix build-system gnu)
144 #:use-module (guix build-system cmake)
145 #:use-module (guix build-system python)
146 #:use-module (guix build-system trivial)
147 #:use-module (srfi srfi-1)
148 #:use-module (srfi srfi-26))
149
150 (define-public python-psutil
151 (package
152 (name "python-psutil")
153 (version "5.4.3")
154 (source
155 (origin
156 (method url-fetch)
157 (uri (pypi-uri "psutil" version))
158 (sha256
159 (base32
160 "063v69x7spyclyaxrd3gmzj3p16q5ayg97xqhwb1kyn22a9pwip2"))))
161 (build-system python-build-system)
162 (arguments
163 ;; FIXME: some tests does not return and times out.
164 '(#:tests? #f))
165 (home-page "https://www.github.com/giampaolo/psutil")
166 (synopsis "Library for retrieving information on running processes")
167 (description
168 "psutil (Python system and process utilities) is a library for retrieving
169 information on running processes and system utilization (CPU, memory, disks,
170 network) in Python. It is useful mainly for system monitoring, profiling and
171 limiting process resources and management of running processes. It implements
172 many functionalities offered by command line tools such as: ps, top, lsof,
173 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
174 pidof, tty, taskset, pmap.")
175 (properties `((python2-variant . ,(delay python2-psutil))))
176 (license license:bsd-3)))
177
178 (define-public python2-psutil
179 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
180 (package
181 (inherit base)
182 (propagated-inputs
183 `(("python2-enum34" ,python2-enum34) ;optional
184 ,@(package-propagated-inputs base))))))
185
186 (define-public python-shapely
187 (package
188 (name "python-shapely")
189 (version "1.6.3")
190 (source
191 (origin
192 (method url-fetch)
193 (uri (pypi-uri "Shapely" version))
194 (sha256
195 (base32
196 "0svc58dzcw9gj92b4sgq35sdxkf85z0qwlzxarkzq4bp3h8jy58l"))))
197 (build-system python-build-system)
198 (native-inputs
199 `(("python-cython" ,python-cython)
200 ("python-matplotlib" ,python-matplotlib)
201 ("python-pytest" ,python-pytest)
202 ("python-pytest-cov" ,python-pytest-cov)))
203 (inputs
204 `(("geos" ,geos)))
205 (propagated-inputs
206 `(("python-numpy" ,python-numpy)))
207 (arguments
208 `(#:phases
209 (modify-phases %standard-phases
210 (add-after 'unpack 'patch-geos-path
211 (lambda* (#:key inputs #:allow-other-keys)
212 (let ((geos (assoc-ref inputs "geos"))
213 (glibc (assoc-ref inputs ,(if (%current-target-system)
214 "cross-libc" "libc"))))
215 (substitute* "shapely/geos.py"
216 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
217 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
218 geos "/lib/libgeos_c.so'])"))
219 (("free = load_dll\\('c'\\)\\.free")
220 (string-append "free = load_dll('c', fallbacks=['"
221 glibc "/lib/libc.so.6']).free"))))
222 #t)))))
223 (home-page "https://github.com/Toblerity/Shapely")
224 (synopsis "Library for the manipulation and analysis of geometric objects")
225 (description "Shapely is a Python package for manipulation and analysis of
226 planar geometric objects. It is based on the @code{GEOS} library.")
227 (license license:bsd-3)))
228
229 (define-public python-logwrap
230 (package
231 (name "python-logwrap")
232 (version "3.2.1")
233 (source
234 (origin
235 (method url-fetch)
236 (uri (pypi-uri "logwrap" version ".zip"))
237 (sha256
238 (base32
239 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
240 (build-system python-build-system)
241 (propagated-inputs
242 `(("python-six" ,python-six)
243 ("python-typing" ,python-typing)))
244 (native-inputs
245 `(("unzip" ,unzip)
246 ("python-cython" ,python-cython)
247 ("python-pytest" ,python-pytest)
248 ("python-pytest-cov" ,python-pytest-cov)
249 ("python-pytest-runner" ,python-pytest-runner)))
250 (home-page "https://github.com/penguinolog/logwrap")
251 (synopsis "Decorator for logging function arguments")
252 (description "This package provides a decorator to log function arguments
253 and function call return values in a human-readable way.")
254 (license license:asl2.0)))
255
256 (define-public python2-shapely
257 (package-with-python2 python-shapely))
258
259 (define-public python-clyent
260 (package
261 (name "python-clyent")
262 (version "1.2.1")
263 (source
264 (origin
265 (method url-fetch)
266 (uri (pypi-uri "clyent" version))
267 (sha256
268 (base32
269 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
270 (build-system python-build-system)
271 (native-inputs
272 `(("python-mock" ,python-mock)))
273 (home-page "https://github.com/binstar/clyent")
274 (synopsis "Command line client library")
275 (description "Clyent is a Python command line utiliy library. It is used
276 by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
277 (license license:bsd-3)))
278
279 (define-public python2-clyent
280 (package-with-python2 python-clyent))
281
282 (define-public python-babel
283 (package
284 (name "python-babel")
285 (version "2.6.0")
286 (source
287 (origin
288 (method url-fetch)
289 (uri (pypi-uri "Babel" version))
290 (sha256
291 (base32
292 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))
293 (build-system python-build-system)
294 (native-inputs
295 `(("python-freezegun" ,python-freezegun)
296 ("python-pytest" ,python-pytest)))
297 (propagated-inputs
298 `(("python-pytz" ,python-pytz)))
299 (arguments
300 `(#:phases (modify-phases %standard-phases
301 (replace 'check
302 (lambda _ (invoke "pytest" "-vv"))))))
303 (home-page "http://babel.pocoo.org/")
304 (synopsis
305 "Tools for internationalizing Python applications")
306 (description
307 "Babel is composed of two major parts:
308 - tools to build and work with gettext message catalogs
309 - a Python interface to the CLDR (Common Locale Data Repository), providing
310 access to various locale display names, localized number and date formatting,
311 etc. ")
312 (license license:bsd-3)))
313
314 (define-public python2-babel
315 (package-with-python2 python-babel))
316
317 (define-public python2-backport-ssl-match-hostname
318 (package
319 (name "python2-backport-ssl-match-hostname")
320 (version "3.5.0.1")
321 (source
322 (origin
323 (method url-fetch)
324 (uri (string-append
325 "https://pypi.python.org/packages/source/b/"
326 "backports.ssl_match_hostname/backports.ssl_match_hostname-"
327 version ".tar.gz"))
328 (sha256
329 (base32
330 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
331 (build-system python-build-system)
332 (arguments
333 `(#:python ,python-2
334 #:tests? #f)) ; no test target
335 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
336 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
337 (description
338 "This backport brings the ssl.match_hostname() function to users of
339 earlier versions of Python. The function checks the hostname in the
340 certificate returned by the server to which a connection has been established,
341 and verifies that it matches the intended target hostname.")
342 (license license:psfl)))
343
344 (define-public python-hdf4
345 (package
346 (name "python-hdf4")
347 (version "0.9")
348 (source
349 (origin
350 (method url-fetch)
351 (uri (pypi-uri name version))
352 (sha256
353 (base32
354 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
355 (build-system python-build-system)
356 (native-inputs `(("nose" ,python-nose)))
357 (propagated-inputs `(("numpy" ,python-numpy)))
358 (inputs
359 `(("hdf4" ,hdf4)
360 ("libjpeg" ,libjpeg)
361 ("zlib" ,zlib)))
362 (arguments
363 `(#:phases
364 (modify-phases %standard-phases
365 (replace 'check
366 (lambda _
367 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
368 ;; on to import numpy. Somehow this works on their CI system.
369 ;; Let's just manage PYTHONPATH here instead.
370 (substitute* "runexamples.sh"
371 (("export PYTHONPATH=.*") ""))
372 (setenv "PYTHONPATH"
373 (string-append (getcwd) ":"
374 (getenv "PYTHONPATH")))
375 (invoke "./runexamples.sh")
376 (invoke "nosetests" "-v"))))))
377 (home-page "https://github.com/fhs/python-hdf4")
378 (synopsis "Python interface to the NCSA HDF4 library")
379 (description
380 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
381 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
382 NetCDF files can also be read and modified. Python-HDF4 is a fork of
383 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
384 (license license:expat)))
385
386 (define-public python2-hdf4
387 (package-with-python2 python-hdf4))
388
389 (define-public python-h5py
390 (package
391 (name "python-h5py")
392 (version "2.8.0")
393 (source
394 (origin
395 (method url-fetch)
396 (uri (pypi-uri "h5py" version))
397 (sha256
398 (base32
399 "0mdr6wrq02ac93m1aqx9kad0ppfzmm4imlxqgyy1x4l7hmdcc9p6"))))
400 (build-system python-build-system)
401 (arguments
402 `(#:tests? #f ; no test target
403 #:phases
404 (modify-phases %standard-phases
405 (add-after 'unpack 'fix-hdf5-paths
406 (lambda* (#:key inputs #:allow-other-keys)
407 (let ((prefix (assoc-ref inputs "hdf5")))
408 (substitute* "setup_build.py"
409 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
410 (string-append "['" prefix "/lib" "']"))
411 (("'/opt/local/include', '/usr/local/include'")
412 (string-append "'" prefix "/include" "'")))
413 (substitute* "setup_configure.py"
414 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
415 (string-append "['" prefix "/lib" "']")))
416 #t))))))
417 (propagated-inputs
418 `(("python-six" ,python-six)
419 ("python-numpy" ,python-numpy)))
420 (inputs
421 `(("hdf5" ,hdf5)))
422 (native-inputs
423 `(("python-cython" ,python-cython)
424 ("python-pkgconfig" ,python-pkgconfig)))
425 (home-page "http://www.h5py.org/")
426 (synopsis "Read and write HDF5 files from Python")
427 (description
428 "The h5py package provides both a high- and low-level interface to the
429 HDF5 library from Python. The low-level interface is intended to be a
430 complete wrapping of the HDF5 API, while the high-level component supports
431 access to HDF5 files, datasets and groups using established Python and NumPy
432 concepts.")
433 (license license:bsd-3)))
434
435 (define-public python2-h5py
436 (package-with-python2 python-h5py))
437
438 (define-public python-sh
439 (package
440 (name "python-sh")
441 (version "1.12.14")
442 (source
443 (origin
444 (method url-fetch)
445 (uri (pypi-uri "sh" version))
446 (sha256
447 (base32
448 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
449 (build-system python-build-system)
450 (home-page "https://github.com/amoffat/sh")
451 (synopsis "Python subprocess replacement")
452 (description "This package provides a replacement for Python's
453 @code{subprocess} feature.")
454 (license license:expat)))
455
456 (define-public python-cftime
457 (package
458 (name "python-cftime")
459 (version "1.0.3.4")
460 (source
461 (origin
462 (method url-fetch)
463 (uri (pypi-uri "cftime" version))
464 (sha256
465 (base32
466 "0362dhxbzk593walyjz30dll6y2y79wialik647cbwdsf3ad0x6x"))))
467 (build-system python-build-system)
468 (propagated-inputs
469 `(("python-numpy" ,python-numpy)))
470 (native-inputs
471 `(("python-coveralls" ,python-coveralls)
472 ("python-cython" ,python-cython)
473 ("python-pytest-cov" ,python-pytest-cov)))
474 (home-page "https://github.com/Unidata/cftime")
475 (synopsis "Library for time handling")
476 (description
477 "This package provides time-handling functionality that used to be part
478 of the netcdf4 package before.")
479 ;; This package claims to include code under the GPLv3 but is released
480 ;; under ISC.
481 (license (list license:isc license:gpl3+))))
482
483 (define-public python-netcdf4
484 (package
485 (name "python-netcdf4")
486 (version "1.4.2")
487 (source
488 (origin
489 (method url-fetch)
490 (uri (pypi-uri "netCDF4" version))
491 (sha256
492 (base32
493 "0c0sklgrmv15ygliin8qq0hp7vanmbi74m6zpi0r1ksr0hssyd5r"))))
494 (build-system python-build-system)
495 (arguments
496 '(#:phases
497 (modify-phases %standard-phases
498 (add-after 'unpack 'configure-locations
499 (lambda* (#:key inputs #:allow-other-keys)
500 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
501 #t)))))
502 (native-inputs
503 `(("python-cython" ,python-cython)))
504 (propagated-inputs
505 `(("python-numpy" ,python-numpy)
506 ("python-cftime" ,python-cftime)))
507 (inputs
508 `(("netcdf" ,netcdf)
509 ("hdf4" ,hdf4)
510 ("hdf5" ,hdf5)))
511 (home-page "https://github.com/Unidata/netcdf4-python")
512 (synopsis "Python/numpy interface to the netCDF library")
513 (description "Netcdf4-python is a Python interface to the netCDF C
514 library. netCDF version 4 has many features not found in earlier
515 versions of the library and is implemented on top of HDF5. This module
516 can read and write files in both the new netCDF 4 and the old netCDF 3
517 format, and can create files that are readable by HDF5 clients. The
518 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
519 to users of that module.")
520 ;; The software is mainly ISC, but includes some files covered
521 ;; by the Expat license.
522 (license (list license:isc license:expat))))
523
524 (define-public python2-netcdf4
525 (package-with-python2 python-netcdf4))
526
527 (define-public python-lockfile
528 (package
529 (name "python-lockfile")
530 (version "0.12.2")
531 (source
532 (origin
533 (method url-fetch)
534 (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/"
535 "lockfile-" version ".tar.gz"))
536 (sha256
537 (base32
538 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
539 (build-system python-build-system)
540 (arguments '(#:test-target "check"))
541 (native-inputs
542 `(("python-pbr" ,python-pbr)))
543 (home-page "https://launchpad.net/pylockfile")
544 (synopsis "Platform-independent file locking module")
545 (description
546 "The lockfile package exports a LockFile class which provides a simple
547 API for locking files.")
548 (license license:expat)))
549
550 (define-public python2-lockfile
551 (package-with-python2 python-lockfile))
552
553 (define-public python-semantic-version
554 (package
555 (name "python-semantic-version")
556 (version "2.6.0")
557 (source
558 (origin
559 (method url-fetch)
560 (uri (pypi-uri "semantic_version" version))
561 (sha256
562 (base32
563 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
564 (build-system python-build-system)
565 (arguments
566 `(#:tests? #f)) ; PyPI tarball lacks tests
567 (home-page "https://github.com/rbarrois/python-semanticversion")
568 (synopsis "Semantic versioning module for Python")
569 (description
570 "The @code{semantic_version} class is a small library for handling
571 @uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
572
573 It can compare versions, generate a new version that represents a bump in one of
574 the version levels, and check whether any given string is a proper semantic
575 version identifier.")
576 (license license:bsd-3)))
577
578 (define-public python2-semantic-version
579 (package-with-python2 python-semantic-version))
580
581 (define-public python-serpent
582 (package
583 (name "python-serpent")
584 (version "1.27")
585 (source
586 (origin
587 (method url-fetch)
588 (uri (pypi-uri "serpent" version))
589 (sha256
590 (base32
591 "04p9dsrm5pv8vhk3flvih55kgvlzpi38hlaykdiakddmgwqw93bg"))))
592 (build-system python-build-system)
593 (home-page "https://github.com/irmen/Serpent")
594 (synopsis "Serializer for literal Python expressions")
595 (description
596 "Serpent provides ast.literal_eval() compatible object tree
597 serialization. It serializes an object tree into bytes (utf-8 encoded string)
598 that can be decoded and then passed as-is to ast.literal_eval() to rebuild it
599 as the original object tree. As such it is safe to send serpent data to other
600 machines over the network for instance (because only safe literals are
601 encoded).")
602 (license license:expat)))
603
604 (define-public python-setuptools
605 (package
606 (name "python-setuptools")
607 (version "40.0.0")
608 (source
609 (origin
610 (method url-fetch)
611 (uri (pypi-uri "setuptools" version ".zip"))
612 (sha256
613 (base32
614 "0pq116lr14gnc62v76nk0npkm6krb2mpp7p9ab369zgv4n7dnah1"))
615 (modules '((guix build utils)))
616 (snippet
617 '(begin
618 ;; Remove included binaries which are used to build self-extracting
619 ;; installers for Windows.
620 ;; TODO: Find some way to build them ourself so we can include them.
621 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
622 #t))))
623 (build-system python-build-system)
624 ;; FIXME: Tests require pytest, which itself relies on setuptools.
625 ;; One could bootstrap with an internal untested setuptools.
626 (arguments
627 `(#:tests? #f))
628 (home-page "https://pypi.python.org/pypi/setuptools")
629 (synopsis
630 "Library designed to facilitate packaging Python projects")
631 (description
632 "Setuptools is a fully-featured, stable library designed to facilitate
633 packaging Python projects, where packaging includes:
634 Python package and module definitions,
635 distribution package metadata,
636 test hooks,
637 project installation,
638 platform-specific details,
639 Python 3 support.")
640 ;; TODO: setuptools now bundles the following libraries:
641 ;; packaging, pyparsing, six and appdirs. How to unbundle?
642 (license (list license:psfl ; setuptools itself
643 license:expat ; six, appdirs, pyparsing
644 license:asl2.0 ; packaging is dual ASL2/BSD-2
645 license:bsd-2))))
646
647 (define-public python2-setuptools
648 (package-with-python2 python-setuptools))
649
650 (define-public python-uniseg
651 (package
652 (name "python-uniseg")
653 (version "0.7.1")
654 (source
655 (origin
656 (method url-fetch)
657 (uri (pypi-uri "uniseg" version ".zip"))
658 (sha256
659 (base32
660 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
661 (build-system python-build-system)
662 (arguments
663 '(#:tests? #f)) ; The test suite requires network access.
664 (native-inputs
665 `(("unzip" ,unzip)))
666 (home-page
667 "https://bitbucket.org/emptypage/uniseg-python")
668 (synopsis
669 "Python library to determine Unicode text segmentations")
670 (description
671 "Uniseg is a Python package used to determine Unicode text segmentations.
672 Supported segmentations include:
673 @enumerate
674 @item @dfn{Code point} (any value in the Unicode codespace)
675 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
676 multiple Unicode code points, e.g. \"G\" + acute-accent)
677 @item Word break
678 @item Sentence break
679 @item Line break
680 @end enumerate")
681 (license license:expat)))
682
683 (define-public python2-uniseg
684 (package-with-python2 python-uniseg))
685
686 (define-public python-humanfriendly
687 (package
688 (name "python-humanfriendly")
689 (version "4.4.1")
690 (source
691 (origin
692 (method url-fetch)
693 (uri (pypi-uri "humanfriendly" version))
694 (sha256
695 (base32
696 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
697 (build-system python-build-system)
698 (arguments
699 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
700 #:tests? #f))
701 (propagated-inputs
702 `(("python-monotonic" ,python-monotonic)))
703 (home-page "https://humanfriendly.readthedocs.io")
704 (synopsis "Human-friendly input and output in Python")
705 (description
706 "The functions and classes in @code{humanfriendly} can be used to make
707 text interfaces more user-friendly. It includes tools to parse and format
708 numbers, file sizes, and timespans, timers for long-running operations, menus
709 to allow the user to choose from a list of options, and terminal interaction
710 helpers.")
711 (license license:expat)))
712
713 (define-public python2-humanfriendly
714 (package-with-python2 python-humanfriendly))
715
716 (define-public python-capturer
717 (package
718 (name "python-capturer")
719 (version "2.4")
720 (source
721 (origin
722 (method url-fetch)
723 (uri (pypi-uri "capturer" version))
724 (sha256
725 (base32
726 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
727 (build-system python-build-system)
728 (arguments
729 `(#:tests? #f))
730 (propagated-inputs
731 `(("python-humanfriendly" ,python-humanfriendly)))
732 (home-page "https://capturer.readthedocs.io")
733 (synopsis "Capture stdout and stderr streams of the current process")
734 (description
735 "The capturer package makes it easy to capture the stdout and stderr
736 streams of the current process and subprocesses. Output can be relayed
737 to the terminal in real time but is also available to the Python program
738 for additional processing.")
739 (license license:expat)))
740
741 (define-public python2-capturer
742 (package-with-python2 python-capturer))
743
744 (define-public python-case
745 (package
746 (name "python-case")
747 (version "1.5.3")
748 (source
749 (origin
750 (method url-fetch)
751 (uri (pypi-uri "case" version))
752 (sha256
753 (base32
754 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
755 (build-system python-build-system)
756 (propagated-inputs
757 `(("python-mock" ,python-mock)
758 ("python-nose" ,python-nose)
759 ("python-six" ,python-six)
760 ("python-unittest2" ,python-unittest2)))
761 (native-inputs
762 `(("python-coverage" ,python-coverage)))
763 (home-page "https://github.com/celery/case")
764 (synopsis "Unittest utilities and convenience methods")
765 (description
766 "The @code{case} package provides utilities on top of unittest, including
767 some helpful Python 2 compatibility convenience methods.")
768 (license license:bsd-3)))
769
770 (define-public python-verboselogs
771 (package
772 (name "python-verboselogs")
773 (version "1.7")
774 (source
775 (origin
776 (method url-fetch)
777 (uri (pypi-uri "verboselogs" version))
778 (sha256
779 (base32
780 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
781 (build-system python-build-system)
782 (native-inputs
783 `(("python-mock" ,python-mock)
784 ("python-astroid" ,python-astroid)
785 ("python-pylint" ,python-pylint)))
786 (home-page "https://verboselogs.readthedocs.io")
787 (synopsis "Verbose logging level for Python's logging module")
788 (description
789 "The @code{verboselogs} package extends Python's @code{logging} module to
790 add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
791 (license license:expat)))
792
793 (define-public python2-verboselogs
794 (package-with-python2 python-verboselogs))
795
796 (define-public python-coloredlogs
797 (package
798 (name "python-coloredlogs")
799 (version "7.3")
800 (source
801 (origin
802 (method url-fetch)
803 (uri (pypi-uri "coloredlogs" version))
804 (sha256
805 (base32
806 "1blcann6dyg5dhps9pg12rn0q0rjrlajpmmil0gy0j4cbvnl2il9"))))
807 (build-system python-build-system)
808 (arguments
809 `(;Tests require some updated modules
810 #:tests? #f))
811 (propagated-inputs
812 `(("python-capturer" ,python-capturer)))
813 (home-page "https://coloredlogs.readthedocs.io")
814 (synopsis "Colored stream handler for Python's logging module")
815 (description
816 "The @code{coloredlogs} package enables colored terminal output for
817 Python's logging module. The @code{ColoredFormatter} class inherits from
818 @code{logging.Formatter} and uses ANSI escape sequences to render your logging
819 messages in color.")
820 (license license:expat)))
821
822 (define-public python2-coloredlogs
823 (package-with-python2 python-coloredlogs))
824
825 (define-public python-eventlet
826 (package
827 (name "python-eventlet")
828 (version "0.20.1")
829 (source
830 (origin
831 (method url-fetch)
832 (uri (pypi-uri "eventlet" version))
833 (sha256
834 (base32
835 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
836 (build-system python-build-system)
837 (propagated-inputs
838 `(("python-greenlet" ,python-greenlet)))
839 (arguments
840 ;; TODO: Requires unpackaged 'enum-compat'.
841 '(#:tests? #f))
842 (home-page "http://eventlet.net")
843 (synopsis "Concurrent networking library for Python")
844 (description
845 "Eventlet is a concurrent networking library for Python that
846 allows you to change how you run your code, not how you write it.
847 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
848 Coroutines ensure that the developer uses a blocking style of programming
849 that is similar to threading, but provide the benefits of non-blocking I/O.
850 The event dispatch is implicit, which means you can easily use @code{Eventlet}
851 from the Python interpreter, or as a small part of a larger application.")
852 (license license:expat)))
853
854 (define-public python2-eventlet
855 (let ((base (package-with-python2
856 (strip-python2-variant python-eventlet))))
857 (package (inherit base)
858 (propagated-inputs
859 `(("python2-enum34" ,python2-enum34)
860 ,@(package-propagated-inputs base))))))
861
862 (define-public python-six
863 (package
864 (name "python-six")
865 (version "1.11.0")
866 (source
867 (origin
868 (method url-fetch)
869 (uri (pypi-uri "six" version))
870 (sha256
871 (base32
872 "1scqzwc51c875z23phj48gircqjgnn3af8zy2izjwmnlxrxsgs3h"))))
873 (build-system python-build-system)
874 (arguments
875 `(#:phases
876 (modify-phases %standard-phases
877 (replace 'check
878 (lambda _
879 (invoke "py.test" "-v"))))))
880 (native-inputs
881 `(("python-py" ,python-py)
882 ("python-pytest" ,python-pytest-bootstrap)))
883 (home-page "https://pypi.python.org/pypi/six/")
884 (synopsis "Python 2 and 3 compatibility utilities")
885 (description
886 "Six is a Python 2 and 3 compatibility library. It provides utility
887 functions for smoothing over the differences between the Python versions with
888 the goal of writing Python code that is compatible on both Python versions.
889 Six supports every Python version since 2.5. It is contained in only one
890 Python file, so it can be easily copied into your project.")
891 (license license:x11)))
892
893 (define-public python2-six
894 (package-with-python2 python-six))
895
896 (define-public python-six-bootstrap
897 (package
898 (inherit python-six)
899 (name "python-six-bootstrap")
900 (native-inputs `())
901 (arguments `(#:tests? #f))))
902
903 (define-public python2-six-bootstrap
904 (package-with-python2 python-six-bootstrap))
905
906 (define-public python-schedule
907 (package
908 (name "python-schedule")
909 (version "0.4.3")
910 (source
911 (origin
912 (method url-fetch)
913 (uri (pypi-uri "schedule" version))
914 (sha256
915 (base32
916 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
917 (build-system python-build-system)
918 (native-inputs
919 `(("python-pytest" ,python-pytest)
920 ("python-mock" ,python-mock)))
921 (home-page "https://github.com/dbader/schedule")
922 (synopsis "Schedule periodic function calls in Python")
923 (description
924 "Schedule is an in-process scheduler for periodic jobs that uses the
925 builder pattern for configuration. Schedule lets you run Python functions (or
926 any other callable) periodically at pre-determined intervals using a simple,
927 human-friendly syntax.")
928 (license license:expat)))
929
930 (define-public python2-schedule
931 (package-with-python2 python-schedule))
932
933 (define-public python-pandas
934 (package
935 (name "python-pandas")
936 (version "0.23.4")
937 (source
938 (origin
939 (method url-fetch)
940 (uri (pypi-uri "pandas" version))
941 (sha256
942 (base32 "1x54pd7hr3y7qahx6b5bf2wzj54xvl8r3s1h4pl254pnmi3wl92v"))))
943 (build-system python-build-system)
944 (arguments
945 `(#:modules ((guix build utils)
946 (guix build python-build-system)
947 (ice-9 ftw)
948 (srfi srfi-26))
949 #:phases (modify-phases %standard-phases
950 (replace 'check
951 (lambda _
952 (let ((build-directory
953 (string-append
954 (getcwd) "/build/"
955 (car (scandir "build"
956 (cut string-prefix? "lib." <>))))))
957 ;; Disable the "strict data files" option which causes
958 ;; the build to error out if required data files are not
959 ;; available (as is the case with PyPI archives).
960 (substitute* "setup.cfg"
961 (("addopts = --strict-data-files") "addopts = "))
962 (with-directory-excursion build-directory
963 ;; Delete tests that require "moto" which is not yet in Guix.
964 (for-each delete-file
965 '("pandas/tests/io/conftest.py"
966 "pandas/tests/io/json/test_compression.py"
967 "pandas/tests/io/parser/test_network.py"
968 "pandas/tests/io/test_excel.py"
969 "pandas/tests/io/test_parquet.py"))
970 (invoke "pytest" "-vv" "pandas" "--skip-slow"
971 "--skip-network" "-k"
972 ;; XXX: Due to the deleted tests above.
973 "not test_read_s3_jsonl"))))))))
974 (propagated-inputs
975 `(("python-numpy" ,python-numpy)
976 ("python-pytz" ,python-pytz)
977 ("python-dateutil" ,python-dateutil)))
978 (native-inputs
979 `(("python-cython" ,python-cython)
980 ("python-beautifulsoup4" ,python-beautifulsoup4)
981 ("python-lxml" ,python-lxml)
982 ("python-html5lib" ,python-html5lib)
983 ("python-nose" ,python-nose)
984 ("python-pytest" ,python-pytest)))
985 (home-page "https://pandas.pydata.org")
986 (synopsis "Data structures for data analysis, time series, and statistics")
987 (description
988 "Pandas is a Python package providing fast, flexible, and expressive data
989 structures designed to make working with structured (tabular,
990 multidimensional, potentially heterogeneous) and time series data both easy
991 and intuitive. It aims to be the fundamental high-level building block for
992 doing practical, real world data analysis in Python.")
993 (license license:bsd-3)))
994
995 (define-public python2-pandas
996 (package-with-python2 python-pandas))
997
998 (define-public python2-mechanize
999 (package
1000 (name "python2-mechanize")
1001 (version "0.2.5")
1002 (source
1003 (origin
1004 (method url-fetch)
1005 (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-"
1006 version ".tar.gz"))
1007 (sha256
1008 (base32
1009 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1010 (build-system python-build-system)
1011 (arguments
1012 `(#:python ,python-2 ; apparently incompatible with Python 3
1013 #:tests? #f))
1014 ;; test fails with message
1015 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1016 ;; (python-3.3.2) or
1017 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1018 ;; (python-2.7.5).
1019 ;; The source code is from March 2011 and probably not up-to-date
1020 ;; with respect to python unit tests.
1021 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1022 (synopsis
1023 "Stateful programmatic web browsing in Python")
1024 (description
1025 "Mechanize implements stateful programmatic web browsing in Python,
1026 after Andy Lester’s Perl module WWW::Mechanize.")
1027 (license (license:non-copyleft
1028 "file://COPYING"
1029 "See COPYING in the distribution."))))
1030
1031
1032 (define-public python-simplejson
1033 (package
1034 (name "python-simplejson")
1035 (version "3.14.0")
1036 (source
1037 (origin
1038 (method url-fetch)
1039 (uri (pypi-uri "simplejson" version))
1040 (sha256
1041 (base32
1042 "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy"))))
1043 (build-system python-build-system)
1044 (home-page "http://simplejson.readthedocs.org/en/latest/")
1045 (synopsis
1046 "Json library for Python")
1047 (description
1048 "JSON (JavaScript Object Notation) is a subset of JavaScript
1049 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1050 format.
1051
1052 Simplejson exposes an API familiar to users of the standard library marshal
1053 and pickle modules. It is the externally maintained version of the json
1054 library contained in Python 2.6, but maintains compatibility with Python 2.5
1055 and (currently) has significant performance advantages, even without using
1056 the optional C extension for speedups. Simplejson is also supported on
1057 Python 3.3+.")
1058 (license license:x11)))
1059
1060 (define-public python2-simplejson
1061 (package-with-python2 python-simplejson))
1062
1063
1064 (define-public python-pyicu
1065 (package
1066 (name "python-pyicu")
1067 (version "2.2")
1068 (source
1069 (origin
1070 (method url-fetch)
1071 (uri (pypi-uri "PyICU" version))
1072 (sha256
1073 (base32
1074 "0wq9y5fi1ighgf5aws9nr87vi1w44p7q1k83rx2y3qj5d2xyhspa"))))
1075 (build-system python-build-system)
1076 (inputs
1077 `(("icu4c" ,icu4c)))
1078 (native-inputs
1079 `(("python-pytest" ,python-pytest)
1080 ("python-six" ,python-six)))
1081 (home-page "https://github.com/ovalhub/pyicu")
1082 (synopsis "Python extension wrapping the ICU C++ API")
1083 (description
1084 "PyICU is a python extension wrapping the ICU C++ API.")
1085 (properties `((python2-variant . ,(delay python2-pyicu))))
1086 (license license:x11)))
1087
1088 (define-public python2-pyicu
1089 (let ((base (package-with-python2
1090 (strip-python2-variant python-pyicu))))
1091 (package
1092 (inherit base)
1093 (arguments
1094 `(,@(package-arguments base)
1095 #:phases
1096 (modify-phases %standard-phases
1097 (add-before 'check 'delete-failing-test
1098 (λ _
1099 ;; XXX: This fails due to Unicode issues unique to Python 2,
1100 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1101 (delete-file "test/test_Script.py")
1102 #t))))))))
1103
1104 (define-public python2-dogtail
1105 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1106 ;; spaces in indentation" with Python 3.
1107 (package
1108 (name "python2-dogtail")
1109 (version "0.9.9")
1110 (source (origin
1111 (method url-fetch)
1112 (uri (pypi-uri "dogtail" version))
1113 (sha256
1114 (base32
1115 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1116 (build-system python-build-system)
1117 (arguments `(#:python ,python-2
1118 #:tests? #f)) ; invalid command "test"
1119 ;; Currently no offical homepage.
1120 (home-page "https://pypi.python.org/pypi/dogtail/")
1121 (synopsis "GUI test tool and automation framework written in Python")
1122 (description
1123 "Dogtail is a GUI test tool and automation framework written in Python.
1124 It uses Accessibility (a11y) technologies to communicate with desktop
1125 applications. dogtail scripts are written in Python and executed like any
1126 other Python program.")
1127 (license license:gpl2+)))
1128
1129 (define-public python-empy
1130 (package
1131 (name "python-empy")
1132 (version "3.3")
1133 (source (origin
1134 (method url-fetch)
1135 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1136 version ".tar.gz"))
1137 (sha256
1138 (base32
1139 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1140 (build-system python-build-system)
1141 (arguments
1142 `(#:tests? #f)) ;python2 only
1143 (home-page "http://www.alcyone.com/software/empy/")
1144 (synopsis "Templating system for Python")
1145 (description
1146 "EmPy is a system for embedding Python expressions and statements in
1147 template text; it takes an EmPy source file, processes it, and produces
1148 output. This is accomplished via expansions, which are special signals to the
1149 EmPy system and are set off by a special prefix (by default the at sign, @@).
1150 EmPy can expand arbitrary Python expressions and statements in this way, as
1151 well as a variety of special forms. Textual data not explicitly delimited in
1152 this way is sent unaffected to the output, allowing Python to be used in
1153 effect as a markup language. Also supported are callbacks via hooks,
1154 recording and playback via diversions, and dynamic, chainable filters. The
1155 system is highly configurable via command line options and embedded
1156 commands.")
1157 (license license:lgpl2.1+)))
1158
1159 (define-public python2-empy
1160 (package-with-python2 python-empy))
1161
1162 (define-public python2-element-tree
1163 (package
1164 (name "python2-element-tree")
1165 (version "1.2.6")
1166 (source (origin
1167 (method url-fetch)
1168 (uri (string-append
1169 "http://effbot.org/media/downloads/elementtree-"
1170 version "-20050316.tar.gz"))
1171 (sha256
1172 (base32
1173 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1174 (build-system python-build-system)
1175 (arguments
1176 `(#:python ,python-2 ; seems to be part of Python 3
1177 #:tests? #f)) ; no 'test' sub-command
1178 (synopsis "Toolkit for XML processing in Python")
1179 (description
1180 "ElementTree is a Python library supporting lightweight XML processing.")
1181 (home-page "http://effbot.org/zone/element-index.htm")
1182 (license (license:x11-style
1183 "http://docs.python.org/2/license.html"
1184 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1185
1186 (define-public python2-pybugz
1187 (package
1188 (name "python2-pybugz")
1189 (version "0.6.11")
1190 (source (origin
1191 (method url-fetch)
1192 (uri (string-append
1193 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1194 version ".tar.gz"))
1195 (sha256
1196 (base32
1197 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1198 (patches (search-patches "pybugz-stty.patch"
1199 "pybugz-encode-error.patch"))))
1200 (build-system python-build-system)
1201 (arguments
1202 `(#:python ,python-2 ; SyntaxError with Python 3
1203 #:tests? #f)) ; no 'test' sub-command
1204 (propagated-inputs
1205 `(("element-tree" ,python2-element-tree)))
1206 (synopsis "Python and command-line interface to Bugzilla")
1207 (description
1208 "PyBugz is a Python library and command-line tool to query the Bugzilla
1209 bug tracking system. It is meant as an aid to speed up interaction with the
1210 bug tracker.")
1211 (home-page "http://www.liquidx.net/pybugz/")
1212 (license license:gpl2)))
1213
1214 (define-public python2-enum
1215 (package
1216 (name "python2-enum")
1217 (version "0.4.6")
1218 (source (origin
1219 (method url-fetch)
1220 (uri (pypi-uri "enum" version))
1221 (sha256
1222 (base32
1223 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1224 (build-system python-build-system)
1225 (arguments
1226 `(#:python ,python-2))
1227 (home-page "http://pypi.python.org/pypi/enum/")
1228 (synopsis "Robust enumerated type support in Python")
1229 (description
1230 "This provides a module for robust enumerations in Python. It has
1231 been superseded by the Python standard library and is provided only for
1232 compatibility.")
1233 ;; Choice of either license.
1234 (license (list license:gpl3+ license:psfl))))
1235
1236 (define-public python-enum34
1237 (package
1238 (name "python-enum34")
1239 (version "1.1.6")
1240 (source
1241 (origin
1242 (method url-fetch)
1243 (uri (pypi-uri "enum34" version))
1244 (sha256
1245 (base32
1246 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1247 (build-system python-build-system)
1248 (home-page "https://pypi.python.org/pypi/enum34")
1249 (synopsis "Backported Python 3.4 Enum")
1250 (description
1251 "Enum34 is the new Python stdlib enum module available in Python 3.4
1252 backported for previous versions of Python from 2.4 to 3.3.")
1253 (license license:bsd-3)))
1254
1255 (define-public python2-enum34
1256 (package-with-python2 python-enum34))
1257
1258 (define-public python-parse-type
1259 (package
1260 (name "python-parse-type")
1261 (version "0.4.2")
1262 (source
1263 (origin
1264 (method url-fetch)
1265 (uri (pypi-uri "parse_type" version))
1266 (sha256
1267 (base32
1268 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1269 (build-system python-build-system)
1270 (propagated-inputs
1271 `(("python-six" ,python-six)
1272 ("python-parse" ,python-parse)))
1273 (native-inputs
1274 `(("python-pytest" ,python-pytest)
1275 ("python-pytest-runner" ,python-pytest-runner)))
1276 (home-page "https://github.com/jenisys/parse_type")
1277 (synopsis "Extended parse module")
1278 (description
1279 "Parse_type extends the python parse module.")
1280 (properties
1281 `((python2-variant . ,(delay python2-parse-type))))
1282 (license license:bsd-3)))
1283
1284 (define-public python2-parse-type
1285 (let ((base (package-with-python2
1286 (strip-python2-variant python-parse-type))))
1287 (package (inherit base)
1288 (propagated-inputs
1289 `(("python2-enum34" ,python2-enum34)
1290 ,@(package-propagated-inputs base))))))
1291
1292 (define-public python-parse
1293 (package
1294 (name "python-parse")
1295 (version "1.8.4")
1296 (source
1297 (origin
1298 (method url-fetch)
1299 (uri (pypi-uri "parse" version))
1300 (sha256
1301 (base32
1302 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
1303 (build-system python-build-system)
1304 (arguments
1305 `(#:phases
1306 (modify-phases %standard-phases
1307 (replace 'check
1308 (lambda _ (invoke "python" "test_parse.py"))))))
1309 (home-page "https://github.com/r1chardj0n3s/parse")
1310 (synopsis "Parse strings")
1311 (description
1312 "Parse strings using a specification based on the Python @code{format()}
1313 syntax.")
1314 (license license:x11)))
1315
1316 (define-public python-polib
1317 (package
1318 (name "python-polib")
1319 (version "1.0.8")
1320 (source (origin
1321 (method url-fetch)
1322 (uri (pypi-uri "polib" version))
1323 (sha256
1324 (base32
1325 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1326 (build-system python-build-system)
1327 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1328 (synopsis "Manipulate, create and modify gettext files")
1329 (description "Polib can manipulate any gettext format (po, pot and mo)
1330 files. It can be used to create po files from scratch or to modify
1331 existing ones.")
1332 (license license:expat)))
1333
1334 (define-public python2-polib
1335 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1336 (package
1337 (inherit base)
1338 (arguments `(,@(package-arguments base)
1339 ;; Tests don't work with python2.
1340 #:tests? #f)))))
1341
1342 (define-public scons
1343 (package
1344 (name "scons")
1345 (version "3.0.1")
1346 (source (origin
1347 (method url-fetch)
1348 (uri (string-append "mirror://sourceforge/scons/scons/" version
1349 "/scons-" version ".tar.gz"))
1350 (sha256
1351 (base32
1352 "0wzid419mlwqw9llrg8gsx4nkzhqy16m4m40r0xnh6cwscw5wir4"))))
1353 (build-system python-build-system)
1354 (arguments
1355 `(#:use-setuptools? #f ; still relies on distutils
1356 #:tests? #f)) ; no 'python setup.py test' command
1357 (home-page "http://scons.org/")
1358 (synopsis "Software construction tool written in Python")
1359 (description
1360 "SCons is a software construction tool. Think of SCons as an improved,
1361 cross-platform substitute for the classic Make utility with integrated
1362 functionality similar to autoconf/automake and compiler caches such as ccache.
1363 In short, SCons is an easier, more reliable and faster way to build
1364 software.")
1365 (license license:x11)))
1366
1367 (define-public scons-python2
1368 (package
1369 (inherit (package-with-python2 scons))
1370 (name "scons-python2")))
1371
1372 (define-public python-extras
1373 (package
1374 (name "python-extras")
1375 (version "1.0.0")
1376 (source
1377 (origin
1378 (method url-fetch)
1379 (uri (pypi-uri "extras" version))
1380 (sha256
1381 (base32
1382 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1383 (build-system python-build-system)
1384 (arguments
1385 ;; FIXME: Circular dependency on testtools.
1386 '(#:tests? #f))
1387 (home-page "https://github.com/testing-cabal/extras")
1388 (synopsis "Useful extensions to the Python standard library")
1389 (description
1390 "Extras is a set of extensions to the Python standard library.")
1391 (license license:expat)))
1392
1393 (define-public python2-extras
1394 (package-with-python2 python-extras))
1395
1396 (define-public python-mimeparse
1397 (package
1398 (name "python-mimeparse")
1399 (version "1.6.0")
1400 (source
1401 (origin
1402 (method url-fetch)
1403 (uri (string-append
1404 "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
1405 version ".tar.gz"))
1406 (sha256
1407 (base32
1408 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
1409 (build-system python-build-system)
1410 (arguments
1411 '(#:phases
1412 (modify-phases %standard-phases
1413 (replace 'check
1414 (lambda _
1415 (invoke "./mimeparse_test.py"))))))
1416 (home-page
1417 "https://github.com/dbtsai/python-mimeparse")
1418 (synopsis "Python library for parsing MIME types")
1419 (description
1420 "Mimeparse provides basic functions for parsing MIME type names and
1421 matching them against a list of media-ranges.")
1422 (license license:expat)))
1423
1424 (define-public python2-mimeparse
1425 (package-with-python2 python-mimeparse))
1426
1427 (define-public python-miniboa
1428 (package
1429 (name "python-miniboa")
1430 (version "1.0.7")
1431 (source
1432 (origin
1433 (method url-fetch)
1434 (uri (pypi-uri "miniboa" version))
1435 (sha256
1436 (base32
1437 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
1438 (build-system python-build-system)
1439 (home-page "https://github.com/shmup/miniboa")
1440 (synopsis "Simple, single-threaded Telnet server")
1441 (description
1442 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
1443 server.")
1444 (license license:asl2.0)))
1445
1446 (define-public python2-miniboa
1447 (package-with-python2 python-miniboa))
1448
1449 (define-public python-pafy
1450 (package
1451 (name "python-pafy")
1452 (version "0.5.3.1")
1453 (source
1454 (origin
1455 (method url-fetch)
1456 (uri (pypi-uri "pafy" version))
1457 (sha256
1458 (base32
1459 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1460 (build-system python-build-system)
1461 (arguments
1462 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1463 (propagated-inputs
1464 ;; Youtube-dl is a python package which is imported in the file
1465 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1466 `(("youtube-dl" ,youtube-dl)))
1467 (home-page "https://np1.github.io/pafy/")
1468 (synopsis "Retrieve YouTube content and metadata")
1469 (description
1470 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1471 (license license:lgpl3+)))
1472
1473 (define-public python2-funcsigs
1474 (package
1475 (name "python2-funcsigs")
1476 (version "1.0.2")
1477 (source (origin
1478 (method url-fetch)
1479 (uri (pypi-uri "funcsigs" version))
1480 (sha256
1481 (base32
1482 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1483 (build-system python-build-system)
1484 (arguments
1485 `(#:python ,python-2))
1486 (native-inputs
1487 `(("python2-unittest2" ,python2-unittest2)))
1488 (home-page "http://funcsigs.readthedocs.org")
1489 (synopsis "Python function signatures from PEP362")
1490 (description
1491 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1492 (license license:asl2.0)))
1493
1494 (define-public python2-funcsigs-bootstrap
1495 (package
1496 (inherit python2-funcsigs)
1497 (name "python2-funcsigs-bootstrap")
1498 (native-inputs `())
1499 (arguments
1500 `(#:tests? #f
1501 ,@(package-arguments python2-funcsigs)))))
1502
1503 (define-public python-py
1504 (package
1505 (name "python-py")
1506 (version "1.5.4")
1507 (source
1508 (origin
1509 (method url-fetch)
1510 (uri (pypi-uri "py" version))
1511 (sha256
1512 (base32
1513 "1xxvwfn82457djf55f5n2c94699rfqnk43br8fif2r2q8gvrmm9z"))))
1514 (build-system python-build-system)
1515 (arguments
1516 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1517 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1518 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1519 ;; Is this module globally installed?"
1520 '(#:tests? #f))
1521 (native-inputs
1522 `(("python-setuptools-scm" ,python-setuptools-scm)))
1523 (home-page "https://github.com/pytest-dev/py")
1524 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1525 (description
1526 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1527 code introspection, and logging.")
1528 (license license:expat)))
1529
1530 (define-public python2-py
1531 (package-with-python2 python-py))
1532
1533 ;; Recent versions of python-fixtures and python-testrepository need
1534 ;; python-pbr for packaging, which itself needs these two packages for
1535 ;; testing.
1536 ;; To fix this circular dependency, we use a build of python-pbr, based on the
1537 ;; same source, just without any test dependencies and with tests disabled.
1538 ;; python-pbr-minmal is then used to package python-fixtures and
1539 ;; python-testrepository.
1540 ;; Strictly speaking we currently could remove the test-requirements from the
1541 ;; normal python-pbr package (and save this package) since test are disabled
1542 ;; there anyway. But this may change in future.
1543 (define-public python-pbr-minimal
1544 (package
1545 (name "python-pbr-minimal")
1546 (version "3.0.1")
1547 (source
1548 (origin
1549 (method url-fetch)
1550 (uri (pypi-uri "pbr" version))
1551 (sha256
1552 (base32
1553 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
1554 (build-system python-build-system)
1555 (arguments
1556 `(#:tests? #f))
1557 (home-page "http://docs.openstack.org/developer/pbr/")
1558 (synopsis "Minimal build of python-pbr used for bootstrapping")
1559 (description
1560 "Used only for bootstrapping python2-pbr, you should not need this.")
1561 (license license:asl2.0)))
1562
1563 (define-public python2-pbr-minimal
1564 (package-with-python2 python-pbr-minimal))
1565
1566 (define-public python-pbr
1567 (package
1568 (inherit python-pbr-minimal)
1569 (name "python-pbr")
1570 (arguments
1571 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1572 (propagated-inputs
1573 `(("git" ,git))) ;; pbr actually uses the "git" binary.
1574 (native-inputs
1575 `(("python-fixtures" ,python-fixtures-bootstrap)
1576 ;; discover, coverage, hacking, subunit
1577 ("python-mock" ,python-mock)
1578 ("python-six" ,python-six)
1579 ("python-sphinx" ,python-sphinx)
1580 ("python-testrepository" ,python-testrepository-bootstrap)
1581 ("python-testresources" ,python-testresources-bootstrap)
1582 ("python-testscenarios" ,python-testscenarios-bootstrap)
1583 ("python-testtools" ,python-testtools-bootstrap)
1584 ("python-virtualenv" ,python-virtualenv)))
1585 (synopsis "Enhance the default behavior of Python’s setuptools")
1586 (description
1587 "Python Build Reasonableness (PBR) is a library that injects some useful
1588 and sensible default behaviors into your setuptools run. It will set
1589 versions, process requirements files and generate AUTHORS and ChangeLog file
1590 from git information.
1591 ")))
1592
1593 (define-public python2-pbr
1594 (package-with-python2 python-pbr))
1595
1596 (define-public python-exif-read
1597 (package
1598 (name "python-exif-read")
1599 (version "2.1.2")
1600 (source (origin
1601 (method url-fetch)
1602 (uri (pypi-uri "ExifRead" version))
1603 (sha256
1604 (base32
1605 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
1606 (build-system python-build-system)
1607 (arguments `(#:tests? #f)) ; no tests
1608 (home-page "https://github.com/ianare/exif-py")
1609 (synopsis "Python library to extract EXIF data from image files")
1610 (description
1611 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1612 files.")
1613 (license license:bsd-3)))
1614
1615 (define-public python2-exif-read
1616 (package-with-python2 python-exif-read))
1617
1618 (define-public python-pyld
1619 (package
1620 (name "python-pyld")
1621 (version "1.0.3")
1622 (source (origin
1623 (method url-fetch)
1624 (uri (pypi-uri "PyLD" version))
1625 (sha256
1626 (base32
1627 "12i2g6xdj30k7xxcibg3sc5y76snwq8l6n8fy9lyi577kgy0h2pm"))))
1628 (build-system python-build-system)
1629 (home-page "https://github.com/digitalbazaar/pyld")
1630 (synopsis "Python implementation of the JSON-LD specification")
1631 (description
1632 "PyLD is an implementation of the JSON-LD specification.")
1633 (license license:bsd-3)))
1634
1635 (define-public python2-pyld
1636 (package-with-python2 python-pyld))
1637
1638 (define-public python-click
1639 (package
1640 (name "python-click")
1641 (version "6.7")
1642 (source
1643 (origin
1644 (method url-fetch)
1645 (uri (pypi-uri "click" version))
1646 (sha256
1647 (base32
1648 "02qkfpykbq35id8glfgwc38yc430427yd05z1wc5cnld8zgicmgi"))))
1649 (build-system python-build-system)
1650 (arguments
1651 `(;; The tests are fragile, depending on a specific version of pytest:
1652 ;; <https://github.com/pallets/click/issues/823>
1653 #:tests? #f
1654 #:phases
1655 (modify-phases %standard-phases
1656 (add-after 'unpack 'fix-paths
1657 (lambda* (#:key inputs #:allow-other-keys)
1658 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
1659 "cross-libc" "libc"))))
1660 (substitute* "click/_unicodefun.py"
1661 (("'locale'")
1662 (string-append "'" glibc "/bin/locale'"))))
1663 #t)))))
1664 (native-inputs
1665 `(("python-pytest" ,python-pytest)))
1666 (home-page "http://click.pocoo.org")
1667 (synopsis "Command line library for Python")
1668 (description
1669 "Click is a Python package for creating command line interfaces in a
1670 composable way with as little code as necessary. Its name stands for
1671 \"Command Line Interface Creation Kit\". It's highly configurable but comes
1672 with sensible defaults out of the box.")
1673 (license license:bsd-3)))
1674
1675 (define-public python2-click
1676 (package-with-python2 python-click))
1677
1678 (define-public python-wheel
1679 (package
1680 (name "python-wheel")
1681 (version "0.30.0a0")
1682 (source
1683 (origin
1684 (method url-fetch)
1685 (uri (pypi-uri "wheel" version))
1686 (sha256
1687 (base32
1688 "1nm6mn8isny0hr86rhbfrpfj867c0phf001xgsd69xfp9ady1wwq"))))
1689 (build-system python-build-system)
1690 (native-inputs
1691 `(("python-jsonschema" ,python-jsonschema)
1692 ("python-pytest-cov" ,python-pytest-cov)))
1693 (home-page "https://bitbucket.org/pypa/wheel/")
1694 (synopsis "Format for built Python packages")
1695 (description
1696 "A wheel is a ZIP-format archive with a specially formatted filename and
1697 the @code{.whl} extension. It is designed to contain all the files for a PEP
1698 376 compatible install in a way that is very close to the on-disk format. Many
1699 packages will be properly installed with only the @code{Unpack} step and the
1700 unpacked archive preserves enough information to @code{Spread} (copy data and
1701 scripts to their final locations) at any later time. Wheel files can be
1702 installed with a newer @code{pip} or with wheel's own command line utility.")
1703 (license license:expat)
1704 (properties `((python2-variant . ,(delay python2-wheel))))))
1705
1706 (define-public python2-wheel
1707 (let ((wheel (package-with-python2
1708 (strip-python2-variant python-wheel))))
1709 (package (inherit wheel)
1710 (native-inputs `(("python2-functools32" ,python2-functools32)
1711 ,@(package-native-inputs wheel))))))
1712
1713 (define-public python-vcversioner
1714 (package
1715 (name "python-vcversioner")
1716 (version "2.16.0.0")
1717 (source
1718 (origin
1719 (method url-fetch)
1720 (uri (pypi-uri "vcversioner" version))
1721 (sha256
1722 (base32
1723 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
1724 (build-system python-build-system)
1725 (synopsis "Python library for version number discovery")
1726 (description "Vcversioner is a Python library that inspects tagging
1727 information in a variety of version control systems in order to discover
1728 version numbers.")
1729 (home-page "https://github.com/habnabit/vcversioner")
1730 (license license:isc)))
1731
1732 (define-public python2-vcversioner
1733 (package-with-python2 python-vcversioner))
1734
1735 (define-public python-jsonschema
1736 (package
1737 (name "python-jsonschema")
1738 (version "2.6.0")
1739 (source (origin
1740 (method url-fetch)
1741 (uri
1742 (string-append
1743 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
1744 version ".tar.gz"))
1745 (sha256
1746 (base32
1747 "00kf3zmpp9ya4sydffpifn0j0mzm342a2vzh82p6r0vh10cg7xbg"))))
1748 (build-system python-build-system)
1749 (arguments
1750 '(#:phases
1751 (modify-phases %standard-phases
1752 (replace 'check (lambda _ (invoke "nosetests"))))))
1753 (native-inputs
1754 `(("python-nose" ,python-nose)
1755 ("python-vcversioner" ,python-vcversioner)))
1756 (home-page "https://github.com/Julian/jsonschema")
1757 (synopsis "Implementation of JSON Schema for Python")
1758 (description
1759 "Jsonschema is an implementation of JSON Schema for Python.")
1760 (license license:expat)
1761 (properties `((python2-variant . ,(delay python2-jsonschema))))))
1762
1763 (define-public python2-jsonschema
1764 (let ((jsonschema (package-with-python2
1765 (strip-python2-variant python-jsonschema))))
1766 (package (inherit jsonschema)
1767 (native-inputs
1768 `(("python2-mock" ,python2-mock)
1769 ,@(package-native-inputs jsonschema)))
1770 (propagated-inputs
1771 `(("python2-functools32" ,python2-functools32))))))
1772
1773 (define-public python-schema
1774 (package
1775 (name "python-schema")
1776 (version "0.6.6")
1777 (source
1778 (origin
1779 (method url-fetch)
1780 (uri (pypi-uri "schema" version))
1781 (sha256
1782 (base32
1783 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
1784 (build-system python-build-system)
1785 (native-inputs
1786 `(("python-pytest" ,python-pytest)))
1787 (home-page "https://github.com/keleshev/schema")
1788 (synopsis "Simple data validation library")
1789 (description
1790 "@code{python-schema} is a library for validating Python data
1791 structures, such as those obtained from config-files, forms, external
1792 services or command-line parsing, converted from JSON/YAML (or
1793 something else) to Python data-types.")
1794 (license license:psfl)))
1795
1796 (define-public python2-schema
1797 (package-with-python2 python-schema))
1798
1799 (define-public python-schema-0.5
1800 (package (inherit python-schema)
1801 (version "0.5.0")
1802 (source
1803 (origin
1804 (method url-fetch)
1805 (uri (pypi-uri "schema" version))
1806 (sha256
1807 (base32
1808 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
1809
1810 (define-public python2-schema-0.5
1811 (package-with-python2 python-schema-0.5))
1812
1813 (define-public python-kitchen
1814 (package
1815 (name "python-kitchen")
1816 (version "1.2.5")
1817 (source
1818 (origin
1819 (method url-fetch)
1820 (uri (pypi-uri "kitchen" version))
1821 (sha256
1822 (base32
1823 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
1824 (build-system python-build-system)
1825 (propagated-inputs
1826 `(("python-chardet" ,python-chardet)))
1827 (home-page "https://github.com/fedora-infra/kitchen")
1828 (synopsis "Python API for snippets")
1829 (description "@code{kitchen} module provides a python API for all sorts of
1830 little useful snippets of code that everybody ends up writing for their projects
1831 but never seem big enough to build an independent release. Use kitchen and stop
1832 cutting and pasting that code over and over.")
1833 (license (list license:lgpl2.1+
1834 ;; subprocess.py, test_subprocess.py,
1835 ;; kitchen/pycompat25/defaultdict.py:
1836 license:psfl))))
1837
1838 (define-public python2-kitchen
1839 (package-with-python2 python-kitchen))
1840
1841 (define-public python-unidecode
1842 (package
1843 (name "python-unidecode")
1844 (version "1.0.23")
1845 (source (origin
1846 (method url-fetch)
1847 (uri (pypi-uri "Unidecode" version))
1848 (sha256
1849 (base32
1850 "1ysjbr3nqfqj97h8zyj3v9pya413vkv7a1mzml80w37xx15kb1cb"))))
1851 (build-system python-build-system)
1852 (home-page "https://pypi.python.org/pypi/Unidecode")
1853 (synopsis "ASCII transliterations of Unicode text")
1854 (description
1855 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
1856 useful when integrating with legacy code that doesn't support Unicode, or for
1857 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
1858 machine identifiers from human-readable Unicode strings that should still be
1859 somewhat intelligible.")
1860 (license license:gpl2+)))
1861
1862 (define-public python2-unidecode
1863 (package-with-python2 python-unidecode))
1864
1865 (define-public python-pyjwt
1866 (package
1867 (name "python-pyjwt")
1868 (version "1.5.3")
1869 (source
1870 (origin
1871 (method url-fetch)
1872 (uri (pypi-uri "PyJWT" version))
1873 (sha256
1874 (base32
1875 "1rxsg14i33vm2i6lz0my628108c81k43v10n4h3p0gx62xdyf2sh"))
1876 (modules '((guix build utils)))
1877 (snippet
1878 '(begin
1879 (for-each delete-file-recursively
1880 (find-files "." "\\.pyc$"))
1881 #t))))
1882 (build-system python-build-system)
1883 (native-inputs
1884 `(("python-pytest" ,python-pytest)
1885 ("python-pytest-cov" ,python-pytest-cov)
1886 ("python-pytest-runner" ,python-pytest-runner)))
1887 (home-page "https://github.com/progrium/pyjwt")
1888 (synopsis "JSON Web Token implementation in Python")
1889 (description
1890 "PyJWT is a JSON Web Token implementation written in Python.")
1891 (license license:expat)))
1892
1893 (define-public python2-pyjwt
1894 (package-with-python2 python-pyjwt))
1895
1896 (define-public python-pykka
1897 (package
1898 (name "python-pykka")
1899 (version "1.2.1")
1900 (source
1901 (origin
1902 (method url-fetch)
1903 (uri (pypi-uri "Pykka" version))
1904 (sha256
1905 (base32
1906 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
1907 (build-system python-build-system)
1908 (native-inputs
1909 `(("python-mock" ,python-mock)
1910 ("python-nose" ,python-nose)
1911 ("python-gevent" ,python-gevent)
1912 ("python-eventlet" ,python-eventlet)))
1913 (home-page "https://www.pykka.org/")
1914 (synopsis "Pykka is a Python implementation of the actor model")
1915 (description
1916 "Pykka is a Python implementation of the actor model.
1917 The actor model introduces some simple rules to control the sharing
1918 of state and cooperation between execution units, which makes it
1919 easier to build concurrent applications.")
1920 (license license:asl2.0)))
1921
1922 (define-public python2-pykka
1923 (package-with-python2 python-pykka))
1924
1925 (define-public python-pympler
1926 (package
1927 (name "python-pympler")
1928 (home-page "https://pythonhosted.org/Pympler/")
1929 (version "0.5")
1930 (source (origin
1931 (method url-fetch)
1932 (uri (pypi-uri "Pympler" version))
1933 (sha256
1934 (base32
1935 "03qwsbilqgvnbl3a1jmpgixbr2kq6m3fvdlzyr3wdp01bwlc85kx"))))
1936 (build-system python-build-system)
1937 (arguments
1938 `(#:phases (modify-phases %standard-phases
1939 (delete 'check)
1940 (add-after 'install 'check
1941 (lambda* (#:key inputs outputs #:allow-other-keys)
1942 (add-installed-pythonpath inputs outputs)
1943 (invoke "python" "setup.py" "test"))))))
1944 (synopsis "Measure, monitor and analyze memory behavior")
1945 (description
1946 "Pympler is a development tool to measure, monitor and analyze
1947 the memory behavior of Python objects in a running Python application.
1948
1949 By pympling a Python application, detailed insight in the size and the
1950 lifetime of Python objects can be obtained. Undesirable or unexpected
1951 runtime behavior like memory bloat and other @samp{pymples} can easily
1952 be identified.
1953
1954 A web profiling frontend exposes process statistics, garbage
1955 visualisation and class tracker statistics.")
1956 (license license:asl2.0)))
1957
1958 (define-public python2-pympler
1959 (package-with-python2 python-pympler))
1960
1961 (define-public python-itsdangerous
1962 (package
1963 (name "python-itsdangerous")
1964 (version "0.24")
1965 (source
1966 (origin
1967 (method url-fetch)
1968 (uri (string-append
1969 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
1970 version ".tar.gz"))
1971 (sha256
1972 (base32
1973 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
1974 (build-system python-build-system)
1975 (home-page "https://github.com/mitsuhiko/itsdangerous")
1976 (synopsis "Python library for passing data to/from untrusted environments")
1977 (description
1978 "Itsdangerous provides various helpers to pass trusted data to untrusted
1979 environments and back.")
1980 (license license:bsd-3)))
1981
1982 (define-public python2-itsdangerous
1983 (package-with-python2 python-itsdangerous))
1984
1985 (define-public python-pyyaml
1986 (package
1987 (name "python-pyyaml")
1988 (version "3.13")
1989 (source
1990 (origin
1991 (method url-fetch)
1992 (uri (pypi-uri "PyYAML" version))
1993 (sha256
1994 (base32
1995 "1gx603g484z46cb74j9rzr6sjlh2vndxayicvlyhxdz98lhhkwry"))))
1996 (build-system python-build-system)
1997 (inputs
1998 `(("libyaml" ,libyaml)))
1999 (home-page "http://pyyaml.org/wiki/PyYAML")
2000 (synopsis "YAML parser and emitter for Python")
2001 (description
2002 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2003 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2004 API, and sensible error messages. PyYAML supports standard YAML tags and
2005 provides Python-specific tags that allow to represent an arbitrary Python
2006 object.")
2007 (license license:expat)))
2008
2009 (define-public python2-pyyaml
2010 (package-with-python2 python-pyyaml))
2011
2012 (define-public python-vine
2013 (package
2014 (name "python-vine")
2015 (version "1.1.4")
2016 (source
2017 (origin
2018 (method url-fetch)
2019 (uri (pypi-uri "vine" version))
2020 (sha256
2021 (base32
2022 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
2023 (build-system python-build-system)
2024 (native-inputs
2025 `(("python-pytest" ,python-pytest)
2026 ("python-case" ,python-case)))
2027 (home-page "https://github.com/celery/vine")
2028 (synopsis "Promises for Python")
2029 (description
2030 "@code{vine} provides a special implementation of promises in that it can
2031 be used both for \"promise of a value\" and lazy evaluation. The biggest
2032 upside for this is that everything in a promise can also be a promise,
2033 e.g. filters, callbacks and errbacks can all be promises.")
2034 (license license:bsd-3)))
2035
2036 (define-public python-virtualenv
2037 (package
2038 (name "python-virtualenv")
2039 (version "16.1.0")
2040 (source
2041 (origin
2042 (method url-fetch)
2043 (uri (pypi-uri "virtualenv" version))
2044 (sha256
2045 (base32
2046 "0242cg3hdq3qdvx5flyrki8lpwlgwf5k45c21ks5049fv7ygm6gq"))))
2047 (build-system python-build-system)
2048 (arguments
2049 `(#:phases
2050 (modify-phases %standard-phases
2051 (add-before 'check 'disable-failing-test
2052 (lambda _
2053 ;; Disable failing test. See upstream bug report
2054 ;; https://github.com/pypa/virtualenv/issues/957
2055 (substitute* "tests/test_virtualenv.py"
2056 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2057 #t)))))
2058 (native-inputs
2059 `(("python-mock" ,python-mock)
2060 ("python-pytest" ,python-pytest)))
2061 (home-page "https://virtualenv.pypa.io/")
2062 (synopsis "Virtual Python environment builder")
2063 (description
2064 "Virtualenv is a tool to create isolated Python environments.")
2065 (license license:expat)))
2066
2067 (define-public python2-virtualenv
2068 (package-with-python2 python-virtualenv))
2069
2070 (define-public python-markupsafe
2071 (package
2072 (name "python-markupsafe")
2073 (version "1.0")
2074 (source
2075 (origin
2076 (method url-fetch)
2077 (uri (string-append
2078 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
2079 version ".tar.gz"))
2080 (sha256
2081 (base32
2082 "0rdn1s8x9ni7ss8rfiacj7x1085lx8mh2zdwqslnw8xc3l4nkgm6"))))
2083 (build-system python-build-system)
2084 (home-page "https://github.com/mitsuhiko/markupsafe")
2085 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2086 (description
2087 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2088 for Python.")
2089 (license license:bsd-3)))
2090
2091 (define-public python2-markupsafe
2092 (package-with-python2 python-markupsafe))
2093
2094 (define-public python-jinja2
2095 (package
2096 (name "python-jinja2")
2097 (version "2.10")
2098 (source
2099 (origin
2100 (method url-fetch)
2101 (uri (pypi-uri "Jinja2" version))
2102 (sha256
2103 (base32
2104 "190l36hfw3wb2n3n68yacjabxyb1pnxwn7vjx96cmjj002xy2jzq"))))
2105 (build-system python-build-system)
2106 (propagated-inputs
2107 `(("python-markupsafe" ,python-markupsafe)))
2108 (home-page "http://jinja.pocoo.org/")
2109 (synopsis "Python template engine")
2110 (description
2111 "Jinja2 is a small but fast and easy to use stand-alone template engine
2112 written in pure Python.")
2113 (license license:bsd-3)))
2114
2115 (define-public python2-jinja2
2116 (package-with-python2 python-jinja2))
2117
2118 (define-public python-pystache
2119 (package
2120 (name "python-pystache")
2121 (version "0.5.4")
2122 (source (origin
2123 (method url-fetch)
2124 (uri (pypi-uri "pystache" version))
2125 (sha256
2126 (base32
2127 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2128 (build-system python-build-system)
2129 (arguments
2130 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2131 (home-page "http://defunkt.io/pystache/")
2132 (synopsis "Python logic-less template engine")
2133 (description
2134 "Pystache is a Python implementation of the framework agnostic,
2135 logic-free templating system Mustache.")
2136 (license license:expat)
2137 (properties `((python2-variant . ,(delay python2-pystache))))))
2138
2139 (define-public python2-pystache
2140 (package (inherit (package-with-python2
2141 (strip-python2-variant python-pystache)))
2142 (arguments
2143 `(#:python ,python-2
2144 #:phases
2145 (modify-phases %standard-phases
2146 (replace 'check
2147 (lambda _
2148 (invoke "python" "test_pystache.py"))))))))
2149
2150 (define-public python-joblib
2151 (package
2152 (name "python-joblib")
2153 (version "0.13.0")
2154 (source (origin
2155 (method url-fetch)
2156 (uri (pypi-uri "joblib" version))
2157 (sha256
2158 (base32
2159 "0612nazad8dxmn3xghfrmjax6456l4xy6hn9cngs7vydi14ds7v5"))))
2160 (build-system python-build-system)
2161 (arguments
2162 `(#:phases
2163 (modify-phases %standard-phases
2164 (replace 'check
2165 (lambda _ (invoke "pytest" "-v" "joblib"))))))
2166 (native-inputs
2167 `(("python-pytest" ,python-pytest)))
2168 (home-page "https://joblib.readthedocs.io/")
2169 (synopsis "Using Python functions as pipeline jobs")
2170 (description
2171 "Joblib is a set of tools to provide lightweight pipelining in Python.
2172 In particular, joblib offers: transparent disk-caching of the output values
2173 and lazy re-evaluation (memoize pattern), easy simple parallel computing
2174 logging and tracing of the execution.")
2175 (license license:bsd-3)))
2176
2177 (define-public python2-joblib
2178 (package-with-python2 python-joblib))
2179
2180 (define-public python-docutils
2181 (package
2182 (name "python-docutils")
2183 (version "0.14")
2184 (source
2185 (origin
2186 (method url-fetch)
2187 (uri (pypi-uri "docutils" version))
2188 (sha256
2189 (base32
2190 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
2191 (build-system python-build-system)
2192 (arguments
2193 '(#:tests? #f)) ; no setup.py test command
2194 (home-page "http://docutils.sourceforge.net/")
2195 (synopsis "Python Documentation Utilities")
2196 (description
2197 "Docutils is a modular system for processing documentation into useful
2198 formats, such as HTML, XML, and LaTeX. For input Docutils supports
2199 reStructuredText.")
2200 ;; Most of the source code is public domain, but some source files are
2201 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2202 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2203
2204 (define-public python2-docutils
2205 (package-with-python2 python-docutils))
2206
2207 (define-public python-pygments
2208 (package
2209 (name "python-pygments")
2210 (version "2.2.0")
2211 (source
2212 (origin
2213 (method url-fetch)
2214 (uri (pypi-uri "Pygments" version))
2215 (sha256
2216 (base32
2217 "1k78qdvir1yb1c634nkv6rbga8wv4289xarghmsbbvzhvr311bnv"))))
2218 (build-system python-build-system)
2219 (arguments
2220 ;; FIXME: Tests require sphinx, which depends on this.
2221 '(#:tests? #f))
2222 (home-page "http://pygments.org/")
2223 (synopsis "Syntax highlighting")
2224 (description
2225 "Pygments is a syntax highlighting package written in Python.")
2226 (license license:bsd-2)))
2227
2228 (define-public python2-pygments
2229 (package-with-python2 python-pygments))
2230
2231 (define-public python-sphinxcontrib-websupport
2232 (package
2233 (name "python-sphinxcontrib-websupport")
2234 (version "1.1.0")
2235 (source (origin
2236 (method url-fetch)
2237 (uri (pypi-uri "sphinxcontrib-websupport" version))
2238 (sha256
2239 (base32
2240 "1ff3ix76xi1y6m99qxhaq5161ix9swwzydilvdya07mgbcvpzr4x"))))
2241 (build-system python-build-system)
2242 (arguments
2243 ;; FIXME: Tests depend on Sphinx, which depends on this.
2244 `(#:tests? #f))
2245 (home-page "http://sphinx-doc.org/")
2246 (synopsis "Sphinx API for web applications")
2247 (description "This package provides a Python API to easily integrate
2248 Sphinx documentation into your web application. It provides tools to
2249 integrate Sphinx documents in web templates and to handle searches.")
2250 (license license:bsd-3)))
2251
2252 (define-public python2-sphinxcontrib-websupport
2253 (package-with-python2 python-sphinxcontrib-websupport))
2254
2255 (define-public python-sphinx
2256 (package
2257 (name "python-sphinx")
2258 (version "1.7.7")
2259 (source
2260 (origin
2261 (method url-fetch)
2262 (uri (pypi-uri "Sphinx" version))
2263 (sha256
2264 (base32
2265 "0pkkbfj7cl157q550gcs45am5y78ps0h7q6455d64s1zmw01jlvi"))))
2266 (build-system python-build-system)
2267 (arguments
2268 `(#:phases
2269 (modify-phases %standard-phases
2270 (replace 'check
2271 (lambda _
2272 ;; Requires Internet access.
2273 (delete-file "tests/test_build_linkcheck.py")
2274 (substitute* "tests/test_build_latex.py"
2275 (("@pytest.mark.sphinx\\('latex', testroot='images'\\)")
2276 "@pytest.mark.skip()"))
2277 (when (which "python")
2278 ;; XXX: These tests are broken when using Python2:
2279 ;; <https://github.com/sphinx-doc/sphinx/issues/4710>.
2280 (delete-file "tests/test_api_translator.py")
2281 (delete-file "tests/test_setup_command.py"))
2282 (invoke "make" "test"))))))
2283 (propagated-inputs
2284 `(("python-imagesize" ,python-imagesize)
2285 ("python-sphinx-alabaster-theme"
2286 ,python-sphinx-alabaster-theme)
2287 ("python-babel" ,python-babel)
2288 ("python-snowballstemmer" ,python-snowballstemmer)
2289 ("python-docutils" ,python-docutils)
2290 ("python-jinja2" ,python-jinja2)
2291 ("python-packaging" ,python-packaging)
2292 ("python-pygments" ,python-pygments)
2293 ("python-requests" ,python-requests)
2294 ("python-six" ,python-six)
2295 ("python-sphinxcontrib-websupport" ,python-sphinxcontrib-websupport)))
2296 (native-inputs
2297 `(("graphviz" ,graphviz)
2298 ("imagemagick" ,imagemagick) ;for "convert"
2299 ("python-html5lib" ,python-html5lib)
2300 ("python-mock" ,python-mock)
2301 ("python-nose" ,python-nose)
2302 ("python-pytest" ,python-pytest)))
2303 (home-page "http://sphinx-doc.org/")
2304 (synopsis "Python documentation generator")
2305 (description "Sphinx is a tool that makes it easy to create documentation
2306 for Python projects or other documents consisting of multiple reStructuredText
2307 sources.")
2308 (license license:bsd-3)
2309 (properties `((python2-variant . ,(delay python2-sphinx))))))
2310
2311 (define-public python2-sphinx
2312 (let ((base (package-with-python2 (strip-python2-variant python-sphinx))))
2313 (package
2314 (inherit base)
2315 (native-inputs `(("python2-mock" ,python2-mock)
2316 ("python2-enum34" ,python2-enum34)
2317 ,@(package-native-inputs base)))
2318 (propagated-inputs `(("python2-pytz" ,python2-pytz)
2319 ("python2-typing" ,python2-typing)
2320 ,@(package-propagated-inputs base))))))
2321
2322 (define-public python-sphinx-gallery
2323 (package
2324 (name "python-sphinx-gallery")
2325 (version "0.1.13")
2326 (source (origin
2327 (method url-fetch)
2328 (uri (string-append "https://github.com/sphinx-gallery/sphinx-gallery"
2329 "/archive/v" version ".tar.gz"))
2330 (file-name (string-append name "-" version ".tar.gz"))
2331 (sha256
2332 (base32
2333 "03fs99mcb1r7qp0xixqv07vcz98sk21yq19ffdysi0infdcpzfkd"))))
2334 (build-system python-build-system)
2335 (arguments
2336 ;; FIXME: Tests attempt to download <https://docs.python.org/3/objects.inv>,
2337 ;; <https://docs.scipy.org/doc/numpy/objects.inv>, and
2338 ;; <https://matplotlib.org/objects.inv>.
2339 `(#:tests? #f))
2340 (native-inputs
2341 `(("python-pytest-runner" ,python-pytest-runner)))
2342 (home-page "https://sphinx-gallery.github.io/")
2343 (synopsis "Generate an examples gallery automatically")
2344 (description
2345 "@code{sphinx_gallery} is a Sphinx extension that builds an HTML version
2346 from any set of Python scripts and puts it into an examples gallery.")
2347 (license license:bsd-3)))
2348
2349 (define-public python2-sphinx-gallery
2350 (package-with-python2 python-sphinx-gallery))
2351
2352 (define-public python-sphinx-rtd-theme
2353 (package
2354 (name "python-sphinx-rtd-theme")
2355 (version "0.2.4")
2356 (source
2357 (origin
2358 (method url-fetch)
2359 (uri (pypi-uri "sphinx_rtd_theme" version))
2360 (sha256
2361 (base32
2362 "05rlhjzdyapr2w74jjs7mrm8hi69qskcr5vya9f9drpsys7lpxrd"))))
2363 (build-system python-build-system)
2364 (arguments '(#:tests? #f)) ; No tests.
2365 (propagated-inputs
2366 `(("python-sphinx" ,python-sphinx)))
2367 (home-page "https://github.com/snide/sphinx_rtd_theme/")
2368 (synopsis "ReadTheDocs.org theme for Sphinx")
2369 (description "A theme for Sphinx used by ReadTheDocs.org.")
2370 (license license:expat)))
2371
2372 (define-public python2-sphinx-rtd-theme
2373 (package-with-python2 python-sphinx-rtd-theme))
2374
2375 (define-public python-guzzle-sphinx-theme
2376 (package
2377 (name "python-guzzle-sphinx-theme")
2378 (version "0.7.11")
2379 (source
2380 (origin
2381 (method url-fetch)
2382 (uri (pypi-uri "guzzle_sphinx_theme" version))
2383 (sha256
2384 (base32
2385 "1rnkzrrsbnifn3vsb4pfaia3nlvgvw6ndpxp7lzjrh23qcwid34v"))))
2386 (build-system python-build-system)
2387 (propagated-inputs
2388 `(("python-sphinx" ,python-sphinx)))
2389 (home-page "https://github.com/guzzle/guzzle_sphinx_theme")
2390 (synopsis "Sphinx theme used by Guzzle")
2391 (description "This package provides guzzle_sphinx_theme, a theme for the
2392 Sphinx documentation system, used by @uref{http://docs.guzzlephp.org, Guzzle}
2393 and several other projects.")
2394 (license license:expat)))
2395
2396 (define-public python2-guzzle-sphinx-theme
2397 (package-with-python2 python-guzzle-sphinx-theme))
2398
2399 (define-public python-rst.linker
2400 (package
2401 (name "python-rst.linker")
2402 (version "1.10")
2403 (source
2404 (origin
2405 (method url-fetch)
2406 (uri (pypi-uri "rst.linker" version))
2407 (sha256
2408 (base32
2409 "0iqaacp7pj1s8avs4kc0qg0r7dscywaq37y6l9j14glqdikk0wdj"))))
2410 (build-system python-build-system)
2411 (propagated-inputs
2412 `(("python-dateutil" ,python-dateutil)
2413 ("python-six" ,python-six)))
2414 (native-inputs
2415 `(("python-setuptools-scm" ,python-setuptools-scm)))
2416 ;; Test would require path.py, which would introduce a cyclic dependence.
2417 (arguments `(#:tests? #f))
2418 ;; Note: As of version 1.7 the documentation is not worth building.
2419 (home-page "https://github.com/jaraco/rst.linker")
2420 (synopsis "Sphinx plugin to add links and timestamps")
2421 (description "rst.linker allows to automatically replace text by a
2422 reStructuredText external reference or timestamps. It's primary purpose is to
2423 augment the changelog, but it can be used for other documents, too.")
2424 (license license:expat)))
2425
2426 (define-public python2-rst.linker
2427 (package-with-python2 python-rst.linker))
2428
2429 (define-public python-feedgenerator
2430 (package
2431 (name "python-feedgenerator")
2432 (version "1.9")
2433 (source
2434 (origin
2435 (method url-fetch)
2436 (uri (pypi-uri "feedgenerator" version))
2437 (sha256
2438 (base32
2439 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
2440 (modules '((guix build utils)))
2441 (snippet
2442 '(begin
2443 ;; Remove pre-compiled .pyc files from source.
2444 (for-each delete-file-recursively
2445 (find-files "." "__pycache__" #:directories? #t))
2446 (for-each delete-file (find-files "." "\\.pyc$"))
2447 #t))))
2448 (build-system python-build-system)
2449 (propagated-inputs
2450 `(("python-pytz" ,python-pytz)
2451 ("python-six" ,python-six)))
2452 (home-page "https://github.com/getpelican/feedgenerator")
2453 (synopsis
2454 "Standalone version of Django's Atom/RSS feed generator")
2455 (description
2456 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2457 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
2458 (license license:bsd-3)))
2459
2460 (define-public python2-feedgenerator
2461 (package-with-python2 python-feedgenerator))
2462
2463 (define-public python-toml
2464 (package
2465 (name "python-toml")
2466 (version "0.9.4")
2467 (source
2468 (origin
2469 (method url-fetch)
2470 (uri (pypi-uri "toml" version))
2471 (sha256
2472 (base32
2473 "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf"))))
2474 (build-system python-build-system)
2475 (arguments
2476 `(#:tests? #f)) ;no tests suite in release
2477 (home-page "https://github.com/uiri/toml")
2478 (synopsis "Library for TOML")
2479 (description
2480 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
2481 Language (TOML) configuration files.")
2482 (license license:expat)))
2483
2484 (define-public python-black
2485 (package
2486 (name "python-black")
2487 (version "18.6b4")
2488 (source
2489 (origin
2490 (method url-fetch)
2491 (uri (pypi-uri "black" version))
2492 (sha256
2493 (base32
2494 "0i4sfqgz6w15vd50kbhi7g7rifgqlf8yfr8y78rypd56q64qn592"))))
2495 (build-system python-build-system)
2496 (arguments
2497 `(#:phases
2498 (modify-phases %standard-phases
2499 (add-after 'patch-source-shebangs 'patch-extra-shebangs
2500 (lambda _
2501 (let ((python3 (which "python3")))
2502 (substitute* '("tests/data/fmtonoff.py"
2503 "tests/data/string_prefixes.py"
2504 "tests/data/function.py")
2505 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
2506 (string-append "#!" python3 (if (string? minor-version)
2507 minor-version
2508 ""))))))))))
2509 (propagated-inputs
2510 `(("python-click" ,python-click)
2511 ("python-attrs" ,python-attrs)
2512 ("python-appdirs" ,python-appdirs)
2513 ("python-toml" ,python-toml)))
2514 (home-page "https://github.com/ambv/black")
2515 (synopsis "The uncompromising code formatter")
2516 (description "Black is the uncompromising Python code formatter.")
2517 (license license:expat)))
2518
2519 (define-public python-blinker
2520 (package
2521 (name "python-blinker")
2522 (version "1.4")
2523 (source
2524 (origin
2525 (method url-fetch)
2526 (uri (pypi-uri "blinker" version))
2527 (sha256
2528 (base32
2529 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
2530 (build-system python-build-system)
2531 (home-page "http://pythonhosted.org/blinker/")
2532 (synopsis "Fast, simple object-to-object and broadcast signaling")
2533 (description
2534 "Blinker provides a fast dispatching system that allows any number of
2535 interested parties to subscribe to events, or \"signals\".")
2536 (license license:expat)))
2537
2538 (define-public python2-blinker
2539 (package-with-python2 python-blinker))
2540
2541 (define-public pelican
2542 (package
2543 (name "pelican")
2544 (version "3.7.1")
2545 (source
2546 (origin
2547 (method url-fetch)
2548 (uri (pypi-uri "pelican" version))
2549 (sha256
2550 (base32
2551 "12spygavv9b6xpb5pgp7f0p3z0mms60nx6zrpx1yfkj68zz4flra"))))
2552 (build-system python-build-system)
2553 (propagated-inputs
2554 `(("python-feedgenerator" ,python-feedgenerator)
2555 ("python-jinja2" ,python-jinja2)
2556 ("python-pygments" ,python-pygments)
2557 ("python-docutils" ,python-docutils)
2558 ("python-pytz" ,python-pytz)
2559 ("python-blinker" ,python-blinker)
2560 ("python-unidecode" ,python-unidecode)
2561 ("python-six" ,python-six)
2562 ("python-dateutil" ,python-dateutil)
2563 ("python-markdown" ,python-markdown)))
2564 (home-page "https://getpelican.com/")
2565 (arguments
2566 `(;; XXX Requires a lot more packages to do unit tests :P
2567 #:tests? #f
2568 #:phases (modify-phases %standard-phases
2569 (add-before
2570 'install 'adjust-requires
2571 ;; Since feedgenerator is installed from git, it doesn't
2572 ;; conform to the version requirements.
2573 ;;
2574 ;; We *do have* "feedgenerator >= 1.6", but strip off the
2575 ;; version requirement so setuptools doesn't get confused.
2576 (lambda _
2577 (substitute* "setup.py"
2578 (("['\"]feedgenerator.*?['\"]")
2579 "'feedgenerator'")))))))
2580 (synopsis "Python-based static site publishing system")
2581 (description
2582 "Pelican is a tool to generate a static blog from reStructuredText,
2583 Markdown input files, and more. Pelican uses Jinja2 for templating
2584 and is very extensible.")
2585 (license license:agpl3+)))
2586
2587 (define-public python-scikit-image
2588 (package
2589 (name "python-scikit-image")
2590 (version "0.14.1")
2591 (source
2592 (origin
2593 (method url-fetch)
2594 (uri (pypi-uri "scikit-image" version))
2595 (sha256
2596 (base32 "0l1c3rl4s1jyv80i5hns4pgih09zrxfj7lygdc51w8sgyysb7ac6"))))
2597 (build-system python-build-system)
2598 (arguments
2599 ;; TODO: Some tests require running X11 server. Disable them?
2600 '(#:tests? #f))
2601 ;; See DEPENDS.txt for the list of build and run time requiremnts
2602 (propagated-inputs
2603 `(("python-cloudpickle" ,python-cloudpickle)
2604 ("python-dask" ,python-dask)
2605 ("python-matplotlib" ,python-matplotlib)
2606 ("python-networkx" ,python-networkx)
2607 ("python-numpy" ,python-numpy)
2608 ("python-pillow" ,python-pillow)
2609 ("python-pywavelets" ,python-pywavelets)
2610 ("python-scipy" ,python-scipy)
2611 ("python-six" ,python-six)))
2612 (native-inputs
2613 `(("python-cython" ,python-cython)))
2614 (home-page "http://scikit-image.org/")
2615 (synopsis "Image processing in Python")
2616 (description
2617 "Scikit-image is a collection of algorithms for image processing.")
2618 (license license:bsd-3)))
2619
2620 (define-public python2-scikit-image
2621 (package-with-python2 python-scikit-image))
2622
2623 (define-public python-cython
2624 (package
2625 (name "python-cython")
2626 (version "0.28.4")
2627 (source
2628 (origin
2629 (method url-fetch)
2630 (uri (pypi-uri "Cython" version))
2631 (sha256
2632 (base32
2633 "0imw9s2rbrh32clbl10csnwmig9p3nzkrd2baxxxfmnrsc42pb3n"))))
2634 (build-system python-build-system)
2635 ;; we need the full python package and not just the python-wrapper
2636 ;; because we need libpython3.3m.so
2637 (inputs
2638 `(("python" ,python)))
2639 (arguments
2640 `(#:phases
2641 (modify-phases %standard-phases
2642 (add-before 'check 'set-HOME
2643 ;; some tests require access to "$HOME/.cython"
2644 (lambda _ (setenv "HOME" "/tmp") #t))
2645
2646 ;; FIXME: These tests started failing on armhf after the 0.28 update
2647 ;; (commit c69d11c5930), both with an error such as this:
2648 ;; compiling (cpp) and running dictcomp ...
2649 ;; === C/C++ compiler error output: ===
2650 ;; ‘
2651 ;; dictcomp.cpp:5221: confused by earlier errors, bailing out
2652 ;; See <https://hydra.gnu.org/build/2948724> for logs.
2653 ,@(if (target-arm32?)
2654 `((add-before 'check 'disable-failing-tests
2655 (lambda _
2656 (let ((disabled-tests (open-file "tests/bugs.txt" "a")))
2657 (for-each (lambda (test)
2658 (format disabled-tests "~a\n" test))
2659 '("memslice" "dictcomp"))
2660 (close-port disabled-tests)))))
2661 '())
2662
2663 (replace 'check
2664 (lambda _
2665 ;; The "with_outer_raising" test fails with Python 3.7. See
2666 ;; https://github.com/cython/cython/issues/2454
2667 (delete-file "tests/run/generators_py.py")
2668 (invoke "python" "runtests.py" "-vv"))))))
2669 (home-page "http://cython.org/")
2670 (synopsis "C extensions for Python")
2671 (description "Cython is an optimising static compiler for both the Python
2672 programming language and the extended Cython programming language. It makes
2673 writing C extensions for Python as easy as Python itself.")
2674 (license license:asl2.0)
2675 (properties `((python2-variant . ,(delay python2-cython))))))
2676
2677 (define-public python2-cython
2678 (package (inherit (package-with-python2
2679 (strip-python2-variant python-cython)))
2680 (name "python2-cython")
2681 (inputs
2682 `(("python-2" ,python-2))))) ; this is not automatically changed
2683
2684 ;; The RPython toolchain currently does not support Python 3.
2685 (define-public python2-rpython
2686 (package
2687 (name "python2-rpython")
2688 (version "0.2.1")
2689 (source
2690 (origin
2691 (method url-fetch)
2692 (uri (pypi-uri "rpython" version))
2693 (sha256
2694 (base32
2695 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
2696 (build-system python-build-system)
2697 (arguments `(#:python ,python-2))
2698 (native-inputs
2699 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
2700 (home-page "https://rpython.readthedocs.org")
2701 (synopsis "Framework for implementing interpreters and virtual machines")
2702 (description "RPython is a translation and support framework for
2703 producing implementations of dynamic languages, emphasizing a clean separation
2704 between language specification and implementation aspects.")
2705 (license license:expat)))
2706
2707 ;; NOTE: when upgrading numpy please make sure that python-pandas and
2708 ;; python-scipy still build, as these three packages are often used together.
2709 (define-public python-numpy
2710 (package
2711 (name "python-numpy")
2712 (version "1.15.4")
2713 (source
2714 (origin
2715 (method url-fetch)
2716 (uri (string-append
2717 "https://github.com/numpy/numpy/releases/download/v"
2718 version "/numpy-" version ".tar.gz"))
2719 (sha256
2720 (base32
2721 "102vcl2qq4pjbm7a3d67vkkvn4466ngia1d8wi5avqwqh8j0jvkn"))))
2722 (build-system python-build-system)
2723 (inputs
2724 `(("openblas" ,openblas)
2725 ("lapack" ,lapack)))
2726 (native-inputs
2727 `(("python-cython" ,python-cython)
2728 ("python-pytest" ,python-pytest)
2729 ("gfortran" ,gfortran)))
2730 (arguments
2731 `(#:phases
2732 (modify-phases %standard-phases
2733 (add-before 'build 'configure-blas-lapack
2734 (lambda* (#:key inputs #:allow-other-keys)
2735 (call-with-output-file "site.cfg"
2736 (lambda (port)
2737 (format port
2738 "[openblas]
2739 libraries = openblas
2740 library_dirs = ~a/lib
2741 include_dirs = ~a/include
2742
2743 # backslash-n to make emacs happy
2744 \n[lapack]
2745 lapack_libs = lapack
2746 library_dirs = ~a/lib
2747 include_dirs = ~a/include
2748 "
2749 (assoc-ref inputs "openblas")
2750 (assoc-ref inputs "openblas")
2751 (assoc-ref inputs "lapack")
2752 (assoc-ref inputs "lapack"))))
2753 #t))
2754 (add-before 'build 'fix-executable-paths
2755 (lambda* (#:key inputs #:allow-other-keys)
2756 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
2757 ;; instead of /bin/sh.
2758 (substitute* "numpy/distutils/exec_command.py"
2759 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
2760 (string-append match-start (assoc-ref inputs "bash") match-end)))
2761 ;; Use "gcc" executable, not "cc".
2762 (substitute* "numpy/distutils/system_info.py"
2763 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
2764 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
2765 #t))
2766 ;; Tests can only be run after the library has been installed and not
2767 ;; within the source directory.
2768 (delete 'check)
2769 (add-after 'install 'check
2770 (lambda* (#:key outputs inputs #:allow-other-keys)
2771 ;; Make installed package available for running the tests
2772 (add-installed-pythonpath inputs outputs)
2773 ;; Make sure "f2py" etc is found.
2774 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
2775 ":" (getenv "PATH")))
2776 (with-directory-excursion "/tmp"
2777 (invoke "python" "-c"
2778 "import numpy; numpy.test(verbose=2)")))))))
2779 (home-page "http://www.numpy.org/")
2780 (synopsis "Fundamental package for scientific computing with Python")
2781 (description "NumPy is the fundamental package for scientific computing
2782 with Python. It contains among other things: a powerful N-dimensional array
2783 object, sophisticated (broadcasting) functions, tools for integrating C/C++
2784 and Fortran code, useful linear algebra, Fourier transform, and random number
2785 capabilities.")
2786 (license license:bsd-3)))
2787
2788 (define-public python2-numpy
2789 (package-with-python2 python-numpy))
2790
2791 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
2792 ;; interest only for legacy code going back to NumPy's predecessor
2793 ;; Numeric.
2794 (define-public python2-numpy-1.8
2795 (package (inherit python2-numpy)
2796 (version "1.8.2")
2797 (source
2798 (origin
2799 (method url-fetch)
2800 (uri (string-append
2801 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
2802 (file-name (string-append "python2-numpy-" version ".tar.gz"))
2803 (sha256
2804 (base32
2805 "0sc20gz1b17xnyrkp5frca3ql5qfalpv916hfg2kqxpwr6jg0f1g"))))
2806 (arguments
2807 (substitute-keyword-arguments (package-arguments python2-numpy)
2808 ((#:phases phases)
2809 `(modify-phases ,phases
2810 (replace 'configure-blas-lapack
2811 (lambda* (#:key inputs #:allow-other-keys)
2812 (call-with-output-file "site.cfg"
2813 (lambda (port)
2814 (format port
2815 "[openblas]
2816 libraries = openblas,lapack
2817 library_dirs = ~a/lib:~a/lib
2818 include_dirs = ~a/include:~a/include
2819 "
2820 (assoc-ref inputs "openblas")
2821 (assoc-ref inputs "lapack")
2822 (assoc-ref inputs "openblas")
2823 (assoc-ref inputs "lapack"))))
2824 #t))))))
2825 (native-inputs
2826 `(("python2-nose" ,python2-nose)))
2827 (description "NumPy is the fundamental package for scientific computing
2828 with Python. It contains among other things: a powerful N-dimensional array
2829 object, sophisticated (broadcasting) functions, tools for integrating C/C++
2830 and Fortran code, useful linear algebra, Fourier transform, and random number
2831 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
2832 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
2833 Numeric.")
2834 (license license:bsd-3)))
2835
2836 (define-public python-munch
2837 (package
2838 (name "python-munch")
2839 (version "2.0.4")
2840 (source
2841 (origin
2842 (method url-fetch)
2843 (uri (pypi-uri "munch" version))
2844 (sha256
2845 (base32
2846 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
2847 (build-system python-build-system)
2848 (home-page "https://github.com/Infinidat/munch")
2849 (synopsis "Dot-accessible dictionary")
2850 (description "Munch is a dot-accessible dictionary similar to JavaScript
2851 objects.")
2852 (license license:expat)))
2853
2854 (define-public python2-munch
2855 (package-with-python2 python-munch))
2856
2857 (define-public python-colormath
2858 (package
2859 (name "python-colormath")
2860 (version "3.0.0")
2861 (source
2862 (origin
2863 (method url-fetch)
2864 (uri (pypi-uri "colormath" version))
2865 (sha256
2866 (base32
2867 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
2868 (build-system python-build-system)
2869 (propagated-inputs
2870 `(("python-networkx" ,python-networkx)
2871 ("python-numpy" ,python-numpy)))
2872 (home-page "https://github.com/gtaylor/python-colormath")
2873 (synopsis "Color math and conversion library")
2874 (description
2875 "This is a Python library for color math and conversions.")
2876 (license license:bsd-3)))
2877
2878 (define-public python2-colormath
2879 (package-with-python2 python-colormath))
2880
2881 (define-public python-spectra
2882 (package
2883 (name "python-spectra")
2884 (version "0.0.11")
2885 (source
2886 (origin
2887 (method url-fetch)
2888 (uri (pypi-uri "spectra" version))
2889 (sha256
2890 (base32
2891 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
2892 (build-system python-build-system)
2893 (arguments
2894 `(#:phases
2895 (modify-phases %standard-phases
2896 (replace 'check
2897 (lambda _
2898 (zero? (system* "nosetests" "-v")))))))
2899 (propagated-inputs
2900 `(("python-colormath" ,python-colormath)))
2901 (native-inputs
2902 `(("python-nose" ,python-nose)))
2903 (home-page "https://github.com/jsvine/spectra")
2904 (synopsis "Color scales and color conversion")
2905 (description
2906 "This package provides a Python library intended to make color math,
2907 color scales, and color space conversion easy. It has support for:
2908
2909 @enumerate
2910 @item Color scales
2911 @item Color ranges
2912 @item Color blending
2913 @item Brightening/darkening colors
2914 @item Saturating/desaturating colors
2915 @item Conversion to/from multiple color spaces.
2916 @end enumerate\n")
2917 (license license:expat)))
2918
2919 (define-public python2-spectra
2920 (package-with-python2 python-spectra))
2921
2922 (define-public python-numpy-documentation
2923 (package
2924 (name "python-numpy-documentation")
2925 (version (package-version python-numpy))
2926 (source (package-source python-numpy))
2927 (build-system python-build-system)
2928 (native-inputs
2929 `(("python-matplotlib" ,python-matplotlib)
2930 ("python-numpy" ,python-numpy)
2931 ("pkg-config" ,pkg-config)
2932 ("python-sphinx" ,python-sphinx)
2933 ("python-numpydoc" ,python-numpydoc)
2934 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
2935 texlive-fonts-cm-super
2936 texlive-fonts-ec
2937 texlive-generic-ifxetex
2938 texlive-generic-pdftex
2939 texlive-latex-amsfonts
2940 texlive-latex-capt-of
2941 texlive-latex-cmap
2942 texlive-latex-environ
2943 texlive-latex-eqparbox
2944 texlive-latex-etoolbox
2945 texlive-latex-expdlist
2946 texlive-latex-fancyhdr
2947 texlive-latex-fancyvrb
2948 texlive-latex-fncychap
2949 texlive-latex-float
2950 texlive-latex-framed
2951 texlive-latex-geometry
2952 texlive-latex-graphics
2953 texlive-latex-hyperref
2954 texlive-latex-mdwtools
2955 texlive-latex-multirow
2956 texlive-latex-needspace
2957 texlive-latex-oberdiek
2958 texlive-latex-parskip
2959 texlive-latex-preview
2960 texlive-latex-tabulary
2961 texlive-latex-threeparttable
2962 texlive-latex-titlesec
2963 texlive-latex-trimspaces
2964 texlive-latex-ucs
2965 texlive-latex-upquote
2966 texlive-latex-url
2967 texlive-latex-varwidth
2968 texlive-latex-wrapfig)))
2969 ("texinfo" ,texinfo)
2970 ("perl" ,perl)
2971 ("scipy-sphinx-theme"
2972 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
2973 (method git-fetch)
2974 (uri (git-reference
2975 (url "https://github.com/scipy/scipy-sphinx-theme.git")
2976 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
2977 (sha256
2978 (base32
2979 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
2980 ,@(package-native-inputs python-numpy)))
2981 (arguments
2982 `(#:tests? #f ; we're only generating the documentation
2983 #:phases
2984 (modify-phases %standard-phases
2985 (delete 'build)
2986 (replace 'install
2987 (lambda* (#:key inputs outputs #:allow-other-keys)
2988 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
2989 (doc (string-append
2990 data "/doc/" ,name "-"
2991 ,(package-version python-numpy)))
2992 (info-reader (string-append data "/info"))
2993 (html (string-append doc "/html"))
2994 (scipy-sphinx-theme "scipy-sphinx-theme")
2995 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
2996 (pyver ,(string-append "PYVER=")))
2997
2998 ;; FIXME: this is needed to for texlive-union to generate
2999 ;; fonts, which are not found.
3000 (setenv "HOME" "/tmp")
3001
3002 (with-directory-excursion "doc"
3003 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3004 (mkdir-p html)
3005 (system* "make" "html" pyver)
3006 (system* "make" "latex" "PAPER=a4" pyver)
3007 (system* "make" "-C" "build/latex"
3008 "all-pdf" "PAPER=a4" pyver)
3009 ;; FIXME: Generation of the info file fails.
3010 ;; (system* "make" "info" pyver)
3011 ;; (mkdir-p info)
3012 ;; (copy-file "build/texinfo/numpy.info"
3013 ;; (string-append info "/numpy.info"))
3014 (for-each (lambda (file)
3015 (copy-file (string-append "build/latex" file)
3016 (string-append doc file)))
3017 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3018 (with-directory-excursion "build/html"
3019 (for-each (lambda (file)
3020 (let* ((dir (dirname file))
3021 (tgt-dir (string-append html "/" dir)))
3022 (unless (equal? "." dir)
3023 (mkdir-p tgt-dir))
3024 (install-file file html)))
3025 (find-files "." ".*")))))
3026 #t)))))
3027 (home-page (package-home-page python-numpy))
3028 (synopsis "Documentation for the python-numpy package")
3029 (description (package-description python-numpy))
3030 (license (package-license python-numpy))))
3031
3032 (define-public python2-numpy-documentation
3033 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3034 (package
3035 (inherit numpy-documentation)
3036 (native-inputs `(("python2-functools32" ,python2-functools32)
3037 ,@(package-native-inputs numpy-documentation))))))
3038
3039 (define-public python-pygit2
3040 (package
3041 (name "python-pygit2")
3042 (version "0.27.3")
3043 (source
3044 (origin
3045 (method url-fetch)
3046 (uri (pypi-uri "pygit2" version))
3047 (sha256
3048 (base32
3049 "046ahvsb7a20sgvscqfm3cb32sp3sii4gim9vz7zzrkf7yz16xlv"))))
3050 (build-system python-build-system)
3051 (arguments
3052 '(#:phases
3053 (modify-phases %standard-phases
3054 ;; Remove after the next update. See:
3055 ;; https://github.com/libgit2/pygit2/pull/851
3056 (add-after 'unpack 'compile-with-cffi
3057 (lambda _
3058 (substitute* "setup.py"
3059 (("install_requires")
3060 "setup_requires=['cffi'],\n install_requires"))
3061 #t))
3062 (add-after 'unpack 'fix-dependency-versioning
3063 (lambda _
3064 (substitute* "setup.py"
3065 (("<") "<="))
3066 #t)))))
3067 (propagated-inputs
3068 `(("python-six" ,python-six)
3069 ("python-cffi" ,python-cffi)
3070 ("libgit2" ,libgit2)
3071 ("python-tox" ,python-tox)))
3072 (native-inputs
3073 `(("python-pytest" ,python-pytest)))
3074 (home-page "https://github.com/libgit2/pygit2")
3075 (synopsis "Python bindings for libgit2")
3076 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3077 library, libgit2 implements Git plumbing.")
3078 ;; GPL2.0 only, with linking exception.
3079 (license license:gpl2)))
3080
3081 (define-public python2-pygit2
3082 (package-with-python2 python-pygit2))
3083
3084 (define-public python-pyparsing
3085 (package
3086 (name "python-pyparsing")
3087 (version "2.2.1")
3088 (source
3089 (origin
3090 (method url-fetch)
3091 (uri (pypi-uri "pyparsing" version))
3092 (sha256
3093 (base32 "06dgd0iilvf8m0ssmfpcbh8l6jf0zkp8adbb84llksg17crfx4zl"))))
3094 (build-system python-build-system)
3095 (outputs '("out" "doc"))
3096 (arguments
3097 `(#:tests? #f ; no test target
3098 #:phases
3099 (modify-phases %standard-phases
3100 (add-after 'install 'install-doc
3101 (lambda* (#:key outputs #:allow-other-keys)
3102 (let* ((doc (string-append (assoc-ref outputs "doc")
3103 "/share/doc/" ,name "-" ,version))
3104 (html-doc (string-append doc "/html"))
3105 (examples (string-append doc "/examples")))
3106 (mkdir-p html-doc)
3107 (mkdir-p examples)
3108 (for-each
3109 (lambda (dir tgt)
3110 (map (lambda (file)
3111 (install-file file tgt))
3112 (find-files dir ".*")))
3113 (list "docs" "htmldoc" "examples")
3114 (list doc html-doc examples))
3115 #t))))))
3116 (home-page "https://github.com/pyparsing/pyparsing")
3117 (synopsis "Python parsing class library")
3118 (description
3119 "The pyparsing module is an alternative approach to creating and
3120 executing simple grammars, vs. the traditional lex/yacc approach, or the use
3121 of regular expressions. The pyparsing module provides a library of classes
3122 that client code uses to construct the grammar directly in Python code.")
3123 (license license:expat)))
3124
3125 (define-public python2-pyparsing
3126 (package-with-python2 python-pyparsing))
3127
3128 (define-public python-numpydoc
3129 (package
3130 (name "python-numpydoc")
3131 (version "0.8.0")
3132 (source
3133 (origin
3134 (method url-fetch)
3135 (uri (pypi-uri "numpydoc" version))
3136 (sha256
3137 (base32
3138 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
3139 (build-system python-build-system)
3140 (propagated-inputs
3141 `(("python-sphinx" ,python-sphinx)))
3142 (native-inputs
3143 `(("python-nose" ,python-nose)))
3144 (home-page "https://pypi.python.org/pypi/numpydoc")
3145 (synopsis
3146 "Numpy's Sphinx extensions")
3147 (description
3148 "Sphinx extension to support docstrings in Numpy format.")
3149 (license license:bsd-2)))
3150
3151 (define-public python2-numpydoc
3152 (package-with-python2 python-numpydoc))
3153
3154 (define-public python-numexpr
3155 (package
3156 (name "python-numexpr")
3157 (version "2.6.5")
3158 (source
3159 (origin
3160 (method url-fetch)
3161 (uri (pypi-uri "numexpr" version))
3162 (sha256
3163 (base32
3164 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3165 (build-system python-build-system)
3166 (arguments `(#:tests? #f)) ; no tests included
3167 (propagated-inputs
3168 `(("python-numpy" ,python-numpy)))
3169 (home-page "https://github.com/pydata/numexpr")
3170 (synopsis "Fast numerical expression evaluator for NumPy")
3171 (description
3172 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3173 expressions that operate on arrays are accelerated and use less memory than
3174 doing the same calculation in Python. In addition, its multi-threaded
3175 capabilities can make use of all your cores, which may accelerate
3176 computations, most specially if they are not memory-bounded (e.g. those using
3177 transcendental functions).")
3178 (license license:expat)))
3179
3180 (define-public python2-numexpr
3181 (package-with-python2 python-numexpr))
3182
3183 (define-public python-cycler
3184 (package
3185 (name "python-cycler")
3186 (version "0.10.0")
3187 (source (origin
3188 (method url-fetch)
3189 (uri (pypi-uri "cycler" version))
3190 (sha256
3191 (base32
3192 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3193 (build-system python-build-system)
3194 (arguments
3195 ;; XXX: The current version requires 'coveralls' which we don't have.
3196 ;; Enable this for the next release which uses 'python-pytest'.
3197 '(#:tests? #f))
3198 (propagated-inputs
3199 `(("python-six" ,python-six)))
3200 (home-page "http://matplotlib.org/cycler/")
3201 (synopsis "Composable keyword argument iterator")
3202 (description
3203 "When using @code{matplotlib} and plotting more than one line, it is
3204 common to want to be able to want to be able to cycle over one or more artist
3205 styles; but the plotting logic can quickly become involved.
3206 To address this and enable easy cycling over arbitrary @code{kwargs}, the
3207 @code{Cycler} class was developed.")
3208 (license license:bsd-3)))
3209
3210 (define-public python2-cycler
3211 (package-with-python2 python-cycler))
3212
3213 (define-public python-colorspacious
3214 (package
3215 (name "python-colorspacious")
3216 (version "1.1.0")
3217 (source
3218 (origin
3219 (method url-fetch)
3220 (uri (string-append "https://github.com/njsmith/colorspacious/archive/v"
3221 version ".tar.gz"))
3222 (file-name (string-append name "-" version))
3223 (sha256
3224 (base32 "1vflh5jm32qb0skza2i8pjacv09w6gq84fqpp2nj77s0rbmzgr4k"))))
3225 (build-system python-build-system)
3226 (propagated-inputs
3227 `(("python-numpy" ,python-numpy)))
3228 (native-inputs
3229 `(("python-nose" ,python-nose)))
3230 (arguments
3231 `(#:phases
3232 (modify-phases %standard-phases
3233 (replace 'check
3234 (lambda _
3235 (zero? (system* "nosetests" "--all-modules" "-v" "colorspacious")))))))
3236 (home-page "https://github.com/njsmith/colorspacious")
3237 (synopsis "Python library for colorspace conversions")
3238 (description "@code{colorspacious} is a Python library that lets you
3239 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3240 (license license:expat)))
3241
3242 (define-public python2-colorspacious
3243 (package-with-python2 python-colorspacious))
3244
3245 (define-public python-matplotlib
3246 (package
3247 (name "python-matplotlib")
3248 (version "2.2.3")
3249 (source
3250 (origin
3251 (method url-fetch)
3252 (uri (pypi-uri "matplotlib" version))
3253 (sha256
3254 (base32
3255 "1rcc7x9ig3hpchkc4cwdvym3y451w74275fxr455zkfagrsvymbk"))))
3256 (build-system python-build-system)
3257 (propagated-inputs ; the following packages are all needed at run time
3258 `(("python-cycler" ,python-cycler)
3259 ("python-kiwisolver" ,python-kiwisolver)
3260 ("python-pyparsing" ,python-pyparsing)
3261 ("python-pygobject" ,python-pygobject)
3262 ("gobject-introspection" ,gobject-introspection)
3263 ("python-tkinter" ,python "tk")
3264 ("python-dateutil" ,python-dateutil)
3265 ("python-numpy" ,python-numpy)
3266 ("python-pillow" ,python-pillow)
3267 ("python-pytz" ,python-pytz)
3268 ("python-six" ,python-six)
3269 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3270 ;; from 'gtk+') provides the required 'typelib' files used by
3271 ;; 'gobject-introspection'. The location of these files is set with the
3272 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3273 ;; is done automatically by a 'native-search-path' procedure. However,
3274 ;; at run-time the user must set this variable as follows:
3275 ;;
3276 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
3277 ("gtk+" ,gtk+)
3278 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3279 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3280 ;; object. For this reason we need to import both libraries.
3281 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3282 ("python-pycairo" ,python-pycairo)
3283 ;; XXX: qtwebkit cannot be built reliably.
3284 ("python-pyqt" ,python-pyqt-without-qtwebkit)
3285 ("python-cairocffi" ,python-cairocffi)))
3286 (inputs
3287 `(("libpng" ,libpng)
3288 ("imagemagick" ,imagemagick)
3289 ("freetype" ,freetype)
3290 ("cairo" ,cairo)
3291 ("glib" ,glib)
3292 ;; FIXME: Add backends when available.
3293 ;("python-wxpython" ,python-wxpython)
3294 ("tcl" ,tcl)
3295 ("tk" ,tk)))
3296 (native-inputs
3297 `(("pkg-config" ,pkg-config)
3298 ("python-nose" ,python-nose)
3299 ("python-mock" ,python-mock)))
3300 (arguments
3301 `(#:phases
3302 (modify-phases %standard-phases
3303 (add-before 'build 'configure-environment
3304 (lambda* (#:key outputs inputs #:allow-other-keys)
3305 (let ((cairo (assoc-ref inputs "cairo"))
3306 (gtk+ (assoc-ref inputs "gtk+")))
3307 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3308 ;; has not effect.
3309 (setenv "LD_LIBRARY_PATH"
3310 (string-append cairo "/lib:" gtk+ "/lib"))
3311 (setenv "HOME" (getcwd))
3312 (call-with-output-file "setup.cfg"
3313 (lambda (port)
3314 (format port "[directories]~%
3315 basedirlist = ~a,~a~%
3316 [rc_options]~%
3317 backend = TkAgg~%"
3318 (assoc-ref inputs "tcl")
3319 (assoc-ref inputs "tk")))))
3320 #t)))))
3321 (home-page "http://matplotlib.org")
3322 (synopsis "2D plotting library for Python")
3323 (description
3324 "Matplotlib is a Python 2D plotting library which produces publication
3325 quality figures in a variety of hardcopy formats and interactive environments
3326 across platforms. Matplotlib can be used in Python scripts, the python and
3327 ipython shell, web application servers, and six graphical user interface
3328 toolkits.")
3329 (license license:psfl)
3330 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3331
3332 (define-public python2-matplotlib
3333 (let ((matplotlib (package-with-python2
3334 (strip-python2-variant python-matplotlib))))
3335 (package (inherit matplotlib)
3336 ;; Make sure to use special packages for Python 2 instead
3337 ;; of those automatically rewritten by package-with-python2.
3338 (propagated-inputs
3339 `(("python2-pycairo" ,python2-pycairo)
3340 ("python2-backports-functools-lru-cache"
3341 ,python2-backports-functools-lru-cache)
3342 ("python2-functools32" ,python2-functools32)
3343 ("python2-pygobject-2" ,python2-pygobject-2)
3344 ("python2-subprocess32" ,python2-subprocess32)
3345 ("python2-tkinter" ,python-2 "tk")
3346 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3347 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
3348
3349 (define-public python-matplotlib-documentation
3350 (package
3351 (name "python-matplotlib-documentation")
3352 (version (package-version python-matplotlib))
3353 (source (package-source python-matplotlib))
3354 (build-system python-build-system)
3355 (native-inputs
3356 `(("python-matplotlib" ,python-matplotlib)
3357 ("python-colorspacious" ,python-colorspacious)
3358 ("python-sphinx" ,python-sphinx)
3359 ("python-sphinx-gallery" ,python-sphinx-gallery)
3360 ("python-numpydoc" ,python-numpydoc)
3361 ("python-ipython" ,python-ipython)
3362 ("python-mock" ,python-mock)
3363 ("graphviz" ,graphviz)
3364 ("texlive" ,texlive)
3365 ("texinfo" ,texinfo)
3366 ,@(package-native-inputs python-matplotlib)))
3367 (arguments
3368 `(#:tests? #f ; we're only generating documentation
3369 #:phases
3370 (modify-phases %standard-phases
3371 (replace 'build
3372 (lambda _
3373 (chdir "doc")
3374 ;; Produce pdf in 'A4' format.
3375 (substitute* "conf.py"
3376 (("latex_paper_size = 'letter'") "")
3377 ;; latex_paper_size is deprecated -> set paper size using
3378 ;; latex_elements
3379 (("latex_elements\\['pointsize'\\] = '11pt'" match)
3380 ;; insert at a point where latex_elements{} is defined:
3381 (string-append match "\nlatex_elements['papersize'] = 'a4paper'")))
3382 (invoke "make" "SPHINXBUILD=sphinx-build" "html" "latex" "texinfo")))
3383 (replace 'install
3384 (lambda* (#:key inputs outputs #:allow-other-keys)
3385 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3386 (doc (string-append data "/doc/python-matplotlib-" ,version))
3387 (info (string-append data "/info"))
3388 (html (string-append doc "/html")))
3389 (mkdir-p html)
3390 (mkdir-p info)
3391 (copy-recursively "build/html" html)
3392 (symlink (string-append html "/_images")
3393 (string-append info "/matplotlib-figures"))
3394 (with-directory-excursion "build/texinfo"
3395 (substitute* "matplotlib.texi"
3396 (("@image\\{([^,]*)" all file)
3397 (string-append "@image{matplotlib-figures/" file)))
3398 (symlink (string-append html "/_images")
3399 "./matplotlib-figures")
3400 (system* "makeinfo" "--no-split"
3401 "-o" "matplotlib.info" "matplotlib.texi"))
3402 (copy-file "build/texinfo/matplotlib.info"
3403 (string-append info "/matplotlib.info"))
3404 (copy-file "build/latex/Matplotlib.pdf"
3405 (string-append doc "/Matplotlib.pdf")))
3406 #t)))))
3407 (home-page (package-home-page python-matplotlib))
3408 (synopsis "Documentation for the python-matplotlib package")
3409 (description (package-description python-matplotlib))
3410 (license (package-license python-matplotlib))))
3411
3412 (define-public python2-matplotlib-documentation
3413 (package-with-python2 python-matplotlib-documentation))
3414
3415 (define-public python2-pysnptools
3416 (package
3417 (name "python2-pysnptools")
3418 (version "0.3.13")
3419 (source
3420 (origin
3421 (method url-fetch)
3422 (uri (pypi-uri "pysnptools" version))
3423 (sha256
3424 (base32
3425 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
3426 (build-system python-build-system)
3427 (arguments
3428 `(#:python ,python-2 ; only Python 2.7 is supported
3429 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
3430 (propagated-inputs
3431 `(("python2-numpy" ,python2-numpy)
3432 ("python2-scipy" ,python2-scipy)
3433 ("python2-pandas" ,python2-pandas)))
3434 (native-inputs
3435 `(("python2-cython" ,python2-cython)))
3436 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
3437 (synopsis "Library for reading and manipulating genetic data")
3438 (description
3439 "PySnpTools is a library for reading and manipulating genetic data. It
3440 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
3441 those files. It can also efficiently manipulate ranges of integers using set
3442 operators such as union, intersection, and difference.")
3443 (license license:asl2.0)))
3444
3445 (define-public python-scipy
3446 (package
3447 (name "python-scipy")
3448 (version "1.1.0")
3449 (source
3450 (origin
3451 (method url-fetch)
3452 (uri (pypi-uri "scipy" version))
3453 (sha256
3454 (base32
3455 "1lfg686w6vv2m2dfs8v9d0bf2i18z7wz5vgzjnkgmpr4hi0550w7"))))
3456 (build-system python-build-system)
3457 (propagated-inputs
3458 `(("python-numpy" ,python-numpy)
3459 ("python-matplotlib" ,python-matplotlib)
3460 ("python-pyparsing" ,python-pyparsing)))
3461 (inputs
3462 `(("lapack" ,lapack)
3463 ("openblas" ,openblas)))
3464 (native-inputs
3465 `(("python-cython" ,python-cython)
3466 ("python-pytest" ,python-pytest)
3467 ("python-sphinx" ,python-sphinx)
3468 ("python-numpydoc" ,python-numpydoc)
3469 ("gfortran" ,gfortran)
3470 ("perl" ,perl)
3471 ("which" ,which)))
3472 (outputs '("out" "doc"))
3473 (arguments
3474 `(#:phases
3475 (modify-phases %standard-phases
3476 (add-after 'unpack 'disable-broken-tests
3477 (lambda _
3478 (substitute* "scipy/sparse/linalg/dsolve/tests/test_linsolve.py"
3479 (("^( +)def test_threads_parallel\\(self\\):" m indent)
3480 (string-append indent
3481 "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
3482 m)))
3483 (substitute* "scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py"
3484 (("^def test_parallel_threads\\(\\):" m)
3485 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
3486 m)))
3487 #t))
3488 (add-before 'build 'configure-openblas
3489 (lambda* (#:key inputs #:allow-other-keys)
3490 (call-with-output-file "site.cfg"
3491 (lambda (port)
3492 (format port
3493 "[blas]
3494 libraries = openblas
3495 library_dirs = ~a/lib
3496 include_dirs = ~a/include
3497
3498 # backslash-n to make emacs happy
3499 \n[atlas]
3500 library_dirs = ~a/lib
3501 atlas_libs = openblas
3502 "
3503 (assoc-ref inputs "openblas")
3504 (assoc-ref inputs "openblas")
3505 (assoc-ref inputs "openblas"))))
3506 #t))
3507 (add-after 'install 'install-doc
3508 (lambda* (#:key inputs outputs #:allow-other-keys)
3509 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3510 (doc (string-append data "/doc/" ,name "-" ,version))
3511 (html (string-append doc "/html"))
3512 (pyver ,(string-append "PYVER=" (version-major+minor
3513 (package-version python))))
3514 ;; By default it tries to run sphinx-build through the Python
3515 ;; interpreter which won't work with our shell wrapper.
3516 (sphinxbuild "SPHINXBUILD=LANG=C sphinx-build"))
3517 ;; Make installed package available for building the
3518 ;; documentation
3519 (add-installed-pythonpath inputs outputs)
3520 (with-directory-excursion "doc"
3521 ;; Fix generation of images for mathematical expressions.
3522 (substitute* (find-files "source" "conf\\.py")
3523 (("pngmath_use_preview = True")
3524 "pngmath_use_preview = False"))
3525 (mkdir-p html)
3526 (invoke "make" "html" pyver sphinxbuild)
3527 (with-directory-excursion "build/html"
3528 (for-each (lambda (file)
3529 (let* ((dir (dirname file))
3530 (tgt-dir (string-append html "/" dir)))
3531 (install-file file html)))
3532 (find-files "." ".*")))))
3533 #t))
3534 ;; Tests can only be run after the library has been installed and not
3535 ;; within the source directory.
3536 (delete 'check)
3537 (add-after 'install 'check
3538 (lambda* (#:key inputs outputs #:allow-other-keys)
3539 (add-installed-pythonpath inputs outputs)
3540 (with-directory-excursion "/tmp"
3541 (invoke "python" "-c"
3542 "import scipy; scipy.test(verbose=2)")))))))
3543 (home-page "https://www.scipy.org/")
3544 (synopsis "The Scipy library provides efficient numerical routines")
3545 (description "The SciPy library is one of the core packages that make up
3546 the SciPy stack. It provides many user-friendly and efficient numerical
3547 routines such as routines for numerical integration and optimization.")
3548 (properties `((python2-variant . ,(delay python2-scipy))))
3549 (license license:bsd-3)))
3550
3551 (define-public python2-scipy
3552 (package-with-python2
3553 (strip-python2-variant python-scipy)))
3554
3555 (define-public python-socksipy-branch
3556 (package
3557 (name "python-socksipy-branch")
3558 (version "1.01")
3559 (source
3560 (origin
3561 (method url-fetch)
3562 (uri (pypi-uri "SocksiPy-branch" version))
3563 (sha256
3564 (base32
3565 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
3566 (build-system python-build-system)
3567 (arguments
3568 `(#:tests? #f)) ; There are no tests
3569 (home-page "https://code.google.com/archive/p/socksipy-branch/")
3570 (synopsis "Python SOCKS module")
3571 (description
3572 "SocksiPy - A Python SOCKS client module. It provides a
3573 socket-like interface that supports connections to any TCP
3574 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
3575 The original version was developed by Dan Haim, this is a
3576 branch created by Mario Vilas to address some open issues,
3577 as the original project seems to have been abandoned circa 2007.")
3578 (license license:bsd-3)))
3579
3580 (define-public python2-socksipy-branch
3581 (package-with-python2 python-socksipy-branch))
3582
3583 (define-public python-pycodestyle
3584 (package
3585 (name "python-pycodestyle")
3586 (version "2.4.0")
3587 (source
3588 (origin
3589 (method url-fetch)
3590 (uri (pypi-uri "pycodestyle" version))
3591 (sha256
3592 (base32
3593 "0fhy4vnlgpjq4qd1wdnl6pvdw7rah0ypmn8c9mkhz8clsndskz6b"))))
3594 (build-system python-build-system)
3595 (home-page "https://pycodestyle.readthedocs.io/")
3596 (synopsis "Python style guide checker")
3597 (description "@code{pycodestyle} (formerly pep8) is a tool to check
3598 Python code against some of the style conventions in
3599 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
3600 (license license:expat)))
3601
3602 (define-public python2-pycodestyle
3603 (package-with-python2 python-pycodestyle))
3604
3605 (define-public python-multidict
3606 (package
3607 (name "python-multidict")
3608 (version "4.2.0")
3609 (source
3610 (origin
3611 (method url-fetch)
3612 (uri (pypi-uri "multidict" version))
3613 (sha256
3614 (base32
3615 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
3616 (build-system python-build-system)
3617 (native-inputs
3618 `(("python-pytest" ,python-pytest)
3619 ("python-pytest-runner" ,python-pytest-runner)))
3620 (home-page "https://github.com/aio-libs/multidict/")
3621 (synopsis "Multidict implementation")
3622 (description "Multidict is dict-like collection of key-value pairs
3623 where key might be occurred more than once in the container.")
3624 (license license:asl2.0)))
3625
3626 (define-public python-orderedmultidict
3627 (package
3628 (name "python-orderedmultidict")
3629 (version "0.7.11")
3630 (source
3631 (origin
3632 (method url-fetch)
3633 (uri (pypi-uri "orderedmultidict" version))
3634 (sha256
3635 (base32
3636 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
3637 (build-system python-build-system)
3638 (arguments
3639 `(#:phases
3640 (modify-phases %standard-phases
3641 (add-after 'unpack 'fix-tests
3642 (lambda _
3643 ;; The package uses nosetest for running the tests.
3644 ;; Adding this initfile allows to run the test suite
3645 ;; without requiring nosetest.
3646 (with-output-to-file "tests/__init__.py" newline)
3647 #t)))))
3648 (propagated-inputs
3649 `(("python-six" ,python-six)))
3650 (native-inputs
3651 `(("python-pycodestyle" ,python-pycodestyle)))
3652 (home-page "https://github.com/gruns/orderedmultidict")
3653 (synopsis "Python Ordered Multivalue Dictionary - omdict")
3654 (description "This package contains a library for ordered multivalue
3655 dictionaries. A multivalue dictionary is a dictionary that can store
3656 multiple values for the same key. An ordered multivalue dictionary is a
3657 multivalue dictionary that retains the order of insertions and deletions.")
3658 (license license:unlicense)))
3659
3660 (define-public python2-orderedmultidict
3661 (package-with-python2 python-orderedmultidict))
3662
3663 (define-public python-autopep8
3664 (package
3665 (name "python-autopep8")
3666 (version "1.3.5")
3667 (source
3668 (origin
3669 (method url-fetch)
3670 (uri (pypi-uri "autopep8" version))
3671 (sha256
3672 (base32
3673 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
3674 (build-system python-build-system)
3675 (propagated-inputs
3676 `(("python-pycodestyle" ,python-pycodestyle)))
3677 (home-page "https://github.com/hhatto/autopep8")
3678 (synopsis "Format Python code according to the PEP 8 style guide")
3679 (description
3680 "@code{autopep8} automatically formats Python code to conform to
3681 the PEP 8 style guide. It uses the pycodestyle utility to determine
3682 what parts of the code needs to be formatted. @code{autopep8} is
3683 capable of fixing most of the formatting issues that can be reported
3684 by pycodestyle.")
3685 (license (license:non-copyleft
3686 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
3687
3688 (define-public python2-autopep8
3689 (package-with-python2 python-autopep8))
3690
3691 (define-public python-distutils-extra
3692 (package
3693 (name "python-distutils-extra")
3694 (version "2.38")
3695 (source
3696 (origin
3697 (method url-fetch)
3698 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
3699 version "/+download/python-distutils-extra-"
3700 version ".tar.gz"))
3701 (sha256
3702 (base32
3703 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
3704 (build-system python-build-system)
3705 (home-page "https://launchpad.net/python-distutils-extra/")
3706 (synopsis "Enhancements to Python's distutils")
3707 (description
3708 "The python-distutils-extra module enables you to easily integrate
3709 gettext support, themed icons, and scrollkeeper-based documentation into
3710 Python's distutils.")
3711 (license license:gpl2)))
3712
3713 (define-public python2-distutils-extra
3714 (package-with-python2 python-distutils-extra))
3715
3716 (define-public python2-elib.intl
3717 (package
3718 (name "python2-elib.intl")
3719 (version "0.0.3")
3720 (source
3721 (origin
3722 ;; This project doesn't tag releases or publish tarballs, so we take
3723 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
3724 (method git-fetch)
3725 (uri (git-reference
3726 (url "https://github.com/dieterv/elib.intl.git")
3727 (commit "d09997cfef")))
3728 (file-name (string-append name "-" version "-checkout"))
3729 (sha256
3730 (base32
3731 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
3732 (build-system python-build-system)
3733 (arguments
3734 ;; incompatible with Python 3 (exception syntax)
3735 `(#:python ,python-2
3736 #:tests? #f))
3737 (home-page "https://github.com/dieterv/elib.intl")
3738 (synopsis "Enhanced internationalization for Python")
3739 (description
3740 "The elib.intl module provides enhanced internationalization (I18N)
3741 services for your Python modules and applications.")
3742 (license license:lgpl3+)))
3743
3744 (define-public python-olefile
3745 (package
3746 (name "python-olefile")
3747 (version "0.45.1")
3748 (source
3749 (origin
3750 (method url-fetch)
3751 (uri (string-append "https://github.com/decalage2/olefile/archive/v"
3752 version ".tar.gz"))
3753 (file-name (string-append name "-" version ".tar.gz"))
3754 (sha256
3755 (base32
3756 "18ai19zwagm6nli14k8bii31ipbab2rp7plrvsm6gmfql551a8ai"))))
3757 (build-system python-build-system)
3758 (home-page
3759 "https://www.decalage.info/python/olefileio")
3760 (synopsis "Read and write Microsoft OLE2 files.")
3761 (description
3762 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
3763 Storage or Compound Document, Microsoft Office). It is an improved version of
3764 the OleFileIO module from PIL, the Python Image Library.")
3765 (license license:bsd-3)))
3766
3767 (define-public python2-olefile
3768 (package-with-python2 python-olefile))
3769
3770 (define-public python-pillow
3771 (package
3772 (name "python-pillow")
3773 (version "5.4.1")
3774 (source
3775 (origin
3776 (method url-fetch)
3777 (uri (pypi-uri "Pillow" version))
3778 (sha256
3779 (base32
3780 "17waygkhhzjd75kajlfw9v57mbb41lcpg6cvkdijqd7smm76ccsj"))))
3781 (build-system python-build-system)
3782 (native-inputs
3783 `(("python-pytest" ,python-pytest)))
3784 (inputs
3785 `(("freetype" ,freetype)
3786 ("lcms" ,lcms)
3787 ("zlib" ,zlib)
3788 ("libjpeg" ,libjpeg)
3789 ("openjpeg" ,openjpeg)
3790 ("libtiff" ,libtiff)
3791 ("libwebp" ,libwebp)))
3792 (propagated-inputs
3793 `(("python-olefile" ,python-olefile)))
3794 (arguments
3795 `(#:phases
3796 (modify-phases %standard-phases
3797 (add-after 'unpack 'patch-ldconfig
3798 (lambda _
3799 (substitute* "setup.py"
3800 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
3801 (delete 'check) ; We must run checks after python-pillow is installed.
3802 (add-after 'install 'check-installed
3803 (lambda* (#:key outputs inputs #:allow-other-keys)
3804 (begin
3805 (setenv "HOME" (getcwd))
3806 ;; Make installed package available for running the tests.
3807 (add-installed-pythonpath inputs outputs)
3808 (invoke "python" "selftest.py" "--installed")
3809 (invoke "python" "-m" "pytest" "-vv")))))))
3810 (home-page "https://python-pillow.org")
3811 (synopsis "Fork of the Python Imaging Library")
3812 (description
3813 "The Python Imaging Library adds image processing capabilities to your
3814 Python interpreter. This library provides extensive file format support, an
3815 efficient internal representation, and fairly powerful image processing
3816 capabilities. The core image library is designed for fast access to data
3817 stored in a few basic pixel formats. It should provide a solid foundation for
3818 a general image processing tool.")
3819 (license (license:x11-style
3820 "http://www.pythonware.com/products/pil/license.htm"
3821 "The PIL Software License"))))
3822
3823 (define-public python2-pillow
3824 (package-with-python2 python-pillow))
3825
3826 (define-public python-pycparser
3827 (package
3828 (name "python-pycparser")
3829 (version "2.18")
3830 (source
3831 (origin
3832 (method url-fetch)
3833 (uri (pypi-uri "pycparser" version))
3834 (sha256
3835 (base32
3836 "09mjyw82ibqzl449g7swy8bfxnfpmas0815d2rkdjlcqw81wma4r"))))
3837 (outputs '("out" "doc"))
3838 (build-system python-build-system)
3839 (native-inputs
3840 `(("pkg-config" ,pkg-config)))
3841 (arguments
3842 `(#:phases
3843 (modify-phases %standard-phases
3844 (replace 'check
3845 (lambda _
3846 (with-directory-excursion "tests"
3847 (invoke "python" "all_tests.py"))
3848 #t))
3849 (add-after 'install 'install-doc
3850 (lambda* (#:key outputs #:allow-other-keys)
3851 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3852 (doc (string-append data "/doc/" ,name "-" ,version))
3853 (examples (string-append doc "/examples")))
3854 (mkdir-p examples)
3855 (for-each (lambda (file)
3856 (copy-file (string-append "." file)
3857 (string-append doc file)))
3858 '("/README.rst" "/CHANGES" "/LICENSE"))
3859 (copy-recursively "examples" examples)))))))
3860 (home-page "https://github.com/eliben/pycparser")
3861 (synopsis "C parser in Python")
3862 (description
3863 "Pycparser is a complete parser of the C language, written in pure Python
3864 using the PLY parsing library. It parses C code into an AST and can serve as
3865 a front-end for C compilers or analysis tools.")
3866 (license license:bsd-3)))
3867
3868 (define-public python2-pycparser
3869 (package-with-python2 python-pycparser))
3870
3871 (define-public python-pywavelets
3872 (package
3873 (name "python-pywavelets")
3874 (version "1.0.1")
3875 (home-page "https://github.com/PyWavelets/pywt")
3876 (source (origin
3877 (method url-fetch)
3878 (uri (pypi-uri "PyWavelets" version))
3879 (sha256
3880 (base32
3881 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
3882 (build-system python-build-system)
3883 (arguments
3884 '(#:modules ((ice-9 ftw)
3885 (srfi srfi-1)
3886 (srfi srfi-26)
3887 (guix build utils)
3888 (guix build python-build-system))
3889 #:phases (modify-phases %standard-phases
3890 (replace 'check
3891 (lambda _
3892 (let ((cwd (getcwd))
3893 (libdir (find (cut string-prefix? "lib." <>)
3894 (scandir "build"))))
3895 (with-directory-excursion (string-append cwd "/build/" libdir)
3896 (invoke "nosetests" "-v" "."))))))))
3897 (native-inputs
3898 `(("python-matplotlib" ,python-matplotlib) ;for tests
3899 ("python-nose" ,python-nose)))
3900 (propagated-inputs
3901 `(("python-numpy" ,python-numpy)))
3902 (synopsis "Wavelet transforms in Python")
3903 (description
3904 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
3905 mathematical basis functions that are localized in both time and frequency.
3906 Wavelet transforms are time-frequency transforms employing wavelets. They are
3907 similar to Fourier transforms, the difference being that Fourier transforms are
3908 localized only in frequency instead of in time and frequency.")
3909 (license license:expat)))
3910
3911 (define-public python2-pywavelets
3912 (package-with-python2 python-pywavelets))
3913
3914 (define-public python-xcffib
3915 (package
3916 (name "python-xcffib")
3917 (version "0.6.0")
3918 (source
3919 (origin
3920 (method url-fetch)
3921 (uri (pypi-uri "xcffib" version))
3922 (sha256
3923 (base32
3924 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
3925 (build-system python-build-system)
3926 (inputs
3927 `(("libxcb" ,libxcb)))
3928 (propagated-inputs
3929 `(("python-cffi" ,python-cffi) ; used at run time
3930 ("python-six" ,python-six)))
3931 (arguments
3932 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
3933 #:tests? #f
3934 #:phases
3935 (modify-phases %standard-phases
3936 (add-after 'unpack 'fix-libxcb-path
3937 (lambda* (#:key inputs #:allow-other-keys)
3938 (let ((libxcb (assoc-ref inputs "libxcb")))
3939 (substitute* '("xcffib/__init__.py")
3940 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
3941 #t)))
3942 (add-after 'install 'install-doc
3943 (lambda* (#:key outputs #:allow-other-keys)
3944 (let ((doc (string-append (assoc-ref outputs "out") "/share"
3945 "/doc/" ,name "-" ,version)))
3946 (mkdir-p doc)
3947 (copy-file "README.md"
3948 (string-append doc "/README.md"))
3949 #t))))))
3950 (home-page "https://github.com/tych0/xcffib")
3951 (synopsis "XCB Python bindings")
3952 (description
3953 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
3954 support for Python 3 and PyPy. It is based on cffi.")
3955 (license license:expat)))
3956
3957 (define-public python2-xcffib
3958 (package-with-python2 python-xcffib))
3959
3960 (define-public python-cairocffi
3961 (package
3962 (name "python-cairocffi")
3963 (version "0.9.0")
3964 (source
3965 (origin
3966 (method url-fetch)
3967 (uri (pypi-uri "cairocffi" version))
3968 (sha256
3969 (base32
3970 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
3971 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
3972 (build-system python-build-system)
3973 (outputs '("out" "doc"))
3974 (inputs
3975 `(("glib" ,glib)
3976 ("gtk+" ,gtk+)
3977 ("gdk-pixbuf" ,gdk-pixbuf)
3978 ("cairo" ,cairo)
3979 ("pango" ,pango)))
3980 (native-inputs
3981 `(("pkg-config" ,pkg-config)
3982 ("python-pytest" ,python-pytest)
3983 ("python-pytest-cov" ,python-pytest-cov)
3984 ("python-pytest-runner" ,python-pytest-runner)
3985 ("python-sphinx" ,python-sphinx)
3986 ("python-docutils" ,python-docutils)))
3987 (propagated-inputs
3988 `(("python-xcffib" ,python-xcffib))) ; used at run time
3989 (arguments
3990 `(#:phases
3991 (modify-phases %standard-phases
3992 (add-after 'unpack 'patch-paths
3993 (lambda* (#:key inputs outputs #:allow-other-keys)
3994 (substitute* (find-files "." "\\.py$")
3995 (("dlopen\\(ffi, 'cairo'")
3996 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
3997 "/lib/libcairo.so.2'"))
3998 (("dlopen\\(ffi, 'gdk-3'")
3999 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
4000 "/lib/libgtk-3.so.0'"))
4001 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
4002 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
4003 "/lib/libgdk_pixbuf-2.0.so.0'"))
4004 (("dlopen\\(ffi, 'glib-2.0'")
4005 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4006 "/lib/libglib-2.0.so.0'"))
4007 (("dlopen\\(ffi, 'gobject-2.0'")
4008 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4009 "/lib/libgobject-2.0.so.0'"))
4010 (("dlopen\\(ffi, 'pangocairo-1.0'")
4011 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4012 "/lib/libpangocairo-1.0.so.0'"))
4013 (("dlopen\\(ffi, 'pango-1.0'")
4014 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4015 "/lib/libpango-1.0.so.0'")))
4016 #t))
4017 (add-after 'install 'install-doc
4018 (lambda* (#:key inputs outputs #:allow-other-keys)
4019 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4020 (doc (string-append data "/doc/" ,name "-" ,version))
4021 (html (string-append doc "/html")))
4022 (setenv "LD_LIBRARY_PATH"
4023 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4024 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4025 (setenv "LANG" "en_US.UTF-8")
4026 (mkdir-p html)
4027 (for-each (lambda (file)
4028 (copy-file (string-append "." file)
4029 (string-append doc file)))
4030 '("/README.rst" "/CHANGES" "/LICENSE"))
4031 (system* "python" "setup.py" "build_sphinx")
4032 (copy-recursively "docs/_build/html" html)
4033 #t))))))
4034 (home-page "https://github.com/Kozea/cairocffi")
4035 (synopsis "Python bindings and object-oriented API for Cairo")
4036 (description
4037 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4038 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4039 graphics library with support for multiple backends including image buffers,
4040 PNG, PostScript, PDF, and SVG file output.")
4041 (license license:bsd-3)))
4042
4043 (define-public python2-cairocffi
4044 (package-with-python2 python-cairocffi))
4045
4046 (define-public python-decorator
4047 (package
4048 (name "python-decorator")
4049 (version "4.3.0")
4050 (source
4051 (origin
4052 (method url-fetch)
4053 (uri (pypi-uri "decorator" version))
4054 (sha256
4055 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
4056 (build-system python-build-system)
4057 (home-page "https://pypi.python.org/pypi/decorator/")
4058 (synopsis "Python module to simplify usage of decorators")
4059 (description
4060 "The aim of the decorator module is to simplify the usage of decorators
4061 for the average programmer, and to popularize decorators usage giving examples
4062 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4063 etc. The core of this module is a decorator factory.")
4064 (license license:expat)))
4065
4066 (define-public python2-decorator
4067 (package-with-python2 python-decorator))
4068
4069 (define-public python-drmaa
4070 (package
4071 (name "python-drmaa")
4072 (version "0.7.7")
4073 (source
4074 (origin
4075 (method url-fetch)
4076 (uri (pypi-uri "drmaa" version))
4077 (sha256
4078 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4079 (build-system python-build-system)
4080 ;; The test suite requires libdrmaa which is provided by the cluster
4081 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4082 ;; should be set to the path of the libdrmaa library.
4083 (arguments '(#:tests? #f))
4084 (native-inputs
4085 `(("python-nose" ,python-nose)))
4086 (home-page "https://pypi.python.org/pypi/drmaa")
4087 (synopsis "Python bindings for the DRMAA library")
4088 (description
4089 "A Python package for Distributed Resource Management (DRM) job
4090 submission and control. This package is an implementation of the DRMAA 1.0
4091 Python language binding specification.")
4092 (license license:bsd-3)))
4093
4094 (define-public python2-drmaa
4095 (package-with-python2 python-drmaa))
4096
4097 (define-public python-grako
4098 (package
4099 (name "python-grako")
4100 (version "3.99.9")
4101 (source
4102 (origin
4103 (method url-fetch)
4104 (uri
4105 (pypi-uri "grako" version ".zip"))
4106 (sha256
4107 (base32
4108 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4109 (build-system python-build-system)
4110 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4111 (native-inputs
4112 `(("unzip" ,unzip)
4113 ("python-pytest" ,python-pytest)
4114 ("python-pytest-runner" ,python-pytest-runner)))
4115 (home-page "https://bitbucket.org/neogeny/grako")
4116 (synopsis "EBNF parser generator")
4117 (description
4118 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4119 memoizing PEG/Packrat parser in Python.")
4120 (license license:bsd-3)))
4121
4122 (define-public python2-grako
4123 (package-with-python2 python-grako))
4124
4125 (define-public python-gridmap
4126 (package
4127 (name "python-gridmap")
4128 (version "0.13.0")
4129 (source
4130 (origin
4131 (method url-fetch)
4132 (uri (string-append
4133 "https://github.com/pygridtools/gridmap/archive/v"
4134 version ".tar.gz"))
4135 (file-name (string-append name "-" version ".tar.gz"))
4136 (sha256
4137 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
4138 (build-system python-build-system)
4139 (arguments
4140 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4141 (propagated-inputs
4142 `(("python-psutil" ,python-psutil)
4143 ("python-drmaa" ,python-drmaa)
4144 ("python-pyzmq" ,python-pyzmq)))
4145 (home-page "https://github.com/pygridtools/gridmap")
4146 (synopsis "Create jobs on a cluster directly from Python")
4147 (description
4148 "Gridmap is a Python package to allow you to easily create jobs on the
4149 cluster directly from Python. You can directly map Python functions onto the
4150 cluster without needing to write any wrapper code yourself.")
4151 (license license:gpl3+)))
4152
4153 (define-public python2-gridmap
4154 (package-with-python2 python-gridmap))
4155
4156 (define-public python-honcho
4157 (package
4158 (name "python-honcho")
4159 (version "1.0.1")
4160 (source
4161 (origin
4162 (method url-fetch)
4163 (uri (string-append
4164 "https://github.com/nickstenning/honcho/archive/v"
4165 version ".tar.gz"))
4166 (file-name (string-append name "-" version ".tar.gz"))
4167 (sha256
4168 (base32 "0zizn61n5z5hq421hkypk9pw8s6fpxw30f4hsg7k4ivwzy3gjw9j"))))
4169 (build-system python-build-system)
4170 (native-inputs
4171 `(("python-pytest" ,python-pytest)
4172 ("python-mock" ,python-mock)
4173 ("python-tox" ,python-tox)
4174 ("which" ,which))) ;for tests
4175 (propagated-inputs
4176 `(("python-jinja2" ,python-jinja2)))
4177 (arguments
4178 `(#:phases
4179 (modify-phases %standard-phases
4180 (delete 'check)
4181 (add-after 'install 'check
4182 (lambda* (#:key outputs inputs #:allow-other-keys)
4183 ;; fix honcho path in testsuite
4184 (substitute* "tests/conftest.py"
4185 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
4186 "/bin/honcho" "'")))
4187 ;; It's easier to run tests after install.
4188 ;; Make installed package available for running the tests
4189 (add-installed-pythonpath inputs outputs)
4190 (invoke "py.test" "-v"))))))
4191 (home-page "https://github.com/nickstenning/honcho")
4192 (synopsis "Manage Procfile-based applications")
4193 (description
4194 "A Procfile is a file which describes how to run an application
4195 consisting of serveral processes. honcho starts all listed processes.
4196 The output of all running processes is collected by honcho and
4197 displayed.")
4198 (license license:expat)))
4199
4200 (define-public python2-honcho
4201 (package-with-python2 python-honcho))
4202
4203 (define-public python-pexpect
4204 (package
4205 (name "python-pexpect")
4206 (version "4.6.0")
4207 (source
4208 (origin
4209 (method url-fetch)
4210 (uri (pypi-uri "pexpect" version))
4211 (sha256
4212 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
4213 (build-system python-build-system)
4214 (arguments
4215 `(#:phases
4216 (modify-phases %standard-phases
4217 (add-before 'check 'prepare-tests
4218 (lambda _
4219 (substitute* (find-files "tests")
4220 (("/bin/ls") (which "ls"))
4221 (("/bin/echo") (which "echo"))
4222 (("/bin/which") (which "which"))
4223 ;; Many tests try to use the /bin directory which
4224 ;; is not present in the build environment.
4225 ;; Use one that's non-empty and unlikely to change.
4226 (("/bin'") "/dev'"))
4227 ;; XXX: Socket connection test gets "Connection reset by peer".
4228 ;; Why does it not work? Delete for now.
4229 (delete-file "tests/test_socket.py")
4230 #t))
4231 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
4232 (native-inputs
4233 `(("python-nose" ,python-nose)
4234 ("python-pytest" ,python-pytest)
4235 ("man-db" ,man-db)
4236 ("which" ,which)
4237 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
4238 (propagated-inputs
4239 `(("python-ptyprocess" ,python-ptyprocess)))
4240 (home-page "http://pexpect.readthedocs.org/")
4241 (synopsis "Controlling interactive console applications")
4242 (description
4243 "Pexpect is a pure Python module for spawning child applications;
4244 controlling them; and responding to expected patterns in their output.
4245 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4246 child application and control it as if a human were typing commands.")
4247 (license license:isc)))
4248
4249 (define-public python2-pexpect
4250 (package-with-python2 python-pexpect))
4251
4252 (define-public python-setuptools-scm
4253 (package
4254 (name "python-setuptools-scm")
4255 (version "3.1.0")
4256 (source (origin
4257 (method url-fetch)
4258 (uri (pypi-uri "setuptools_scm" version))
4259 (sha256
4260 (base32
4261 "0h4bglwfz8b9prqljv8z3w9rgydfyxzaj05bm1y6zs5m6shz548i"))))
4262 (build-system python-build-system)
4263 (home-page "https://github.com/pypa/setuptools_scm/")
4264 (synopsis "Manage Python package versions in SCM metadata")
4265 (description
4266 "Setuptools_scm handles managing your Python package versions in
4267 @dfn{software configuration management} (SCM) metadata instead of declaring
4268 them as the version argument or in a SCM managed file.")
4269 (license license:expat)))
4270
4271 (define-public python2-setuptools-scm
4272 (package-with-python2 python-setuptools-scm))
4273
4274 (define-public python-pathpy
4275 (package
4276 (name "python-pathpy")
4277 (version "11.0.1")
4278 (source
4279 (origin
4280 (method url-fetch)
4281 (uri (pypi-uri "path.py" version))
4282 (sha256
4283 (base32 "07x15v8c7ry9bvycw294c9yq6ky9v2b0dalvgi6rn38ilh69vsz7"))))
4284 ;; (outputs '("out" "doc"))
4285 (build-system python-build-system)
4286 (propagated-inputs
4287 `(("python-appdirs" ,python-appdirs)))
4288 (native-inputs
4289 `(("python-setuptools-scm" ,python-setuptools-scm)
4290 ("python-sphinx" ,python-sphinx)
4291 ("python-rst.linker" ,python-rst.linker)
4292 ("python-pytest" ,python-pytest)
4293 ("python-pytest-runner" ,python-pytest-runner)))
4294 (arguments
4295 ;; FIXME: Documentation and tests require "jaraco.packaging".
4296 `(#:tests? #f))
4297 ;; #:phases
4298 ;; (modify-phases %standard-phases
4299 ;; (add-after 'build 'build-doc
4300 ;; (lambda _
4301 ;; (setenv "LANG" "en_US.UTF-8")
4302 ;; (zero? (system* "python" "setup.py" "build_sphinx"))))
4303 ;; (add-after 'install 'install-doc
4304 ;; (lambda* (#:key outputs #:allow-other-keys)
4305 ;; (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4306 ;; (doc (string-append data "/doc/" ,name "-" ,version))
4307 ;; (html (string-append doc "/html")))
4308 ;; (mkdir-p html)
4309 ;; (for-each (lambda (file)
4310 ;; (copy-file file (string-append doc "/" file)))
4311 ;; '("README.rst" "CHANGES.rst"))
4312 ;; (copy-recursively "build/sphinx/html" html)))))))
4313 (home-page "https://github.com/jaraco/path.py")
4314 (synopsis "Python module wrapper for built-in os.path")
4315 (description
4316 "@code{path.py} implements path objects as first-class entities, allowing
4317 common operations on files to be invoked on those path objects directly.")
4318 (license license:expat)))
4319
4320 (define-public python2-pathpy
4321 (package-with-python2 python-pathpy))
4322
4323 (define-public python-simplegeneric
4324 (package
4325 (name "python-simplegeneric")
4326 (version "0.8.1")
4327 (source
4328 (origin
4329 (method url-fetch)
4330 (uri (string-append "https://pypi.python.org/packages/source/s/"
4331 "simplegeneric/simplegeneric-" version ".zip"))
4332 (sha256
4333 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
4334 (build-system python-build-system)
4335 (native-inputs
4336 `(("unzip" ,unzip)))
4337 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
4338 (synopsis "Python module for simple generic functions")
4339 (description
4340 "The simplegeneric module lets you define simple single-dispatch generic
4341 functions, akin to Python’s built-in generic functions like @code{len()},
4342 @code{iter()} and so on. However, instead of using specially-named methods,
4343 these generic functions use simple lookup tables, akin to those used by
4344 e.g. @code{pickle.dump()} and other generic functions found in the Python
4345 standard library.")
4346 (license license:zpl2.1)))
4347
4348 (define-public python2-simplegeneric
4349 (package-with-python2 python-simplegeneric))
4350
4351 (define-public python-ipython-genutils
4352 ;; TODO: This package is retired, check if can be removed, see description.
4353 (package
4354 (name "python-ipython-genutils")
4355 (version "0.1.0")
4356 (source
4357 (origin
4358 (method url-fetch)
4359 (uri (string-append "https://pypi.python.org/packages/source/i/"
4360 "ipython_genutils/ipython_genutils-"
4361 version ".tar.gz"))
4362 (sha256
4363 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
4364 (build-system python-build-system)
4365 (arguments `(#:tests? #f)) ; no tests
4366 (home-page "https://ipython.org")
4367 (synopsis "Vestigial utilities from IPython")
4368 (description
4369 "This package provides retired utilities from IPython. No packages
4370 outside IPython/Jupyter should depend on it.
4371
4372 This package shouldn't exist. It contains some common utilities shared by
4373 Jupyter and IPython projects during The Big Split. As soon as possible, those
4374 packages will remove their dependency on this, and this package will go
4375 away.")
4376 (license license:bsd-3)))
4377
4378 (define-public python2-ipython-genutils
4379 (package-with-python2 python-ipython-genutils))
4380
4381 (define-public python-traitlets
4382 (package
4383 (name "python-traitlets")
4384 (version "4.3.2")
4385 (source
4386 (origin
4387 (method url-fetch)
4388 (uri (pypi-uri "traitlets" version))
4389 (sha256
4390 (base32
4391 "0dbq7sx26xqz5ixs711k5nc88p8a0nqyz6162pwks5dpcz9d4jww"))))
4392 (build-system python-build-system)
4393 (arguments
4394 `(#:phases
4395 (modify-phases %standard-phases
4396 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
4397 (propagated-inputs
4398 `(("python-ipython-genutils" ,python-ipython-genutils)
4399 ("python-decorator" ,python-decorator))) ;not needed for >4.3.2
4400 (native-inputs
4401 `(("python-pytest" ,python-pytest)))
4402 (properties `((python2-variant . ,(delay python2-traitlets))))
4403 (home-page "https://ipython.org")
4404 (synopsis "Configuration system for Python applications")
4405 (description
4406 "Traitlets is a framework that lets Python classes have attributes with
4407 type checking, dynamically calculated default values, and ‘on change’
4408 callbacks. The package also includes a mechanism to use traitlets for
4409 configuration, loading values from files or from command line arguments. This
4410 is a distinct layer on top of traitlets, so you can use traitlets in your code
4411 without using the configuration machinery.")
4412 (license license:bsd-3)))
4413
4414 (define-public python2-traitlets
4415 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
4416 (package
4417 (inherit traitlets)
4418 (propagated-inputs
4419 `(("python2-enum34" ,python2-enum34)
4420 ,@(package-propagated-inputs traitlets))))))
4421
4422 (define-public python-jupyter-core
4423 (package
4424 (name "python-jupyter-core")
4425 (version "4.4.0")
4426 (source
4427 (origin
4428 (method url-fetch)
4429 (uri (string-append (pypi-uri "jupyter_core" version)))
4430 (sha256
4431 (base32
4432 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
4433 (build-system python-build-system)
4434 ;; FIXME: not sure how to run the tests
4435 (arguments `(#:tests? #f))
4436 (propagated-inputs
4437 `(("python-traitlets" ,python-traitlets)))
4438 (home-page "http://jupyter.org/")
4439 (synopsis "Jupyter base package")
4440 (description
4441 "Jupyter core is the base package on which Jupyter projects rely.")
4442 (license license:bsd-3)))
4443
4444 (define-public python2-jupyter-core
4445 (package-with-python2 python-jupyter-core))
4446
4447 (define-public python-jupyter-client
4448 (package
4449 (name "python-jupyter-client")
4450 (version "5.2.4")
4451 (source
4452 (origin
4453 (method url-fetch)
4454 (uri (pypi-uri "jupyter_client" version))
4455 (sha256
4456 (base32
4457 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
4458 (build-system python-build-system)
4459 ;; Tests fail because of missing native python kernel which I assume is
4460 ;; provided by the ipython package, which we cannot use because it would
4461 ;; cause a dependency cycle.
4462 (arguments `(#:tests? #f))
4463 (propagated-inputs
4464 `(("python-pyzmq" ,python-pyzmq)
4465 ("python-traitlets" ,python-traitlets)
4466 ("python-jupyter-core" ,python-jupyter-core)))
4467 (home-page "http://jupyter.org/")
4468 (synopsis "Jupyter protocol implementation and client libraries")
4469 (description
4470 "The @code{jupyter_client} package contains the reference implementation
4471 of the Jupyter protocol. It also provides client and kernel management APIs
4472 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
4473 installing @code{kernelspec}s for use with Jupyter frontends.")
4474 (license license:bsd-3)))
4475
4476 (define-public python2-jupyter-client
4477 (package-with-python2 python-jupyter-client))
4478
4479 (define-public python-ipykernel
4480 (package
4481 (name "python-ipykernel")
4482 (version "5.1.0")
4483 (source
4484 (origin
4485 (method url-fetch)
4486 (uri (pypi-uri "ipykernel" version))
4487 (sha256
4488 (base32 "0br95qhrd5k65g10djngiy27hs0642301hlf2q142i8djabvzh0g"))))
4489 (build-system python-build-system)
4490 (arguments
4491 `(#:phases
4492 (modify-phases %standard-phases
4493 (replace 'check
4494 (lambda _
4495 (setenv "HOME" "/tmp")
4496 (invoke "pytest" "-v")
4497 #t)))))
4498 (propagated-inputs
4499 `(("python-ipython" ,python-ipython)
4500 ;; imported at runtime during connect
4501 ("python-jupyter-client" ,python-jupyter-client)))
4502 (native-inputs
4503 `(("python-pytest" ,python-pytest)
4504 ("python-nose" ,python-nose)))
4505 (home-page "https://ipython.org")
4506 (synopsis "IPython Kernel for Jupyter")
4507 (description
4508 "This package provides the IPython kernel for Jupyter.")
4509 (license license:bsd-3)))
4510
4511 (define-public python2-ipykernel
4512 (package-with-python2 python-ipykernel))
4513
4514 (define-public python-send2trash
4515 (package
4516 (name "python-send2trash")
4517 (version "1.5.0")
4518 (source
4519 (origin
4520 (method url-fetch)
4521 (uri (pypi-uri "send2trash" version))
4522 (sha256
4523 (base32
4524 "1ci8vcwjmjlp11ljj1ckrfmml9fkq1mclx2gr53y4zvhgp01q030"))))
4525 (build-system python-build-system)
4526 (home-page "https://github.com/hsoft/send2trash")
4527 (synopsis "Send files to trash")
4528 (description
4529 "This package provides a cross-platform mechanism to send files to the
4530 trash.")
4531 (license license:bsd-3)))
4532
4533 (define-public python2-send2trash
4534 (package-with-python2 python-send2trash))
4535
4536 ;; This is the latest release of the LTS version of ipython with support for
4537 ;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
4538 ;; dropped support for Python 2.7. We may want to rename this package.
4539 (define-public python-ipython
4540 (package
4541 (name "python-ipython")
4542 (version "5.8.0")
4543 (source
4544 (origin
4545 (method url-fetch)
4546 (uri (pypi-uri "ipython" version ".tar.gz"))
4547 (sha256
4548 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
4549 (build-system python-build-system)
4550 (outputs '("out" "doc"))
4551 (propagated-inputs
4552 `(("python-pyzmq" ,python-pyzmq)
4553 ("python-prompt-toolkit" ,python-prompt-toolkit-1)
4554 ("python-terminado" ,python-terminado)
4555 ("python-matplotlib" ,python-matplotlib)
4556 ("python-numpy" ,python-numpy)
4557 ("python-numpydoc" ,python-numpydoc)
4558 ("python-jinja2" ,python-jinja2)
4559 ("python-mistune" ,python-mistune)
4560 ("python-pexpect" ,python-pexpect)
4561 ("python-pickleshare" ,python-pickleshare)
4562 ("python-simplegeneric" ,python-simplegeneric)
4563 ("python-jsonschema" ,python-jsonschema)
4564 ("python-traitlets" ,python-traitlets)
4565 ("python-nbformat" ,python-nbformat)
4566 ("python-pygments" ,python-pygments)))
4567 (inputs
4568 `(("readline" ,readline)
4569 ("which" ,which)))
4570 (native-inputs
4571 `(("graphviz" ,graphviz)
4572 ("pkg-config" ,pkg-config)
4573 ("python-requests" ,python-requests) ;; for tests
4574 ("python-testpath" ,python-testpath)
4575 ("python-nose" ,python-nose)
4576 ("python-sphinx" ,python-sphinx)
4577 ("python-shpinx-rtd-theme" ,python-sphinx-rtd-theme)
4578 ;; FIXME: It's possible that a smaller union would work just as well.
4579 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
4580 texlive-fonts-ec
4581 texlive-generic-ifxetex
4582 texlive-generic-pdftex
4583 texlive-latex-amsfonts
4584 texlive-latex-capt-of
4585 texlive-latex-cmap
4586 texlive-latex-environ
4587 texlive-latex-eqparbox
4588 texlive-latex-etoolbox
4589 texlive-latex-expdlist
4590 texlive-latex-fancyhdr
4591 texlive-latex-fancyvrb
4592 texlive-latex-fncychap
4593 texlive-latex-float
4594 texlive-latex-framed
4595 texlive-latex-geometry
4596 texlive-latex-graphics
4597 texlive-latex-hyperref
4598 texlive-latex-mdwtools
4599 texlive-latex-multirow
4600 texlive-latex-oberdiek
4601 texlive-latex-parskip
4602 texlive-latex-preview
4603 texlive-latex-tabulary
4604 texlive-latex-threeparttable
4605 texlive-latex-titlesec
4606 texlive-latex-trimspaces
4607 texlive-latex-ucs
4608 texlive-latex-upquote
4609 texlive-latex-url
4610 texlive-latex-varwidth
4611 texlive-latex-wrapfig)))
4612 ("texinfo" ,texinfo)))
4613 (arguments
4614 `(#:phases
4615 (modify-phases %standard-phases
4616 (add-after 'install 'install-doc
4617 (lambda* (#:key inputs outputs #:allow-other-keys)
4618 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4619 (doc (string-append data "/doc/" ,name "-" ,version))
4620 (html (string-append doc "/html"))
4621 (man1 (string-append data "/man/man1"))
4622 (info (string-append data "/info"))
4623 (examples (string-append doc "/examples"))
4624 (python-arg (string-append "PYTHON=" (which "python"))))
4625 (setenv "LANG" "en_US.utf8")
4626 ;; Make installed package available for running the tests
4627 (add-installed-pythonpath inputs outputs)
4628 (with-directory-excursion "docs"
4629 ;; FIXME: pdf fails to build
4630 ;;(system* "make" "pdf" "PAPER=a4")
4631 (system* "make" python-arg "html")
4632 (system* "make" python-arg "info"))
4633 (copy-recursively "docs/man" man1)
4634 (copy-recursively "examples" examples)
4635 (copy-recursively "docs/build/html" html)
4636 ;; (copy-file "docs/build/latex/ipython.pdf"
4637 ;; (string-append doc "/ipython.pdf"))
4638 (mkdir-p info)
4639 (copy-file "docs/build/texinfo/ipython.info"
4640 (string-append info "/ipython.info"))
4641 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
4642 #t))
4643 ;; Tests can only be run after the library has been installed and not
4644 ;; within the source directory.
4645 (delete 'check)
4646 (add-after 'install 'check
4647 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
4648 (if tests?
4649 (begin
4650 ;; Make installed package available for running the tests
4651 (add-installed-pythonpath inputs outputs)
4652 (setenv "HOME" "/tmp/") ;; required by a test
4653 ;; We only test the core because one of the other tests
4654 ;; tries to import ipykernel.
4655 (invoke "python" "IPython/testing/iptest.py"
4656 "-v" "IPython/core/tests"))
4657 #t)))
4658 (add-before 'check 'fix-tests
4659 (lambda* (#:key inputs #:allow-other-keys)
4660 (substitute* "./IPython/utils/_process_posix.py"
4661 (("/usr/bin/env', 'which") (which "which")))
4662 (substitute* "./IPython/core/tests/test_inputtransformer.py"
4663 (("#!/usr/bin/env python")
4664 (string-append "#!" (which "python"))))
4665 ;; Disable 1 failing test
4666 (substitute* "./IPython/core/tests/test_magic.py"
4667 (("def test_dirops\\(\\):" all)
4668 (string-append "@dec.skipif(True)\n" all)))
4669 ;; This test introduces a circular dependency on ipykernel
4670 ;; (which depends on ipython).
4671 (delete-file "IPython/core/tests/test_display.py")
4672 ;; These tests throw errors for unknown reasons.
4673 (delete-file "IPython/extensions/tests/test_storemagic.py")
4674 (delete-file "IPython/core/tests/test_displayhook.py")
4675 (delete-file "IPython/core/tests/test_interactiveshell.py")
4676 (delete-file "IPython/core/tests/test_pylabtools.py")
4677 (delete-file "IPython/core/tests/test_paths.py")
4678 #t)))))
4679 (home-page "https://ipython.org")
4680 (synopsis "IPython is a tool for interactive computing in Python")
4681 (description
4682 "IPython provides a rich architecture for interactive computing with:
4683 Powerful interactive shells, a browser-based notebook, support for interactive
4684 data visualization, embeddable interpreters and tools for parallel
4685 computing.")
4686 (license license:bsd-3)
4687 (properties `((python2-variant . ,(delay python2-ipython))))))
4688
4689 (define-public python2-ipython
4690 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
4691 (package
4692 (inherit ipython)
4693 ;; FIXME: add pyreadline once available.
4694 (propagated-inputs
4695 `(("python2-backports-shutil-get-terminal-size"
4696 ,python2-backports-shutil-get-terminal-size)
4697 ("python2-pathlib2" ,python2-pathlib2)
4698 ,@(package-propagated-inputs ipython)))
4699 (native-inputs
4700 `(("python2-mock" ,python2-mock)
4701 ,@(package-native-inputs ipython))))))
4702
4703 (define-public python-urwid
4704 (package
4705 (name "python-urwid")
4706 (version "2.0.1")
4707 (source
4708 (origin
4709 (method url-fetch)
4710 (uri (pypi-uri "urwid" version))
4711 (sha256
4712 (base32
4713 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
4714 (build-system python-build-system)
4715 (home-page "http://urwid.org")
4716 (synopsis "Console user interface library for Python")
4717 (description
4718 "Urwid is a curses-based UI/widget library for Python. It includes many
4719 features useful for text console applications.")
4720 (license license:lgpl2.1+)))
4721
4722 (define-public python2-urwid
4723 (package-with-python2 python-urwid))
4724
4725 (define-public python-urwidtrees
4726 (package
4727 (name "python-urwidtrees")
4728 (version "1.0.2")
4729 (source
4730 (origin
4731 (method url-fetch)
4732 ;; package author intends on distributing via github rather than pypi:
4733 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
4734 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
4735 version ".tar.gz"))
4736 (file-name (string-append name "-" version ".tar.gz"))
4737 (sha256
4738 (base32
4739 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
4740 (build-system python-build-system)
4741 (arguments
4742 '(#:tests? #f)) ; no tests
4743 (propagated-inputs `(("python-urwid" ,python-urwid)))
4744 (home-page "https://github.com/pazz/urwidtrees")
4745 (synopsis "Tree widgets for urwid")
4746 (description "Urwidtrees is a Widget Container API for the @code{urwid}
4747 toolkit. Use it to build trees of widgets.")
4748 (license license:gpl3+)))
4749
4750 (define-public python2-urwidtrees
4751 (package-with-python2 python-urwidtrees))
4752
4753 (define-public python-ua-parser
4754 (package
4755 (name "python-ua-parser")
4756 (version "0.8.0")
4757 (source
4758 (origin
4759 (method url-fetch)
4760 (uri (pypi-uri "ua-parser" version))
4761 (sha256
4762 (base32
4763 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
4764 (build-system python-build-system)
4765 (arguments
4766 `(#:tests? #f)) ;no test suite in release
4767 (native-inputs
4768 `(("python-pyyaml" ,python-pyyaml)))
4769 (home-page "https://github.com/ua-parser/uap-python")
4770 (synopsis "User agent parser")
4771 (description
4772 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
4773 (license license:asl2.0)))
4774
4775 (define-public python2-ua-parser
4776 (package-with-python2 python-ua-parser))
4777
4778 (define-public python-user-agents
4779 (package
4780 (name "python-user-agents")
4781 (version "1.1.0")
4782 (source
4783 (origin
4784 (method url-fetch)
4785 (uri (pypi-uri "user-agents" version))
4786 (sha256
4787 (base32
4788 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
4789 (build-system python-build-system)
4790 (arguments
4791 `(#:tests? #f)) ;missing devices.json test file in release
4792 (propagated-inputs
4793 `(("python-ua-parser" ,python-ua-parser)))
4794 (home-page "https://github.com/selwin/python-user-agents")
4795 (synopsis "User Agent strings parsing library")
4796 (description
4797 "A library to identify devices (phones, tablets) and their capabilities by
4798 parsing (browser/HTTP) user agent strings.")
4799 (license license:expat)))
4800
4801 (define-public python2-user-agents
4802 (package-with-python2 python-user-agents))
4803
4804 (define-public python-dbus
4805 (package
4806 (name "python-dbus")
4807 (version "1.2.8")
4808 (source
4809 (origin
4810 (method url-fetch)
4811 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
4812 "dbus-python-" version ".tar.gz"))
4813 (sha256
4814 (base32
4815 "0vvvjmiwnc9cjlks3gcdk43ap7llhlpz7cm1wbw0nc2yfsxjpwdb"))))
4816 (build-system gnu-build-system)
4817 (arguments
4818 '(#:phases
4819 (modify-phases %standard-phases
4820 (add-before
4821 'check 'pre-check
4822 (lambda _
4823 ;; XXX: For the missing '/etc/machine-id'.
4824 (substitute* "test/run-test.sh"
4825 (("DBUS_FATAL_WARNINGS=1")
4826 "DBUS_FATAL_WARNINGS=0"))
4827 #t)))))
4828 (native-inputs
4829 `(("pkg-config" ,pkg-config)))
4830 (inputs
4831 `(("python" ,python-wrapper)
4832 ("dbus-glib" ,dbus-glib)))
4833 (synopsis "Python bindings for D-bus")
4834 (description "python-dbus provides bindings for libdbus, the reference
4835 implementation of D-Bus.")
4836 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
4837 (license license:expat)))
4838
4839 (define-public python2-dbus
4840 (package (inherit python-dbus)
4841 (name "python2-dbus")
4842 (inputs `(("python" ,python-2)
4843 ,@(alist-delete "python"
4844 (package-inputs python-dbus)
4845 equal?)))
4846 ;; FIXME: on Python 2, the test_utf8 fails with:
4847 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
4848 (arguments `(#:tests? #f))))
4849
4850 (define-public python-lxml
4851 (package
4852 (name "python-lxml")
4853 (version "4.2.5")
4854 (source
4855 (origin
4856 (method url-fetch)
4857 (uri (pypi-uri "lxml" version))
4858 (sha256
4859 (base32
4860 "0zw0y9hs0nflxhl9cs6ipwwh53szi3w2x06wl0k9cylyqac0cwin"))))
4861 (build-system python-build-system)
4862 (inputs
4863 `(("libxml2" ,libxml2)
4864 ("libxslt" ,libxslt)))
4865 (home-page "http://lxml.de/")
4866 (synopsis
4867 "Python XML processing library")
4868 (description
4869 "The lxml XML toolkit is a Pythonic binding for the C libraries
4870 libxml2 and libxslt.")
4871 (license license:bsd-3))) ; and a few more, see LICENSES.txt
4872
4873 (define-public python2-lxml
4874 (package-with-python2 python-lxml))
4875
4876 ;; beautifulsoup4 has a totally different namespace than 3.x,
4877 ;; and pypi seems to put it under its own name, so I guess we should too
4878 (define-public python-beautifulsoup4
4879 (package
4880 (name "python-beautifulsoup4")
4881 (version "4.6.3")
4882 (source
4883 (origin
4884 (method url-fetch)
4885 (uri (pypi-uri "beautifulsoup4" version))
4886 (sha256
4887 (base32
4888 "041dhalzjciw6qyzzq7a2k4h1yvyk76xigp35hv5ibnn448ydy4h"))))
4889 (build-system python-build-system)
4890 (arguments
4891 `(#:phases
4892 (modify-phases %standard-phases
4893 ;; The Python 2 source is the definitive source of beautifulsoup4. We
4894 ;; must use this conversion script when building with Python 3. The
4895 ;; conversion script also runs the tests.
4896 ;; For more information, see the file 'convert-py3k' in the source
4897 ;; distribution.
4898 (replace 'check
4899 (lambda _ (invoke "./convert-py3k"))))))
4900 (home-page
4901 "https://www.crummy.com/software/BeautifulSoup/bs4/")
4902 (synopsis
4903 "Python screen-scraping library")
4904 (description
4905 "Beautiful Soup is a Python library designed for rapidly setting up
4906 screen-scraping projects. It offers Pythonic idioms for navigating,
4907 searching, and modifying a parse tree, providing a toolkit for
4908 dissecting a document and extracting what you need. It automatically
4909 converts incoming documents to Unicode and outgoing documents to UTF-8.")
4910 (license license:expat)
4911 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
4912
4913 (define-public python2-beautifulsoup4
4914 (package
4915 (inherit (package-with-python2
4916 (strip-python2-variant python-beautifulsoup4)))
4917 (arguments `(#:python ,python-2))))
4918
4919 (define-public python-netifaces
4920 (package
4921 (name "python-netifaces")
4922 (version "0.10.7")
4923 (source
4924 (origin
4925 (method url-fetch)
4926 (uri (pypi-uri "netifaces" version))
4927 (sha256
4928 (base32
4929 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
4930 (build-system python-build-system)
4931 (home-page "https://github.com/al45tair/netifaces")
4932 (synopsis
4933 "Python module for portable network interface information")
4934 (description
4935 "Netifaces is a Python module providing information on network
4936 interfaces in an easy and portable manner.")
4937 (license license:expat)))
4938
4939 (define-public python2-netifaces
4940 (package-with-python2 python-netifaces))
4941
4942 (define-public python-networkx
4943 (package
4944 (name "python-networkx")
4945 (version "2.2")
4946 (source
4947 (origin
4948 (method url-fetch)
4949 (uri (pypi-uri "networkx" version ".zip"))
4950 (sha256
4951 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
4952 (build-system python-build-system)
4953 ;; python-decorator is needed at runtime.
4954 (propagated-inputs
4955 `(("python-decorator" ,python-decorator)))
4956 (native-inputs
4957 `(("python-nose" ,python-nose)
4958 ("unzip" ,unzip)))
4959 (home-page "https://networkx.github.io/")
4960 (synopsis "Python module for creating and manipulating graphs and networks")
4961 (description
4962 "NetworkX is a Python package for the creation, manipulation, and study
4963 of the structure, dynamics, and functions of complex networks.")
4964 (license license:bsd-3)))
4965
4966 (define-public python2-networkx
4967 (package-with-python2 python-networkx))
4968
4969 (define-public python-datrie
4970 (package
4971 (name "python-datrie")
4972 (version "0.7.1")
4973 (source
4974 (origin
4975 (method url-fetch)
4976 (uri (pypi-uri "datrie" version))
4977 (sha256
4978 (base32
4979 "08r0if7dry2q7p34gf7ffyrlnf4bdvnprxgydlfxgfnvq8f3f4bs"))))
4980 (build-system python-build-system)
4981 (arguments
4982 `(#:phases (modify-phases %standard-phases
4983 (add-before 'build 'cythonize
4984 (lambda _
4985 ;; Regenerate Cython classes to solve ABI issues with Python
4986 ;; 3.7.0. See <https://github.com/pytries/datrie/issues/52>.
4987 (invoke "cython" "src/datrie.pyx" "src/cdatrie.pxd"
4988 "src/stdio_ext.pxd" "-a"))))))
4989 (native-inputs
4990 `(("python-cython" ,python-cython)
4991 ("python-hypothesis" ,python-hypothesis)
4992 ("python-pytest" ,python-pytest)
4993 ("python-pytest-runner" ,python-pytest-runner)))
4994 (home-page "https://github.com/kmike/datrie")
4995 (synopsis "Fast, efficiently stored trie for Python")
4996 (description
4997 "This package provides a fast, efficiently stored trie implementation for
4998 Python.")
4999 (license license:lgpl2.1+)))
5000
5001 (define-public snakemake
5002 (package
5003 (name "snakemake")
5004 (version "5.2.4")
5005 (source
5006 (origin
5007 (method url-fetch)
5008 (uri (pypi-uri "snakemake" version))
5009 (sha256
5010 (base32 "0gj0xxgiq3mp9qyyrbfzldiaq1giliqw0in64nqiz7vx49myqj7z"))))
5011 (build-system python-build-system)
5012 (arguments
5013 ;; TODO: Package missing test dependencies.
5014 '(#:tests? #f
5015 #:phases
5016 (modify-phases %standard-phases
5017 ;; For cluster execution Snakemake will call Python. Since there is
5018 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
5019 ;; this by calling the snakemake wrapper instead.
5020 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
5021 (lambda* (#:key outputs #:allow-other-keys)
5022 (substitute* "snakemake/executors.py"
5023 (("\\{sys.executable\\} -m snakemake")
5024 (string-append (assoc-ref outputs "out")
5025 "/bin/snakemake")))
5026 #t)))))
5027 (propagated-inputs
5028 `(("python-gitpython" ,python-gitpython)
5029 ("python-wrapt" ,python-wrapt)
5030 ("python-requests" ,python-requests)
5031 ("python-appdirs" ,python-appdirs)
5032 ("python-configargparse" ,python-configargparse)
5033 ("python-datrie" ,python-datrie)
5034 ("python-docutils" ,python-docutils)
5035 ("python-jinja2" ,python-jinja2)
5036 ("python-jsonschema" ,python-jsonschema)
5037 ("python-networkx" ,python-networkx)
5038 ("python-pyyaml" ,python-pyyaml)
5039 ("python-ratelimiter" ,python-ratelimiter)))
5040 (home-page "https://snakemake.readthedocs.io")
5041 (synopsis "Python-based execution environment for make-like workflows")
5042 (description
5043 "Snakemake aims to reduce the complexity of creating workflows by
5044 providing a clean and modern domain specific specification language (DSL) in
5045 Python style, together with a fast and comfortable execution environment.")
5046 (license license:expat)))
5047
5048 ;; This is currently needed for the pigx-* packages.
5049 (define-public snakemake-4
5050 (package (inherit snakemake)
5051 (version "4.4.0")
5052 (source
5053 (origin
5054 (method url-fetch)
5055 (uri (pypi-uri "snakemake" version))
5056 (sha256
5057 (base32 "0g0paia4z7w3srnqdmavq3hrb2x7qnpf81jx50njl0p7y4y0j8jv"))))
5058 (propagated-inputs
5059 `(("python-wrapt" ,python-wrapt)
5060 ("python-requests" ,python-requests)
5061 ("python-appdirs" ,python-appdirs)
5062 ("python-configargparse" ,python-configargparse)
5063 ("python-pyyaml" ,python-pyyaml)
5064 ("python-ratelimiter" ,python-ratelimiter)))))
5065
5066 (define-public python-pyqrcode
5067 (package
5068 (name "python-pyqrcode")
5069 (version "1.2.1")
5070 (source
5071 (origin
5072 (method url-fetch)
5073 (uri (pypi-uri "PyQRCode" version))
5074 (sha256
5075 (base32
5076 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
5077 (build-system python-build-system)
5078 (home-page
5079 "https://github.com/mnooner256/pyqrcode")
5080 (synopsis "QR code generator")
5081 (description
5082 "Pyqrcode is a QR code generator written purely in Python with
5083 SVG, EPS, PNG and terminal output.")
5084 (license license:bsd-3)))
5085
5086 (define-public python-seaborn
5087 (package
5088 (name "python-seaborn")
5089 (version "0.9.0")
5090 (source
5091 (origin
5092 (method url-fetch)
5093 (uri (pypi-uri "seaborn" version))
5094 (sha256
5095 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))))
5096 (build-system python-build-system)
5097 (arguments
5098 `(#:phases
5099 (modify-phases %standard-phases
5100 (add-before 'check 'start-xserver
5101 (lambda* (#:key inputs #:allow-other-keys)
5102 (let ((xorg-server (assoc-ref inputs "xorg-server")))
5103 ;; There must be a running X server and make check doesn't
5104 ;; start one. Therefore we must do it.
5105 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
5106 (setenv "DISPLAY" ":1")
5107 #t)))
5108 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
5109 (propagated-inputs
5110 `(("python-pandas" ,python-pandas)
5111 ("python-matplotlib" ,python-matplotlib)
5112 ("python-numpy" ,python-numpy)
5113 ("python-scipy" ,python-scipy)))
5114 (native-inputs
5115 `(("python-pytest" ,python-pytest)
5116 ("xorg-server" ,xorg-server)))
5117 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5118 (synopsis "Statistical data visualization")
5119 (description
5120 "Seaborn is a library for making attractive and informative statistical
5121 graphics in Python. It is built on top of matplotlib and tightly integrated
5122 with the PyData stack, including support for numpy and pandas data structures
5123 and statistical routines from scipy and statsmodels.")
5124 (license license:bsd-3)))
5125
5126 (define-public python2-seaborn
5127 (package-with-python2 python-seaborn))
5128
5129 (define-public python-mpmath
5130 (package
5131 (name "python-mpmath")
5132 (version "0.19")
5133 (source (origin
5134 (method url-fetch)
5135 (uri (string-append "http://mpmath.org/files/mpmath-"
5136 version ".tar.gz"))
5137 (sha256
5138 (base32
5139 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
5140 (build-system python-build-system)
5141 (arguments
5142 '(#:phases
5143 (modify-phases %standard-phases
5144 (replace 'check
5145 (lambda _
5146 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
5147 (home-page "http://mpmath.org")
5148 (synopsis "Arbitrary-precision floating-point arithmetic in python")
5149 (description
5150 "@code{mpmath} can be used as an arbitrary-precision substitute for
5151 Python's float/complex types and math/cmath modules, but also does much
5152 more advanced mathematics.")
5153 (license license:bsd-3)))
5154
5155 (define-public python2-mpmath
5156 (package-with-python2 python-mpmath))
5157
5158 (define-public python-bigfloat
5159 (package
5160 (name "python-bigfloat")
5161 (version "0.3.0")
5162 (source
5163 (origin
5164 (method url-fetch)
5165 (uri (pypi-uri "bigfloat" version))
5166 (sha256
5167 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
5168 (build-system python-build-system)
5169 (inputs
5170 `(("mpfr" ,mpfr)))
5171 (home-page "https://github.com/mdickinson/bigfloat")
5172 (synopsis "Arbitrary precision floating-point arithmetic for Python")
5173 (description
5174 "This packages provides a Python interface to the MPFR library for
5175 multiprecision arithmetic.")
5176 (license license:lgpl3+)))
5177
5178 (define-public python2-bigfloat
5179 (package-with-python2 python-bigfloat))
5180
5181 (define-public python-sympy
5182 (package
5183 (name "python-sympy")
5184 (version "1.1.1")
5185 (source
5186 (origin
5187 (method url-fetch)
5188 (uri (string-append
5189 "https://github.com/sympy/sympy/releases/download/sympy-"
5190 version "/sympy-" version ".tar.gz"))
5191 (sha256
5192 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
5193 (build-system python-build-system)
5194 (arguments
5195 `(#:phases
5196 (modify-phases %standard-phases
5197 ;; Run the core tests after installation. By default it would run
5198 ;; *all* tests, which take a very long time to complete and are known
5199 ;; to be flaky.
5200 (delete 'check)
5201 (add-after 'install 'check
5202 (lambda* (#:key outputs #:allow-other-keys)
5203 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
5204 #t)))))
5205 (propagated-inputs
5206 `(("python-mpmath" ,python-mpmath)))
5207 (home-page "http://www.sympy.org/")
5208 (synopsis "Python library for symbolic mathematics")
5209 (description
5210 "SymPy is a Python library for symbolic mathematics. It aims to become a
5211 full-featured computer algebra system (CAS) while keeping the code as simple
5212 as possible in order to be comprehensible and easily extensible.")
5213 (license license:bsd-3)))
5214
5215 (define-public python2-sympy
5216 (package
5217 (inherit (package-with-python2 python-sympy))
5218 (arguments
5219 `(#:phases
5220 (modify-phases %standard-phases
5221 ;; Run the core tests after installation. By default it would run
5222 ;; *all* tests, which take a very long time to complete and are known
5223 ;; to be flaky.
5224 (delete 'check)
5225 (add-after 'install 'check
5226 (lambda* (#:key outputs #:allow-other-keys)
5227 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
5228 #t)))))))
5229
5230 (define-public python-q
5231 (package
5232 (name "python-q")
5233 (version "2.6")
5234 (source
5235 (origin
5236 (method url-fetch)
5237 (uri (pypi-uri "q" version))
5238 (sha256
5239 (base32
5240 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
5241 (build-system python-build-system)
5242 (home-page "https://github.com/zestyping/q")
5243 (synopsis "Quick-and-dirty debugging output for tired programmers")
5244 (description
5245 "q is a Python module for \"print\" style of debugging Python code. It
5246 provides convenient short API for print out of values, tracebacks, and
5247 falling into the Python interpreter.")
5248 (license license:asl2.0)))
5249
5250 (define-public python2-q
5251 (package-with-python2 python-q))
5252
5253 (define-public python2-xlib
5254 (package
5255 (name "python2-xlib")
5256 (version "0.14")
5257 (source (origin
5258 (method url-fetch)
5259 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
5260 "/" version "/"
5261 "python-xlib-" version ".tar.gz"))
5262 (sha256
5263 (base32
5264 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
5265 (build-system python-build-system)
5266 (arguments
5267 `(#:python ,python-2 ;Python 2 only
5268 #:tests? #f)) ;no tests
5269 (home-page "http://python-xlib.sourceforge.net/")
5270 (synopsis "Python X11 client library")
5271 (description
5272 "The Python X Library is intended to be a fully functional X client
5273 library for Python programs. It is useful to implement low-level X clients.
5274 It is written entirely in Python.")
5275 (license license:gpl2+)))
5276
5277 (define-public python-singledispatch
5278 (package
5279 (name "python-singledispatch")
5280 (version "3.4.0.3")
5281 (source
5282 (origin
5283 (method url-fetch)
5284 (uri (pypi-uri "singledispatch" version))
5285 (sha256
5286 (base32
5287 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
5288 (build-system python-build-system)
5289 (native-inputs
5290 `(("python-six" ,python-six))) ; required for conversion, not at run-time
5291 (home-page
5292 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
5293 (synopsis "Backport of singledispatch feature from Python 3.4")
5294 (description
5295 "This library brings functools.singledispatch from Python 3.4 to Python
5296 2.6-3.3.")
5297 (license license:expat)))
5298
5299 (define-public python2-singledispatch
5300 (package-with-python2 python-singledispatch))
5301
5302 ;; the python- version can be removed with python-3.5
5303 (define-public python-backports-abc
5304 (package
5305 (name "python-backports-abc")
5306 (version "0.5")
5307 (source
5308 (origin
5309 (method url-fetch)
5310 (uri (pypi-uri "backports_abc" version))
5311 (sha256
5312 (base32
5313 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
5314 (build-system python-build-system)
5315 (home-page "https://github.com/cython/backports_abc")
5316 (synopsis "Backport of additions to the 'collections.abc' module")
5317 (description
5318 "Python-backports-abc provides a backport of additions to the
5319 'collections.abc' module in Python-3.5.")
5320 (license license:psfl)))
5321
5322 (define-public python2-backports-abc
5323 (package-with-python2 python-backports-abc))
5324
5325 (define-public python-backports-csv
5326 (package
5327 (name "python-backports-csv")
5328 (version "1.0.5")
5329 (source
5330 (origin
5331 (method url-fetch)
5332 (uri (pypi-uri "backports.csv" version))
5333 (sha256
5334 (base32
5335 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
5336 (build-system python-build-system)
5337 (home-page "https://github.com/ryanhiebert/backports.csv")
5338 (synopsis "Backport of Python 3's csv module for Python 2")
5339 (description
5340 "Provides a backport of Python 3's @code{csv} module for parsing
5341 comma separated values. The API of the @code{csv} module in Python 2
5342 is drastically different from the @code{csv} module in Python 3.
5343 This is due, for the most part, to the difference between str in
5344 Python 2 and Python 3.")
5345 (license license:psfl)))
5346
5347 (define-public python2-backports-csv
5348 (package-with-python2 python-backports-csv))
5349
5350 (define-public python2-backports-shutil-get-terminal-size
5351 (package
5352 (name "python2-backports-shutil-get-terminal-size")
5353 (version "1.0.0")
5354 (source
5355 (origin
5356 (method url-fetch)
5357 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
5358 (sha256
5359 (base32
5360 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
5361 (build-system python-build-system)
5362 (arguments
5363 `(#:python ,python-2
5364 #:phases
5365 (modify-phases %standard-phases
5366 (replace 'check
5367 (lambda _
5368 (invoke "py.test" "-v"))))))
5369 (native-inputs
5370 `(("python2-pytest" ,python2-pytest)))
5371 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
5372 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
5373 (description
5374 "This package provides a backport of the @code{get_terminal_size
5375 function} from Python 3.3's @code{shutil}.
5376 Unlike the original version it is written in pure Python rather than C,
5377 so it might be a tiny bit slower.")
5378 (license license:expat)))
5379
5380 (define-public python-waf
5381 (package
5382 (name "python-waf")
5383 (version "2.0.11")
5384 (source (origin
5385 (method url-fetch)
5386 (uri (string-append "https://waf.io/"
5387 "waf-" version ".tar.bz2"))
5388 (sha256
5389 (base32
5390 "13zrniwkmfqgsgzi9v5m1367fppp9yzrz6z2ny6hy8dmpb8mj4z4"))))
5391 (build-system python-build-system)
5392 (arguments
5393 '(#:phases
5394 (modify-phases %standard-phases
5395 (replace 'build
5396 (lambda _
5397 (invoke "python" "waf-light" "configure" "build")))
5398 (replace 'check
5399 (lambda _
5400 (invoke "python" "waf" "--version")))
5401 (replace 'install
5402 (lambda* (#:key outputs #:allow-other-keys)
5403 (let ((out (assoc-ref outputs "out")))
5404 (install-file "waf" (string-append out "/bin")))
5405 #t))
5406 ;; waf breaks when it is wrapped.
5407 (delete 'wrap))))
5408 (home-page "https://waf.io/")
5409 (synopsis "Python-based build system")
5410 (description
5411 "Waf is a Python-based framework for configuring, compiling and installing
5412 applications.")
5413 (license license:bsd-3)))
5414
5415 (define-public python2-waf
5416 (package-with-python2 python-waf))
5417
5418 (define-public python-pyzmq
5419 (package
5420 (name "python-pyzmq")
5421 (version "17.1.2")
5422 (source
5423 (origin
5424 (method url-fetch)
5425 (uri (pypi-uri "pyzmq" version))
5426 (sha256
5427 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
5428 (build-system python-build-system)
5429 (arguments
5430 `(#:configure-flags
5431 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
5432 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
5433 ;; --inplace' for 'python setup.py test' to work.
5434 #:tests? #f))
5435 (inputs
5436 `(("zeromq" ,zeromq)))
5437 (native-inputs
5438 `(("pkg-config" ,pkg-config)
5439 ("python-nose" ,python-nose)))
5440 (home-page "https://github.com/zeromq/pyzmq")
5441 (synopsis "Python bindings for 0MQ")
5442 (description
5443 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
5444 (license license:bsd-4)))
5445
5446 (define-public python2-pyzmq
5447 (package-with-python2 python-pyzmq))
5448
5449 (define-public python-pep8
5450 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
5451 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
5452 ;; some dependents' test suites, and nothing more.
5453 (package
5454 (name "python-pep8")
5455 (version "1.7.0")
5456 (source
5457 (origin
5458 (method url-fetch)
5459 (uri (pypi-uri "pep8" version))
5460 (sha256
5461 (base32
5462 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
5463 (build-system python-build-system)
5464 (home-page "https://pep8.readthedocs.org/")
5465 (synopsis "Python style guide checker")
5466 (description
5467 "This tools checks Python code against some of the style conventions in
5468 PEP 8.")
5469 (license license:expat)))
5470
5471 (define-public python2-pep8
5472 (package-with-python2 python-pep8))
5473
5474 (define-public python-pyflakes
5475 (package
5476 (name "python-pyflakes")
5477 (version "2.0.0")
5478 (source
5479 (origin
5480 (method url-fetch)
5481 (uri (pypi-uri "pyflakes" version))
5482 (sha256
5483 (base32
5484 "0jba28czyvimdc72llms3f17swp3i8jdcabf5w0j00adfbn64xls"))))
5485 (build-system python-build-system)
5486 (home-page
5487 "https://github.com/pyflakes/pyflakes")
5488 (synopsis "Passive checker of Python programs")
5489 (description
5490 "Pyflakes statically checks Python source code for common errors.")
5491 (license license:expat)))
5492
5493 (define-public python2-pyflakes
5494 (package-with-python2 python-pyflakes))
5495
5496 (define-public python-mccabe
5497 (package
5498 (name "python-mccabe")
5499 (version "0.6.1")
5500 (source
5501 (origin
5502 (method url-fetch)
5503 (uri (pypi-uri "mccabe" version))
5504 (sha256
5505 (base32
5506 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
5507 (build-system python-build-system)
5508 (native-inputs
5509 `(("python-pytest" ,python-pytest-bootstrap)
5510 ("python-pytest-runner" ,python-pytest-runner)))
5511 (home-page "https://github.com/flintwork/mccabe")
5512 (synopsis "McCabe checker, plugin for flake8")
5513 (description
5514 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
5515 complexity of Python source code.")
5516 (license license:expat)))
5517
5518 (define-public python2-mccabe
5519 (package-with-python2 python-mccabe))
5520
5521 (define-public python-mccabe-0.2.1
5522 (package (inherit python-mccabe)
5523 (version "0.2.1")
5524 (source
5525 (origin
5526 (method url-fetch)
5527 (uri (pypi-uri "mccabe" version))
5528 (sha256
5529 (base32
5530 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
5531
5532 (define-public python2-mccabe-0.2.1
5533 (package-with-python2 python-mccabe-0.2.1))
5534
5535 ;; Flake8 2.4.1 requires an older version of pep8.
5536 ;; This should be removed ASAP.
5537 (define-public python-pep8-1.5.7
5538 (package (inherit python-pep8)
5539 (version "1.5.7")
5540 (source
5541 (origin
5542 (method url-fetch)
5543 (uri (string-append
5544 "https://pypi.python.org/packages/source/p/pep8/pep8-"
5545 version
5546 ".tar.gz"))
5547 (sha256
5548 (base32
5549 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
5550 (arguments
5551 ;; XXX Tests not compatible with Python 3.5.
5552 '(#:tests? #f))))
5553
5554 (define-public python2-pep8-1.5.7
5555 (package-with-python2 python-pep8-1.5.7))
5556
5557 ;; Flake8 2.4.1 requires an older version of pyflakes.
5558 ;; This should be removed ASAP.
5559 (define-public python-pyflakes-0.8.1
5560 (package (inherit python-pyflakes)
5561 (version "0.8.1")
5562 (source
5563 (origin
5564 (method url-fetch)
5565 (uri (string-append
5566 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
5567 version
5568 ".tar.gz"))
5569 (sha256
5570 (base32
5571 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
5572 (arguments
5573 ;; XXX Tests not compatible with Python 3.5.
5574 '(#:tests? #f))))
5575
5576 (define-public python2-pyflakes-0.8.1
5577 (package-with-python2 python-pyflakes-0.8.1))
5578
5579 ;; This package is used by hypothesis which has thousands of dependent packages.
5580 ;; FIXME: Consolidate this with "python-flake8" below in the next rebuild cycle.
5581 (define-public python-flake8-3.5
5582 (package
5583 (name "python-flake8")
5584 (version "3.5.0")
5585 (source
5586 (origin
5587 (method url-fetch)
5588 (uri (pypi-uri "flake8" version))
5589 (sha256
5590 (base32
5591 "184b33grvvjmiwlv9kyd7yng9qv5ld24154j70z332xxg9gjclvj"))))
5592 (build-system python-build-system)
5593 (arguments
5594 `(#:phases
5595 (modify-phases %standard-phases
5596 ;; Two errors don't seem to have assigned codes.
5597 (add-after 'unpack 'delete-broken-test
5598 (lambda _ (delete-file "tests/unit/test_pyflakes_codes.py") #t))
5599 (add-after 'unpack 'fix-problem-with-pycodestyle
5600 (lambda _
5601 ;; See https://gitlab.com/pycqa/flake8/merge_requests/230
5602 ;; This should no longer be needed with the next release.
5603 (substitute* "setup.py"
5604 (("PEP8_PLUGIN\\('break_around_binary_operator'\\),")
5605 "PEP8_PLUGIN('break_after_binary_operator'),\
5606 PEP8_PLUGIN('break_before_binary_operator'),"))
5607 #t))
5608 (delete 'check)
5609 (add-after 'install 'check
5610 (lambda* (#:key inputs outputs #:allow-other-keys)
5611 (add-installed-pythonpath inputs outputs)
5612 (invoke "pytest" "-v")
5613 #t)))))
5614 (propagated-inputs
5615 `(("python-pycodestyle" ,python-pycodestyle)
5616 ("python-pyflakes" ,python-pyflakes)
5617 ("python-mccabe" ,python-mccabe)))
5618 (native-inputs
5619 `(("python-mock" ,python-mock)
5620 ("python-pytest" ,python-pytest-bootstrap)
5621 ("python-pytest-runner" ,python-pytest-runner)))
5622 (home-page "https://gitlab.com/pycqa/flake8")
5623 (synopsis
5624 "The modular source code checker: pep8, pyflakes and co")
5625 (description
5626 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
5627 (properties `((python2-variant . ,(delay python2-flake8-3.5))))
5628 (license license:expat)))
5629
5630 (define-public python2-flake8-3.5
5631 (let ((base (package-with-python2 (strip-python2-variant python-flake8-3.5))))
5632 (package (inherit base)
5633 (propagated-inputs
5634 `(("python2-configparser" ,python2-configparser)
5635 ("python2-enum34" ,python2-enum34)
5636 ,@(package-propagated-inputs base))))))
5637
5638 ;; Version 3.5.0 has compatibility issues with Pyflakes 2.0, so we need
5639 ;; this newer version. Keep it as a separate variable for now to avoid
5640 ;; rebuilding "python-hypothesis"; this should be removed in the next
5641 ;; rebuild cycle.
5642 (define-public python-flake8
5643 (package
5644 (inherit python-flake8-3.5)
5645 (version "3.6.0")
5646 (source (origin
5647 (method url-fetch)
5648 (uri (pypi-uri "flake8" version))
5649 (sha256
5650 (base32
5651 "0w0nprx22rbvrrkbfx9v5jc5gskbm08g219l7r8wai8zfswgadba"))))
5652 (arguments
5653 (substitute-keyword-arguments (package-arguments python-flake8-3.5)
5654 ((#:phases phases)
5655 `(modify-phases ,phases
5656 (delete 'delete-broken-test)
5657 (delete 'fix-problem-with-pycodestyle)))))
5658 (properties `((python2-variant . ,(delay python2-flake8))))))
5659
5660 (define-public python2-flake8
5661 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
5662 (package (inherit base)
5663 (propagated-inputs
5664 (package-propagated-inputs python2-flake8-3.5)))))
5665
5666 ;; python-hacking requires flake8 <2.6.0.
5667 (define-public python-flake8-2.5
5668 (package
5669 (inherit python-flake8)
5670 (version "2.5.5")
5671 (source (origin
5672 (method url-fetch)
5673 (uri (pypi-uri "flake8" version))
5674 (sha256
5675 (base32
5676 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
5677 (propagated-inputs
5678 `(("python-pep8" ,python-pep8)
5679 ,@(package-propagated-inputs python-flake8)))
5680 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
5681
5682 (define-public python2-flake8-2.5
5683 (package
5684 (inherit python2-flake8)
5685 (version (package-version python-flake8-2.5))
5686 (source (origin
5687 (inherit (package-source python-flake8-2.5))))
5688 (propagated-inputs
5689 `(("python2-pep8" ,python2-pep8)
5690 ,@(package-propagated-inputs python2-flake8)))))
5691
5692 (define-public python-flake8-polyfill
5693 (package
5694 (name "python-flake8-polyfill")
5695 (version "1.0.2")
5696 (source
5697 (origin
5698 (method url-fetch)
5699 (uri (pypi-uri "flake8-polyfill" version))
5700 (sha256
5701 (base32
5702 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
5703 (build-system python-build-system)
5704 (arguments
5705 '(#:phases
5706 (modify-phases %standard-phases
5707 (replace 'check
5708 (lambda _
5709 (setenv "PYTHONPATH"
5710 (string-append (getcwd) "/build/lib:"
5711 (getenv "PYTHONPATH")))
5712 (invoke "py.test" "-v"))))))
5713 (native-inputs
5714 `(("python-flake8" ,python-flake8)
5715 ("python-mock" ,python-mock)
5716 ("python-pep8" ,python-pep8)
5717 ("python-pycodestyle" ,python-pycodestyle)
5718 ("python-pytest" ,python-pytest)))
5719 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
5720 (synopsis "Polyfill package for Flake8 plugins")
5721 (description
5722 "This package that provides some compatibility helpers for Flake8
5723 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
5724 (license license:expat)))
5725
5726 (define-public python2-flake8-polyfill
5727 (package-with-python2 python-flake8-polyfill))
5728
5729 (define-public python-mistune
5730 (package
5731 (name "python-mistune")
5732 (version "0.8.4")
5733 (source
5734 (origin
5735 (method url-fetch)
5736 (uri (pypi-uri "mistune" version))
5737 (sha256
5738 (base32
5739 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
5740 (build-system python-build-system)
5741 (native-inputs
5742 `(("python-nose" ,python-nose)
5743 ("python-cython" ,python-cython)))
5744 (home-page "https://github.com/lepture/mistune")
5745 (synopsis "Markdown parser in pure Python")
5746 (description "This package provides a fast markdown parser in pure
5747 Python.")
5748 (license license:bsd-3)))
5749
5750 (define-public python2-mistune
5751 (package-with-python2 python-mistune))
5752
5753 (define-public python-markdown
5754 (package
5755 (name "python-markdown")
5756 (version "3.0.1")
5757 (source
5758 (origin
5759 (method url-fetch)
5760 (uri (pypi-uri "Markdown" version))
5761 (sha256
5762 (base32
5763 "0z6v8649sr434d5r5zmrhydka7v7f9yas4bwcgkcs0650jdhybnh"))))
5764 (build-system python-build-system)
5765 (native-inputs
5766 `(("python-nose" ,python-nose)
5767 ("python-pyyaml" ,python-pyyaml)))
5768 (home-page "https://python-markdown.github.io/")
5769 (synopsis "Python implementation of Markdown")
5770 (description
5771 "This package provides a Python implementation of John Gruber's
5772 Markdown. The library features international input, various Markdown
5773 extensions, and several HTML output formats. A command line wrapper
5774 markdown_py is also provided to convert Markdown files to HTML.")
5775 (license license:bsd-3)))
5776
5777 (define-public python2-markdown
5778 (package-with-python2 python-markdown))
5779
5780 (define-public python-ptyprocess
5781 (package
5782 (name "python-ptyprocess")
5783 (version "0.5.2")
5784 (source
5785 (origin
5786 (method url-fetch)
5787 (uri (pypi-uri "ptyprocess" version))
5788 (sha256
5789 (base32
5790 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
5791 (build-system python-build-system)
5792 (native-inputs
5793 `(("python-nose" ,python-nose)))
5794 (arguments
5795 `(#:phases
5796 (modify-phases %standard-phases
5797 (replace 'check
5798 (lambda _ (invoke "nosetests"))))))
5799 (home-page "https://github.com/pexpect/ptyprocess")
5800 (synopsis "Run a subprocess in a pseudo terminal")
5801 (description
5802 "This package provides a Python library used to launch a subprocess in a
5803 pseudo terminal (pty), and interact with both the process and its pty.")
5804 (license license:isc)))
5805
5806 (define-public python2-ptyprocess
5807 (package-with-python2 python-ptyprocess))
5808
5809 (define-public python-cram
5810 (package
5811 (name "python-cram")
5812 (version "0.7")
5813 (home-page "https://bitheap.org/cram/")
5814 (source (origin
5815 (method url-fetch)
5816 (uri (list (string-append home-page "cram-"
5817 version ".tar.gz")
5818 (pypi-uri "cram" version)))
5819 (sha256
5820 (base32
5821 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
5822 (arguments
5823 '(#:phases
5824 (modify-phases %standard-phases
5825 (add-after 'unpack 'patch-source
5826 (lambda _
5827 (substitute* (find-files "cram" ".*\\.py$")
5828 ;; Replace default shell path.
5829 (("/bin/sh") (which "sh")))
5830 (substitute* (find-files "tests" ".*\\.t$")
5831 (("md5") "md5sum")
5832 (("/bin/bash") (which "bash"))
5833 (("/bin/sh") (which "sh")))
5834 (substitute* "cram/_test.py"
5835 ;; This hack works around a bug triggered by substituting
5836 ;; the /bin/sh paths. "tests/usage.t" compares the output of
5837 ;; "cram -h", which breaks the output at 80 characters. This
5838 ;; causes the line showing the default shell to break into two
5839 ;; lines, but the test expects a single line...
5840 (("env\\['COLUMNS'\\] = '80'")
5841 "env['COLUMNS'] = '160'"))
5842 #t))
5843 (delete 'check)
5844 (add-after 'install 'check
5845 ;; The test phase uses the built library and executable.
5846 ;; It's easier to run it after install since the build
5847 ;; directory contains version-specific PATH.
5848 (lambda* (#:key inputs outputs #:allow-other-keys)
5849 (add-installed-pythonpath inputs outputs)
5850 (setenv "PATH" (string-append (getenv "PATH") ":"
5851 (assoc-ref outputs "out") "/bin"))
5852 (invoke "make" "test"))))))
5853 (build-system python-build-system)
5854 (native-inputs
5855 `(("python-coverage" ,python-coverage)
5856 ("which" ,which)))
5857 (synopsis "Simple testing framework for command line applications")
5858 (description
5859 "Cram is a functional testing framework for command line applications.
5860 Cram tests look like snippets of interactive shell sessions. Cram runs each
5861 command and compares the command output in the test with the command’s actual
5862 output.")
5863 (license license:gpl2+)))
5864
5865 (define-public python2-cram
5866 (package-with-python2 python-cram))
5867
5868 (define-public python-straight-plugin
5869 (package
5870 (name "python-straight-plugin")
5871 (version "1.4.1")
5872 (source
5873 (origin
5874 (method url-fetch)
5875 (uri (pypi-uri "straight.plugin" version))
5876 (sha256
5877 (base32
5878 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
5879 (build-system python-build-system)
5880 (home-page "https://github.com/ironfroggy/straight.plugin")
5881 (synopsis "Simple namespaced plugin facility")
5882 (description "Straight Plugin provides a type of plugin you can create from
5883 almost any existing Python modules, and an easy way for outside developers to
5884 add functionality and customization to your projects with their own plugins.")
5885 (license license:expat)))
5886
5887 (define-public python2-straight-plugin
5888 (package-with-python2 python-straight-plugin))
5889
5890 (define-public python-fonttools
5891 (package
5892 (name "python-fonttools")
5893 (version "3.28.0")
5894 (source (origin
5895 (method url-fetch)
5896 (uri (pypi-uri "fonttools" version ".zip"))
5897 (sha256
5898 (base32
5899 "0vsvjhidpb5kywpjgz1j3fywzkddxkb0afqai18qa3h6lqjyxwpb"))))
5900 (build-system python-build-system)
5901 (native-inputs
5902 `(("unzip" ,unzip)
5903 ("python-pytest" ,python-pytest)
5904 ("python-pytest-runner" ,python-pytest-runner)))
5905 (home-page "https://github.com/behdad/fonttools")
5906 (synopsis "Tools to manipulate font files")
5907 (description
5908 "FontTools/TTX is a library to manipulate font files from Python. It
5909 supports reading and writing of TrueType/OpenType fonts, reading and writing
5910 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
5911 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
5912 from an XML-based format.")
5913 (license license:expat)))
5914
5915 (define-public python2-fonttools
5916 (package-with-python2 python-fonttools))
5917
5918 (define-public python-ly
5919 (package
5920 (name "python-ly")
5921 (version "0.9.5")
5922 (source
5923 (origin
5924 (method url-fetch)
5925 (uri (pypi-uri name version))
5926 (sha256
5927 (base32
5928 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
5929 (build-system python-build-system)
5930 (arguments
5931 ;; FIXME: Some tests need network access.
5932 '(#:tests? #f))
5933 (synopsis "Tool and library for manipulating LilyPond files")
5934 (description "This package provides a Python library to parse, manipulate
5935 or create documents in LilyPond format. A command line program ly is also
5936 provided that can be used to do various manipulations with LilyPond files.")
5937 (home-page "https://pypi.python.org/pypi/python-ly")
5938 (license license:gpl2+)))
5939
5940 (define-public python-appdirs
5941 (package
5942 (name "python-appdirs")
5943 (version "1.4.3")
5944 (source
5945 (origin
5946 (method url-fetch)
5947 (uri (pypi-uri "appdirs" version))
5948 (sha256
5949 (base32
5950 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
5951 (build-system python-build-system)
5952 (home-page "https://github.com/ActiveState/appdirs")
5953 (synopsis
5954 "Determine platform-specific dirs, e.g. a \"user data dir\"")
5955 (description
5956 "This module provides a portable way of finding out where user data
5957 should be stored on various operating systems.")
5958 (license license:expat)))
5959
5960 (define-public python2-appdirs
5961 (package-with-python2 python-appdirs))
5962
5963 (define-public python-llfuse
5964 (package
5965 (name "python-llfuse")
5966 (version "1.3.5")
5967 (source (origin
5968 (method url-fetch)
5969 (uri (pypi-uri "llfuse" version ".tar.bz2"))
5970 (sha256
5971 (base32
5972 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
5973 (build-system python-build-system)
5974 (inputs
5975 `(("fuse" ,fuse)
5976 ("attr" ,attr)))
5977 (native-inputs
5978 `(("pkg-config" ,pkg-config)))
5979 (synopsis "Python bindings for FUSE")
5980 (description
5981 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
5982 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
5983 (license license:lgpl2.0+)
5984 (properties `((python2-variant . ,(delay python2-llfuse))))))
5985
5986 (define-public python2-llfuse
5987 (package (inherit (package-with-python2
5988 (strip-python2-variant python-llfuse)))
5989 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
5990
5991 ;; For attic-0.16
5992 (define-public python-llfuse-0.41
5993 (package (inherit python-llfuse)
5994 (version "0.41.1")
5995 (source (origin
5996 (method url-fetch)
5997 (uri (string-append
5998 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
5999 "llfuse-" version ".tar.bz2"))
6000 (sha256
6001 (base32
6002 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
6003 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6004 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
6005 (license (list license:expat license:lgpl2.0+))))
6006
6007 (define-public python-msgpack
6008 (package
6009 (name "python-msgpack")
6010 (version "0.5.6")
6011 (source (origin
6012 (method url-fetch)
6013 (uri (pypi-uri "msgpack" version))
6014 (sha256
6015 (base32
6016 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
6017 (build-system python-build-system)
6018 (arguments
6019 `(#:modules ((guix build utils)
6020 (guix build python-build-system)
6021 (ice-9 ftw)
6022 (srfi srfi-1)
6023 (srfi srfi-26))
6024 #:phases
6025 (modify-phases %standard-phases
6026 (replace 'check
6027 (lambda _
6028 (let ((cwd (getcwd)))
6029 (setenv "PYTHONPATH"
6030 (string-append cwd "/build/"
6031 (find (cut string-prefix? "lib" <>)
6032 (scandir (string-append cwd "/build")))
6033 ":"
6034 (getenv "PYTHONPATH")))
6035 (invoke "pytest" "-v" "test")))))))
6036 (native-inputs
6037 `(("python-pytest" ,python-pytest)))
6038 (synopsis "MessagePack (de)serializer")
6039 (description "MessagePack is a fast, compact binary serialization format,
6040 suitable for similar data to JSON. This package provides CPython bindings for
6041 reading and writing MessagePack data.")
6042 (home-page "https://pypi.python.org/pypi/msgpack/")
6043 (license license:asl2.0)))
6044
6045 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
6046 ;; release 0.5. Some packages like borg still call it by the old name for now.
6047 ;; <https://bugs.gnu.org/30662>
6048 (define-public python-msgpack-transitional
6049 (package
6050 (inherit python-msgpack)
6051 (name "python-msgpack-transitional")
6052 (arguments
6053 (substitute-keyword-arguments (package-arguments python-msgpack)
6054 ((#:phases phases)
6055 `(modify-phases ,phases
6056 (add-after 'unpack 'configure-transitional
6057 (lambda _
6058 ;; Keep using the old name.
6059 (substitute* "setup.py"
6060 (("TRANSITIONAL = False")
6061 "TRANSITIONAL = 1"))
6062 #t))))))))
6063
6064 (define-public python2-msgpack
6065 (package-with-python2 python-msgpack))
6066
6067 (define-public python-netaddr
6068 (package
6069 (name "python-netaddr")
6070 (version "0.7.19")
6071 (source
6072 (origin
6073 (method url-fetch)
6074 (uri (pypi-uri "netaddr" version))
6075 (sha256
6076 (base32
6077 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
6078 (build-system python-build-system)
6079 (arguments `(#:tests? #f)) ;; No tests.
6080 (home-page "https://github.com/drkjam/netaddr/")
6081 (synopsis "Pythonic manipulation of network addresses")
6082 (description
6083 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6084 and MAC network addresses.")
6085 (license license:bsd-3)))
6086
6087 (define-public python2-netaddr
6088 (package-with-python2 python-netaddr))
6089
6090 (define-public python-wrapt
6091 (package
6092 (name "python-wrapt")
6093 (version "1.11.1")
6094 (source
6095 (origin
6096 (method url-fetch)
6097 (uri (pypi-uri "wrapt" version))
6098 (sha256
6099 (base32
6100 "0cqmysny1pz01jw26q48q5zasvns6507rwhgm6wcw743f0r01sja"))))
6101 (build-system python-build-system)
6102 (arguments
6103 ;; Tests are not included in the tarball, they are only available in the
6104 ;; git repository.
6105 `(#:tests? #f))
6106 (home-page "https://github.com/GrahamDumpleton/wrapt")
6107 (synopsis "Module for decorators, wrappers and monkey patching")
6108 (description
6109 "The aim of the wrapt module is to provide a transparent object proxy for
6110 Python, which can be used as the basis for the construction of function
6111 wrappers and decorator functions.")
6112 (license license:bsd-2)))
6113
6114 (define-public python2-wrapt
6115 (package-with-python2 python-wrapt))
6116
6117 (define-public python-xlrd
6118 (package
6119 (name "python-xlrd")
6120 (version "1.0.0")
6121 (source (origin
6122 (method url-fetch)
6123 (uri (pypi-uri "xlrd" version))
6124 (sha256
6125 (base32
6126 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
6127 (build-system python-build-system)
6128 (arguments
6129 `(#:phases
6130 (modify-phases %standard-phases
6131 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
6132 ;; run tests instead for now.
6133 (replace 'check (lambda _ (invoke "nosetests"))))))
6134 (native-inputs `(("python-nose" ,python-nose)))
6135 (home-page "http://www.python-excel.org/")
6136 (synopsis "Library for extracting data from Excel files")
6137 (description "This packages provides a library to extract data from
6138 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
6139 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
6140 Unicode-aware. It is not intended as an end-user tool.")
6141 (license license:bsd-3)))
6142
6143 (define-public python2-xlrd
6144 (package-with-python2 python-xlrd))
6145
6146 (define-public python-prettytable
6147 (package
6148 (name "python-prettytable")
6149 (version "0.7.2")
6150 (source
6151 (origin
6152 (method url-fetch)
6153 (uri (string-append
6154 "https://pypi.python.org/packages/source/P/PrettyTable/"
6155 "prettytable-" version ".tar.bz2"))
6156 (sha256
6157 (base32
6158 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
6159 (build-system python-build-system)
6160 (home-page "http://code.google.com/p/prettytable/")
6161 (synopsis "Display tabular data in an ASCII table format")
6162 (description
6163 "A library designed to represent tabular data in visually appealing ASCII
6164 tables. PrettyTable allows for selection of which columns are to be printed,
6165 independent alignment of columns (left or right justified or centred) and
6166 printing of sub-tables by specifying a row range.")
6167 (license license:bsd-3)))
6168
6169 (define-public python2-prettytable
6170 (package-with-python2 python-prettytable))
6171
6172 (define-public python-tables
6173 (package
6174 (name "python-tables")
6175 (version "3.4.4")
6176 (source
6177 (origin
6178 (method url-fetch)
6179 (uri (pypi-uri "tables" version))
6180 (sha256
6181 (base32
6182 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
6183 (modules '((guix build utils)))
6184 (snippet
6185 '(begin
6186 ;; Remove pre-compiled .pyc files from source.
6187 (for-each delete-file-recursively
6188 (find-files "." "__pycache__" #:directories? #t))
6189 (for-each delete-file (find-files "." "\\.pyc$"))
6190 #t))))
6191 (build-system python-build-system)
6192 (arguments
6193 `(;; FIXME: python-build-system does not pass configure-flags to "build"
6194 ;; or "check", so we must override the build and check phases.
6195 #:phases
6196 (modify-phases %standard-phases
6197 (add-after 'unpack 'use-gcc
6198 (lambda _
6199 (substitute* "setup.py"
6200 (("compiler = new_compiler\\(\\)" line)
6201 (string-append line
6202 "\ncompiler.set_executables(compiler='gcc',"
6203 "compiler_so='gcc',"
6204 "linker_exe='gcc',"
6205 "linker_so='gcc -shared')")))
6206 #t))
6207 (replace 'build
6208 (lambda* (#:key inputs #:allow-other-keys)
6209 (invoke "python" "setup.py" "build"
6210 (string-append "--hdf5="
6211 (assoc-ref inputs "hdf5")))))
6212 (replace 'check
6213 (lambda* (#:key inputs #:allow-other-keys)
6214 (invoke "python" "setup.py" "check"
6215 (string-append "--hdf5="
6216 (assoc-ref inputs "hdf5"))))))))
6217 (propagated-inputs
6218 `(("python-numexpr" ,python-numexpr)
6219 ("python-numpy" ,python-numpy)))
6220 (native-inputs
6221 `(("python-cython" ,python-cython)
6222 ("pkg-config" ,pkg-config)))
6223 (inputs
6224 `(("hdf5" ,hdf5)
6225 ("bzip2" ,bzip2)
6226 ("zlib" ,zlib)))
6227 (home-page "http://www.pytables.org/")
6228 (synopsis "Hierarchical datasets for Python")
6229 (description "PyTables is a package for managing hierarchical datasets and
6230 designed to efficiently cope with extremely large amounts of data.")
6231 (license license:bsd-3)))
6232
6233 (define-public python2-tables
6234 (package-with-python2 python-tables))
6235
6236 (define-public python-pyasn1
6237 (package
6238 (name "python-pyasn1")
6239 (version "0.4.3")
6240 (source
6241 (origin
6242 (method url-fetch)
6243 (uri (pypi-uri "pyasn1" version))
6244 (sha256
6245 (base32
6246 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
6247 (build-system python-build-system)
6248 (home-page "http://pyasn1.sourceforge.net/")
6249 (synopsis "ASN.1 types and codecs")
6250 (description
6251 "This is an implementation of ASN.1 types and codecs in Python. It is
6252 suitable for a wide range of protocols based on the ASN.1 specification.")
6253 (license license:bsd-2)))
6254
6255 (define-public python2-pyasn1
6256 (package-with-python2 python-pyasn1))
6257
6258 (define-public python-pyasn1-modules
6259 (package
6260 (name "python-pyasn1-modules")
6261 (version "0.2.2")
6262 (source
6263 (origin
6264 (method url-fetch)
6265 (uri (pypi-uri "pyasn1-modules" version))
6266 (sha256
6267 (base32
6268 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
6269 (build-system python-build-system)
6270 (propagated-inputs
6271 `(("python-pyasn1" ,python-pyasn1)))
6272 (home-page "https://sourceforge.net/projects/pyasn1/")
6273 (synopsis "ASN.1 codec implementations")
6274 (description
6275 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
6276 implementations of ASN.1-based codecs and protocols.")
6277 (license license:bsd-3)))
6278
6279 (define-public python2-pyasn1-modules
6280 (package-with-python2 python-pyasn1-modules))
6281
6282 (define-public python-ipaddress
6283 (package
6284 (name "python-ipaddress")
6285 (version "1.0.22")
6286 (source (origin
6287 (method url-fetch)
6288 (uri (pypi-uri "ipaddress" version))
6289 (sha256
6290 (base32
6291 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
6292 (build-system python-build-system)
6293 (home-page "https://github.com/phihag/ipaddress")
6294 (synopsis "IP address manipulation library")
6295 (description
6296 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
6297 in Python. This library is used to create, poke at, and manipulate IPv4 and
6298 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
6299 module to older versions of Python.")
6300 (license license:psfl)))
6301
6302 (define-public python2-ipaddress
6303 (package-with-python2 python-ipaddress))
6304
6305 (define-public python2-ipaddr
6306 (package
6307 (name "python2-ipaddr")
6308 (version "2.1.11")
6309 (source
6310 (origin
6311 (method url-fetch)
6312 (uri (pypi-uri "ipaddr" version))
6313 (sha256
6314 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
6315 (build-system python-build-system)
6316 (arguments
6317 `(#:python ,python-2 ;version 2 only
6318 #:phases
6319 (modify-phases %standard-phases
6320 (replace 'check
6321 (lambda _ (invoke "python" "ipaddr_test.py"))))))
6322 (home-page "https://github.com/google/ipaddr-py")
6323 (synopsis "IP address manipulation library")
6324 (description
6325 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
6326 IPv6 addresses and networks.
6327
6328 For new implementations you may prefer to use the standard module
6329 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
6330 versions of Python.")
6331 (license license:asl2.0)))
6332
6333 (define-public python-idna
6334 (package
6335 (name "python-idna")
6336 (version "2.7")
6337 (source
6338 (origin
6339 (method url-fetch)
6340 (uri (pypi-uri "idna" version))
6341 (sha256
6342 (base32
6343 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))
6344 (build-system python-build-system)
6345 (home-page "https://github.com/kjd/idna")
6346 (synopsis "Internationalized domain names in applications")
6347 (description
6348 "This is a library to support the Internationalised Domain Names in
6349 Applications (IDNA) protocol as specified in RFC 5891. This version of the
6350 protocol is often referred to as “IDNA2008” and can produce different results
6351 from the earlier standard from 2003. The library is also intended to act as a
6352 suitable drop-in replacement for the “encodings.idna” module that comes with
6353 the Python standard library but currently only supports the older 2003
6354 specification.")
6355 (license license:bsd-4)))
6356
6357 (define-public python2-idna
6358 (package-with-python2 python-idna))
6359
6360 (define-public python-idna-ssl
6361 (package
6362 (name "python-idna-ssl")
6363 (version "1.0.1")
6364 (source
6365 (origin
6366 (method url-fetch)
6367 (uri (pypi-uri "idna-ssl" version))
6368 (sha256
6369 (base32
6370 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
6371 (build-system python-build-system)
6372 (arguments
6373 `(#:tests? #f)) ;circular dependency with python-aiohttp
6374 (home-page "https://github.com/aio-libs/idna-ssl")
6375 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
6376 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
6377 domains support.")
6378 (license license:expat)))
6379
6380 (define-public python-pretend
6381 (package
6382 (name "python-pretend")
6383 (version "1.0.9")
6384 (source
6385 (origin
6386 (method url-fetch)
6387 (uri (string-append "https://pypi.python.org/packages/source/p/"
6388 "pretend/pretend-" version ".tar.gz"))
6389 (sha256
6390 (base32
6391 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
6392 (build-system python-build-system)
6393 (home-page "https://github.com/alex/pretend")
6394 (synopsis "Library for stubbing in Python")
6395 (description
6396 "Pretend is a library to make stubbing with Python easier. Stubbing is a
6397 technique for writing tests. You may hear the term mixed up with mocks,
6398 fakes, or doubles. Basically, a stub is an object that returns pre-canned
6399 responses, rather than doing any computation.")
6400 (license license:bsd-3)))
6401
6402 (define-public python2-pretend
6403 (package-with-python2 python-pretend))
6404
6405 (define-public python-pip
6406 (package
6407 (name "python-pip")
6408 (version "18.1")
6409 (source
6410 (origin
6411 (method url-fetch)
6412 (uri (pypi-uri "pip" version))
6413 (sha256
6414 (base32
6415 "188fclay154s520n43s7cxxlhdaiysvxf19zk8vr1xbyjyyr58n0"))))
6416 (build-system python-build-system)
6417 (arguments
6418 '(#:tests? #f)) ; there are no tests in the pypi archive.
6419 (home-page "https://pip.pypa.io/")
6420 (synopsis "Package manager for Python software")
6421 (description
6422 "Pip is a package manager for Python software, that finds packages on the
6423 Python Package Index (PyPI).")
6424 (license license:expat)))
6425
6426 (define-public python2-pip
6427 (package-with-python2 python-pip))
6428
6429 (define-public python-tlsh
6430 (package
6431 (name "python-tlsh")
6432 (version "3.4.5")
6433 (home-page "https://github.com/trendmicro/tlsh")
6434 (source (origin
6435 (method url-fetch)
6436 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
6437 version ".tar.gz"))
6438 (sha256
6439 (base32
6440 "1x1vahd4zg5kpyr9h9hs3fvh460p25rjy4cclwdnbbw8x3vc30q3"))
6441 (file-name (string-append name "-" version ".tar.gz"))))
6442 (build-system cmake-build-system)
6443 (arguments
6444 '(#:out-of-source? #f
6445 #:phases (modify-phases %standard-phases
6446 (replace
6447 'install
6448 (lambda* (#:key outputs #:allow-other-keys)
6449 ;; Build and install the Python bindings. The underlying
6450 ;; C++ library is apparently not meant to be installed.
6451 (let ((out (assoc-ref outputs "out")))
6452 (with-directory-excursion "py_ext"
6453 (and (system* "python" "setup.py" "build")
6454 (system* "python" "setup.py" "install"
6455 (string-append "--prefix=" out))))))))))
6456 (inputs `(("python" ,python-wrapper))) ;for the bindings
6457 (synopsis "Fuzzy matching library for Python")
6458 (description
6459 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
6460 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
6461 value which can be used for similarity comparisons. Similar objects have
6462 similar hash values, which allows for the detection of similar objects by
6463 comparing their hash values. The byte stream should have a sufficient amount
6464 of complexity; for example, a byte stream of identical bytes will not generate
6465 a hash value.")
6466 (license license:asl2.0)))
6467
6468 (define-public python2-tlsh
6469 (package
6470 (inherit python-tlsh)
6471 (name "python2-tlsh")
6472 (inputs `(("python" ,python-2)))))
6473
6474 (define-public python-termcolor
6475 (package
6476 (name "python-termcolor")
6477 (version "1.1.0")
6478 (source
6479 (origin
6480 (method url-fetch)
6481 (uri (pypi-uri "termcolor" version))
6482 (sha256
6483 (base32
6484 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
6485 (build-system python-build-system)
6486 (arguments
6487 ;; There are no tests.
6488 `(#:tests? #f))
6489 (home-page "https://pypi.python.org/pypi/termcolor")
6490 (synopsis "ANSII Color formatting for terminal output")
6491 (description
6492 "This package provides ANSII Color formatting for output in terminals.")
6493 (license license:expat)))
6494
6495 (define-public python2-termcolor
6496 (package-with-python2 python-termcolor))
6497
6498 (define-public python-libarchive-c
6499 (package
6500 (name "python-libarchive-c")
6501 (version "2.8")
6502 (source (origin
6503 (method url-fetch)
6504 (uri (pypi-uri "libarchive-c" version))
6505 (sha256
6506 (base32
6507 "0qg0v1s9c1xdk9philhnv8k6c6nicvnvfwlc0j9srg90jmdlvm06"))))
6508 (build-system python-build-system)
6509 (arguments
6510 '(#:phases (modify-phases %standard-phases
6511 (add-before
6512 'build 'reference-libarchive
6513 (lambda* (#:key inputs #:allow-other-keys)
6514 ;; Retain the absolute file name of libarchive.so.
6515 (let ((libarchive (assoc-ref inputs "libarchive")))
6516 (substitute* "libarchive/ffi.py"
6517 (("find_library\\('archive'\\)")
6518 (string-append "'" libarchive
6519 "/lib/libarchive.so'"))))))
6520 (replace 'check
6521 (lambda _ (invoke "pytest" "-vv"))))))
6522 (native-inputs
6523 `(("python-mock" ,python-mock)
6524 ("python-pytest" ,python-pytest)))
6525 (inputs
6526 `(("libarchive" ,libarchive)))
6527 (home-page "https://github.com/Changaco/python-libarchive-c")
6528 (synopsis "Python interface to libarchive")
6529 (description
6530 "This package provides Python bindings to libarchive, a C library to
6531 access possibly compressed archives in many different formats. It uses
6532 Python's @code{ctypes} foreign function interface (FFI).")
6533 (license license:lgpl2.0+)))
6534
6535 (define-public python2-libarchive-c
6536 (package-with-python2 python-libarchive-c))
6537
6538 (define-public python-file
6539 (package
6540 (inherit file)
6541 (name "python-file")
6542 (build-system python-build-system)
6543 (arguments
6544 '(#:tests? #f ;no tests
6545 #:configure-flags '("--single-version-externally-managed" "--root=/")
6546 #:phases (modify-phases %standard-phases
6547 (add-before 'build 'change-directory
6548 (lambda _
6549 (chdir "python")
6550 #t))
6551 (add-before 'build 'set-library-file-name
6552 (lambda* (#:key inputs #:allow-other-keys)
6553 (let ((file (assoc-ref inputs "file")))
6554 (substitute* "magic.py"
6555 (("find_library\\('magic'\\)")
6556 (string-append "'" file "/lib/libmagic.so'")))
6557 #t))))))
6558 (inputs `(("file" ,file)))
6559 (self-native-input? #f)
6560 (synopsis "Python bindings to the libmagic file type guesser. Note that
6561 this module and the python-magic module both provide a \"magic.py\" file;
6562 these two modules, which are different and were developed separately, both
6563 serve the same purpose: provide Python bindings for libmagic.")))
6564
6565 (define-public python2-file
6566 (package-with-python2 python-file))
6567
6568 (define-public python-debian
6569 (package
6570 (name "python-debian")
6571 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
6572 (version "0.1.28")
6573 (source
6574 (origin
6575 (method url-fetch)
6576 (uri (pypi-uri name version))
6577 (sha256
6578 (base32
6579 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
6580 (build-system python-build-system)
6581 (propagated-inputs
6582 `(("python-six" ,python-six)))
6583 (synopsis "Debian package related modules")
6584 (description
6585 ;; XXX: Use @enumerate instead of @itemize to work around
6586 ;; <http://bugs.gnu.org/21772>.
6587 "This package provides Python modules that abstract many formats of
6588 Debian-related files, such as:
6589
6590 @enumerate
6591 @item Debtags information;
6592 @item @file{debian/changelog} files;
6593 @item packages files, pdiffs;
6594 @item control files of single or multiple RFC822-style paragraphs---e.g.
6595 @file{debian/control}, @file{.changes}, @file{.dsc};
6596 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
6597 contained files and meta-information.
6598 @end enumerate\n")
6599
6600 ;; Modules are either GPLv2+ or GPLv3+.
6601 (license license:gpl3+)))
6602
6603 (define-public python2-debian
6604 (package-with-python2 python-debian))
6605
6606 (define-public python-nbformat
6607 (package
6608 (name "python-nbformat")
6609 (version "4.4.0")
6610 (source
6611 (origin
6612 (method url-fetch)
6613 (uri (pypi-uri "nbformat" version))
6614 (sha256
6615 (base32
6616 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
6617 (build-system python-build-system)
6618 (arguments `(#:tests? #f)) ; no test target
6619 (propagated-inputs
6620 `(("python-ipython-genutils" ,python-ipython-genutils)
6621 ("python-jsonschema" ,python-jsonschema)
6622 ("python-jupyter-core" ,python-jupyter-core)
6623 ("python-traitlets" ,python-traitlets)))
6624 (home-page "http://jupyter.org")
6625 (synopsis "Jupyter Notebook format")
6626 (description "This package provides the reference implementation of the
6627 Jupyter Notebook format and Python APIs for working with notebooks.")
6628 (license license:bsd-3)))
6629
6630 (define-public python2-nbformat
6631 (package-with-python2 python-nbformat))
6632
6633 (define-public python-bleach
6634 (package
6635 (name "python-bleach")
6636 (version "1.4.3")
6637 (source
6638 (origin
6639 (method url-fetch)
6640 (uri (pypi-uri "bleach" version))
6641 (sha256
6642 (base32
6643 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
6644 (build-system python-build-system)
6645 (propagated-inputs
6646 `(("python-html5lib" ,python-html5lib-0.9)
6647 ("python-six" ,python-six)))
6648 (native-inputs
6649 `(("python-nose" ,python-nose)))
6650 (home-page "https://github.com/jsocol/bleach")
6651 (synopsis "Whitelist-based HTML-sanitizing tool")
6652 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
6653 (license license:asl2.0)))
6654
6655 (define-public python2-bleach
6656 (package-with-python2 python-bleach))
6657
6658 (define-public python-entrypoints
6659 (package
6660 (name "python-entrypoints")
6661 (version "0.2.3")
6662 (source
6663 (origin
6664 (method url-fetch)
6665 (uri (string-append "https://github.com/takluyver/entrypoints/archive/"
6666 version ".tar.gz"))
6667 (file-name (string-append name "-" version ".tar.gz"))
6668 (sha256
6669 (base32
6670 "1pdvgfr5bxyvnfvxbsd3zi0dh3il71pc4k6rinx6zpps91b84a56"))))
6671 (build-system python-build-system)
6672 ;; The package does not come with a setup.py file, so we have to generate
6673 ;; one ourselves.
6674 (arguments
6675 `(#:tests? #f
6676 #:phases
6677 (modify-phases %standard-phases
6678 (add-after 'unpack 'create-setup.py
6679 (lambda _
6680 (call-with-output-file "setup.py"
6681 (lambda (port)
6682 (format port "\
6683 from setuptools import setup
6684 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
6685 " ,version))))))))
6686 (home-page "https://github.com/takluyver/entrypoints")
6687 (synopsis "Discover and load entry points from installed Python packages")
6688 (description "Entry points are a way for Python packages to advertise
6689 objects with some common interface. The most common examples are
6690 @code{console_scripts} entry points, which define shell commands by
6691 identifying a Python function to run. The @code{entrypoints} module contains
6692 functions to find and load entry points.")
6693 (license license:expat)))
6694
6695 (define-public python2-entrypoints
6696 (package-with-python2 python-entrypoints))
6697
6698 (define-public python-nbconvert
6699 (package
6700 (name "python-nbconvert")
6701 (version "5.0.0b1")
6702 (source
6703 (origin
6704 (method url-fetch)
6705 (uri (pypi-uri "nbconvert" version))
6706 (sha256
6707 (base32
6708 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
6709 (build-system python-build-system)
6710 (arguments
6711 `(;; The "bdist_egg" target is disabled by default, causing the installation
6712 ;; to fail.
6713 #:configure-flags (list "bdist_egg")
6714 ;; FIXME: 5 failures, 40 errors.
6715 #:tests? #f))
6716 ;; #:phases
6717 ;; (modify-phases %standard-phases
6718 ;; (replace 'check
6719 ;; (lambda _
6720 ;; (zero? (system* "py.test" "-v")))))
6721 (native-inputs
6722 `(("python-pytest" ,python-pytest)))
6723 (propagated-inputs
6724 `(("python-bleach" ,python-bleach)
6725 ("python-entrypoints" ,python-entrypoints)
6726 ("python-jinja2" ,python-jinja2)
6727 ("python-jupyter-core" ,python-jupyter-core)
6728 ("python-mistune" ,python-mistune)
6729 ("python-nbformat" ,python-nbformat)
6730 ("python-pygments" ,python-pygments)
6731 ("python-traitlets" ,python-traitlets)))
6732 (home-page "http://jupyter.org")
6733 (synopsis "Converting Jupyter Notebooks")
6734 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
6735 notebooks to various other formats via Jinja templates. It allows you to
6736 convert an @code{.ipynb} notebook file into various static formats including:
6737
6738 @enumerate
6739 @item HTML
6740 @item LaTeX
6741 @item PDF
6742 @item Reveal JS
6743 @item Markdown (md)
6744 @item ReStructured Text (rst)
6745 @item executable script
6746 @end enumerate\n")
6747 (license license:bsd-3)))
6748
6749 (define-public python2-nbconvert
6750 (package-with-python2 python-nbconvert))
6751
6752 (define-public python-prometheus-client
6753 (package
6754 (name "python-prometheus-client")
6755 (version "0.5.0")
6756 (source
6757 (origin
6758 (method url-fetch)
6759 (uri (pypi-uri "prometheus_client" version))
6760 (sha256
6761 (base32
6762 "0g7rpv1pq2lab1nfqdx98z9d3bqwc400alg1j4ynrpjkrbsizhg8"))))
6763 (build-system python-build-system)
6764 (arguments '(#:tests? #f)) ; tests are not included
6765 (propagated-inputs
6766 `(("python-twisted" ,python-twisted)))
6767 (home-page "https://github.com/prometheus/client_python")
6768 (synopsis "Python client for the Prometheus monitoring system")
6769 (description
6770 "This package provides a Python client for the Prometheus monitoring
6771 system.")
6772 (license license:asl2.0)))
6773
6774 (define-public python2-prometheus-client
6775 (package-with-python2 python-prometheus-client))
6776
6777 (define-public python-notebook
6778 (package
6779 (name "python-notebook")
6780 (version "5.7.4")
6781 (source (origin
6782 (method url-fetch)
6783 (uri (pypi-uri "notebook" version))
6784 (sha256
6785 (base32
6786 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
6787 (build-system python-build-system)
6788 (arguments
6789 `(#:phases
6790 (modify-phases %standard-phases
6791 (replace 'check
6792 (lambda _
6793 ;; These tests require a browser
6794 (delete-file-recursively "notebook/tests/selenium")
6795 ;; Some tests need HOME
6796 (setenv "HOME" "/tmp")
6797 ;; This file contains "warningfilters", which are not supported
6798 ;; by this version of nose.
6799 (delete-file "setup.cfg")
6800 (with-directory-excursion "/tmp"
6801 (invoke "nosetests" "-v"))
6802 #t)))))
6803 (propagated-inputs
6804 `(("python-jupyter-core" ,python-jupyter-core)
6805 ("python-nbformat" ,python-nbformat)
6806 ("python-nbconvert" ,python-nbconvert)
6807 ("python-prometheus-client" ,python-prometheus-client)
6808 ("python-send2trash" ,python-send2trash)
6809 ("python-terminado" ,python-terminado)))
6810 (native-inputs
6811 `(("python-nose" ,python-nose)
6812 ("python-sphinx" ,python-sphinx)
6813 ("python-requests" ,python-requests)))
6814 (home-page "http://jupyter.org/")
6815 (synopsis "Web-based notebook environment for interactive computing")
6816 (description
6817 "The Jupyter HTML notebook is a web-based notebook environment for
6818 interactive computing.")
6819 (properties `((python2-variant . ,(delay python2-notebook))))
6820 (license license:bsd-3)))
6821
6822 (define-public python2-notebook
6823 (let ((base (package-with-python2
6824 (strip-python2-variant python-notebook))))
6825 (package (inherit base)
6826 (native-inputs
6827 `(("python2-mock" ,python2-mock)
6828 ,@(package-native-inputs base)))
6829 (arguments
6830 (substitute-keyword-arguments (package-arguments base)
6831 ((#:phases phases)
6832 `(modify-phases ,phases
6833 (add-before 'check 'disable-test-case
6834 ;; The test requires network access to localhost. Curiously it
6835 ;; fails with Python 2 only. Simply make the test-case return
6836 ;; immediately.
6837 (lambda _
6838 (substitute*
6839 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
6840 (("formats = self.nbconvert_api") "return #")))))))))))
6841
6842 (define-public python-widgetsnbextension
6843 (package
6844 (name "python-widgetsnbextension")
6845 (version "3.4.2")
6846 (source
6847 (origin
6848 (method url-fetch)
6849 (uri (pypi-uri "widgetsnbextension" version))
6850 (sha256
6851 (base32
6852 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
6853 (build-system python-build-system)
6854 (propagated-inputs
6855 `(("python-ipykernel" ,python-ipykernel)
6856 ("python-notebook" ,python-notebook)))
6857 (native-inputs
6858 `(("python-certifi" ,python-certifi)
6859 ("python-nose" ,python-nose)))
6860 (home-page "https://ipython.org")
6861 (synopsis "IPython HTML widgets for Jupyter")
6862 (description "This package provides interactive HTML widgets for Jupyter
6863 notebooks.")
6864 (license license:bsd-3)))
6865
6866 (define-public python2-widgetsnbextension
6867 (package-with-python2 python-widgetsnbextension))
6868
6869 (define-public python-ipywidgets
6870 (package
6871 (name "python-ipywidgets")
6872 (version "5.2.2")
6873 (source
6874 (origin
6875 (method url-fetch)
6876 (uri (pypi-uri "ipywidgets" version))
6877 (sha256
6878 (base32
6879 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
6880 (build-system python-build-system)
6881 (propagated-inputs
6882 `(("python-ipython" ,python-ipython)
6883 ("python-traitlets" ,python-traitlets)
6884 ("python-widgetsnbextension" ,python-widgetsnbextension)))
6885 (native-inputs
6886 `(("python-nose" ,python-nose)
6887 ("python-pytest" ,python-pytest)))
6888 (home-page "https://ipython.org")
6889 (synopsis "IPython HTML widgets for Jupyter")
6890 (description "Ipywidgets are interactive HTML widgets for Jupyter
6891 notebooks and the IPython kernel. Notebooks come alive when interactive
6892 widgets are used. Users gain control of their data and can visualize changes
6893 in the data.")
6894 (license license:bsd-3)))
6895
6896 (define-public python2-ipywidgets
6897 (package-with-python2 python-ipywidgets))
6898
6899 (define-public python-jupyter-console
6900 (package
6901 (name "python-jupyter-console")
6902 (version "5.2.0")
6903 (source
6904 (origin
6905 (method url-fetch)
6906 (uri (pypi-uri "jupyter_console" version))
6907 (sha256
6908 (base32
6909 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
6910 (build-system python-build-system)
6911 ;; Tests only run in an TTY.
6912 (arguments `(#:tests? #f))
6913 (propagated-inputs
6914 `(("python-ipykernel" ,python-ipykernel)
6915 ("python-jupyter-client" ,python-jupyter-client)
6916 ("python-prompt-toolkit" ,python-prompt-toolkit-1)
6917 ("python-pygments" ,python-pygments)))
6918 (native-inputs
6919 `(("python-nose" ,python-nose)))
6920 (home-page "https://jupyter.org")
6921 (synopsis "Jupyter terminal console")
6922 (description "This package provides a terminal-based console frontend for
6923 Jupyter kernels. It also allows for console-based interaction with non-Python
6924 Jupyter kernels such as IJulia and IRKernel.")
6925 (license license:bsd-3)))
6926
6927 (define-public python2-jupyter-console
6928 (package-with-python2 python-jupyter-console))
6929
6930 ;; The python-ipython and python-jupyter-console require each other. To get
6931 ;; the functionality in both packages working, strip down the
6932 ;; python-jupyter-console package when using it as an input to python-ipython.
6933 (define python-jupyter-console-minimal
6934 (package
6935 (inherit python-jupyter-console)
6936 (name "python-jupyter-console-minimal")
6937 (arguments
6938 (substitute-keyword-arguments
6939 (package-arguments python-jupyter-console)
6940 ((#:phases phases)
6941 `(modify-phases ,phases
6942 (add-after 'install 'delete-bin
6943 (lambda* (#:key outputs #:allow-other-keys)
6944 ;; Delete the bin files, to avoid conflicts in profiles
6945 ;; where python-ipython and python-jupyter-console are
6946 ;; both present.
6947 (delete-file-recursively
6948 (string-append
6949 (assoc-ref outputs "out") "/bin"))))))))
6950 ;; Remove the python-ipython propagated input, to avoid the cycle
6951 (propagated-inputs
6952 (alist-delete
6953 "python-ipython"
6954 (package-propagated-inputs python-jupyter-console)))))
6955
6956 (define-public python-qtconsole
6957 (package
6958 (name "python-qtconsole")
6959 (version "4.4.3")
6960 (source
6961 (origin
6962 (method url-fetch)
6963 (uri (pypi-uri "qtconsole" version))
6964 (sha256
6965 (base32
6966 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
6967 (build-system python-build-system)
6968 (arguments
6969 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
6970 ;; but we only have the LTS version 5.x. This means that there might be
6971 ;; runtime errors, but since this is a dependency of the Jupyter package,
6972 ;; and Jupyter can be used without the qtconsole we can overlook this for
6973 ;; now.
6974 `(#:tests? #f
6975 #:phases
6976 (modify-phases %standard-phases
6977 (add-before 'check 'pre-check
6978 (lambda _
6979 (setenv "QT_QPA_PLATFORM" "offscreen")
6980 #t)))))
6981 (propagated-inputs
6982 `(("python-ipykernel" ,python-ipykernel)
6983 ("python-ipython" ,python-ipython)))
6984 (native-inputs
6985 `(("python-pytest" ,python-pytest)))
6986 (home-page "http://jupyter.org")
6987 (synopsis "Jupyter Qt console")
6988 (description "This package provides a Qt-based console for Jupyter with
6989 support for rich media output.")
6990 (license license:bsd-3)))
6991
6992 (define-public jupyter
6993 (package
6994 (name "jupyter")
6995 (version "1.0.0")
6996 (source
6997 (origin
6998 (method url-fetch)
6999 (uri (pypi-uri "jupyter" version))
7000 (sha256
7001 (base32
7002 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
7003 (build-system python-build-system)
7004 (arguments '(#:tests? #f)) ; there are none.
7005 (propagated-inputs
7006 `(("python-ipykernel" ,python-ipykernel)
7007 ("python-ipywidgets" ,python-ipywidgets)
7008 ("python-jupyter-console" ,python-jupyter-console)
7009 ("python-nbconvert" ,python-nbconvert)
7010 ("python-notebook" ,python-notebook)
7011 ("python-qtconsole" ,python-qtconsole)))
7012 (native-search-paths
7013 (list (search-path-specification
7014 (variable "JUPYTER_PATH")
7015 (files '("share/jupyter")))))
7016 (home-page "https://jupyter.org")
7017 (synopsis "Web application for interactive documents")
7018 (description
7019 "The Jupyter Notebook is a web application that allows you to create and
7020 share documents that contain live code, equations, visualizations and
7021 explanatory text. Uses include: data cleaning and transformation, numerical
7022 simulation, statistical modeling, machine learning and much more.")
7023 (license license:bsd-3)))
7024
7025 (define-public python-chardet
7026 (package
7027 (name "python-chardet")
7028 (version "3.0.4")
7029 (source
7030 (origin
7031 (method url-fetch)
7032 (uri (pypi-uri "chardet" version))
7033 (sha256
7034 (base32
7035 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
7036 (native-inputs
7037 `(("python-hypothesis" ,python-hypothesis)
7038 ("python-pytest" ,python-pytest)
7039 ("python-pytest-runner" ,python-pytest-runner)))
7040 (build-system python-build-system)
7041 (home-page "https://github.com/chardet/chardet")
7042 (synopsis "Universal encoding detector for Python 2 and 3")
7043 (description
7044 "This package provides @code{chardet}, a Python module that can
7045 automatically detect a wide range of file encodings.")
7046 (license license:lgpl2.1+)))
7047
7048 (define-public python2-chardet
7049 (package-with-python2 python-chardet))
7050
7051 (define-public python-docopt
7052 (package
7053 (name "python-docopt")
7054 (version "0.6.2")
7055 (source
7056 (origin
7057 (method url-fetch)
7058 ;; The release on PyPI does not include tests.
7059 (uri (string-append
7060 "https://github.com/docopt/docopt/archive/"
7061 version ".tar.gz"))
7062 (file-name (string-append name "-" version ".tar.gz"))
7063 (sha256
7064 (base32
7065 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
7066 (build-system python-build-system)
7067 (native-inputs
7068 `(("python-pytest" ,python-pytest)))
7069 (arguments
7070 `(#:phases
7071 (modify-phases %standard-phases
7072 (replace 'check
7073 (lambda _ (invoke "py.test"))))))
7074 (home-page "http://docopt.org")
7075 (synopsis "Command-line interface description language for Python")
7076 (description "This library allows the user to define a command-line
7077 interface from a program's help message rather than specifying it
7078 programatically with command-line parsers like @code{getopt} and
7079 @code{argparse}.")
7080 (license license:expat)))
7081
7082 (define-public python2-docopt
7083 (package-with-python2 python-docopt))
7084
7085 (define-public python-pythondialog
7086 (package
7087 (name "python-pythondialog")
7088 (version "3.4.0")
7089 (source
7090 (origin
7091 (method url-fetch)
7092 (uri (pypi-uri "pythondialog" version))
7093 (sha256
7094 (base32
7095 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
7096 (build-system python-build-system)
7097 (arguments
7098 `(#:phases
7099 (modify-phases %standard-phases
7100 (add-after 'unpack 'patch-path
7101 (lambda* (#:key inputs #:allow-other-keys)
7102 (let* ((dialog (assoc-ref inputs "dialog")))
7103 ;; Since this library really wants to grovel the search path, we
7104 ;; must hardcode dialog's store path into it.
7105 (substitute* "dialog.py"
7106 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
7107 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
7108 #t))))
7109 #:tests? #f)) ; no test suite
7110 (propagated-inputs
7111 `(("dialog" ,dialog)))
7112 (home-page "http://pythondialog.sourceforge.net/")
7113 (synopsis "Python interface to the UNIX dialog utility")
7114 (description "A Python wrapper for the dialog utility. Its purpose is to
7115 provide an easy to use, pythonic and comprehensive Python interface to dialog.
7116 This allows one to make simple text-mode user interfaces on Unix-like systems")
7117 (license license:lgpl2.1)
7118 (properties `((python2-variant . ,(delay python2-pythondialog))))))
7119
7120 (define-public python2-pythondialog
7121 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
7122 (package
7123 (inherit base)
7124 (version (package-version python-pythondialog))
7125 (source (origin
7126 (method url-fetch)
7127 (uri (pypi-uri "python2-pythondialog" version))
7128 (sha256
7129 (base32
7130 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
7131
7132 (define-public python-configobj
7133 (package
7134 (name "python-configobj")
7135 (version "5.0.6")
7136 (source (origin
7137 (method url-fetch)
7138 (uri (string-append
7139 "https://pypi.python.org/packages/source/c/configobj/"
7140 "configobj-" version ".tar.gz"))
7141 (sha256
7142 (base32
7143 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
7144 ;; Patch setup.py so it looks for python-setuptools, which is
7145 ;; required to parse the keyword 'install_requires' in setup.py.
7146 (patches (search-patches "python-configobj-setuptools.patch"))))
7147 (build-system python-build-system)
7148 (propagated-inputs
7149 `(("python-six" ,python-six)))
7150 (synopsis "Config file reading, writing and validation")
7151 (description "ConfigObj is a simple but powerful config file reader and
7152 writer: an ini file round tripper. Its main feature is that it is very easy to
7153 use, with a straightforward programmer’s interface and a simple syntax for
7154 config files.")
7155 (home-page "https://github.com/DiffSK/configobj")
7156 (license license:bsd-3)))
7157
7158 (define-public python2-configobj
7159 (package-with-python2 python-configobj))
7160
7161 (define-public python-configargparse
7162 (package
7163 (name "python-configargparse")
7164 (version "0.12.0")
7165 (source (origin
7166 (method url-fetch)
7167 (uri (pypi-uri "ConfigArgParse" version))
7168 (sha256
7169 (base32
7170 "0fgkiqh6r3rbkdq3k8c48m85g52k96686rw3a6jg4lcncrkpvk98"))))
7171 (build-system python-build-system)
7172 (native-inputs
7173 `(("python-pyyaml" ,python-pyyaml)))
7174 (arguments
7175 `(#:phases
7176 (modify-phases %standard-phases
7177 (replace 'check
7178 (lambda _
7179 ;; Bypass setuptools-shim because one test relies on "setup.py"
7180 ;; being the first argument passed to the python call.
7181 ;;
7182 ;; NOTE: Many tests do not run because they rely on Python's
7183 ;; built-in test.test_argparse, but we remove the unit tests from
7184 ;; our Python installation.
7185 (invoke "python" "setup.py" "test"))))))
7186 (synopsis "Replacement for argparse")
7187 (description "A drop-in replacement for argparse that allows options to also
7188 be set via config files and/or environment variables.")
7189 (home-page "https://github.com/bw2/ConfigArgParse")
7190 (license license:expat)))
7191
7192 (define-public python2-configargparse
7193 (package-with-python2 python-configargparse))
7194
7195 (define-public python-argparse-manpage
7196 (package
7197 (name "python-argparse-manpage")
7198 (version "1.1")
7199 (source
7200 (origin
7201 (method url-fetch)
7202 (uri (pypi-uri "argparse-manpage" version))
7203 (sha256
7204 (base32
7205 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
7206 (build-system python-build-system)
7207 (home-page "https://github.com/praiskup/argparse-manpage")
7208 (synopsis "Build manual page from Python's ArgumentParser object")
7209 (description
7210 "This package provides tools to build manual pages from Python's
7211 @code{ArgumentParser} object.")
7212 (license license:asl2.0)))
7213
7214 (define-public python2-contextlib2
7215 (package
7216 (name "python2-contextlib2")
7217 (version "0.5.5")
7218 (source
7219 (origin
7220 (method url-fetch)
7221 (uri (pypi-uri "contextlib2" version))
7222 (sha256
7223 (base32
7224 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
7225 (build-system python-build-system)
7226 (arguments
7227 `(#:python ,python-2
7228 #:phases
7229 (modify-phases %standard-phases
7230 (replace 'check
7231 (lambda _ (invoke "python" "test_contextlib2.py" "-v"))))))
7232 (native-inputs
7233 `(("python2-unittest2" ,python2-unittest2)))
7234 (home-page "http://contextlib2.readthedocs.org/")
7235 (synopsis "Tools for decorators and context managers")
7236 (description "This module is primarily a backport of the Python
7237 3.2 contextlib to earlier Python versions. Like contextlib, it
7238 provides utilities for common tasks involving decorators and context
7239 managers. It also contains additional features that are not part of
7240 the standard library.")
7241 (license license:psfl)))
7242
7243 (define-public python-texttable
7244 (package
7245 (name "python-texttable")
7246 (version "0.8.7")
7247 (source
7248 (origin
7249 (method url-fetch)
7250 (uri (pypi-uri "texttable" version))
7251 (sha256
7252 (base32
7253 "1liiiydgkg37i46a418aw19fyf6z3ds51wdwwpyjbs12x0phhf4a"))))
7254 (build-system python-build-system)
7255 (arguments '(#:tests? #f)) ; no tests
7256 (home-page "https://github.com/foutaise/texttable/")
7257 (synopsis "Python module for creating simple ASCII tables")
7258 (description "Texttable is a Python module for creating simple ASCII
7259 tables.")
7260 (license license:lgpl2.1+)))
7261
7262 (define-public python2-texttable
7263 (package-with-python2 python-texttable))
7264
7265 (define-public python-atomicwrites
7266 (package
7267 (name "python-atomicwrites")
7268 (version "1.1.5")
7269 (source (origin
7270 (method url-fetch)
7271 (uri (pypi-uri "atomicwrites" version))
7272 (sha256
7273 (base32
7274 "11bm90fwm2avvf4f3ib8g925w7jr4m11vcsinn1bi6ns4bm32214"))))
7275 (build-system python-build-system)
7276 (synopsis "Atomic file writes in Python")
7277 (description "Library for atomic file writes using platform dependent tools
7278 for atomic file system operations.")
7279 (home-page "https://github.com/untitaker/python-atomicwrites")
7280 (license license:expat)))
7281
7282 (define-public python2-atomicwrites
7283 (package-with-python2 python-atomicwrites))
7284
7285 (define-public python-click-threading
7286 (package
7287 (name "python-click-threading")
7288 (version "0.4.4")
7289 (source (origin
7290 (method url-fetch)
7291 (uri (pypi-uri "click-threading" version))
7292 (sha256
7293 (base32
7294 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
7295 (build-system python-build-system)
7296 (propagated-inputs
7297 `(("python-click" ,python-click)))
7298 (synopsis "Utilities for multithreading in Click")
7299 (description "This package provides utilities for multithreading in Click
7300 applications.")
7301 (home-page "https://github.com/click-contrib/click-threading")
7302 (license license:expat)))
7303
7304 (define-public python-click-log
7305 (package
7306 (name "python-click-log")
7307 (version "0.3.2")
7308 (source (origin
7309 (method url-fetch)
7310 (uri (pypi-uri "click-log" version))
7311 (sha256
7312 (base32
7313 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
7314 (build-system python-build-system)
7315 (propagated-inputs
7316 `(("python-click" ,python-click)))
7317 (synopsis "Logging for click applications")
7318 (description "This package provides a Python library for logging Click
7319 applications.")
7320 (home-page "https://github.com/click-contrib/click-log")
7321 (license license:expat)))
7322
7323 (define-public python-apipkg
7324 (package
7325 (name "python-apipkg")
7326 (version "1.4")
7327 (source (origin
7328 (method url-fetch)
7329 (uri (pypi-uri "apipkg" version))
7330 (sha256
7331 (base32
7332 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
7333 (build-system python-build-system)
7334 (native-inputs
7335 `(("python-pytest" ,python-pytest)))
7336 (synopsis "Namespace control and lazy-import mechanism")
7337 (description "With apipkg you can control the exported namespace of a Python
7338 package and greatly reduce the number of imports for your users. It is a small
7339 pure Python module that works on virtually all Python versions.")
7340 (home-page "https://github.com/pytest-dev/apipkg")
7341 (license license:expat)))
7342
7343 (define-public python2-apipkg
7344 (package-with-python2 python-apipkg))
7345
7346 (define-public python-execnet
7347 (package
7348 (name "python-execnet")
7349 (version "1.4.1")
7350 (source (origin
7351 (method url-fetch)
7352 (uri (pypi-uri "execnet" version))
7353 (sha256
7354 (base32
7355 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
7356 (build-system python-build-system)
7357 (arguments
7358 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
7359 ;; The two test failures are caused by the lack of an `ssh` executable.
7360 ;; The test suite can be run with pytest after the 'install' phase.
7361 #:tests? #f))
7362 (native-inputs
7363 `(("python-pytest" ,python-pytest)
7364 ("python-setuptools-scm" ,python-setuptools-scm)))
7365 (propagated-inputs
7366 `(("python-apipkg" ,python-apipkg)))
7367 (synopsis "Rapid multi-Python deployment")
7368 (description "Execnet provides a share-nothing model with
7369 channel-send/receive communication for distributing execution across many
7370 Python interpreters across version, platform and network barriers. It has a
7371 minimal and fast API targeting the following uses:
7372 @enumerate
7373 @item distribute tasks to (many) local or remote CPUs
7374 @item write and deploy hybrid multi-process applications
7375 @item write scripts to administer multiple environments
7376 @end enumerate")
7377 (home-page "http://codespeak.net/execnet/")
7378 (license license:expat)))
7379
7380 (define-public python2-execnet
7381 (package-with-python2 python-execnet))
7382
7383 (define-public python-icalendar
7384 (package
7385 (name "python-icalendar")
7386 (version "4.0.3")
7387 (source (origin
7388 (method url-fetch)
7389 (uri (pypi-uri "icalendar" version))
7390 (sha256
7391 (base32
7392 "0mk3dk1dxkcm46jy48v27j2w2349iv4sbimqj1yb5js43mx49hh7"))))
7393 (build-system python-build-system)
7394 (propagated-inputs
7395 `(("python-dateutil" ,python-dateutil)
7396 ("python-pytz" ,python-pytz)))
7397 (synopsis "Python library for parsing iCalendar files")
7398 (description "The icalendar package is a parser/generator of iCalendar
7399 files for use with Python.")
7400 (home-page "https://github.com/collective/icalendar")
7401 (license license:bsd-2)))
7402
7403 (define-public python-sphinxcontrib-newsfeed
7404 (package
7405 (name "python-sphinxcontrib-newsfeed")
7406 (version "0.1.4")
7407 (source (origin
7408 (method url-fetch)
7409 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
7410 (sha256
7411 (base32
7412 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
7413 (arguments '(#:tests? #f)) ; No tests.
7414 (build-system python-build-system)
7415 (propagated-inputs
7416 `(("python-sphinx" ,python-sphinx)))
7417 (synopsis "News Feed extension for Sphinx")
7418 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
7419 Blog, News or Announcements section to a Sphinx website.")
7420 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
7421 (license license:bsd-2)))
7422
7423 (define-public python-args
7424 (package
7425 (name "python-args")
7426 (version "0.1.0")
7427 (source (origin
7428 (method url-fetch)
7429 (uri (pypi-uri "args" version))
7430 (sha256
7431 (base32
7432 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
7433 (build-system python-build-system)
7434 (home-page "https://github.com/kennethreitz/args")
7435 (synopsis "Command-line argument parser")
7436 (description
7437 "This library provides a Python module to parse command-line arguments.")
7438 (license license:bsd-3)))
7439
7440 (define-public python2-args
7441 (package-with-python2 python-args))
7442
7443 (define-public python-clint
7444 (package
7445 (name "python-clint")
7446 (version "0.5.1")
7447 (source (origin
7448 (method url-fetch)
7449 (uri (pypi-uri "clint" version))
7450 (sha256
7451 (base32
7452 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
7453 (build-system python-build-system)
7454 (arguments
7455 '(#:phases
7456 (modify-phases %standard-phases
7457 (replace 'check
7458 (lambda _ (invoke "py.test" "-v"))))))
7459 (native-inputs
7460 `(("python-pytest" ,python-pytest)))
7461 (propagated-inputs
7462 `(("python-args" ,python-args)))
7463 (home-page "https://github.com/kennethreitz/clint")
7464 (synopsis "Command-line interface tools")
7465 (description
7466 "Clint is a Python module filled with a set of tools for developing
7467 command-line applications, including tools for colored and indented
7468 output, progress bar display, and pipes.")
7469 (license license:isc)))
7470
7471 (define-public python2-clint
7472 (package-with-python2 python-clint))
7473
7474 (define-public python-astor
7475 (package
7476 (name "python-astor")
7477 (version "0.5")
7478 (source (origin
7479 (method url-fetch)
7480 (uri (pypi-uri "astor" version))
7481 (sha256
7482 (base32
7483 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
7484 (build-system python-build-system)
7485 (home-page "https://github.com/berkerpeksag/astor")
7486 (synopsis "Read and write Python ASTs")
7487 (description
7488 "Astor is designed to allow easy manipulation of Python source via the
7489 Abstract Syntax Tree.")
7490 (license license:bsd-3)))
7491
7492 (define-public python2-astor
7493 (package-with-python2 python-astor))
7494
7495 (define-public python-rply
7496 (package
7497 (name "python-rply")
7498 (version "0.7.5")
7499 (source (origin
7500 (method url-fetch)
7501 (uri (pypi-uri "rply" version))
7502 (sha256
7503 (base32
7504 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
7505 (build-system python-build-system)
7506 (propagated-inputs
7507 `(("python-appdirs" ,python-appdirs)))
7508 (home-page "https://github.com/alex/rply")
7509 (synopsis "Parser generator for Python")
7510 (description
7511 "This package provides a pure Python based parser generator, that also
7512 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
7513 with a new public API, and RPython support.")
7514 (license license:bsd-3)))
7515
7516 (define-public python2-rply
7517 (package-with-python2 python-rply))
7518
7519 (define-public python-hy
7520 (package
7521 (name "python-hy")
7522 (version "0.13.0")
7523 (source (origin
7524 (method url-fetch)
7525 (uri (pypi-uri "hy" version))
7526 (sha256
7527 (base32
7528 "19sfymaksx9jhksfnb15ahid46mzrhdfzz6yy2craz2qnzvpmky8"))))
7529 (build-system python-build-system)
7530 (arguments
7531 '(#:phases
7532 (modify-phases %standard-phases
7533 (replace 'check
7534 (lambda _
7535 ;; Tests require write access to HOME.
7536 (setenv "HOME" "/tmp")
7537 (invoke "nosetests"))))))
7538 (native-inputs
7539 `(("python-coverage" ,python-coverage)
7540 ("python-nose" ,python-nose)))
7541 (propagated-inputs
7542 `(("python-astor" ,python-astor)
7543 ("python-clint" ,python-clint)
7544 ("python-rply" ,python-rply)))
7545 (home-page "http://hylang.org/")
7546 (synopsis "Lisp frontend to Python")
7547 (description
7548 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
7549 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
7550 Python at your fingertips, in Lisp form.")
7551 (license license:expat)))
7552
7553 (define-public python2-hy
7554 (package-with-python2 python-hy))
7555
7556 (define-public python2-functools32
7557 (package
7558 (name "python2-functools32")
7559 (version "3.2.3-2")
7560 (source
7561 (origin
7562 (method url-fetch)
7563 (uri (pypi-uri "functools32" version))
7564 (sha256
7565 (base32
7566 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
7567 (build-system python-build-system)
7568 (arguments
7569 `(#:python ,python-2
7570 #:tests? #f)) ; no test target
7571 (home-page "https://github.com/MiCHiLU/python-functools32")
7572 (synopsis
7573 "Backport of the functools module from Python 3.2.3")
7574 (description
7575 "This package is a backport of the @code{functools} module from Python
7576 3.2.3 for use with older versions of Python and PyPy.")
7577 (license license:expat)))
7578
7579 (define-public python2-subprocess32
7580 (package
7581 (name "python2-subprocess32")
7582 (version "3.2.7")
7583 (source (origin
7584 (method url-fetch)
7585 (uri (pypi-uri "subprocess32" version))
7586 (sha256
7587 (base32
7588 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
7589 (patches
7590 (search-patches "python2-subprocess32-disable-input-test.patch"))))
7591 (build-system python-build-system)
7592 (arguments
7593 `(#:python ,python-2
7594 ;; The test suite fails with Python > 2.7.13:
7595 ;; import test.support
7596 ;; ImportError: No module named support
7597 #:tests? #f
7598 #:phases
7599 (modify-phases %standard-phases
7600 (add-after 'unpack 'patch-/bin/sh
7601 (lambda _
7602 (substitute* '("subprocess32.py"
7603 "test_subprocess32.py")
7604 (("/bin/sh") (which "sh")))
7605 #t)))))
7606 (home-page "https://github.com/google/python-subprocess32")
7607 (synopsis "Backport of the subprocess module from Python 3.2")
7608 (description
7609 "This is a backport of the @code{subprocess} standard library module
7610 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
7611 new features. On POSIX systems it is guaranteed to be reliable when used
7612 in threaded applications. It includes timeout support from Python 3.3 but
7613 otherwise matches 3.2’s API.")
7614 (license license:psfl)))
7615
7616 (define-public python2-futures
7617 (package
7618 (name "python2-futures")
7619 (version "3.2.0")
7620 (source
7621 (origin
7622 (method url-fetch)
7623 (uri (pypi-uri "futures" version))
7624 (sha256
7625 (base32
7626 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
7627 (build-system python-build-system)
7628 (arguments `(#:python ,python-2
7629 ;; FIXME: Python 2.7.14 moved the test.support library,
7630 ;; but our package has not yet been adjusted. Enable
7631 ;; tests when the python2 package has been fixed.
7632 #:tests? #f))
7633 (home-page "https://github.com/agronholm/pythonfutures")
7634 (synopsis
7635 "Backport of the concurrent.futures package from Python 3.2")
7636 (description
7637 "The concurrent.futures module provides a high-level interface for
7638 asynchronously executing callables. This package backports the
7639 concurrent.futures package from Python 3.2")
7640 (license license:bsd-3)))
7641
7642 (define-public python-promise
7643 (package
7644 (name "python-promise")
7645 (version "0.4.2")
7646 (source
7647 (origin
7648 (method url-fetch)
7649 (uri (pypi-uri "promise" version))
7650 (sha256
7651 (base32
7652 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
7653 (build-system python-build-system)
7654 ;; Tests wants python-futures, which is a python2 only program, and
7655 ;; can't be found by python-promise at test time.
7656 (arguments `(#:tests? #f))
7657 (home-page "https://github.com/syrusakbary/promise")
7658 (synopsis "Promises/A+ implementation for Python")
7659 (description
7660 "Promises/A+ implementation for Python")
7661 (properties `((python2-variant . ,(delay python2-promise))))
7662 (license license:expat)))
7663
7664 (define-public python2-promise
7665 (let ((promise (package-with-python2
7666 (strip-python2-variant python-promise))))
7667 (package (inherit promise)
7668 (arguments (substitute-keyword-arguments (package-arguments promise)
7669 ((#:tests? _) #t)))
7670 (native-inputs
7671 `(("python2-futures" ,python2-futures)
7672 ("python2-pytest" ,python2-pytest)
7673 ,@(package-native-inputs promise))))))
7674
7675 (define-public python-colorama
7676 (package
7677 (name "python-colorama")
7678 (version "0.3.9")
7679 (source
7680 (origin
7681 (method url-fetch)
7682 (uri (pypi-uri "colorama" version))
7683 (sha256
7684 (base32
7685 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
7686 (build-system python-build-system)
7687 (synopsis "Colored terminal text rendering for Python")
7688 (description "Colorama is a Python library for rendering colored terminal
7689 text.")
7690 (home-page "https://pypi.python.org/pypi/colorama")
7691 (license license:bsd-3)))
7692
7693 (define-public python2-colorama
7694 (package-with-python2 python-colorama))
7695
7696 (define-public python-rsa
7697 (package
7698 (name "python-rsa")
7699 (version "3.4.2")
7700 (source
7701 (origin
7702 (method url-fetch)
7703 (uri (pypi-uri "rsa" version))
7704 (sha256
7705 (base32
7706 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
7707 (build-system python-build-system)
7708 (propagated-inputs
7709 `(("python-pyasn1" ,python-pyasn1)))
7710 (synopsis "Pure-Python RSA implementation")
7711 (description "Python-RSA is a pure-Python RSA implementation. It supports
7712 encryption and decryption, signing and verifying signatures, and key
7713 generation according to PKCS#1 version 1.5. It can be used as a Python
7714 library as well as on the command line.")
7715 (home-page "https://stuvel.eu/rsa")
7716 (license license:asl2.0)))
7717
7718 (define-public python2-rsa
7719 (package-with-python2 python-rsa))
7720
7721 (define-public python-pluggy
7722 (package
7723 (name "python-pluggy")
7724 (version "0.7.1")
7725 (source
7726 (origin
7727 (method url-fetch)
7728 (uri (pypi-uri "pluggy" version))
7729 (sha256
7730 (base32
7731 "1qbn70mksmr03hac6jgp6fiqc4l7859z8dchx2x950vhlij87swm"))))
7732 (build-system python-build-system)
7733 (native-inputs
7734 `(("python-setuptools-scm" ,python-setuptools-scm)))
7735 (synopsis "Plugin and hook calling mechanism for Python")
7736 (description "Pluggy is an extraction of the plugin manager as used by
7737 Pytest but stripped of Pytest specific details.")
7738 (home-page "https://pypi.python.org/pypi/pluggy")
7739 (license license:expat)))
7740
7741 (define-public python2-pluggy
7742 (package-with-python2 python-pluggy))
7743
7744 (define-public python-tox
7745 (package
7746 (name "python-tox")
7747 (version "2.8.1")
7748 (source
7749 (origin
7750 (method url-fetch)
7751 (uri (pypi-uri "tox" version))
7752 (sha256
7753 (base32
7754 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
7755 (build-system python-build-system)
7756 (arguments
7757 ;; FIXME: Tests require pytest-timeout, which itself requires
7758 ;; pytest>=2.8.0 for installation.
7759 '(#:tests? #f))
7760 (propagated-inputs
7761 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
7762 ("python-py" ,python-py)
7763 ("python-virtualenv" ,python-virtualenv)))
7764 (native-inputs
7765 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
7766 ("python-pytest" ,python-pytest) ; >= 2.3.5
7767 ("python-setuptools-scm" ,python-setuptools-scm)))
7768 (home-page "http://tox.testrun.org/")
7769 (synopsis "Virtualenv-based automation of test activities")
7770 (description "Tox is a generic virtualenv management and test command line
7771 tool. It can be used to check that a package installs correctly with
7772 different Python versions and interpreters, or run tests in each type of
7773 supported environment, or act as a frontend to continuous integration
7774 servers.")
7775 (license license:expat)))
7776
7777 (define-public python2-tox
7778 (package-with-python2 python-tox))
7779
7780 (define-public python-jmespath
7781 (package
7782 (name "python-jmespath")
7783 (version "0.9.3")
7784 (source
7785 (origin
7786 (method url-fetch)
7787 (uri (pypi-uri "jmespath" version))
7788 (sha256
7789 (base32
7790 "0r7wc7fsxmlwzxx9j1j7rms06c6xs6d4sysirdhz1jk2mb4x90ba"))))
7791 (build-system python-build-system)
7792 (native-inputs
7793 `(("python-nose" ,python-nose)))
7794 (synopsis "JSON Matching Expressions")
7795 (description "JMESPath (pronounced “james path”) is a Python library that
7796 allows one to declaratively specify how to extract elements from a JSON
7797 document.")
7798 (home-page "https://github.com/jmespath/jmespath.py")
7799 (license license:expat)))
7800
7801 (define-public python2-jmespath
7802 (package-with-python2 python-jmespath))
7803
7804 (define-public python-botocore
7805 (package
7806 (name "python-botocore")
7807 (version "1.8.43")
7808 (source
7809 (origin
7810 (method url-fetch)
7811 (uri (pypi-uri "botocore" version))
7812 (sha256
7813 (base32
7814 "12cqpbnz3vfv41mp9admvciw7bc7hz57sjpqs2bxaw9wnfmbw5lg"))))
7815 (build-system python-build-system)
7816 (arguments
7817 ;; FIXME: Many tests are failing.
7818 '(#:tests? #f))
7819 (propagated-inputs
7820 `(("python-dateutil" ,python-dateutil)
7821 ("python-docutils" ,python-docutils)
7822 ("python-jmespath" ,python-jmespath)))
7823 (native-inputs
7824 `(("python-mock" ,python-mock)
7825 ("python-nose" ,python-nose)
7826 ("behave" ,behave)
7827 ("python-tox" ,python-tox)
7828 ("python-wheel" ,python-wheel)))
7829 (home-page "https://github.com/boto/botocore")
7830 (synopsis "Low-level interface to AWS")
7831 (description "Botocore is a Python library that provides a low-level
7832 interface to the Amazon Web Services (AWS) API.")
7833 (license license:asl2.0)))
7834
7835 (define-public python2-botocore
7836 (package-with-python2 python-botocore))
7837
7838 (define-public python-xdo
7839 (package
7840 (name "python-xdo")
7841 (version "0.3")
7842 (source (origin
7843 (method url-fetch)
7844 (uri (string-append
7845 "http://http.debian.net/debian/pool/main/p/python-xdo/"
7846 "python-xdo_" version ".orig.tar.gz"))
7847 (sha256
7848 (base32
7849 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
7850 (build-system python-build-system)
7851 (arguments
7852 '(#:phases
7853 (modify-phases %standard-phases
7854 (add-before 'install 'patch-libxdo-path
7855 ;; Hardcode the path of dynamically loaded libxdo library.
7856 (lambda* (#:key inputs #:allow-other-keys)
7857 (let ((libxdo (string-append
7858 (assoc-ref inputs "xdotool")
7859 "/lib/libxdo.so")))
7860 (substitute* "xdo/_xdo.py"
7861 (("find_library\\(\"xdo\"\\)")
7862 (simple-format #f "\"~a\"" libxdo)))
7863 #t))))
7864 #:tests? #f)) ; no tests provided
7865 (propagated-inputs
7866 `(("python-six" ,python-six)))
7867 (inputs
7868 `(("xdotool" ,xdotool)
7869 ("libX11" ,libx11)))
7870 (home-page "https://tracker.debian.org/pkg/python-xdo")
7871 (synopsis "Python library for simulating X11 keyboard/mouse input")
7872 (description "Provides bindings to libxdo for manipulating X11 via simulated
7873 input. (Note that this is mostly a legacy library; you may wish to look at
7874 python-xdo for newer bindings.)")
7875 (license license:bsd-3)))
7876
7877 (define-public python2-xdo
7878 (package-with-python2 python-xdo))
7879
7880 (define-public python-mako
7881 (package
7882 (name "python-mako")
7883 (version "1.0.7")
7884 (source
7885 (origin
7886 (method url-fetch)
7887 (uri (pypi-uri "Mako" version))
7888 (sha256
7889 (base32
7890 "1bi5gnr8r8dva06qpyx4kgjc6spm2k1y908183nbbaylggjzs0jf"))))
7891 (build-system python-build-system)
7892 (propagated-inputs
7893 `(("python-markupsafe" ,python-markupsafe)))
7894 (native-inputs
7895 `(("python-mock" ,python-mock)
7896 ("python-nose" ,python-nose)
7897 ("python-pytest" ,python-pytest)))
7898 (home-page "http://www.makotemplates.org/")
7899 (synopsis "Templating language for Python")
7900 (description "Mako is a templating language for Python that compiles
7901 templates into Python modules.")
7902 (license license:expat)))
7903
7904 (define-public python2-mako
7905 (package-with-python2 python-mako))
7906
7907 (define-public python-waitress
7908 (package
7909 (name "python-waitress")
7910 (version "1.1.0")
7911 (source
7912 (origin
7913 (method url-fetch)
7914 (uri (pypi-uri "waitress" version))
7915 (patches (search-patches "python-waitress-fix-tests.patch"))
7916 (sha256
7917 (base32
7918 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
7919 (build-system python-build-system)
7920 (home-page "https://github.com/Pylons/waitress")
7921 (synopsis "Waitress WSGI server")
7922 (description "Waitress is meant to be a production-quality pure-Python WSGI
7923 server with very acceptable performance.")
7924 (license license:zpl2.1)))
7925
7926 (define-public python2-waitress
7927 (package-with-python2 python-waitress))
7928
7929 (define-public python-pyquery
7930 (package
7931 (name "python-pyquery")
7932 (version "1.2.17")
7933 (source
7934 (origin
7935 (method url-fetch)
7936 (uri (pypi-uri "pyquery" version))
7937 (sha256
7938 (base32
7939 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
7940 (build-system python-build-system)
7941 (native-inputs
7942 `(("python-webob" ,python-webob)
7943 ("python-webtest" ,python-webtest)))
7944 (propagated-inputs
7945 `(("python-lxml" ,python-lxml)
7946 ("python-cssselect" ,python-cssselect)))
7947 (home-page "https://github.com/gawel/pyquery")
7948 (synopsis "Make jQuery-like queries on xml documents")
7949 (description "pyquery allows you to make jQuery queries on xml documents.
7950 The API is as much as possible the similar to jQuery. pyquery uses lxml for
7951 fast xml and html manipulation.")
7952 (license license:bsd-3)))
7953
7954 (define-public python2-pyquery
7955 (package-with-python2 python-pyquery))
7956
7957 (define-public python-anyjson
7958 (package
7959 (name "python-anyjson")
7960 (version "0.3.3")
7961 (source
7962 (origin
7963 (method url-fetch)
7964 (uri (pypi-uri "anyjson" version))
7965 (sha256
7966 (base32
7967 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
7968 (build-system python-build-system)
7969 (arguments
7970 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
7971 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
7972 ;; whatever) so this transformation needs to be done before the tests
7973 ;; can be run. Maybe we could add a build step to transform beforehand
7974 ;; but it could be annoying/difficult.
7975 ;; We can enable tests for the Python 2 version, though, and do below.
7976 #:tests? #f))
7977 (home-page "https://bitbucket.org/runeh/anyjson/")
7978 (synopsis
7979 "Wraps best available JSON implementation in a common interface")
7980 (description
7981 "Anyjson loads whichever is the fastest JSON module installed
7982 and provides a uniform API regardless of which JSON implementation is used.")
7983 (license license:bsd-3)
7984 (properties `((python2-variant . ,(delay python2-anyjson))))))
7985
7986 (define-public python2-anyjson
7987 (let ((anyjson (package-with-python2
7988 (strip-python2-variant python-anyjson))))
7989 (package
7990 (inherit anyjson)
7991 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
7992 #:tests? #t
7993 ,@(package-arguments anyjson)))
7994 (native-inputs `(("python2-nose" ,python2-nose))))))
7995
7996 (define-public python-amqp
7997 (package
7998 (name "python-amqp")
7999 (version "2.3.2")
8000 (source
8001 (origin
8002 (method url-fetch)
8003 (uri (pypi-uri "amqp" version))
8004 (sha256
8005 (base32
8006 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
8007 (build-system python-build-system)
8008 (native-inputs
8009 `(("python-case" ,python-case)
8010 ("python-pytest-sugar" ,python-pytest-sugar)
8011 ("python-mock" ,python-mock)))
8012 (propagated-inputs
8013 `(("python-vine" ,python-vine)))
8014 (home-page "https://github.com/celery/py-amqp")
8015 (synopsis
8016 "Low-level AMQP client for Python (fork of amqplib)")
8017 (description
8018 "This is a fork of amqplib which was originally written by Barry Pederson.
8019 It is maintained by the Celery project, and used by kombu as a pure python
8020 alternative when librabbitmq is not available.")
8021 (license license:lgpl2.1+)
8022 (properties `((python2-variant . ,(delay python2-amqp))))))
8023
8024 (define-public python2-amqp
8025 (let ((amqp (package-with-python2
8026 (strip-python2-variant python-amqp))))
8027 (package
8028 (inherit amqp)
8029 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
8030 ;; unmaintained. Weirdly, does not do this on the python 3
8031 ;; version?
8032 #:tests? #f
8033 ,@(package-arguments amqp))))))
8034
8035 (define-public python-txamqp
8036 (package
8037 (name "python-txamqp")
8038 (version "0.8.2")
8039 (source
8040 (origin
8041 (method url-fetch)
8042 (uri (pypi-uri "txAMQP" version))
8043 (sha256
8044 (base32
8045 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
8046 (build-system python-build-system)
8047 (propagated-inputs
8048 `(("python-six" ,python-six)
8049 ("python-twisted" ,python-twisted)))
8050 (home-page "https://github.com/txamqp/txamqp")
8051 (synopsis "Communicate with AMQP peers and brokers using Twisted")
8052 (description
8053 "This package provides a Python library for communicating with AMQP peers
8054 and brokers using the asynchronous networking framework Twisted. It contains
8055 all the necessary code to connect, send and receive messages to/from an
8056 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
8057 also includes support for using Thrift RPC over AMQP in Twisted
8058 applications.")
8059 (license license:asl2.0)))
8060
8061 (define-public python2-txamqp
8062 (package-with-python2 python-txamqp))
8063
8064 (define-public python-kombu
8065 (package
8066 (name "python-kombu")
8067 (version "4.2.2")
8068 (source
8069 (origin
8070 (method url-fetch)
8071 (uri (pypi-uri "kombu" version))
8072 (sha256
8073 (base32
8074 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
8075 (build-system python-build-system)
8076 (native-inputs
8077 `(("python-mock" ,python-mock)
8078 ("python-case" ,python-case)
8079 ("python-pyro4" ,python-pyro4)
8080 ("python-pytest-sugar" ,python-pytest-sugar)
8081 ("python-pytz" ,python-pytz)))
8082 (propagated-inputs
8083 `(("python-anyjson" ,python-anyjson)
8084 ("python-amqp" ,python-amqp)
8085 ("python-redis" ,python-redis)))
8086 (home-page "https://kombu.readthedocs.io")
8087 (synopsis "Message passing library for Python")
8088 (description "The aim of Kombu is to make messaging in Python as easy as
8089 possible by providing an idiomatic high-level interface for the AMQ protocol,
8090 and also provide proven and tested solutions to common messaging problems.
8091 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
8092 message orientation, queuing, routing, reliability and security, for which the
8093 RabbitMQ messaging server is the most popular implementation.")
8094 (license license:bsd-3)
8095 (properties `((python2-variant . ,(delay python2-kombu))))))
8096
8097 (define-public python2-kombu
8098 (let ((kombu (package-with-python2
8099 (strip-python2-variant python-kombu))))
8100 (package
8101 (inherit kombu)
8102 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
8103 ;; It works fine on the python3 variant.
8104 #:tests? #f
8105 ,@(package-arguments kombu)))
8106 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8107 ,@(package-native-inputs kombu))))))
8108
8109 (define-public python-billiard
8110 (package
8111 (name "python-billiard")
8112 (version "3.5.0.5")
8113 (source
8114 (origin
8115 (method url-fetch)
8116 (uri (pypi-uri "billiard" version))
8117 (sha256
8118 (base32
8119 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
8120 (build-system python-build-system)
8121 (native-inputs
8122 `(("python-case" ,python-case)
8123 ("python-pytest" ,python-pytest)))
8124 (home-page "https://github.com/celery/billiard")
8125 (synopsis
8126 "Python multiprocessing fork with improvements and bugfixes")
8127 (description
8128 "Billiard is a fork of the Python 2.7 multiprocessing package. The
8129 multiprocessing package itself is a renamed and updated version of R Oudkerk's
8130 pyprocessing package. This standalone variant is intended to be compatible with
8131 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
8132 (license license:bsd-3)
8133 (properties `((python2-variant . ,(delay python2-billiard))))))
8134
8135 (define-public python2-billiard
8136 (let ((billiard (package-with-python2
8137 (strip-python2-variant python-billiard))))
8138 (package
8139 (inherit billiard)
8140 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8141 ("python2-mock" ,python2-mock)
8142 ,@(package-native-inputs billiard))))))
8143
8144 (define-public python-celery
8145 (package
8146 (name "python-celery")
8147 (version "4.2.1")
8148 (source
8149 (origin
8150 (method url-fetch)
8151 (uri (pypi-uri "celery" version))
8152 (sha256
8153 (base32
8154 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
8155 (build-system python-build-system)
8156 (arguments
8157 '(;; TODO The tests fail with Python 3.7
8158 ;; https://github.com/celery/celery/issues/4849
8159 #:tests? #f
8160 #:phases
8161 (modify-phases %standard-phases
8162 (add-after 'unpack 'patch-requirements
8163 (lambda _
8164 (substitute* "requirements/test.txt"
8165 (("pytest>=3\\.0,<3\\.3")
8166 "pytest>=3.0"))
8167 #t)))))
8168 (native-inputs
8169 `(("python-case" ,python-case)
8170 ("python-pytest" ,python-pytest)))
8171 (propagated-inputs
8172 `(("python-pytz" ,python-pytz)
8173 ("python-billiard" ,python-billiard)
8174 ("python-kombu" ,python-kombu)))
8175 (home-page "https://celeryproject.org")
8176 (synopsis "Distributed Task Queue")
8177 (description "Celery is an asynchronous task queue/job queue based on
8178 distributed message passing. It is focused on real-time operation, but
8179 supports scheduling as well. The execution units, called tasks, are executed
8180 concurrently on a single or more worker servers using multiprocessing,
8181 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
8182 synchronously (wait until ready).")
8183 (license license:bsd-3)
8184 (properties `((python2-variant . ,(delay python2-celery))))))
8185
8186 (define-public python2-celery
8187 (let ((celery (package-with-python2
8188 (strip-python2-variant python-celery))))
8189 (package
8190 (inherit celery)
8191 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8192 ("python2-mock" ,python2-mock)
8193 ,@(package-native-inputs celery))))))
8194
8195 (define-public python-translitcodec
8196 (package
8197 (name "python-translitcodec")
8198 (version "0.4.0")
8199 (source
8200 (origin
8201 (method url-fetch)
8202 (uri (pypi-uri "translitcodec" version))
8203 (sha256
8204 (base32
8205 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
8206 (build-system python-build-system)
8207 (arguments
8208 `(#:tests? #f)) ; no tests provided
8209 (home-page
8210 "https://github.com/claudep/translitcodec")
8211 (synopsis
8212 "Unicode to 8-bit charset transliteration codec")
8213 (description
8214 "This package contains codecs for transliterating ISO 10646 texts into
8215 best-effort representations using smaller coded character sets (ASCII,
8216 ISO 8859, etc.).")
8217 (license license:expat)))
8218
8219 (define-public python2-translitcodec
8220 (package-with-python2 python-translitcodec))
8221
8222 (define-public python-editor
8223 (package
8224 (name "python-editor")
8225 (version "0.5")
8226 (source
8227 (origin
8228 (method url-fetch)
8229 (uri (pypi-uri "python-editor" version))
8230 (sha256
8231 (base32
8232 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
8233 (build-system python-build-system)
8234 (home-page
8235 "https://github.com/fmoo/python-editor")
8236 (synopsis
8237 "Programmatically open an editor, capture the result")
8238 (description
8239 "python-editor is a library that provides the editor module for
8240 programmatically interfacing with your system's $EDITOR.")
8241 (license license:asl2.0)))
8242
8243 (define-public python2-editor
8244 (package-with-python2 python-editor))
8245
8246 (define-public python-sphinxcontrib-programoutput
8247 (package
8248 (name "python-sphinxcontrib-programoutput")
8249 (version "0.10")
8250 (source (origin
8251 (method url-fetch)
8252 (uri (pypi-uri "sphinxcontrib-programoutput" version))
8253 (sha256
8254 (base32
8255 "153hhnlbx4688zj9wd64819ps5znc2jlyp5crkgzvn5hxgy99vpx"))))
8256 (build-system python-build-system)
8257 (arguments
8258 ;; FIXME: Many tests are failing and the upstream is gone.
8259 '(#:tests? #f))
8260 (propagated-inputs
8261 `(("python-sphinx" ,python-sphinx)))
8262 (synopsis "Sphinx extension to include program output")
8263 (description "A Sphinx extension to literally insert the output of arbitrary
8264 commands into documents, helping you to keep your command examples up to date.")
8265 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
8266 (license license:bsd-2)))
8267
8268 (define-public python2-sphinxcontrib-programoutput
8269 (package-with-python2 python-sphinxcontrib-programoutput))
8270
8271 (define-public python-sphinx-repoze-autointerface
8272 (package
8273 (name "python-sphinx-repoze-autointerface")
8274 (version "0.8")
8275 (source (origin
8276 (method url-fetch)
8277 (uri (pypi-uri "repoze.sphinx.autointerface" version))
8278 (sha256
8279 (base32
8280 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
8281 (build-system python-build-system)
8282 (arguments '(#:tests? #f)) ; No tests.
8283 (propagated-inputs
8284 `(("python-sphinx" ,python-sphinx)
8285 ("python-zope-interface" ,python-zope-interface)))
8286 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
8287 (description "This package defines an extension for the Sphinx documentation
8288 system. The extension allows generation of API documentation by
8289 introspection of @code{zope.interface} instances in code.")
8290 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
8291 (license license:repoze)))
8292
8293 (define-public python2-sphinx-repoze-autointerface
8294 (package-with-python2 python-sphinx-repoze-autointerface))
8295
8296 (define-public python-vobject
8297 (package
8298 (name "python-vobject")
8299 (version "0.9.5")
8300 (source (origin
8301 (method url-fetch)
8302 (uri (pypi-uri "vobject" version))
8303 (sha256
8304 (base32
8305 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
8306 (build-system python-build-system)
8307 (arguments
8308 '(;; The test suite relies on some non-portable Windows interfaces.
8309 #:tests? #f))
8310 (propagated-inputs
8311 `(("python-dateutil" ,python-dateutil)
8312 ("python-pyicu" ,python-pyicu)))
8313 (synopsis "Parse and generate vCard and vCalendar files")
8314 (description "Vobject is intended to be a full featured Python package for
8315 parsing and generating vCard and vCalendar files. Currently, iCalendar files
8316 are supported and well tested. vCard 3.0 files are supported, and all data
8317 should be imported, but only a few components are understood in a sophisticated
8318 way.")
8319 (home-page "http://eventable.github.io/vobject/")
8320 (license license:asl2.0)))
8321
8322 (define-public python2-vobject
8323 (package-with-python2 python-vobject))
8324
8325 (define-public python-munkres
8326 (package
8327 (name "python-munkres")
8328 (version "1.0.8")
8329 (source (origin
8330 (method url-fetch)
8331 (uri (pypi-uri "munkres" version))
8332 (sha256
8333 (base32
8334 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
8335 (build-system python-build-system)
8336 (arguments
8337 '(#:tests? #f)) ; no test suite
8338 (home-page "http://software.clapper.org/munkres/")
8339 (synopsis "Implementation of the Munkres algorithm")
8340 (description "The Munkres module provides an implementation of the Munkres
8341 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
8342 useful for solving the Assignment Problem.")
8343 (license license:bsd-3)))
8344
8345 (define-public python2-munkres
8346 (package-with-python2 python-munkres))
8347
8348 (define-public python-whoosh
8349 (package
8350 (name "python-whoosh")
8351 (version "2.7.4")
8352 (source
8353 (origin
8354 (method url-fetch)
8355 (uri (pypi-uri "Whoosh" version))
8356 (sha256
8357 (base32
8358 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
8359 (build-system python-build-system)
8360 (native-inputs
8361 `(("python-pytest" ,python-pytest)))
8362 (home-page "https://bitbucket.org/mchaput/whoosh")
8363 (synopsis "Full text indexing, search, and spell checking library")
8364 (description
8365 "Whoosh is a fast, pure-Python full text indexing, search, and spell
8366 checking library.")
8367 (license license:bsd-2)))
8368
8369 (define-public python2-whoosh
8370 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
8371 (package (inherit whoosh)
8372 (propagated-inputs
8373 `(("python2-backport-ssl-match-hostname"
8374 ,python2-backport-ssl-match-hostname)
8375 ,@(package-propagated-inputs whoosh))))))
8376
8377 (define-public python-pathlib
8378 (package
8379 (name "python-pathlib")
8380 (version "1.0.1")
8381 (source (origin
8382 (method url-fetch)
8383 (uri (pypi-uri "pathlib" version))
8384 (sha256
8385 (base32
8386 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
8387 (build-system python-build-system)
8388 ;; The tests depend on the internal "test" module, which does not provide
8389 ;; a stable interface.
8390 (arguments `(#:tests? #f))
8391 (home-page "https://pathlib.readthedocs.org/")
8392 (synopsis "Object-oriented file system paths")
8393 (description "Pathlib offers a set of classes to handle file system paths.
8394 It offers the following advantages over using string objects:
8395
8396 @enumerate
8397 @item No more cumbersome use of os and os.path functions. Everything can
8398 be done easily through operators, attribute accesses, and method calls.
8399 @item Embodies the semantics of different path types. For example,
8400 comparing Windows paths ignores casing.
8401 @item Well-defined semantics, eliminating any inconsistencies or
8402 ambiguities (forward vs. backward slashes, etc.).
8403 @end enumerate
8404
8405 Note: In Python 3.4, pathlib is now part of the standard library. For other
8406 Python versions please consider python-pathlib2 instead, which tracks the
8407 standard library module. This module (python-pathlib) isn't maintained
8408 anymore.")
8409 (license license:expat)))
8410
8411 (define-public python2-pathlib
8412 (package-with-python2 python-pathlib))
8413
8414 (define-public python2-pathlib2
8415 (package
8416 (name "python2-pathlib2")
8417 (version "2.3.2")
8418 (source (origin
8419 (method url-fetch)
8420 (uri (pypi-uri "pathlib2" version))
8421 (sha256
8422 (base32
8423 "10yb0iv5x2hs631rcppkhbddx799d3h8pcwmkbh2a66ns3w71ccf"))))
8424 (build-system python-build-system)
8425 ;; We only need the the Python 2 variant, since for Python 3 our minimum
8426 ;; version is 3.4 which already includes this package as part of the
8427 ;; standard library.
8428 (arguments
8429 `(#:python ,python-2))
8430 (propagated-inputs
8431 `(("python2-scandir" ,python2-scandir)
8432 ("python2-six" ,python2-six)))
8433 (home-page "https://pypi.python.org/pypi/pathlib2/")
8434 (synopsis "Object-oriented file system paths - backport of standard
8435 pathlib module")
8436 (description "The goal of pathlib2 is to provide a backport of standard
8437 pathlib module which tracks the standard library module, so all the newest
8438 features of the standard pathlib can be used also on older Python versions.
8439
8440 Pathlib offers a set of classes to handle file system paths. It offers the
8441 following advantages over using string objects:
8442
8443 @enumerate
8444 @item No more cumbersome use of os and os.path functions. Everything can
8445 be done easily through operators, attribute accesses, and method calls.
8446 @item Embodies the semantics of different path types. For example,
8447 comparing Windows paths ignores casing.
8448 @item Well-defined semantics, eliminating any inconsistencies or
8449 ambiguities (forward vs. backward slashes, etc.).
8450 @end enumerate")
8451 (license license:expat)))
8452
8453 (define-public python2-pathlib2-bootstrap
8454 (hidden-package
8455 (package
8456 (inherit python2-pathlib2)
8457 (name "python2-pathlib2-bootstrap")
8458 (propagated-inputs
8459 `(("python2-scandir" ,python2-scandir)
8460 ("python2-six" ,python2-six-bootstrap))))))
8461
8462 (define-public python-jellyfish
8463 (package
8464 (name "python-jellyfish")
8465 (version "0.5.6")
8466 (source (origin
8467 (method url-fetch)
8468 (uri (pypi-uri "jellyfish" version))
8469 (sha256
8470 (base32
8471 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
8472 (build-system python-build-system)
8473 (native-inputs
8474 `(("python-pytest" ,python-pytest)))
8475 (home-page "https://github.com/jamesturk/jellyfish")
8476 (synopsis "Approximate and phonetic matching of strings")
8477 (description "Jellyfish uses a variety of string comparison and phonetic
8478 encoding algorithms to do fuzzy string matching.")
8479 (license license:bsd-2)
8480 (properties `((python2-variant . ,(delay python2-jellyfish))))))
8481
8482 (define-public python2-jellyfish
8483 (let ((jellyfish (package-with-python2
8484 (strip-python2-variant python-jellyfish))))
8485 (package (inherit jellyfish)
8486 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
8487 ,@(package-native-inputs jellyfish))))))
8488
8489 (define-public python2-unicodecsv
8490 (package
8491 (name "python2-unicodecsv")
8492 (version "0.14.1")
8493 (source (origin
8494 (method url-fetch)
8495 ;; The test suite is not included in the PyPi release.
8496 ;; https://github.com/jdunck/python-unicodecsv/issues/19
8497 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
8498 "archive/" version ".tar.gz"))
8499 (file-name (string-append name "-" version ".tar.gz"))
8500 (sha256
8501 (base32
8502 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
8503 (build-system python-build-system)
8504 (arguments
8505 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
8506 #:python ,python-2))
8507 (native-inputs
8508 `(("python2-unittest2" ,python2-unittest2)))
8509 (home-page "https://github.com/jdunck/python-unicodecsv")
8510 (synopsis "Unicode CSV module for Python 2")
8511 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
8512 module, adding support for Unicode strings.")
8513 (license license:bsd-2)))
8514
8515 (define-public python-rarfile
8516 (package
8517 (name "python-rarfile")
8518 (version "2.8")
8519 (source (origin
8520 (method url-fetch)
8521 (uri (pypi-uri "rarfile" version))
8522 (sha256
8523 (base32
8524 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
8525 (build-system python-build-system)
8526 (arguments
8527 '(#:phases
8528 (modify-phases %standard-phases
8529 (replace 'check
8530 ;; Many tests fail, but the installation proceeds.
8531 (lambda _ (invoke "make" "-C" "test" "test"))))))
8532 (native-inputs
8533 `(("which" ,which))) ; required for tests
8534 (propagated-inputs
8535 `(("libarchive" ,libarchive)))
8536 (home-page "https://github.com/markokr/rarfile")
8537 (synopsis "RAR archive reader for Python")
8538 (description "This is Python module for RAR archive reading. The interface
8539 is made as zipfile like as possible.")
8540 (license license:isc)))
8541
8542 (define-public python2-rarfile
8543 (package-with-python2 python-rarfile))
8544
8545 (define-public python-magic
8546 (package
8547 (name "python-magic")
8548 (version "0.4.15")
8549 (source
8550 (origin
8551 (method url-fetch)
8552 (uri (pypi-uri "python-magic" version))
8553 (sha256
8554 (base32
8555 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
8556 (file-name (string-append name "-" version "-checkout"))))
8557 (build-system python-build-system)
8558 (arguments
8559 ;; The tests are unreliable, so don't run them. The tests fail
8560 ;; under Python3 because they were written for Python2 and
8561 ;; contain import statements that do not work in Python3. One of
8562 ;; the tests fails under Python2 because its assertions are
8563 ;; overly stringent; it relies on comparing output strings which
8564 ;; are brittle and can change depending on the version of
8565 ;; libmagic being used and the system on which the test is
8566 ;; running. In my case, under GuixSD 0.10.0, only one test
8567 ;; failed, and it seems to have failed only because the version
8568 ;; of libmagic that is packaged in Guix outputs a slightly
8569 ;; different (but not wrong) string than the one that the test
8570 ;; expected.
8571 '(#:tests? #f
8572 #:phases (modify-phases %standard-phases
8573 ;; Replace a specific method call with a hard-coded
8574 ;; path to the necessary libmagic.so file in the
8575 ;; store. If we don't do this, then the method call
8576 ;; will fail to find the libmagic.so file, which in
8577 ;; turn will cause any application using
8578 ;; python-magic to fail.
8579 (add-before 'build 'hard-code-path-to-libmagic
8580 (lambda* (#:key inputs #:allow-other-keys)
8581 (let ((file (assoc-ref inputs "file")))
8582 (substitute* "magic.py"
8583 (("ctypes.util.find_library\\('magic'\\)")
8584 (string-append "'" file "/lib/libmagic.so'")))
8585 #t)))
8586 (add-before 'install 'disable-egg-compression
8587 (lambda _
8588 (let ((port (open-file "setup.cfg" "a")))
8589 (display "\n[easy_install]\nzip_ok = 0\n"
8590 port)
8591 (close-port port)
8592 #t))))))
8593 (inputs
8594 ;; python-magic needs to be able to find libmagic.so.
8595 `(("file" ,file)))
8596 (home-page
8597 "https://github.com/ahupp/python-magic")
8598 (synopsis
8599 "File type identification using libmagic")
8600 (description
8601 "This module uses ctypes to access the libmagic file type
8602 identification library. It makes use of the local magic database and
8603 supports both textual and MIME-type output. Note that this module and
8604 the python-file module both provide a \"magic.py\" file; these two
8605 modules, which are different and were developed separately, both serve
8606 the same purpose: to provide Python bindings for libmagic.")
8607 (license license:expat)))
8608
8609 (define-public python2-magic
8610 (package-with-python2 python-magic))
8611
8612 (define-public python2-s3cmd
8613 (package
8614 (name "python2-s3cmd")
8615 (version "1.6.1")
8616 (source
8617 (origin
8618 (method url-fetch)
8619 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
8620 "s3cmd-" version ".tar.gz"))
8621 (sha256
8622 (base32
8623 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
8624 (build-system python-build-system)
8625 (arguments
8626 ;; s3cmd is written for python2 only and contains no tests.
8627 `(#:python ,python-2
8628 #:tests? #f))
8629 (propagated-inputs
8630 `(("python2-dateutil" ,python2-dateutil)
8631 ;; The python-file package also provides a magic.py module.
8632 ;; This is an unfortunate state of affairs; however, s3cmd
8633 ;; fails to install if it cannot find specifically the
8634 ;; python-magic package. Thus we include it, instead of using
8635 ;; python-file. Ironically, s3cmd sometimes works better
8636 ;; without libmagic bindings at all:
8637 ;; https://github.com/s3tools/s3cmd/issues/198
8638 ("python2-magic" ,python2-magic)))
8639 (home-page "http://s3tools.org/s3cmd")
8640 (synopsis "Command line tool for S3-compatible storage services")
8641 (description
8642 "S3cmd is a command line tool for uploading, retrieving and managing data
8643 in storage services that are compatible with the Amazon Simple Storage
8644 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
8645 GnuPG encryption, and more. It also supports management of Amazon's
8646 CloudFront content delivery network.")
8647 (license license:gpl2+)))
8648
8649 (define-public python-pkgconfig
8650 (package
8651 (name "python-pkgconfig")
8652 (version "1.3.1")
8653 (source
8654 (origin
8655 (method url-fetch)
8656 (uri (pypi-uri "pkgconfig" version))
8657 (sha256
8658 (base32
8659 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
8660 (build-system python-build-system)
8661 (native-inputs
8662 `(("python-nose" ,python-nose)))
8663 (inputs
8664 `(("pkg-config" ,pkg-config)))
8665 (arguments
8666 `(#:phases
8667 (modify-phases %standard-phases
8668 (add-before 'build 'patch
8669 ;; Hard-code the path to pkg-config.
8670 (lambda _
8671 (substitute* "pkgconfig/pkgconfig.py"
8672 (("cmd = 'pkg-config")
8673 (string-append "cmd = '" (which "pkg-config"))))
8674 #t))
8675 (replace 'check
8676 (lambda _
8677 (invoke "nosetests" "test.py"))))))
8678 (home-page "https://github.com/matze/pkgconfig")
8679 (synopsis "Python interface for pkg-config")
8680 (description "This module provides a Python interface to pkg-config. It
8681 can be used to find all pkg-config packages, check if a package exists,
8682 check if a package meets certain version requirements, query CFLAGS and
8683 LDFLAGS and parse the output to build extensions with setup.py.")
8684 (license license:expat)))
8685
8686 (define-public python2-pkgconfig
8687 (package-with-python2 python-pkgconfig))
8688
8689 (define-public python-bz2file
8690 (package
8691 (name "python-bz2file")
8692 (version "0.98")
8693 (source
8694 (origin
8695 (method url-fetch)
8696 (uri (pypi-uri "bz2file" version))
8697 (sha256
8698 (base32
8699 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
8700 (build-system python-build-system)
8701 (arguments
8702 `(#:tests? #f)) ; Tests use deprecated python modules.
8703 (home-page "https://github.com/nvawda/bz2file")
8704 (synopsis "Read and write bzip2-compressed files")
8705 (description
8706 "Bz2file is a Python library for reading and writing bzip2-compressed
8707 files. It contains a drop-in replacement for the I/O interface in the
8708 standard library's @code{bz2} module, including features from the latest
8709 development version of CPython that are not available in older releases.")
8710 (license license:asl2.0)))
8711
8712 (define-public python2-bz2file
8713 (package-with-python2 python-bz2file))
8714
8715 (define-public python-future
8716 (package
8717 (name "python-future")
8718 (version "0.16.0")
8719 (source
8720 (origin
8721 (method url-fetch)
8722 (uri (pypi-uri "future" version))
8723 (sha256
8724 (base32
8725 "1nzy1k4m9966sikp0qka7lirh8sqrsyainyf8rk97db7nwdfv773"))))
8726 (build-system python-build-system)
8727 ;; Many tests connect to the network or are otherwise flawed.
8728 ;; https://github.com/PythonCharmers/python-future/issues/210
8729 (arguments
8730 `(#:tests? #f))
8731 (home-page "http://python-future.org")
8732 (synopsis "Single-source support for Python 3 and 2")
8733 (description
8734 "@code{python-future} is the missing compatibility layer between Python 2 and
8735 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
8736 to support both Python 2 and Python 3 with minimal overhead.")
8737 (license license:expat)))
8738
8739 (define-public python2-future
8740 (package-with-python2 python-future))
8741
8742 (define-public python-cysignals
8743 (package
8744 (name "python-cysignals")
8745 (version "1.9.0")
8746 (source
8747 (origin
8748 (method url-fetch)
8749 (uri (pypi-uri "cysignals" version))
8750 (sha256
8751 (base32
8752 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
8753 (build-system python-build-system)
8754 (native-inputs
8755 `(("python-cython" ,python-cython)
8756 ("python-sphinx" ,python-sphinx)))
8757 (inputs
8758 `(("pari-gp" ,pari-gp)))
8759 (arguments
8760 `(#:modules ((guix build python-build-system)
8761 ((guix build gnu-build-system) #:prefix gnu:)
8762 (guix build utils))
8763 ;; FIXME: Tests are executed after installation and currently fail
8764 ;; when not installing into standard locations; the author is working
8765 ;; on a fix.
8766 #:tests? #f
8767 #:phases
8768 (modify-phases %standard-phases
8769 (add-before
8770 'build 'configure
8771 (assoc-ref gnu:%standard-phases 'configure)))))
8772 (home-page
8773 "https://github.com/sagemath/cysignals")
8774 (synopsis
8775 "Handling of interrupts and signals for Cython")
8776 (description
8777 "The cysignals package provides mechanisms to handle interrupts (and
8778 other signals and errors) in Cython code, using two related approaches,
8779 for mixed Cython/Python code or external C libraries and pure Cython code,
8780 respectively.")
8781 (license license:lgpl3+)))
8782
8783 (define-public python2-cysignals
8784 (package-with-python2 python-cysignals))
8785
8786 (define-public python2-shedskin
8787 (package
8788 (name "python2-shedskin")
8789 (version "0.9.4")
8790 (source
8791 (origin
8792 (method url-fetch)
8793 (uri (string-append "https://github.com/shedskin/shedskin/"
8794 "releases/download/v" version
8795 "/shedskin-" version ".tgz"))
8796 (sha256
8797 (base32
8798 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
8799 (build-system python-build-system)
8800 (arguments
8801 `(#:python ,python-2
8802 #:phases (modify-phases %standard-phases
8803 (add-after 'unpack 'fix-resulting-include-libs
8804 (lambda* (#:key inputs #:allow-other-keys)
8805 (let ((libgc (assoc-ref inputs "libgc"))
8806 (pcre (assoc-ref inputs "pcre")))
8807 (substitute* "shedskin/makefile.py"
8808 (("variable == 'CCFLAGS':[ ]*")
8809 (string-append "variable == 'CCFLAGS':\n"
8810 " line += ' -I " pcre "/include"
8811 " -I " libgc "/include'"))
8812 (("variable == 'LFLAGS':[ ]*")
8813 (string-append "variable == 'LFLAGS':\n"
8814 " line += ' -L" pcre "/lib"
8815 " -L " libgc "/lib'")))
8816 #t))))))
8817 (inputs `(("pcre" ,pcre)
8818 ("libgc" ,libgc)))
8819 (home-page "https://shedskin.github.io/")
8820 (synopsis "Experimental Python-2 to C++ Compiler")
8821 (description (string-append "This is an experimental compiler for a subset of
8822 Python. It generates C++ code and a Makefile."))
8823 (license (list license:gpl3 license:bsd-3 license:expat))))
8824
8825 (define-public python2-rope
8826 (package
8827 (name "python2-rope")
8828 (version "0.10.3")
8829 (source
8830 (origin
8831 (method url-fetch)
8832 (uri (pypi-uri "rope" version))
8833 (sha256
8834 (base32
8835 "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
8836 (arguments
8837 ;; Rope is currently python-2 only.
8838 ;; https://github.com/python-rope/rope/issues/57
8839 `(#:python ,python-2))
8840 (build-system python-build-system)
8841 (native-inputs
8842 `(("python2-unittest2" ,python2-unittest2)))
8843 (home-page "https://github.com/python-rope/rope")
8844 (synopsis "Refactoring library for Python")
8845 (description "Rope is a refactoring library for Python. It facilitates
8846 the renaming, moving and extracting of attributes, functions, modules, fields
8847 and parameters in Python 2 source code. These refactorings can also be applied
8848 to occurrences in strings and comments.")
8849 (license license:gpl2)))
8850
8851 (define-public python-py3status
8852 (package
8853 (name "python-py3status")
8854 (version "3.7")
8855 (source
8856 (origin
8857 (method url-fetch)
8858 (uri (pypi-uri "py3status" version))
8859 (sha256
8860 (base32
8861 "0shxcfz4wcczj0mhwp4w0dvwd2fdd9bgprq8slim1519iiqzgwhq"))))
8862 (build-system python-build-system)
8863 (inputs
8864 `(("file" ,file)))
8865 (arguments
8866 '(#:phases
8867 (modify-phases %standard-phases
8868 ;; 'file' is used for detection of configuration file encoding
8869 ;; let's make link the dependency to particular input
8870 (add-before 'build 'patch-file-path
8871 (lambda* (#:key inputs #:allow-other-keys)
8872 (let ((file-path (assoc-ref inputs "file")))
8873 (substitute* "py3status/parse_config.py"
8874 (("\\['file', '-b'")
8875 (string-append "['" file-path "/bin/file', '-b'")))
8876 #t))))
8877 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
8878 (home-page "https://github.com/ultrabug/py3status")
8879 (synopsis "Extensible i3status wrapper written in Python")
8880 (description "py3status is an i3status wrapper which extends i3status
8881 functionality in a modular way, allowing you to extend your panel with your
8882 own code, responding to click events and updating clock every second.")
8883 (license license:bsd-3)))
8884
8885 (define-public python-tblib
8886 (package
8887 (name "python-tblib")
8888 (version "1.3.2")
8889 (source (origin
8890 (method url-fetch)
8891 (uri (pypi-uri "tblib" version))
8892 (sha256 (base32
8893 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
8894 (build-system python-build-system)
8895 (arguments
8896 `(#:phases
8897 (modify-phases %standard-phases
8898 (add-before 'check 'adjust-tests
8899 (lambda _
8900 (when (which "python3")
8901 ;; Adjust the example output to match that of Python 3.7:
8902 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
8903 (substitute* "README.rst"
8904 (("Exception\\('fail',") "Exception('fail'"))
8905 #t)))
8906 (replace 'check
8907 (lambda _
8908 ;; Upstream runs tests after installation and the package itself
8909 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
8910 ;; found.
8911 (setenv "PYTHONPATH"
8912 (string-append (getcwd) "/build/lib:"
8913 (getenv "PYTHONPATH")))
8914 (invoke "py.test" "-vv" "tests" "README.rst"))))))
8915 (native-inputs
8916 `(("python-pytest" ,python-pytest)
8917 ("python-six" ,python-six)))
8918 (home-page "https://github.com/ionelmc/python-tblib")
8919 (synopsis "Traceback serialization library")
8920 (description
8921 "Traceback serialization allows you to:
8922
8923 @enumerate
8924 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
8925 different processes. This allows better error handling when running code over
8926 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
8927
8928 @item Parse traceback strings and raise with the parsed tracebacks.
8929 @end enumerate\n")
8930 (license license:bsd-3)))
8931
8932 (define-public python2-tblib
8933 (package-with-python2 python-tblib))
8934
8935 (define-public python-greenlet
8936 (package
8937 (name "python-greenlet")
8938 (version "0.4.15")
8939 (source (origin
8940 (method url-fetch)
8941 (uri (pypi-uri "greenlet" version))
8942 (sha256
8943 (base32
8944 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
8945 (build-system python-build-system)
8946 (home-page "https://greenlet.readthedocs.io/")
8947 (synopsis "Lightweight in-process concurrent programming")
8948 (description
8949 "Greenlet package is a spin-off of Stackless, a version of CPython
8950 that supports micro-threads called \"tasklets\". Tasklets run
8951 pseudo-concurrently (typically in a single or a few OS-level threads) and
8952 are synchronized with data exchanges on \"channels\".")
8953 (license (list license:psfl license:expat))))
8954
8955 (define-public python2-greenlet
8956 (package-with-python2 python-greenlet))
8957
8958 (define-public python-objgraph
8959 (package
8960 (name "python-objgraph")
8961 (version "3.4.0")
8962 (source
8963 (origin
8964 (method url-fetch)
8965 (uri (pypi-uri "objgraph" version))
8966 (sha256
8967 (base32
8968 "184m09am5gpbqfaiy7l0hwh476mczbrly1dffs0rw2p1d1i2q32a"))))
8969 (build-system python-build-system)
8970 (propagated-inputs
8971 `(("python-graphviz" ,python-graphviz)))
8972 (native-inputs
8973 `(("python-mock" ,python-mock)
8974 ("graphviz" ,graphviz)))
8975 (home-page "https://mg.pov.lt/objgraph/")
8976 (synopsis "Draw Python object reference graphs with graphviz")
8977 (description
8978 "This package provides tools to draw Python object reference graphs with
8979 graphviz.")
8980 (license license:expat)))
8981
8982 (define-public python-gevent
8983 (package
8984 (name "python-gevent")
8985 (version "1.3.7")
8986 (source (origin
8987 (method url-fetch)
8988 (uri (pypi-uri "gevent" version))
8989 (sha256
8990 (base32
8991 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
8992 (modules '((guix build utils)))
8993 (snippet
8994 '(begin
8995 ;; unbunding libev and c-ares
8996 (delete-file-recursively "deps")
8997 #t))))
8998 (build-system python-build-system)
8999 (arguments
9000 `(#:modules ((ice-9 ftw)
9001 (ice-9 match)
9002 (srfi srfi-26)
9003 (guix build utils)
9004 (guix build python-build-system))
9005 #:phases (modify-phases %standard-phases
9006 (add-after 'unpack 'unpack-libev
9007 (lambda* (#:key inputs #:allow-other-keys)
9008 (mkdir-p "deps/libev")
9009 ;; FIXME: gevent requires building libev, even though
9010 ;; it only links against the proper one.
9011 (invoke "tar" "-xf" (assoc-ref inputs "libev-source")
9012 "--strip-components=1" "-C" "deps/libev")))
9013 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
9014 (lambda _
9015 (substitute* "src/gevent/subprocess.py"
9016 (("/bin/sh") (which "sh")))
9017 (for-each (lambda (file)
9018 (substitute* file
9019 (("/bin/sh") (which "sh"))
9020 (("/bin/true") (which "true"))))
9021 (find-files "src/greentest" "\\.py$"))
9022 #t))
9023 (add-before 'build 'do-not-use-bundled-sources
9024 (lambda* (#:key inputs #:allow-other-keys)
9025 (setenv "CONFIG_SHELL" (which "bash"))
9026 (setenv "LIBEV_EMBED" "false")
9027 (setenv "CARES_EMBED" "false")
9028 (setenv "EMBED" "false")
9029
9030 (let ((greenlet (string-append
9031 (assoc-ref inputs "python-greenlet")
9032 "/include")))
9033 (match (scandir greenlet
9034 (lambda (item)
9035 (string-prefix? "python" item)))
9036 ((python)
9037 (setenv "CPATH"
9038 (string-append greenlet "/" python)))))
9039 #t))
9040 (add-before 'check 'skip-timer-test
9041 (lambda _
9042 ;; XXX: Skip 'TestTimerResolution', which appears to be
9043 ;; unreliable.
9044 (substitute* "src/greentest/test__core_timer.py"
9045 (("not greentest.RUNNING_ON_CI") "False"))
9046 #t))
9047 (replace 'check
9048 (lambda _
9049 ;; Make sure the build directory is on PYTHONPATH.
9050 (setenv "PYTHONPATH"
9051 (string-append
9052 (getenv "PYTHONPATH") ":"
9053 (getcwd) "/build/"
9054 (car (scandir "build" (cut string-prefix? "lib." <>)))))
9055 (with-directory-excursion "src/greentest"
9056 ;; XXX: Many tests require network access. Instead we only
9057 ;; run known-good tests. Unfortunately we cannot use
9058 ;; recursion here since this directory also contains
9059 ;; Python-version-specific subfolders.
9060 (apply invoke "python" "testrunner.py" "--config"
9061 "known_failures.py"
9062 (scandir "." (cut regexp-exec
9063 (make-regexp "test_+(subprocess|core)")
9064 <>)))))))))
9065 (propagated-inputs
9066 `(("python-greenlet" ,python-greenlet)
9067 ("python-objgraph" ,python-objgraph)))
9068 (native-inputs
9069 `(("libev-source" ,(package-source libev))
9070 ("python-six" ,python-six)))
9071 (inputs
9072 `(("c-ares" ,c-ares)
9073 ("libev" ,libev)))
9074 (home-page "http://www.gevent.org/")
9075 (synopsis "Coroutine-based network library")
9076 (description
9077 "gevent is a coroutine-based Python networking library that uses greenlet
9078 to provide a high-level synchronous API on top of the libev event loop.")
9079 (license license:expat)
9080 (properties `((python2-variant . ,(delay python2-gevent))))))
9081
9082 (define-public python2-gevent
9083 (let ((base (package-with-python2
9084 (strip-python2-variant python-gevent))))
9085 (package
9086 (inherit base)
9087 (native-inputs `(,@(package-native-inputs python-gevent)
9088 ("python-mock" ,python2-mock))))))
9089
9090 (define-public python-fastimport
9091 (package
9092 (name "python-fastimport")
9093 (version "0.9.6")
9094 (source
9095 (origin
9096 (method url-fetch)
9097 (uri (pypi-uri "fastimport" version))
9098 (sha256
9099 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
9100 (build-system python-build-system)
9101 (home-page "https://github.com/jelmer/python-fastimport")
9102 (synopsis "VCS fastimport parser and generator in Python")
9103 (description "This package provides a parser for and generator of the Git
9104 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
9105 format.")
9106 (license license:gpl2+)))
9107
9108 (define-public python2-fastimport
9109 (package-with-python2 python-fastimport))
9110
9111 (define-public python-twisted
9112 (package
9113 (name "python-twisted")
9114 (version "17.1.0")
9115 (source (origin
9116 (method url-fetch)
9117 (uri (pypi-uri "Twisted" version ".tar.bz2"))
9118 (sha256
9119 (base32
9120 "1p245mg15hkxp7hy5cyq2fgvlgjkb4cg0gwkwd148nzy1bbi3wnv"))))
9121 (build-system python-build-system)
9122 (arguments
9123 '(#:tests? #f)) ; FIXME: Some tests are failing.
9124 ;; #:phases
9125 ;; (modify-phases %standard-phases
9126 ;; (replace 'check
9127 ;; (lambda _
9128 ;; (zero? (system* "./bin/trial" "twisted")))))
9129 (propagated-inputs
9130 `(("python-zope-interface" ,python-zope-interface)
9131 ("python-incremental" ,python-incremental)
9132 ("python-constantly" ,python-constantly)
9133 ("python-automat" ,python-automat)))
9134 (home-page "https://twistedmatrix.com/")
9135 (synopsis "Asynchronous networking framework written in Python")
9136 (description
9137 "Twisted is an extensible framework for Python programming, with special
9138 focus on event-based network programming and multiprotocol integration.")
9139 (license license:expat)))
9140
9141 (define-public python2-twisted
9142 (package-with-python2 python-twisted))
9143
9144 (define-public python-pika
9145 (package
9146 (name "python-pika")
9147 (version "0.12.0")
9148 (source
9149 (origin
9150 (method url-fetch)
9151 (uri (pypi-uri "pika" version))
9152 (sha256
9153 (base32
9154 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
9155 (build-system python-build-system)
9156 (native-inputs
9157 `(("python-pyev" ,python-pyev)
9158 ("python-tornado" ,python-tornado)
9159 ("python-twisted" ,python-twisted)))
9160 (home-page "https://pika.readthedocs.org")
9161 (synopsis "Pure Python AMQP Client Library")
9162 (description
9163 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
9164 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
9165 network support library.")
9166 (license license:bsd-3)))
9167
9168 (define-public python2-pika
9169 (package-with-python2 python-pika))
9170
9171 (define-public python-ply
9172 (package
9173 (name "python-ply")
9174 (version "3.10")
9175 (source
9176 (origin
9177 (method url-fetch)
9178 (uri (pypi-uri "ply" version))
9179 (sha256
9180 (base32
9181 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
9182 (build-system python-build-system)
9183 (home-page "http://www.dabeaz.com/ply/")
9184 (synopsis "Python Lex & Yacc")
9185 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
9186 It uses LR parsing and does extensive error checking.")
9187 (license license:bsd-3)))
9188
9189 (define-public python2-ply
9190 (package-with-python2 python-ply))
9191
9192 (define-public python-tabulate
9193 (package
9194 (name "python-tabulate")
9195 (version "0.7.7")
9196 (source (origin
9197 (method url-fetch)
9198 (uri (pypi-uri "tabulate" version))
9199 (sha256
9200 (base32
9201 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
9202 (build-system python-build-system)
9203 (arguments
9204 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
9205 ;; and the latest release is not tagged in the upstream repository.
9206 '(#:tests? #f))
9207 (home-page "https://bitbucket.org/astanin/python-tabulate")
9208 (synopsis "Pretty-print tabular data")
9209 (description
9210 "Tabulate is a library and command-line utility to pretty-print tabular
9211 data in Python.")
9212 (license license:expat)))
9213
9214 (define-public python2-tabulate
9215 (package-with-python2 python-tabulate))
9216
9217 (define-public python-kazoo
9218 (package
9219 (name "python-kazoo")
9220 (version "2.4.0")
9221 (source
9222 (origin
9223 (method url-fetch)
9224 (uri (pypi-uri "kazoo" version))
9225 (sha256
9226 (base32
9227 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
9228 (build-system python-build-system)
9229 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
9230 (propagated-inputs
9231 `(("python-six" ,python-six)))
9232 (home-page "https://kazoo.readthedocs.org")
9233 (synopsis "High-level Zookeeper client library")
9234 (description
9235 "Kazoo is a Python client library for the Apache Zookeeper distributed
9236 application service. It is designed to be easy to use and to avoid common
9237 programming errors.")
9238 (license license:asl2.0)))
9239
9240 (define-public python2-kazoo
9241 (package-with-python2 python-kazoo))
9242
9243 (define-public python-pykafka
9244 (package
9245 (name "python-pykafka")
9246 (version "2.4.0")
9247 (source (origin
9248 (method url-fetch)
9249 (uri (string-append
9250 "https://pypi.python.org/packages/8b/3e/"
9251 "384eeff406b06315738b62483fd2126c6e4f544167116b17cc04ea7d2a59/"
9252 "pykafka-" version ".tar.gz"))
9253 (sha256
9254 (base32
9255 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
9256 (build-system python-build-system)
9257 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
9258 (propagated-inputs
9259 `(("python-gevent" ,python-gevent)
9260 ("python-kazoo" ,python-kazoo)
9261 ("python-tabulate" ,python-tabulate)))
9262 (inputs
9263 `(("librdkafka" ,librdkafka)))
9264 (home-page "https://pykafka.readthedocs.io/")
9265 (synopsis "Apache Kafka client for Python")
9266 (description
9267 "PyKafka is a client for the Apache Kafka distributed messaging system.
9268 It includes Python implementations of Kafka producers and consumers, which
9269 are optionally backed by a C extension built on librdkafka.")
9270 (license license:asl2.0)))
9271
9272 (define-public python2-pykafka
9273 (package-with-python2 python-pykafka))
9274
9275 (define-public python-wcwidth
9276 (package
9277 (name "python-wcwidth")
9278 (version "0.1.7")
9279 (source
9280 (origin
9281 (method url-fetch)
9282 (uri (pypi-uri "wcwidth" version))
9283 (sha256
9284 (base32
9285 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
9286 (build-system python-build-system)
9287 (home-page "https://github.com/jquast/wcwidth")
9288 (synopsis "Measure number of terminal column cells of wide-character codes")
9289 (description "Wcwidth measures the number of terminal column cells of
9290 wide-character codes. It is useful for those implementing a terminal emulator,
9291 or programs that carefully produce output to be interpreted by one. It is a
9292 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
9293 specified in POSIX.1-2001 and POSIX.1-2008.")
9294 (license license:expat)))
9295
9296 (define-public python2-wcwidth
9297 (package-with-python2 python-wcwidth))
9298
9299 (define-public python2-jsonrpclib
9300 (package
9301 (name "python2-jsonrpclib")
9302 (version "0.1.7")
9303 (source (origin
9304 (method url-fetch)
9305 (uri (string-append
9306 "https://pypi.python.org/packages/source/j/jsonrpclib/"
9307 "jsonrpclib-" version ".tar.gz"))
9308 (sha256
9309 (base32
9310 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
9311 (build-system python-build-system)
9312 (arguments
9313 `(#:tests? #f
9314 #:python ,python-2))
9315 (home-page "https://github.com/joshmarshall/jsonrpclib/")
9316 (synopsis "Implementation of JSON-RPC specification for Python")
9317 (description
9318 "This library is an implementation of the JSON-RPC specification.
9319 It supports both the original 1.0 specification, as well as the
9320 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
9321 etc.")
9322 (license license:asl2.0)))
9323
9324 (define-public python-chai
9325 (package
9326 (name "python-chai")
9327 (version "1.1.2")
9328 (source (origin
9329 (method url-fetch)
9330 (uri (pypi-uri "chai" version))
9331 (sha256
9332 (base32
9333 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
9334 (build-system python-build-system)
9335 (home-page "https://github.com/agoragames/chai")
9336 (synopsis "Mocking framework for Python")
9337 (description
9338 "Chai provides an api for mocking, stubbing and spying your python
9339 objects, patterned after the Mocha library for Ruby.")
9340 (license license:bsd-3)))
9341
9342 (define-public python2-chai
9343 (package-with-python2 python-chai))
9344
9345 (define-public python-inflection
9346 (package
9347 (name "python-inflection")
9348 (version "0.3.1")
9349 (source
9350 (origin (method url-fetch)
9351 (uri (pypi-uri "inflection" version))
9352 (sha256
9353 (base32
9354 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
9355 (build-system python-build-system)
9356 (native-inputs
9357 `(("python-pytest" ,python-pytest)))
9358 (home-page "https://github.com/jpvanhal/inflection")
9359 (synopsis "Python string transformation library")
9360 (description
9361 "Inflection is a string transformation library. It singularizes
9362 and pluralizes English words, and transforms strings from CamelCase to
9363 underscored string.")
9364 (license license:expat)))
9365
9366 (define-public python2-inflection
9367 (package-with-python2 python-inflection))
9368
9369 (define-public python-pylev
9370 (package
9371 (name "python-pylev")
9372 (version "1.3.0")
9373 (source (origin
9374 (method url-fetch)
9375 (uri (pypi-uri "pylev" version))
9376 (sha256
9377 (base32
9378 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
9379 (build-system python-build-system)
9380 (home-page "https://github.com/toastdriven/pylev")
9381 (synopsis "Levenshtein distance implementation in Python")
9382 (description "Pure Python Levenshtein implementation, based off the
9383 Wikipedia code samples at
9384 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
9385 (license license:bsd-3)))
9386
9387 (define-public python2-pylev
9388 (package-with-python2 python-pylev))
9389
9390 (define-public python-cleo
9391 (package
9392 (name "python-cleo")
9393 (version "0.6.1")
9394 (source (origin
9395 (method url-fetch)
9396 (uri (pypi-uri "cleo" version))
9397 (sha256
9398 (base32
9399 "0q1cf0szr0d54am4pypzwdnm74zpladdsinad94c2fz5i06fdpf7"))))
9400 (build-system python-build-system)
9401 (native-inputs
9402 `(;; For testing
9403 ("python-mock" ,python-mock)
9404 ("python-pytest-mock" ,python-pytest-mock)
9405 ("python-pytest" ,python-pytest)))
9406 (propagated-inputs
9407 `(("python-backpack" ,python-backpack)
9408 ("python-pastel" ,python-pastel)
9409 ("python-pylev" ,python-pylev)))
9410 (home-page "https://github.com/sdispater/cleo")
9411 (synopsis "Command-line arguments library for Python")
9412 (description
9413 "Cleo allows you to create command-line commands with signature in
9414 docstring and colored output.")
9415 (license license:expat)))
9416
9417 (define-public python2-cleo
9418 (package-with-python2 python-cleo))
9419
9420 (define-public python-lazy-object-proxy
9421 (package
9422 (name "python-lazy-object-proxy")
9423 (version "1.3.1")
9424 (source (origin
9425 (method url-fetch)
9426 (uri (pypi-uri "lazy-object-proxy" version))
9427 (sha256
9428 (base32
9429 "0yha7q9bhw857fwaby785d63mffhngl9npwzlk9i0pwlkwvbx4gb"))))
9430 (build-system python-build-system)
9431 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
9432 (synopsis "Lazy object proxy for python")
9433 (description
9434 "Lazy object proxy is an object that wraps a callable but defers the call
9435 until the object is actually required, and caches the result of said call.")
9436 (license license:bsd-2)))
9437
9438 (define-public python2-lazy-object-proxy
9439 (package-with-python2 python-lazy-object-proxy))
9440
9441 (define-public python-dnspython
9442 (package
9443 (name "python-dnspython")
9444 (version "1.15.0")
9445 (source (origin
9446 (method url-fetch)
9447 (uri (string-append "http://www.dnspython.org/kits/"
9448 version "/dnspython-" version ".tar.gz"))
9449 (sha256
9450 (base32
9451 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
9452 (build-system python-build-system)
9453 (arguments '(#:tests? #f)) ; XXX: requires internet access
9454 (home-page "http://www.dnspython.org")
9455 (synopsis "DNS toolkit for Python")
9456 (description
9457 "dnspython is a DNS toolkit for Python. It supports almost all record
9458 types. It can be used for queries, zone transfers, and dynamic updates.
9459 It supports TSIG authenticated messages and EDNS0.")
9460 (license license:expat)))
9461
9462 (define-public python2-dnspython
9463 (package-with-python2 python-dnspython))
9464
9465 (define-public python-email-validator
9466 (package
9467 (name "python-email-validator")
9468 (version "1.0.2")
9469 (source
9470 (origin (method url-fetch)
9471 (uri (pypi-uri "email_validator" version))
9472 (sha256
9473 (base32
9474 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
9475 (build-system python-build-system)
9476 (arguments
9477 '(#:phases
9478 (modify-phases %standard-phases
9479 (add-before 'build 'use-dnspython
9480 (lambda _
9481 (substitute* "setup.py"
9482 (("dnspython3") "dnspython"))
9483 #t)))))
9484 (propagated-inputs
9485 `(("python-dnspython" ,python-dnspython)
9486 ("python-idna" ,python-idna)))
9487 (home-page "https://github.com/JoshData/python-email-validator")
9488 (synopsis "Email address validation library for Python")
9489 (description
9490 "This library validates email address syntax and deliverability.")
9491 (license license:cc0)))
9492
9493 (define-public python2-email-validator
9494 (package-with-python2 python-email-validator))
9495
9496 (define-public python-ukpostcodeparser
9497 (package
9498 (name "python-ukpostcodeparser")
9499 (version "1.0.3")
9500 (source (origin
9501 (method url-fetch)
9502 (uri (pypi-uri "UkPostcodeParser" version))
9503 (sha256
9504 (base32
9505 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
9506 (build-system python-build-system)
9507 (home-page "https://github.com/hamstah/ukpostcodeparser")
9508 (synopsis "UK Postcode parser for Python")
9509 (description
9510 "This library provides the @code{parse_uk_postcode} function for
9511 parsing UK postcodes.")
9512 (license license:expat)))
9513
9514 (define-public python2-ukpostcodeparser
9515 (package-with-python2 python-ukpostcodeparser))
9516
9517 (define-public python-faker
9518 (package
9519 (name "python-faker")
9520 (version "0.7.9")
9521 (source (origin
9522 (method url-fetch)
9523 (uri (pypi-uri "Faker" version))
9524 (sha256
9525 (base32
9526 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
9527 (patches
9528 (search-patches "python-faker-fix-build-32bit.patch"))
9529 (modules '((guix build utils)))
9530 (snippet
9531 '(begin
9532 (for-each delete-file (find-files "." "\\.pyc$"))
9533 #t))))
9534 (build-system python-build-system)
9535 (arguments
9536 '(#:phases
9537 (modify-phases %standard-phases
9538 (replace 'check
9539 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
9540 (native-inputs
9541 `(;; For testing
9542 ("python-email-validator" ,python-email-validator)
9543 ("python-mock" ,python-mock)
9544 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
9545 (propagated-inputs
9546 `(("python-dateutil" ,python-dateutil)
9547 ("python-six" ,python-six)))
9548 (home-page "https://github.com/joke2k/faker")
9549 (synopsis "Python package that generates fake data")
9550 (description
9551 "Faker is a Python package that generates fake data such as names,
9552 addresses, and phone numbers.")
9553 (license license:expat)
9554 (properties `((python2-variant . ,(delay python2-faker))))))
9555
9556 (define-public python2-faker
9557 (let ((base (package-with-python2 (strip-python2-variant
9558 python-faker))))
9559 (package
9560 (inherit base)
9561 (propagated-inputs
9562 `(("python2-ipaddress" ,python2-ipaddress)
9563 ,@(package-propagated-inputs base))))))
9564
9565 (define-public python-pyaml
9566 (package
9567 (name "python-pyaml")
9568 (version "18.11.0")
9569 (source (origin
9570 (method url-fetch)
9571 (uri (pypi-uri "pyaml" version))
9572 (sha256
9573 (base32
9574 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
9575 (build-system python-build-system)
9576 (native-inputs
9577 `(("python-unidecode" ,python-unidecode)))
9578 (propagated-inputs
9579 `(("python-pyyaml" ,python-pyyaml)))
9580 (home-page "https://github.com/mk-fg/pretty-yaml")
9581 (synopsis "YAML pretty-print library for Python")
9582 (description
9583 "pyaml is a PyYAML based python module to produce pretty and readable
9584 YAML-serialized data.")
9585 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
9586
9587 (define-public python2-pyaml
9588 (package-with-python2 python-pyaml))
9589
9590 (define-public python-backpack
9591 (package
9592 (name "python-backpack")
9593 (version "0.1")
9594 (source
9595 (origin
9596 (method url-fetch)
9597 (uri (pypi-uri "backpack" version))
9598 (sha256
9599 (base32
9600 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
9601 (build-system python-build-system)
9602 (native-inputs
9603 `(("python-pytest" ,python-pytest)
9604 ("python-nose" ,python-nose)))
9605 (propagated-inputs
9606 `(("python-simplejson" ,python-simplejson)))
9607 (home-page "https://github.com/sdispater/backpack")
9608 (synopsis "Utilities for working with Python collections")
9609 (description "Backpack provides some useful utilities for working with
9610 collections of data.")
9611 (license license:expat)))
9612
9613 (define-public python2-backpack
9614 (package-with-python2 python-backpack))
9615
9616 (define-public python-prompt-toolkit
9617 (package
9618 (name "python-prompt-toolkit")
9619 (version "2.0.7")
9620 (source
9621 (origin
9622 (method url-fetch)
9623 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
9624 (sha256
9625 (base32
9626 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
9627 (build-system python-build-system)
9628 (arguments
9629 `(#:phases
9630 (modify-phases %standard-phases
9631 (delete 'check)
9632 (add-after 'install 'post-install-check
9633 (lambda* (#:key inputs outputs #:allow-other-keys)
9634 ;; HOME is needed for the test
9635 ;; "test_pathcompleter_can_expanduser".
9636 (setenv "HOME" "/tmp")
9637 (add-installed-pythonpath inputs outputs)
9638 (invoke "py.test"))))))
9639 (propagated-inputs
9640 `(("python-wcwidth" ,python-wcwidth)
9641 ("python-six" ,python-six)
9642 ("python-pygments" ,python-pygments)))
9643 (native-inputs
9644 `(("python-pytest" ,python-pytest)))
9645 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
9646 (synopsis "Library for building command line interfaces in Python")
9647 (description
9648 "Prompt-Toolkit is a library for building interactive command line
9649 interfaces in Python. It's like GNU Readline but it also features syntax
9650 highlighting while typing, out-of-the-box multi-line input editing, advanced
9651 code completion, incremental search, support for Chinese double-width
9652 characters, mouse support, and auto suggestions.")
9653 (license license:bsd-3)))
9654
9655 (define-public python2-prompt-toolkit
9656 (package-with-python2 python-prompt-toolkit))
9657
9658 (define-public python-prompt-toolkit-1
9659 (package (inherit python-prompt-toolkit)
9660 (version "1.0.15")
9661 (source
9662 (origin
9663 (method url-fetch)
9664 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
9665 (sha256
9666 (base32
9667 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
9668
9669 (define-public python2-prompt-toolkit-1
9670 (package-with-python2 python-prompt-toolkit-1))
9671
9672 (define-public python-jedi
9673 (package
9674 (name "python-jedi")
9675 (version "0.13.1")
9676 (source
9677 (origin
9678 (method url-fetch)
9679 (uri (pypi-uri "jedi" version))
9680 (sha256
9681 (base32
9682 "0j11q42g5vjkyhhjpyy8nb0gdxs78m3rpjai7p1hvgpyl9rkyjdp"))))
9683 (build-system python-build-system)
9684 (arguments
9685 `( ;; Many tests are failing with Python 3.7.x as of version 0.13.1 (see:
9686 ;; https://github.com/davidhalter/jedi/issues/1263)
9687 #:tests? #f
9688 #:phases
9689 (modify-phases %standard-phases
9690 (replace 'check
9691 (lambda* (#:key tests? #:allow-other-keys)
9692 (when tests?
9693 (invoke "py.test" "-vv")))))))
9694 (native-inputs
9695 `(("python-pytest" ,python-pytest)
9696 ("python-docopt" ,python-docopt)))
9697 (propagated-inputs
9698 `(("python-parso" ,python-parso)))
9699 (home-page "https://github.com/davidhalter/jedi")
9700 (synopsis "Autocompletion and static analysis library for Python")
9701 (description
9702 "Jedi is a static analysis tool for Python that can be used in Integrated
9703 Development Environments (@dfn{IDE}s) and text editors. It understands Python
9704 on a deeper level than many other static analysis frameworks for Python.
9705
9706 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
9707 well.")
9708 (license license:expat)))
9709
9710 (define-public python2-jedi
9711 (package-with-python2 python-jedi))
9712
9713 (define-public ptpython
9714 (package
9715 (name "ptpython")
9716 (version "0.34")
9717 (source (origin
9718 (method url-fetch)
9719 (uri (pypi-uri "ptpython" version))
9720 (sha256
9721 (base32
9722 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
9723 (build-system python-build-system)
9724 (arguments
9725 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
9726 (propagated-inputs
9727 `(("python-docopt" ,python-docopt)
9728 ("python-jedi" ,python-jedi)
9729 ("python-prompt-toolkit" ,python-prompt-toolkit)
9730 ("python-pygments" ,python-pygments)))
9731 (home-page "https://github.com/jonathanslenders/ptpython")
9732 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
9733 (description
9734 "ptpython is a Python read-eval-print loop with IDE-like features.
9735 It supports syntax highlighting, multiline editing, autocompletion, mouse,
9736 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
9737 etc.")
9738 (license license:bsd-3)
9739 (properties `((python2-variant . ,(delay ptpython-2))))))
9740
9741 (define-public ptpython-2
9742 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
9743 (package
9744 (inherit base)
9745 (name "ptpython2"))))
9746
9747 (define-public python-stem
9748 (package
9749 (name "python-stem")
9750 (version "1.7.0")
9751 (source
9752 (origin
9753 (method url-fetch)
9754 (uri (pypi-uri "stem" version))
9755 (sha256
9756 (base32
9757 "1awiglfiajnx2hva9aqpj3fmdvdb4qg7cwnlfyih827m68y3cq8v"))))
9758 (build-system python-build-system)
9759 (arguments
9760 `(#:phases
9761 (modify-phases %standard-phases
9762 (replace 'check
9763 (lambda _
9764 (invoke "./run_tests.py" "--unit")
9765 #t)))))
9766 (native-inputs
9767 `(("python-mock" ,python-mock)
9768 ("python-pycodestyle" ,python-pycodestyle)
9769 ("python-pyflakes" ,python-pyflakes)))
9770 (home-page "https://stem.torproject.org/")
9771 (synopsis
9772 "Python controller library that allows applications to interact with Tor")
9773 (description
9774 "Stem is a Python controller library for Tor. With it you can use Tor's
9775 control protocol to script against the Tor process and read descriptor data
9776 relays publish about themselves.")
9777 (license license:lgpl3)))
9778
9779 (define-public python2-stem
9780 (package-with-python2 python-stem))
9781
9782 (define-public python-pyserial
9783 (package
9784 (name "python-pyserial")
9785 (version "3.1.1")
9786 (source
9787 (origin
9788 (method url-fetch)
9789 (uri (pypi-uri "pyserial" version))
9790 (sha256
9791 (base32
9792 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
9793 (build-system python-build-system)
9794 (arguments
9795 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
9796 ;; #:phases
9797 ;; (modify-phases %standard-phases
9798 ;; (replace 'check
9799 ;; (lambda _
9800 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
9801 (home-page
9802 "https://github.com/pyserial/pyserial")
9803 (synopsis "Python Serial Port Bindings")
9804 (description "@code{pyserial} provide serial port bindings for Python. It
9805 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
9806 and/or Xon/Xoff. The port is accessed in RAW mode.")
9807 (license license:bsd-3)))
9808
9809 (define-public python2-pyserial
9810 (package-with-python2 python-pyserial))
9811
9812 (define-public python-kivy
9813 (package
9814 (name "python-kivy")
9815 (version "1.10.1")
9816 (source
9817 (origin
9818 (method url-fetch)
9819 (uri (pypi-uri "Kivy" version))
9820 (file-name (string-append name "-" version ".tar.gz"))
9821 (sha256
9822 (base32
9823 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
9824 (build-system python-build-system)
9825 (arguments
9826 `(#:tests? #f ; Tests require many optional packages
9827 #:phases
9828 (modify-phases %standard-phases
9829 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
9830 (lambda* (#:key inputs #:allow-other-keys)
9831 (setenv "KIVY_SDL2_PATH"
9832 (string-append (assoc-ref inputs "sdl-union")
9833 "/include/SDL2"))
9834 #t)))))
9835 (native-inputs
9836 `(("git" ,git)
9837 ("pkg-config" ,pkg-config)
9838 ("python-cython" ,python-cython)))
9839 (inputs
9840 `(("gstreamer" ,gstreamer)
9841 ("mesa" ,mesa)
9842 ("sdl-union"
9843 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
9844 (home-page "http://kivy.org")
9845 (synopsis
9846 "Multitouch application framework")
9847 (description
9848 "A software library for rapid development of
9849 hardware-accelerated multitouch applications.")
9850 (license license:expat)))
9851
9852 (define-public python2-kivy
9853 (package-with-python2 python-kivy))
9854
9855 (define-public python-kivy-next
9856 (deprecated-package "python-kivy-next" python-kivy))
9857
9858 (define-public python2-kivy-next
9859 (deprecated-package "python2-kivy-next" python2-kivy))
9860
9861 (define-public python-binaryornot
9862 (package
9863 (name "python-binaryornot")
9864 (version "0.4.4")
9865 (source (origin
9866 (method url-fetch)
9867 (uri (pypi-uri "binaryornot" version))
9868 (sha256
9869 (base32
9870 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
9871 (build-system python-build-system)
9872 (propagated-inputs
9873 `(("python-chardet" ,python-chardet)
9874 ("python-hypothesis" ,python-hypothesis)))
9875 (home-page "https://github.com/audreyr/binaryornot")
9876 (synopsis "Package to check if a file is binary or text")
9877 (description "Ultra-lightweight pure Python package to check if a file is
9878 binary or text.")
9879 (license license:bsd-3)
9880 (properties `((python2-variant . ,(delay python2-binaryornot))))))
9881
9882 (define-public python2-binaryornot
9883 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
9884 (package (inherit base)
9885 (propagated-inputs
9886 `(("python2-enum34" ,python2-enum34)
9887 ,@(package-propagated-inputs base))))))
9888
9889 (define-public python-nltk
9890 (package
9891 (name "python-nltk")
9892 (version "3.2.1")
9893 (source (origin
9894 (method url-fetch)
9895 (uri (pypi-uri "nltk" version))
9896 (sha256
9897 (base32
9898 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
9899 (build-system python-build-system)
9900 (arguments
9901 '(;; The tests require some extra resources to be downloaded.
9902 ;; TODO Try packaging these resources.
9903 #:tests? #f))
9904 (home-page "http://nltk.org/")
9905 (synopsis "Natural Language Toolkit")
9906 (description "It provides interfaces to over 50 corpora and lexical
9907 resources such as WordNet, along with a suite of text processing libraries
9908 for classification, tokenization, stemming, tagging, parsing, and semantic
9909 reasoning, wrappers for natural language processing libraries.")
9910 (license license:asl2.0)))
9911
9912 (define-public python2-nltk
9913 (package-with-python2 python-nltk))
9914
9915 (define-public python-pymongo
9916 (package
9917 (name "python-pymongo")
9918 (version "3.7.2")
9919 (source (origin
9920 (method url-fetch)
9921 (uri (pypi-uri "pymongo" version))
9922 (sha256
9923 (base32
9924 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
9925 (build-system python-build-system)
9926 (propagated-inputs
9927 `(("python-certifi" ,python-certifi)))
9928 (home-page "https://github.com/mongodb/mongo-python-driver")
9929 (synopsis "Python driver for MongoDB")
9930 (description "Python driver for MongoDB.")
9931 (license license:asl2.0)))
9932
9933 (define-public python2-pymongo
9934 (package-with-python2 python-pymongo))
9935
9936 (define-public python-sh
9937 (package
9938 (name "python-sh")
9939 (version "1.11")
9940 (source (origin
9941 (method url-fetch)
9942 (uri (pypi-uri "sh" version))
9943 (sha256
9944 (base32
9945 "192r0mpv6dmkysjzhc43ddffiwb5g7c76bgr1mb1z2xz9awbj3sr"))))
9946 (build-system python-build-system)
9947 (arguments
9948 `(#:tests? #f)) ; no tests
9949 (home-page "https://github.com/amoffat/sh")
9950 (synopsis "Python subprocess interface")
9951 (description "Abstracts process invocation by providing a function
9952 interface for programs.")
9953 (license license:expat)))
9954
9955 (define-public python2-sh
9956 (package-with-python2 python-sh))
9957
9958 (define-public python-consul
9959 (package
9960 (name "python-consul")
9961 (version "0.6.1")
9962 (source
9963 (origin
9964 (method url-fetch)
9965 (uri (pypi-uri "python-consul" version))
9966 (sha256
9967 (base32
9968 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
9969 (build-system python-build-system)
9970 (arguments
9971 '(#:tests? #f)) ; The tests are not distributed
9972 (propagated-inputs
9973 `(("python-requests" ,python-requests)
9974 ("python-six" ,python-six)))
9975 (home-page "https://github.com/cablehead/python-consul")
9976 (synopsis "Python client for Consul")
9977 (description
9978 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
9979 discovery, monitoring and configuration.")
9980 (license license:expat)))
9981
9982 (define-public python2-consul
9983 (package-with-python2 python-consul))
9984
9985 (define-public python-schematics
9986 (package
9987 (name "python-schematics")
9988 (version "1.1.1")
9989 (source
9990 (origin
9991 (method url-fetch)
9992 (uri (string-append
9993 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
9994 (file-name (string-append name "-" version ".tar.gz"))
9995 (sha256
9996 (base32
9997 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
9998 (build-system python-build-system)
9999 (propagated-inputs
10000 `(("python-six" ,python-six)))
10001 (arguments
10002 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
10003 ; version requirements (eg python-coveralls)
10004 (home-page "https://github.com/schematics/schematics")
10005 (synopsis "Python Data Structures for Humans")
10006 (description "Python Data Structures for Humans.")
10007 (license license:bsd-3)))
10008
10009 (define-public python2-schematics
10010 (package-with-python2 python-schematics))
10011
10012 (define-public python-odfpy
10013 (package
10014 (name "python-odfpy")
10015 (version "1.3.3")
10016 (source (origin
10017 (method url-fetch)
10018 (uri (pypi-uri "odfpy" version))
10019 (sha256
10020 (base32
10021 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
10022 (arguments
10023 `(#:modules ((srfi srfi-1)
10024 (guix build python-build-system)
10025 (guix build utils))
10026 #:phases
10027 (modify-phases %standard-phases
10028 (replace 'check
10029 ;; The test runner invokes python2 and python3 for test*.py.
10030 ;; To avoid having both in inputs, we replicate it here.
10031 (lambda _
10032 (for-each (lambda (test-file) (invoke "python" test-file))
10033 (find-files "tests" "^test.*\\.py$"))
10034 #t)))))
10035 (build-system python-build-system)
10036 (home-page "https://github.com/eea/odfpy")
10037 (synopsis "Python API and tools to manipulate OpenDocument files")
10038 (description "Collection of libraries and utility programs written in
10039 Python to manipulate OpenDocument 1.2 files.")
10040 (license
10041 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
10042 ;; number of files with other licenses.
10043 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
10044
10045 (define-public python2-odfpy
10046 (package-with-python2 python-odfpy))
10047
10048 (define-public python-natsort
10049 (package
10050 (name "python-natsort")
10051 (version "5.4.1")
10052 (source (origin
10053 (method url-fetch)
10054 (uri (pypi-uri "natsort" version))
10055 (sha256
10056 (base32
10057 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
10058 (build-system python-build-system)
10059 (arguments
10060 `(#:modules ((guix build utils)
10061 (guix build python-build-system)
10062 (srfi srfi-1)
10063 (srfi srfi-26)
10064 (ice-9 ftw))
10065 #:phases
10066 (modify-phases %standard-phases
10067 (add-before 'check 'set-cachedir
10068 ;; Tests require write access to $HOME by default
10069 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
10070 (replace 'check
10071 (lambda _
10072 (let ((cwd (getcwd)))
10073 (setenv "PYTHONPATH"
10074 (string-append
10075 cwd "/build/"
10076 (find (cut string-prefix? "lib" <>)
10077 (scandir (string-append cwd "/build")))
10078 ":"
10079 (getenv "PYTHONPATH")))
10080 (invoke "pytest" "-v")))))))
10081 (native-inputs
10082 `(("python-hypothesis" ,python-hypothesis)
10083 ("python-pytest-cov" ,python-pytest-cov)
10084 ("python-pytest-mock" ,python-pytest-mock)
10085 ("python-pytest" ,python-pytest)))
10086 (propagated-inputs ; TODO: Add python-fastnumbers.
10087 `(("python-pyicu" ,python-pyicu)))
10088 (home-page "https://github.com/SethMMorton/natsort")
10089 (synopsis "Natural sorting for python and shell")
10090 (description
10091 "Natsort lets you apply natural sorting on lists instead of
10092 lexicographical. If you use the built-in @code{sorted} method in python
10093 on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
10094 returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
10095 function @code{natsorted} that identifies numbers and sorts them separately
10096 from strings. It can also sort version numbers, real numbers, mixed types
10097 and more, and comes with a shell command @command{natsort} that exposes this
10098 functionality in the command line.")
10099 (license license:expat)
10100 (properties `((python2-variant . ,(delay python2-natsort))))))
10101
10102 (define-public python2-natsort
10103 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
10104 (package (inherit base)
10105 (native-inputs
10106 `(("python2-pathlib" ,python2-pathlib)
10107 ,@(package-native-inputs base))))))
10108
10109 (define-public python-glances
10110 (package
10111 (name "python-glances")
10112 (version "3.0.2")
10113 (source
10114 (origin
10115 (method url-fetch)
10116 (uri (pypi-uri "Glances" version))
10117 (sha256
10118 (base32
10119 "09fxysfp1n16csqvzvawy74qm6a94nvwjf3vcf5gkqp4i6k4vjjy"))))
10120 (build-system python-build-system)
10121 (propagated-inputs
10122 `(("python-psutil" ,python-psutil)))
10123 (home-page
10124 "https://github.com/nicolargo/glances")
10125 (synopsis
10126 "A cross-platform curses-based monitoring tool")
10127 (description
10128 "Glances is a curses-based monitoring tool for a wide variety of platforms.
10129 Glances uses the PsUtil library to get information from your system. It monitors
10130 CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
10131 (license license:lgpl3+)))
10132
10133 (define-public python2-glances
10134 (package-with-python2 python-glances))
10135
10136 (define-public python-graphql-core
10137 (package
10138 (name "python-graphql-core")
10139 (version "0.5.3")
10140 (source
10141 (origin
10142 (method url-fetch)
10143 (uri (pypi-uri "graphql-core" version))
10144 (sha256
10145 (base32
10146 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
10147 (build-system python-build-system)
10148 (arguments
10149 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
10150 #:phases
10151 (modify-phases %standard-phases
10152 (add-after 'unpack 'patch-hardcoded-version
10153 (lambda _ (substitute*
10154 "setup.py"
10155 (("'gevent==1.1rc1'") "'gevent'"))
10156 #t)))))
10157 (native-inputs
10158 `(("python-gevent" ,python-gevent)
10159 ("python-mock" ,python-mock)
10160 ("python-pytest-mock" ,python-pytest-mock)))
10161 (propagated-inputs
10162 `(("python-promise" ,python-promise)
10163 ("python-six" ,python-six)))
10164 (home-page "https://github.com/graphql-python/graphql-core")
10165 (synopsis "GraphQL implementation for Python")
10166 (description
10167 "GraphQL implementation for Python. GraphQL is a data query language and
10168 runtime designed and used to request and deliver data to mobile and web apps.
10169 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
10170 to Python.")
10171 (license license:expat)))
10172
10173 (define-public python2-graphql-core
10174 (package-with-python2 python-graphql-core))
10175
10176 (define-public python-graphql-relay
10177 (package
10178 (name "python-graphql-relay")
10179 (version "0.4.5")
10180 (source
10181 (origin
10182 (method url-fetch)
10183 (uri (pypi-uri "graphql-relay" version))
10184 (sha256
10185 (base32
10186 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
10187 (build-system python-build-system)
10188 (arguments
10189 '(#:tests? #f)) ; The tests are not distributed
10190 (propagated-inputs
10191 `(("python-graphql-core" ,python-graphql-core)
10192 ("python-promise" ,python-promise)
10193 ("python-six" ,python-six)))
10194 (home-page "https://github.com/graphql-python/graphql-relay-py")
10195 (synopsis "Relay implementation for Python")
10196 (description
10197 "This is a library to allow the easy creation of Relay-compliant servers
10198 using the GraphQL Python reference implementation of a GraphQL server. It
10199 should be noted that the code is a exact port of the original
10200 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
10201 from Facebook.")
10202 (license license:expat)))
10203
10204 (define-public python2-graphql-relay
10205 (package-with-python2 python-graphql-relay))
10206
10207 (define-public python-graphene
10208 (package
10209 (name "python-graphene")
10210 (version "0.10.2")
10211 (source
10212 (origin
10213 (method url-fetch)
10214 (uri (pypi-uri "graphene" version))
10215 (sha256
10216 (base32
10217 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
10218 (build-system python-build-system)
10219 (propagated-inputs
10220 `(("python-graphql-core" ,python-graphql-core)
10221 ("python-graphql-relay" ,python-graphql-relay)
10222 ("python-iso8601" ,python-iso8601)
10223 ("python-promise" ,python-promise)
10224 ("python-six" ,python-six)))
10225 (arguments
10226 `(#:tests? #f)) ; no tests/ in the PyPI tarball
10227 (home-page "http://graphene-python.org/")
10228 (synopsis "GraphQL Framework for Python")
10229 (description
10230 "Graphene is a Python library for building GraphQL schemas/types.
10231 A GraphQL schema describes your data model, and provides a GraphQL server
10232 with an associated set of resolve methods that know how to fetch data.")
10233 (properties `((python2-variant . ,(delay python2-graphene))))
10234 (license license:expat)))
10235
10236 (define-public python2-graphene
10237 (let ((base (package-with-python2
10238 (strip-python2-variant python-graphene))))
10239 (package (inherit base)
10240 (native-inputs
10241 `(("python2-sqlalchemy" ,python2-sqlalchemy)
10242 ,@(package-native-inputs base))))))
10243
10244 (define-public python-nautilus
10245 (package
10246 (name "python-nautilus")
10247 (version "0.4.9")
10248 (source
10249 (origin
10250 (method url-fetch)
10251 (uri (pypi-uri "nautilus" version))
10252 (sha256
10253 (base32
10254 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
10255 (build-system python-build-system)
10256 (arguments `(#:tests? #f)) ; fails to import test modules
10257 (propagated-inputs
10258 `(("python-bcrypt" ,python-bcrypt)
10259 ("python-click" ,python-click)
10260 ("python-consul" ,python-consul)
10261 ("python-graphene" ,python-graphene)
10262 ("python-jinja2" ,python-jinja2)
10263 ("python-peewee" ,python-peewee)
10264 ("python-pika" ,python-pika)
10265 ("python-tornado" ,python-tornado)
10266 ("python-wtforms" ,python-wtforms)))
10267 (native-inputs
10268 `(("python-nose2" ,python-nose2)))
10269 (home-page "https://github.com/AlecAivazis/nautilus")
10270 (synopsis "Library for creating microservice applications")
10271 (description
10272 "Nautilus is a framework for flux based microservices that looks to
10273 provide extendible implementations of common aspects of a cloud so that you can
10274 focus on building massively scalable web applications.")
10275 (license license:expat)))
10276
10277 (define-public python-snowballstemmer
10278 (package
10279 (name "python-snowballstemmer")
10280 (version "1.2.1")
10281 (source (origin
10282 (method url-fetch)
10283 (uri (pypi-uri "snowballstemmer" version))
10284 (sha256
10285 (base32
10286 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
10287 (build-system python-build-system)
10288 (arguments
10289 `(;; No tests exist
10290 #:tests? #f))
10291 (home-page "https://github.com/shibukawa/snowball_py")
10292 (synopsis "Snowball stemming library collection for Python")
10293 (description "This package provides 16 word stemmer algorithms generated
10294 from Snowball algorithms. It includes the 15 original ones plus the Poerter
10295 English stemmer.")
10296 (license license:bsd-3)))
10297
10298 (define-public python2-snowballstemmer
10299 (package-with-python2 python-snowballstemmer))
10300
10301 (define-public python-sphinx-cloud-sptheme
10302 (package
10303 (name "python-sphinx-cloud-sptheme")
10304 (version "1.8.0")
10305 (source (origin
10306 (method url-fetch)
10307 (uri (pypi-uri "cloud_sptheme" version))
10308 (sha256
10309 (base32
10310 "1dniqb6a39yh786f86c4jn666rwnyi1jvzn4616zhcchb7sfdshd"))))
10311 (build-system python-build-system)
10312 ;; FIXME: The 'pypi' release archive does not contain tests.
10313 (arguments '(#:tests? #f))
10314 (native-inputs
10315 `(("python-sphinx" ,python-sphinx)))
10316 (home-page "https://bitbucket.org/ecollins/cloud_sptheme")
10317 (synopsis "'Cloud' theme for Sphinx documenter")
10318 (description "This package contains the \"Cloud\" theme for Sphinx and some
10319 related extensions.")
10320 (license license:bsd-3)))
10321
10322 (define-public python2-sphinx-cloud-sptheme
10323 (package-with-python2 python-sphinx-cloud-sptheme))
10324
10325 (define-public python-sphinx-alabaster-theme
10326 (package
10327 (name "python-sphinx-alabaster-theme")
10328 (version "0.7.12")
10329 (source (origin
10330 (method url-fetch)
10331 (uri (pypi-uri "alabaster" version))
10332 (sha256
10333 (base32
10334 "00nwwjj2d2ym4s2kk217x7jkx1hnczc3fvm8yxbqmsp6b0nxfqd6"))))
10335 (build-system python-build-system)
10336 (propagated-inputs
10337 `(("python-pygments" ,python-pygments)))
10338 (home-page "https://alabaster.readthedocs.io/")
10339 (synopsis "Configurable sidebar-enabled Sphinx theme")
10340 (description "Alabaster is a visually (c)lean, responsive, configurable
10341 theme for the Sphinx documentation system. It's the default theme of Sphinx.")
10342 (license license:bsd-3)))
10343
10344 (define-public python2-sphinx-alabaster-theme
10345 (package-with-python2 python-sphinx-alabaster-theme))
10346
10347 (define-public python-setproctitle
10348 (package
10349 (name "python-setproctitle")
10350 (version "1.1.10")
10351 (source
10352 (origin
10353 (method url-fetch)
10354 (uri (pypi-uri "setproctitle" version))
10355 (sha256
10356 (base32
10357 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
10358 (build-system python-build-system)
10359 (arguments
10360 '(#:phases
10361 (modify-phases %standard-phases
10362 (add-before 'check 'patch-Makefile
10363 ;; Stricly this is only required for the python2 variant.
10364 ;; But adding a phase in an inherited package seems to be
10365 ;; cumbersum. So we patch even for python3.
10366 (lambda _
10367 (let ((nose (assoc-ref %build-inputs "python2-nose")))
10368 (when nose
10369 (substitute* "Makefile"
10370 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
10371 (string-append nose "/bin/nosetests "))))
10372 #t)))
10373 (replace 'check
10374 (lambda _
10375 (setenv "PYTHON" (or (which "python3") (which "python")))
10376 (setenv "PYCONFIG" (or (which "python3-config")
10377 (which "python-config")))
10378 (setenv "CC" "gcc")
10379 ;; No need to extend PYTHONPATH to find the built package, since
10380 ;; the Makefile will build anyway
10381 (invoke "make" "check"))))))
10382 (native-inputs
10383 `(("procps" ,procps))) ; required for tests
10384 (home-page
10385 "https://github.com/dvarrazzo/py-setproctitle")
10386 (synopsis
10387 "Setproctitle implementation for Python to customize the process title")
10388 (description "The library allows a process to change its title (as displayed
10389 by system tools such as ps and top).
10390
10391 Changing the title is mostly useful in multi-process systems, for
10392 example when a master process is forked: changing the children's title
10393 allows to identify the task each process is busy with. The technique
10394 is used by PostgreSQL and the OpenSSH Server for example.")
10395 (license license:bsd-3)
10396 (properties `((python2-variant . ,(delay python2-setproctitle))))))
10397
10398 (define-public python2-setproctitle
10399 (let ((base (package-with-python2
10400 (strip-python2-variant python-setproctitle))))
10401 (package
10402 (inherit base)
10403 (native-inputs `(("python2-nose" ,python2-nose)
10404 ,@(package-native-inputs base))))))
10405
10406 (define-public python-validictory
10407 (package
10408 (name "python-validictory")
10409 (version "1.0.1")
10410 (source
10411 (origin
10412 (method url-fetch)
10413 (uri (pypi-uri "validictory" version))
10414 (sha256
10415 (base32
10416 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
10417 (build-system python-build-system)
10418 (arguments
10419 '(#:phases
10420 (modify-phases %standard-phases
10421 (add-after 'unpack 'bootstrap
10422 ;; Move the tests out of the package directory to avoid
10423 ;; packaging them.
10424 (lambda* _
10425 (rename-file "validictory/tests" "tests")
10426 (delete-file "tests/__init__.py")))
10427 (replace 'check
10428 (lambda _
10429 ;; Extend PYTHONPATH so the built package will be found.
10430 (setenv "PYTHONPATH"
10431 (string-append (getcwd) "/build/lib:"
10432 (getenv "PYTHONPATH")))
10433 (zero? (system* "py.test" "-vv" )))))))
10434 (native-inputs
10435 `(("python-pytest" ,python-pytest)))
10436 (home-page
10437 "https://github.com/jamesturk/validictory")
10438 (synopsis "General purpose Python data validator")
10439 (description "It allows validation of arbitrary Python data structures.
10440
10441 The schema format is based on the JSON Schema
10442 proposal (http://json-schema.org), so combined with json the library is also
10443 useful as a validator for JSON data.")
10444 (license license:expat)))
10445
10446 (define-public python2-validictory
10447 (package-with-python2 python-validictory))
10448
10449 (define-public python-pyelftools
10450 (package
10451 (name "python-pyelftools")
10452 (version "0.25")
10453 (source
10454 (origin
10455 (method url-fetch)
10456 (uri (pypi-uri "pyelftools" version))
10457 (sha256
10458 (base32
10459 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
10460 (build-system python-build-system)
10461 (arguments
10462 `(#:phases
10463 (modify-phases %standard-phases
10464 (add-before 'check 'set-pythonpath
10465 (lambda _
10466 (setenv "PYTHONPATH"
10467 (string-append
10468 (getcwd) "/test/"
10469 ":" (getenv "PYTHONPATH")))
10470 #t)))))
10471 (home-page
10472 "https://github.com/eliben/pyelftools")
10473 (synopsis
10474 "Analyze binary and library file information")
10475 (description "This Python library provides interfaces for parsing and
10476 analyzing two binary and library file formats; the Executable and Linking
10477 Format (ELF), and debugging information in the Debugging With Attributed
10478 Record Format (DWARF).")
10479 (license license:public-domain)))
10480
10481 (define-public python-pyev
10482 (package
10483 (name "python-pyev")
10484 (version "0.9.0")
10485 (source
10486 (origin
10487 (method url-fetch)
10488 (uri (pypi-uri "pyev" version))
10489 (sha256
10490 (base32
10491 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
10492 (build-system python-build-system)
10493 (arguments
10494 `(#:tests? #f ; no test suite
10495 #:phases
10496 (modify-phases %standard-phases
10497 (add-after 'unpack 'patch
10498 (lambda* (#:key inputs #:allow-other-keys)
10499 (let ((libev (string-append (assoc-ref inputs "libev")
10500 "/lib/libev.so.4")))
10501 (substitute* "setup.py"
10502 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
10503 (string-append "libev_dll_name = \"" libev "\"")))))))))
10504 (inputs
10505 `(("libev" ,libev)))
10506 (home-page "http://pythonhosted.org/pyev/")
10507 (synopsis "Python libev interface")
10508 (description "Pyev provides a Python interface to libev.")
10509 (license license:gpl3)))
10510
10511 (define-public python2-pyev
10512 (package-with-python2 python-pyev))
10513
10514 (define-public python-imagesize
10515 (package
10516 (name "python-imagesize")
10517 (version "1.1.0")
10518 (source
10519 (origin
10520 (method url-fetch)
10521 (uri (pypi-uri "imagesize" version))
10522 (sha256
10523 (base32
10524 "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk"))))
10525 (build-system python-build-system)
10526 (home-page "https://github.com/shibukawa/imagesize_py")
10527 (synopsis "Gets image size of files in various formats in Python")
10528 (description
10529 "This package allows determination of image size from
10530 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
10531 (license license:expat)))
10532
10533 (define-public python2-imagesize
10534 (package-with-python2 python-imagesize))
10535
10536 (define-public python-termstyle
10537 (package
10538 (name "python-termstyle")
10539 (version "0.1.11")
10540 (source
10541 (origin
10542 (method url-fetch)
10543 (uri (pypi-uri "termstyle" version))
10544 (sha256
10545 (base32
10546 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
10547 (build-system python-build-system)
10548 (arguments
10549 '(#:phases
10550 (modify-phases %standard-phases
10551 (replace 'check
10552 (lambda _
10553 (zero? (system* "python" "test3.py")))))))
10554 (home-page "https://github.com/gfxmonk/termstyle")
10555 (synopsis "Console text coloring for Python")
10556 (description "This package provides console text coloring for Python.")
10557 (license license:bsd-3)))
10558
10559 (define-public python-argcomplete
10560 (package
10561 (name "python-argcomplete")
10562 (version "1.7.0")
10563 (source
10564 (origin
10565 (method url-fetch)
10566 (uri (pypi-uri "argcomplete" version))
10567 (sha256
10568 (base32
10569 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
10570 (build-system python-build-system)
10571 (native-inputs
10572 `(("python-pexpect" ,python-pexpect)
10573 ("tcsh" ,tcsh)
10574 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
10575 (home-page "https://github.com/kislyuk/argcomplete")
10576 (synopsis "Shell tab completion for Python argparse")
10577 (description "argcomplete provides extensible command line tab completion
10578 of arguments and options for Python scripts using @code{argparse}. It's
10579 particularly useful for programs with many options or sub-parsers that can
10580 dynamically suggest completions; for example, when browsing resources over the
10581 network.")
10582 (license license:asl2.0)))
10583
10584 (define-public python2-argcomplete
10585 (package-with-python2 python-argcomplete))
10586
10587 (define-public python-xopen
10588 (package
10589 (name "python-xopen")
10590 (version "0.3.3")
10591 (source
10592 (origin
10593 (method url-fetch)
10594 (uri (pypi-uri "xopen" version))
10595 (sha256
10596 (base32
10597 "1a0wbil552wsmklwd89ssmgz3pjd86qa9i7jh8wqb9wslc8a2qjr"))
10598 (file-name (string-append name "-" version ".tar.gz"))))
10599 (build-system python-build-system)
10600 (home-page "https://github.com/marcelm/xopen/")
10601 (synopsis "Open compressed files transparently")
10602 (description "This module provides an @code{xopen} function that works like
10603 Python's built-in @code{open} function, but can also deal with compressed files.
10604 Supported compression formats are gzip, bzip2 and, xz, and are automatically
10605 recognized by their file extensions. The focus is on being as efficient as
10606 possible on all supported Python versions.")
10607 (license license:expat)))
10608
10609 (define-public python2-xopen
10610 (let ((base (package-with-python2
10611 (strip-python2-variant python-xopen))))
10612 (package
10613 (inherit base)
10614 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
10615 ,@(package-propagated-inputs base))))))
10616
10617 (define-public python-cheetah
10618 (package
10619 (name "python-cheetah")
10620 (version "3.1.0")
10621 (source
10622 (origin
10623 (method url-fetch)
10624 (uri (pypi-uri "Cheetah3" version))
10625 (sha256
10626 (base32
10627 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
10628 (build-system python-build-system)
10629 (arguments
10630 `(#:modules ((guix build utils)
10631 (guix build python-build-system)
10632 (ice-9 ftw)
10633 (srfi srfi-1)
10634 (srfi srfi-26))
10635 #:phases (modify-phases %standard-phases
10636 (add-after 'unpack 'use-absolute-python
10637 (lambda _
10638 (substitute* "Cheetah/CheetahWrapper.py"
10639 (("#!/usr/bin/env python")
10640 (string-append "#!" (which "python"))))
10641 #t))
10642 (replace 'check
10643 (lambda _
10644 (let ((cwd (getcwd)))
10645 (setenv "PYTHONPATH"
10646 (string-append
10647 cwd "/build/"
10648 (find (cut string-prefix? "lib" <>)
10649 (scandir (string-append cwd "/build")))
10650 ":" (getenv "PYTHONPATH")))
10651 (setenv "PATH"
10652 (string-append (getenv "PATH")
10653 ":" cwd "/bin"))
10654 (setenv "TMPDIR" "/tmp")
10655
10656 (substitute* "Cheetah/Tests/Test.py"
10657 (("unittest.TextTestRunner\\(\\)")
10658 "unittest.TextTestRunner(verbosity=2)"))
10659
10660 (invoke "python" "Cheetah/Tests/Test.py")))))))
10661 (propagated-inputs
10662 `(("python-markdown" ,python-markdown))) ;optional
10663 (home-page "http://cheetahtemplate.org/")
10664 (synopsis "Template engine")
10665 (description "Cheetah is a text-based template engine and Python code
10666 generator.
10667
10668 Cheetah can be used as a standalone templating utility or referenced as
10669 a library from other Python applications. It has many potential uses,
10670 but web developers looking for a viable alternative to ASP, JSP, PHP and
10671 PSP are expected to be its principle user group.
10672
10673 Features:
10674 @enumerate
10675 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
10676 text-based format.
10677 @item Cleanly separates content, graphic design, and program code.
10678 @item Blends the power and flexibility of Python with a simple template language
10679 that non-programmers can understand.
10680 @item Gives template writers full access to any Python data structure, module,
10681 function, object, or method in their templates.
10682 @item Makes code reuse easy by providing an object-orientated interface to
10683 templates that is accessible from Python code or other Cheetah templates.
10684 One template can subclass another and selectively reimplement sections of it.
10685 @item Provides a simple, yet powerful, caching mechanism that can dramatically
10686 improve the performance of a dynamic website.
10687 @item Compiles templates into optimized, yet readable, Python code.
10688 @end enumerate")
10689 (license (license:x11-style "file://LICENSE"))))
10690
10691 (define-public python2-cheetah
10692 (package-with-python2 python-cheetah))
10693
10694 (define-public python-dulwich
10695 (package
10696 (name "python-dulwich")
10697 (version "0.18.6")
10698 (source
10699 (origin
10700 (method url-fetch)
10701 (uri (list (string-append "https://www.dulwich.io/releases/"
10702 "dulwich-" version ".tar.gz")
10703 (pypi-uri "dulwich" version)))
10704 (sha256
10705 (base32
10706 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
10707 (build-system python-build-system)
10708 (arguments
10709 `(#:phases
10710 (modify-phases %standard-phases
10711 (add-before 'check 'fix-tests
10712 (lambda* (#:key inputs #:allow-other-keys)
10713 ;; The tests use Popen with a custom environment which doesn't
10714 ;; include PATH.
10715 (substitute* "dulwich/tests/compat/utils.py"
10716 (("'git'") (string-append "'"
10717 (which "git")
10718 "'")))
10719 (substitute* '("dulwich/tests/test_repository.py"
10720 "dulwich/tests/test_hooks.py")
10721 (("#!/bin/sh") (string-append "#!" (which "sh"))))
10722 (setenv "TEST_RUNNER" "unittest")
10723 (setenv "PYTHONHASHSEED" "random")
10724 #t)))))
10725 (propagated-inputs
10726 `(("python-fastimport" ,python-fastimport)))
10727 (native-inputs
10728 `(("python-mock" ,python-mock)
10729 ("python-geventhttpclient" ,python-geventhttpclient)
10730 ("git" ,git)))
10731 (home-page "https://www.dulwich.io/")
10732 (synopsis "Git implementation in Python")
10733 (description "Dulwich is an implementation of the Git file formats and
10734 protocols written in pure Python.")
10735 ;; Can be used with either license.
10736 (license (list license:asl2.0 license:gpl2+))))
10737
10738 (define-public python2-dulwich
10739 (package-with-python2 python-dulwich))
10740
10741 (define-public python-pbkdf2
10742 (package
10743 (name "python-pbkdf2")
10744 (version "1.3")
10745 (source
10746 (origin
10747 (method url-fetch)
10748 (uri (pypi-uri "pbkdf2" version))
10749 (sha256
10750 (base32
10751 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
10752 (build-system python-build-system)
10753 (arguments
10754 '(#:phases
10755 (modify-phases %standard-phases
10756 (replace 'check
10757 (lambda _
10758 (setenv "PYTHONPATH"
10759 (string-append (getcwd) "/build/lib:"
10760 (getenv "PYTHONPATH")))
10761 (zero? (system* "python" "test/test_pbkdf2.py")))))))
10762 (propagated-inputs
10763 `(("python-pycrypto" ,python-pycrypto))) ; optional
10764 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
10765 (synopsis "Password-based key derivation")
10766 (description "This module implements the password-based key derivation
10767 function, PBKDF2, specified in RSA PKCS#5 v2.0.
10768
10769 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
10770 is part of the RSA Public Key Cryptography Standards series. The provided
10771 implementation takes a password or a passphrase and a salt value (and
10772 optionally a iteration count, a digest module, and a MAC module) and provides
10773 a file-like object from which an arbitrarly-sized key can be read.")
10774 (license license:expat)))
10775
10776 (define-public python2-pbkdf2
10777 (package-with-python2 python-pbkdf2))
10778
10779 (define-public python-qrcode
10780 (package
10781 (name "python-qrcode")
10782 (version "6.0")
10783 (source
10784 (origin
10785 (method url-fetch)
10786 (uri (pypi-uri "qrcode" version))
10787 (sha256
10788 (base32
10789 "1gz1g2n9kqwqkak78aavr354z1v3yyiksk7q6xp5hi1zr6s0syq3"))))
10790 (build-system python-build-system)
10791 (arguments
10792 ;; FIXME: Tests require packaging 'pymaging'.
10793 '(#:tests? #f))
10794 (propagated-inputs
10795 `(("python-lxml" ,python-lxml) ; for SVG output
10796 ("python-pillow" ,python-pillow) ; for PNG output
10797 ("python-six" ,python-six)))
10798 (inputs
10799 `(;; The setup.cfg file needs to be used, and support for this requires
10800 ;; at least version 30.3.0 of setuptools
10801 ("python-setuptools" ,python-setuptools)))
10802 (home-page "https://github.com/lincolnloop/python-qrcode")
10803 (synopsis "QR Code image generator")
10804 (description "This package provides a pure Python QR Code generator
10805 module. It uses the Python Imaging Library (PIL) to allow for the generation
10806 of QR Codes.
10807
10808 In addition this package provides a command line tool to generate QR codes and
10809 either write these QR codes to a file or do the output as ascii art at the
10810 console.")
10811 (license license:bsd-3)))
10812
10813 (define-public python2-qrcode
10814 (package-with-python2 python-qrcode))
10815
10816 (define-public python-rst2ansi
10817 (package
10818 (name "python-rst2ansi")
10819 (version "0.1.5")
10820 (source
10821 (origin
10822 (method url-fetch)
10823 (uri (pypi-uri "rst2ansi" version))
10824 (sha256
10825 (base32
10826 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
10827 (build-system python-build-system)
10828 (propagated-inputs
10829 `(("python-docutils" ,python-docutils)))
10830 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
10831 (synopsis "Convert RST to ANSI-decorated console output")
10832 (description
10833 "Python module dedicated to rendering RST (reStructuredText) documents
10834 to ansi-escaped strings suitable for display in a terminal.")
10835 (license license:expat)))
10836
10837 (define-public python-ansi2html
10838 (package
10839 (name "python-ansi2html")
10840 (version "1.2.0")
10841 (source
10842 (origin
10843 (method url-fetch)
10844 (uri (pypi-uri "ansi2html" version))
10845 (sha256
10846 (base32
10847 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
10848 (build-system python-build-system)
10849 (native-inputs
10850 `(("python-mock" ,python-mock)
10851 ("python-nose" ,python-nose)))
10852 (propagated-inputs
10853 `(("python-six" ,python-six)))
10854 (home-page "https://github.com/ralphbean/ansi2html")
10855 (synopsis "Convert ANSI-decorated console output to HTML")
10856 (description
10857 "@command{ansi2html} is a Python library and command line utility for
10858 convering text with ANSI color codes to HTML or LaTeX.")
10859 (license license:gpl3+)))
10860
10861 (define-public python2-ansi2html
10862 (package-with-python2 python-ansi2html))
10863
10864 (define-public python-ddt
10865 (package
10866 (name "python-ddt")
10867 (version "1.1.3")
10868 (source
10869 (origin
10870 (method url-fetch)
10871 (uri (pypi-uri "ddt" version))
10872 (sha256
10873 (base32
10874 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
10875 (build-system python-build-system)
10876 (native-inputs
10877 `(("python-mock" ,python-mock)
10878 ("python-nose" ,python-nose)))
10879 (propagated-inputs
10880 `(("python-six" ,python-six)
10881 ("python-pyyaml" ,python-pyyaml)))
10882 (home-page "https://github.com/txels/ddt")
10883 (synopsis "Data-Driven Tests")
10884 (description
10885 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
10886 running it with different test data, and make it appear as multiple test
10887 cases.")
10888 (license license:expat)))
10889
10890 (define-public python2-ddt
10891 (package-with-python2 python-ddt))
10892
10893 (define-public python-pycountry
10894 (package
10895 (name "python-pycountry")
10896 (version "18.5.26")
10897 (source
10898 (origin
10899 (method url-fetch)
10900 (uri (pypi-uri "pycountry" version))
10901 (sha256
10902 (base32
10903 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
10904 (build-system python-build-system)
10905 (home-page "https://bitbucket.org/flyingcircus/pycountry")
10906 (synopsis "ISO databases for languages, countries, currencies, etc.")
10907 (description
10908 "@code{pycountry} provides the ISO databases for the standards:
10909 @enumerate
10910 @item 639-3 (Languages)
10911 @item 3166 (Countries)
10912 @item 3166-3 (Deleted Countries)
10913 @item 3166-2 (Subdivisions of countries)
10914 @item 4217 (Currencies)
10915 @item 15924 (Scripts)
10916 @end enumerate
10917 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
10918 through a Python API.")
10919 (license license:lgpl2.1+)))
10920
10921 (define-public python2-pycountry
10922 (package-with-python2 python-pycountry))
10923
10924 (define-public python-pycosat
10925 (package
10926 (name "python-pycosat")
10927 (version "0.6.1")
10928 (source
10929 (origin
10930 (method url-fetch)
10931 (uri (pypi-uri "pycosat" version))
10932 (sha256
10933 (base32
10934 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
10935 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
10936 (build-system python-build-system)
10937 (home-page "https://github.com/ContinuumIO/pycosat")
10938 (synopsis "Bindings to picosat (a SAT solver)")
10939 (description
10940 "This package provides efficient Python bindings to @code{picosat} on
10941 the C level. When importing pycosat, the @code{picosat} solver becomes part
10942 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
10943 Problem} (SAT) solver.")
10944 (license license:expat)))
10945
10946 (define-public python2-pycosat
10947 (package-with-python2 python-pycosat))
10948
10949 (define-public python2-ruamel.ordereddict
10950 (package
10951 (name "python2-ruamel.ordereddict")
10952 (version "0.4.9")
10953 (source
10954 (origin
10955 (method url-fetch)
10956 (uri (pypi-uri "ruamel.ordereddict" version))
10957 (sha256
10958 (base32
10959 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
10960 (build-system python-build-system)
10961 (arguments
10962 `(#:python ,python-2
10963 #:phases
10964 (modify-phases %standard-phases
10965 (delete 'check)
10966 (add-after 'install 'check
10967 (lambda* (#:key inputs outputs #:allow-other-keys)
10968 (add-installed-pythonpath inputs outputs)
10969 (zero? (system* "python" "test/testordereddict.py")))))))
10970 (home-page "https://bitbucket.org/ruamel/ordereddict")
10971 (synopsis "Version of dict that keeps keys in insertion order")
10972 (description
10973 "This is an implementation of an ordered dictionary with @dfn{Key
10974 Insertion Order} (KIO: updates of values do not affect the position of the
10975 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
10976 removed and put at the back). The standard library module @code{OrderedDict},
10977 implemented later, implements a subset of @code{ordereddict} functionality.
10978 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
10979 Order} (KSO, no sorting function can be specified, but a transform can be
10980 specified to apply on the key before comparison (e.g. @code{string.lower})).")
10981 (license license:expat)))
10982
10983 (define-public python-pypeg2
10984 (package
10985 (name "python-pypeg2")
10986 (version "2.15.2")
10987 (source
10988 (origin
10989 (method url-fetch)
10990 (uri (pypi-uri "pyPEG2" version))
10991 (sha256
10992 (base32
10993 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
10994 (build-system python-build-system)
10995 (propagated-inputs `(("python-lxml" ,python-lxml)))
10996 (arguments
10997 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
10998 '(#:tests? #f))
10999 (home-page "https://fdik.org/pyPEG/")
11000 (synopsis "Parsering Expression Grammars in Python")
11001 (description "PyPEG is an intrinsic parser interpreter framework for
11002 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
11003 parse many formal languages.")
11004 (license license:gpl2)))
11005
11006 (define-public python-incremental
11007 (package
11008 (name "python-incremental")
11009 (version "17.5.0")
11010 (source
11011 (origin
11012 (method url-fetch)
11013 (uri (pypi-uri "incremental" version))
11014 (sha256
11015 (base32
11016 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
11017 (build-system python-build-system)
11018 (home-page "https://github.com/hawkowl/incremental")
11019 (synopsis "Library for versioning Python projects")
11020 (description "Incremental is a small library that versions your Python
11021 projects.")
11022 (license license:expat)))
11023
11024 (define-public python2-incremental
11025 (package-with-python2 python-incremental))
11026
11027 (define-public python-invoke
11028 (package
11029 (name "python-invoke")
11030 (home-page "http://www.pyinvoke.org/")
11031 (version "1.1.0")
11032 (source (origin
11033 (method url-fetch)
11034 (uri (pypi-uri "invoke" version))
11035 (sha256
11036 (base32
11037 "0aiy1xvk1f91246zxd1zqrm679vdvd10h843a2na41cqr3cflpi6"))))
11038 (build-system python-build-system)
11039 (arguments
11040 ;; XXX: Requires many dependencies that are not yet in Guix.
11041 `(#:tests? #f))
11042 (synopsis "Pythonic task execution")
11043 (description
11044 "Invoke is a Python task execution tool and library, drawing inspiration
11045 from various sources to arrive at a powerful and clean feature set. It is
11046 evolved from the Fabric project, but focuses on local and abstract concerns
11047 instead of servers and network commands.")
11048 (license license:bsd-3)))
11049
11050 (define-public python2-invoke
11051 (package-with-python2 python-invoke))
11052
11053 (define-public python-automat
11054 (package
11055 (name "python-automat")
11056 (version "0.6.0")
11057 (source (origin
11058 (method url-fetch)
11059 (uri (pypi-uri "Automat" version))
11060 (sha256
11061 (base32
11062 "1a7nsrljysfmdqmpn2apfa1gg6rfah4y9sizvns8gb08rx7d07rw"))))
11063 (build-system python-build-system)
11064 ;; We disable the tests because they require python-twisted, while
11065 ;; python-twisted depends on python-automat. Twisted is optional, but the
11066 ;; tests fail if it is not available. Also see
11067 ;; <https://github.com/glyph/automat/issues/71>.
11068 (arguments '(#:tests? #f))
11069 (native-inputs
11070 `(("python-m2r" ,python-m2r)
11071 ("python-setuptools-scm" ,python-setuptools-scm)
11072 ("python-graphviz" ,python-graphviz)))
11073 (propagated-inputs
11074 `(("python-six" ,python-six)
11075 ("python-attrs" ,python-attrs)))
11076 (home-page "https://github.com/glyph/Automat")
11077 (synopsis "Self-service finite-state machines")
11078 (description "Automat is a library for concise, idiomatic Python
11079 expression of finite-state automata (particularly deterministic finite-state
11080 transducers).")
11081 (license license:expat)))
11082
11083 (define-public python2-automat
11084 (package-with-python2 python-automat))
11085
11086 (define-public python-m2r
11087 (package
11088 (name "python-m2r")
11089 (version "0.1.12")
11090 (source (origin
11091 (method url-fetch)
11092 (uri (pypi-uri "m2r" version))
11093 (sha256
11094 (base32
11095 "1axrwnf425sz4qz3c0qc7yhhki4myzb8rki7pczcsgzznzmqdyxd"))))
11096 (build-system python-build-system)
11097 (propagated-inputs
11098 `(("python-docutils" ,python-docutils)
11099 ("python-mistune" ,python-mistune)))
11100 (native-inputs
11101 `(("python-pygments" ,python-pygments)
11102 ("python-mock" ,python-mock)))
11103 (home-page "https://github.com/miyakogi/m2r")
11104 (synopsis "Markdown to reStructuredText converter")
11105 (description "M2R converts a markdown file including reST markups to valid
11106 reST format.")
11107 (license license:expat)))
11108
11109 (define-public python2-m2r
11110 (package-with-python2 python-m2r))
11111
11112 (define-public python-constantly
11113 (package
11114 (name "python-constantly")
11115 (version "15.1.0")
11116 (source (origin
11117 (method url-fetch)
11118 (uri (pypi-uri "constantly" version))
11119 (sha256
11120 (base32
11121 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
11122 (build-system python-build-system)
11123 (home-page "https://github.com/twisted/constantly")
11124 (synopsis "Symbolic constants in Python")
11125 (description "Constantly is a Python library that provides symbolic
11126 constant support. It includes collections and constants with text, numeric,
11127 and bit flag values.")
11128 (license license:expat)))
11129
11130 (define-public python2-constantly
11131 (package-with-python2 python-constantly))
11132
11133 (define-public python-attrs
11134 (package
11135 (name "python-attrs")
11136 (version "18.2.0")
11137 (source (origin
11138 (method url-fetch)
11139 (uri (pypi-uri "attrs" version))
11140 (sha256
11141 (base32
11142 "0s9ydh058wmmf5v391pym877x4ahxg45dw6a0w4c7s5wgpigdjqh"))))
11143 (build-system python-build-system)
11144 (arguments
11145 `(#:modules ((guix build utils)
11146 (guix build python-build-system)
11147 (ice-9 ftw)
11148 (srfi srfi-1)
11149 (srfi srfi-26))
11150 #:phases (modify-phases %standard-phases
11151 (replace 'check
11152 (lambda _
11153 (let ((cwd (getcwd)))
11154 (setenv "PYTHONPATH"
11155 (string-append
11156 cwd "/build/"
11157 (find (cut string-prefix? "lib" <>)
11158 (scandir (string-append cwd "/build")))
11159 ":"
11160 (getenv "PYTHONPATH")))
11161 (invoke "python" "-m" "pytest")))))))
11162 (native-inputs
11163 `(("python-coverage" ,python-coverage)
11164 ("python-hypothesis" ,python-hypothesis)
11165 ("python-pympler" ,python-pympler)
11166 ("python-pytest" ,python-pytest)
11167 ("python-six" ,python-six)
11168 ("python-sphinx" ,python-sphinx)
11169 ("python-zope-interface" ,python-zope-interface)))
11170 (home-page "https://github.com/python-attrs/attrs/")
11171 (synopsis "Attributes without boilerplate")
11172 (description "@code{attrs} is a Python package with class decorators that
11173 ease the chores of implementing the most common attribute-related object
11174 protocols.")
11175 (license license:expat)))
11176
11177 (define-public python2-attrs
11178 (package-with-python2 python-attrs))
11179
11180 (define-public python-attrs-bootstrap
11181 (package
11182 (inherit python-attrs)
11183 (name "python-attrs-bootstrap")
11184 ;; Keep this on a fixed version so python-attrs can be updated without
11185 ;; triggering a mass-rebuild. FIXME: Update this in the next rebuild cycle.
11186 (version "17.4.0")
11187 (source (origin
11188 (method url-fetch)
11189 (uri (pypi-uri "attrs" version))
11190 (sha256
11191 (base32
11192 "1jafnn1kzd6qhxgprhx6y6ik1r5m2rilx25syzcmq03azp660y8w"))))
11193 (native-inputs `())
11194 (arguments `(#:tests? #f))))
11195
11196 (define-public python2-attrs-bootstrap
11197 (package-with-python2 python-attrs-bootstrap))
11198
11199 (define-public python2-cliapp
11200 (package
11201 (name "python2-cliapp")
11202 (version "1.20170823")
11203 (source
11204 (origin
11205 (method url-fetch)
11206 (uri (string-append
11207 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
11208 version ".tar.gz"))
11209 (sha256
11210 (base32
11211 "1i9gik0xrj6jmi95s5w988jl1y265baz5xm5pbqdyvsh8h9ln6yq"))))
11212 (build-system python-build-system)
11213 (arguments
11214 `(#:python ,python-2
11215 #:phases
11216 (modify-phases %standard-phases
11217 ;; check phase needs to be run before the build phase. If not,
11218 ;; coverage-test-runner looks for tests for the built source files,
11219 ;; and fails.
11220 (delete 'check)
11221 (add-before 'build 'check
11222 (lambda _
11223 ;; Disable python3 tests
11224 (substitute* "check"
11225 (("python3") "# python3"))
11226 (zero? (system* "./check")))))))
11227 (native-inputs
11228 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
11229 ("python2-pep8" ,python2-pep8)))
11230 (propagated-inputs
11231 `(("python2-pyaml" ,python2-pyaml)))
11232 (home-page "https://liw.fi/cliapp/")
11233 (synopsis "Python framework for command line programs")
11234 (description "@code{python2-cliapp} is a python framework for
11235 command line programs. It contains the typical stuff such programs
11236 need to do, such as parsing the command line for options, and
11237 iterating over input files.")
11238 (license license:gpl2+)))
11239
11240 (define-public python2-ttystatus
11241 (package
11242 (name "python2-ttystatus")
11243 (version "0.35")
11244 (source
11245 (origin
11246 (method url-fetch)
11247 (uri (string-append
11248 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
11249 version ".tar.gz"))
11250 (sha256
11251 (base32
11252 "0vivqbw7ddhsq1zj3g9cvvv4f0phl0pis2smsnwcr2szz2fk3hl6"))))
11253 (build-system python-build-system)
11254 (native-inputs
11255 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
11256 ("python2-pep8" ,python2-pep8)))
11257 (arguments
11258 `(#:python ,python-2
11259 #:phases
11260 (modify-phases %standard-phases
11261 ;; check phase needs to be run before the build phase. If not,
11262 ;; coverage-test-runner looks for tests for the built source files,
11263 ;; and fails.
11264 (delete 'check)
11265 (add-before 'build 'check
11266 (lambda _
11267 (zero? (system* "make" "check")))))))
11268 (home-page "https://liw.fi/ttystatus/")
11269 (synopsis "Python library for showing progress reporting and
11270 status updates on terminals")
11271 (description "@code{python2-ttystatus} is a python library for
11272 showing progress reporting and status updates on terminals, for
11273 command line programs. Output is automatically adapted to the width
11274 of the terminal: truncated if it does not fit, and resized if the
11275 terminal size changes.")
11276 (license license:gpl3+)))
11277
11278 (define-public python2-tracing
11279 (package
11280 (name "python2-tracing")
11281 (version "0.10")
11282 (source
11283 (origin
11284 (method url-fetch)
11285 (uri (string-append
11286 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
11287 version ".tar.gz"))
11288 (sha256
11289 (base32
11290 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
11291 (build-system python-build-system)
11292 (arguments
11293 `(#:python ,python-2))
11294 (home-page "https://liw.fi/tracing/")
11295 (synopsis "Python debug logging helper")
11296 (description "@code{python2-tracing} is a python library for
11297 logging debug messages. It provides a way to turn debugging messages
11298 on and off, based on the filename they occur in. It is much faster
11299 than using @code{logging.Filter} to accomplish the same thing, which
11300 matters when code is run in production mode. The actual logging still
11301 happens using the @code{logging} library.")
11302 (license license:gpl3+)))
11303
11304 (define-public python2-larch
11305 (package
11306 (name "python2-larch")
11307 (version "1.20151025")
11308 (source
11309 (origin
11310 (method url-fetch)
11311 (uri (string-append
11312 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
11313 version ".tar.gz"))
11314 (patches (search-patches
11315 "python2-larch-coverage-4.0a6-compatibility.patch"))
11316 (sha256
11317 (base32
11318 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
11319 (build-system python-build-system)
11320 (arguments
11321 `(#:python ,python-2
11322 #:phases
11323 (modify-phases %standard-phases
11324 ;; check phase needs to be run before the build phase. If not,
11325 ;; coverage-test-runner looks for tests for the built source files,
11326 ;; and fails.
11327 (delete 'check)
11328 (add-before 'build 'check
11329 (lambda _
11330 (zero? (system* "make" "check")))))))
11331 (native-inputs
11332 `(("cmdtest" ,cmdtest)
11333 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
11334 (propagated-inputs
11335 `(("python2-tracing" ,python2-tracing)))
11336 (home-page "https://liw.fi/larch/")
11337 (synopsis "Python copy-on-write B-tree library")
11338 (description "@code{python2-larch} is an implementation of
11339 particular kind of B-tree, based on research by Ohad Rodeh. See
11340 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
11341 on the data structure.
11342
11343 The distinctive feature of this B-tree is that a node is never
11344 (conceptually) modified. Instead, all updates are done by
11345 copy-on-write. This makes it easy to clone a tree, and modify only the
11346 clone, while other processes access the original tree.")
11347 (license license:gpl3+)))
11348
11349 (define-public python-astroid
11350 (package
11351 (name "python-astroid")
11352 (version "2.1.0")
11353 (source
11354 (origin
11355 (method url-fetch)
11356 (uri (pypi-uri "astroid" version))
11357 (sha256
11358 (base32
11359 "08hz675knh4294bancdapql392fmbjyimhbyrmfkz1ka7l035c1m"))))
11360 (build-system python-build-system)
11361 (propagated-inputs
11362 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
11363 ("python-six" ,python-six)
11364 ("python-wrapt" ,python-wrapt)))
11365 (native-inputs
11366 `(("python-dateutil" ,python-dateutil)
11367 ("python-nose" ,python-nose)
11368 ("python-pytest" ,python-pytest)
11369 ("python-pytest-runner" ,python-pytest-runner)))
11370 (arguments
11371 `(#:phases
11372 (modify-phases %standard-phases
11373 (add-after 'unpack 'remove-spurious-test
11374 (lambda _
11375 ;; This can be removed after upgrading from python-3.7
11376 ;; https://github.com/PyCQA/astroid/issues/593
11377 ;; https://bugs.python.org/issue34056
11378 (delete-file "astroid/tests/unittest_modutils.py")
11379 #t))
11380 (replace 'check
11381 (lambda _
11382 (invoke "pytest" "astroid"))))))
11383 (home-page "https://github.com/PyCQA/astroid")
11384 (synopsis "Common base representation of python source code for pylint and
11385 other projects")
11386 (description "@code{python-astroid} provides a common base representation
11387 of python source code for projects such as pychecker, pyreverse, pylint, etc.
11388
11389 It provides a compatible representation which comes from the _ast module. It
11390 rebuilds the tree generated by the builtin _ast module by recursively walking
11391 down the AST and building an extended ast. The new node classes have
11392 additional methods and attributes for different usages. They include some
11393 support for static inference and local name scopes. Furthermore, astroid
11394 builds partial trees by inspecting living objects.")
11395 (license license:lgpl2.1+)
11396 (properties `((python2-variant . ,(delay python2-astroid))))))
11397
11398 (define-public python2-astroid
11399 (let ((base (package-with-python2
11400 (strip-python2-variant python-astroid))))
11401 (package (inherit base)
11402 ;; Version 2.x removes python2 support.
11403 (version "1.6.5")
11404 (source
11405 (origin
11406 (method url-fetch)
11407 (uri (pypi-uri "astroid" version))
11408 (sha256
11409 (base32
11410 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
11411 (arguments
11412 (substitute-keyword-arguments (package-arguments base)
11413 ((#:phases phases)
11414 `(modify-phases ,phases
11415 (add-after 'unpack 'remove-spurious-test
11416 (lambda _
11417 ;; https://github.com/PyCQA/astroid/issues/276
11418 (delete-file "astroid/tests/unittest_brain.py")
11419 #t))
11420 (replace 'check
11421 (lambda _
11422 (invoke"python" "-m" "unittest" "discover"
11423 "-p" "unittest*.py")))))))
11424 (native-inputs `())
11425 (propagated-inputs
11426 `(("python2-backports-functools-lru-cache"
11427 ,python2-backports-functools-lru-cache)
11428 ("python2-enum34" ,python2-enum34)
11429 ("python2-singledispatch" ,python2-singledispatch)
11430 ,@(package-propagated-inputs base))))))
11431
11432 (define-public python-isort
11433 (package
11434 (name "python-isort")
11435 (version "4.3.4")
11436 (source
11437 (origin
11438 (method git-fetch)
11439 (uri (git-reference
11440 ;; Tests pass only from the Github sources
11441 (url "https://github.com/timothycrosley/isort")
11442 (commit version)))
11443 (file-name (git-file-name name version))
11444 (sha256
11445 (base32
11446 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
11447 (build-system python-build-system)
11448 (native-inputs
11449 `(("python-mock" ,python-mock)
11450 ("python-pytest" ,python-pytest)))
11451 (home-page "https://github.com/timothycrosley/isort")
11452 (synopsis "Python utility/library to sort python imports")
11453 (description "@code{python-isort} is a python utility/library to sort
11454 imports alphabetically, and automatically separated into sections. It
11455 provides a command line utility, a python library and plugins for various
11456 editors.")
11457 (license license:expat)
11458 (properties `((python2-variant . ,(delay python2-isort))))))
11459
11460 (define-public python2-isort
11461 (let ((base (package-with-python2
11462 (strip-python2-variant python-isort))))
11463 (package (inherit base)
11464 (native-inputs
11465 `(("python2-futures" ,python2-futures)
11466 ,@(package-native-inputs base))))))
11467
11468 (define-public python2-backports-functools-lru-cache
11469 (package
11470 (name "python2-backports-functools-lru-cache")
11471 (version "1.5")
11472 (source
11473 (origin
11474 (method url-fetch)
11475 ;; only the pypi tarballs contain the necessary metadata
11476 (uri (pypi-uri "backports.functools_lru_cache" version))
11477 (sha256
11478 (base32
11479 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
11480 (build-system python-build-system)
11481 (native-inputs
11482 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
11483 (arguments
11484 `(#:python ,python-2))
11485 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
11486 (synopsis "Backport of functools.lru_cache from Python 3.3")
11487 (description "@code{python2-backports-functools-lru-cache} is a backport
11488 of @code{functools.lru_cache} from python 3.3.")
11489 (license license:expat)))
11490
11491 (define-public python-configparser
11492 (package
11493 (name "python-configparser")
11494 (version "3.5.0")
11495 (source
11496 (origin
11497 (method url-fetch)
11498 (uri (string-append
11499 "https://bitbucket.org/ambv/configparser/get/"
11500 version ".tar.bz2"))
11501 (file-name (string-append name "-" version ".tar.gz"))
11502 (sha256
11503 (base32
11504 "0waq40as14abwzbb321hfz4vr1fi363nscy32ga14qvfygrg96wa"))))
11505 (build-system python-build-system)
11506 (home-page "http://docs.python.org/py3k/library/configparser.html")
11507 (synopsis "Backport of configparser from python 3.5")
11508 (description "@code{python-configparser} is a backport of
11509 @code{configparser} from Python 3.5 so that it can be used directly
11510 in other versions.")
11511 (license license:expat)))
11512
11513 (define-public python2-configparser
11514 (package-with-python2 python-configparser))
11515
11516 (define-public python-mando
11517 (package
11518 (name "python-mando")
11519 (version "0.6.4")
11520 (source (origin
11521 (method url-fetch)
11522 (uri (pypi-uri "mando" version))
11523 (sha256
11524 (base32
11525 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
11526 (build-system python-build-system)
11527 (propagated-inputs
11528 `(("python-rst2ansi" ,python-rst2ansi)
11529 ("python-six" ,python-six)))
11530 (native-inputs
11531 `(("python-pytest" ,python-pytest)))
11532 (home-page "https://mando.readthedocs.org/")
11533 (synopsis
11534 "Wrapper around argparse, allowing creation of complete CLI applications")
11535 (description
11536 "This package is a wrapper around argparse, allowing you to write complete CLI
11537 applications in seconds while maintaining all the flexibility.")
11538 (license license:expat)))
11539
11540 (define-public python2-mando
11541 (package-with-python2 python-mando))
11542
11543 (define-public python-fudge
11544 (package
11545 (name "python-fudge")
11546 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
11547 ;; package, which is currently the only use of this package.
11548 (version "0.9.6")
11549 (source
11550 (origin
11551 (method url-fetch)
11552 (uri (pypi-uri "fudge" version))
11553 (sha256
11554 (base32
11555 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
11556 (build-system python-build-system)
11557 (arguments
11558 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
11559 (home-page "https://github.com/fudge-py/fudge")
11560 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
11561 (description
11562 "Fudge is a Python module for using fake objects (mocks and stubs) to
11563 test real ones.
11564
11565 In readable Python code, you declare the methods available on your fake object
11566 and how they should be called. Then you inject that into your application and
11567 start testing. This declarative approach means you don’t have to record and
11568 playback actions and you don’t have to inspect your fakes after running code.
11569 If the fake object was used incorrectly then you’ll see an informative
11570 exception message with a traceback that points to the culprit.")
11571 (license license:expat)))
11572
11573 (define-public python2-fudge
11574 (package-with-python2 python-fudge))
11575
11576 (define-public python-mwclient
11577 (package
11578 (name "python-mwclient")
11579 (version "0.8.4")
11580 (source
11581 (origin
11582 (method url-fetch)
11583 ;; The PyPI version wouldn't contain tests.
11584 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
11585 "v" version ".tar.gz"))
11586 (file-name (string-append name "-" version ".tar.gz"))
11587 (sha256
11588 (base32
11589 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
11590 (build-system python-build-system)
11591 (propagated-inputs
11592 `(("python-requests" ,python-requests)
11593 ("python-requests-oauthlib"
11594 ,python-requests-oauthlib)
11595 ("python-six" ,python-six)))
11596 (native-inputs
11597 `(("python-mock" ,python-mock)
11598 ("python-pytest" ,python-pytest)
11599 ("python-pytest-pep8" ,python-pytest-pep8)
11600 ("python-pytest-cache" ,python-pytest-cache)
11601 ("python-pytest-cov" ,python-pytest-cov)
11602 ("python-responses" ,python-responses)))
11603 (home-page "https://github.com/btongminh/mwclient")
11604 (synopsis "MediaWiki API client")
11605 (description "This package provides a MediaWiki API client.")
11606 (license license:expat)))
11607
11608 (define-public python2-mwclient
11609 (package-with-python2 python-mwclient))
11610
11611 (define-public python-utils
11612 (package
11613 (name "python-utils")
11614 (version "2.1.0")
11615 (source (origin
11616 (method url-fetch)
11617 (uri (pypi-uri "python-utils" version))
11618 (sha256
11619 (base32
11620 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
11621 (build-system python-build-system)
11622 (native-inputs
11623 `(("pytest-runner" ,python-pytest-runner)
11624 ("pytest" ,python-pytest)
11625 ("six" ,python-six)))
11626 (home-page "https://github.com/WoLpH/python-utils")
11627 (synopsis "Convenient utilities not included with the standard Python install")
11628 (description
11629 "Python Utils is a collection of small Python functions and classes which
11630 make common patterns shorter and easier.")
11631 (license license:bsd-2)))
11632
11633 (define-public python2-utils
11634 (package-with-python2 python-utils))
11635
11636 (define-public python-sphinx-me
11637 (package
11638 (name "python-sphinx-me")
11639 (version "0.3")
11640 (source
11641 (origin
11642 (method url-fetch)
11643 (uri (pypi-uri "sphinx-me" version))
11644 (sha256
11645 (base32
11646 "06jzgp213zihnvpcy2y5jy3ykid3apc2ncp2pg6a2g05lhiziglq"))))
11647 (build-system python-build-system)
11648 (home-page "https://github.com/stephenmcd/sphinx-me")
11649 (synopsis "Create a Sphinx documentation shell")
11650 (description
11651 "Create a Sphinx documentation shell for your project and include the
11652 README file as the documentation index. It handles extracting the required
11653 meta data such as the project name, author and version from your project for
11654 use in your Sphinx docs.")
11655 (license license:bsd-2)))
11656
11657 (define-public python2-sphinx-me
11658 (package-with-python2 python-sphinx-me))
11659
11660 (define-public python-diff-match-patch
11661 (package
11662 (name "python-diff-match-patch")
11663 (version "20121119")
11664 (source
11665 (origin
11666 (method url-fetch)
11667 (uri (pypi-uri "diff-match-patch" version))
11668 (sha256
11669 (base32
11670 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
11671 (build-system python-build-system)
11672 (home-page "https://code.google.com/p/google-diff-match-patch")
11673 (synopsis "Synchronize plain text")
11674 (description "Diff Match and Patch libraries offer robust algorithms to
11675 perform the operations required for synchronizing plain text.")
11676 (license license:asl2.0)))
11677
11678 (define-public python2-diff-match-patch
11679 (package-with-python2 python-diff-match-patch))
11680
11681 (define-public python-dirsync
11682 (package
11683 (name "python-dirsync")
11684 (version "2.2.3")
11685 (source
11686 (origin
11687 (method url-fetch)
11688 (uri (pypi-uri "dirsync" version))
11689 (sha256
11690 (base32
11691 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
11692 (build-system python-build-system)
11693 (propagated-inputs
11694 `(("six" ,python-six)))
11695 (home-page "https://bitbucket.org/tkhyn/dirsync")
11696 (synopsis "Advanced directory tree synchronisation tool")
11697 (description "Advanced directory tree synchronisation tool.")
11698 (license license:expat)))
11699
11700 (define-public python2-dirsync
11701 (package-with-python2 python-dirsync))
11702
11703 (define-public python-levenshtein
11704 (package
11705 (name "python-levenshtein")
11706 (version "0.12.0")
11707 (source
11708 (origin
11709 (method url-fetch)
11710 (uri (pypi-uri "python-Levenshtein" version))
11711 (sha256
11712 (base32
11713 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
11714 (build-system python-build-system)
11715 (home-page "https://github.com/ztane/python-Levenshtein")
11716 (synopsis "Fast computation of Levenshtein distance and string similarity")
11717 (description
11718 "The Levenshtein Python C extension module contains functions for fast computation of
11719 @enumerate
11720 @item Levenshtein (edit) distance, and edit operations
11721 @item string similarity
11722 @item approximate median strings, and generally string averaging
11723 @item string sequence and set similarity
11724 @end enumerate
11725 It supports both normal and Unicode strings.")
11726 (license license:gpl2+)))
11727
11728 (define-public python2-levenshtein
11729 (package-with-python2 python-levenshtein))
11730
11731 (define-public python-scandir
11732 (package
11733 (name "python-scandir")
11734 (version "1.9.0")
11735 (source
11736 (origin
11737 (method url-fetch)
11738 (uri (pypi-uri "scandir" version))
11739 (sha256
11740 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
11741 (build-system python-build-system)
11742 (arguments
11743 `(#:phases (modify-phases %standard-phases
11744 (replace 'check
11745 (lambda _
11746 (invoke "python" "test/run_tests.py"))))))
11747 (home-page "https://github.com/benhoyt/scandir")
11748 (synopsis "Directory iteration function")
11749 (description
11750 "Directory iteration function like os.listdir(), except that instead of
11751 returning a list of bare filenames, it yields DirEntry objects that include
11752 file type and stat information along with the name. Using scandir() increases
11753 the speed of os.walk() by 2-20 times (depending on the platform and file
11754 system) by avoiding unnecessary calls to os.stat() in most cases.
11755
11756 This package is part of the Python standard library since version 3.5.")
11757 (license license:bsd-3)))
11758
11759 (define-public python2-scandir
11760 (package-with-python2 python-scandir))
11761
11762 (define-public python2-stemming
11763 (package
11764 (name "python2-stemming")
11765 (version "1.0.1")
11766 (source
11767 (origin
11768 (method url-fetch)
11769 (uri (pypi-uri "stemming" version))
11770 (sha256
11771 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
11772 (build-system python-build-system)
11773 (arguments
11774 `(#:python ,python-2))
11775 (home-page "https://bitbucket.org/mchaput/stemming/overview")
11776 (synopsis "Python implementations of various stemming algorithms")
11777 (description
11778 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
11779 stemming algorithms for English. These implementations are straightforward and
11780 efficient, unlike some Python versions of the same algorithms available on the
11781 Web. This package is an extraction of the stemming code included in the Whoosh
11782 search engine.")
11783 (license license:public-domain)))
11784
11785 (define-public python-factory-boy
11786 (package
11787 (name "python-factory-boy")
11788 (version "2.8.1")
11789 (source
11790 (origin
11791 (method url-fetch)
11792 (uri (pypi-uri "factory_boy" version))
11793 (sha256
11794 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
11795 (build-system python-build-system)
11796 (arguments
11797 ;; Tests are not included in the tarball.
11798 `(#:tests? #f))
11799 (propagated-inputs
11800 `(("faker" ,python-faker)))
11801 (home-page "https://github.com/benhoyt/scandir")
11802 (synopsis "Versatile test fixtures replacement")
11803 (description
11804 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
11805
11806 As a fixtures replacement tool, it aims to replace static, hard to maintain
11807 fixtures with easy-to-use factories for complex object.
11808
11809 Instead of building an exhaustive test setup with every possible combination
11810 of corner cases, factory_boy allows you to use objects customized for the
11811 current test, while only declaring the test-specific fields")
11812 (license license:expat)))
11813
11814 (define-public python2-factory-boy
11815 (package-with-python2 python-factory-boy))
11816
11817 (define-public python-translate-toolkit
11818 (package
11819 (name "python-translate-toolkit")
11820 (version "2.1.0")
11821 (source
11822 (origin
11823 (method url-fetch)
11824 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
11825 (sha256
11826 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
11827 (build-system python-build-system)
11828 (native-inputs
11829 `(("python-pytest" ,python-pytest)
11830 ("python-sphinx" ,python-sphinx)))
11831 (propagated-inputs
11832 `(("python-babel" ,python-babel)
11833 ("python-beautifulsoup4" ,python-beautifulsoup4)
11834 ("python-chardet" ,python-chardet)
11835 ("python-diff-match-patch" ,python-diff-match-patch)
11836 ("python-levenshtein" ,python-levenshtein)
11837 ("python-lxml" ,python-lxml)
11838 ("python-six" ,python-six)
11839 ("python-vobject" ,python-vobject)
11840 ("python-pyyaml" ,python-pyyaml)))
11841 (arguments
11842 ;; TODO: tests are not run, because they end with
11843 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
11844 ;; 'parse_funcs'
11845 ;; during test setup.
11846 `(#:tests? #f))
11847 (home-page "http://toolkit.translatehouse.org")
11848 (synopsis "Tools and API for translation and localization engineering")
11849 (description
11850 "Tools and API for translation and localization engineering. It contains
11851 several utilities, as well as an API for building localization tools.")
11852 (license license:gpl2+)))
11853
11854 (define-public python2-translate-toolkit
11855 (package-with-python2 python-translate-toolkit))
11856
11857 (define-public python-packaging
11858 (package
11859 (name "python-packaging")
11860 (version "18.0")
11861 (source
11862 (origin
11863 (method url-fetch)
11864 (uri (pypi-uri "packaging" version))
11865 (sha256
11866 (base32
11867 "01wq9c53ix5rz6qg2c98gy8n4ff768rmanifm8m5jpjiaizj51h8"))))
11868 (build-system python-build-system)
11869 (arguments
11870 `(#:phases (modify-phases %standard-phases
11871 (replace 'check
11872 (lambda _ (invoke "py.test" "-vv"))))))
11873 (native-inputs
11874 `(("python-pretend" ,python-pretend)
11875 ("python-pytest" ,python-pytest)))
11876 (propagated-inputs
11877 `(("python-pyparsing" ,python-pyparsing)
11878 ("python-six" ,python-six)))
11879 (home-page "https://github.com/pypa/packaging")
11880 (synopsis "Core utilities for Python packages")
11881 (description "Packaging is a Python module for dealing with Python packages.
11882 It offers an interface for working with package versions, names, and dependency
11883 information.")
11884 ;; From 'LICENSE': This software is made available under the terms of
11885 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
11886 ;; Contributions to this software is made under the terms of *both* these
11887 ;; licenses.
11888 (license (list license:asl2.0 license:bsd-2))))
11889
11890 (define-public python2-packaging
11891 (package-with-python2 python-packaging))
11892
11893 (define-public python-relatorio
11894 (package
11895 (name "python-relatorio")
11896 (version "0.8.0")
11897 (source
11898 (origin
11899 (method url-fetch)
11900 (uri (pypi-uri "relatorio" version))
11901 (sha256
11902 (base32
11903 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
11904 (build-system python-build-system)
11905 (propagated-inputs
11906 `(("python-lxml" ,python-lxml)
11907 ("python-genshi" ,python-genshi)))
11908 (native-inputs
11909 `(("python-magic" ,python-magic)))
11910 (home-page "https://relatorio.tryton.org/")
11911 (synopsis "Templating library able to output ODT and PDF files")
11912 (description "Relatorio is a templating library which provides a way to
11913 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
11914 for more filetypes can be easily added by creating plugins for them.")
11915 (license license:gpl3+)))
11916
11917 (define-public python2-relatorio
11918 (package-with-python2 python-relatorio))
11919
11920 (define-public python-radon
11921 (package
11922 (name "python-radon")
11923 (version "2.2.0")
11924 (source
11925 (origin
11926 (method url-fetch)
11927 (uri (pypi-uri "radon" version))
11928 (sha256
11929 (base32
11930 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
11931 (build-system python-build-system)
11932 (arguments
11933 `(#:phases (modify-phases %standard-phases
11934 (replace 'check
11935 (lambda _
11936 (invoke "python" "radon/tests/run.py"))))))
11937 (propagated-inputs
11938 `(("python-colorama" ,python-colorama)
11939 ("python-flake8-polyfill" ,python-flake8-polyfill)
11940 ("python-mando" ,python-mando)))
11941 (native-inputs
11942 `(("python-pytest" ,python-pytest)
11943 ("python-pytest-mock" ,python-pytest-mock)))
11944 (home-page "https://radon.readthedocs.org/")
11945 (synopsis "Code Metrics in Python")
11946 (description "Radon is a Python tool which computes various code metrics.
11947 Supported metrics are:
11948 @itemize @bullet
11949 @item raw metrics: SLOC, comment lines, blank lines, &c.
11950 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
11951 @item Halstead metrics (all of them)
11952 @item the Maintainability Index (a Visual Studio metric)
11953 @end itemize")
11954 (license license:expat)))
11955
11956 (define-public python2-radon
11957 (package-with-python2 python-radon))
11958
11959 (define-public python-sure
11960 (package
11961 (name "python-sure")
11962 (version "1.4.11")
11963 (source
11964 (origin
11965 (method url-fetch)
11966 (uri (pypi-uri "sure" version))
11967 (sha256
11968 (base32
11969 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
11970 (build-system python-build-system)
11971 (propagated-inputs
11972 `(("python-mock" ,python-mock)
11973 ("python-six" ,python-six)))
11974 (native-inputs
11975 `(("python-nose" ,python-nose)))
11976 (home-page "https://github.com/gabrielfalcao/sure")
11977 (synopsis "Automated testing library in python for python")
11978 (description
11979 "Sure is a python library that leverages a DSL for writing assertions.
11980 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
11981 (license license:gpl3+)))
11982
11983 (define-public python2-sure
11984 (package-with-python2 python-sure))
11985
11986 (define-public python2-couleur
11987 ;; This package does not seem to support python3 at all, hence,
11988 ;; only the python2 variant definition is provided.
11989 (package
11990 (name "python2-couleur")
11991 (version "0.6.2")
11992 (source
11993 (origin
11994 (method url-fetch)
11995 (uri (pypi-uri "couleur" version))
11996 (sha256
11997 (base32
11998 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
11999 (build-system python-build-system)
12000 (arguments
12001 `(#:python ,python-2))
12002 (home-page "https://github.com/gabrielfalcao/couleur")
12003 (synopsis
12004 "ANSI terminal tool for python, colored shell and other handy fancy features")
12005 (description
12006 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
12007 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
12008 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
12009 ;; https://github.com/gabrielfalcao/couleur/issues/11
12010 (license license:lgpl3+)))
12011
12012 (define-public python-misaka
12013 (package
12014 (name "python-misaka")
12015 (version "2.1.0")
12016 (source
12017 (origin
12018 (method url-fetch)
12019 (uri (pypi-uri "misaka" version))
12020 (sha256
12021 (base32
12022 "1yqrq3a5rracirmvk52n28nn6ckdaz897gnigv89a9gmyn87sqw7"))))
12023 (build-system python-build-system)
12024 (arguments
12025 `(;; Line 37 of setup.py calls self.run_command('develop')
12026 ;; in the 'check' phase. This command seems to be trying
12027 ;; to write to
12028 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
12029 ;; for which it does not have the permission to write.
12030 #:tests? #f))
12031 (propagated-inputs
12032 `(("python-cffi" ,python-cffi)))
12033 (home-page "https://github.com/FSX/misaka")
12034 (synopsis "Python binding for Hoedown")
12035 (description
12036 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
12037 library written in C. It features a fast HTML renderer and functionality to make custom
12038 renderers (e.g. man pages or LaTeX).")
12039 (license license:expat)))
12040
12041 (define-public python2-misaka
12042 (package-with-python2 python-misaka))
12043
12044 (define-public python2-steadymark
12045 ;; This is forced into being a python2 only variant
12046 ;; due to its dependence on couleur that has no support
12047 ;; for python3
12048 (package
12049 (name "python2-steadymark")
12050 (version "0.7.3")
12051 (source
12052 (origin
12053 (method url-fetch)
12054 (uri (pypi-uri "steadymark" version))
12055 (sha256
12056 (base32
12057 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
12058 (build-system python-build-system)
12059 (native-inputs
12060 `(("python-couleur" ,python2-couleur)
12061 ("python-sure" ,python2-sure)
12062 ("python-misaka" ,python2-misaka)))
12063 (arguments
12064 `(#:python ,python-2
12065 #:phases
12066 (modify-phases %standard-phases
12067 (add-before 'build 'patch-setup-py
12068 (lambda _
12069 ;; Update requirements from dependency==version
12070 ;; to dependency>=version
12071 (substitute* "setup.py"
12072 (("==") ">="))
12073 #t)))))
12074 (home-page "https://github.com/gabrielfalcao/steadymark")
12075 (synopsis "Markdown-based test runner for python")
12076 (description
12077 "@code{Steadymark} allows documentation to be written in github-flavoured
12078 markdown. The documentation may contain snippets of code surrounded by python
12079 code blocks and @code{Steadymark} will find these snippets and run them, making
12080 sure that there are no old malfunctional examples in the documentation examples.")
12081 (license license:expat)))
12082
12083 (define-public python-jsonpointer
12084 (package
12085 (name "python-jsonpointer")
12086 (version "1.10")
12087 (source
12088 (origin
12089 (method url-fetch)
12090 (uri (pypi-uri "jsonpointer" version))
12091 (sha256
12092 (base32
12093 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
12094 (build-system python-build-system)
12095 (home-page "https://github.com/stefankoegl/python-json-pointer")
12096 (synopsis "Identify specific nodes in a JSON document")
12097 (description "@code{jsonpointer} allows you to access specific nodes
12098 by path in a JSON document (see RFC 6901).")
12099 (license license:bsd-3)))
12100
12101 (define-public python2-jsonpointer
12102 (package-with-python2 python-jsonpointer))
12103
12104 (define-public python-jsonpatch
12105 (package
12106 (name "python-jsonpatch")
12107 (version "1.16")
12108 (source
12109 (origin
12110 (method url-fetch)
12111 ;; pypi version lacks tests.js
12112 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12113 "archive/v" version ".tar.gz"))
12114 (file-name (string-append name "-" version ".tar.gz"))
12115 (sha256
12116 (base32
12117 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
12118 (build-system python-build-system)
12119 (native-inputs
12120 `(("python-jsonpointer" ,python-jsonpointer)))
12121 (home-page "https://github.com/stefankoegl/python-json-patch")
12122 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
12123 (description "@code{jsonpatch} is a library and program that allows
12124 applying JSON Patches according to RFC 6902.")
12125 (license license:bsd-3)))
12126
12127 (define-public python2-jsonpatch
12128 (package-with-python2 python-jsonpatch))
12129
12130 (define-public python-jsonpatch-0.4
12131 (package (inherit python-jsonpatch)
12132 (name "python-jsonpatch")
12133 (version "0.4")
12134 (source
12135 (origin
12136 (method url-fetch)
12137 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12138 "archive/v" version ".tar.gz"))
12139 (file-name (string-append name "-" version ".tar.gz"))
12140 (sha256
12141 (base32
12142 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
12143
12144 (define-public python2-jsonpatch-0.4
12145 (package-with-python2 python-jsonpatch-0.4))
12146
12147 (define-public python-rfc3986
12148 (package
12149 (name "python-rfc3986")
12150 (version "1.1.0")
12151 (source (origin
12152 (method url-fetch)
12153 (uri (pypi-uri "rfc3986" version))
12154 (sha256
12155 (base32
12156 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
12157 (build-system python-build-system)
12158 (arguments
12159 `(#:modules ((guix build utils)
12160 (guix build python-build-system)
12161 (ice-9 ftw)
12162 (srfi srfi-1)
12163 (srfi srfi-26))
12164 #:phases
12165 (modify-phases %standard-phases
12166 (replace 'check
12167 (lambda _
12168 (let ((cwd (getcwd)))
12169 (setenv "PYTHONPATH"
12170 (string-append cwd "/build/"
12171 (find (cut string-prefix? "lib" <>)
12172 (scandir (string-append cwd "/build")))
12173 ":"
12174 (getenv "PYTHONPATH")))
12175 (invoke "pytest" "-v")))))))
12176 (native-inputs
12177 `(("python-pytest" ,python-pytest)))
12178 (home-page "https://rfc3986.readthedocs.io/")
12179 (synopsis "Parse and validate URI references")
12180 (description
12181 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
12182 validation and authority parsing. This module also supports RFC@tie{}6874
12183 which adds support for zone identifiers to IPv6 addresses.")
12184 (license license:asl2.0)))
12185
12186 (define-public python2-rfc3986
12187 (package-with-python2 python-rfc3986))
12188
12189 (define-public python-rfc3987
12190 (package
12191 (name "python-rfc3987")
12192 (version "1.3.7")
12193 (source
12194 (origin
12195 (method url-fetch)
12196 (uri (pypi-uri "rfc3987" version))
12197 (sha256
12198 (base32
12199 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
12200 (build-system python-build-system)
12201 (home-page "https://pypi.python.org/pypi/rfc3987")
12202 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
12203 (description "@code{rfc3987} provides routines for parsing and
12204 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
12205 (license license:gpl3+)))
12206
12207 (define-public python2-rfc3987
12208 (package-with-python2 python-rfc3987))
12209
12210 (define-public python-validate-email
12211 (package
12212 (name "python-validate-email")
12213 (version "1.3")
12214 (source
12215 (origin
12216 (method url-fetch)
12217 (uri (pypi-uri "validate_email" version))
12218 (sha256
12219 (base32
12220 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
12221 (build-system python-build-system)
12222 (home-page "https://github.com/syrusakbary/validate_email")
12223 (synopsis "Verifies if an email address is valid and really exists")
12224 (description "@code{validate_email} can be used to verify if an email
12225 address is valid and really exists.")
12226 (license license:lgpl3+)))
12227
12228 (define-public python2-validate-email
12229 (package-with-python2 python-validate-email))
12230
12231 (define-public python-flex
12232 (package
12233 (name "python-flex")
12234 (version "6.10.0")
12235 (source
12236 (origin
12237 (method url-fetch)
12238 (uri (pypi-uri "flex" version))
12239 (sha256
12240 (base32
12241 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
12242 (build-system python-build-system)
12243 (propagated-inputs
12244 `(("python-click" ,python-click)
12245 ("python-iso8601" ,python-iso8601)
12246 ("python-jsonpointer" ,python-jsonpointer)
12247 ("python-pyyaml" ,python-pyyaml)
12248 ("python-requests" ,python-requests)
12249 ("python-rfc3987" ,python-rfc3987)
12250 ("python-six" ,python-six)
12251 ("python-validate-email" ,python-validate-email)))
12252 (home-page "https://github.com/pipermerriam/flex")
12253 (synopsis "Validates Swagger schemata")
12254 (description "@code{flex} can be used to validate Swagger schemata.")
12255 (license license:bsd-3)))
12256
12257 (define-public python2-flex
12258 (package-with-python2 python-flex))
12259
12260 (define-public python-marshmallow
12261 (package
12262 (name "python-marshmallow")
12263 (version "3.0.0b14")
12264 (source
12265 (origin
12266 (method url-fetch)
12267 (uri (pypi-uri "marshmallow" version))
12268 (sha256
12269 (base32
12270 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
12271 (build-system python-build-system)
12272 (propagated-inputs
12273 `(("python-dateutil" ,python-dateutil)
12274 ("python-simplejson" ,python-simplejson)))
12275 (native-inputs
12276 `(("python-pytest" ,python-pytest)
12277 ("python-pytz" ,python-pytz)))
12278 (home-page "https://github.com/marshmallow-code/marshmallow")
12279 (synopsis "Convert complex datatypes to and from native
12280 Python datatypes.")
12281 (description "@code{marshmallow} provides a library for converting
12282 complex datatypes to and from native Python datatypes.")
12283 (license license:expat)))
12284
12285 (define-public python2-marshmallow
12286 (package-with-python2 python-marshmallow))
12287
12288 (define-public python-apispec
12289 (package
12290 (name "python-apispec")
12291 (version "0.25.3")
12292 (source
12293 (origin
12294 (method url-fetch)
12295 (uri (pypi-uri "apispec" version))
12296 (sha256
12297 (base32
12298 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
12299 (build-system python-build-system)
12300 (propagated-inputs
12301 `(("python-pyyaml" ,python-pyyaml)))
12302 (native-inputs
12303 `(("python-pytest" ,python-pytest)
12304 ("python-flask" ,python-flask)
12305 ("python-marshmallow" ,python-marshmallow)
12306 ("python-tornado" ,python-tornado)
12307 ("python-bottle" ,python-bottle)
12308 ("python-mock" ,python-mock)))
12309 (home-page "https://github.com/marshmallow-code/apispec")
12310 (synopsis "Swagger 2.0 API specification generator")
12311 (description "@code{python-apispec} is a pluggable API specification
12312 generator. Currently supports the OpenAPI specification (f.k.a.
12313 Swagger 2.0).")
12314 (license license:expat)))
12315
12316 (define-public python2-apispec
12317 (package-with-python2 python-apispec))
12318
12319 (define-public python-flasgger
12320 (package
12321 (name "python-flasgger")
12322 (version "0.6.3")
12323 (source
12324 (origin
12325 (method url-fetch)
12326 (uri (string-append "https://github.com/rochacbruno/flasgger/archive/"
12327 version ".tar.gz"))
12328 (file-name (string-append name "-" version ".tar.gz"))
12329 (sha256
12330 (base32
12331 "1gqzlm0rb55fdpsy5ipkganlx9cnpi454fqyycr03jm22zql14ay"))))
12332 (build-system python-build-system)
12333 (arguments
12334 `(#:phases
12335 (modify-phases %standard-phases
12336 (replace 'check
12337 (lambda* (#:key inputs outputs #:allow-other-keys)
12338 (substitute* "Makefile"
12339 (("flake8 flasgger --ignore=F403")
12340 "flake8 flasgger --ignore=E731,F403"))
12341 (setenv "PYTHONPATH" (string-append (getcwd)
12342 ":"
12343 (getenv "PYTHONPATH")))
12344 (zero? (system* "py.test")))))))
12345 (propagated-inputs
12346 `(("python-flask" ,python-flask)
12347 ("python-pyyaml" ,python-pyyaml)
12348 ("python-jsonschema" ,python-jsonschema)
12349 ("python-mistune" ,python-mistune)
12350 ("python-six" ,python-six)))
12351 (native-inputs
12352 `(("python-decorator" ,python-decorator)
12353 ("python-flake8" ,python-flake8)
12354 ("python-flask-restful" ,python-flask-restful)
12355 ("python-flex" ,python-flex)
12356 ("python-pytest" ,python-pytest)
12357 ("python-pytest-cov" ,python-pytest-cov)
12358 ("python-marshmallow" ,python-marshmallow)
12359 ("python-apispec" ,python-apispec)))
12360 (home-page "https://github.com/rochacbruno/flasgger/")
12361 (synopsis "Extract Swagger specs from your Flask project")
12362 (description "@code{python-flasgger} allows extracting Swagger specs
12363 from your Flask project. It is a fork of Flask-Swagger.")
12364 (license license:expat)))
12365
12366 (define-public python2-flasgger
12367 (package-with-python2 python-flasgger))
12368
12369 (define-public python-swagger-spec-validator
12370 (package
12371 (name "python-swagger-spec-validator")
12372 (version "2.1.0")
12373 (source
12374 (origin
12375 (method url-fetch)
12376 (uri (pypi-uri "swagger-spec-validator" version))
12377 (sha256
12378 (base32
12379 "13hkpn2lycwr0468yqhjb3kwszqf7hjwlq61w7vdxq1caz31k4nw"))))
12380 (build-system python-build-system)
12381 (propagated-inputs
12382 `(("python-jsonschema" ,python-jsonschema)
12383 ("python-six" ,python-six)))
12384 (home-page
12385 "https://github.com/Yelp/swagger_spec_validator")
12386 (synopsis "Validation of Swagger specifications")
12387 (description "@code{swagger_spec_validator} provides a library for
12388 validating Swagger API specifications.")
12389 (license license:asl2.0)))
12390
12391 (define-public python2-swagger-spec-validator
12392 (package-with-python2 python-swagger-spec-validator))
12393
12394 (define-public python-apache-libcloud
12395 (package
12396 (name "python-apache-libcloud")
12397 (version "2.4.0")
12398 (source
12399 (origin
12400 (method url-fetch)
12401 (uri (pypi-uri "apache-libcloud" version))
12402 (sha256
12403 (base32
12404 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
12405 (build-system python-build-system)
12406 (arguments
12407 `(#:phases
12408 (modify-phases %standard-phases
12409 (add-after 'unpack 'patch-ssh
12410 (lambda* (#:key inputs #:allow-other-keys)
12411 (substitute* "libcloud/compute/ssh.py"
12412 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
12413 "/bin/ssh" "'")))
12414 #t))
12415 (add-after 'unpack 'patch-tests
12416 (lambda _
12417 (substitute* "./libcloud/test/test_file_fixtures.py"
12418 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
12419 (("def _ascii") "def _raw_data(self, method, url, body, headers):
12420 return (httplib.OK,
12421 \"1234abcd\",
12422 {\"test\": \"value\"},
12423 httplib.responses[httplib.OK])
12424 def _ascii"))
12425 (substitute* "libcloud/test/compute/test_ssh_client.py"
12426 (("class ShellOutSSHClientTests")
12427 "@unittest.skip(\"Guix container doesn't have ssh service\")
12428 class ShellOutSSHClientTests")
12429 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
12430 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
12431 (("'.xF0', '.x90', '.x8D', '.x88'")
12432 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
12433 #t))
12434 (add-before 'check 'copy-secret
12435 (lambda _
12436 (copy-file "libcloud/test/secrets.py-dist"
12437 "libcloud/test/secrets.py")
12438 #t)))))
12439 (inputs
12440 `(("openssh" ,openssh)))
12441 (propagated-inputs
12442 `(("python-paramiko" ,python-paramiko)
12443 ("python-requests" ,python-requests)))
12444 (native-inputs
12445 `(("python-lockfile" ,python-lockfile)
12446 ("python-mock" ,python-mock)
12447 ("python-pytest" ,python-pytest)
12448 ("python-pytest-runner" ,python-pytest-runner)
12449 ("python-requests-mock" ,python-requests-mock)))
12450 (home-page "https://libcloud.apache.org/")
12451 (synopsis "Unified Cloud API")
12452 (description "@code{libcloud} is a Python library for interacting with
12453 many of the popular cloud service providers using a unified API.")
12454 (license license:asl2.0)))
12455
12456 (define-public python2-apache-libcloud
12457 (package-with-python2 python-apache-libcloud))
12458
12459 (define-public python-smmap2
12460 (package
12461 (name "python-smmap2")
12462 (version "2.0.3")
12463 (source
12464 (origin
12465 (method url-fetch)
12466 (uri (pypi-uri "smmap2" version))
12467 (sha256
12468 (base32
12469 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
12470 (build-system python-build-system)
12471 (native-inputs
12472 `(("python-nosexcover" ,python-nosexcover)))
12473 (home-page "https://github.com/Byron/smmap")
12474 (synopsis "Python sliding window memory map manager")
12475 (description "@code{smmap2} is a pure Python implementation of a sliding
12476 window memory map manager.")
12477 (license license:bsd-3)))
12478
12479 (define-public python2-smmap2
12480 (package-with-python2 python-smmap2))
12481
12482 (define-public python-regex
12483 (package
12484 (name "python-regex")
12485 (version "2017.06.07")
12486 (source (origin
12487 (method url-fetch)
12488 (uri (pypi-uri "regex" version))
12489 (sha256
12490 (base32
12491 "06r6b7yigikbj3a72whl85r2b64pj1r0ypmw9yalmkm0wnxq8mz4"))))
12492 (build-system python-build-system)
12493 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
12494 (synopsis "Alternative regular expression module")
12495 (description "This regular expression implementation is backwards-
12496 compatible with the standard @code{re} module, but offers additional
12497 functionality like full case-folding for case-insensitive matches in Unicode.")
12498 (license license:psfl)))
12499
12500 (define-public python2-regex
12501 (package-with-python2 python-regex))
12502
12503 (define-public python2-pyopengl
12504 (package
12505 (name "python2-pyopengl")
12506 (version "3.1.0")
12507 (source
12508 (origin
12509 (method url-fetch)
12510 (uri (pypi-uri "PyOpenGL" version))
12511 (sha256
12512 (base32
12513 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
12514 (arguments
12515 `(#:python ,python-2))
12516 (build-system python-build-system)
12517 (home-page "http://pyopengl.sourceforge.net")
12518 (synopsis "Standard OpenGL bindings for Python")
12519 (description
12520 "PyOpenGL is the most common cross platform Python binding to OpenGL and
12521 related APIs. The binding is created using the standard @code{ctypes}
12522 library.")
12523 (license license:bsd-3)))
12524
12525 (define-public python2-pyopengl-accelerate
12526 (package
12527 (inherit python2-pyopengl)
12528 (name "python2-pyopengl-accelerate")
12529 (version "3.1.0")
12530 (source
12531 (origin
12532 (method url-fetch)
12533 (uri (pypi-uri "PyOpenGL-accelerate" version))
12534 (sha256
12535 (base32
12536 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
12537 (synopsis "Acceleration code for PyOpenGL")
12538 (description
12539 "This is the Cython-coded accelerator module for PyOpenGL.")))
12540
12541 (define-public python-rencode
12542 (package
12543 (name "python-rencode")
12544 (version "1.0.5")
12545 (source
12546 (origin
12547 (method url-fetch)
12548 (uri (pypi-uri "rencode" version))
12549 (sha256
12550 (base32
12551 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
12552 (build-system python-build-system)
12553 (arguments
12554 `(#:phases
12555 (modify-phases %standard-phases
12556 (add-before 'check 'delete-bogus-test
12557 ;; This test requires /home/aresch/Downloads, which is not provided by
12558 ;; the build environment.
12559 (lambda _
12560 (delete-file "rencode/t.py")
12561 #t)))))
12562 (native-inputs `(("pkg-config" ,pkg-config)
12563 ("python-cython" ,python-cython)))
12564 (home-page "https://github.com/aresch/rencode")
12565 (synopsis "Serialization of heterogeneous data structures")
12566 (description
12567 "The @code{rencode} module is a data structure serialization library,
12568 similar to @code{bencode} from the BitTorrent project. For complex,
12569 heterogeneous data structures with many small elements, r-encoding stake up
12570 significantly less space than b-encodings. This version of rencode is a
12571 complete rewrite in Cython to attempt to increase the performance over the
12572 pure Python module.")
12573 (license license:bsd-3)))
12574
12575 (define-public python2-rencode
12576 (package-with-python2 python-rencode))
12577
12578 (define-public python-xenon
12579 (package
12580 (name "python-xenon")
12581 (version "0.5.4")
12582 (source
12583 (origin
12584 (method url-fetch)
12585 (uri (pypi-uri "xenon" version))
12586 (sha256
12587 (base32
12588 "029cbhysg2vr5n4jz8gpg2793f8wkwnqpr1qgv6c1dn685vy31mc"))))
12589 (build-system python-build-system)
12590 (native-inputs
12591 `(("python-pyyaml" ,python-pyyaml)
12592 ("python-radon" ,python-radon)
12593 ("python-requests" ,python-requests)
12594 ("python-flake8" ,python-flake8)
12595 ("python-tox" ,python-tox)))
12596 (arguments
12597 `(#:phases
12598 (modify-phases %standard-phases
12599 (add-before 'build 'patch-test-requirements
12600 (lambda _
12601 ;; Remove httpretty dependency for tests.
12602 (substitute* "setup.py"
12603 (("httpretty") ""))
12604 #t)))))
12605 (home-page "https://xenon.readthedocs.org/")
12606 (synopsis "Monitor code metrics for Python on your CI server")
12607 (description
12608 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
12609 Ideally, @code{xenon} is run every time code is committed. Through command
12610 line options, various thresholds can be set for the complexity of code. It
12611 will fail (i.e. it will exit with a non-zero exit code) when any of these
12612 requirements is not met.")
12613 (license license:expat)))
12614
12615 (define-public python2-xenon
12616 (package-with-python2 python-xenon))
12617
12618 (define-public python-pysocks
12619 (package
12620 (name "python-pysocks")
12621 (version "1.6.8")
12622 (source
12623 (origin
12624 (method url-fetch)
12625 (uri (pypi-uri "PySocks" version))
12626 (sha256
12627 (base32
12628 "0wn6xafwy9c1gamwljw3fyvih5w19qy9xp39zmv8c90ai5ajrr9z"))))
12629 (build-system python-build-system)
12630 (arguments `(#:tests? #f))
12631 (home-page "https://github.com/Anorov/PySocks")
12632 (synopsis "SOCKS client module")
12633 (description "@code{pysocks} is an updated and semi-actively maintained
12634 version of @code{SocksiPy} with bug fixes and extra features.")
12635 (license license:bsd-3)))
12636
12637 (define-public python2-pysocks
12638 (package-with-python2 python-pysocks))
12639
12640 (define-public python-pydiff
12641 (package
12642 (name "python-pydiff")
12643 (version "0.2")
12644 (source
12645 (origin
12646 (method url-fetch)
12647 (uri (pypi-uri "pydiff" version))
12648 (sha256
12649 (base32
12650 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
12651 (build-system python-build-system)
12652 (home-page "https://github.com/myint/pydiff")
12653 (synopsis "Library to diff two Python files at the bytecode level")
12654 (description
12655 "@code{pydiff} makes it easy to look for actual code changes while
12656 ignoring formatting changes.")
12657 (license license:expat)))
12658
12659 (define-public python2-pydiff
12660 (package-with-python2 python-pydiff))
12661
12662 (define-public python-tqdm
12663 (package
12664 (name "python-tqdm")
12665 (version "4.19.6")
12666 (source
12667 (origin
12668 (method url-fetch)
12669 (uri (pypi-uri "tqdm" version))
12670 (sha256
12671 (base32
12672 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
12673 (build-system python-build-system)
12674 (native-inputs
12675 `(("python-flake8" ,python-flake8)
12676 ("python-nose" ,python-nose)
12677 ("python-coverage" ,python-coverage)))
12678 (home-page "https://github.com/tqdm/tqdm")
12679 (synopsis "Fast, extensible progress meter")
12680 (description
12681 "Make loops show a progress bar on the console by just wrapping any
12682 iterable with @code{|tqdm(iterable)|}. Offers many options to define
12683 design and layout.")
12684 (license (list license:mpl2.0 license:expat))))
12685
12686 (define-public python2-tqdm
12687 (package-with-python2 python-tqdm))
12688
12689 (define-public python-pkginfo
12690 (package
12691 (name "python-pkginfo")
12692 (version "1.4.2")
12693 (source
12694 (origin
12695 (method url-fetch)
12696 (uri (pypi-uri "pkginfo" version))
12697 (sha256
12698 (base32
12699 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
12700 (build-system python-build-system)
12701 (arguments
12702 ;; The tests are broken upstream.
12703 '(#:tests? #f))
12704 (home-page
12705 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
12706 (synopsis
12707 "Query metadatdata from sdists, bdists, and installed packages")
12708 (description
12709 "API to query the distutils metadata written in @file{PKG-INFO} inside a
12710 source distriubtion (an sdist) or a binary distribution (e.g., created by
12711 running bdist_egg). It can also query the EGG-INFO directory of an installed
12712 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
12713 created by running @code{python setup.py develop}).")
12714 (license license:expat)))
12715
12716 (define-public python2-pkginfo
12717 (package-with-python2 python-pkginfo))
12718
12719 (define-public python-twine
12720 (package
12721 (name "python-twine")
12722 (version "1.9.1")
12723 (source
12724 (origin
12725 (method url-fetch)
12726 (uri (pypi-uri "twine" version))
12727 (sha256
12728 (base32
12729 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
12730 (build-system python-build-system)
12731 (propagated-inputs
12732 `(("python-tqdm" ,python-tqdm)
12733 ("python-pkginfo" ,python-pkginfo)
12734 ("python-requests" ,python-requests)
12735 ("python-requests-toolbelt" ,python-requests-toolbelt)))
12736 (home-page "https://github.com/pypa/twine")
12737 (synopsis "Collection of utilities for interacting with PyPI")
12738 (description
12739 "@code{twine} currently supports registering projects and uploading
12740 distributions. It authenticates the user over HTTPS, allows them to pre-sign
12741 their files and supports any packaging format (including wheels).")
12742 (license license:asl2.0)))
12743
12744 (define-public python2-twine
12745 (package-with-python2 python-twine))
12746
12747 (define-public python-linecache2
12748 (package
12749 (name "python-linecache2")
12750 (version "1.0.0")
12751 (source
12752 (origin
12753 (method url-fetch)
12754 (uri (pypi-uri "linecache2" version))
12755 (sha256
12756 (base32
12757 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
12758 (build-system python-build-system)
12759 (arguments
12760 `(;; The tests depend on unittest2, and our version is a bit too old.
12761 #:tests? #f))
12762 (native-inputs
12763 `(("python-pbr" ,python-pbr-minimal)))
12764 (home-page
12765 "https://github.com/testing-cabal/linecache2")
12766 (synopsis "Backports of the linecache module")
12767 (description
12768 "The linecache module allows one to get any line from any file, while
12769 attempting to optimize internally, using a cache, the common case where many
12770 lines are read from a single file.")
12771 (license license:psfl)))
12772
12773 (define-public python2-linecache2
12774 (package-with-python2 python-linecache2))
12775
12776 (define-public python-traceback2
12777 (package
12778 (name "python-traceback2")
12779 (version "1.4.0")
12780 (source
12781 (origin
12782 (method url-fetch)
12783 (uri (pypi-uri "traceback2" version))
12784 (sha256
12785 (base32
12786 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
12787 (build-system python-build-system)
12788 (arguments
12789 `(;; python-traceback2 and python-unittest2 depend on one another.
12790 #:tests? #f))
12791 (native-inputs
12792 `(("python-pbr" ,python-pbr-minimal)))
12793 (propagated-inputs
12794 `(("python-linecache2" ,python-linecache2)))
12795 (home-page
12796 "https://github.com/testing-cabal/traceback2")
12797 (synopsis "Backports of the traceback module")
12798 (description
12799 "This module provides a standard interface to extract, format and print
12800 stack traces of Python programs. It exactly mimics the behavior of the Python
12801 interpreter when it prints a stack trace.")
12802 (license license:psfl)))
12803
12804 (define-public python2-traceback2
12805 (package-with-python2 python-traceback2))
12806
12807 (define-public python-ratelimiter
12808 (package
12809 (name "python-ratelimiter")
12810 (version "1.2.0")
12811 (source
12812 (origin
12813 (method url-fetch)
12814 (uri (pypi-uri "ratelimiter" version))
12815 (sha256
12816 (base32
12817 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
12818 (build-system python-build-system)
12819 (arguments
12820 '(#:tests? #f)) ; There are no tests in the pypi archive.
12821 (home-page "https://github.com/RazerM/ratelimiter")
12822 (synopsis "Simple rate limiting object")
12823 (description
12824 "The @code{ratelimiter} module ensures that an operation will not be
12825 executed more than a given number of times during a given period.")
12826 (license license:asl2.0)))
12827
12828 (define-public python2-ratelimiter
12829 (package-with-python2 python-ratelimiter))
12830
12831 (define-public python-dukpy
12832 (package
12833 (name "python-dukpy")
12834 (version "0.3")
12835 (source
12836 (origin
12837 (method url-fetch)
12838 (uri (string-append "https://github.com/kovidgoyal/dukpy/archive/v"
12839 version ".tar.gz"))
12840 (file-name (string-append name "-" version ".tar.gz"))
12841 (sha256
12842 (base32
12843 "0pj39rfwlzivqm5hkrsza7gssg6ggpxlq5ivc8f3h7x5pfgc6y6c"))))
12844 (build-system python-build-system)
12845 (home-page "https://github.com/kovidgoyal/dukpy")
12846 (synopsis "Run JavaScript in python")
12847 (description
12848 "dukpy is a JavaScript runtime environment for Python using the duktape
12849 embeddable JavaScript engine.")
12850 ;; Dukpy is licensed under MIT like the embedded duktape library,
12851 ;; with 'errors.c' as GPL3.
12852 (license (list license:expat license:gpl3))))
12853
12854 (define-public python2-dukpy
12855 (package-with-python2 python-dukpy))
12856
12857 (define-public python-jsonrpclib-pelix
12858 (package
12859 (name "python-jsonrpclib-pelix")
12860 (version "0.3.2")
12861 (source
12862 (origin
12863 (method url-fetch)
12864 (uri (pypi-uri "jsonrpclib-pelix" version))
12865 (sha256
12866 (base32
12867 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
12868 (build-system python-build-system)
12869 (arguments
12870 `(#:tests? #f)) ; no tests in PyPI tarball
12871 (home-page "https://github.com/tcalmant/jsonrpclib/")
12872 (synopsis "JSON-RPC 2.0 client library for Python")
12873 (description
12874 "This library implements the JSON-RPC v2.0
12875 specification (backwards-compatible) as a client library for Python. This
12876 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
12877 services.")
12878 (license license:asl2.0)))
12879
12880 (define-public python2-jsonrpclib-pelix
12881 (package-with-python2 python-jsonrpclib-pelix))
12882
12883 (define-public python-setuptools-scm-git-archive
12884 (package
12885 (name "python-setuptools-scm-git-archive")
12886 (version "1.0")
12887 (source
12888 (origin
12889 (method url-fetch)
12890 (uri (pypi-uri "setuptools_scm_git_archive" version))
12891 (sha256
12892 (base32
12893 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
12894 (build-system python-build-system)
12895 (native-inputs
12896 `(("python-pytest" ,python-pytest)))
12897 (propagated-inputs
12898 `(("python-setuptools-scm" ,python-setuptools-scm)))
12899 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
12900 (synopsis "Setuptools_scm plugin for git archives")
12901 (description
12902 "The setuptools_scm_git_archive package is a plugin to
12903 setuptools_scm, which supports obtaining versions from git archives that
12904 belong to tagged versions.")
12905 (license license:expat)))
12906
12907 (define-public python2-setuptools-scm-git-archive
12908 (package-with-python2 python-setuptools-scm-git-archive))
12909
12910 (define-public python-pyclipper
12911 (package
12912 (name "python-pyclipper")
12913 (version "1.1.0.post1")
12914 (source
12915 (origin
12916 (method url-fetch)
12917 (uri (pypi-uri "pyclipper" version ".zip"))
12918 (sha256
12919 (base32
12920 "0ldbkbnx94an4zzrwb1sxmg6k0jgk4cwmvcdyy8y5k1zslc612wa"))
12921 (modules '((guix build utils)))
12922 (snippet
12923 '(begin
12924 ;; This file is generated by Cython.
12925 (delete-file "pyclipper/pyclipper.cpp") #t))))
12926 (build-system python-build-system)
12927 (arguments
12928 `(#:phases
12929 (modify-phases %standard-phases
12930 (add-before 'build 'cythonize-sources
12931 (lambda _
12932 (with-directory-excursion "pyclipper"
12933 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
12934 (propagated-inputs
12935 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
12936 (native-inputs
12937 `(("python-cython" ,python-cython)
12938 ("python-pytest" ,python-pytest)
12939 ("python-pytest-runner" ,python-pytest-runner)
12940 ("python-unittest2" ,python-unittest2)
12941 ("unzip" ,unzip)))
12942 (home-page "https://github.com/greginvm/pyclipper")
12943 (synopsis "Wrapper for Angus Johnson's Clipper library")
12944 (description
12945 "Pyclipper is a Cython wrapper for the C++ translation of the
12946 Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
12947 (license license:expat)))
12948
12949 (define-public python2-pyclipper
12950 (package-with-python2 python-pyclipper))
12951
12952 (define-public python2-booleanoperations
12953 (package
12954 (name "python2-booleanoperations")
12955 (version "0.7.1")
12956 (source
12957 (origin
12958 (method url-fetch)
12959 (uri (pypi-uri "booleanOperations" version ".zip"))
12960 (sha256
12961 (base32
12962 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
12963 (build-system python-build-system)
12964 (arguments
12965 `(#:python ,python-2))
12966 (native-inputs
12967 `(("unzip" ,unzip)
12968 ("python2-pytest" ,python2-pytest)
12969 ("python2-pytest-runner" ,python2-pytest-runner)))
12970 (propagated-inputs
12971 `(("python-fonttools" ,python2-fonttools)
12972 ("python-pyclipper" ,python2-pyclipper)
12973 ("python-ufolib" ,python2-ufolib)))
12974 (home-page "https://github.com/typemytype/booleanOperations")
12975 (synopsis "Boolean operations on paths")
12976 (description
12977 "BooleanOperations provides a Python library that enables
12978 boolean operations on paths.")
12979 (license license:expat)))
12980
12981 (define-public python-tempdir
12982 (package
12983 (name "python-tempdir")
12984 (version "0.7.1")
12985 (source
12986 (origin
12987 (method url-fetch)
12988 (uri (pypi-uri "tempdir" version))
12989 (sha256
12990 (base32
12991 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
12992 (build-system python-build-system)
12993 (home-page "https://pypi.org/project/tempdir/")
12994 (arguments
12995 ;; the package has no tests
12996 '(#:tests? #f))
12997 (synopsis "Python library for managing temporary directories")
12998 (description
12999 "This library manages temporary directories that are automatically
13000 deleted with all their contents when they are no longer needed. It is
13001 particularly convenient for use in tests.")
13002 (license license:expat)))
13003
13004 (define-public python2-tempdir
13005 (package-with-python2 python-tempdir))
13006
13007 (define-public python-activepapers
13008 (package
13009 (name "python-activepapers")
13010 (version "0.2.2")
13011 (source
13012 (origin
13013 (method url-fetch)
13014 (uri (pypi-uri "ActivePapers.Py" version))
13015 (sha256
13016 (base32
13017 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
13018 (build-system python-build-system)
13019 (arguments
13020 `(#:modules ((ice-9 ftw)
13021 (srfi srfi-1)
13022 (guix build utils)
13023 (guix build python-build-system))
13024
13025 #:phases
13026 (modify-phases %standard-phases
13027 (add-after 'unpack 'delete-python2-code
13028 (lambda _
13029 (for-each delete-file
13030 '("lib/activepapers/builtins2.py"
13031 "lib/activepapers/standardlib2.py"
13032 "lib/activepapers/utility2.py"))))
13033 (replace 'check
13034 (lambda _
13035 ;; Deactivate the test cases that download files
13036 (setenv "NO_NETWORK_ACCESS" "1")
13037 ;; For some strange reason, some tests fail if nosetests runs all
13038 ;; test modules in a single execution. They pass if each test
13039 ;; module is run individually.
13040 (for-each (lambda (filename)
13041 (invoke "nosetests"
13042 (string-append "tests/" filename)))
13043 (scandir "tests"
13044 (lambda (filename)
13045 (string-suffix? ".py" filename)))))))))
13046 (native-inputs
13047 `(("python-tempdir" ,python-tempdir)
13048 ("python-nose" ,python-nose)))
13049 (propagated-inputs
13050 `(("python-h5py" ,python-h5py)))
13051 (home-page "http://www.activepapers.org/")
13052 (synopsis "Executable papers for scientific computing")
13053 (description
13054 "ActivePapers is a tool for working with executable papers, which
13055 combine data, code, and documentation in single-file packages,
13056 suitable for publication as supplementary material or on repositories
13057 such as figshare or Zenodo.")
13058 (properties `((python2-variant . ,(delay python2-activepapers))))
13059 (license license:bsd-3)))
13060
13061 (define-public python2-activepapers
13062 (let ((base (package-with-python2
13063 (strip-python2-variant python-activepapers))))
13064 (package
13065 (inherit base)
13066 (arguments
13067 (substitute-keyword-arguments (package-arguments base)
13068 ((#:phases phases)
13069 `(modify-phases ,phases
13070 (delete 'delete-python2-code)
13071 (add-after 'unpack 'delete-python3-code
13072 (lambda _
13073 (for-each delete-file
13074 '("lib/activepapers/builtins3.py"
13075 "lib/activepapers/standardlib3.py"
13076 "lib/activepapers/utility3.py")))))))))))
13077
13078 (define-public python-semver
13079 (package
13080 (name "python-semver")
13081 (version "2.7.9")
13082 (source
13083 (origin
13084 (method url-fetch)
13085 (uri (pypi-uri "semver" version))
13086 (sha256
13087 (base32
13088 "0hhgqppchv59rqj0yzi1prdg2nfsywqmjsqy2rycyxm0hvxmbyqz"))))
13089 (build-system python-build-system)
13090 (arguments
13091 `(#:phases
13092 (modify-phases %standard-phases
13093 (add-after 'unpack 'patch-test-requirements
13094 (lambda _
13095 (substitute* "setup.py"
13096 ;; Our Python is new enough.
13097 (("'virtualenv<14\\.0\\.0'") "'virtualenv'"))
13098 #t)))))
13099 (native-inputs
13100 `(("python-tox" ,python-tox)
13101 ("python-virtualenv" ,python-virtualenv)))
13102 (home-page "https://github.com/k-bx/python-semver")
13103 (synopsis "Python helper for Semantic Versioning")
13104 (description "This package provides a Python library for
13105 @url{Semantic Versioning, http://semver.org/}.")
13106 (license license:bsd-3)))
13107
13108 (define-public python2-semver
13109 (package-with-python2 python-semver))
13110
13111 (define-public python-pyro4
13112 (package
13113 (name "python-pyro4")
13114 (version "4.74")
13115 (source
13116 (origin
13117 (method url-fetch)
13118 (uri (pypi-uri "Pyro4" version))
13119 (sha256
13120 (base32
13121 "0pzp7c6q3vvkxq0wy9lr6wd5wky40sajz69g697i5rb2q497pvc9"))))
13122 (build-system python-build-system)
13123 (propagated-inputs
13124 `(("python-serpent" ,python-serpent)))
13125 (home-page "https://pyro4.readthedocs.io")
13126 (synopsis "Distributed object middleware for Python")
13127 (description
13128 "Pyro enables you to build applications in which objects can talk to each
13129 other over the network. You can just use normal Python method calls to call
13130 objects on other machines, also known as remote procedure calls (RPC).")
13131 (license license:expat)))
13132
13133 (define-public python2-pyro
13134 (package
13135 (name "python2-pyro")
13136 (version "3.16")
13137 (source
13138 (origin
13139 (method url-fetch)
13140 (uri (pypi-uri "Pyro" version))
13141 (file-name (string-append "Pyro-" version ".tar.gz"))
13142 (sha256
13143 (base32
13144 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
13145 (build-system python-build-system)
13146 (arguments
13147 ;; Pyro is not compatible with Python 3
13148 `(#:python ,python-2
13149 ;; Pyro has no test cases for automatic execution
13150 #:tests? #f))
13151 (home-page "http://pythonhosted.org/Pyro/")
13152 (synopsis "Distributed object manager for Python")
13153 (description "Pyro is a Distributed Object Technology system
13154 written in Python that is designed to be easy to use. It resembles
13155 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
13156 which is a system and language independent Distributed Object Technology
13157 and has much more to offer than Pyro or RMI. Pyro 3.x is no
13158 longer maintained. New projects should use Pyro4 instead, which
13159 is the new Pyro version that is actively developed.")
13160 (license license:expat)))
13161
13162 (define-public python2-scientific
13163 (package
13164 (name "python2-scientific")
13165 (version "2.9.4")
13166 (source
13167 (origin
13168 (method url-fetch)
13169 (uri (string-append "https://bitbucket.org/khinsen/"
13170 "scientificpython/downloads/ScientificPython-"
13171 version ".tar.gz"))
13172 (file-name (string-append "ScientificPython-" version ".tar.gz"))
13173 (sha256
13174 (base32
13175 "0fc69zhlsn9d2jvbzyjl9ah53vj598h84nkq230c83ahfvgzx5y3"))))
13176 (build-system python-build-system)
13177 (inputs
13178 `(("netcdf" ,netcdf)))
13179 (propagated-inputs
13180 `(("python-numpy" ,python2-numpy-1.8)
13181 ("python-pyro" ,python2-pyro)))
13182 (arguments
13183 ;; ScientificPython is not compatible with Python 3
13184 `(#:python ,python-2
13185 #:tests? #f ; No test suite
13186 #:phases
13187 (modify-phases %standard-phases
13188 (replace 'build
13189 (lambda* (#:key inputs #:allow-other-keys)
13190 (zero? (system* "python" "setup.py" "build"
13191 (string-append "--netcdf_prefix="
13192 (assoc-ref inputs "netcdf")))))))))
13193 (home-page "https://bitbucket.org/khinsen/scientificpython")
13194 (synopsis "Python modules for scientific computing")
13195 (description "ScientificPython is a collection of Python modules that are
13196 useful for scientific computing. Most modules are rather general (Geometry,
13197 physical units, automatic derivatives, ...) whereas others are more
13198 domain-specific (e.g. netCDF and PDB support). The library is currently
13199 not actively maintained and works only with Python 2 and NumPy < 1.9.")
13200 (license license:cecill-c)))
13201
13202 (define-public python2-mmtk
13203 (package
13204 (name "python2-mmtk")
13205 (version "2.7.11")
13206 (source
13207 (origin
13208 (method url-fetch)
13209 (uri (string-append "https://bitbucket.org/khinsen/"
13210 "mmtk/downloads/MMTK-" version ".tar.gz"))
13211 (file-name (string-append "MMTK-" version ".tar.gz"))
13212 (sha256
13213 (base32
13214 "1d0nnjx4lwsvh8f99vv1r6gi50d93yba0adkz8b4zgv4za4c5862"))))
13215 (build-system python-build-system)
13216 (native-inputs
13217 `(("netcdf" ,netcdf)))
13218 (propagated-inputs
13219 `(("python-scientific" ,python2-scientific)
13220 ("python-tkinter" ,python-2 "tk")))
13221 (arguments
13222 `(#:python ,python-2
13223 #:tests? #f
13224 #:phases
13225 (modify-phases %standard-phases
13226 (add-before 'build 'includes-from-scientific
13227 (lambda* (#:key inputs #:allow-other-keys)
13228 (mkdir-p "Include/Scientific")
13229 (copy-recursively
13230 (string-append
13231 (assoc-ref inputs "python-scientific")
13232 "/include/python2.7/Scientific")
13233 "Include/Scientific"))))))
13234 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
13235 (synopsis "Python library for molecular simulation")
13236 (description "MMTK is a library for molecular simulations with an emphasis
13237 on biomolecules. It provides widely used methods such as Molecular Dynamics
13238 and normal mode analysis, but also basic routines for implementing new methods
13239 for simulation and analysis. The library is currently not actively maintained
13240 and works only with Python 2 and NumPy < 1.9.")
13241 (license license:cecill-c)))
13242
13243 (define-public python-phonenumbers
13244 (package
13245 (name "python-phonenumbers")
13246 (version "8.9.1")
13247 (source
13248 (origin
13249 (method url-fetch)
13250 (uri (pypi-uri "phonenumbers" version))
13251 (sha256
13252 (base32
13253 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
13254 (build-system python-build-system)
13255 (home-page
13256 "https://github.com/daviddrysdale/python-phonenumbers")
13257 (synopsis
13258 "Python library for dealing with international phone numbers")
13259 (description
13260 "This package provides a Python port of Google's libphonenumber library.")
13261 (license license:asl2.0)))
13262
13263 (define-public python2-phonenumbers
13264 (package-with-python2 python-phonenumbers))
13265
13266 (define-public python-send2trash
13267 (package
13268 (name "python-send2trash")
13269 (version "1.4.2")
13270 (source
13271 (origin (method url-fetch)
13272 ;; Source tarball on PyPI doesn't include tests.
13273 (uri (string-append "https://github.com/hsoft/send2trash/archive/"
13274 version ".tar.gz"))
13275 (file-name (string-append name "-" version ".tar.gz"))
13276 (sha256
13277 (base32
13278 "0ffyhwjyx61slkdy38iwjc4gmj7fj9gs2q58f075gwvq630pzm9z"))))
13279 (build-system python-build-system)
13280 (arguments
13281 '(#:phases
13282 (modify-phases %standard-phases
13283 (add-before 'check 'pre-check
13284 (lambda _
13285 (mkdir-p "/tmp/foo")
13286 (setenv "HOME" "/tmp/foo")
13287 #t)))))
13288 (home-page "https://github.com/hsoft/send2trash")
13289 (synopsis "Send files to the user's @file{~/Trash} directory")
13290 (description "This package provides a Python library to send files to the
13291 user's @file{~/Trash} directory.")
13292 (license license:bsd-3)))
13293
13294 (define-public python2-send2trash
13295 (package
13296 (inherit (package-with-python2 python-send2trash))
13297 (arguments
13298 (substitute-keyword-arguments (package-arguments python-send2trash)
13299 ((#:phases phases)
13300 `(modify-phases ,phases
13301 (add-before 'check 'setenv
13302 (lambda _
13303 (setenv "PYTHONPATH"
13304 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
13305 #t))))))
13306 (properties `((python2-variant . ,(delay python-send2trash))))))
13307
13308 (define-public python-yapf
13309 (package
13310 (name "python-yapf")
13311 (version "0.24.0")
13312 (source
13313 (origin
13314 (method url-fetch)
13315 (uri (pypi-uri "yapf" version))
13316 (sha256
13317 (base32
13318 "0anwby0ydmyzcsgjc5dn1ryddwvii4dq61vck447q0n96npnzfyf"))))
13319 (build-system python-build-system)
13320 (home-page "https://github.com/google/yapf")
13321 (synopsis "Formatter for Python code")
13322 (description "YAPF is a formatter for Python code. It's based off of
13323 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
13324 takes the code and reformats it to the best formatting that conforms to the
13325 style guide, even if the original code didn't violate the style guide.")
13326 (license license:asl2.0)))
13327
13328 (define-public python2-yapf
13329 (package-with-python2 python-yapf))
13330
13331 (define-public python-gyp
13332 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
13333 (revision "0"))
13334 (package
13335 (name "python-gyp")
13336 ;; Google does not release versions,
13337 ;; based on second most recent commit date.
13338 (version (git-version "0.0.0" revision commit))
13339 (source
13340 (origin
13341 ;; Google does not release tarballs,
13342 ;; git checkout is needed.
13343 (method git-fetch)
13344 (uri (git-reference
13345 (url "https://chromium.googlesource.com/external/gyp")
13346 (commit commit)))
13347 (file-name (git-file-name name version))
13348 (sha256
13349 (base32
13350 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
13351 (build-system python-build-system)
13352 (home-page "https://gyp.gsrc.io/")
13353 (synopsis "GYP is a Meta-Build system")
13354 (description
13355 "GYP builds build systems for large, cross platform applications.
13356 It can be used to generate XCode projects, Visual Studio projects, Ninja build
13357 files, and Makefiles.")
13358 (license license:bsd-3))))
13359
13360 (define-public python2-gyp
13361 (package-with-python2 python-gyp))
13362
13363 (define-public python-whatever
13364 (package
13365 (name "python-whatever")
13366 (version "0.5")
13367 (source
13368 (origin
13369 (method url-fetch)
13370 (uri (string-append "https://github.com/Suor/whatever/archive/" version
13371 ".tar.gz"))
13372 (sha256
13373 (base32
13374 "1iqvnaf0zpc6b4rvbqq4xy45mszcscyzpzknv8wg6j84pbp22sap"))
13375 (file-name (string-append name "-" version ".tar.gz"))))
13376 (build-system python-build-system)
13377 (arguments
13378 `(#:phases
13379 (modify-phases %standard-phases
13380 (replace 'check
13381 (lambda _
13382 (invoke "py.test"))))))
13383 (native-inputs
13384 `(("python-pytest" ,python-pytest)))
13385 (home-page "http://github.com/Suor/whatever")
13386 (synopsis "Make anonymous functions by partial application of operators")
13387 (description "@code{whatever} provides an easy way to make anonymous
13388 functions by partial application of operators.")
13389 (license license:bsd-3)))
13390
13391 (define-public python2-whatever
13392 (package-with-python2 python-whatever))
13393
13394 (define-public python-funcy
13395 (package
13396 (name "python-funcy")
13397 (version "1.10")
13398 (source
13399 (origin
13400 (method url-fetch)
13401 (uri (string-append "https://github.com/Suor/funcy/archive/" version
13402 ".tar.gz"))
13403 (sha256
13404 (base32
13405 "1fanxivsip29vgarw6dn39xym3q4pbxcpa11plpp548lvxajpahz"))
13406 (file-name (string-append name "-" version ".tar.gz"))))
13407 (build-system python-build-system)
13408 (arguments
13409 `(#:phases
13410 (modify-phases %standard-phases
13411 (replace 'check
13412 (lambda _
13413 (invoke "py.test"))))))
13414 (native-inputs
13415 `(("python-pytest" ,python-pytest)
13416 ("python-whatever" ,python-whatever)))
13417 (home-page "http://github.com/Suor/funcy")
13418 (synopsis "Functional tools")
13419 (description "@code{funcy} is a library that provides functional tools.
13420 Examples are:
13421 @enumerate
13422 @item merge - Merges collections of the same type
13423 @item walk - Type-preserving map
13424 @item select - Selects a part of a collection
13425 @item take - Takes the first n items of a collection
13426 @item first - Takes the first item of a collection
13427 @item remove - Predicated-removes items of a collection
13428 @item concat - Concatenates two collections
13429 @item flatten - Flattens a collection with subcollections
13430 @item distinct - Returns only distinct items
13431 @item split - Predicated-splits a collection
13432 @item split_at - Splits a collection at a given item
13433 @item group_by - Groups items by group
13434 @item pairwise - Pairs off adjacent items
13435 @item partial - Partially-applies a function
13436 @item curry - Curries a function
13437 @item compose - Composes functions
13438 @item complement - Complements a predicate
13439 @item all_fn - \"all\" with predicate
13440 @end enumerate")
13441 (license license:bsd-3)))
13442
13443 (define-public python2-funcy
13444 (package-with-python2 python-funcy))
13445
13446 (define-public python-isoweek
13447 (package
13448 (name "python-isoweek")
13449 (version "1.3.3")
13450 (source
13451 (origin
13452 (method url-fetch)
13453 (uri (pypi-uri "isoweek" version))
13454 (sha256
13455 (base32
13456 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
13457 (build-system python-build-system)
13458 (home-page "https://github.com/gisle/isoweek")
13459 (synopsis "Objects representing a week")
13460 (description "The @code{isoweek} module provide the class Week that
13461 implements the week definition of ISO 8601. This standard also defines
13462 a notation for identifying weeks; yyyyWww (where the W is a literal).
13463 Week instances stringify to this form.")
13464 (license license:bsd-3)))
13465
13466 (define-public python2-isoweek
13467 (package-with-python2 python-isoweek))
13468
13469 (define-public python-tokenize-rt
13470 (package
13471 (name "python-tokenize-rt")
13472 (version "2.0.1")
13473 (source
13474 (origin
13475 (method url-fetch)
13476 (uri (pypi-uri "tokenize-rt" version))
13477 (sha256
13478 (base32
13479 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
13480 (build-system python-build-system)
13481 (home-page "https://github.com/asottile/tokenize-rt")
13482 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
13483 (description
13484 "This Python library is a wrapper around @code{tokenize} from the Python
13485 standard library. It provides two additional tokens @code{ESCAPED_NL} and
13486 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
13487 and @code{tokens_to_src} to roundtrip.")
13488 (license license:expat)))
13489
13490 (define-public python-future-fstrings
13491 (package
13492 (name "python-future-fstrings")
13493 (version "0.4.1")
13494 (source
13495 (origin
13496 (method url-fetch)
13497 (uri (pypi-uri "future_fstrings" version))
13498 (sha256
13499 (base32
13500 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
13501 (build-system python-build-system)
13502 (propagated-inputs
13503 `(("python-tokenize-rt" ,python-tokenize-rt)))
13504 (home-page "https://github.com/asottile/future-fstrings")
13505 (synopsis "Backport of fstrings to Python < 3.6")
13506 (description
13507 "This package provides a UTF-8 compatible encoding
13508 @code{future_fstrings}, which performs source manipulation. It decodes the
13509 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
13510 @code{f} strings.")
13511 (license license:expat)))
13512
13513 (define-public python-typing
13514 (package
13515 (name "python-typing")
13516 (version "3.6.6")
13517 (source
13518 (origin
13519 (method url-fetch)
13520 (uri (pypi-uri "typing" version))
13521 (sha256
13522 (base32
13523 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
13524 (build-system python-build-system)
13525 (home-page "https://docs.python.org/3/library/typing.html")
13526 (synopsis "Type hints for Python")
13527 (description "This is a backport of the standard library @code{typing}
13528 module to Python versions older than 3.5. Typing defines a standard notation
13529 for Python function and variable type annotations. The notation can be used
13530 for documenting code in a concise, standard format, and it has been designed
13531 to also be used by static and runtime type checkers, static analyzers, IDEs
13532 and other tools.")
13533 (license license:psfl)))
13534
13535 (define-public python2-typing
13536 (package-with-python2 python-typing))
13537
13538 (define-public bpython
13539 (package
13540 (name "bpython")
13541 (version "0.17.1")
13542 (source
13543 (origin
13544 (method url-fetch)
13545 (uri (pypi-uri "bpython" version))
13546 (sha256
13547 (base32
13548 "0bxhxi5zxdkrf8b4gwn0d363kdz3qnypjwhm1aydki53ph8ca1w9"))))
13549 (build-system python-build-system)
13550 (arguments
13551 `(#:phases
13552 (modify-phases %standard-phases
13553 (add-after 'unpack 'remove-failing-test
13554 (lambda _
13555 ;; Remove failing test. FIXME: make it pass
13556 (delete-file "bpython/test/test_args.py")
13557 #t))
13558 (add-after 'wrap 'add-aliases
13559 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
13560 (lambda* (#:key outputs #:allow-other-keys)
13561 (let ((out (assoc-ref outputs "out")))
13562 (for-each
13563 (lambda (old new)
13564 (symlink old (string-append out "/bin/" new)))
13565 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
13566 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
13567 #t)))))
13568 (propagated-inputs
13569 `(("python-pygments" ,python-pygments)
13570 ("python-requests" ,python-requests)
13571 ("python-babel" ,python-babel) ; optional, for internationalization
13572 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
13573 ("python-greenlet" ,python-greenlet)
13574 ("python-urwid" ,python-urwid) ; for bpython-urwid only
13575 ("python-six" ,python-six)))
13576 (native-inputs
13577 `(("python-sphinx" ,python-sphinx)
13578 ("python-mock" ,python-mock)))
13579 (home-page "https://bpython-interpreter.org/")
13580 (synopsis "Fancy interface to the Python interpreter")
13581 (description "Bpython is a fancy interface to the Python
13582 interpreter. bpython's main features are
13583
13584 @enumerate
13585 @item in-line syntax highlighting,
13586 @item readline-like autocomplete with suggestions displayed as you type,
13587 @item expected parameter list for any Python function,
13588 @item \"rewind\" function to pop the last line of code from memory and
13589 re-evaluate,
13590 @item send the code you've entered off to a pastebin,
13591 @item save the code you've entered to a file, and
13592 @item auto-indentation.
13593 @end enumerate")
13594 (license license:expat)))
13595
13596 (define-public bpython2
13597 (let ((base (package-with-python2
13598 (strip-python2-variant bpython))))
13599 (package (inherit base)
13600 (name "bpython2")
13601 (arguments
13602 `(#:python ,python-2
13603 #:phases
13604 (modify-phases %standard-phases
13605 (add-after 'unpack 'remove-failing-test
13606 (lambda _
13607 ;; Remove failing test. FIXME: make it pass
13608 (delete-file "bpython/test/test_args.py")
13609 ;; Disable failing test-cases (renaming inhibits they are
13610 ;; discovered)
13611 (substitute* "bpython/test/test_curtsies_repl.py"
13612 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
13613 (string-append a "xxx_off_" b))
13614 (("^(\\s*def )(test_complex\\W)" _ a b)
13615 (string-append a "xxx_off_" b)))
13616 #t))
13617 (add-before 'build 'rename-scripts
13618 ;; rename the scripts to bypthon2, bpdb2, etc.
13619 (lambda _
13620 (substitute* "setup.py"
13621 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
13622 (string-append name "2" rest "\n"))
13623 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
13624 (string-append name "2" (or sub "") rest "\n")))
13625 #t))))))))
13626
13627 (define-public python-pyinotify
13628 (package
13629 (name "python-pyinotify")
13630 (version "0.9.6")
13631 (source (origin
13632 (method url-fetch)
13633 (uri (pypi-uri "pyinotify" version))
13634 (sha256
13635 (base32
13636 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
13637 (build-system python-build-system)
13638 (arguments `(#:tests? #f)) ;no tests
13639 (home-page "https://github.com/seb-m/pyinotify")
13640 (synopsis "Python library for monitoring inotify events")
13641 (description
13642 "@code{pyinotify} provides a Python interface for monitoring
13643 file system events on Linux.")
13644 (license license:expat)))
13645
13646 (define-public python2-pyinotify
13647 (package-with-python2 python-pyinotify))
13648
13649 ;; Ada parser uses this version.
13650 (define-public python2-quex-0.67.3
13651 (package
13652 (name "python2-quex")
13653 (version "0.67.3")
13654 (source
13655 (origin
13656 (method url-fetch)
13657 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
13658 (version-major+minor version)
13659 "/quex-" version ".zip"))
13660 (sha256
13661 (base32
13662 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
13663 (build-system python-build-system)
13664 (native-inputs
13665 `(("unzip" ,unzip)))
13666 (arguments
13667 `(#:python ,python-2
13668 #:tests? #f
13669 #:phases
13670 (modify-phases %standard-phases
13671 (delete 'configure)
13672 (delete 'build)
13673 (replace 'install
13674 (lambda* (#:key outputs #:allow-other-keys)
13675 (let* ((out (assoc-ref outputs "out"))
13676 (share/quex (string-append out "/share/quex"))
13677 (bin (string-append out "/bin")))
13678 (copy-recursively "." share/quex)
13679 (mkdir-p bin)
13680 (symlink (string-append share/quex "/quex-exe.py")
13681 (string-append bin "/quex"))
13682 #t))))))
13683 (native-search-paths
13684 (list (search-path-specification
13685 (variable "QUEX_PATH")
13686 (files '("share/quex")))))
13687 (home-page "http://quex.sourceforge.net/")
13688 (synopsis "Lexical analyzer generator in Python")
13689 (description "@code{quex} is a lexical analyzer generator in Python.")
13690 (license license:lgpl2.1+))) ; Non-military
13691
13692 (define-public python2-quex
13693 (package (inherit python2-quex-0.67.3)
13694 (name "python2-quex")
13695 (version "0.68.1")
13696 (source
13697 (origin
13698 (method url-fetch)
13699 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
13700 (sha256
13701 (base32
13702 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
13703 (file-name (string-append name "-" version ".tar.gz"))))))
13704
13705 (define-public python-more-itertools
13706 (package
13707 (name "python-more-itertools")
13708 (version "4.3.0")
13709 (source
13710 (origin
13711 (method url-fetch)
13712 (uri (pypi-uri "more-itertools" version))
13713 (sha256
13714 (base32
13715 "17h3na0rdh8xq30w4b9pizgkdxmm51896bxw600x84jflg9vaxn4"))))
13716 (build-system python-build-system)
13717 (arguments
13718 `(,@(if (any (cute string-prefix? <> (or (%current-system)
13719 (%current-target-system)))
13720 '("armhf" "i686"))
13721 '(#:phases
13722 (modify-phases %standard-phases
13723 ;; This is required for 32-bit hardware.
13724 ;; TODO: Try to remove this when upgrading.
13725 (add-after 'unpack 'patch-test
13726 (lambda _
13727 (substitute* "more_itertools/tests/test_more.py"
13728 (("10 \\*\\* 10") "9 ** 9"))
13729 #t))))
13730 '())))
13731 (propagated-inputs
13732 `(("python-six" ,python-six-bootstrap)))
13733 (home-page "https://github.com/erikrose/more-itertools")
13734 (synopsis "More routines for operating on iterables, beyond itertools")
13735 (description "Python's built-in @code{itertools} module implements a
13736 number of iterator building blocks inspired by constructs from APL, Haskell,
13737 and SML. @code{more-itertools} includes additional building blocks for
13738 working with iterables.")
13739 (license license:expat)))
13740
13741 (define-public python2-more-itertools
13742 (package-with-python2 python-more-itertools))
13743
13744 (define-public python-latexcodec
13745 (package
13746 (name "python-latexcodec")
13747 (version "1.0.5")
13748 (source
13749 (origin
13750 (method url-fetch)
13751 (uri (pypi-uri "latexcodec" version))
13752 (sha256
13753 (base32
13754 "0zdd1gf24i83ykadx0y30n3001j43scqr2saql3vckk5c39dj1wn"))))
13755 (build-system python-build-system)
13756 (inputs
13757 `(("python-six" ,python-six)))
13758 (home-page "https://readthedocs.org/projects/latexcodec/")
13759 (synopsis "Work with LaTeX code in Python")
13760 (description "Lexer and codec to work with LaTeX code in Python.")
13761 (license license:expat)))
13762
13763 (define-public python-pybtex
13764 (package
13765 (name "python-pybtex")
13766 (version "0.21")
13767 (source
13768 (origin
13769 (method url-fetch)
13770 (uri (pypi-uri "pybtex" version))
13771 (sha256
13772 (base32
13773 "00300j8dn5pxq4ndxmfmbmycg2znawkqs49val2x6jlmfiy6r2mg"))))
13774 (build-system python-build-system)
13775 (native-inputs
13776 `(("python-nose" ,python-nose)))
13777 (inputs
13778 `(("python-latexcodec" ,python-latexcodec)
13779 ("python-pyyaml" ,python-pyyaml)
13780 ("python-six" ,python-six)))
13781 (arguments
13782 `(#:test-target "nosetests"))
13783 (home-page "https://pybtex.org/")
13784 (synopsis "BibTeX-compatible bibliography processor")
13785 (description "Pybtex is a BibTeX-compatible bibliography processor written
13786 in Python. You can simply type pybtex instead of bibtex.")
13787 (license license:expat)))
13788
13789 (define-public python-onetimepass
13790 (package
13791 (name "python-onetimepass")
13792 (version "1.0.1")
13793 (source
13794 (origin
13795 (method url-fetch)
13796 (uri (pypi-uri "onetimepass" version))
13797 (sha256
13798 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
13799 (build-system python-build-system)
13800 (propagated-inputs `(("python-six" ,python-six)))
13801 (home-page "https://github.com/tadeck/onetimepass/")
13802 (synopsis "One-time password library")
13803 (description "Python one-time password library for HMAC-based (HOTP) and
13804 time-based (TOTP) passwords.")
13805 (license license:expat)))
13806
13807 (define-public python-parso
13808 (package
13809 (name "python-parso")
13810 (version "0.3.1")
13811 (source
13812 (origin
13813 (method url-fetch)
13814 (uri (pypi-uri "parso" version))
13815 (sha256
13816 (base32
13817 "18p89iwcm8mnf380f92g9w0bhx5km8wxp392vvjcq4y1ld1llw1m"))))
13818 (native-inputs
13819 `(("python-pytest" ,python-pytest)))
13820 (build-system python-build-system)
13821 (home-page "https://github.com/davidhalter/parso")
13822 (synopsis "Python Parser")
13823 (description "Parso is a Python parser that supports error recovery and
13824 round-trip parsing for different Python versions (in multiple Python versions).
13825 Parso is also able to list multiple syntax errors in your Python file.")
13826 (license license:expat)))
13827
13828 (define-public python2-parso
13829 (package-with-python2 python-parso))
13830
13831 (define-public python-async-generator
13832 (package
13833 (name "python-async-generator")
13834 (version "1.9")
13835 (source
13836 (origin
13837 (method url-fetch)
13838 (uri (pypi-uri "async_generator" version))
13839 (sha256
13840 (base32
13841 "0wc3hidz1q85cja93k5pzybn0fprfnqyrv4qlkdqdzklc5f4dmdp"))))
13842 (build-system python-build-system)
13843 (native-inputs
13844 `(("python-pytest" ,python-pytest)))
13845 (home-page "https://github.com/python-trio/async_generator")
13846 (synopsis "Async generators and context managers for Python 3.5+")
13847 (description "@code{async_generator} back-ports Python 3.6's native async
13848 generators and Python 3.7's context managers into Python 3.5.")
13849 ;; Dual licensed.
13850 (license (list license:expat license:asl2.0))))
13851
13852 (define-public python-async-timeout
13853 (package
13854 (name "python-async-timeout")
13855 (version "3.0.1")
13856 (source
13857 (origin
13858 (method url-fetch)
13859 (uri (pypi-uri "async-timeout" version))
13860 (sha256
13861 (base32
13862 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
13863 (build-system python-build-system)
13864 (home-page "https://github.com/aio-libs/async_timeout/")
13865 (synopsis "Timeout context manager for asyncio programs")
13866 (description "@code{async-timeout} provides a timeout timeout context
13867 manager compatible with @code{asyncio}.")
13868 (license license:asl2.0)))
13869
13870 (define-public python-glob2
13871 (package
13872 (name "python-glob2")
13873 (version "0.6")
13874 (source (origin
13875 (method url-fetch)
13876 (uri (string-append
13877 "https://github.com/miracle2k/python-glob2/archive/"
13878 version
13879 ".tar.gz"))
13880 (sha256
13881 (base32
13882 "0ja168f0dz4kbz4m06dm0rd3acaypk6hjx2km541pw22y9s40mag"))
13883 (file-name (string-append name "-" version ".tar.gz"))))
13884 (build-system python-build-system)
13885 (home-page "https://github.com/miracle2k/python-glob2/")
13886 (synopsis "Extended Version of the python buildin glob module")
13887 (description "This is an extended version of the Python
13888 @url{http://docs.python.org/library/glob.html, built-in glob module} which
13889 adds:
13890
13891 @itemize
13892 @item The ability to capture the text matched by glob patterns, and return
13893 those matches alongside the file names.
13894 @item A recursive @code{**} globbing syntax, akin for example to the
13895 @code{globstar} option of Bash.
13896 @item The ability to replace the file system functions used, in order to glob
13897 on virtual file systems.
13898 @item Compatible with Python 2 and Python 3 (tested with 3.3).
13899 @end itemize
13900
13901 Glob2 currently based on the glob code from Python 3.3.1.")
13902 (license license:bsd-2)))
13903
13904 (define-public python2-glob2
13905 (package-with-python2 python-glob2))
13906
13907 (define-public python-gipc
13908 (package
13909 (name "python-gipc")
13910 (version "0.6.0")
13911 (source
13912 (origin
13913 (method url-fetch)
13914 (uri (pypi-uri "gipc" version ".zip"))
13915 (sha256
13916 (base32
13917 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
13918 (build-system python-build-system)
13919 (native-inputs
13920 `(("unzip" ,unzip)))
13921 (propagated-inputs
13922 `(("python-gevent" ,python-gevent)))
13923 (home-page "http://gehrcke.de/gipc")
13924 (synopsis "Child process management in the context of gevent")
13925 (description "Usage of Python's multiprocessing package in a
13926 gevent-powered application may raise problems. With @code{gipc},
13927 process-based child processes can safely be created anywhere within a
13928 gevent-powered application.")
13929 (license license:expat)))
13930
13931 (define-public python2-gipc
13932 (package-with-python2 python-gipc))
13933
13934 (define-public python-fusepy
13935 (package
13936 (name "python-fusepy")
13937 (version "2.0.4")
13938 (source
13939 (origin
13940 (method url-fetch)
13941 (uri (pypi-uri "fusepy" version))
13942 (sha256
13943 (base32
13944 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
13945 (build-system python-build-system)
13946 (arguments
13947 `(#:phases
13948 (modify-phases %standard-phases
13949 (add-before 'build 'set-library-file-name
13950 (lambda* (#:key inputs #:allow-other-keys)
13951 (let ((fuse (assoc-ref inputs "fuse")))
13952 (substitute* "fuse.py"
13953 (("find_library\\('fuse'\\)")
13954 (string-append "'" fuse "/lib/libfuse.so'")))
13955 #t))))))
13956 (propagated-inputs
13957 `(("fuse" ,fuse)))
13958 (home-page "https://github.com/fusepy/fusepy")
13959 (synopsis "Simple ctypes bindings for FUSE")
13960 (description "Python module that provides a simple interface to FUSE and
13961 MacFUSE. The binding is created using the standard @code{ctypes} library.")
13962 (license license:isc)))
13963
13964 (define-public python2-fusepy
13965 (package-with-python2 python-fusepy))
13966
13967 (define-public python2-gdrivefs
13968 (package
13969 (name "python2-gdrivefs")
13970 (version "0.14.9")
13971 (source
13972 (origin
13973 (method url-fetch)
13974 (uri (pypi-uri "gdrivefs" version))
13975 (sha256
13976 (base32
13977 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
13978 (build-system python-build-system)
13979 (arguments
13980 `(#:python ,python-2
13981 #:phases
13982 (modify-phases %standard-phases
13983 (add-before 'build 'patch-setup-py
13984 (lambda _
13985 ;; Update requirements from dependency==version
13986 ;; to dependency>=version
13987 (substitute* "gdrivefs/resources/requirements.txt"
13988 (("==") ">="))
13989 #t)))))
13990 (native-inputs
13991 `(("python2-gipc" ,python2-gipc)
13992 ("python2-gevent" ,python2-gevent)
13993 ("python2-greenlet" ,python2-greenlet)
13994 ("python2-httplib2" ,python2-httplib2)
13995 ("python2-uritemplate" ,python2-uritemplate)
13996 ("python2-oauth2client" ,python2-oauth2client)
13997 ("python2-six" ,python2-six)))
13998 (propagated-inputs
13999 `(("python2-dateutil" ,python2-dateutil)
14000 ("python2-fusepy" ,python2-fusepy)
14001 ("python2-google-api-client" ,python2-google-api-client)))
14002 (home-page "https://github.com/dsoprea/GDriveFS")
14003 (synopsis "Mount Google Drive as a local file system")
14004 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
14005 under Python 2.7.")
14006 (license license:gpl2)))
14007
14008 (define-public pybind11
14009 (package
14010 (name "pybind11")
14011 (version "2.2.4")
14012 (source (origin
14013 (method git-fetch)
14014 (uri (git-reference
14015 (url "https://github.com/pybind/pybind11.git")
14016 (commit (string-append "v" version))))
14017 (sha256
14018 (base32
14019 "0pa79ymcasv8br5ifbx7878id5py2jpjac3i20cqxr6gs9l6ivlv"))
14020 (file-name (git-file-name name version))))
14021 (build-system cmake-build-system)
14022 (native-inputs
14023 `(("python" ,python)
14024 ("python-pytest" ,python-pytest)))
14025 (arguments
14026 `(#:test-target "check"))
14027 (home-page "https://github.com/pybind/pybind11/")
14028 (synopsis "Seamless operability between C++11 and Python")
14029 (description "pybind11 is a lightweight header-only library that exposes
14030 C++ types in Python and vice versa, mainly to create Python bindings of
14031 existing C++ code. Its goals and syntax are similar to the excellent
14032 Boost.Python library by David Abrahams: to minimize boilerplate code in
14033 traditional extension modules by inferring type information using compile-time
14034 introspection.")
14035 (license license:expat)))
14036
14037 (define-public python-fasteners
14038 (package
14039 (name "python-fasteners")
14040 (version "0.14.1")
14041 (source
14042 (origin
14043 (method url-fetch)
14044 (uri (pypi-uri "fasteners" version))
14045 (sha256
14046 (base32
14047 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
14048 (build-system python-build-system)
14049 (propagated-inputs
14050 `(("python-monotonic" ,python-monotonic)
14051 ("python-six" ,python-six)
14052 ("python-testtools" ,python-testtools)))
14053 (home-page "https://github.com/harlowja/fasteners")
14054 (synopsis "Python package that provides useful locks")
14055 (description
14056 "This package provides a Python program that provides following locks:
14057
14058 @itemize
14059 @item Locking decorator
14060 @item Reader-writer locks
14061 @item Inter-process locks
14062 @item Generic helpers
14063 @end itemize\n")
14064 (properties `((python2-variant . ,(delay python2-fasteners))))
14065 (license license:asl2.0)))
14066
14067 (define-public python2-fasteners
14068 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
14069 (package
14070 (inherit base)
14071 (propagated-inputs
14072 `(("python2-futures" ,python2-futures)
14073 ,@(package-propagated-inputs base))))))
14074
14075 (define-public python-requests-file
14076 (package
14077 (name "python-requests-file")
14078 (version "1.4.3")
14079 (source
14080 (origin
14081 (method url-fetch)
14082 (uri (pypi-uri "requests-file" version))
14083 (sha256
14084 (base32
14085 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
14086 (build-system python-build-system)
14087 (propagated-inputs
14088 `(("python-requests" ,python-requests)
14089 ("python-six" ,python-six)))
14090 (home-page
14091 "https://github.com/dashea/requests-file")
14092 (synopsis "File transport adapter for Requests")
14093 (description
14094 "Requests-File is a transport adapter for use with the Requests Python
14095 library to allow local filesystem access via file:// URLs.")
14096 (license license:asl2.0)))
14097
14098 (define-public python2-requests-file
14099 (package-with-python2 python-requests-file))
14100
14101 (define-public python-tldextract
14102 (package
14103 (name "python-tldextract")
14104 (version "2.2.0")
14105 (source
14106 (origin
14107 (method url-fetch)
14108 (uri (pypi-uri "tldextract" version))
14109 (sha256
14110 (base32
14111 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
14112 (build-system python-build-system)
14113 (native-inputs
14114 `(("python-pytest" ,python-pytest)
14115 ("python-responses" ,python-responses)))
14116 (propagated-inputs
14117 `(("python-idna" ,python-idna)
14118 ("python-requests" ,python-requests)
14119 ("python-requests-file" ,python-requests-file)))
14120 (home-page
14121 "https://github.com/john-kurkowski/tldextract")
14122 (synopsis
14123 "Separate the TLD from the registered domain and subdomains of a URL")
14124 (description
14125 "TLDExtract accurately separates the TLD from the registered domain and
14126 subdomains of a URL, using the Public Suffix List. By default, this includes
14127 the public ICANN TLDs and their exceptions. It can optionally support the
14128 Public Suffix List's private domains as well.")
14129 (license license:bsd-3)))
14130
14131 (define-public python2-tldextract
14132 (package-with-python2 python-tldextract))
14133
14134 (define-public python-pynamecheap
14135 (package
14136 (name "python-pynamecheap")
14137 (version "0.0.3")
14138 (source
14139 (origin
14140 (method url-fetch)
14141 (uri (pypi-uri "PyNamecheap" version))
14142 (sha256
14143 (base32
14144 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
14145 (build-system python-build-system)
14146 (propagated-inputs
14147 `(("python-requests" ,python-requests)))
14148 (home-page
14149 "https://github.com/Bemmu/PyNamecheap")
14150 (synopsis
14151 "Namecheap API client in Python")
14152 (description
14153 "PyNamecheap is a Namecheap API client in Python.")
14154 (license license:expat)))
14155
14156 (define-public python2-pynamecheap
14157 (package-with-python2 python-pynamecheap))
14158
14159 (define-public python-dns-lexicon
14160 (package
14161 (name "python-dns-lexicon")
14162 (version "2.4.0")
14163 (source
14164 (origin
14165 (method url-fetch)
14166 (uri (pypi-uri "dns-lexicon" version))
14167 (sha256
14168 (base32
14169 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
14170 (build-system python-build-system)
14171 (arguments
14172 `(#:tests? #f)) ;requires internet access
14173 (propagated-inputs
14174 `(("python-future" ,python-future)
14175 ("python-pynamecheap" ,python-pynamecheap)
14176 ("python-requests" ,python-requests)
14177 ("python-tldextract" ,python-tldextract)
14178 ("python-urllib3" ,python-urllib3)))
14179 (home-page "https://github.com/AnalogJ/lexicon")
14180 (synopsis
14181 "Manipulate DNS records on various DNS providers")
14182 (description
14183 "Lexicon provides a way to manipulate DNS records on multiple DNS
14184 providers in a standardized way. It has a CLI but it can also be used as a
14185 Python library. It was designed to be used in automation, specifically with
14186 Let's Encrypt.")
14187 (license license:expat)))
14188
14189 (define-public python2-dns-lexicon
14190 (package-with-python2 python-dns-lexicon))
14191
14192 (define-public python-commandlines
14193 (package
14194 (name "python-commandlines")
14195 (version "0.4.1")
14196 (source
14197 (origin
14198 (method url-fetch)
14199 (uri (pypi-uri "commandlines" version))
14200 (sha256
14201 (base32
14202 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
14203 (build-system python-build-system)
14204 (home-page "https://github.com/chrissimpkins/commandlines")
14205 (synopsis "Command line argument to object parsing library")
14206 (description
14207 "@code{Commandlines} is a Python library for command line application
14208 development that supports command line argument parsing, command string
14209 validation testing and application logic.")
14210 (license license:expat)))
14211
14212 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
14213 ;; python-numba. They have a very unflexible relationship.
14214 (define-public python-numba
14215 (package
14216 (name "python-numba")
14217 (version "0.39.0")
14218 (source
14219 (origin
14220 (method url-fetch)
14221 (uri (pypi-uri "numba" version))
14222 (sha256
14223 (base32
14224 "1bibvkwga1v8293i9ivl469d8bzgabn3vgr2ig7c1i68v8frsx07"))))
14225 (build-system python-build-system)
14226 (arguments
14227 `(#:modules ((guix build utils)
14228 (guix build python-build-system)
14229 (ice-9 ftw)
14230 (srfi srfi-1)
14231 (srfi srfi-26))
14232 #:phases
14233 (modify-phases %standard-phases
14234 (add-after 'unpack 'disable-proprietary-features
14235 (lambda _
14236 (setenv "NUMBA_DISABLE_HSA" "1")
14237 (setenv "NUMBA_DISABLE_CUDA" "1")
14238 #t))
14239 (add-after 'unpack 'remove-failing-tests
14240 (lambda _
14241 ;; FIXME: these tests fail for unknown reasons:
14242 ;; test_non_writable_pycache, test_non_creatable_pycache, and
14243 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
14244 (substitute* "numba/tests/test_dispatcher.py"
14245 (("def test(_non_writable_pycache)" _ m)
14246 (string-append "def guix_skip" m))
14247 (("def test(_non_creatable_pycache)" _ m)
14248 (string-append "def guix_skip" m))
14249 (("def test(_frozen)" _ m)
14250 (string-append "def guix_skip" m)))
14251
14252 ;; These tests fail because we don't run the tests from the build
14253 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
14254 ;; They ar in numba.tests.test_pycc.TestDistutilsSupport.
14255 (substitute* "numba/tests/test_pycc.py"
14256 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
14257 (string-append "def guix_skip" m)))
14258 #t))
14259 (replace 'check
14260 (lambda _
14261 (let ((cwd (getcwd)))
14262 (setenv "PYTHONPATH"
14263 (string-append cwd "/build/"
14264 (find (cut string-prefix? "lib" <>)
14265 (scandir (string-append cwd "/build")))
14266 ":"
14267 (getenv "PYTHONPATH")))
14268 ;; Something is wrong with the PYTHONPATH when running the
14269 ;; tests from the build directory, as it complains about not being
14270 ;; able to import certain modules.
14271 (with-directory-excursion "/tmp"
14272 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
14273 #t)))))
14274 (propagated-inputs
14275 `(("python-llvmlite" ,python-llvmlite)
14276 ("python-numpy" ,python-numpy)
14277 ("python-singledispatch" ,python-singledispatch)))
14278 ;; Needed for tests.
14279 (inputs
14280 `(("python-jinja2" ,python-jinja2)
14281 ("python-pygments" ,python-pygments)))
14282 (home-page "https://numba.pydata.org")
14283 (synopsis "Compile Python code using LLVM")
14284 (description "Numba gives you the power to speed up your applications with
14285 high performance functions written directly in Python. With a few
14286 annotations, array-oriented and math-heavy Python code can be just-in-time
14287 compiled to native machine instructions, similar in performance to C, C++ and
14288 Fortran, without having to switch languages or Python interpreters.
14289
14290 Numba works by generating optimized machine code using the LLVM compiler
14291 infrastructure at import time, runtime, or statically (using the included pycc
14292 tool).")
14293 (license license:bsd-3)))
14294
14295 (define-public python-anndata
14296 (package
14297 (name "python-anndata")
14298 (version "0.6.9")
14299 (source
14300 (origin
14301 (method url-fetch)
14302 (uri (pypi-uri "anndata" version))
14303 (sha256
14304 (base32
14305 "1fh461xyyc7pcrjfgd013bdc2alf53r46ss3gfw3431mbb1gappi"))))
14306 (build-system python-build-system)
14307 (propagated-inputs
14308 `(("python-h5py" ,python-h5py)
14309 ("python-natsort" ,python-natsort)
14310 ("python-pandas" ,python-pandas)
14311 ("python-scipy" ,python-scipy)))
14312 (home-page "https://github.com/theislab/anndata")
14313 (synopsis "Annotated data for data analysis pipelines")
14314 (description "Anndata is a package for simple (functional) high-level APIs
14315 for data analysis pipelines. In this context, it provides an efficient,
14316 scalable way of keeping track of data together with learned annotations and
14317 reduces the code overhead typically encountered when using a mostly
14318 object-oriented library such as @code{scikit-learn}.")
14319 (license license:bsd-3)))
14320
14321 (define-public python-dill
14322 (package
14323 (name "python-dill")
14324 (version "0.2.8.2")
14325 (source
14326 (origin
14327 (method url-fetch)
14328 (uri (pypi-uri "dill" version))
14329 (sha256
14330 (base32
14331 "1cymzn9fxwdy33h21zkk4gqgzvd25110hh3zdqnvnwa3p52c4kb2"))))
14332 (build-system python-build-system)
14333 ;; FIXME: The check phase fails with "don't know how to make test".
14334 (arguments '(#:tests? #f))
14335 (home-page "https://pypi.org/project/dill")
14336 (synopsis "Serialize all of Python")
14337 (description "Dill extends Python's @code{pickle} module for serializing
14338 and de-serializing Python objects to the majority of the built-in Python
14339 types. Dill provides the user the same interface as the @code{pickle} module,
14340 and also includes some additional features. In addition to pickling Python
14341 objects, @code{dill} provides the ability to save the state of an interpreter
14342 session in a single command. Hence, it would be feasable to save a
14343 interpreter session, close the interpreter, ship the pickled file to another
14344 computer, open a new interpreter, unpickle the session and thus continue from
14345 the saved state of the original interpreter session.")
14346 (license license:bsd-3)))
14347
14348 (define-public python-multiprocess
14349 (package
14350 (name "python-multiprocess")
14351 (version "0.70.6.1")
14352 (source
14353 (origin
14354 (method url-fetch)
14355 (uri (pypi-uri "multiprocess" version))
14356 (sha256
14357 (base32
14358 "1ip5caz67b3q0553mr8gm8xwsb8x500jn8ml0gihgyfy52m2ypcq"))))
14359 (build-system python-build-system)
14360 (propagated-inputs
14361 `(("python-dill" ,python-dill)))
14362 (home-page "https://pypi.org/project/multiprocess")
14363 (synopsis "Multiprocessing and multithreading in Python")
14364 (description
14365 "This package is a fork of the multiprocessing Python package, a package
14366 which supports the spawning of processes using the API of the standard
14367 library's @code{threading} module.")
14368 (license license:bsd-3)))
14369
14370 (define-public python-toolz
14371 (package
14372 (name "python-toolz")
14373 (version "0.9.0")
14374 (source
14375 (origin
14376 (method url-fetch)
14377 (uri (pypi-uri "toolz" version))
14378 (sha256
14379 (base32
14380 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
14381 (build-system python-build-system)
14382 ;; FIXME: tests cannot be computed: "Can't perform this operation for
14383 ;; unregistered loader type"
14384 (arguments '(#:tests? #f))
14385 (home-page "https://github.com/pytoolz/toolz/")
14386 (synopsis "List processing tools and functional utilities")
14387 (description
14388 "This package provides a set of utility functions for iterators,
14389 functions, and dictionaries.")
14390 (license license:bsd-3)))
14391
14392 (define-public python2-toolz
14393 (package-with-python2 python-toolz))
14394
14395 (define-public python-cytoolz
14396 (package
14397 (name "python-cytoolz")
14398 (version "0.9.0.1")
14399 (source
14400 (origin
14401 (method url-fetch)
14402 (uri (pypi-uri "cytoolz" version))
14403 (sha256
14404 (base32
14405 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
14406 (build-system python-build-system)
14407 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
14408 ;; 'exceptions'"
14409 (arguments '(#:tests? #f))
14410 (propagated-inputs
14411 `(("python-toolz" ,python-toolz)))
14412 (native-inputs
14413 `(("python-cython" ,python-cython)))
14414 (home-page "https://github.com/pytoolz/cytoolz")
14415 (synopsis "High performance functional utilities")
14416 (description
14417 "The cytoolz package implements the same API as provided by toolz. The
14418 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
14419 that is accessible to other projects developed in Cython.")
14420 (license license:bsd-3)))
14421
14422 (define-public python-sortedcontainers
14423 (package
14424 (name "python-sortedcontainers")
14425 (version "2.0.4")
14426 (source
14427 (origin
14428 (method url-fetch)
14429 (uri (pypi-uri "sortedcontainers" version))
14430 (sha256
14431 (base32
14432 "10hrk2k0hbf9x78vd3f0lj277m1yzfhzzxr0hja718liwb398wk0"))))
14433 (build-system python-build-system)
14434 (native-inputs
14435 `(("python-tox" ,python-tox)))
14436 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
14437 (synopsis "Sorted List, Sorted Dict, Sorted Set")
14438 (description
14439 "This package provides a sorted collections library, written in
14440 pure-Python.")
14441 (license license:asl2.0)))
14442
14443 (define-public python-cloudpickle
14444 (package
14445 (name "python-cloudpickle")
14446 (version "0.6.1")
14447 (source
14448 (origin
14449 (method url-fetch)
14450 (uri (pypi-uri "cloudpickle" version))
14451 (sha256
14452 (base32
14453 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
14454 (build-system python-build-system)
14455 ;; FIXME: there are 5 errors in 122 tests:
14456 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
14457 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
14458 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
14459 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
14460 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
14461 ;; TypeError: cannot serialize '_io.BufferedRandom' object
14462 (arguments '(#:tests? #f))
14463 (native-inputs
14464 `(("python-pytest" ,python-pytest)
14465 ("python-mock" ,python-mock)
14466 ("python-tornado" ,python-tornado)))
14467 (home-page "https://github.com/cloudpipe/cloudpickle")
14468 (synopsis "Extended pickling support for Python objects")
14469 (description
14470 "Cloudpickle makes it possible to serialize Python constructs not
14471 supported by the default pickle module from the Python standard library. It
14472 is especially useful for cluster computing where Python expressions are
14473 shipped over the network to execute on remote hosts, possibly close to the
14474 data.")
14475 (license license:bsd-3)))
14476
14477 (define-public python2-cloudpickle
14478 (package-with-python2 python-cloudpickle))
14479
14480 (define-public python-locket
14481 (package
14482 (name "python-locket")
14483 (version "0.2.0")
14484 (source
14485 (origin
14486 (method url-fetch)
14487 (uri (pypi-uri "locket" version))
14488 (sha256
14489 (base32
14490 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
14491 (build-system python-build-system)
14492 (home-page "https://github.com/mwilliamson/locket.py")
14493 (synopsis "File-based locks for Python")
14494 (description
14495 "Locket implements a lock that can be used by multiple processes provided
14496 they use the same path.")
14497 (license license:bsd-2)))
14498
14499 (define-public python2-locket
14500 (package-with-python2 python-locket))
14501
14502 (define-public python-blosc
14503 (package
14504 (name "python-blosc")
14505 (version "1.5.1")
14506 (source
14507 (origin
14508 (method url-fetch)
14509 (uri (pypi-uri "blosc" version))
14510 (sha256
14511 (base32
14512 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
14513 (build-system python-build-system)
14514 ;; FIXME: all tests pass, but then this error is printed:
14515 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
14516 (arguments '(#:tests? #f))
14517 (propagated-inputs
14518 `(("python-numpy" ,python-numpy)))
14519 (home-page "https://github.com/blosc/python-blosc")
14520 (synopsis "Python wrapper for the Blosc data compressor library")
14521 (description "Blosc is a high performance compressor optimized for binary
14522 data. It has been designed to transmit data to the processor cache faster
14523 than the traditional, non-compressed, direct memory fetch approach via a
14524 @code{memcpy()} system call.
14525
14526 Blosc works well for compressing numerical arrays that contains data with
14527 relatively low entropy, like sparse data, time series, grids with
14528 regular-spaced values, etc.
14529
14530 This Python package wraps the Blosc library.")
14531 (license license:bsd-3)))
14532
14533 (define-public python2-blosc
14534 (package-with-python2 python-blosc))
14535
14536 (define-public python-partd
14537 (package
14538 (name "python-partd")
14539 (version "0.3.9")
14540 (source
14541 (origin
14542 (method url-fetch)
14543 (uri (pypi-uri "partd" version))
14544 (sha256
14545 (base32
14546 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
14547 (build-system python-build-system)
14548 (propagated-inputs
14549 `(("python-blosc" ,python-blosc)
14550 ("python-locket" ,python-locket)
14551 ("python-numpy" ,python-numpy)
14552 ("python-pandas" ,python-pandas)
14553 ("python-pyzmq" ,python-pyzmq)
14554 ("python-toolz" ,python-toolz)))
14555 (home-page "https://github.com/dask/partd/")
14556 (synopsis "Appendable key-value storage")
14557 (description "Partd stores key-value pairs. Values are raw bytes. We
14558 append on old values. Partd excels at shuffling operations.")
14559 (license license:bsd-3)))
14560
14561 (define-public python2-partd
14562 (package-with-python2 python-partd))
14563
14564 (define-public python-dask
14565 (package
14566 (name "python-dask")
14567 (version "1.0.0")
14568 (source
14569 (origin
14570 (method url-fetch)
14571 (uri (pypi-uri "dask" version))
14572 (sha256
14573 (base32
14574 "1xwz8h020ipwav2p5gcq9pskya1cvzd6hjyvd06dvr3w5lxlmym1"))))
14575 (build-system python-build-system)
14576 ;; A single test out of 5000+ fails. This test is marked as xfail when
14577 ;; pytest-xdist is used.
14578 (arguments
14579 `(#:phases
14580 (modify-phases %standard-phases
14581 (add-after 'unpack 'disable-broken-test
14582 (lambda _
14583 (substitute* "dask/tests/test_threaded.py"
14584 (("def test_interrupt\\(\\)" m)
14585 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
14586 m)))
14587 (when (which "python2")
14588 ;; This test fails with recent Pandas:
14589 ;; <https://github.com/dask/dask/issues/3794>.
14590 (substitute* "dask/dataframe/tests/test_dataframe.py"
14591 (("def test_info\\(\\)" m)
14592 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
14593 m))))
14594 #t))
14595 (replace 'check
14596 (lambda _ (invoke "pytest" "-vv"))))))
14597 (propagated-inputs
14598 `(("python-cloudpickle" ,python-cloudpickle)
14599 ("python-numpy" ,python-numpy)
14600 ("python-pandas" ,python-pandas)
14601 ("python-partd" ,python-partd)
14602 ("python-toolz" ,python-toolz)
14603 ("python-pyyaml" ,python-pyyaml)))
14604 (native-inputs
14605 `(("python-pytest" ,python-pytest)
14606 ("python-pytest-runner" ,python-pytest-runner)))
14607 (home-page "https://github.com/dask/dask/")
14608 (synopsis "Parallel computing with task scheduling")
14609 (description
14610 "Dask is a flexible parallel computing library for analytics. It
14611 consists of two components: dynamic task scheduling optimized for computation,
14612 and large data collections like parallel arrays, dataframes, and lists that
14613 extend common interfaces like NumPy, Pandas, or Python iterators to
14614 larger-than-memory or distributed environments. These parallel collections
14615 run on top of the dynamic task schedulers. ")
14616 (license license:bsd-3)))
14617
14618 (define-public python2-dask
14619 (package-with-python2 python-dask))
14620
14621 (define-public python-ilinkedlist
14622 (package
14623 (name "python-ilinkedlist")
14624 (version "0.4.0")
14625 (source
14626 (origin
14627 (method url-fetch)
14628 (uri (pypi-uri "ilinkedlist" version))
14629 (sha256
14630 (base32
14631 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
14632 (build-system python-build-system)
14633 (native-inputs `(("python-pytest" ,python-pytest)))
14634 (inputs `(("python" ,python)))
14635 (home-page "https://github.com/luther9/ilinkedlist-py")
14636 (synopsis "Immutable linked list library")
14637 (description
14638 "This is a implementation of immutable linked lists for Python. It
14639 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
14640 Since a linked list is treated as immutable, it is hashable, and its length
14641 can be retrieved in constant time. Some of the terminology is inspired by
14642 LISP. It is possible to create an improper list by creating a @code{Pair}
14643 with a non-list @code{cdr}.")
14644 (license license:gpl3+)))
14645
14646 (define-public python-readlike
14647 (package
14648 (name "python-readlike")
14649 (version "0.1.3")
14650 (source
14651 (origin
14652 (method url-fetch)
14653 (uri (pypi-uri "readlike" version))
14654 (sha256
14655 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
14656 (build-system python-build-system)
14657 (home-page "https://github.com/jangler/readlike")
14658 (synopsis "GNU Readline-like line editing module")
14659 (description
14660 "This Python module provides line editing functions similar to the default
14661 Emacs-style ones of GNU Readline. Unlike the Python standard library's
14662 @code{readline} package, this one allows access to those capabilties in settings
14663 outside of a standard command-line interface. It is especially well-suited to
14664 interfacing with Urwid, due to a shared syntax for describing key inputs.
14665
14666 Currently, all stateless Readline commands are implemented. Yanking and history
14667 are not supported.")
14668 (license license:expat)))
14669
14670 (define-public python2-readlike
14671 (package-with-python2 python-readlike))
14672
14673 (define-public python-reparser
14674 (package
14675 (name "python-reparser")
14676 (version "1.4.3")
14677 (source
14678 (origin
14679 (method url-fetch)
14680 (uri (pypi-uri "ReParser" version))
14681 (sha256
14682 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
14683 (build-system python-build-system)
14684 (home-page "https://github.com/xmikos/reparser")
14685 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
14686 (description
14687 "This Python library provides a simple lexer/parser for inline markup based
14688 on regular expressions.")
14689 (license license:expat)))
14690
14691 (define-public python2-reparser
14692 (let ((reparser (package-with-python2
14693 (strip-python2-variant python-reparser))))
14694 (package (inherit reparser)
14695 (propagated-inputs
14696 `(("python2-enum34" ,python2-enum34)
14697 ,@(package-propagated-inputs reparser))))))
14698
14699 (define-public python-precis-i18n
14700 (package
14701 (name "python-precis-i18n")
14702 (version "1.0.0")
14703 (source
14704 (origin
14705 (method url-fetch)
14706 (uri (pypi-uri "precis_i18n" version))
14707 (sha256
14708 (base32
14709 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
14710 (build-system python-build-system)
14711 (home-page "https://github.com/byllyfish/precis_i18n")
14712 (synopsis "Implementation of the PRECIS framework")
14713 (description
14714 "This module implements the PRECIS Framework as described in RFC 8264,
14715 RFC 8265 and RFC 8266.")
14716 (license license:expat)))
14717
14718 (define-public python-absl-py
14719 (package
14720 (name "python-absl-py")
14721 (version "0.6.1")
14722 (source
14723 (origin
14724 (method url-fetch)
14725 (uri (pypi-uri "absl-py" version))
14726 (sha256
14727 (base32
14728 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
14729 (build-system python-build-system)
14730 (propagated-inputs
14731 `(("python-six" ,python-six)))
14732 (home-page "https://github.com/abseil/abseil-py")
14733 (synopsis "Abseil Python common libraries")
14734 (description
14735 "This package provides the Abseil Python Common Libraries, a collection
14736 of Python libraries for building Python applications.")
14737 (license license:asl2.0)))
14738
14739 (define-public python-astor
14740 (package
14741 (name "python-astor")
14742 (version "0.7.1")
14743 (source
14744 (origin
14745 (method url-fetch)
14746 (uri (pypi-uri "astor" version))
14747 (sha256
14748 (base32
14749 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
14750 (build-system python-build-system)
14751 ;; FIXME: There are two errors and two test failures.
14752 (arguments `(#:tests? #f))
14753 (home-page "https://github.com/berkerpeksag/astor")
14754 (synopsis "Read/rewrite/write Python ASTs")
14755 (description "Astor is designed to allow easy manipulation of Python
14756 source via the AST.")
14757 (license license:bsd-3)))
14758
14759 (define-public python-grpcio
14760 (package
14761 (name "python-grpcio")
14762 (version "1.17.1")
14763 (source
14764 (origin
14765 (method url-fetch)
14766 (uri (pypi-uri "grpcio" version))
14767 (sha256
14768 (base32
14769 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
14770 (build-system python-build-system)
14771 (propagated-inputs
14772 `(("python-six" ,python-six)))
14773 (home-page "https://grpc.io")
14774 (synopsis "HTTP/2-based RPC framework")
14775 (description "This package provides a Python library for communicating
14776 with the HTTP/2-based RPC framework gRPC.")
14777 (license license:asl2.0)))
14778
14779 (define-public python-astunparse
14780 (package
14781 (name "python-astunparse")
14782 (version "1.6.1")
14783 (source
14784 (origin
14785 (method url-fetch)
14786 (uri (pypi-uri "astunparse" version))
14787 (sha256
14788 (base32
14789 "1jhidwyrqn17avqh9xnnm3wd7q7aahaq009cba67g86y6gxicyyj"))))
14790 (build-system python-build-system)
14791 (arguments '(#:tests? #f)) ; there are none
14792 (propagated-inputs
14793 `(("python-six" ,python-six)
14794 ("python-wheel" ,python-wheel)))
14795 (home-page "https://github.com/simonpercivall/astunparse")
14796 (synopsis "AST unparser for Python")
14797 (description "This package provides an AST unparser for Python. It is a
14798 factored out version of @code{unparse} found in the Python source
14799 distribution.")
14800 (license license:bsd-3)))
14801
14802 (define-public python-gast
14803 (package
14804 (name "python-gast")
14805 (version "0.2.0")
14806 (source
14807 (origin
14808 (method url-fetch)
14809 (uri (pypi-uri "gast" version))
14810 (sha256
14811 (base32
14812 "0c296xm1vz9x4w4inmdl0k8mnc0i9arw94si2i7pglpc461r0s3h"))))
14813 (build-system python-build-system)
14814 (propagated-inputs
14815 `(("python-astunparse" ,python-astunparse)))
14816 (home-page "https://pypi.org/project/gast/")
14817 (synopsis "Generic Python AST that abstracts the underlying Python version")
14818 (description
14819 "GAST provides a compatibility layer between the AST of various Python
14820 versions, as produced by @code{ast.parse} from the standard @code{ast}
14821 module.")
14822 (license license:bsd-3)))
14823
14824 (define-public python-wikidata
14825 (package
14826 (name "python-wikidata")
14827 (version "0.6.1")
14828 (source
14829 (origin
14830 (method url-fetch)
14831 (uri (pypi-uri "Wikidata" version))
14832 (sha256
14833 (base32
14834 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
14835 (build-system python-build-system)
14836 (propagated-inputs
14837 `(("python-babel" ,python-babel)))
14838 (home-page "https://github.com/dahlia/wikidata")
14839 (synopsis "Wikidata client library")
14840 (description
14841 "This package provides a Python interface to
14842 @url{https://www.wikidata.org/, Wikidata}.")
14843 (properties '((upstream-name . "Wikidata")))
14844 (license license:gpl3+)))
14845
14846 (define-public python-doctest-ignore-unicode
14847 (package
14848 (name "python-doctest-ignore-unicode")
14849 (version "0.1.2")
14850 (source
14851 (origin
14852 (method url-fetch)
14853 (uri (pypi-uri "doctest-ignore-unicode" version))
14854 (sha256
14855 (base32
14856 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
14857 (build-system python-build-system)
14858 (native-inputs
14859 `(("python-nose" ,python-nose)))
14860 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
14861 (synopsis "Ignore Unicode literal prefixes in doctests")
14862 (description
14863 "This package adds support for a flag to ignore Unicode literal prefixes
14864 in doctests.")
14865 (license license:asl2.0)))
14866
14867 (define-public python-attr
14868 (package
14869 (name "python-attr")
14870 (version "0.3.1")
14871 (source
14872 (origin
14873 (method url-fetch)
14874 (uri (pypi-uri "attr" version))
14875 (sha256
14876 (base32
14877 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
14878 (build-system python-build-system)
14879 (home-page "https://github.com/denis-ryzhkov/attr")
14880 (synopsis "Decorator for attributes of target function or class")
14881 (description "Simple decorator to set attributes of target function or
14882 class in a @acronym{DRY, Don't Repeat Yourself} way.")
14883 (license license:expat)))