gnu: Add ruby-commander.
[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, 2019 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, 2019 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 ;;; Copyright © 2019 Brett Gilio <brettg@posteo.net>
61 ;;;
62 ;;; This file is part of GNU Guix.
63 ;;;
64 ;;; GNU Guix is free software; you can redistribute it and/or modify it
65 ;;; under the terms of the GNU General Public License as published by
66 ;;; the Free Software Foundation; either version 3 of the License, or (at
67 ;;; your option) any later version.
68 ;;;
69 ;;; GNU Guix is distributed in the hope that it will be useful, but
70 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
71 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
72 ;;; GNU General Public License for more details.
73 ;;;
74 ;;; You should have received a copy of the GNU General Public License
75 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
76
77 (define-module (gnu packages python-xyz)
78 #:use-module ((guix licenses) #:prefix license:)
79 #:use-module (gnu packages)
80 #:use-module (gnu packages algebra)
81 #:use-module (gnu packages adns)
82 #:use-module (gnu packages attr)
83 #:use-module (gnu packages backup)
84 #:use-module (gnu packages bash)
85 #:use-module (gnu packages check)
86 #:use-module (gnu packages compression)
87 #:use-module (gnu packages crypto)
88 #:use-module (gnu packages databases)
89 #:use-module (gnu packages file)
90 #:use-module (gnu packages fontutils)
91 #:use-module (gnu packages gcc)
92 #:use-module (gnu packages geo)
93 #:use-module (gnu packages ghostscript)
94 #:use-module (gnu packages gl)
95 #:use-module (gnu packages glib)
96 #:use-module (gnu packages graphviz)
97 #:use-module (gnu packages graphics)
98 #:use-module (gnu packages gstreamer)
99 #:use-module (gnu packages gtk)
100 #:use-module (gnu packages icu4c)
101 #:use-module (gnu packages image)
102 #:use-module (gnu packages imagemagick)
103 #:use-module (gnu packages libevent)
104 #:use-module (gnu packages libffi)
105 #:use-module (gnu packages linux)
106 #:use-module (gnu packages llvm)
107 #:use-module (gnu packages man)
108 #:use-module (gnu packages maths)
109 #:use-module (gnu packages monitoring)
110 #:use-module (gnu packages multiprecision)
111 #:use-module (gnu packages networking)
112 #:use-module (gnu packages ncurses)
113 #:use-module (gnu packages openstack)
114 #:use-module (gnu packages pcre)
115 #:use-module (gnu packages perl)
116 #:use-module (gnu packages pkg-config)
117 #:use-module (gnu packages python)
118 #:use-module (gnu packages python-check)
119 #:use-module (gnu packages python-crypto)
120 #:use-module (gnu packages python-web)
121 #:use-module (gnu packages qt)
122 #:use-module (gnu packages readline)
123 #:use-module (gnu packages sdl)
124 #:use-module (gnu packages search)
125 #:use-module (gnu packages shells)
126 #:use-module (gnu packages ssh)
127 #:use-module (gnu packages terminals)
128 #:use-module (gnu packages tex)
129 #:use-module (gnu packages texinfo)
130 #:use-module (gnu packages time)
131 #:use-module (gnu packages tls)
132 #:use-module (gnu packages version-control)
133 #:use-module (gnu packages video)
134 #:use-module (gnu packages web)
135 #:use-module (gnu packages base)
136 #:use-module (gnu packages xml)
137 #:use-module (gnu packages xorg)
138 #:use-module (gnu packages xdisorg)
139 #:use-module (gnu packages tcl)
140 #:use-module (gnu packages bdw-gc)
141 #:use-module (gnu packages serialization)
142 #:use-module (guix packages)
143 #:use-module (guix download)
144 #:use-module (guix git-download)
145 #:use-module (guix utils)
146 #:use-module (guix build-system gnu)
147 #:use-module (guix build-system cmake)
148 #:use-module (guix build-system python)
149 #:use-module (guix build-system trivial)
150 #:use-module (srfi srfi-1)
151 #:use-module (srfi srfi-26))
152
153 (define-public python-psutil
154 (package
155 (name "python-psutil")
156 (version "5.4.3")
157 (source
158 (origin
159 (method url-fetch)
160 (uri (pypi-uri "psutil" version))
161 (sha256
162 (base32
163 "063v69x7spyclyaxrd3gmzj3p16q5ayg97xqhwb1kyn22a9pwip2"))))
164 (build-system python-build-system)
165 (arguments
166 ;; FIXME: some tests does not return and times out.
167 '(#:tests? #f))
168 (home-page "https://www.github.com/giampaolo/psutil")
169 (synopsis "Library for retrieving information on running processes")
170 (description
171 "psutil (Python system and process utilities) is a library for retrieving
172 information on running processes and system utilization (CPU, memory, disks,
173 network) in Python. It is useful mainly for system monitoring, profiling and
174 limiting process resources and management of running processes. It implements
175 many functionalities offered by command line tools such as: ps, top, lsof,
176 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
177 pidof, tty, taskset, pmap.")
178 (properties `((python2-variant . ,(delay python2-psutil))))
179 (license license:bsd-3)))
180
181 (define-public python2-psutil
182 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
183 (package
184 (inherit base)
185 (propagated-inputs
186 `(("python2-enum34" ,python2-enum34) ;optional
187 ,@(package-propagated-inputs base))))))
188
189 (define-public python-shapely
190 (package
191 (name "python-shapely")
192 (version "1.6.3")
193 (source
194 (origin
195 (method url-fetch)
196 (uri (pypi-uri "Shapely" version))
197 (sha256
198 (base32
199 "0svc58dzcw9gj92b4sgq35sdxkf85z0qwlzxarkzq4bp3h8jy58l"))))
200 (build-system python-build-system)
201 (native-inputs
202 `(("python-cython" ,python-cython)
203 ("python-matplotlib" ,python-matplotlib)
204 ("python-pytest" ,python-pytest)
205 ("python-pytest-cov" ,python-pytest-cov)))
206 (inputs
207 `(("geos" ,geos)))
208 (propagated-inputs
209 `(("python-numpy" ,python-numpy)))
210 (arguments
211 `(#:phases
212 (modify-phases %standard-phases
213 (add-after 'unpack 'patch-geos-path
214 (lambda* (#:key inputs #:allow-other-keys)
215 (let ((geos (assoc-ref inputs "geos"))
216 (glibc (assoc-ref inputs ,(if (%current-target-system)
217 "cross-libc" "libc"))))
218 (substitute* "shapely/geos.py"
219 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
220 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
221 geos "/lib/libgeos_c.so'])"))
222 (("free = load_dll\\('c'\\)\\.free")
223 (string-append "free = load_dll('c', fallbacks=['"
224 glibc "/lib/libc.so.6']).free"))))
225 #t)))))
226 (home-page "https://github.com/Toblerity/Shapely")
227 (synopsis "Library for the manipulation and analysis of geometric objects")
228 (description "Shapely is a Python package for manipulation and analysis of
229 planar geometric objects. It is based on the @code{GEOS} library.")
230 (license license:bsd-3)))
231
232 (define-public python-logwrap
233 (package
234 (name "python-logwrap")
235 (version "3.2.1")
236 (source
237 (origin
238 (method url-fetch)
239 (uri (pypi-uri "logwrap" version ".zip"))
240 (sha256
241 (base32
242 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
243 (build-system python-build-system)
244 (propagated-inputs
245 `(("python-six" ,python-six)
246 ("python-typing" ,python-typing)))
247 (native-inputs
248 `(("unzip" ,unzip)
249 ("python-cython" ,python-cython)
250 ("python-pytest" ,python-pytest)
251 ("python-pytest-cov" ,python-pytest-cov)
252 ("python-pytest-runner" ,python-pytest-runner)))
253 (home-page "https://github.com/penguinolog/logwrap")
254 (synopsis "Decorator for logging function arguments")
255 (description "This package provides a decorator to log function arguments
256 and function call return values in a human-readable way.")
257 (license license:asl2.0)))
258
259 (define-public python2-shapely
260 (package-with-python2 python-shapely))
261
262 (define-public python-clyent
263 (package
264 (name "python-clyent")
265 (version "1.2.1")
266 (source
267 (origin
268 (method url-fetch)
269 (uri (pypi-uri "clyent" version))
270 (sha256
271 (base32
272 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
273 (build-system python-build-system)
274 (native-inputs
275 `(("python-mock" ,python-mock)))
276 (home-page "https://github.com/binstar/clyent")
277 (synopsis "Command line client library")
278 (description "Clyent is a Python command line utiliy library. It is used
279 by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
280 (license license:bsd-3)))
281
282 (define-public python2-clyent
283 (package-with-python2 python-clyent))
284
285 (define-public python-babel
286 (package
287 (name "python-babel")
288 (version "2.6.0")
289 (source
290 (origin
291 (method url-fetch)
292 (uri (pypi-uri "Babel" version))
293 (sha256
294 (base32
295 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))
296 (build-system python-build-system)
297 (native-inputs
298 `(("python-freezegun" ,python-freezegun)
299 ("python-pytest" ,python-pytest)))
300 (propagated-inputs
301 `(("python-pytz" ,python-pytz)))
302 (arguments
303 `(#:phases (modify-phases %standard-phases
304 (replace 'check
305 (lambda _ (invoke "pytest" "-vv"))))))
306 (home-page "http://babel.pocoo.org/")
307 (synopsis
308 "Tools for internationalizing Python applications")
309 (description
310 "Babel is composed of two major parts:
311 - tools to build and work with gettext message catalogs
312 - a Python interface to the CLDR (Common Locale Data Repository), providing
313 access to various locale display names, localized number and date formatting,
314 etc. ")
315 (license license:bsd-3)))
316
317 (define-public python2-babel
318 (package-with-python2 python-babel))
319
320 (define-public python2-backport-ssl-match-hostname
321 (package
322 (name "python2-backport-ssl-match-hostname")
323 (version "3.5.0.1")
324 (source
325 (origin
326 (method url-fetch)
327 (uri (pypi-uri "backports.ssl_match_hostname" version))
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 (arguments
451 '(#:phases
452 (modify-phases %standard-phases
453 (replace 'check
454 (lambda _
455 (invoke "python" "sh.py" "test"))))))
456 (native-inputs
457 `(("python-coverage" ,python-coverage)))
458 (home-page "https://github.com/amoffat/sh")
459 (synopsis "Python subprocess replacement")
460 (description "This package provides a replacement for Python's
461 @code{subprocess} feature.")
462 (license license:expat)))
463
464 (define-public python2-sh
465 (package-with-python2 python-sh))
466
467 (define-public python-cftime
468 (package
469 (name "python-cftime")
470 (version "1.0.3.4")
471 (source
472 (origin
473 (method url-fetch)
474 (uri (pypi-uri "cftime" version))
475 (sha256
476 (base32
477 "0362dhxbzk593walyjz30dll6y2y79wialik647cbwdsf3ad0x6x"))))
478 (build-system python-build-system)
479 (propagated-inputs
480 `(("python-numpy" ,python-numpy)))
481 (native-inputs
482 `(("python-coveralls" ,python-coveralls)
483 ("python-cython" ,python-cython)
484 ("python-pytest-cov" ,python-pytest-cov)))
485 (home-page "https://github.com/Unidata/cftime")
486 (synopsis "Library for time handling")
487 (description
488 "This package provides time-handling functionality that used to be part
489 of the netcdf4 package before.")
490 ;; This package claims to include code under the GPLv3 but is released
491 ;; under ISC.
492 (license (list license:isc license:gpl3+))))
493
494 (define-public python-netcdf4
495 (package
496 (name "python-netcdf4")
497 (version "1.4.2")
498 (source
499 (origin
500 (method url-fetch)
501 (uri (pypi-uri "netCDF4" version))
502 (sha256
503 (base32
504 "0c0sklgrmv15ygliin8qq0hp7vanmbi74m6zpi0r1ksr0hssyd5r"))))
505 (build-system python-build-system)
506 (arguments
507 '(#:phases
508 (modify-phases %standard-phases
509 (add-after 'unpack 'configure-locations
510 (lambda* (#:key inputs #:allow-other-keys)
511 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
512 #t)))))
513 (native-inputs
514 `(("python-cython" ,python-cython)))
515 (propagated-inputs
516 `(("python-numpy" ,python-numpy)
517 ("python-cftime" ,python-cftime)))
518 (inputs
519 `(("netcdf" ,netcdf)
520 ("hdf4" ,hdf4)
521 ("hdf5" ,hdf5)))
522 (home-page "https://github.com/Unidata/netcdf4-python")
523 (synopsis "Python/numpy interface to the netCDF library")
524 (description "Netcdf4-python is a Python interface to the netCDF C
525 library. netCDF version 4 has many features not found in earlier
526 versions of the library and is implemented on top of HDF5. This module
527 can read and write files in both the new netCDF 4 and the old netCDF 3
528 format, and can create files that are readable by HDF5 clients. The
529 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
530 to users of that module.")
531 ;; The software is mainly ISC, but includes some files covered
532 ;; by the Expat license.
533 (license (list license:isc license:expat))))
534
535 (define-public python2-netcdf4
536 (package-with-python2 python-netcdf4))
537
538 (define-public python-lockfile
539 (package
540 (name "python-lockfile")
541 (version "0.12.2")
542 (source
543 (origin
544 (method url-fetch)
545 (uri (pypi-uri "lockfile" version))
546 (sha256
547 (base32
548 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
549 (build-system python-build-system)
550 (arguments '(#:test-target "check"))
551 (native-inputs
552 `(("python-pbr" ,python-pbr)))
553 (home-page "https://launchpad.net/pylockfile")
554 (synopsis "Platform-independent file locking module")
555 (description
556 "The lockfile package exports a LockFile class which provides a simple
557 API for locking files.")
558 (license license:expat)))
559
560 (define-public python2-lockfile
561 (package-with-python2 python-lockfile))
562
563 (define-public python-semantic-version
564 (package
565 (name "python-semantic-version")
566 (version "2.6.0")
567 (source
568 (origin
569 (method url-fetch)
570 (uri (pypi-uri "semantic_version" version))
571 (sha256
572 (base32
573 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
574 (build-system python-build-system)
575 (arguments
576 `(#:tests? #f)) ; PyPI tarball lacks tests
577 (home-page "https://github.com/rbarrois/python-semanticversion")
578 (synopsis "Semantic versioning module for Python")
579 (description
580 "The @code{semantic_version} class is a small library for handling
581 @uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
582
583 It can compare versions, generate a new version that represents a bump in one of
584 the version levels, and check whether any given string is a proper semantic
585 version identifier.")
586 (license license:bsd-3)))
587
588 (define-public python2-semantic-version
589 (package-with-python2 python-semantic-version))
590
591 (define-public python-serpent
592 (package
593 (name "python-serpent")
594 (version "1.27")
595 (source
596 (origin
597 (method url-fetch)
598 (uri (pypi-uri "serpent" version))
599 (sha256
600 (base32
601 "04p9dsrm5pv8vhk3flvih55kgvlzpi38hlaykdiakddmgwqw93bg"))))
602 (build-system python-build-system)
603 (home-page "https://github.com/irmen/Serpent")
604 (synopsis "Serializer for literal Python expressions")
605 (description
606 "Serpent provides ast.literal_eval() compatible object tree
607 serialization. It serializes an object tree into bytes (utf-8 encoded string)
608 that can be decoded and then passed as-is to ast.literal_eval() to rebuild it
609 as the original object tree. As such it is safe to send serpent data to other
610 machines over the network for instance (because only safe literals are
611 encoded).")
612 (license license:expat)))
613
614 (define-public python-setuptools
615 (package
616 (name "python-setuptools")
617 (version "40.0.0")
618 (source
619 (origin
620 (method url-fetch)
621 (uri (pypi-uri "setuptools" version ".zip"))
622 (sha256
623 (base32
624 "0pq116lr14gnc62v76nk0npkm6krb2mpp7p9ab369zgv4n7dnah1"))
625 (modules '((guix build utils)))
626 (snippet
627 '(begin
628 ;; Remove included binaries which are used to build self-extracting
629 ;; installers for Windows.
630 ;; TODO: Find some way to build them ourself so we can include them.
631 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
632 #t))))
633 (build-system python-build-system)
634 ;; FIXME: Tests require pytest, which itself relies on setuptools.
635 ;; One could bootstrap with an internal untested setuptools.
636 (arguments
637 `(#:tests? #f))
638 (home-page "https://pypi.python.org/pypi/setuptools")
639 (synopsis
640 "Library designed to facilitate packaging Python projects")
641 (description
642 "Setuptools is a fully-featured, stable library designed to facilitate
643 packaging Python projects, where packaging includes:
644 Python package and module definitions,
645 distribution package metadata,
646 test hooks,
647 project installation,
648 platform-specific details,
649 Python 3 support.")
650 ;; TODO: setuptools now bundles the following libraries:
651 ;; packaging, pyparsing, six and appdirs. How to unbundle?
652 (license (list license:psfl ; setuptools itself
653 license:expat ; six, appdirs, pyparsing
654 license:asl2.0 ; packaging is dual ASL2/BSD-2
655 license:bsd-2))))
656
657 (define-public python2-setuptools
658 (package-with-python2 python-setuptools))
659
660 (define-public python-uniseg
661 (package
662 (name "python-uniseg")
663 (version "0.7.1")
664 (source
665 (origin
666 (method url-fetch)
667 (uri (pypi-uri "uniseg" version ".zip"))
668 (sha256
669 (base32
670 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
671 (build-system python-build-system)
672 (arguments
673 '(#:tests? #f)) ; The test suite requires network access.
674 (native-inputs
675 `(("unzip" ,unzip)))
676 (home-page
677 "https://bitbucket.org/emptypage/uniseg-python")
678 (synopsis
679 "Python library to determine Unicode text segmentations")
680 (description
681 "Uniseg is a Python package used to determine Unicode text segmentations.
682 Supported segmentations include:
683 @enumerate
684 @item @dfn{Code point} (any value in the Unicode codespace)
685 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
686 multiple Unicode code points, e.g. \"G\" + acute-accent)
687 @item Word break
688 @item Sentence break
689 @item Line break
690 @end enumerate")
691 (license license:expat)))
692
693 (define-public python2-uniseg
694 (package-with-python2 python-uniseg))
695
696 (define-public python-humanfriendly
697 (package
698 (name "python-humanfriendly")
699 (version "4.4.1")
700 (source
701 (origin
702 (method url-fetch)
703 (uri (pypi-uri "humanfriendly" version))
704 (sha256
705 (base32
706 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
707 (build-system python-build-system)
708 (arguments
709 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
710 #:tests? #f))
711 (propagated-inputs
712 `(("python-monotonic" ,python-monotonic)))
713 (home-page "https://humanfriendly.readthedocs.io")
714 (synopsis "Human-friendly input and output in Python")
715 (description
716 "The functions and classes in @code{humanfriendly} can be used to make
717 text interfaces more user-friendly. It includes tools to parse and format
718 numbers, file sizes, and timespans, timers for long-running operations, menus
719 to allow the user to choose from a list of options, and terminal interaction
720 helpers.")
721 (license license:expat)))
722
723 (define-public python2-humanfriendly
724 (package-with-python2 python-humanfriendly))
725
726 (define-public python-capturer
727 (package
728 (name "python-capturer")
729 (version "2.4")
730 (source
731 (origin
732 (method url-fetch)
733 (uri (pypi-uri "capturer" version))
734 (sha256
735 (base32
736 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
737 (build-system python-build-system)
738 (arguments
739 `(#:tests? #f))
740 (propagated-inputs
741 `(("python-humanfriendly" ,python-humanfriendly)))
742 (home-page "https://capturer.readthedocs.io")
743 (synopsis "Capture stdout and stderr streams of the current process")
744 (description
745 "The capturer package makes it easy to capture the stdout and stderr
746 streams of the current process and subprocesses. Output can be relayed
747 to the terminal in real time but is also available to the Python program
748 for additional processing.")
749 (license license:expat)))
750
751 (define-public python2-capturer
752 (package-with-python2 python-capturer))
753
754 (define-public python-case
755 (package
756 (name "python-case")
757 (version "1.5.3")
758 (source
759 (origin
760 (method url-fetch)
761 (uri (pypi-uri "case" version))
762 (sha256
763 (base32
764 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
765 (build-system python-build-system)
766 (propagated-inputs
767 `(("python-mock" ,python-mock)
768 ("python-nose" ,python-nose)
769 ("python-six" ,python-six)
770 ("python-unittest2" ,python-unittest2)))
771 (native-inputs
772 `(("python-coverage" ,python-coverage)))
773 (home-page "https://github.com/celery/case")
774 (synopsis "Unittest utilities and convenience methods")
775 (description
776 "The @code{case} package provides utilities on top of unittest, including
777 some helpful Python 2 compatibility convenience methods.")
778 (license license:bsd-3)))
779
780 (define-public python-verboselogs
781 (package
782 (name "python-verboselogs")
783 (version "1.7")
784 (source
785 (origin
786 (method url-fetch)
787 (uri (pypi-uri "verboselogs" version))
788 (sha256
789 (base32
790 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
791 (build-system python-build-system)
792 (native-inputs
793 `(("python-mock" ,python-mock)
794 ("python-astroid" ,python-astroid)
795 ("python-pylint" ,python-pylint)))
796 (home-page "https://verboselogs.readthedocs.io")
797 (synopsis "Verbose logging level for Python's logging module")
798 (description
799 "The @code{verboselogs} package extends Python's @code{logging} module to
800 add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
801 (license license:expat)))
802
803 (define-public python2-verboselogs
804 (package-with-python2 python-verboselogs))
805
806 (define-public python-coloredlogs
807 (package
808 (name "python-coloredlogs")
809 (version "7.3")
810 (source
811 (origin
812 (method url-fetch)
813 (uri (pypi-uri "coloredlogs" version))
814 (sha256
815 (base32
816 "1blcann6dyg5dhps9pg12rn0q0rjrlajpmmil0gy0j4cbvnl2il9"))))
817 (build-system python-build-system)
818 (arguments
819 `(;Tests require some updated modules
820 #:tests? #f))
821 (propagated-inputs
822 `(("python-capturer" ,python-capturer)))
823 (home-page "https://coloredlogs.readthedocs.io")
824 (synopsis "Colored stream handler for Python's logging module")
825 (description
826 "The @code{coloredlogs} package enables colored terminal output for
827 Python's logging module. The @code{ColoredFormatter} class inherits from
828 @code{logging.Formatter} and uses ANSI escape sequences to render your logging
829 messages in color.")
830 (license license:expat)))
831
832 (define-public python2-coloredlogs
833 (package-with-python2 python-coloredlogs))
834
835 (define-public python-eventlet
836 (package
837 (name "python-eventlet")
838 (version "0.20.1")
839 (source
840 (origin
841 (method url-fetch)
842 (uri (pypi-uri "eventlet" version))
843 (sha256
844 (base32
845 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
846 (build-system python-build-system)
847 (propagated-inputs
848 `(("python-greenlet" ,python-greenlet)))
849 (arguments
850 ;; TODO: Requires unpackaged 'enum-compat'.
851 '(#:tests? #f))
852 (home-page "http://eventlet.net")
853 (synopsis "Concurrent networking library for Python")
854 (description
855 "Eventlet is a concurrent networking library for Python that
856 allows you to change how you run your code, not how you write it.
857 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
858 Coroutines ensure that the developer uses a blocking style of programming
859 that is similar to threading, but provide the benefits of non-blocking I/O.
860 The event dispatch is implicit, which means you can easily use @code{Eventlet}
861 from the Python interpreter, or as a small part of a larger application.")
862 (license license:expat)))
863
864 (define-public python2-eventlet
865 (let ((base (package-with-python2
866 (strip-python2-variant python-eventlet))))
867 (package (inherit base)
868 (propagated-inputs
869 `(("python2-enum34" ,python2-enum34)
870 ,@(package-propagated-inputs base))))))
871
872 (define-public python-six
873 (package
874 (name "python-six")
875 (version "1.11.0")
876 (source
877 (origin
878 (method url-fetch)
879 (uri (pypi-uri "six" version))
880 (sha256
881 (base32
882 "1scqzwc51c875z23phj48gircqjgnn3af8zy2izjwmnlxrxsgs3h"))))
883 (build-system python-build-system)
884 (arguments
885 `(#:phases
886 (modify-phases %standard-phases
887 (replace 'check
888 (lambda _
889 (invoke "py.test" "-v"))))))
890 (native-inputs
891 `(("python-py" ,python-py)
892 ("python-pytest" ,python-pytest-bootstrap)))
893 (home-page "https://pypi.python.org/pypi/six/")
894 (synopsis "Python 2 and 3 compatibility utilities")
895 (description
896 "Six is a Python 2 and 3 compatibility library. It provides utility
897 functions for smoothing over the differences between the Python versions with
898 the goal of writing Python code that is compatible on both Python versions.
899 Six supports every Python version since 2.5. It is contained in only one
900 Python file, so it can be easily copied into your project.")
901 (license license:x11)))
902
903 (define-public python2-six
904 (package-with-python2 python-six))
905
906 (define-public python-six-bootstrap
907 (package
908 (inherit python-six)
909 (name "python-six-bootstrap")
910 (native-inputs `())
911 (arguments `(#:tests? #f))))
912
913 (define-public python2-six-bootstrap
914 (package-with-python2 python-six-bootstrap))
915
916 (define-public python-schedule
917 (package
918 (name "python-schedule")
919 (version "0.4.3")
920 (source
921 (origin
922 (method url-fetch)
923 (uri (pypi-uri "schedule" version))
924 (sha256
925 (base32
926 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
927 (build-system python-build-system)
928 (native-inputs
929 `(("python-pytest" ,python-pytest)
930 ("python-mock" ,python-mock)))
931 (home-page "https://github.com/dbader/schedule")
932 (synopsis "Schedule periodic function calls in Python")
933 (description
934 "Schedule is an in-process scheduler for periodic jobs that uses the
935 builder pattern for configuration. Schedule lets you run Python functions (or
936 any other callable) periodically at pre-determined intervals using a simple,
937 human-friendly syntax.")
938 (license license:expat)))
939
940 (define-public python2-schedule
941 (package-with-python2 python-schedule))
942
943 (define-public python-pandas
944 (package
945 (name "python-pandas")
946 (version "0.23.4")
947 (source
948 (origin
949 (method url-fetch)
950 (uri (pypi-uri "pandas" version))
951 (sha256
952 (base32 "1x54pd7hr3y7qahx6b5bf2wzj54xvl8r3s1h4pl254pnmi3wl92v"))))
953 (build-system python-build-system)
954 (arguments
955 `(#:modules ((guix build utils)
956 (guix build python-build-system)
957 (ice-9 ftw)
958 (srfi srfi-26))
959 #:phases (modify-phases %standard-phases
960 (replace 'check
961 (lambda _
962 (let ((build-directory
963 (string-append
964 (getcwd) "/build/"
965 (car (scandir "build"
966 (cut string-prefix? "lib." <>))))))
967 ;; Disable the "strict data files" option which causes
968 ;; the build to error out if required data files are not
969 ;; available (as is the case with PyPI archives).
970 (substitute* "setup.cfg"
971 (("addopts = --strict-data-files") "addopts = "))
972 (with-directory-excursion build-directory
973 ;; Delete tests that require "moto" which is not yet in Guix.
974 (for-each delete-file
975 '("pandas/tests/io/conftest.py"
976 "pandas/tests/io/json/test_compression.py"
977 "pandas/tests/io/parser/test_network.py"
978 "pandas/tests/io/test_excel.py"
979 "pandas/tests/io/test_parquet.py"))
980 (invoke "pytest" "-vv" "pandas" "--skip-slow"
981 "--skip-network" "-k"
982 ;; XXX: Due to the deleted tests above.
983 "not test_read_s3_jsonl"))))))))
984 (propagated-inputs
985 `(("python-numpy" ,python-numpy)
986 ("python-pytz" ,python-pytz)
987 ("python-dateutil" ,python-dateutil)))
988 (native-inputs
989 `(("python-cython" ,python-cython)
990 ("python-beautifulsoup4" ,python-beautifulsoup4)
991 ("python-lxml" ,python-lxml)
992 ("python-html5lib" ,python-html5lib)
993 ("python-nose" ,python-nose)
994 ("python-pytest" ,python-pytest)))
995 (home-page "https://pandas.pydata.org")
996 (synopsis "Data structures for data analysis, time series, and statistics")
997 (description
998 "Pandas is a Python package providing fast, flexible, and expressive data
999 structures designed to make working with structured (tabular,
1000 multidimensional, potentially heterogeneous) and time series data both easy
1001 and intuitive. It aims to be the fundamental high-level building block for
1002 doing practical, real world data analysis in Python.")
1003 (license license:bsd-3)))
1004
1005 (define-public python2-pandas
1006 (package-with-python2 python-pandas))
1007
1008 (define-public python2-mechanize
1009 (package
1010 (name "python2-mechanize")
1011 (version "0.2.5")
1012 (source
1013 (origin
1014 (method url-fetch)
1015 (uri (pypi-uri "mechanize" version))
1016 (sha256
1017 (base32
1018 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1019 (build-system python-build-system)
1020 (arguments
1021 `(#:python ,python-2 ; apparently incompatible with Python 3
1022 #:tests? #f))
1023 ;; test fails with message
1024 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1025 ;; (python-3.3.2) or
1026 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1027 ;; (python-2.7.5).
1028 ;; The source code is from March 2011 and probably not up-to-date
1029 ;; with respect to python unit tests.
1030 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1031 (synopsis
1032 "Stateful programmatic web browsing in Python")
1033 (description
1034 "Mechanize implements stateful programmatic web browsing in Python,
1035 after Andy Lester’s Perl module WWW::Mechanize.")
1036 (license (license:non-copyleft
1037 "file://COPYING"
1038 "See COPYING in the distribution."))))
1039
1040
1041 (define-public python-simplejson
1042 (package
1043 (name "python-simplejson")
1044 (version "3.14.0")
1045 (source
1046 (origin
1047 (method url-fetch)
1048 (uri (pypi-uri "simplejson" version))
1049 (sha256
1050 (base32
1051 "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy"))))
1052 (build-system python-build-system)
1053 (home-page "http://simplejson.readthedocs.org/en/latest/")
1054 (synopsis
1055 "Json library for Python")
1056 (description
1057 "JSON (JavaScript Object Notation) is a subset of JavaScript
1058 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1059 format.
1060
1061 Simplejson exposes an API familiar to users of the standard library marshal
1062 and pickle modules. It is the externally maintained version of the json
1063 library contained in Python 2.6, but maintains compatibility with Python 2.5
1064 and (currently) has significant performance advantages, even without using
1065 the optional C extension for speedups. Simplejson is also supported on
1066 Python 3.3+.")
1067 (license license:x11)))
1068
1069 (define-public python2-simplejson
1070 (package-with-python2 python-simplejson))
1071
1072
1073 (define-public python-pyicu
1074 (package
1075 (name "python-pyicu")
1076 (version "2.2")
1077 (source
1078 (origin
1079 (method url-fetch)
1080 (uri (pypi-uri "PyICU" version))
1081 (sha256
1082 (base32
1083 "0wq9y5fi1ighgf5aws9nr87vi1w44p7q1k83rx2y3qj5d2xyhspa"))))
1084 (build-system python-build-system)
1085 (inputs
1086 `(("icu4c" ,icu4c)))
1087 (native-inputs
1088 `(("python-pytest" ,python-pytest)
1089 ("python-six" ,python-six)))
1090 (home-page "https://github.com/ovalhub/pyicu")
1091 (synopsis "Python extension wrapping the ICU C++ API")
1092 (description
1093 "PyICU is a python extension wrapping the ICU C++ API.")
1094 (properties `((python2-variant . ,(delay python2-pyicu))))
1095 (license license:x11)))
1096
1097 (define-public python2-pyicu
1098 (let ((base (package-with-python2
1099 (strip-python2-variant python-pyicu))))
1100 (package
1101 (inherit base)
1102 (arguments
1103 `(,@(package-arguments base)
1104 #:phases
1105 (modify-phases %standard-phases
1106 (add-before 'check 'delete-failing-test
1107 (λ _
1108 ;; XXX: This fails due to Unicode issues unique to Python 2,
1109 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1110 (delete-file "test/test_Script.py")
1111 #t))))))))
1112
1113 (define-public python2-dogtail
1114 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1115 ;; spaces in indentation" with Python 3.
1116 (package
1117 (name "python2-dogtail")
1118 (version "0.9.9")
1119 (source (origin
1120 (method url-fetch)
1121 (uri (pypi-uri "dogtail" version))
1122 (sha256
1123 (base32
1124 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1125 (build-system python-build-system)
1126 (arguments `(#:python ,python-2
1127 #:tests? #f)) ; invalid command "test"
1128 ;; Currently no offical homepage.
1129 (home-page "https://pypi.python.org/pypi/dogtail/")
1130 (synopsis "GUI test tool and automation framework written in Python")
1131 (description
1132 "Dogtail is a GUI test tool and automation framework written in Python.
1133 It uses Accessibility (a11y) technologies to communicate with desktop
1134 applications. dogtail scripts are written in Python and executed like any
1135 other Python program.")
1136 (license license:gpl2+)))
1137
1138 (define-public python-empy
1139 (package
1140 (name "python-empy")
1141 (version "3.3")
1142 (source (origin
1143 (method url-fetch)
1144 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1145 version ".tar.gz"))
1146 (sha256
1147 (base32
1148 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1149 (build-system python-build-system)
1150 (arguments
1151 `(#:tests? #f)) ;python2 only
1152 (home-page "http://www.alcyone.com/software/empy/")
1153 (synopsis "Templating system for Python")
1154 (description
1155 "EmPy is a system for embedding Python expressions and statements in
1156 template text; it takes an EmPy source file, processes it, and produces
1157 output. This is accomplished via expansions, which are special signals to the
1158 EmPy system and are set off by a special prefix (by default the at sign, @@).
1159 EmPy can expand arbitrary Python expressions and statements in this way, as
1160 well as a variety of special forms. Textual data not explicitly delimited in
1161 this way is sent unaffected to the output, allowing Python to be used in
1162 effect as a markup language. Also supported are callbacks via hooks,
1163 recording and playback via diversions, and dynamic, chainable filters. The
1164 system is highly configurable via command line options and embedded
1165 commands.")
1166 (license license:lgpl2.1+)))
1167
1168 (define-public python2-empy
1169 (package-with-python2 python-empy))
1170
1171 (define-public python2-element-tree
1172 (package
1173 (name "python2-element-tree")
1174 (version "1.2.6")
1175 (source (origin
1176 (method url-fetch)
1177 (uri (string-append
1178 "http://effbot.org/media/downloads/elementtree-"
1179 version "-20050316.tar.gz"))
1180 (sha256
1181 (base32
1182 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1183 (build-system python-build-system)
1184 (arguments
1185 `(#:python ,python-2 ; seems to be part of Python 3
1186 #:tests? #f)) ; no 'test' sub-command
1187 (synopsis "Toolkit for XML processing in Python")
1188 (description
1189 "ElementTree is a Python library supporting lightweight XML processing.")
1190 (home-page "http://effbot.org/zone/element-index.htm")
1191 (license (license:x11-style
1192 "http://docs.python.org/2/license.html"
1193 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1194
1195 (define-public python2-pybugz
1196 (package
1197 (name "python2-pybugz")
1198 (version "0.6.11")
1199 (source (origin
1200 (method url-fetch)
1201 (uri (string-append
1202 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1203 version ".tar.gz"))
1204 (sha256
1205 (base32
1206 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1207 (patches (search-patches "pybugz-stty.patch"
1208 "pybugz-encode-error.patch"))))
1209 (build-system python-build-system)
1210 (arguments
1211 `(#:python ,python-2 ; SyntaxError with Python 3
1212 #:tests? #f)) ; no 'test' sub-command
1213 (propagated-inputs
1214 `(("element-tree" ,python2-element-tree)))
1215 (synopsis "Python and command-line interface to Bugzilla")
1216 (description
1217 "PyBugz is a Python library and command-line tool to query the Bugzilla
1218 bug tracking system. It is meant as an aid to speed up interaction with the
1219 bug tracker.")
1220 (home-page "http://www.liquidx.net/pybugz/")
1221 (license license:gpl2)))
1222
1223 (define-public python2-enum
1224 (package
1225 (name "python2-enum")
1226 (version "0.4.6")
1227 (source (origin
1228 (method url-fetch)
1229 (uri (pypi-uri "enum" version))
1230 (sha256
1231 (base32
1232 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1233 (build-system python-build-system)
1234 (arguments
1235 `(#:python ,python-2))
1236 (home-page "http://pypi.python.org/pypi/enum/")
1237 (synopsis "Robust enumerated type support in Python")
1238 (description
1239 "This provides a module for robust enumerations in Python. It has
1240 been superseded by the Python standard library and is provided only for
1241 compatibility.")
1242 ;; Choice of either license.
1243 (license (list license:gpl3+ license:psfl))))
1244
1245 (define-public python-enum34
1246 (package
1247 (name "python-enum34")
1248 (version "1.1.6")
1249 (source
1250 (origin
1251 (method url-fetch)
1252 (uri (pypi-uri "enum34" version))
1253 (sha256
1254 (base32
1255 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1256 (build-system python-build-system)
1257 (home-page "https://pypi.python.org/pypi/enum34")
1258 (synopsis "Backported Python 3.4 Enum")
1259 (description
1260 "Enum34 is the new Python stdlib enum module available in Python 3.4
1261 backported for previous versions of Python from 2.4 to 3.3.")
1262 (license license:bsd-3)))
1263
1264 (define-public python2-enum34
1265 (package-with-python2 python-enum34))
1266
1267 (define-public python-parse-type
1268 (package
1269 (name "python-parse-type")
1270 (version "0.4.2")
1271 (source
1272 (origin
1273 (method url-fetch)
1274 (uri (pypi-uri "parse_type" version))
1275 (sha256
1276 (base32
1277 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1278 (build-system python-build-system)
1279 (propagated-inputs
1280 `(("python-six" ,python-six)
1281 ("python-parse" ,python-parse)))
1282 (native-inputs
1283 `(("python-pytest" ,python-pytest)
1284 ("python-pytest-runner" ,python-pytest-runner)))
1285 (home-page "https://github.com/jenisys/parse_type")
1286 (synopsis "Extended parse module")
1287 (description
1288 "Parse_type extends the python parse module.")
1289 (properties
1290 `((python2-variant . ,(delay python2-parse-type))))
1291 (license license:bsd-3)))
1292
1293 (define-public python2-parse-type
1294 (let ((base (package-with-python2
1295 (strip-python2-variant python-parse-type))))
1296 (package (inherit base)
1297 (propagated-inputs
1298 `(("python2-enum34" ,python2-enum34)
1299 ,@(package-propagated-inputs base))))))
1300
1301 (define-public python-parse
1302 (package
1303 (name "python-parse")
1304 (version "1.8.4")
1305 (source
1306 (origin
1307 (method url-fetch)
1308 (uri (pypi-uri "parse" version))
1309 (sha256
1310 (base32
1311 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
1312 (build-system python-build-system)
1313 (arguments
1314 `(#:phases
1315 (modify-phases %standard-phases
1316 (replace 'check
1317 (lambda _ (invoke "python" "test_parse.py"))))))
1318 (home-page "https://github.com/r1chardj0n3s/parse")
1319 (synopsis "Parse strings")
1320 (description
1321 "Parse strings using a specification based on the Python @code{format()}
1322 syntax.")
1323 (license license:x11)))
1324
1325 (define-public python-polib
1326 (package
1327 (name "python-polib")
1328 (version "1.0.8")
1329 (source (origin
1330 (method url-fetch)
1331 (uri (pypi-uri "polib" version))
1332 (sha256
1333 (base32
1334 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1335 (build-system python-build-system)
1336 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1337 (synopsis "Manipulate, create and modify gettext files")
1338 (description "Polib can manipulate any gettext format (po, pot and mo)
1339 files. It can be used to create po files from scratch or to modify
1340 existing ones.")
1341 (license license:expat)))
1342
1343 (define-public python2-polib
1344 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1345 (package
1346 (inherit base)
1347 (arguments `(,@(package-arguments base)
1348 ;; Tests don't work with python2.
1349 #:tests? #f)))))
1350
1351 (define-public scons
1352 (package
1353 (name "scons")
1354 (version "3.0.3")
1355 (source (origin
1356 (method git-fetch)
1357 (uri (git-reference
1358 (url "https://github.com/SCons/scons.git")
1359 (commit version)))
1360 (file-name (git-file-name name version))
1361 (sha256
1362 (base32
1363 "1xizkjgrvydkjhpv7i5rx0mdkp3618sis7jsckjh57nxcynlk5dc"))))
1364 (build-system python-build-system)
1365 (arguments
1366 `(#:use-setuptools? #f ; still relies on distutils
1367 #:tests? #f ; no 'python setup.py test' command
1368 #:phases
1369 (modify-phases %standard-phases
1370 (add-before 'build 'bootstrap
1371 (lambda _
1372 (substitute* "src/engine/SCons/compat/__init__.py"
1373 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
1374 "sys.modules[new] = __import__(old)"))
1375 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
1376 (chdir "build/scons")
1377 #t)))))
1378 (home-page "http://scons.org/")
1379 (synopsis "Software construction tool written in Python")
1380 (description
1381 "SCons is a software construction tool. Think of SCons as an improved,
1382 cross-platform substitute for the classic Make utility with integrated
1383 functionality similar to autoconf/automake and compiler caches such as ccache.
1384 In short, SCons is an easier, more reliable and faster way to build
1385 software.")
1386 (license license:x11)))
1387
1388 (define-public scons-python2
1389 (package
1390 (inherit (package-with-python2 scons))
1391 (name "scons-python2")))
1392
1393 (define-public python-extras
1394 (package
1395 (name "python-extras")
1396 (version "1.0.0")
1397 (source
1398 (origin
1399 (method url-fetch)
1400 (uri (pypi-uri "extras" version))
1401 (sha256
1402 (base32
1403 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1404 (build-system python-build-system)
1405 (arguments
1406 ;; FIXME: Circular dependency on testtools.
1407 '(#:tests? #f))
1408 (home-page "https://github.com/testing-cabal/extras")
1409 (synopsis "Useful extensions to the Python standard library")
1410 (description
1411 "Extras is a set of extensions to the Python standard library.")
1412 (license license:expat)))
1413
1414 (define-public python2-extras
1415 (package-with-python2 python-extras))
1416
1417 (define-public python-mimeparse
1418 (package
1419 (name "python-mimeparse")
1420 (version "1.6.0")
1421 (source
1422 (origin
1423 (method url-fetch)
1424 (uri (pypi-uri "python-mimeparse" version))
1425 (sha256
1426 (base32
1427 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
1428 (build-system python-build-system)
1429 (arguments
1430 '(#:phases
1431 (modify-phases %standard-phases
1432 (replace 'check
1433 (lambda _
1434 (invoke "./mimeparse_test.py"))))))
1435 (home-page
1436 "https://github.com/dbtsai/python-mimeparse")
1437 (synopsis "Python library for parsing MIME types")
1438 (description
1439 "Mimeparse provides basic functions for parsing MIME type names and
1440 matching them against a list of media-ranges.")
1441 (license license:expat)))
1442
1443 (define-public python2-mimeparse
1444 (package-with-python2 python-mimeparse))
1445
1446 (define-public python-miniboa
1447 (package
1448 (name "python-miniboa")
1449 (version "1.0.7")
1450 (source
1451 (origin
1452 (method url-fetch)
1453 (uri (pypi-uri "miniboa" version))
1454 (sha256
1455 (base32
1456 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
1457 (build-system python-build-system)
1458 (home-page "https://github.com/shmup/miniboa")
1459 (synopsis "Simple, single-threaded Telnet server")
1460 (description
1461 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
1462 server.")
1463 (license license:asl2.0)))
1464
1465 (define-public python2-miniboa
1466 (package-with-python2 python-miniboa))
1467
1468 (define-public python-pafy
1469 (package
1470 (name "python-pafy")
1471 (version "0.5.3.1")
1472 (source
1473 (origin
1474 (method url-fetch)
1475 (uri (pypi-uri "pafy" version))
1476 (sha256
1477 (base32
1478 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1479 (build-system python-build-system)
1480 (arguments
1481 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1482 (propagated-inputs
1483 ;; Youtube-dl is a python package which is imported in the file
1484 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1485 `(("youtube-dl" ,youtube-dl)))
1486 (home-page "https://np1.github.io/pafy/")
1487 (synopsis "Retrieve YouTube content and metadata")
1488 (description
1489 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1490 (license license:lgpl3+)))
1491
1492 (define-public python2-funcsigs
1493 (package
1494 (name "python2-funcsigs")
1495 (version "1.0.2")
1496 (source (origin
1497 (method url-fetch)
1498 (uri (pypi-uri "funcsigs" version))
1499 (sha256
1500 (base32
1501 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1502 (build-system python-build-system)
1503 (arguments
1504 `(#:python ,python-2))
1505 (native-inputs
1506 `(("python2-unittest2" ,python2-unittest2)))
1507 (home-page "http://funcsigs.readthedocs.org")
1508 (synopsis "Python function signatures from PEP362")
1509 (description
1510 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1511 (license license:asl2.0)))
1512
1513 (define-public python2-funcsigs-bootstrap
1514 (package
1515 (inherit python2-funcsigs)
1516 (name "python2-funcsigs-bootstrap")
1517 (native-inputs `())
1518 (arguments
1519 `(#:tests? #f
1520 ,@(package-arguments python2-funcsigs)))))
1521
1522 (define-public python-py
1523 (package
1524 (name "python-py")
1525 (version "1.5.4")
1526 (source
1527 (origin
1528 (method url-fetch)
1529 (uri (pypi-uri "py" version))
1530 (sha256
1531 (base32
1532 "1xxvwfn82457djf55f5n2c94699rfqnk43br8fif2r2q8gvrmm9z"))))
1533 (build-system python-build-system)
1534 (arguments
1535 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1536 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1537 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1538 ;; Is this module globally installed?"
1539 '(#:tests? #f))
1540 (native-inputs
1541 `(("python-setuptools-scm" ,python-setuptools-scm)))
1542 (home-page "https://github.com/pytest-dev/py")
1543 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1544 (description
1545 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1546 code introspection, and logging.")
1547 (license license:expat)))
1548
1549 (define-public python2-py
1550 (package-with-python2 python-py))
1551
1552 ;; Recent versions of python-fixtures and python-testrepository need
1553 ;; python-pbr for packaging, which itself needs these two packages for
1554 ;; testing.
1555 ;; To fix this circular dependency, we use a build of python-pbr, based on the
1556 ;; same source, just without any test dependencies and with tests disabled.
1557 ;; python-pbr-minmal is then used to package python-fixtures and
1558 ;; python-testrepository.
1559 ;; Strictly speaking we currently could remove the test-requirements from the
1560 ;; normal python-pbr package (and save this package) since test are disabled
1561 ;; there anyway. But this may change in future.
1562 (define-public python-pbr-minimal
1563 (package
1564 (name "python-pbr-minimal")
1565 (version "3.0.1")
1566 (source
1567 (origin
1568 (method url-fetch)
1569 (uri (pypi-uri "pbr" version))
1570 (sha256
1571 (base32
1572 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
1573 (build-system python-build-system)
1574 (arguments
1575 `(#:tests? #f))
1576 (home-page "http://docs.openstack.org/developer/pbr/")
1577 (synopsis "Minimal build of python-pbr used for bootstrapping")
1578 (description
1579 "Used only for bootstrapping python2-pbr, you should not need this.")
1580 (license license:asl2.0)))
1581
1582 (define-public python2-pbr-minimal
1583 (package-with-python2 python-pbr-minimal))
1584
1585 (define-public python-pbr
1586 (package
1587 (inherit python-pbr-minimal)
1588 (name "python-pbr")
1589 (arguments
1590 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1591 (propagated-inputs
1592 `(("git" ,git))) ;; pbr actually uses the "git" binary.
1593 (native-inputs
1594 `(("python-fixtures" ,python-fixtures-bootstrap)
1595 ;; discover, coverage, hacking, subunit
1596 ("python-mock" ,python-mock)
1597 ("python-six" ,python-six)
1598 ("python-sphinx" ,python-sphinx)
1599 ("python-testrepository" ,python-testrepository-bootstrap)
1600 ("python-testresources" ,python-testresources-bootstrap)
1601 ("python-testscenarios" ,python-testscenarios-bootstrap)
1602 ("python-testtools" ,python-testtools-bootstrap)
1603 ("python-virtualenv" ,python-virtualenv)))
1604 (synopsis "Enhance the default behavior of Python’s setuptools")
1605 (description
1606 "Python Build Reasonableness (PBR) is a library that injects some useful
1607 and sensible default behaviors into your setuptools run. It will set
1608 versions, process requirements files and generate AUTHORS and ChangeLog file
1609 from git information.
1610 ")))
1611
1612 (define-public python2-pbr
1613 (package-with-python2 python-pbr))
1614
1615 (define-public python-exif-read
1616 (package
1617 (name "python-exif-read")
1618 (version "2.1.2")
1619 (source (origin
1620 (method url-fetch)
1621 (uri (pypi-uri "ExifRead" version))
1622 (sha256
1623 (base32
1624 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
1625 (build-system python-build-system)
1626 (arguments `(#:tests? #f)) ; no tests
1627 (home-page "https://github.com/ianare/exif-py")
1628 (synopsis "Python library to extract EXIF data from image files")
1629 (description
1630 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1631 files.")
1632 (license license:bsd-3)))
1633
1634 (define-public python2-exif-read
1635 (package-with-python2 python-exif-read))
1636
1637 (define-public python-pyld
1638 (package
1639 (name "python-pyld")
1640 (version "1.0.3")
1641 (source (origin
1642 (method url-fetch)
1643 (uri (pypi-uri "PyLD" version))
1644 (sha256
1645 (base32
1646 "12i2g6xdj30k7xxcibg3sc5y76snwq8l6n8fy9lyi577kgy0h2pm"))))
1647 (build-system python-build-system)
1648 (home-page "https://github.com/digitalbazaar/pyld")
1649 (synopsis "Python implementation of the JSON-LD specification")
1650 (description
1651 "PyLD is an implementation of the JSON-LD specification.")
1652 (license license:bsd-3)))
1653
1654 (define-public python2-pyld
1655 (package-with-python2 python-pyld))
1656
1657 (define-public python-click
1658 (package
1659 (name "python-click")
1660 (version "7.0")
1661 (source
1662 (origin
1663 (method url-fetch)
1664 (uri (pypi-uri "click" version))
1665 (sha256
1666 (base32
1667 "1mzjixd4vjbjvzb6vylki9w1556a9qmdh35kzmq6cign46av952v"))))
1668 (build-system python-build-system)
1669 (arguments
1670 `(#:phases
1671 (modify-phases %standard-phases
1672 (add-after 'unpack 'fix-paths
1673 (lambda* (#:key inputs #:allow-other-keys)
1674 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
1675 "cross-libc" "libc"))))
1676 (substitute* "click/_unicodefun.py"
1677 (("'locale'")
1678 (string-append "'" glibc "/bin/locale'"))))
1679 #t))
1680 (replace 'check
1681 (lambda _
1682 (invoke "python" "-m" "pytest"))))))
1683 (native-inputs
1684 `(("python-pytest" ,python-pytest)))
1685 (home-page "https://palletsprojects.com/p/click/")
1686 (synopsis "Command line library for Python")
1687 (description
1688 "Click is a Python package for creating command line interfaces in a
1689 composable way with as little code as necessary. Its name stands for
1690 \"Command Line Interface Creation Kit\". It's highly configurable but comes
1691 with sensible defaults out of the box.")
1692 (license license:bsd-3)))
1693
1694 (define-public python2-click
1695 (package-with-python2 python-click))
1696
1697 (define-public python-wheel
1698 (package
1699 (name "python-wheel")
1700 (version "0.32.3")
1701 (source
1702 (origin
1703 (method url-fetch)
1704 (uri (pypi-uri "wheel" version))
1705 (sha256
1706 (base32
1707 "1dhxl1bf18bx9szmqcnxbg6204hp3im8089q3hkwh5jfa6zh75q2"))))
1708 (build-system python-build-system)
1709 (native-inputs
1710 `(("python-jsonschema" ,python-jsonschema)
1711 ("python-pytest-cov" ,python-pytest-cov)))
1712 (home-page "https://bitbucket.org/pypa/wheel/")
1713 (synopsis "Format for built Python packages")
1714 (description
1715 "A wheel is a ZIP-format archive with a specially formatted filename and
1716 the @code{.whl} extension. It is designed to contain all the files for a PEP
1717 376 compatible install in a way that is very close to the on-disk format. Many
1718 packages will be properly installed with only the @code{Unpack} step and the
1719 unpacked archive preserves enough information to @code{Spread} (copy data and
1720 scripts to their final locations) at any later time. Wheel files can be
1721 installed with a newer @code{pip} or with wheel's own command line utility.")
1722 (license license:expat)
1723 (properties `((python2-variant . ,(delay python2-wheel))))))
1724
1725 (define-public python2-wheel
1726 (let ((wheel (package-with-python2
1727 (strip-python2-variant python-wheel))))
1728 (package (inherit wheel)
1729 (native-inputs `(("python2-functools32" ,python2-functools32)
1730 ,@(package-native-inputs wheel))))))
1731
1732 (define-public python-vcversioner
1733 (package
1734 (name "python-vcversioner")
1735 (version "2.16.0.0")
1736 (source
1737 (origin
1738 (method url-fetch)
1739 (uri (pypi-uri "vcversioner" version))
1740 (sha256
1741 (base32
1742 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
1743 (build-system python-build-system)
1744 (synopsis "Python library for version number discovery")
1745 (description "Vcversioner is a Python library that inspects tagging
1746 information in a variety of version control systems in order to discover
1747 version numbers.")
1748 (home-page "https://github.com/habnabit/vcversioner")
1749 (license license:isc)))
1750
1751 (define-public python2-vcversioner
1752 (package-with-python2 python-vcversioner))
1753
1754 (define-public python-jsonschema
1755 (package
1756 (name "python-jsonschema")
1757 (version "2.6.0")
1758 (source (origin
1759 (method url-fetch)
1760 (uri (pypi-uri "jsonschema" version))
1761 (sha256
1762 (base32
1763 "00kf3zmpp9ya4sydffpifn0j0mzm342a2vzh82p6r0vh10cg7xbg"))))
1764 (build-system python-build-system)
1765 (arguments
1766 '(#:phases
1767 (modify-phases %standard-phases
1768 (replace 'check (lambda _ (invoke "nosetests"))))))
1769 (native-inputs
1770 `(("python-nose" ,python-nose)
1771 ("python-vcversioner" ,python-vcversioner)))
1772 (home-page "https://github.com/Julian/jsonschema")
1773 (synopsis "Implementation of JSON Schema for Python")
1774 (description
1775 "Jsonschema is an implementation of JSON Schema for Python.")
1776 (license license:expat)
1777 (properties `((python2-variant . ,(delay python2-jsonschema))))))
1778
1779 (define-public python2-jsonschema
1780 (let ((jsonschema (package-with-python2
1781 (strip-python2-variant python-jsonschema))))
1782 (package (inherit jsonschema)
1783 (native-inputs
1784 `(("python2-mock" ,python2-mock)
1785 ,@(package-native-inputs jsonschema)))
1786 (propagated-inputs
1787 `(("python2-functools32" ,python2-functools32))))))
1788
1789 (define-public python-schema
1790 (package
1791 (name "python-schema")
1792 (version "0.6.6")
1793 (source
1794 (origin
1795 (method url-fetch)
1796 (uri (pypi-uri "schema" version))
1797 (sha256
1798 (base32
1799 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
1800 (build-system python-build-system)
1801 (native-inputs
1802 `(("python-pytest" ,python-pytest)))
1803 (home-page "https://github.com/keleshev/schema")
1804 (synopsis "Simple data validation library")
1805 (description
1806 "@code{python-schema} is a library for validating Python data
1807 structures, such as those obtained from config-files, forms, external
1808 services or command-line parsing, converted from JSON/YAML (or
1809 something else) to Python data-types.")
1810 (license license:psfl)))
1811
1812 (define-public python2-schema
1813 (package-with-python2 python-schema))
1814
1815 (define-public python-schema-0.5
1816 (package (inherit python-schema)
1817 (version "0.5.0")
1818 (source
1819 (origin
1820 (method url-fetch)
1821 (uri (pypi-uri "schema" version))
1822 (sha256
1823 (base32
1824 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
1825
1826 (define-public python2-schema-0.5
1827 (package-with-python2 python-schema-0.5))
1828
1829 (define-public python-kitchen
1830 (package
1831 (name "python-kitchen")
1832 (version "1.2.5")
1833 (source
1834 (origin
1835 (method url-fetch)
1836 (uri (pypi-uri "kitchen" version))
1837 (sha256
1838 (base32
1839 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
1840 (build-system python-build-system)
1841 (propagated-inputs
1842 `(("python-chardet" ,python-chardet)))
1843 (home-page "https://github.com/fedora-infra/kitchen")
1844 (synopsis "Python API for snippets")
1845 (description "@code{kitchen} module provides a python API for all sorts of
1846 little useful snippets of code that everybody ends up writing for their projects
1847 but never seem big enough to build an independent release. Use kitchen and stop
1848 cutting and pasting that code over and over.")
1849 (license (list license:lgpl2.1+
1850 ;; subprocess.py, test_subprocess.py,
1851 ;; kitchen/pycompat25/defaultdict.py:
1852 license:psfl))))
1853
1854 (define-public python2-kitchen
1855 (package-with-python2 python-kitchen))
1856
1857 (define-public python-unidecode
1858 (package
1859 (name "python-unidecode")
1860 (version "1.0.23")
1861 (source (origin
1862 (method url-fetch)
1863 (uri (pypi-uri "Unidecode" version))
1864 (sha256
1865 (base32
1866 "1ysjbr3nqfqj97h8zyj3v9pya413vkv7a1mzml80w37xx15kb1cb"))))
1867 (build-system python-build-system)
1868 (home-page "https://pypi.python.org/pypi/Unidecode")
1869 (synopsis "ASCII transliterations of Unicode text")
1870 (description
1871 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
1872 useful when integrating with legacy code that doesn't support Unicode, or for
1873 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
1874 machine identifiers from human-readable Unicode strings that should still be
1875 somewhat intelligible.")
1876 (license license:gpl2+)))
1877
1878 (define-public python2-unidecode
1879 (package-with-python2 python-unidecode))
1880
1881 (define-public python-pyjwt
1882 (package
1883 (name "python-pyjwt")
1884 (version "1.5.3")
1885 (source
1886 (origin
1887 (method url-fetch)
1888 (uri (pypi-uri "PyJWT" version))
1889 (sha256
1890 (base32
1891 "1rxsg14i33vm2i6lz0my628108c81k43v10n4h3p0gx62xdyf2sh"))
1892 (modules '((guix build utils)))
1893 (snippet
1894 '(begin
1895 (for-each delete-file-recursively
1896 (find-files "." "\\.pyc$"))
1897 #t))))
1898 (build-system python-build-system)
1899 (native-inputs
1900 `(("python-pytest" ,python-pytest)
1901 ("python-pytest-cov" ,python-pytest-cov)
1902 ("python-pytest-runner" ,python-pytest-runner)))
1903 (home-page "https://github.com/progrium/pyjwt")
1904 (synopsis "JSON Web Token implementation in Python")
1905 (description
1906 "PyJWT is a JSON Web Token implementation written in Python.")
1907 (license license:expat)))
1908
1909 (define-public python2-pyjwt
1910 (package-with-python2 python-pyjwt))
1911
1912 (define-public python-pykka
1913 (package
1914 (name "python-pykka")
1915 (version "1.2.1")
1916 (source
1917 (origin
1918 (method url-fetch)
1919 (uri (pypi-uri "Pykka" version))
1920 (sha256
1921 (base32
1922 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
1923 (build-system python-build-system)
1924 (native-inputs
1925 `(("python-mock" ,python-mock)
1926 ("python-nose" ,python-nose)
1927 ("python-gevent" ,python-gevent)
1928 ("python-eventlet" ,python-eventlet)))
1929 (home-page "https://www.pykka.org/")
1930 (synopsis "Pykka is a Python implementation of the actor model")
1931 (description
1932 "Pykka is a Python implementation of the actor model.
1933 The actor model introduces some simple rules to control the sharing
1934 of state and cooperation between execution units, which makes it
1935 easier to build concurrent applications.")
1936 (license license:asl2.0)))
1937
1938 (define-public python2-pykka
1939 (package-with-python2 python-pykka))
1940
1941 (define-public python-pymsgbox
1942 (package
1943 (name "python-pymsgbox")
1944 (version "1.0.6")
1945 (source
1946 (origin
1947 (method git-fetch)
1948 (uri (git-reference
1949 ;; LICENSE.txt is not present on pypi
1950 (url "https://github.com/asweigart/PyMsgBox")
1951 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
1952 (file-name (git-file-name name version))
1953 (sha256
1954 (base32
1955 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
1956 (arguments
1957 ;; Circular dependency to run tests:
1958 ;; Tests need pyautogui, which depends on pymsgbox.
1959 '(#:tests? #f))
1960 (build-system python-build-system)
1961 (home-page "https://github.com/asweigart/PyMsgBox")
1962 (synopsis "Python module for JavaScript-like message boxes")
1963 (description
1964 "PyMsgBox is a simple, cross-platform, pure Python module for
1965 JavaScript-like message boxes. Types of dialog boxes include:
1966 @enumerate
1967 @item alert
1968 @item confirm
1969 @item prompt
1970 @item password
1971 @end enumerate
1972 ")
1973 (license license:bsd-3)))
1974
1975 (define-public python-pympler
1976 (package
1977 (name "python-pympler")
1978 (home-page "https://pythonhosted.org/Pympler/")
1979 (version "0.5")
1980 (source (origin
1981 (method url-fetch)
1982 (uri (pypi-uri "Pympler" version))
1983 (sha256
1984 (base32
1985 "03qwsbilqgvnbl3a1jmpgixbr2kq6m3fvdlzyr3wdp01bwlc85kx"))))
1986 (build-system python-build-system)
1987 (arguments
1988 `(#:phases (modify-phases %standard-phases
1989 (delete 'check)
1990 (add-after 'install 'check
1991 (lambda* (#:key inputs outputs #:allow-other-keys)
1992 (add-installed-pythonpath inputs outputs)
1993 (invoke "python" "setup.py" "test"))))))
1994 (synopsis "Measure, monitor and analyze memory behavior")
1995 (description
1996 "Pympler is a development tool to measure, monitor and analyze
1997 the memory behavior of Python objects in a running Python application.
1998
1999 By pympling a Python application, detailed insight in the size and the
2000 lifetime of Python objects can be obtained. Undesirable or unexpected
2001 runtime behavior like memory bloat and other @samp{pymples} can easily
2002 be identified.
2003
2004 A web profiling frontend exposes process statistics, garbage
2005 visualisation and class tracker statistics.")
2006 (license license:asl2.0)))
2007
2008 (define-public python2-pympler
2009 (package-with-python2 python-pympler))
2010
2011 (define-public python-itsdangerous
2012 (package
2013 (name "python-itsdangerous")
2014 (version "1.1.0")
2015 (source
2016 (origin
2017 (method url-fetch)
2018 (uri (pypi-uri "itsdangerous" version))
2019 (sha256
2020 (base32
2021 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
2022 (build-system python-build-system)
2023 (home-page "https://palletsprojects.com/p/itsdangerous/")
2024 (synopsis "Python library for passing data to/from untrusted environments")
2025 (description
2026 "Itsdangerous provides various helpers to pass trusted data to untrusted
2027 environments and back.")
2028 (license license:bsd-3)))
2029
2030 (define-public python2-itsdangerous
2031 (package-with-python2 python-itsdangerous))
2032
2033 (define-public python-pyyaml
2034 (package
2035 (name "python-pyyaml")
2036 (version "3.13")
2037 (source
2038 (origin
2039 (method url-fetch)
2040 (uri (pypi-uri "PyYAML" version))
2041 (sha256
2042 (base32
2043 "1gx603g484z46cb74j9rzr6sjlh2vndxayicvlyhxdz98lhhkwry"))))
2044 (build-system python-build-system)
2045 (inputs
2046 `(("libyaml" ,libyaml)))
2047 (home-page "http://pyyaml.org/wiki/PyYAML")
2048 (synopsis "YAML parser and emitter for Python")
2049 (description
2050 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2051 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2052 API, and sensible error messages. PyYAML supports standard YAML tags and
2053 provides Python-specific tags that allow to represent an arbitrary Python
2054 object.")
2055 (license license:expat)))
2056
2057 (define-public python2-pyyaml
2058 (package-with-python2 python-pyyaml))
2059
2060 (define-public python-vine
2061 (package
2062 (name "python-vine")
2063 (version "1.1.4")
2064 (source
2065 (origin
2066 (method url-fetch)
2067 (uri (pypi-uri "vine" version))
2068 (sha256
2069 (base32
2070 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
2071 (build-system python-build-system)
2072 (native-inputs
2073 `(("python-pytest" ,python-pytest)
2074 ("python-case" ,python-case)))
2075 (home-page "https://github.com/celery/vine")
2076 (synopsis "Promises for Python")
2077 (description
2078 "@code{vine} provides a special implementation of promises in that it can
2079 be used both for \"promise of a value\" and lazy evaluation. The biggest
2080 upside for this is that everything in a promise can also be a promise,
2081 e.g. filters, callbacks and errbacks can all be promises.")
2082 (license license:bsd-3)))
2083
2084 (define-public python-virtualenv
2085 (package
2086 (name "python-virtualenv")
2087 (version "16.1.0")
2088 (source
2089 (origin
2090 (method url-fetch)
2091 (uri (pypi-uri "virtualenv" version))
2092 (sha256
2093 (base32
2094 "0242cg3hdq3qdvx5flyrki8lpwlgwf5k45c21ks5049fv7ygm6gq"))))
2095 (build-system python-build-system)
2096 (arguments
2097 `(#:phases
2098 (modify-phases %standard-phases
2099 (add-before 'check 'disable-failing-test
2100 (lambda _
2101 ;; Disable failing test. See upstream bug report
2102 ;; https://github.com/pypa/virtualenv/issues/957
2103 (substitute* "tests/test_virtualenv.py"
2104 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2105 #t)))))
2106 (native-inputs
2107 `(("python-mock" ,python-mock)
2108 ("python-pytest" ,python-pytest)))
2109 (home-page "https://virtualenv.pypa.io/")
2110 (synopsis "Virtual Python environment builder")
2111 (description
2112 "Virtualenv is a tool to create isolated Python environments.")
2113 (license license:expat)))
2114
2115 (define-public python2-virtualenv
2116 (package-with-python2 python-virtualenv))
2117
2118 (define-public python-markupsafe
2119 (package
2120 (name "python-markupsafe")
2121 (version "1.0")
2122 (source
2123 (origin
2124 (method url-fetch)
2125 (uri (pypi-uri "MarkupSafe" version))
2126 (sha256
2127 (base32
2128 "0rdn1s8x9ni7ss8rfiacj7x1085lx8mh2zdwqslnw8xc3l4nkgm6"))))
2129 (build-system python-build-system)
2130 (home-page "https://github.com/mitsuhiko/markupsafe")
2131 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2132 (description
2133 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2134 for Python.")
2135 (license license:bsd-3)))
2136
2137 (define-public python2-markupsafe
2138 (package-with-python2 python-markupsafe))
2139
2140 (define-public python-jinja2
2141 (package
2142 (name "python-jinja2")
2143 (version "2.10")
2144 (source
2145 (origin
2146 (method url-fetch)
2147 (uri (pypi-uri "Jinja2" version))
2148 (sha256
2149 (base32
2150 "190l36hfw3wb2n3n68yacjabxyb1pnxwn7vjx96cmjj002xy2jzq"))))
2151 (build-system python-build-system)
2152 (propagated-inputs
2153 `(("python-markupsafe" ,python-markupsafe)))
2154 (home-page "http://jinja.pocoo.org/")
2155 (synopsis "Python template engine")
2156 (description
2157 "Jinja2 is a small but fast and easy to use stand-alone template engine
2158 written in pure Python.")
2159 (license license:bsd-3)))
2160
2161 (define-public python2-jinja2
2162 (package-with-python2 python-jinja2))
2163
2164 (define-public python-pystache
2165 (package
2166 (name "python-pystache")
2167 (version "0.5.4")
2168 (source (origin
2169 (method url-fetch)
2170 (uri (pypi-uri "pystache" version))
2171 (sha256
2172 (base32
2173 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2174 (build-system python-build-system)
2175 (arguments
2176 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2177 (home-page "http://defunkt.io/pystache/")
2178 (synopsis "Python logic-less template engine")
2179 (description
2180 "Pystache is a Python implementation of the framework agnostic,
2181 logic-free templating system Mustache.")
2182 (license license:expat)
2183 (properties `((python2-variant . ,(delay python2-pystache))))))
2184
2185 (define-public python2-pystache
2186 (package (inherit (package-with-python2
2187 (strip-python2-variant python-pystache)))
2188 (arguments
2189 `(#:python ,python-2
2190 #:phases
2191 (modify-phases %standard-phases
2192 (replace 'check
2193 (lambda _
2194 (invoke "python" "test_pystache.py"))))))))
2195
2196 (define-public python-joblib
2197 (package
2198 (name "python-joblib")
2199 (version "0.13.0")
2200 (source (origin
2201 (method url-fetch)
2202 (uri (pypi-uri "joblib" version))
2203 (sha256
2204 (base32
2205 "0612nazad8dxmn3xghfrmjax6456l4xy6hn9cngs7vydi14ds7v5"))))
2206 (build-system python-build-system)
2207 (arguments
2208 `(#:phases
2209 (modify-phases %standard-phases
2210 (replace 'check
2211 (lambda _ (invoke "pytest" "-v" "joblib"))))))
2212 (native-inputs
2213 `(("python-pytest" ,python-pytest)))
2214 (home-page "https://joblib.readthedocs.io/")
2215 (synopsis "Using Python functions as pipeline jobs")
2216 (description
2217 "Joblib is a set of tools to provide lightweight pipelining in Python.
2218 In particular, joblib offers: transparent disk-caching of the output values
2219 and lazy re-evaluation (memoize pattern), easy simple parallel computing
2220 logging and tracing of the execution.")
2221 (license license:bsd-3)))
2222
2223 (define-public python2-joblib
2224 (package-with-python2 python-joblib))
2225
2226 (define-public python-daemon
2227 (package
2228 (name "python-daemon")
2229 (version "2.2.3")
2230 (source
2231 (origin
2232 (method url-fetch)
2233 (uri (pypi-uri "python-daemon" version))
2234 (sha256
2235 (base32
2236 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
2237 (build-system python-build-system)
2238 (arguments
2239 `(#:phases
2240 (modify-phases %standard-phases
2241 (add-before 'check 'disable-tests
2242 (lambda _
2243 ;; FIXME: Determine why test fails
2244 (substitute* "test/test_daemon.py"
2245 (("test_detaches_process_context")
2246 "skip_test_detaches_process_context"))
2247 #t)))))
2248 (propagated-inputs
2249 `(("python-lockfile" ,python-lockfile)))
2250 (native-inputs
2251 `(("python-unittest2" ,python-unittest2)
2252 ("python-testtools" ,python-testtools)
2253 ("python-testscenarios" ,python-testscenarios)
2254 ("python-mock" ,python-mock)
2255 ("python-docutils" ,python-docutils)))
2256 (home-page "https://pagure.io/python-daemon/")
2257 (synopsis "Python library for making a Unix daemon process")
2258 (description "Python-daemon is a library that assists a Python program to
2259 turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
2260
2261 This library provides a @code{DaemonContext} class that manages the following
2262 important tasks for becoming a daemon process:
2263 @enumerate
2264 @item Detach the process into its own process group.
2265 @item Set process environment appropriate for running inside a chroot.
2266 @item Renounce suid and sgid privileges.
2267 @item Close all open file descriptors.
2268 @item Change the working directory, uid, gid, and umask.
2269 @item Set appropriate signal handlers.
2270 @item Open new file descriptors for stdin, stdout, and stderr.
2271 @item Manage a specified PID lock file.
2272 @item Register cleanup functions for at-exit processing.
2273 @end enumerate")
2274 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
2275 (license (list license:asl2.0 license:gpl3+))))
2276
2277 (define-public python-docutils
2278 (package
2279 (name "python-docutils")
2280 (version "0.14")
2281 (source
2282 (origin
2283 (method url-fetch)
2284 (uri (pypi-uri "docutils" version))
2285 (sha256
2286 (base32
2287 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
2288 (build-system python-build-system)
2289 (arguments
2290 '(#:tests? #f)) ; no setup.py test command
2291 (home-page "http://docutils.sourceforge.net/")
2292 (synopsis "Python Documentation Utilities")
2293 (description
2294 "Docutils is a modular system for processing documentation into useful
2295 formats, such as HTML, XML, and LaTeX. For input Docutils supports
2296 reStructuredText.")
2297 ;; Most of the source code is public domain, but some source files are
2298 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2299 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2300
2301 (define-public python2-docutils
2302 (package-with-python2 python-docutils))
2303
2304 (define-public python-pygments
2305 (package
2306 (name "python-pygments")
2307 (version "2.2.0")
2308 (source
2309 (origin
2310 (method url-fetch)
2311 (uri (pypi-uri "Pygments" version))
2312 (sha256
2313 (base32
2314 "1k78qdvir1yb1c634nkv6rbga8wv4289xarghmsbbvzhvr311bnv"))))
2315 (build-system python-build-system)
2316 (arguments
2317 ;; FIXME: Tests require sphinx, which depends on this.
2318 '(#:tests? #f))
2319 (home-page "http://pygments.org/")
2320 (synopsis "Syntax highlighting")
2321 (description
2322 "Pygments is a syntax highlighting package written in Python.")
2323 (license license:bsd-2)))
2324
2325 (define-public python2-pygments
2326 (package-with-python2 python-pygments))
2327
2328 (define-public python-sphinxcontrib-websupport
2329 (package
2330 (name "python-sphinxcontrib-websupport")
2331 (version "1.1.0")
2332 (source (origin
2333 (method url-fetch)
2334 (uri (pypi-uri "sphinxcontrib-websupport" version))
2335 (sha256
2336 (base32
2337 "1ff3ix76xi1y6m99qxhaq5161ix9swwzydilvdya07mgbcvpzr4x"))))
2338 (build-system python-build-system)
2339 (arguments
2340 ;; FIXME: Tests depend on Sphinx, which depends on this.
2341 `(#:tests? #f))
2342 (home-page "http://sphinx-doc.org/")
2343 (synopsis "Sphinx API for web applications")
2344 (description "This package provides a Python API to easily integrate
2345 Sphinx documentation into your web application. It provides tools to
2346 integrate Sphinx documents in web templates and to handle searches.")
2347 (license license:bsd-3)))
2348
2349 (define-public python2-sphinxcontrib-websupport
2350 (package-with-python2 python-sphinxcontrib-websupport))
2351
2352 (define-public python-sphinx
2353 (package
2354 (name "python-sphinx")
2355 (version "1.7.7")
2356 (source
2357 (origin
2358 (method url-fetch)
2359 (uri (pypi-uri "Sphinx" version))
2360 (sha256
2361 (base32
2362 "0pkkbfj7cl157q550gcs45am5y78ps0h7q6455d64s1zmw01jlvi"))))
2363 (build-system python-build-system)
2364 (arguments
2365 `(#:phases
2366 (modify-phases %standard-phases
2367 (replace 'check
2368 (lambda _
2369 ;; Requires Internet access.
2370 (delete-file "tests/test_build_linkcheck.py")
2371 (substitute* "tests/test_build_latex.py"
2372 (("@pytest.mark.sphinx\\('latex', testroot='images'\\)")
2373 "@pytest.mark.skip()"))
2374 (when (which "python")
2375 ;; XXX: These tests are broken when using Python2:
2376 ;; <https://github.com/sphinx-doc/sphinx/issues/4710>.
2377 (delete-file "tests/test_api_translator.py")
2378 (delete-file "tests/test_setup_command.py"))
2379 (invoke "make" "test"))))))
2380 (propagated-inputs
2381 `(("python-imagesize" ,python-imagesize)
2382 ("python-sphinx-alabaster-theme"
2383 ,python-sphinx-alabaster-theme)
2384 ("python-babel" ,python-babel)
2385 ("python-snowballstemmer" ,python-snowballstemmer)
2386 ("python-docutils" ,python-docutils)
2387 ("python-jinja2" ,python-jinja2)
2388 ("python-packaging" ,python-packaging)
2389 ("python-pygments" ,python-pygments)
2390 ("python-requests" ,python-requests)
2391 ("python-six" ,python-six)
2392 ("python-sphinxcontrib-websupport" ,python-sphinxcontrib-websupport)))
2393 (native-inputs
2394 `(("graphviz" ,graphviz)
2395 ("imagemagick" ,imagemagick) ;for "convert"
2396 ("python-html5lib" ,python-html5lib)
2397 ("python-mock" ,python-mock)
2398 ("python-nose" ,python-nose)
2399 ("python-pytest" ,python-pytest)))
2400 (home-page "http://sphinx-doc.org/")
2401 (synopsis "Python documentation generator")
2402 (description "Sphinx is a tool that makes it easy to create documentation
2403 for Python projects or other documents consisting of multiple reStructuredText
2404 sources.")
2405 (license license:bsd-3)
2406 (properties `((python2-variant . ,(delay python2-sphinx))))))
2407
2408 (define-public python2-sphinx
2409 (let ((base (package-with-python2 (strip-python2-variant python-sphinx))))
2410 (package
2411 (inherit base)
2412 (native-inputs `(("python2-mock" ,python2-mock)
2413 ("python2-enum34" ,python2-enum34)
2414 ,@(package-native-inputs base)))
2415 (propagated-inputs `(("python2-pytz" ,python2-pytz)
2416 ("python2-typing" ,python2-typing)
2417 ,@(package-propagated-inputs base))))))
2418
2419 (define-public python-sphinx-gallery
2420 (package
2421 (name "python-sphinx-gallery")
2422 (version "0.1.13")
2423 (source (origin
2424 (method url-fetch)
2425 (uri (string-append "https://github.com/sphinx-gallery/sphinx-gallery"
2426 "/archive/v" version ".tar.gz"))
2427 (file-name (string-append name "-" version ".tar.gz"))
2428 (sha256
2429 (base32
2430 "03fs99mcb1r7qp0xixqv07vcz98sk21yq19ffdysi0infdcpzfkd"))))
2431 (build-system python-build-system)
2432 (arguments
2433 ;; FIXME: Tests attempt to download <https://docs.python.org/3/objects.inv>,
2434 ;; <https://docs.scipy.org/doc/numpy/objects.inv>, and
2435 ;; <https://matplotlib.org/objects.inv>.
2436 `(#:tests? #f))
2437 (native-inputs
2438 `(("python-pytest-runner" ,python-pytest-runner)))
2439 (home-page "https://sphinx-gallery.github.io/")
2440 (synopsis "Generate an examples gallery automatically")
2441 (description
2442 "@code{sphinx_gallery} is a Sphinx extension that builds an HTML version
2443 from any set of Python scripts and puts it into an examples gallery.")
2444 (license license:bsd-3)))
2445
2446 (define-public python2-sphinx-gallery
2447 (package-with-python2 python-sphinx-gallery))
2448
2449 (define-public python-sphinx-rtd-theme
2450 (package
2451 (name "python-sphinx-rtd-theme")
2452 (version "0.2.4")
2453 (source
2454 (origin
2455 (method url-fetch)
2456 (uri (pypi-uri "sphinx_rtd_theme" version))
2457 (sha256
2458 (base32
2459 "05rlhjzdyapr2w74jjs7mrm8hi69qskcr5vya9f9drpsys7lpxrd"))))
2460 (build-system python-build-system)
2461 (arguments '(#:tests? #f)) ; No tests.
2462 (propagated-inputs
2463 `(("python-sphinx" ,python-sphinx)))
2464 (home-page "https://github.com/snide/sphinx_rtd_theme/")
2465 (synopsis "ReadTheDocs.org theme for Sphinx")
2466 (description "A theme for Sphinx used by ReadTheDocs.org.")
2467 (license license:expat)))
2468
2469 (define-public python2-sphinx-rtd-theme
2470 (package-with-python2 python-sphinx-rtd-theme))
2471
2472 (define-public python-guzzle-sphinx-theme
2473 (package
2474 (name "python-guzzle-sphinx-theme")
2475 (version "0.7.11")
2476 (source
2477 (origin
2478 (method url-fetch)
2479 (uri (pypi-uri "guzzle_sphinx_theme" version))
2480 (sha256
2481 (base32
2482 "1rnkzrrsbnifn3vsb4pfaia3nlvgvw6ndpxp7lzjrh23qcwid34v"))))
2483 (build-system python-build-system)
2484 (propagated-inputs
2485 `(("python-sphinx" ,python-sphinx)))
2486 (home-page "https://github.com/guzzle/guzzle_sphinx_theme")
2487 (synopsis "Sphinx theme used by Guzzle")
2488 (description "This package provides guzzle_sphinx_theme, a theme for the
2489 Sphinx documentation system, used by @uref{http://docs.guzzlephp.org, Guzzle}
2490 and several other projects.")
2491 (license license:expat)))
2492
2493 (define-public python2-guzzle-sphinx-theme
2494 (package-with-python2 python-guzzle-sphinx-theme))
2495
2496 (define-public python-rst.linker
2497 (package
2498 (name "python-rst.linker")
2499 (version "1.10")
2500 (source
2501 (origin
2502 (method url-fetch)
2503 (uri (pypi-uri "rst.linker" version))
2504 (sha256
2505 (base32
2506 "0iqaacp7pj1s8avs4kc0qg0r7dscywaq37y6l9j14glqdikk0wdj"))))
2507 (build-system python-build-system)
2508 (propagated-inputs
2509 `(("python-dateutil" ,python-dateutil)
2510 ("python-six" ,python-six)))
2511 (native-inputs
2512 `(("python-setuptools-scm" ,python-setuptools-scm)))
2513 ;; Test would require path.py, which would introduce a cyclic dependence.
2514 (arguments `(#:tests? #f))
2515 ;; Note: As of version 1.7 the documentation is not worth building.
2516 (home-page "https://github.com/jaraco/rst.linker")
2517 (synopsis "Sphinx plugin to add links and timestamps")
2518 (description "rst.linker allows to automatically replace text by a
2519 reStructuredText external reference or timestamps. It's primary purpose is to
2520 augment the changelog, but it can be used for other documents, too.")
2521 (license license:expat)))
2522
2523 (define-public python2-rst.linker
2524 (package-with-python2 python-rst.linker))
2525
2526 (define-public python-feedgenerator
2527 (package
2528 (name "python-feedgenerator")
2529 (version "1.9")
2530 (source
2531 (origin
2532 (method url-fetch)
2533 (uri (pypi-uri "feedgenerator" version))
2534 (sha256
2535 (base32
2536 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
2537 (modules '((guix build utils)))
2538 (snippet
2539 '(begin
2540 ;; Remove pre-compiled .pyc files from source.
2541 (for-each delete-file-recursively
2542 (find-files "." "__pycache__" #:directories? #t))
2543 (for-each delete-file (find-files "." "\\.pyc$"))
2544 #t))))
2545 (build-system python-build-system)
2546 (propagated-inputs
2547 `(("python-pytz" ,python-pytz)
2548 ("python-six" ,python-six)))
2549 (home-page "https://github.com/getpelican/feedgenerator")
2550 (synopsis
2551 "Standalone version of Django's Atom/RSS feed generator")
2552 (description
2553 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2554 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
2555 (license license:bsd-3)))
2556
2557 (define-public python2-feedgenerator
2558 (package-with-python2 python-feedgenerator))
2559
2560 (define-public python-toml
2561 (package
2562 (name "python-toml")
2563 (version "0.9.4")
2564 (source
2565 (origin
2566 (method url-fetch)
2567 (uri (pypi-uri "toml" version))
2568 (sha256
2569 (base32
2570 "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf"))))
2571 (build-system python-build-system)
2572 (arguments
2573 `(#:tests? #f)) ;no tests suite in release
2574 (home-page "https://github.com/uiri/toml")
2575 (synopsis "Library for TOML")
2576 (description
2577 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
2578 Language (TOML) configuration files.")
2579 (license license:expat)))
2580
2581 (define-public python-jsonrpc-server
2582 (package
2583 (name "python-jsonrpc-server")
2584 (version "0.1.2")
2585 (source
2586 (origin
2587 (method url-fetch)
2588 (uri (pypi-uri "python-jsonrpc-server" version))
2589 (sha256
2590 (base32
2591 "0m4ykpcdy52x37n1ikysp07j7p8ialcdvvvsrjp3545sn7iiid09"))))
2592 (build-system python-build-system)
2593 (propagated-inputs
2594 `(("python-future" ,python-future)
2595 ("python-mock" ,python-mock)
2596 ("python-pytest" ,python-pytest)))
2597 (home-page
2598 "https://github.com/palantir/python-jsonrpc-server")
2599 (synopsis "JSON RPC 2.0 server library")
2600 (description
2601 "This packages provides a JSON RPC 2.0 server library for Python.")
2602 (license license:expat)))
2603
2604 (define-public python-pydocstyle
2605 (package
2606 (name "python-pydocstyle")
2607 (version "3.0.0")
2608 (source
2609 (origin
2610 (method url-fetch)
2611 (uri (pypi-uri "pydocstyle" version))
2612 (sha256
2613 (base32
2614 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
2615 (build-system python-build-system)
2616 (propagated-inputs
2617 `(("python-six" ,python-six)
2618 ("python-snowballstemmer" ,python-snowballstemmer)))
2619 (home-page
2620 "https://github.com/PyCQA/pydocstyle/")
2621 (synopsis "Python docstring style checker")
2622 (description
2623 "This package provides a style checker for the Python Language
2624 Server (PLS).")
2625 (license license:expat)))
2626
2627 (define-public python-language-server
2628 (package
2629 (name "python-language-server")
2630 (version "0.22.0")
2631 (source
2632 (origin
2633 (method url-fetch)
2634 (uri (pypi-uri "python-language-server" version))
2635 (sha256
2636 (base32
2637 "04pbxl06hg0ddm2xx99jn9jh40yv0mmzdjw8pqd2rbcdg42hhia6"))))
2638 (build-system python-build-system)
2639 (propagated-inputs
2640 `(("python-pluggy" ,python-pluggy)
2641 ("python-jsonrpc-server" ,python-jsonrpc-server)
2642 ("python-jedi" ,python-jedi)
2643 ("python-yapf" ,python-yapf)
2644 ("python-pyflakes" ,python-pyflakes)
2645 ("python-pydocstyle" ,python-pydocstyle)
2646 ("python-pycodestyle" ,python-pycodestyle)
2647 ("python-mccabe" ,python-mccabe)
2648 ("python-rope" ,python-rope)
2649 ("python-autopep8" ,python-autopep8)))
2650 (home-page "https://github.com/palantir/python-language-server")
2651 (synopsis "Python implementation of the Language Server Protocol")
2652 (description
2653 "The Python Language Server (pyls) is an implementation of the Python 3
2654 language specification for the Language Server Protocol (LSP). This tool is
2655 used in text editing environments to provide a complete and integrated
2656 feature-set for programming Python effectively.")
2657 (license license:expat)))
2658
2659 (define-public python-black
2660 (package
2661 (name "python-black")
2662 (version "18.6b4")
2663 (source
2664 (origin
2665 (method url-fetch)
2666 (uri (pypi-uri "black" version))
2667 (sha256
2668 (base32
2669 "0i4sfqgz6w15vd50kbhi7g7rifgqlf8yfr8y78rypd56q64qn592"))))
2670 (build-system python-build-system)
2671 (arguments
2672 `(#:phases
2673 (modify-phases %standard-phases
2674 (add-after 'patch-source-shebangs 'patch-extra-shebangs
2675 (lambda _
2676 (let ((python3 (which "python3")))
2677 (substitute* '("tests/data/fmtonoff.py"
2678 "tests/data/string_prefixes.py"
2679 "tests/data/function.py")
2680 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
2681 (string-append "#!" python3 (if (string? minor-version)
2682 minor-version
2683 ""))))))))))
2684 (propagated-inputs
2685 `(("python-click" ,python-click)
2686 ("python-attrs" ,python-attrs)
2687 ("python-appdirs" ,python-appdirs)
2688 ("python-toml" ,python-toml)))
2689 (home-page "https://github.com/ambv/black")
2690 (synopsis "The uncompromising code formatter")
2691 (description "Black is the uncompromising Python code formatter.")
2692 (license license:expat)))
2693
2694 (define-public python-blinker
2695 (package
2696 (name "python-blinker")
2697 (version "1.4")
2698 (source
2699 (origin
2700 (method url-fetch)
2701 (uri (pypi-uri "blinker" version))
2702 (sha256
2703 (base32
2704 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
2705 (build-system python-build-system)
2706 (home-page "http://pythonhosted.org/blinker/")
2707 (synopsis "Fast, simple object-to-object and broadcast signaling")
2708 (description
2709 "Blinker provides a fast dispatching system that allows any number of
2710 interested parties to subscribe to events, or \"signals\".")
2711 (license license:expat)))
2712
2713 (define-public python2-blinker
2714 (package-with-python2 python-blinker))
2715
2716 (define-public pelican
2717 (package
2718 (name "pelican")
2719 (version "4.0.1")
2720 (source
2721 (origin
2722 (method url-fetch)
2723 (uri (pypi-uri "pelican" version))
2724 (sha256
2725 (base32
2726 "05yda7n6r0ll18fpdjzkzyr0ls8hbb86fnjyb33k9jvv5avah2lr"))))
2727 (build-system python-build-system)
2728 (propagated-inputs
2729 `(("python-feedgenerator" ,python-feedgenerator)
2730 ("python-jinja2" ,python-jinja2)
2731 ("python-pygments" ,python-pygments)
2732 ("python-docutils" ,python-docutils)
2733 ("python-pytz" ,python-pytz)
2734 ("python-blinker" ,python-blinker)
2735 ("python-unidecode" ,python-unidecode)
2736 ("python-six" ,python-six)
2737 ("python-dateutil" ,python-dateutil)
2738 ("python-markdown" ,python-markdown)))
2739 (home-page "https://getpelican.com/")
2740 (arguments
2741 `(;; XXX Requires a lot more packages to do unit tests :P
2742 #:tests? #f
2743 #:phases (modify-phases %standard-phases
2744 (add-before
2745 'install 'adjust-requires
2746 ;; Since feedgenerator is installed from git, it doesn't
2747 ;; conform to the version requirements.
2748 ;;
2749 ;; We *do have* "feedgenerator >= 1.6", but strip off the
2750 ;; version requirement so setuptools doesn't get confused.
2751 (lambda _
2752 (substitute* "setup.py"
2753 (("['\"]feedgenerator.*?['\"]")
2754 "'feedgenerator'")))))))
2755 (synopsis "Python-based static site publishing system")
2756 (description
2757 "Pelican is a tool to generate a static blog from reStructuredText,
2758 Markdown input files, and more. Pelican uses Jinja2 for templating
2759 and is very extensible.")
2760 (license license:agpl3+)))
2761
2762 (define-public python-scikit-image
2763 (package
2764 (name "python-scikit-image")
2765 (version "0.14.1")
2766 (source
2767 (origin
2768 (method url-fetch)
2769 (uri (pypi-uri "scikit-image" version))
2770 (sha256
2771 (base32 "0l1c3rl4s1jyv80i5hns4pgih09zrxfj7lygdc51w8sgyysb7ac6"))))
2772 (build-system python-build-system)
2773 (arguments
2774 ;; TODO: Some tests require running X11 server. Disable them?
2775 '(#:tests? #f))
2776 ;; See DEPENDS.txt for the list of build and run time requiremnts
2777 (propagated-inputs
2778 `(("python-cloudpickle" ,python-cloudpickle)
2779 ("python-dask" ,python-dask)
2780 ("python-matplotlib" ,python-matplotlib)
2781 ("python-networkx" ,python-networkx)
2782 ("python-numpy" ,python-numpy)
2783 ("python-pillow" ,python-pillow)
2784 ("python-pywavelets" ,python-pywavelets)
2785 ("python-scipy" ,python-scipy)
2786 ("python-six" ,python-six)))
2787 (native-inputs
2788 `(("python-cython" ,python-cython)))
2789 (home-page "http://scikit-image.org/")
2790 (synopsis "Image processing in Python")
2791 (description
2792 "Scikit-image is a collection of algorithms for image processing.")
2793 (license license:bsd-3)))
2794
2795 (define-public python2-scikit-image
2796 (package-with-python2 python-scikit-image))
2797
2798 (define-public python-cython
2799 (package
2800 (name "python-cython")
2801 (version "0.29.5")
2802 (source
2803 (origin
2804 (method url-fetch)
2805 (uri (pypi-uri "Cython" version))
2806 (sha256
2807 (base32
2808 "1wfb68g115gmf3mv23w0hh972b0ll85gpb92ci28x6h997br0llx"))))
2809 (build-system python-build-system)
2810 ;; we need the full python package and not just the python-wrapper
2811 ;; because we need libpython3.3m.so
2812 (inputs
2813 `(("python" ,python)))
2814 (arguments
2815 `(#:phases
2816 (modify-phases %standard-phases
2817 (add-before 'check 'set-HOME
2818 ;; some tests require access to "$HOME/.cython"
2819 (lambda _ (setenv "HOME" "/tmp") #t))
2820
2821 ;; FIXME: These tests started failing on armhf after the 0.28 update
2822 ;; (commit c69d11c5930), both with an error such as this:
2823 ;; compiling (cpp) and running dictcomp ...
2824 ;; === C/C++ compiler error output: ===
2825 ;; ‘
2826 ;; dictcomp.cpp:5221: confused by earlier errors, bailing out
2827 ;; See <https://hydra.gnu.org/build/2948724> for logs.
2828 ,@(if (target-arm32?)
2829 `((add-before 'check 'disable-failing-tests
2830 (lambda _
2831 (let ((disabled-tests (open-file "tests/bugs.txt" "a")))
2832 (for-each (lambda (test)
2833 (format disabled-tests "~a\n" test))
2834 '("memslice" "dictcomp"))
2835 (close-port disabled-tests)))))
2836 '())
2837
2838 (replace 'check
2839 (lambda _
2840 ;; The "with_outer_raising" test fails with Python 3.7. See
2841 ;; https://github.com/cython/cython/issues/2454
2842 (delete-file "tests/run/generators_py.py")
2843 (invoke "python" "runtests.py" "-vv"))))))
2844 (home-page "http://cython.org/")
2845 (synopsis "C extensions for Python")
2846 (description "Cython is an optimising static compiler for both the Python
2847 programming language and the extended Cython programming language. It makes
2848 writing C extensions for Python as easy as Python itself.")
2849 (license license:asl2.0)
2850 (properties `((python2-variant . ,(delay python2-cython))))))
2851
2852 (define-public python2-cython
2853 (package (inherit (package-with-python2
2854 (strip-python2-variant python-cython)))
2855 (name "python2-cython")
2856 (inputs
2857 `(("python-2" ,python-2))))) ; this is not automatically changed
2858
2859 ;; The RPython toolchain currently does not support Python 3.
2860 (define-public python2-rpython
2861 (package
2862 (name "python2-rpython")
2863 (version "0.2.1")
2864 (source
2865 (origin
2866 (method url-fetch)
2867 (uri (pypi-uri "rpython" version))
2868 (sha256
2869 (base32
2870 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
2871 (build-system python-build-system)
2872 (arguments `(#:python ,python-2))
2873 (native-inputs
2874 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
2875 (home-page "https://rpython.readthedocs.org")
2876 (synopsis "Framework for implementing interpreters and virtual machines")
2877 (description "RPython is a translation and support framework for
2878 producing implementations of dynamic languages, emphasizing a clean separation
2879 between language specification and implementation aspects.")
2880 (license license:expat)))
2881
2882 ;; NOTE: when upgrading numpy please make sure that python-pandas and
2883 ;; python-scipy still build, as these three packages are often used together.
2884 (define-public python-numpy
2885 (package
2886 (name "python-numpy")
2887 (version "1.15.4")
2888 (source
2889 (origin
2890 (method url-fetch)
2891 (uri (string-append
2892 "https://github.com/numpy/numpy/releases/download/v"
2893 version "/numpy-" version ".tar.gz"))
2894 (sha256
2895 (base32
2896 "102vcl2qq4pjbm7a3d67vkkvn4466ngia1d8wi5avqwqh8j0jvkn"))))
2897 (build-system python-build-system)
2898 (inputs
2899 `(("openblas" ,openblas)
2900 ("lapack" ,lapack)))
2901 (native-inputs
2902 `(("python-cython" ,python-cython)
2903 ("python-pytest" ,python-pytest)
2904 ("gfortran" ,gfortran)))
2905 (arguments
2906 `(#:phases
2907 (modify-phases %standard-phases
2908 (add-before 'build 'configure-blas-lapack
2909 (lambda* (#:key inputs #:allow-other-keys)
2910 (call-with-output-file "site.cfg"
2911 (lambda (port)
2912 (format port
2913 "[openblas]
2914 libraries = openblas
2915 library_dirs = ~a/lib
2916 include_dirs = ~a/include
2917
2918 # backslash-n to make emacs happy
2919 \n[lapack]
2920 lapack_libs = lapack
2921 library_dirs = ~a/lib
2922 include_dirs = ~a/include
2923 "
2924 (assoc-ref inputs "openblas")
2925 (assoc-ref inputs "openblas")
2926 (assoc-ref inputs "lapack")
2927 (assoc-ref inputs "lapack"))))
2928 #t))
2929 (add-before 'build 'fix-executable-paths
2930 (lambda* (#:key inputs #:allow-other-keys)
2931 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
2932 ;; instead of /bin/sh.
2933 (substitute* "numpy/distutils/exec_command.py"
2934 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
2935 (string-append match-start (assoc-ref inputs "bash") match-end)))
2936 ;; Use "gcc" executable, not "cc".
2937 (substitute* "numpy/distutils/system_info.py"
2938 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
2939 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
2940 #t))
2941 ;; Tests can only be run after the library has been installed and not
2942 ;; within the source directory.
2943 (delete 'check)
2944 (add-after 'install 'check
2945 (lambda* (#:key outputs inputs #:allow-other-keys)
2946 ;; Make installed package available for running the tests
2947 (add-installed-pythonpath inputs outputs)
2948 ;; Make sure "f2py" etc is found.
2949 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
2950 ":" (getenv "PATH")))
2951 (with-directory-excursion "/tmp"
2952 (invoke "python" "-c"
2953 "import numpy; numpy.test(verbose=2)")))))))
2954 (home-page "http://www.numpy.org/")
2955 (synopsis "Fundamental package for scientific computing with Python")
2956 (description "NumPy is the fundamental package for scientific computing
2957 with Python. It contains among other things: a powerful N-dimensional array
2958 object, sophisticated (broadcasting) functions, tools for integrating C/C++
2959 and Fortran code, useful linear algebra, Fourier transform, and random number
2960 capabilities.")
2961 (license license:bsd-3)))
2962
2963 (define-public python2-numpy
2964 (package-with-python2 python-numpy))
2965
2966 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
2967 ;; interest only for legacy code going back to NumPy's predecessor
2968 ;; Numeric.
2969 (define-public python2-numpy-1.8
2970 (package (inherit python2-numpy)
2971 (version "1.8.2")
2972 (source
2973 (origin
2974 (method url-fetch)
2975 (uri (string-append
2976 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
2977 (file-name (string-append "python2-numpy-" version ".tar.gz"))
2978 (sha256
2979 (base32
2980 "0sc20gz1b17xnyrkp5frca3ql5qfalpv916hfg2kqxpwr6jg0f1g"))))
2981 (arguments
2982 (substitute-keyword-arguments (package-arguments python2-numpy)
2983 ((#:phases phases)
2984 `(modify-phases ,phases
2985 (replace 'configure-blas-lapack
2986 (lambda* (#:key inputs #:allow-other-keys)
2987 (call-with-output-file "site.cfg"
2988 (lambda (port)
2989 (format port
2990 "[openblas]
2991 libraries = openblas,lapack
2992 library_dirs = ~a/lib:~a/lib
2993 include_dirs = ~a/include:~a/include
2994 "
2995 (assoc-ref inputs "openblas")
2996 (assoc-ref inputs "lapack")
2997 (assoc-ref inputs "openblas")
2998 (assoc-ref inputs "lapack"))))
2999 #t))))))
3000 (native-inputs
3001 `(("python2-nose" ,python2-nose)))
3002 (description "NumPy is the fundamental package for scientific computing
3003 with Python. It contains among other things: a powerful N-dimensional array
3004 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3005 and Fortran code, useful linear algebra, Fourier transform, and random number
3006 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
3007 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
3008 Numeric.")
3009 (license license:bsd-3)))
3010
3011 (define-public python-munch
3012 (package
3013 (name "python-munch")
3014 (version "2.0.4")
3015 (source
3016 (origin
3017 (method url-fetch)
3018 (uri (pypi-uri "munch" version))
3019 (sha256
3020 (base32
3021 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3022 (build-system python-build-system)
3023 (home-page "https://github.com/Infinidat/munch")
3024 (synopsis "Dot-accessible dictionary")
3025 (description "Munch is a dot-accessible dictionary similar to JavaScript
3026 objects.")
3027 (license license:expat)))
3028
3029 (define-public python2-munch
3030 (package-with-python2 python-munch))
3031
3032 (define-public python-colormath
3033 (package
3034 (name "python-colormath")
3035 (version "3.0.0")
3036 (source
3037 (origin
3038 (method url-fetch)
3039 (uri (pypi-uri "colormath" version))
3040 (sha256
3041 (base32
3042 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
3043 (build-system python-build-system)
3044 (propagated-inputs
3045 `(("python-networkx" ,python-networkx)
3046 ("python-numpy" ,python-numpy)))
3047 (home-page "https://github.com/gtaylor/python-colormath")
3048 (synopsis "Color math and conversion library")
3049 (description
3050 "This is a Python library for color math and conversions.")
3051 (license license:bsd-3)))
3052
3053 (define-public python2-colormath
3054 (package-with-python2 python-colormath))
3055
3056 (define-public python-spectra
3057 (package
3058 (name "python-spectra")
3059 (version "0.0.11")
3060 (source
3061 (origin
3062 (method url-fetch)
3063 (uri (pypi-uri "spectra" version))
3064 (sha256
3065 (base32
3066 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
3067 (build-system python-build-system)
3068 (arguments
3069 `(#:phases
3070 (modify-phases %standard-phases
3071 (replace 'check
3072 (lambda _ (invoke "nosetests" "-v"))))))
3073 (propagated-inputs
3074 `(("python-colormath" ,python-colormath)))
3075 (native-inputs
3076 `(("python-nose" ,python-nose)))
3077 (home-page "https://github.com/jsvine/spectra")
3078 (synopsis "Color scales and color conversion")
3079 (description
3080 "This package provides a Python library intended to make color math,
3081 color scales, and color space conversion easy. It has support for:
3082
3083 @enumerate
3084 @item Color scales
3085 @item Color ranges
3086 @item Color blending
3087 @item Brightening/darkening colors
3088 @item Saturating/desaturating colors
3089 @item Conversion to/from multiple color spaces.
3090 @end enumerate\n")
3091 (license license:expat)))
3092
3093 (define-public python2-spectra
3094 (package-with-python2 python-spectra))
3095
3096 (define-public python-numpy-documentation
3097 (package
3098 (name "python-numpy-documentation")
3099 (version (package-version python-numpy))
3100 (source (package-source python-numpy))
3101 (build-system python-build-system)
3102 (native-inputs
3103 `(("python-matplotlib" ,python-matplotlib)
3104 ("python-numpy" ,python-numpy)
3105 ("pkg-config" ,pkg-config)
3106 ("python-sphinx" ,python-sphinx)
3107 ("python-numpydoc" ,python-numpydoc)
3108 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
3109 texlive-fonts-cm-super
3110 texlive-fonts-ec
3111 texlive-generic-ifxetex
3112 texlive-generic-pdftex
3113 texlive-latex-amsfonts
3114 texlive-latex-capt-of
3115 texlive-latex-cmap
3116 texlive-latex-environ
3117 texlive-latex-eqparbox
3118 texlive-latex-etoolbox
3119 texlive-latex-expdlist
3120 texlive-latex-fancyhdr
3121 texlive-latex-fancyvrb
3122 texlive-latex-fncychap
3123 texlive-latex-float
3124 texlive-latex-framed
3125 texlive-latex-geometry
3126 texlive-latex-graphics
3127 texlive-latex-hyperref
3128 texlive-latex-mdwtools
3129 texlive-latex-multirow
3130 texlive-latex-needspace
3131 texlive-latex-oberdiek
3132 texlive-latex-parskip
3133 texlive-latex-preview
3134 texlive-latex-tabulary
3135 texlive-latex-threeparttable
3136 texlive-latex-titlesec
3137 texlive-latex-trimspaces
3138 texlive-latex-ucs
3139 texlive-latex-upquote
3140 texlive-latex-url
3141 texlive-latex-varwidth
3142 texlive-latex-wrapfig)))
3143 ("texinfo" ,texinfo)
3144 ("perl" ,perl)
3145 ("scipy-sphinx-theme"
3146 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3147 (method git-fetch)
3148 (uri (git-reference
3149 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3150 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3151 (sha256
3152 (base32
3153 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3154 ,@(package-native-inputs python-numpy)))
3155 (arguments
3156 `(#:tests? #f ; we're only generating the documentation
3157 #:phases
3158 (modify-phases %standard-phases
3159 (delete 'build)
3160 (replace 'install
3161 (lambda* (#:key inputs outputs #:allow-other-keys)
3162 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3163 (doc (string-append
3164 data "/doc/" ,name "-"
3165 ,(package-version python-numpy)))
3166 (info-reader (string-append data "/info"))
3167 (html (string-append doc "/html"))
3168 (scipy-sphinx-theme "scipy-sphinx-theme")
3169 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3170 (pyver ,(string-append "PYVER=")))
3171
3172 ;; FIXME: this is needed to for texlive-union to generate
3173 ;; fonts, which are not found.
3174 (setenv "HOME" "/tmp")
3175
3176 (with-directory-excursion "doc"
3177 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3178 (mkdir-p html)
3179 (invoke "make" "html" pyver)
3180 (invoke "make" "latex" "PAPER=a4" pyver)
3181 (invoke "make" "-C" "build/latex"
3182 "all-pdf" "PAPER=a4" pyver)
3183 ;; FIXME: Generation of the info file fails.
3184 ;; (invoke "make" "info" pyver)
3185 ;; (mkdir-p info)
3186 ;; (copy-file "build/texinfo/numpy.info"
3187 ;; (string-append info "/numpy.info"))
3188 (for-each (lambda (file)
3189 (copy-file (string-append "build/latex" file)
3190 (string-append doc file)))
3191 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3192 (with-directory-excursion "build/html"
3193 (for-each (lambda (file)
3194 (let* ((dir (dirname file))
3195 (tgt-dir (string-append html "/" dir)))
3196 (unless (equal? "." dir)
3197 (mkdir-p tgt-dir))
3198 (install-file file html)))
3199 (find-files "." ".*")))))
3200 #t)))))
3201 (home-page (package-home-page python-numpy))
3202 (synopsis "Documentation for the python-numpy package")
3203 (description (package-description python-numpy))
3204 (license (package-license python-numpy))))
3205
3206 (define-public python2-numpy-documentation
3207 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3208 (package
3209 (inherit numpy-documentation)
3210 (native-inputs `(("python2-functools32" ,python2-functools32)
3211 ,@(package-native-inputs numpy-documentation))))))
3212
3213 (define-public python-pygit2
3214 (package
3215 (name "python-pygit2")
3216 (version "0.27.3")
3217 (source
3218 (origin
3219 (method url-fetch)
3220 (uri (pypi-uri "pygit2" version))
3221 (sha256
3222 (base32
3223 "046ahvsb7a20sgvscqfm3cb32sp3sii4gim9vz7zzrkf7yz16xlv"))))
3224 (build-system python-build-system)
3225 (arguments
3226 '(#:phases
3227 (modify-phases %standard-phases
3228 ;; Remove after the next update. See:
3229 ;; https://github.com/libgit2/pygit2/pull/851
3230 (add-after 'unpack 'compile-with-cffi
3231 (lambda _
3232 (substitute* "setup.py"
3233 (("install_requires")
3234 "setup_requires=['cffi'],\n install_requires"))
3235 #t))
3236 (add-after 'unpack 'fix-dependency-versioning
3237 (lambda _
3238 (substitute* "setup.py"
3239 (("<") "<="))
3240 #t)))))
3241 (propagated-inputs
3242 `(("python-six" ,python-six)
3243 ("python-cffi" ,python-cffi)
3244 ("libgit2" ,libgit2)
3245 ("python-tox" ,python-tox)))
3246 (native-inputs
3247 `(("python-pytest" ,python-pytest)))
3248 (home-page "https://github.com/libgit2/pygit2")
3249 (synopsis "Python bindings for libgit2")
3250 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3251 library, libgit2 implements Git plumbing.")
3252 ;; GPL2.0 only, with linking exception.
3253 (license license:gpl2)))
3254
3255 (define-public python2-pygit2
3256 (package-with-python2 python-pygit2))
3257
3258 (define-public python-pyparsing
3259 (package
3260 (name "python-pyparsing")
3261 (version "2.2.1")
3262 (source
3263 (origin
3264 (method url-fetch)
3265 (uri (pypi-uri "pyparsing" version))
3266 (sha256
3267 (base32 "06dgd0iilvf8m0ssmfpcbh8l6jf0zkp8adbb84llksg17crfx4zl"))))
3268 (build-system python-build-system)
3269 (outputs '("out" "doc"))
3270 (arguments
3271 `(#:tests? #f ; no test target
3272 #:phases
3273 (modify-phases %standard-phases
3274 (add-after 'install 'install-doc
3275 (lambda* (#:key outputs #:allow-other-keys)
3276 (let* ((doc (string-append (assoc-ref outputs "doc")
3277 "/share/doc/" ,name "-" ,version))
3278 (html-doc (string-append doc "/html"))
3279 (examples (string-append doc "/examples")))
3280 (mkdir-p html-doc)
3281 (mkdir-p examples)
3282 (for-each
3283 (lambda (dir tgt)
3284 (map (lambda (file)
3285 (install-file file tgt))
3286 (find-files dir ".*")))
3287 (list "docs" "htmldoc" "examples")
3288 (list doc html-doc examples))
3289 #t))))))
3290 (home-page "https://github.com/pyparsing/pyparsing")
3291 (synopsis "Python parsing class library")
3292 (description
3293 "The pyparsing module is an alternative approach to creating and
3294 executing simple grammars, vs. the traditional lex/yacc approach, or the use
3295 of regular expressions. The pyparsing module provides a library of classes
3296 that client code uses to construct the grammar directly in Python code.")
3297 (license license:expat)))
3298
3299 (define-public python2-pyparsing
3300 (package-with-python2 python-pyparsing))
3301
3302 (define-public python-numpydoc
3303 (package
3304 (name "python-numpydoc")
3305 (version "0.8.0")
3306 (source
3307 (origin
3308 (method url-fetch)
3309 (uri (pypi-uri "numpydoc" version))
3310 (sha256
3311 (base32
3312 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
3313 (build-system python-build-system)
3314 (propagated-inputs
3315 `(("python-sphinx" ,python-sphinx)))
3316 (native-inputs
3317 `(("python-nose" ,python-nose)))
3318 (home-page "https://pypi.python.org/pypi/numpydoc")
3319 (synopsis
3320 "Numpy's Sphinx extensions")
3321 (description
3322 "Sphinx extension to support docstrings in Numpy format.")
3323 (license license:bsd-2)))
3324
3325 (define-public python2-numpydoc
3326 (package-with-python2 python-numpydoc))
3327
3328 (define-public python-numexpr
3329 (package
3330 (name "python-numexpr")
3331 (version "2.6.5")
3332 (source
3333 (origin
3334 (method url-fetch)
3335 (uri (pypi-uri "numexpr" version))
3336 (sha256
3337 (base32
3338 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3339 (build-system python-build-system)
3340 (arguments `(#:tests? #f)) ; no tests included
3341 (propagated-inputs
3342 `(("python-numpy" ,python-numpy)))
3343 (home-page "https://github.com/pydata/numexpr")
3344 (synopsis "Fast numerical expression evaluator for NumPy")
3345 (description
3346 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3347 expressions that operate on arrays are accelerated and use less memory than
3348 doing the same calculation in Python. In addition, its multi-threaded
3349 capabilities can make use of all your cores, which may accelerate
3350 computations, most specially if they are not memory-bounded (e.g. those using
3351 transcendental functions).")
3352 (license license:expat)))
3353
3354 (define-public python2-numexpr
3355 (package-with-python2 python-numexpr))
3356
3357 (define-public python-cycler
3358 (package
3359 (name "python-cycler")
3360 (version "0.10.0")
3361 (source (origin
3362 (method url-fetch)
3363 (uri (pypi-uri "cycler" version))
3364 (sha256
3365 (base32
3366 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3367 (build-system python-build-system)
3368 (arguments
3369 ;; XXX: The current version requires 'coveralls' which we don't have.
3370 ;; Enable this for the next release which uses 'python-pytest'.
3371 '(#:tests? #f))
3372 (propagated-inputs
3373 `(("python-six" ,python-six)))
3374 (home-page "http://matplotlib.org/cycler/")
3375 (synopsis "Composable keyword argument iterator")
3376 (description
3377 "When using @code{matplotlib} and plotting more than one line, it is
3378 common to want to be able to want to be able to cycle over one or more artist
3379 styles; but the plotting logic can quickly become involved.
3380 To address this and enable easy cycling over arbitrary @code{kwargs}, the
3381 @code{Cycler} class was developed.")
3382 (license license:bsd-3)))
3383
3384 (define-public python2-cycler
3385 (package-with-python2 python-cycler))
3386
3387 (define-public python-colorspacious
3388 (package
3389 (name "python-colorspacious")
3390 (version "1.1.0")
3391 (source
3392 (origin
3393 (method url-fetch)
3394 (uri (string-append "https://github.com/njsmith/colorspacious/archive/v"
3395 version ".tar.gz"))
3396 (file-name (string-append name "-" version))
3397 (sha256
3398 (base32 "1vflh5jm32qb0skza2i8pjacv09w6gq84fqpp2nj77s0rbmzgr4k"))))
3399 (build-system python-build-system)
3400 (propagated-inputs
3401 `(("python-numpy" ,python-numpy)))
3402 (native-inputs
3403 `(("python-nose" ,python-nose)))
3404 (arguments
3405 `(#:phases
3406 (modify-phases %standard-phases
3407 (replace 'check
3408 (lambda _
3409 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
3410 (home-page "https://github.com/njsmith/colorspacious")
3411 (synopsis "Python library for colorspace conversions")
3412 (description "@code{colorspacious} is a Python library that lets you
3413 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3414 (license license:expat)))
3415
3416 (define-public python2-colorspacious
3417 (package-with-python2 python-colorspacious))
3418
3419 (define-public python-matplotlib
3420 (package
3421 (name "python-matplotlib")
3422 (version "2.2.3")
3423 (source
3424 (origin
3425 (method url-fetch)
3426 (uri (pypi-uri "matplotlib" version))
3427 (sha256
3428 (base32
3429 "1rcc7x9ig3hpchkc4cwdvym3y451w74275fxr455zkfagrsvymbk"))))
3430 (build-system python-build-system)
3431 (propagated-inputs ; the following packages are all needed at run time
3432 `(("python-cycler" ,python-cycler)
3433 ("python-kiwisolver" ,python-kiwisolver)
3434 ("python-pyparsing" ,python-pyparsing)
3435 ("python-pygobject" ,python-pygobject)
3436 ("gobject-introspection" ,gobject-introspection)
3437 ("python-tkinter" ,python "tk")
3438 ("python-dateutil" ,python-dateutil)
3439 ("python-numpy" ,python-numpy)
3440 ("python-pillow" ,python-pillow)
3441 ("python-pytz" ,python-pytz)
3442 ("python-six" ,python-six)
3443 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3444 ;; from 'gtk+') provides the required 'typelib' files used by
3445 ;; 'gobject-introspection'. The location of these files is set with the
3446 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3447 ;; is done automatically by a 'native-search-path' procedure. However,
3448 ;; at run-time the user must set this variable as follows:
3449 ;;
3450 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
3451 ("gtk+" ,gtk+)
3452 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3453 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3454 ;; object. For this reason we need to import both libraries.
3455 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3456 ("python-pycairo" ,python-pycairo)
3457 ;; XXX: qtwebkit cannot be built reliably.
3458 ("python-pyqt" ,python-pyqt-without-qtwebkit)
3459 ("python-cairocffi" ,python-cairocffi)))
3460 (inputs
3461 `(("libpng" ,libpng)
3462 ("imagemagick" ,imagemagick)
3463 ("freetype" ,freetype)
3464 ("cairo" ,cairo)
3465 ("glib" ,glib)
3466 ;; FIXME: Add backends when available.
3467 ;("python-wxpython" ,python-wxpython)
3468 ("tcl" ,tcl)
3469 ("tk" ,tk)))
3470 (native-inputs
3471 `(("pkg-config" ,pkg-config)
3472 ("python-nose" ,python-nose)
3473 ("python-mock" ,python-mock)))
3474 (arguments
3475 `(#:phases
3476 (modify-phases %standard-phases
3477 (add-before 'build 'configure-environment
3478 (lambda* (#:key outputs inputs #:allow-other-keys)
3479 (let ((cairo (assoc-ref inputs "cairo"))
3480 (gtk+ (assoc-ref inputs "gtk+")))
3481 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3482 ;; has not effect.
3483 (setenv "LD_LIBRARY_PATH"
3484 (string-append cairo "/lib:" gtk+ "/lib"))
3485 (setenv "HOME" (getcwd))
3486 (call-with-output-file "setup.cfg"
3487 (lambda (port)
3488 (format port "[directories]~%
3489 basedirlist = ~a,~a~%
3490 [rc_options]~%
3491 backend = TkAgg~%"
3492 (assoc-ref inputs "tcl")
3493 (assoc-ref inputs "tk")))))
3494 #t)))))
3495 (home-page "http://matplotlib.org")
3496 (synopsis "2D plotting library for Python")
3497 (description
3498 "Matplotlib is a Python 2D plotting library which produces publication
3499 quality figures in a variety of hardcopy formats and interactive environments
3500 across platforms. Matplotlib can be used in Python scripts, the python and
3501 ipython shell, web application servers, and six graphical user interface
3502 toolkits.")
3503 (license license:psfl)
3504 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3505
3506 (define-public python2-matplotlib
3507 (let ((matplotlib (package-with-python2
3508 (strip-python2-variant python-matplotlib))))
3509 (package (inherit matplotlib)
3510 ;; Make sure to use special packages for Python 2 instead
3511 ;; of those automatically rewritten by package-with-python2.
3512 (propagated-inputs
3513 `(("python2-pycairo" ,python2-pycairo)
3514 ("python2-backports-functools-lru-cache"
3515 ,python2-backports-functools-lru-cache)
3516 ("python2-functools32" ,python2-functools32)
3517 ("python2-pygobject-2" ,python2-pygobject-2)
3518 ("python2-subprocess32" ,python2-subprocess32)
3519 ("python2-tkinter" ,python-2 "tk")
3520 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3521 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
3522
3523 (define-public python-matplotlib-documentation
3524 (package
3525 (name "python-matplotlib-documentation")
3526 (version (package-version python-matplotlib))
3527 (source (package-source python-matplotlib))
3528 (build-system python-build-system)
3529 (native-inputs
3530 `(("python-matplotlib" ,python-matplotlib)
3531 ("python-colorspacious" ,python-colorspacious)
3532 ("python-sphinx" ,python-sphinx)
3533 ("python-sphinx-gallery" ,python-sphinx-gallery)
3534 ("python-numpydoc" ,python-numpydoc)
3535 ("python-ipython" ,python-ipython)
3536 ("python-mock" ,python-mock)
3537 ("graphviz" ,graphviz)
3538 ("texlive" ,texlive)
3539 ("texinfo" ,texinfo)
3540 ,@(package-native-inputs python-matplotlib)))
3541 (arguments
3542 `(#:tests? #f ; we're only generating documentation
3543 #:phases
3544 (modify-phases %standard-phases
3545 (replace 'build
3546 (lambda _
3547 (chdir "doc")
3548 ;; Produce pdf in 'A4' format.
3549 (substitute* "conf.py"
3550 (("latex_paper_size = 'letter'") "")
3551 ;; latex_paper_size is deprecated -> set paper size using
3552 ;; latex_elements
3553 (("latex_elements\\['pointsize'\\] = '11pt'" match)
3554 ;; insert at a point where latex_elements{} is defined:
3555 (string-append match "\nlatex_elements['papersize'] = 'a4paper'")))
3556 (invoke "make" "SPHINXBUILD=sphinx-build" "html" "latex" "texinfo")))
3557 (replace 'install
3558 (lambda* (#:key inputs outputs #:allow-other-keys)
3559 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3560 (doc (string-append data "/doc/python-matplotlib-" ,version))
3561 (info (string-append data "/info"))
3562 (html (string-append doc "/html")))
3563 (mkdir-p html)
3564 (mkdir-p info)
3565 (copy-recursively "build/html" html)
3566 (symlink (string-append html "/_images")
3567 (string-append info "/matplotlib-figures"))
3568 (with-directory-excursion "build/texinfo"
3569 (substitute* "matplotlib.texi"
3570 (("@image\\{([^,]*)" all file)
3571 (string-append "@image{matplotlib-figures/" file)))
3572 (symlink (string-append html "/_images")
3573 "./matplotlib-figures")
3574 (system* "makeinfo" "--no-split"
3575 "-o" "matplotlib.info" "matplotlib.texi"))
3576 (copy-file "build/texinfo/matplotlib.info"
3577 (string-append info "/matplotlib.info"))
3578 (copy-file "build/latex/Matplotlib.pdf"
3579 (string-append doc "/Matplotlib.pdf")))
3580 #t)))))
3581 (home-page (package-home-page python-matplotlib))
3582 (synopsis "Documentation for the python-matplotlib package")
3583 (description (package-description python-matplotlib))
3584 (license (package-license python-matplotlib))))
3585
3586 (define-public python2-matplotlib-documentation
3587 (package-with-python2 python-matplotlib-documentation))
3588
3589 (define-public python2-pysnptools
3590 (package
3591 (name "python2-pysnptools")
3592 (version "0.3.13")
3593 (source
3594 (origin
3595 (method url-fetch)
3596 (uri (pypi-uri "pysnptools" version))
3597 (sha256
3598 (base32
3599 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
3600 (build-system python-build-system)
3601 (arguments
3602 `(#:python ,python-2 ; only Python 2.7 is supported
3603 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
3604 (propagated-inputs
3605 `(("python2-numpy" ,python2-numpy)
3606 ("python2-scipy" ,python2-scipy)
3607 ("python2-pandas" ,python2-pandas)))
3608 (native-inputs
3609 `(("python2-cython" ,python2-cython)))
3610 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
3611 (synopsis "Library for reading and manipulating genetic data")
3612 (description
3613 "PySnpTools is a library for reading and manipulating genetic data. It
3614 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
3615 those files. It can also efficiently manipulate ranges of integers using set
3616 operators such as union, intersection, and difference.")
3617 (license license:asl2.0)))
3618
3619 (define-public python-scipy
3620 (package
3621 (name "python-scipy")
3622 (version "1.1.0")
3623 (source
3624 (origin
3625 (method url-fetch)
3626 (uri (pypi-uri "scipy" version))
3627 (sha256
3628 (base32
3629 "1lfg686w6vv2m2dfs8v9d0bf2i18z7wz5vgzjnkgmpr4hi0550w7"))))
3630 (build-system python-build-system)
3631 (propagated-inputs
3632 `(("python-numpy" ,python-numpy)
3633 ("python-matplotlib" ,python-matplotlib)
3634 ("python-pyparsing" ,python-pyparsing)))
3635 (inputs
3636 `(("lapack" ,lapack)
3637 ("openblas" ,openblas)))
3638 (native-inputs
3639 `(("python-cython" ,python-cython)
3640 ("python-pytest" ,python-pytest)
3641 ("python-sphinx" ,python-sphinx)
3642 ("python-numpydoc" ,python-numpydoc)
3643 ("gfortran" ,gfortran)
3644 ("perl" ,perl)
3645 ("which" ,which)))
3646 (outputs '("out" "doc"))
3647 (arguments
3648 `(#:phases
3649 (modify-phases %standard-phases
3650 (add-after 'unpack 'disable-broken-tests
3651 (lambda _
3652 (substitute* "scipy/sparse/linalg/dsolve/tests/test_linsolve.py"
3653 (("^( +)def test_threads_parallel\\(self\\):" m indent)
3654 (string-append indent
3655 "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
3656 m)))
3657 (substitute* "scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py"
3658 (("^def test_parallel_threads\\(\\):" m)
3659 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
3660 m)))
3661 #t))
3662 (add-before 'build 'configure-openblas
3663 (lambda* (#:key inputs #:allow-other-keys)
3664 (call-with-output-file "site.cfg"
3665 (lambda (port)
3666 (format port
3667 "[blas]
3668 libraries = openblas
3669 library_dirs = ~a/lib
3670 include_dirs = ~a/include
3671
3672 # backslash-n to make emacs happy
3673 \n[atlas]
3674 library_dirs = ~a/lib
3675 atlas_libs = openblas
3676 "
3677 (assoc-ref inputs "openblas")
3678 (assoc-ref inputs "openblas")
3679 (assoc-ref inputs "openblas"))))
3680 #t))
3681 (add-after 'install 'install-doc
3682 (lambda* (#:key inputs outputs #:allow-other-keys)
3683 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3684 (doc (string-append data "/doc/" ,name "-" ,version))
3685 (html (string-append doc "/html"))
3686 (pyver ,(string-append "PYVER=" (version-major+minor
3687 (package-version python))))
3688 ;; By default it tries to run sphinx-build through the Python
3689 ;; interpreter which won't work with our shell wrapper.
3690 (sphinxbuild "SPHINXBUILD=LANG=C sphinx-build"))
3691 ;; Make installed package available for building the
3692 ;; documentation
3693 (add-installed-pythonpath inputs outputs)
3694 (with-directory-excursion "doc"
3695 ;; Fix generation of images for mathematical expressions.
3696 (substitute* (find-files "source" "conf\\.py")
3697 (("pngmath_use_preview = True")
3698 "pngmath_use_preview = False"))
3699 (mkdir-p html)
3700 (invoke "make" "html" pyver sphinxbuild)
3701 (with-directory-excursion "build/html"
3702 (for-each (lambda (file)
3703 (let* ((dir (dirname file))
3704 (tgt-dir (string-append html "/" dir)))
3705 (install-file file html)))
3706 (find-files "." ".*")))))
3707 #t))
3708 ;; Tests can only be run after the library has been installed and not
3709 ;; within the source directory.
3710 (delete 'check)
3711 (add-after 'install 'check
3712 (lambda* (#:key inputs outputs #:allow-other-keys)
3713 (add-installed-pythonpath inputs outputs)
3714 (with-directory-excursion "/tmp"
3715 (invoke "python" "-c"
3716 "import scipy; scipy.test(verbose=2)")))))))
3717 (home-page "https://www.scipy.org/")
3718 (synopsis "The Scipy library provides efficient numerical routines")
3719 (description "The SciPy library is one of the core packages that make up
3720 the SciPy stack. It provides many user-friendly and efficient numerical
3721 routines such as routines for numerical integration and optimization.")
3722 (properties `((python2-variant . ,(delay python2-scipy))))
3723 (license license:bsd-3)))
3724
3725 (define-public python2-scipy
3726 (package-with-python2
3727 (strip-python2-variant python-scipy)))
3728
3729 (define-public python-socksipy-branch
3730 (package
3731 (name "python-socksipy-branch")
3732 (version "1.01")
3733 (source
3734 (origin
3735 (method url-fetch)
3736 (uri (pypi-uri "SocksiPy-branch" version))
3737 (sha256
3738 (base32
3739 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
3740 (build-system python-build-system)
3741 (arguments
3742 `(#:tests? #f)) ; There are no tests
3743 (home-page "https://code.google.com/archive/p/socksipy-branch/")
3744 (synopsis "Python SOCKS module")
3745 (description
3746 "SocksiPy - A Python SOCKS client module. It provides a
3747 socket-like interface that supports connections to any TCP
3748 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
3749 The original version was developed by Dan Haim, this is a
3750 branch created by Mario Vilas to address some open issues,
3751 as the original project seems to have been abandoned circa 2007.")
3752 (license license:bsd-3)))
3753
3754 (define-public python2-socksipy-branch
3755 (package-with-python2 python-socksipy-branch))
3756
3757 (define-public python-pycodestyle
3758 (package
3759 (name "python-pycodestyle")
3760 (version "2.4.0")
3761 (source
3762 (origin
3763 (method url-fetch)
3764 (uri (pypi-uri "pycodestyle" version))
3765 (sha256
3766 (base32
3767 "0fhy4vnlgpjq4qd1wdnl6pvdw7rah0ypmn8c9mkhz8clsndskz6b"))))
3768 (build-system python-build-system)
3769 (home-page "https://pycodestyle.readthedocs.io/")
3770 (synopsis "Python style guide checker")
3771 (description "@code{pycodestyle} (formerly pep8) is a tool to check
3772 Python code against some of the style conventions in
3773 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
3774 (license license:expat)))
3775
3776 (define-public python2-pycodestyle
3777 (package-with-python2 python-pycodestyle))
3778
3779 (define-public python-multidict
3780 (package
3781 (name "python-multidict")
3782 (version "4.2.0")
3783 (source
3784 (origin
3785 (method url-fetch)
3786 (uri (pypi-uri "multidict" version))
3787 (sha256
3788 (base32
3789 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
3790 (build-system python-build-system)
3791 (native-inputs
3792 `(("python-pytest" ,python-pytest)
3793 ("python-pytest-runner" ,python-pytest-runner)))
3794 (home-page "https://github.com/aio-libs/multidict/")
3795 (synopsis "Multidict implementation")
3796 (description "Multidict is dict-like collection of key-value pairs
3797 where key might be occurred more than once in the container.")
3798 (license license:asl2.0)))
3799
3800 (define-public python-orderedmultidict
3801 (package
3802 (name "python-orderedmultidict")
3803 (version "0.7.11")
3804 (source
3805 (origin
3806 (method url-fetch)
3807 (uri (pypi-uri "orderedmultidict" version))
3808 (sha256
3809 (base32
3810 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
3811 (build-system python-build-system)
3812 (arguments
3813 `(#:phases
3814 (modify-phases %standard-phases
3815 (add-after 'unpack 'fix-tests
3816 (lambda _
3817 ;; The package uses nosetest for running the tests.
3818 ;; Adding this initfile allows to run the test suite
3819 ;; without requiring nosetest.
3820 (with-output-to-file "tests/__init__.py" newline)
3821 #t)))))
3822 (propagated-inputs
3823 `(("python-six" ,python-six)))
3824 (native-inputs
3825 `(("python-pycodestyle" ,python-pycodestyle)))
3826 (home-page "https://github.com/gruns/orderedmultidict")
3827 (synopsis "Python Ordered Multivalue Dictionary - omdict")
3828 (description "This package contains a library for ordered multivalue
3829 dictionaries. A multivalue dictionary is a dictionary that can store
3830 multiple values for the same key. An ordered multivalue dictionary is a
3831 multivalue dictionary that retains the order of insertions and deletions.")
3832 (license license:unlicense)))
3833
3834 (define-public python2-orderedmultidict
3835 (package-with-python2 python-orderedmultidict))
3836
3837 (define-public python-autopep8
3838 (package
3839 (name "python-autopep8")
3840 (version "1.3.5")
3841 (source
3842 (origin
3843 (method url-fetch)
3844 (uri (pypi-uri "autopep8" version))
3845 (sha256
3846 (base32
3847 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
3848 (build-system python-build-system)
3849 (propagated-inputs
3850 `(("python-pycodestyle" ,python-pycodestyle)))
3851 (home-page "https://github.com/hhatto/autopep8")
3852 (synopsis "Format Python code according to the PEP 8 style guide")
3853 (description
3854 "@code{autopep8} automatically formats Python code to conform to
3855 the PEP 8 style guide. It uses the pycodestyle utility to determine
3856 what parts of the code needs to be formatted. @code{autopep8} is
3857 capable of fixing most of the formatting issues that can be reported
3858 by pycodestyle.")
3859 (license (license:non-copyleft
3860 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
3861
3862 (define-public python2-autopep8
3863 (package-with-python2 python-autopep8))
3864
3865 (define-public python-distutils-extra
3866 (package
3867 (name "python-distutils-extra")
3868 (version "2.38")
3869 (source
3870 (origin
3871 (method url-fetch)
3872 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
3873 version "/+download/python-distutils-extra-"
3874 version ".tar.gz"))
3875 (sha256
3876 (base32
3877 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
3878 (build-system python-build-system)
3879 (home-page "https://launchpad.net/python-distutils-extra/")
3880 (synopsis "Enhancements to Python's distutils")
3881 (description
3882 "The python-distutils-extra module enables you to easily integrate
3883 gettext support, themed icons, and scrollkeeper-based documentation into
3884 Python's distutils.")
3885 (license license:gpl2)))
3886
3887 (define-public python2-distutils-extra
3888 (package-with-python2 python-distutils-extra))
3889
3890 (define-public python2-elib.intl
3891 (package
3892 (name "python2-elib.intl")
3893 (version "0.0.3")
3894 (source
3895 (origin
3896 ;; This project doesn't tag releases or publish tarballs, so we take
3897 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
3898 (method git-fetch)
3899 (uri (git-reference
3900 (url "https://github.com/dieterv/elib.intl.git")
3901 (commit "d09997cfef")))
3902 (file-name (string-append name "-" version "-checkout"))
3903 (sha256
3904 (base32
3905 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
3906 (build-system python-build-system)
3907 (arguments
3908 ;; incompatible with Python 3 (exception syntax)
3909 `(#:python ,python-2
3910 #:tests? #f))
3911 (home-page "https://github.com/dieterv/elib.intl")
3912 (synopsis "Enhanced internationalization for Python")
3913 (description
3914 "The elib.intl module provides enhanced internationalization (I18N)
3915 services for your Python modules and applications.")
3916 (license license:lgpl3+)))
3917
3918 (define-public python-olefile
3919 (package
3920 (name "python-olefile")
3921 (version "0.45.1")
3922 (source
3923 (origin
3924 (method url-fetch)
3925 (uri (string-append "https://github.com/decalage2/olefile/archive/v"
3926 version ".tar.gz"))
3927 (file-name (string-append name "-" version ".tar.gz"))
3928 (sha256
3929 (base32
3930 "18ai19zwagm6nli14k8bii31ipbab2rp7plrvsm6gmfql551a8ai"))))
3931 (build-system python-build-system)
3932 (home-page
3933 "https://www.decalage.info/python/olefileio")
3934 (synopsis "Read and write Microsoft OLE2 files.")
3935 (description
3936 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
3937 Storage or Compound Document, Microsoft Office). It is an improved version of
3938 the OleFileIO module from PIL, the Python Image Library.")
3939 (license license:bsd-3)))
3940
3941 (define-public python2-olefile
3942 (package-with-python2 python-olefile))
3943
3944 (define-public python-pillow
3945 (package
3946 (name "python-pillow")
3947 (version "5.4.1")
3948 (source
3949 (origin
3950 (method url-fetch)
3951 (uri (pypi-uri "Pillow" version))
3952 (sha256
3953 (base32
3954 "17waygkhhzjd75kajlfw9v57mbb41lcpg6cvkdijqd7smm76ccsj"))))
3955 (build-system python-build-system)
3956 (native-inputs
3957 `(("python-pytest" ,python-pytest)))
3958 (inputs
3959 `(("freetype" ,freetype)
3960 ("lcms" ,lcms)
3961 ("zlib" ,zlib)
3962 ("libjpeg" ,libjpeg)
3963 ("openjpeg" ,openjpeg)
3964 ("libtiff" ,libtiff)
3965 ("libwebp" ,libwebp)))
3966 (propagated-inputs
3967 `(("python-olefile" ,python-olefile)))
3968 (arguments
3969 `(#:phases
3970 (modify-phases %standard-phases
3971 (add-after 'unpack 'patch-ldconfig
3972 (lambda _
3973 (substitute* "setup.py"
3974 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
3975 (delete 'check) ; We must run checks after python-pillow is installed.
3976 (add-after 'install 'check-installed
3977 (lambda* (#:key outputs inputs #:allow-other-keys)
3978 (begin
3979 (setenv "HOME" (getcwd))
3980 ;; Make installed package available for running the tests.
3981 (add-installed-pythonpath inputs outputs)
3982 (invoke "python" "selftest.py" "--installed")
3983 (invoke "python" "-m" "pytest" "-vv")))))))
3984 (home-page "https://python-pillow.org")
3985 (synopsis "Fork of the Python Imaging Library")
3986 (description
3987 "The Python Imaging Library adds image processing capabilities to your
3988 Python interpreter. This library provides extensive file format support, an
3989 efficient internal representation, and fairly powerful image processing
3990 capabilities. The core image library is designed for fast access to data
3991 stored in a few basic pixel formats. It should provide a solid foundation for
3992 a general image processing tool.")
3993 (license (license:x11-style
3994 "http://www.pythonware.com/products/pil/license.htm"
3995 "The PIL Software License"))))
3996
3997 (define-public python2-pillow
3998 (package-with-python2 python-pillow))
3999
4000 (define-public python-pycparser
4001 (package
4002 (name "python-pycparser")
4003 (version "2.18")
4004 (source
4005 (origin
4006 (method url-fetch)
4007 (uri (pypi-uri "pycparser" version))
4008 (sha256
4009 (base32
4010 "09mjyw82ibqzl449g7swy8bfxnfpmas0815d2rkdjlcqw81wma4r"))))
4011 (outputs '("out" "doc"))
4012 (build-system python-build-system)
4013 (native-inputs
4014 `(("pkg-config" ,pkg-config)))
4015 (arguments
4016 `(#:phases
4017 (modify-phases %standard-phases
4018 (replace 'check
4019 (lambda _
4020 (with-directory-excursion "tests"
4021 (invoke "python" "all_tests.py"))
4022 #t))
4023 (add-after 'install 'install-doc
4024 (lambda* (#:key outputs #:allow-other-keys)
4025 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4026 (doc (string-append data "/doc/" ,name "-" ,version))
4027 (examples (string-append doc "/examples")))
4028 (mkdir-p examples)
4029 (for-each (lambda (file)
4030 (copy-file (string-append "." file)
4031 (string-append doc file)))
4032 '("/README.rst" "/CHANGES" "/LICENSE"))
4033 (copy-recursively "examples" examples)))))))
4034 (home-page "https://github.com/eliben/pycparser")
4035 (synopsis "C parser in Python")
4036 (description
4037 "Pycparser is a complete parser of the C language, written in pure Python
4038 using the PLY parsing library. It parses C code into an AST and can serve as
4039 a front-end for C compilers or analysis tools.")
4040 (license license:bsd-3)))
4041
4042 (define-public python2-pycparser
4043 (package-with-python2 python-pycparser))
4044
4045 (define-public python-pywavelets
4046 (package
4047 (name "python-pywavelets")
4048 (version "1.0.1")
4049 (home-page "https://github.com/PyWavelets/pywt")
4050 (source (origin
4051 (method url-fetch)
4052 (uri (pypi-uri "PyWavelets" version))
4053 (sha256
4054 (base32
4055 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
4056 (build-system python-build-system)
4057 (arguments
4058 '(#:modules ((ice-9 ftw)
4059 (srfi srfi-1)
4060 (srfi srfi-26)
4061 (guix build utils)
4062 (guix build python-build-system))
4063 #:phases (modify-phases %standard-phases
4064 (replace 'check
4065 (lambda _
4066 (let ((cwd (getcwd))
4067 (libdir (find (cut string-prefix? "lib." <>)
4068 (scandir "build"))))
4069 (with-directory-excursion (string-append cwd "/build/" libdir)
4070 (invoke "nosetests" "-v" "."))))))))
4071 (native-inputs
4072 `(("python-matplotlib" ,python-matplotlib) ;for tests
4073 ("python-nose" ,python-nose)))
4074 (propagated-inputs
4075 `(("python-numpy" ,python-numpy)))
4076 (synopsis "Wavelet transforms in Python")
4077 (description
4078 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
4079 mathematical basis functions that are localized in both time and frequency.
4080 Wavelet transforms are time-frequency transforms employing wavelets. They are
4081 similar to Fourier transforms, the difference being that Fourier transforms are
4082 localized only in frequency instead of in time and frequency.")
4083 (license license:expat)))
4084
4085 (define-public python2-pywavelets
4086 (package-with-python2 python-pywavelets))
4087
4088 (define-public python-xcffib
4089 (package
4090 (name "python-xcffib")
4091 (version "0.6.0")
4092 (source
4093 (origin
4094 (method url-fetch)
4095 (uri (pypi-uri "xcffib" version))
4096 (sha256
4097 (base32
4098 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
4099 (build-system python-build-system)
4100 (inputs
4101 `(("libxcb" ,libxcb)))
4102 (propagated-inputs
4103 `(("python-cffi" ,python-cffi) ; used at run time
4104 ("python-six" ,python-six)))
4105 (arguments
4106 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4107 #:tests? #f
4108 #:phases
4109 (modify-phases %standard-phases
4110 (add-after 'unpack 'fix-libxcb-path
4111 (lambda* (#:key inputs #:allow-other-keys)
4112 (let ((libxcb (assoc-ref inputs "libxcb")))
4113 (substitute* '("xcffib/__init__.py")
4114 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4115 #t)))
4116 (add-after 'install 'install-doc
4117 (lambda* (#:key outputs #:allow-other-keys)
4118 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4119 "/doc/" ,name "-" ,version)))
4120 (mkdir-p doc)
4121 (copy-file "README.md"
4122 (string-append doc "/README.md"))
4123 #t))))))
4124 (home-page "https://github.com/tych0/xcffib")
4125 (synopsis "XCB Python bindings")
4126 (description
4127 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4128 support for Python 3 and PyPy. It is based on cffi.")
4129 (license license:expat)))
4130
4131 (define-public python2-xcffib
4132 (package-with-python2 python-xcffib))
4133
4134 (define-public python-cairocffi
4135 (package
4136 (name "python-cairocffi")
4137 (version "0.9.0")
4138 (source
4139 (origin
4140 (method url-fetch)
4141 (uri (pypi-uri "cairocffi" version))
4142 (sha256
4143 (base32
4144 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
4145 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
4146 (build-system python-build-system)
4147 (outputs '("out" "doc"))
4148 (inputs
4149 `(("glib" ,glib)
4150 ("gtk+" ,gtk+)
4151 ("gdk-pixbuf" ,gdk-pixbuf)
4152 ("cairo" ,cairo)
4153 ("pango" ,pango)))
4154 (native-inputs
4155 `(("pkg-config" ,pkg-config)
4156 ("python-pytest" ,python-pytest)
4157 ("python-pytest-cov" ,python-pytest-cov)
4158 ("python-pytest-runner" ,python-pytest-runner)
4159 ("python-sphinx" ,python-sphinx)
4160 ("python-docutils" ,python-docutils)))
4161 (propagated-inputs
4162 `(("python-xcffib" ,python-xcffib))) ; used at run time
4163 (arguments
4164 `(#:phases
4165 (modify-phases %standard-phases
4166 (add-after 'unpack 'patch-paths
4167 (lambda* (#:key inputs outputs #:allow-other-keys)
4168 (substitute* (find-files "." "\\.py$")
4169 (("dlopen\\(ffi, 'cairo'")
4170 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
4171 "/lib/libcairo.so.2'"))
4172 (("dlopen\\(ffi, 'gdk-3'")
4173 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
4174 "/lib/libgtk-3.so.0'"))
4175 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
4176 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
4177 "/lib/libgdk_pixbuf-2.0.so.0'"))
4178 (("dlopen\\(ffi, 'glib-2.0'")
4179 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4180 "/lib/libglib-2.0.so.0'"))
4181 (("dlopen\\(ffi, 'gobject-2.0'")
4182 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4183 "/lib/libgobject-2.0.so.0'"))
4184 (("dlopen\\(ffi, 'pangocairo-1.0'")
4185 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4186 "/lib/libpangocairo-1.0.so.0'"))
4187 (("dlopen\\(ffi, 'pango-1.0'")
4188 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4189 "/lib/libpango-1.0.so.0'")))
4190 #t))
4191 (add-after 'install 'install-doc
4192 (lambda* (#:key inputs outputs #:allow-other-keys)
4193 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4194 (doc (string-append data "/doc/" ,name "-" ,version))
4195 (html (string-append doc "/html")))
4196 (setenv "LD_LIBRARY_PATH"
4197 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4198 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4199 (setenv "LANG" "en_US.UTF-8")
4200 (mkdir-p html)
4201 (for-each (lambda (file)
4202 (copy-file (string-append "." file)
4203 (string-append doc file)))
4204 '("/README.rst" "/CHANGES" "/LICENSE"))
4205 (system* "python" "setup.py" "build_sphinx")
4206 (copy-recursively "docs/_build/html" html)
4207 #t))))))
4208 (home-page "https://github.com/Kozea/cairocffi")
4209 (synopsis "Python bindings and object-oriented API for Cairo")
4210 (description
4211 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4212 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4213 graphics library with support for multiple backends including image buffers,
4214 PNG, PostScript, PDF, and SVG file output.")
4215 (license license:bsd-3)))
4216
4217 (define-public python2-cairocffi
4218 (package-with-python2 python-cairocffi))
4219
4220 (define-public python-decorator
4221 (package
4222 (name "python-decorator")
4223 (version "4.3.0")
4224 (source
4225 (origin
4226 (method url-fetch)
4227 (uri (pypi-uri "decorator" version))
4228 (sha256
4229 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
4230 (build-system python-build-system)
4231 (home-page "https://pypi.python.org/pypi/decorator/")
4232 (synopsis "Python module to simplify usage of decorators")
4233 (description
4234 "The aim of the decorator module is to simplify the usage of decorators
4235 for the average programmer, and to popularize decorators usage giving examples
4236 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4237 etc. The core of this module is a decorator factory.")
4238 (license license:expat)))
4239
4240 (define-public python2-decorator
4241 (package-with-python2 python-decorator))
4242
4243 (define-public python-drmaa
4244 (package
4245 (name "python-drmaa")
4246 (version "0.7.7")
4247 (source
4248 (origin
4249 (method url-fetch)
4250 (uri (pypi-uri "drmaa" version))
4251 (sha256
4252 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4253 (build-system python-build-system)
4254 ;; The test suite requires libdrmaa which is provided by the cluster
4255 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4256 ;; should be set to the path of the libdrmaa library.
4257 (arguments '(#:tests? #f))
4258 (native-inputs
4259 `(("python-nose" ,python-nose)))
4260 (home-page "https://pypi.python.org/pypi/drmaa")
4261 (synopsis "Python bindings for the DRMAA library")
4262 (description
4263 "A Python package for Distributed Resource Management (DRM) job
4264 submission and control. This package is an implementation of the DRMAA 1.0
4265 Python language binding specification.")
4266 (license license:bsd-3)))
4267
4268 (define-public python2-drmaa
4269 (package-with-python2 python-drmaa))
4270
4271 (define-public python-grako
4272 (package
4273 (name "python-grako")
4274 (version "3.99.9")
4275 (source
4276 (origin
4277 (method url-fetch)
4278 (uri
4279 (pypi-uri "grako" version ".zip"))
4280 (sha256
4281 (base32
4282 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4283 (build-system python-build-system)
4284 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4285 (native-inputs
4286 `(("unzip" ,unzip)
4287 ("python-pytest" ,python-pytest)
4288 ("python-pytest-runner" ,python-pytest-runner)))
4289 (home-page "https://bitbucket.org/neogeny/grako")
4290 (synopsis "EBNF parser generator")
4291 (description
4292 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4293 memoizing PEG/Packrat parser in Python.")
4294 (license license:bsd-3)))
4295
4296 (define-public python2-grako
4297 (package-with-python2 python-grako))
4298
4299 (define-public python-gridmap
4300 (package
4301 (name "python-gridmap")
4302 (version "0.13.0")
4303 (source
4304 (origin
4305 (method url-fetch)
4306 (uri (string-append
4307 "https://github.com/pygridtools/gridmap/archive/v"
4308 version ".tar.gz"))
4309 (file-name (string-append name "-" version ".tar.gz"))
4310 (sha256
4311 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
4312 (build-system python-build-system)
4313 (arguments
4314 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4315 (propagated-inputs
4316 `(("python-psutil" ,python-psutil)
4317 ("python-drmaa" ,python-drmaa)
4318 ("python-pyzmq" ,python-pyzmq)))
4319 (home-page "https://github.com/pygridtools/gridmap")
4320 (synopsis "Create jobs on a cluster directly from Python")
4321 (description
4322 "Gridmap is a Python package to allow you to easily create jobs on the
4323 cluster directly from Python. You can directly map Python functions onto the
4324 cluster without needing to write any wrapper code yourself.")
4325 (license license:gpl3+)))
4326
4327 (define-public python2-gridmap
4328 (package-with-python2 python-gridmap))
4329
4330 (define-public python-honcho
4331 (package
4332 (name "python-honcho")
4333 (version "1.0.1")
4334 (source
4335 (origin
4336 (method url-fetch)
4337 (uri (string-append
4338 "https://github.com/nickstenning/honcho/archive/v"
4339 version ".tar.gz"))
4340 (file-name (string-append name "-" version ".tar.gz"))
4341 (sha256
4342 (base32 "0zizn61n5z5hq421hkypk9pw8s6fpxw30f4hsg7k4ivwzy3gjw9j"))))
4343 (build-system python-build-system)
4344 (native-inputs
4345 `(("python-pytest" ,python-pytest)
4346 ("python-mock" ,python-mock)
4347 ("python-tox" ,python-tox)
4348 ("which" ,which))) ;for tests
4349 (propagated-inputs
4350 `(("python-jinja2" ,python-jinja2)))
4351 (arguments
4352 `(#:phases
4353 (modify-phases %standard-phases
4354 (delete 'check)
4355 (add-after 'install 'check
4356 (lambda* (#:key outputs inputs #:allow-other-keys)
4357 ;; fix honcho path in testsuite
4358 (substitute* "tests/conftest.py"
4359 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
4360 "/bin/honcho" "'")))
4361 ;; It's easier to run tests after install.
4362 ;; Make installed package available for running the tests
4363 (add-installed-pythonpath inputs outputs)
4364 (invoke "py.test" "-v"))))))
4365 (home-page "https://github.com/nickstenning/honcho")
4366 (synopsis "Manage Procfile-based applications")
4367 (description
4368 "A Procfile is a file which describes how to run an application
4369 consisting of serveral processes. honcho starts all listed processes.
4370 The output of all running processes is collected by honcho and
4371 displayed.")
4372 (license license:expat)))
4373
4374 (define-public python2-honcho
4375 (package-with-python2 python-honcho))
4376
4377 (define-public python-pexpect
4378 (package
4379 (name "python-pexpect")
4380 (version "4.6.0")
4381 (source
4382 (origin
4383 (method url-fetch)
4384 (uri (pypi-uri "pexpect" version))
4385 (sha256
4386 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
4387 (build-system python-build-system)
4388 (arguments
4389 `(#:phases
4390 (modify-phases %standard-phases
4391 (add-before 'check 'prepare-tests
4392 (lambda _
4393 (substitute* (find-files "tests")
4394 (("/bin/ls") (which "ls"))
4395 (("/bin/echo") (which "echo"))
4396 (("/bin/which") (which "which"))
4397 ;; Many tests try to use the /bin directory which
4398 ;; is not present in the build environment.
4399 ;; Use one that's non-empty and unlikely to change.
4400 (("/bin'") "/dev'"))
4401 ;; XXX: Socket connection test gets "Connection reset by peer".
4402 ;; Why does it not work? Delete for now.
4403 (delete-file "tests/test_socket.py")
4404 #t))
4405 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
4406 (native-inputs
4407 `(("python-nose" ,python-nose)
4408 ("python-pytest" ,python-pytest)
4409 ("man-db" ,man-db)
4410 ("which" ,which)
4411 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
4412 (propagated-inputs
4413 `(("python-ptyprocess" ,python-ptyprocess)))
4414 (home-page "http://pexpect.readthedocs.org/")
4415 (synopsis "Controlling interactive console applications")
4416 (description
4417 "Pexpect is a pure Python module for spawning child applications;
4418 controlling them; and responding to expected patterns in their output.
4419 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4420 child application and control it as if a human were typing commands.")
4421 (license license:isc)))
4422
4423 (define-public python2-pexpect
4424 (package-with-python2 python-pexpect))
4425
4426 (define-public python-setuptools-scm
4427 (package
4428 (name "python-setuptools-scm")
4429 (version "3.1.0")
4430 (source (origin
4431 (method url-fetch)
4432 (uri (pypi-uri "setuptools_scm" version))
4433 (sha256
4434 (base32
4435 "0h4bglwfz8b9prqljv8z3w9rgydfyxzaj05bm1y6zs5m6shz548i"))))
4436 (build-system python-build-system)
4437 (home-page "https://github.com/pypa/setuptools_scm/")
4438 (synopsis "Manage Python package versions in SCM metadata")
4439 (description
4440 "Setuptools_scm handles managing your Python package versions in
4441 @dfn{software configuration management} (SCM) metadata instead of declaring
4442 them as the version argument or in a SCM managed file.")
4443 (license license:expat)))
4444
4445 (define-public python2-setuptools-scm
4446 (package-with-python2 python-setuptools-scm))
4447
4448 (define-public python-pathpy
4449 (package
4450 (name "python-pathpy")
4451 (version "11.0.1")
4452 (source
4453 (origin
4454 (method url-fetch)
4455 (uri (pypi-uri "path.py" version))
4456 (sha256
4457 (base32 "07x15v8c7ry9bvycw294c9yq6ky9v2b0dalvgi6rn38ilh69vsz7"))))
4458 ;; (outputs '("out" "doc"))
4459 (build-system python-build-system)
4460 (propagated-inputs
4461 `(("python-appdirs" ,python-appdirs)))
4462 (native-inputs
4463 `(("python-setuptools-scm" ,python-setuptools-scm)
4464 ("python-sphinx" ,python-sphinx)
4465 ("python-rst.linker" ,python-rst.linker)
4466 ("python-pytest" ,python-pytest)
4467 ("python-pytest-runner" ,python-pytest-runner)))
4468 (arguments
4469 ;; FIXME: Documentation and tests require "jaraco.packaging".
4470 `(#:tests? #f))
4471 ;; #:phases
4472 ;; (modify-phases %standard-phases
4473 ;; (add-after 'build 'build-doc
4474 ;; (lambda _
4475 ;; (setenv "LANG" "en_US.UTF-8")
4476 ;; (zero? (system* "python" "setup.py" "build_sphinx"))))
4477 ;; (add-after 'install 'install-doc
4478 ;; (lambda* (#:key outputs #:allow-other-keys)
4479 ;; (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4480 ;; (doc (string-append data "/doc/" ,name "-" ,version))
4481 ;; (html (string-append doc "/html")))
4482 ;; (mkdir-p html)
4483 ;; (for-each (lambda (file)
4484 ;; (copy-file file (string-append doc "/" file)))
4485 ;; '("README.rst" "CHANGES.rst"))
4486 ;; (copy-recursively "build/sphinx/html" html)))))))
4487 (home-page "https://github.com/jaraco/path.py")
4488 (synopsis "Python module wrapper for built-in os.path")
4489 (description
4490 "@code{path.py} implements path objects as first-class entities, allowing
4491 common operations on files to be invoked on those path objects directly.")
4492 (license license:expat)))
4493
4494 (define-public python2-pathpy
4495 (package-with-python2 python-pathpy))
4496
4497 (define-public python-simplegeneric
4498 (package
4499 (name "python-simplegeneric")
4500 (version "0.8.1")
4501 (source
4502 (origin
4503 (method url-fetch)
4504 (uri (pypi-uri "simplegeneric" version ".zip"))
4505 (sha256
4506 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
4507 (build-system python-build-system)
4508 (native-inputs
4509 `(("unzip" ,unzip)))
4510 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
4511 (synopsis "Python module for simple generic functions")
4512 (description
4513 "The simplegeneric module lets you define simple single-dispatch generic
4514 functions, akin to Python’s built-in generic functions like @code{len()},
4515 @code{iter()} and so on. However, instead of using specially-named methods,
4516 these generic functions use simple lookup tables, akin to those used by
4517 e.g. @code{pickle.dump()} and other generic functions found in the Python
4518 standard library.")
4519 (license license:zpl2.1)))
4520
4521 (define-public python2-simplegeneric
4522 (package-with-python2 python-simplegeneric))
4523
4524 (define-public python-ipython-genutils
4525 ;; TODO: This package is retired, check if can be removed, see description.
4526 (package
4527 (name "python-ipython-genutils")
4528 (version "0.1.0")
4529 (source
4530 (origin
4531 (method url-fetch)
4532 (uri (pypi-uri "ipython_genutils" version))
4533 (sha256
4534 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
4535 (build-system python-build-system)
4536 (arguments `(#:tests? #f)) ; no tests
4537 (home-page "https://ipython.org")
4538 (synopsis "Vestigial utilities from IPython")
4539 (description
4540 "This package provides retired utilities from IPython. No packages
4541 outside IPython/Jupyter should depend on it.
4542
4543 This package shouldn't exist. It contains some common utilities shared by
4544 Jupyter and IPython projects during The Big Split. As soon as possible, those
4545 packages will remove their dependency on this, and this package will go
4546 away.")
4547 (license license:bsd-3)))
4548
4549 (define-public python2-ipython-genutils
4550 (package-with-python2 python-ipython-genutils))
4551
4552 (define-public python-traitlets
4553 (package
4554 (name "python-traitlets")
4555 (version "4.3.2")
4556 (source
4557 (origin
4558 (method url-fetch)
4559 (uri (pypi-uri "traitlets" version))
4560 (sha256
4561 (base32
4562 "0dbq7sx26xqz5ixs711k5nc88p8a0nqyz6162pwks5dpcz9d4jww"))))
4563 (build-system python-build-system)
4564 (arguments
4565 `(#:phases
4566 (modify-phases %standard-phases
4567 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
4568 (propagated-inputs
4569 `(("python-ipython-genutils" ,python-ipython-genutils)
4570 ("python-decorator" ,python-decorator))) ;not needed for >4.3.2
4571 (native-inputs
4572 `(("python-pytest" ,python-pytest)))
4573 (properties `((python2-variant . ,(delay python2-traitlets))))
4574 (home-page "https://ipython.org")
4575 (synopsis "Configuration system for Python applications")
4576 (description
4577 "Traitlets is a framework that lets Python classes have attributes with
4578 type checking, dynamically calculated default values, and ‘on change’
4579 callbacks. The package also includes a mechanism to use traitlets for
4580 configuration, loading values from files or from command line arguments. This
4581 is a distinct layer on top of traitlets, so you can use traitlets in your code
4582 without using the configuration machinery.")
4583 (license license:bsd-3)))
4584
4585 (define-public python2-traitlets
4586 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
4587 (package
4588 (inherit traitlets)
4589 (propagated-inputs
4590 `(("python2-enum34" ,python2-enum34)
4591 ,@(package-propagated-inputs traitlets))))))
4592
4593 (define-public python-jupyter-core
4594 (package
4595 (name "python-jupyter-core")
4596 (version "4.4.0")
4597 (source
4598 (origin
4599 (method url-fetch)
4600 (uri (string-append (pypi-uri "jupyter_core" version)))
4601 (sha256
4602 (base32
4603 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
4604 (build-system python-build-system)
4605 ;; FIXME: not sure how to run the tests
4606 (arguments `(#:tests? #f))
4607 (propagated-inputs
4608 `(("python-traitlets" ,python-traitlets)))
4609 (home-page "http://jupyter.org/")
4610 (synopsis "Jupyter base package")
4611 (description
4612 "Jupyter core is the base package on which Jupyter projects rely.")
4613 (license license:bsd-3)))
4614
4615 (define-public python2-jupyter-core
4616 (package-with-python2 python-jupyter-core))
4617
4618 (define-public python-jupyter-client
4619 (package
4620 (name "python-jupyter-client")
4621 (version "5.2.4")
4622 (source
4623 (origin
4624 (method url-fetch)
4625 (uri (pypi-uri "jupyter_client" version))
4626 (sha256
4627 (base32
4628 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
4629 (build-system python-build-system)
4630 ;; Tests fail because of missing native python kernel which I assume is
4631 ;; provided by the ipython package, which we cannot use because it would
4632 ;; cause a dependency cycle.
4633 (arguments `(#:tests? #f))
4634 (propagated-inputs
4635 `(("python-pyzmq" ,python-pyzmq)
4636 ("python-traitlets" ,python-traitlets)
4637 ("python-jupyter-core" ,python-jupyter-core)))
4638 (home-page "http://jupyter.org/")
4639 (synopsis "Jupyter protocol implementation and client libraries")
4640 (description
4641 "The @code{jupyter_client} package contains the reference implementation
4642 of the Jupyter protocol. It also provides client and kernel management APIs
4643 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
4644 installing @code{kernelspec}s for use with Jupyter frontends.")
4645 (license license:bsd-3)))
4646
4647 (define-public python2-jupyter-client
4648 (package-with-python2 python-jupyter-client))
4649
4650 (define-public python-ipykernel
4651 (package
4652 (name "python-ipykernel")
4653 (version "5.1.0")
4654 (source
4655 (origin
4656 (method url-fetch)
4657 (uri (pypi-uri "ipykernel" version))
4658 (sha256
4659 (base32 "0br95qhrd5k65g10djngiy27hs0642301hlf2q142i8djabvzh0g"))))
4660 (build-system python-build-system)
4661 (arguments
4662 `(#:phases
4663 (modify-phases %standard-phases
4664 (replace 'check
4665 (lambda _
4666 (setenv "HOME" "/tmp")
4667 (invoke "pytest" "-v")
4668 #t)))))
4669 (propagated-inputs
4670 `(("python-ipython" ,python-ipython)
4671 ;; imported at runtime during connect
4672 ("python-jupyter-client" ,python-jupyter-client)))
4673 (native-inputs
4674 `(("python-pytest" ,python-pytest)
4675 ("python-nose" ,python-nose)))
4676 (home-page "https://ipython.org")
4677 (synopsis "IPython Kernel for Jupyter")
4678 (description
4679 "This package provides the IPython kernel for Jupyter.")
4680 (license license:bsd-3)))
4681
4682 (define-public python2-ipykernel
4683 (package-with-python2 python-ipykernel))
4684
4685 (define-public python-pari-jupyter
4686 (package
4687 (name "python-pari-jupyter")
4688 (version "1.3.2")
4689 (source
4690 (origin
4691 (method url-fetch)
4692 (uri (pypi-uri "pari_jupyter" version))
4693 (sha256
4694 (base32
4695 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
4696 (build-system python-build-system)
4697 (propagated-inputs
4698 `(("python-ipykernel" ,python-ipykernel)))
4699 (inputs
4700 `(("pari-gp" ,pari-gp)
4701 ("readline" ,readline)))
4702 (arguments
4703 `(#:tests? #f)) ; no test suite
4704 (home-page
4705 "https://github.com/jdemeyer/pari_jupyter")
4706 (synopsis "A Jupyter kernel for PARI/GP")
4707 (description "The package provides a PARI/GP kernel for Jupyter.")
4708 (license license:gpl3+)))
4709
4710 ;; This is the latest release of the LTS version of ipython with support for
4711 ;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
4712 ;; dropped support for Python 2.7. We may want to rename this package.
4713 (define-public python-ipython
4714 (package
4715 (name "python-ipython")
4716 (version "5.8.0")
4717 (source
4718 (origin
4719 (method url-fetch)
4720 (uri (pypi-uri "ipython" version ".tar.gz"))
4721 (sha256
4722 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
4723 (build-system python-build-system)
4724 (outputs '("out" "doc"))
4725 (propagated-inputs
4726 `(("python-pyzmq" ,python-pyzmq)
4727 ("python-prompt-toolkit" ,python-prompt-toolkit-1)
4728 ("python-terminado" ,python-terminado)
4729 ("python-matplotlib" ,python-matplotlib)
4730 ("python-numpy" ,python-numpy)
4731 ("python-numpydoc" ,python-numpydoc)
4732 ("python-jinja2" ,python-jinja2)
4733 ("python-mistune" ,python-mistune)
4734 ("python-pexpect" ,python-pexpect)
4735 ("python-pickleshare" ,python-pickleshare)
4736 ("python-simplegeneric" ,python-simplegeneric)
4737 ("python-jsonschema" ,python-jsonschema)
4738 ("python-traitlets" ,python-traitlets)
4739 ("python-nbformat" ,python-nbformat)
4740 ("python-pygments" ,python-pygments)))
4741 (inputs
4742 `(("readline" ,readline)
4743 ("which" ,which)))
4744 (native-inputs
4745 `(("graphviz" ,graphviz)
4746 ("pkg-config" ,pkg-config)
4747 ("python-requests" ,python-requests) ;; for tests
4748 ("python-testpath" ,python-testpath)
4749 ("python-nose" ,python-nose)
4750 ("python-sphinx" ,python-sphinx)
4751 ("python-shpinx-rtd-theme" ,python-sphinx-rtd-theme)
4752 ;; FIXME: It's possible that a smaller union would work just as well.
4753 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
4754 texlive-fonts-ec
4755 texlive-generic-ifxetex
4756 texlive-generic-pdftex
4757 texlive-latex-amsfonts
4758 texlive-latex-capt-of
4759 texlive-latex-cmap
4760 texlive-latex-environ
4761 texlive-latex-eqparbox
4762 texlive-latex-etoolbox
4763 texlive-latex-expdlist
4764 texlive-latex-fancyhdr
4765 texlive-latex-fancyvrb
4766 texlive-latex-fncychap
4767 texlive-latex-float
4768 texlive-latex-framed
4769 texlive-latex-geometry
4770 texlive-latex-graphics
4771 texlive-latex-hyperref
4772 texlive-latex-mdwtools
4773 texlive-latex-multirow
4774 texlive-latex-oberdiek
4775 texlive-latex-parskip
4776 texlive-latex-preview
4777 texlive-latex-tabulary
4778 texlive-latex-threeparttable
4779 texlive-latex-titlesec
4780 texlive-latex-trimspaces
4781 texlive-latex-ucs
4782 texlive-latex-upquote
4783 texlive-latex-url
4784 texlive-latex-varwidth
4785 texlive-latex-wrapfig)))
4786 ("texinfo" ,texinfo)))
4787 (arguments
4788 `(#:phases
4789 (modify-phases %standard-phases
4790 (add-after 'install 'install-doc
4791 (lambda* (#:key inputs outputs #:allow-other-keys)
4792 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4793 (doc (string-append data "/doc/" ,name "-" ,version))
4794 (html (string-append doc "/html"))
4795 (man1 (string-append data "/man/man1"))
4796 (info (string-append data "/info"))
4797 (examples (string-append doc "/examples"))
4798 (python-arg (string-append "PYTHON=" (which "python"))))
4799 (setenv "LANG" "en_US.utf8")
4800 ;; Make installed package available for running the tests
4801 (add-installed-pythonpath inputs outputs)
4802 (with-directory-excursion "docs"
4803 ;; FIXME: pdf fails to build
4804 ;;(system* "make" "pdf" "PAPER=a4")
4805 (system* "make" python-arg "html")
4806 (system* "make" python-arg "info"))
4807 (copy-recursively "docs/man" man1)
4808 (copy-recursively "examples" examples)
4809 (copy-recursively "docs/build/html" html)
4810 ;; (copy-file "docs/build/latex/ipython.pdf"
4811 ;; (string-append doc "/ipython.pdf"))
4812 (mkdir-p info)
4813 (copy-file "docs/build/texinfo/ipython.info"
4814 (string-append info "/ipython.info"))
4815 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
4816 #t))
4817 ;; Tests can only be run after the library has been installed and not
4818 ;; within the source directory.
4819 (delete 'check)
4820 (add-after 'install 'check
4821 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
4822 (if tests?
4823 (begin
4824 ;; Make installed package available for running the tests
4825 (add-installed-pythonpath inputs outputs)
4826 (setenv "HOME" "/tmp/") ;; required by a test
4827 ;; We only test the core because one of the other tests
4828 ;; tries to import ipykernel.
4829 (invoke "python" "IPython/testing/iptest.py"
4830 "-v" "IPython/core/tests"))
4831 #t)))
4832 (add-before 'check 'fix-tests
4833 (lambda* (#:key inputs #:allow-other-keys)
4834 (substitute* "./IPython/utils/_process_posix.py"
4835 (("/usr/bin/env', 'which") (which "which")))
4836 (substitute* "./IPython/core/tests/test_inputtransformer.py"
4837 (("#!/usr/bin/env python")
4838 (string-append "#!" (which "python"))))
4839 ;; Disable 1 failing test
4840 (substitute* "./IPython/core/tests/test_magic.py"
4841 (("def test_dirops\\(\\):" all)
4842 (string-append "@dec.skipif(True)\n" all)))
4843 ;; This test introduces a circular dependency on ipykernel
4844 ;; (which depends on ipython).
4845 (delete-file "IPython/core/tests/test_display.py")
4846 ;; These tests throw errors for unknown reasons.
4847 (delete-file "IPython/extensions/tests/test_storemagic.py")
4848 (delete-file "IPython/core/tests/test_displayhook.py")
4849 (delete-file "IPython/core/tests/test_interactiveshell.py")
4850 (delete-file "IPython/core/tests/test_pylabtools.py")
4851 (delete-file "IPython/core/tests/test_paths.py")
4852 #t)))))
4853 (home-page "https://ipython.org")
4854 (synopsis "IPython is a tool for interactive computing in Python")
4855 (description
4856 "IPython provides a rich architecture for interactive computing with:
4857 Powerful interactive shells, a browser-based notebook, support for interactive
4858 data visualization, embeddable interpreters and tools for parallel
4859 computing.")
4860 (license license:bsd-3)
4861 (properties `((python2-variant . ,(delay python2-ipython))))))
4862
4863 (define-public python2-ipython
4864 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
4865 (package
4866 (inherit ipython)
4867 ;; FIXME: add pyreadline once available.
4868 (propagated-inputs
4869 `(("python2-backports-shutil-get-terminal-size"
4870 ,python2-backports-shutil-get-terminal-size)
4871 ("python2-pathlib2" ,python2-pathlib2)
4872 ,@(package-propagated-inputs ipython)))
4873 (native-inputs
4874 `(("python2-mock" ,python2-mock)
4875 ,@(package-native-inputs ipython))))))
4876
4877 (define-public python-urwid
4878 (package
4879 (name "python-urwid")
4880 (version "2.0.1")
4881 (source
4882 (origin
4883 (method url-fetch)
4884 (uri (pypi-uri "urwid" version))
4885 (sha256
4886 (base32
4887 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
4888 (build-system python-build-system)
4889 (home-page "http://urwid.org")
4890 (synopsis "Console user interface library for Python")
4891 (description
4892 "Urwid is a curses-based UI/widget library for Python. It includes many
4893 features useful for text console applications.")
4894 (license license:lgpl2.1+)))
4895
4896 (define-public python2-urwid
4897 (package-with-python2 python-urwid))
4898
4899 (define-public python-urwidtrees
4900 (package
4901 (name "python-urwidtrees")
4902 (version "1.0.2")
4903 (source
4904 (origin
4905 (method url-fetch)
4906 ;; package author intends on distributing via github rather than pypi:
4907 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
4908 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
4909 version ".tar.gz"))
4910 (file-name (string-append name "-" version ".tar.gz"))
4911 (sha256
4912 (base32
4913 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
4914 (build-system python-build-system)
4915 (arguments
4916 '(#:tests? #f)) ; no tests
4917 (propagated-inputs `(("python-urwid" ,python-urwid)))
4918 (home-page "https://github.com/pazz/urwidtrees")
4919 (synopsis "Tree widgets for urwid")
4920 (description "Urwidtrees is a Widget Container API for the @code{urwid}
4921 toolkit. Use it to build trees of widgets.")
4922 (license license:gpl3+)))
4923
4924 (define-public python2-urwidtrees
4925 (package-with-python2 python-urwidtrees))
4926
4927 (define-public python-ua-parser
4928 (package
4929 (name "python-ua-parser")
4930 (version "0.8.0")
4931 (source
4932 (origin
4933 (method url-fetch)
4934 (uri (pypi-uri "ua-parser" version))
4935 (sha256
4936 (base32
4937 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
4938 (build-system python-build-system)
4939 (arguments
4940 `(#:tests? #f)) ;no test suite in release
4941 (native-inputs
4942 `(("python-pyyaml" ,python-pyyaml)))
4943 (home-page "https://github.com/ua-parser/uap-python")
4944 (synopsis "User agent parser")
4945 (description
4946 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
4947 (license license:asl2.0)))
4948
4949 (define-public python2-ua-parser
4950 (package-with-python2 python-ua-parser))
4951
4952 (define-public python-user-agents
4953 (package
4954 (name "python-user-agents")
4955 (version "1.1.0")
4956 (source
4957 (origin
4958 (method url-fetch)
4959 (uri (pypi-uri "user-agents" version))
4960 (sha256
4961 (base32
4962 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
4963 (build-system python-build-system)
4964 (arguments
4965 `(#:tests? #f)) ;missing devices.json test file in release
4966 (propagated-inputs
4967 `(("python-ua-parser" ,python-ua-parser)))
4968 (home-page "https://github.com/selwin/python-user-agents")
4969 (synopsis "User Agent strings parsing library")
4970 (description
4971 "A library to identify devices (phones, tablets) and their capabilities by
4972 parsing (browser/HTTP) user agent strings.")
4973 (license license:expat)))
4974
4975 (define-public python2-user-agents
4976 (package-with-python2 python-user-agents))
4977
4978 (define-public python-dbus
4979 (package
4980 (name "python-dbus")
4981 (version "1.2.8")
4982 (source
4983 (origin
4984 (method url-fetch)
4985 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
4986 "dbus-python-" version ".tar.gz"))
4987 (sha256
4988 (base32
4989 "0vvvjmiwnc9cjlks3gcdk43ap7llhlpz7cm1wbw0nc2yfsxjpwdb"))))
4990 (build-system gnu-build-system)
4991 (arguments
4992 '(#:phases
4993 (modify-phases %standard-phases
4994 (add-before
4995 'check 'pre-check
4996 (lambda _
4997 ;; XXX: For the missing '/etc/machine-id'.
4998 (substitute* "test/run-test.sh"
4999 (("DBUS_FATAL_WARNINGS=1")
5000 "DBUS_FATAL_WARNINGS=0"))
5001 #t)))))
5002 (native-inputs
5003 `(("pkg-config" ,pkg-config)))
5004 (inputs
5005 `(("python" ,python-wrapper)
5006 ("dbus-glib" ,dbus-glib)))
5007 (synopsis "Python bindings for D-bus")
5008 (description "python-dbus provides bindings for libdbus, the reference
5009 implementation of D-Bus.")
5010 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
5011 (license license:expat)))
5012
5013 (define-public python2-dbus
5014 (package (inherit python-dbus)
5015 (name "python2-dbus")
5016 (inputs `(("python" ,python-2)
5017 ,@(alist-delete "python"
5018 (package-inputs python-dbus)
5019 equal?)))
5020 ;; FIXME: on Python 2, the test_utf8 fails with:
5021 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5022 (arguments `(#:tests? #f))))
5023
5024 (define-public python-lxml
5025 (package
5026 (name "python-lxml")
5027 (version "4.2.5")
5028 (source
5029 (origin
5030 (method url-fetch)
5031 (uri (pypi-uri "lxml" version))
5032 (sha256
5033 (base32
5034 "0zw0y9hs0nflxhl9cs6ipwwh53szi3w2x06wl0k9cylyqac0cwin"))))
5035 (build-system python-build-system)
5036 (inputs
5037 `(("libxml2" ,libxml2)
5038 ("libxslt" ,libxslt)))
5039 (home-page "http://lxml.de/")
5040 (synopsis
5041 "Python XML processing library")
5042 (description
5043 "The lxml XML toolkit is a Pythonic binding for the C libraries
5044 libxml2 and libxslt.")
5045 (license license:bsd-3))) ; and a few more, see LICENSES.txt
5046
5047 (define-public python2-lxml
5048 (package-with-python2 python-lxml))
5049
5050 ;; beautifulsoup4 has a totally different namespace than 3.x,
5051 ;; and pypi seems to put it under its own name, so I guess we should too
5052 (define-public python-beautifulsoup4
5053 (package
5054 (name "python-beautifulsoup4")
5055 (version "4.6.3")
5056 (source
5057 (origin
5058 (method url-fetch)
5059 (uri (pypi-uri "beautifulsoup4" version))
5060 (sha256
5061 (base32
5062 "041dhalzjciw6qyzzq7a2k4h1yvyk76xigp35hv5ibnn448ydy4h"))))
5063 (build-system python-build-system)
5064 (arguments
5065 `(#:phases
5066 (modify-phases %standard-phases
5067 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5068 ;; must use this conversion script when building with Python 3. The
5069 ;; conversion script also runs the tests.
5070 ;; For more information, see the file 'convert-py3k' in the source
5071 ;; distribution.
5072 (replace 'check
5073 (lambda _ (invoke "./convert-py3k"))))))
5074 (home-page
5075 "https://www.crummy.com/software/BeautifulSoup/bs4/")
5076 (synopsis
5077 "Python screen-scraping library")
5078 (description
5079 "Beautiful Soup is a Python library designed for rapidly setting up
5080 screen-scraping projects. It offers Pythonic idioms for navigating,
5081 searching, and modifying a parse tree, providing a toolkit for
5082 dissecting a document and extracting what you need. It automatically
5083 converts incoming documents to Unicode and outgoing documents to UTF-8.")
5084 (license license:expat)
5085 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5086
5087 (define-public python2-beautifulsoup4
5088 (package
5089 (inherit (package-with-python2
5090 (strip-python2-variant python-beautifulsoup4)))
5091 (arguments `(#:python ,python-2))))
5092
5093 (define-public python-netifaces
5094 (package
5095 (name "python-netifaces")
5096 (version "0.10.7")
5097 (source
5098 (origin
5099 (method url-fetch)
5100 (uri (pypi-uri "netifaces" version))
5101 (sha256
5102 (base32
5103 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
5104 (build-system python-build-system)
5105 (home-page "https://github.com/al45tair/netifaces")
5106 (synopsis
5107 "Python module for portable network interface information")
5108 (description
5109 "Netifaces is a Python module providing information on network
5110 interfaces in an easy and portable manner.")
5111 (license license:expat)))
5112
5113 (define-public python2-netifaces
5114 (package-with-python2 python-netifaces))
5115
5116 (define-public python-networkx
5117 (package
5118 (name "python-networkx")
5119 (version "2.2")
5120 (source
5121 (origin
5122 (method url-fetch)
5123 (uri (pypi-uri "networkx" version ".zip"))
5124 (sha256
5125 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
5126 (build-system python-build-system)
5127 ;; python-decorator is needed at runtime.
5128 (propagated-inputs
5129 `(("python-decorator" ,python-decorator)))
5130 (native-inputs
5131 `(("python-nose" ,python-nose)
5132 ("unzip" ,unzip)))
5133 (home-page "https://networkx.github.io/")
5134 (synopsis "Python module for creating and manipulating graphs and networks")
5135 (description
5136 "NetworkX is a Python package for the creation, manipulation, and study
5137 of the structure, dynamics, and functions of complex networks.")
5138 (license license:bsd-3)))
5139
5140 (define-public python2-networkx
5141 (package-with-python2 python-networkx))
5142
5143 (define-public python-datrie
5144 (package
5145 (name "python-datrie")
5146 (version "0.7.1")
5147 (source
5148 (origin
5149 (method url-fetch)
5150 (uri (pypi-uri "datrie" version))
5151 (sha256
5152 (base32
5153 "08r0if7dry2q7p34gf7ffyrlnf4bdvnprxgydlfxgfnvq8f3f4bs"))))
5154 (build-system python-build-system)
5155 (arguments
5156 `(#:phases (modify-phases %standard-phases
5157 (add-before 'build 'cythonize
5158 (lambda _
5159 ;; Regenerate Cython classes to solve ABI issues with Python
5160 ;; 3.7.0. See <https://github.com/pytries/datrie/issues/52>.
5161 (invoke "cython" "src/datrie.pyx" "src/cdatrie.pxd"
5162 "src/stdio_ext.pxd" "-a"))))))
5163 (native-inputs
5164 `(("python-cython" ,python-cython)
5165 ("python-hypothesis" ,python-hypothesis)
5166 ("python-pytest" ,python-pytest)
5167 ("python-pytest-runner" ,python-pytest-runner)))
5168 (home-page "https://github.com/kmike/datrie")
5169 (synopsis "Fast, efficiently stored trie for Python")
5170 (description
5171 "This package provides a fast, efficiently stored trie implementation for
5172 Python.")
5173 (license license:lgpl2.1+)))
5174
5175 (define-public snakemake
5176 (package
5177 (name "snakemake")
5178 (version "5.2.4")
5179 (source
5180 (origin
5181 (method url-fetch)
5182 (uri (pypi-uri "snakemake" version))
5183 (sha256
5184 (base32 "0gj0xxgiq3mp9qyyrbfzldiaq1giliqw0in64nqiz7vx49myqj7z"))))
5185 (build-system python-build-system)
5186 (arguments
5187 ;; TODO: Package missing test dependencies.
5188 '(#:tests? #f
5189 #:phases
5190 (modify-phases %standard-phases
5191 ;; For cluster execution Snakemake will call Python. Since there is
5192 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
5193 ;; this by calling the snakemake wrapper instead.
5194 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
5195 (lambda* (#:key outputs #:allow-other-keys)
5196 (substitute* "snakemake/executors.py"
5197 (("\\{sys.executable\\} -m snakemake")
5198 (string-append (assoc-ref outputs "out")
5199 "/bin/snakemake")))
5200 #t)))))
5201 (propagated-inputs
5202 `(("python-gitpython" ,python-gitpython)
5203 ("python-wrapt" ,python-wrapt)
5204 ("python-requests" ,python-requests)
5205 ("python-appdirs" ,python-appdirs)
5206 ("python-configargparse" ,python-configargparse)
5207 ("python-datrie" ,python-datrie)
5208 ("python-docutils" ,python-docutils)
5209 ("python-jinja2" ,python-jinja2)
5210 ("python-jsonschema" ,python-jsonschema)
5211 ("python-networkx" ,python-networkx)
5212 ("python-pyyaml" ,python-pyyaml)
5213 ("python-ratelimiter" ,python-ratelimiter)))
5214 (home-page "https://snakemake.readthedocs.io")
5215 (synopsis "Python-based execution environment for make-like workflows")
5216 (description
5217 "Snakemake aims to reduce the complexity of creating workflows by
5218 providing a clean and modern domain specific specification language (DSL) in
5219 Python style, together with a fast and comfortable execution environment.")
5220 (license license:expat)))
5221
5222 ;; This is currently needed for the pigx-* packages.
5223 (define-public snakemake-4
5224 (package (inherit snakemake)
5225 (version "4.4.0")
5226 (source
5227 (origin
5228 (method url-fetch)
5229 (uri (pypi-uri "snakemake" version))
5230 (sha256
5231 (base32 "0g0paia4z7w3srnqdmavq3hrb2x7qnpf81jx50njl0p7y4y0j8jv"))))
5232 (propagated-inputs
5233 `(("python-wrapt" ,python-wrapt)
5234 ("python-requests" ,python-requests)
5235 ("python-appdirs" ,python-appdirs)
5236 ("python-configargparse" ,python-configargparse)
5237 ("python-pyyaml" ,python-pyyaml)
5238 ("python-ratelimiter" ,python-ratelimiter)))))
5239
5240 (define-public python-pyqrcode
5241 (package
5242 (name "python-pyqrcode")
5243 (version "1.2.1")
5244 (source
5245 (origin
5246 (method url-fetch)
5247 (uri (pypi-uri "PyQRCode" version))
5248 (sha256
5249 (base32
5250 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
5251 (build-system python-build-system)
5252 (home-page
5253 "https://github.com/mnooner256/pyqrcode")
5254 (synopsis "QR code generator")
5255 (description
5256 "Pyqrcode is a QR code generator written purely in Python with
5257 SVG, EPS, PNG and terminal output.")
5258 (license license:bsd-3)))
5259
5260 (define-public python-seaborn
5261 (package
5262 (name "python-seaborn")
5263 (version "0.9.0")
5264 (source
5265 (origin
5266 (method url-fetch)
5267 (uri (pypi-uri "seaborn" version))
5268 (sha256
5269 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))))
5270 (build-system python-build-system)
5271 (arguments
5272 `(#:phases
5273 (modify-phases %standard-phases
5274 (add-before 'check 'start-xserver
5275 (lambda* (#:key inputs #:allow-other-keys)
5276 (let ((xorg-server (assoc-ref inputs "xorg-server")))
5277 ;; There must be a running X server and make check doesn't
5278 ;; start one. Therefore we must do it.
5279 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
5280 (setenv "DISPLAY" ":1")
5281 #t)))
5282 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
5283 (propagated-inputs
5284 `(("python-pandas" ,python-pandas)
5285 ("python-matplotlib" ,python-matplotlib)
5286 ("python-numpy" ,python-numpy)
5287 ("python-scipy" ,python-scipy)))
5288 (native-inputs
5289 `(("python-pytest" ,python-pytest)
5290 ("xorg-server" ,xorg-server)))
5291 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5292 (synopsis "Statistical data visualization")
5293 (description
5294 "Seaborn is a library for making attractive and informative statistical
5295 graphics in Python. It is built on top of matplotlib and tightly integrated
5296 with the PyData stack, including support for numpy and pandas data structures
5297 and statistical routines from scipy and statsmodels.")
5298 (license license:bsd-3)))
5299
5300 (define-public python2-seaborn
5301 (package-with-python2 python-seaborn))
5302
5303 (define-public python-mpmath
5304 (package
5305 (name "python-mpmath")
5306 (version "0.19")
5307 (source (origin
5308 (method url-fetch)
5309 (uri (string-append "http://mpmath.org/files/mpmath-"
5310 version ".tar.gz"))
5311 (sha256
5312 (base32
5313 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
5314 (build-system python-build-system)
5315 (arguments
5316 '(#:phases
5317 (modify-phases %standard-phases
5318 (replace 'check
5319 (lambda _
5320 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
5321 (home-page "http://mpmath.org")
5322 (synopsis "Arbitrary-precision floating-point arithmetic in python")
5323 (description
5324 "@code{mpmath} can be used as an arbitrary-precision substitute for
5325 Python's float/complex types and math/cmath modules, but also does much
5326 more advanced mathematics.")
5327 (license license:bsd-3)))
5328
5329 (define-public python2-mpmath
5330 (package-with-python2 python-mpmath))
5331
5332 (define-public python-bigfloat
5333 (package
5334 (name "python-bigfloat")
5335 (version "0.3.0")
5336 (source
5337 (origin
5338 (method url-fetch)
5339 (uri (pypi-uri "bigfloat" version))
5340 (sha256
5341 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
5342 (build-system python-build-system)
5343 (inputs
5344 `(("mpfr" ,mpfr)))
5345 (home-page "https://github.com/mdickinson/bigfloat")
5346 (synopsis "Arbitrary precision floating-point arithmetic for Python")
5347 (description
5348 "This packages provides a Python interface to the MPFR library for
5349 multiprecision arithmetic.")
5350 (license license:lgpl3+)))
5351
5352 (define-public python2-bigfloat
5353 (package-with-python2 python-bigfloat))
5354
5355 (define-public python-sympy
5356 (package
5357 (name "python-sympy")
5358 (version "1.1.1")
5359 (source
5360 (origin
5361 (method url-fetch)
5362 (uri (string-append
5363 "https://github.com/sympy/sympy/releases/download/sympy-"
5364 version "/sympy-" version ".tar.gz"))
5365 (sha256
5366 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
5367 (build-system python-build-system)
5368 (arguments
5369 `(#:phases
5370 (modify-phases %standard-phases
5371 ;; Run the core tests after installation. By default it would run
5372 ;; *all* tests, which take a very long time to complete and are known
5373 ;; to be flaky.
5374 (delete 'check)
5375 (add-after 'install 'check
5376 (lambda* (#:key outputs #:allow-other-keys)
5377 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
5378 #t)))))
5379 (propagated-inputs
5380 `(("python-mpmath" ,python-mpmath)))
5381 (home-page "http://www.sympy.org/")
5382 (synopsis "Python library for symbolic mathematics")
5383 (description
5384 "SymPy is a Python library for symbolic mathematics. It aims to become a
5385 full-featured computer algebra system (CAS) while keeping the code as simple
5386 as possible in order to be comprehensible and easily extensible.")
5387 (license license:bsd-3)))
5388
5389 (define-public python2-sympy
5390 (package
5391 (inherit (package-with-python2 python-sympy))
5392 (arguments
5393 `(#:phases
5394 (modify-phases %standard-phases
5395 ;; Run the core tests after installation. By default it would run
5396 ;; *all* tests, which take a very long time to complete and are known
5397 ;; to be flaky.
5398 (delete 'check)
5399 (add-after 'install 'check
5400 (lambda* (#:key outputs #:allow-other-keys)
5401 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
5402 #t)))))))
5403
5404 (define-public python-q
5405 (package
5406 (name "python-q")
5407 (version "2.6")
5408 (source
5409 (origin
5410 (method url-fetch)
5411 (uri (pypi-uri "q" version))
5412 (sha256
5413 (base32
5414 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
5415 (build-system python-build-system)
5416 (home-page "https://github.com/zestyping/q")
5417 (synopsis "Quick-and-dirty debugging output for tired programmers")
5418 (description
5419 "q is a Python module for \"print\" style of debugging Python code. It
5420 provides convenient short API for print out of values, tracebacks, and
5421 falling into the Python interpreter.")
5422 (license license:asl2.0)))
5423
5424 (define-public python2-q
5425 (package-with-python2 python-q))
5426
5427 (define-public python2-xlib
5428 (package
5429 (name "python2-xlib")
5430 (version "0.14")
5431 (source (origin
5432 (method url-fetch)
5433 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
5434 "/" version "/"
5435 "python-xlib-" version ".tar.gz"))
5436 (sha256
5437 (base32
5438 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
5439 (build-system python-build-system)
5440 (arguments
5441 `(#:python ,python-2 ;Python 2 only
5442 #:tests? #f)) ;no tests
5443 (home-page "http://python-xlib.sourceforge.net/")
5444 (synopsis "Python X11 client library")
5445 (description
5446 "The Python X Library is intended to be a fully functional X client
5447 library for Python programs. It is useful to implement low-level X clients.
5448 It is written entirely in Python.")
5449 (license license:gpl2+)))
5450
5451 (define-public python-singledispatch
5452 (package
5453 (name "python-singledispatch")
5454 (version "3.4.0.3")
5455 (source
5456 (origin
5457 (method url-fetch)
5458 (uri (pypi-uri "singledispatch" version))
5459 (sha256
5460 (base32
5461 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
5462 (build-system python-build-system)
5463 (native-inputs
5464 `(("python-six" ,python-six))) ; required for conversion, not at run-time
5465 (home-page
5466 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
5467 (synopsis "Backport of singledispatch feature from Python 3.4")
5468 (description
5469 "This library brings functools.singledispatch from Python 3.4 to Python
5470 2.6-3.3.")
5471 (license license:expat)))
5472
5473 (define-public python2-singledispatch
5474 (package-with-python2 python-singledispatch))
5475
5476 ;; the python- version can be removed with python-3.5
5477 (define-public python-backports-abc
5478 (package
5479 (name "python-backports-abc")
5480 (version "0.5")
5481 (source
5482 (origin
5483 (method url-fetch)
5484 (uri (pypi-uri "backports_abc" version))
5485 (sha256
5486 (base32
5487 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
5488 (build-system python-build-system)
5489 (home-page "https://github.com/cython/backports_abc")
5490 (synopsis "Backport of additions to the 'collections.abc' module")
5491 (description
5492 "Python-backports-abc provides a backport of additions to the
5493 'collections.abc' module in Python-3.5.")
5494 (license license:psfl)))
5495
5496 (define-public python2-backports-abc
5497 (package-with-python2 python-backports-abc))
5498
5499 (define-public python-backports-csv
5500 (package
5501 (name "python-backports-csv")
5502 (version "1.0.5")
5503 (source
5504 (origin
5505 (method url-fetch)
5506 (uri (pypi-uri "backports.csv" version))
5507 (sha256
5508 (base32
5509 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
5510 (build-system python-build-system)
5511 (home-page "https://github.com/ryanhiebert/backports.csv")
5512 (synopsis "Backport of Python 3's csv module for Python 2")
5513 (description
5514 "Provides a backport of Python 3's @code{csv} module for parsing
5515 comma separated values. The API of the @code{csv} module in Python 2
5516 is drastically different from the @code{csv} module in Python 3.
5517 This is due, for the most part, to the difference between str in
5518 Python 2 and Python 3.")
5519 (license license:psfl)))
5520
5521 (define-public python2-backports-csv
5522 (package-with-python2 python-backports-csv))
5523
5524 (define-public python2-backports-shutil-get-terminal-size
5525 (package
5526 (name "python2-backports-shutil-get-terminal-size")
5527 (version "1.0.0")
5528 (source
5529 (origin
5530 (method url-fetch)
5531 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
5532 (sha256
5533 (base32
5534 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
5535 (build-system python-build-system)
5536 (arguments
5537 `(#:python ,python-2
5538 #:phases
5539 (modify-phases %standard-phases
5540 (replace 'check
5541 (lambda _
5542 (invoke "py.test" "-v"))))))
5543 (native-inputs
5544 `(("python2-pytest" ,python2-pytest)))
5545 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
5546 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
5547 (description
5548 "This package provides a backport of the @code{get_terminal_size
5549 function} from Python 3.3's @code{shutil}.
5550 Unlike the original version it is written in pure Python rather than C,
5551 so it might be a tiny bit slower.")
5552 (license license:expat)))
5553
5554 (define-public python-waf
5555 (package
5556 (name "python-waf")
5557 (version "2.0.11")
5558 (source (origin
5559 (method url-fetch)
5560 (uri (string-append "https://waf.io/"
5561 "waf-" version ".tar.bz2"))
5562 (sha256
5563 (base32
5564 "13zrniwkmfqgsgzi9v5m1367fppp9yzrz6z2ny6hy8dmpb8mj4z4"))))
5565 (build-system python-build-system)
5566 (arguments
5567 '(#:phases
5568 (modify-phases %standard-phases
5569 (replace 'build
5570 (lambda _
5571 (invoke "python" "waf-light" "configure" "build")))
5572 (replace 'check
5573 (lambda _
5574 (invoke "python" "waf" "--version")))
5575 (replace 'install
5576 (lambda* (#:key outputs #:allow-other-keys)
5577 (let ((out (assoc-ref outputs "out")))
5578 (install-file "waf" (string-append out "/bin")))
5579 #t))
5580 ;; waf breaks when it is wrapped.
5581 (delete 'wrap))))
5582 (home-page "https://waf.io/")
5583 (synopsis "Python-based build system")
5584 (description
5585 "Waf is a Python-based framework for configuring, compiling and installing
5586 applications.")
5587 (license license:bsd-3)))
5588
5589 (define-public python2-waf
5590 (package-with-python2 python-waf))
5591
5592 (define-public python-pyzmq
5593 (package
5594 (name "python-pyzmq")
5595 (version "17.1.2")
5596 (source
5597 (origin
5598 (method url-fetch)
5599 (uri (pypi-uri "pyzmq" version))
5600 (sha256
5601 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
5602 (build-system python-build-system)
5603 (arguments
5604 `(#:configure-flags
5605 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
5606 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
5607 ;; --inplace' for 'python setup.py test' to work.
5608 #:tests? #f))
5609 (inputs
5610 `(("zeromq" ,zeromq)))
5611 (native-inputs
5612 `(("pkg-config" ,pkg-config)
5613 ("python-nose" ,python-nose)))
5614 (home-page "https://github.com/zeromq/pyzmq")
5615 (synopsis "Python bindings for 0MQ")
5616 (description
5617 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
5618 (license license:bsd-4)))
5619
5620 (define-public python2-pyzmq
5621 (package-with-python2 python-pyzmq))
5622
5623 (define-public python-pep8
5624 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
5625 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
5626 ;; some dependents' test suites, and nothing more.
5627 (package
5628 (name "python-pep8")
5629 (version "1.7.0")
5630 (source
5631 (origin
5632 (method url-fetch)
5633 (uri (pypi-uri "pep8" version))
5634 (sha256
5635 (base32
5636 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
5637 (build-system python-build-system)
5638 (home-page "https://pep8.readthedocs.org/")
5639 (synopsis "Python style guide checker")
5640 (description
5641 "This tools checks Python code against some of the style conventions in
5642 PEP 8.")
5643 (license license:expat)))
5644
5645 (define-public python2-pep8
5646 (package-with-python2 python-pep8))
5647
5648 (define-public python-pyflakes
5649 (package
5650 (name "python-pyflakes")
5651 (version "2.0.0")
5652 (source
5653 (origin
5654 (method url-fetch)
5655 (uri (pypi-uri "pyflakes" version))
5656 (sha256
5657 (base32
5658 "0jba28czyvimdc72llms3f17swp3i8jdcabf5w0j00adfbn64xls"))))
5659 (build-system python-build-system)
5660 (home-page
5661 "https://github.com/pyflakes/pyflakes")
5662 (synopsis "Passive checker of Python programs")
5663 (description
5664 "Pyflakes statically checks Python source code for common errors.")
5665 (license license:expat)))
5666
5667 (define-public python2-pyflakes
5668 (package-with-python2 python-pyflakes))
5669
5670 (define-public python-mccabe
5671 (package
5672 (name "python-mccabe")
5673 (version "0.6.1")
5674 (source
5675 (origin
5676 (method url-fetch)
5677 (uri (pypi-uri "mccabe" version))
5678 (sha256
5679 (base32
5680 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
5681 (build-system python-build-system)
5682 (native-inputs
5683 `(("python-pytest" ,python-pytest-bootstrap)
5684 ("python-pytest-runner" ,python-pytest-runner)))
5685 (home-page "https://github.com/flintwork/mccabe")
5686 (synopsis "McCabe checker, plugin for flake8")
5687 (description
5688 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
5689 complexity of Python source code.")
5690 (license license:expat)))
5691
5692 (define-public python2-mccabe
5693 (package-with-python2 python-mccabe))
5694
5695 (define-public python-mccabe-0.2.1
5696 (package (inherit python-mccabe)
5697 (version "0.2.1")
5698 (source
5699 (origin
5700 (method url-fetch)
5701 (uri (pypi-uri "mccabe" version))
5702 (sha256
5703 (base32
5704 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
5705
5706 (define-public python2-mccabe-0.2.1
5707 (package-with-python2 python-mccabe-0.2.1))
5708
5709 ;; Flake8 2.4.1 requires an older version of pep8.
5710 ;; This should be removed ASAP.
5711 (define-public python-pep8-1.5.7
5712 (package (inherit python-pep8)
5713 (version "1.5.7")
5714 (source
5715 (origin
5716 (method url-fetch)
5717 (uri (pypi-uri "pep8" version))
5718 (sha256
5719 (base32
5720 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
5721 (arguments
5722 ;; XXX Tests not compatible with Python 3.5.
5723 '(#:tests? #f))))
5724
5725 (define-public python2-pep8-1.5.7
5726 (package-with-python2 python-pep8-1.5.7))
5727
5728 ;; Flake8 2.4.1 requires an older version of pyflakes.
5729 ;; This should be removed ASAP.
5730 (define-public python-pyflakes-0.8.1
5731 (package (inherit python-pyflakes)
5732 (version "0.8.1")
5733 (source
5734 (origin
5735 (method url-fetch)
5736 (uri (pypi-uri "pyflakes" version))
5737 (sha256
5738 (base32
5739 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
5740 (arguments
5741 ;; XXX Tests not compatible with Python 3.5.
5742 '(#:tests? #f))))
5743
5744 (define-public python2-pyflakes-0.8.1
5745 (package-with-python2 python-pyflakes-0.8.1))
5746
5747 ;; This package is used by hypothesis which has thousands of dependent packages.
5748 ;; FIXME: Consolidate this with "python-flake8" below in the next rebuild cycle.
5749 (define-public python-flake8-3.5
5750 (package
5751 (name "python-flake8")
5752 (version "3.5.0")
5753 (source
5754 (origin
5755 (method url-fetch)
5756 (uri (pypi-uri "flake8" version))
5757 (sha256
5758 (base32
5759 "184b33grvvjmiwlv9kyd7yng9qv5ld24154j70z332xxg9gjclvj"))))
5760 (build-system python-build-system)
5761 (arguments
5762 `(#:phases
5763 (modify-phases %standard-phases
5764 ;; Two errors don't seem to have assigned codes.
5765 (add-after 'unpack 'delete-broken-test
5766 (lambda _ (delete-file "tests/unit/test_pyflakes_codes.py") #t))
5767 (add-after 'unpack 'fix-problem-with-pycodestyle
5768 (lambda _
5769 ;; See https://gitlab.com/pycqa/flake8/merge_requests/230
5770 ;; This should no longer be needed with the next release.
5771 (substitute* "setup.py"
5772 (("PEP8_PLUGIN\\('break_around_binary_operator'\\),")
5773 "PEP8_PLUGIN('break_after_binary_operator'),\
5774 PEP8_PLUGIN('break_before_binary_operator'),"))
5775 #t))
5776 (delete 'check)
5777 (add-after 'install 'check
5778 (lambda* (#:key inputs outputs #:allow-other-keys)
5779 (add-installed-pythonpath inputs outputs)
5780 (invoke "pytest" "-v")
5781 #t)))))
5782 (propagated-inputs
5783 `(("python-pycodestyle" ,python-pycodestyle)
5784 ("python-pyflakes" ,python-pyflakes)
5785 ("python-mccabe" ,python-mccabe)))
5786 (native-inputs
5787 `(("python-mock" ,python-mock)
5788 ("python-pytest" ,python-pytest-bootstrap)
5789 ("python-pytest-runner" ,python-pytest-runner)))
5790 (home-page "https://gitlab.com/pycqa/flake8")
5791 (synopsis
5792 "The modular source code checker: pep8, pyflakes and co")
5793 (description
5794 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
5795 (properties `((python2-variant . ,(delay python2-flake8-3.5))))
5796 (license license:expat)))
5797
5798 (define-public python2-flake8-3.5
5799 (let ((base (package-with-python2 (strip-python2-variant python-flake8-3.5))))
5800 (package (inherit base)
5801 (propagated-inputs
5802 `(("python2-configparser" ,python2-configparser)
5803 ("python2-enum34" ,python2-enum34)
5804 ,@(package-propagated-inputs base))))))
5805
5806 ;; Version 3.5.0 has compatibility issues with Pyflakes 2.0, so we need
5807 ;; this newer version. Keep it as a separate variable for now to avoid
5808 ;; rebuilding "python-hypothesis"; this should be removed in the next
5809 ;; rebuild cycle.
5810 (define-public python-flake8
5811 (package
5812 (inherit python-flake8-3.5)
5813 (version "3.6.0")
5814 (source (origin
5815 (method url-fetch)
5816 (uri (pypi-uri "flake8" version))
5817 (sha256
5818 (base32
5819 "0w0nprx22rbvrrkbfx9v5jc5gskbm08g219l7r8wai8zfswgadba"))))
5820 (arguments
5821 (substitute-keyword-arguments (package-arguments python-flake8-3.5)
5822 ((#:phases phases)
5823 `(modify-phases ,phases
5824 (delete 'delete-broken-test)
5825 (delete 'fix-problem-with-pycodestyle)))))
5826 (properties `((python2-variant . ,(delay python2-flake8))))))
5827
5828 (define-public python2-flake8
5829 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
5830 (package (inherit base)
5831 (propagated-inputs
5832 (package-propagated-inputs python2-flake8-3.5)))))
5833
5834 ;; python-hacking requires flake8 <2.6.0.
5835 (define-public python-flake8-2.5
5836 (package
5837 (inherit python-flake8)
5838 (version "2.5.5")
5839 (source (origin
5840 (method url-fetch)
5841 (uri (pypi-uri "flake8" version))
5842 (sha256
5843 (base32
5844 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
5845 (propagated-inputs
5846 `(("python-pep8" ,python-pep8)
5847 ,@(package-propagated-inputs python-flake8)))
5848 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
5849
5850 (define-public python2-flake8-2.5
5851 (package
5852 (inherit python2-flake8)
5853 (version (package-version python-flake8-2.5))
5854 (source (origin
5855 (inherit (package-source python-flake8-2.5))))
5856 (propagated-inputs
5857 `(("python2-pep8" ,python2-pep8)
5858 ,@(package-propagated-inputs python2-flake8)))))
5859
5860 (define-public python-flake8-polyfill
5861 (package
5862 (name "python-flake8-polyfill")
5863 (version "1.0.2")
5864 (source
5865 (origin
5866 (method url-fetch)
5867 (uri (pypi-uri "flake8-polyfill" version))
5868 (sha256
5869 (base32
5870 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
5871 (build-system python-build-system)
5872 (arguments
5873 '(#:phases
5874 (modify-phases %standard-phases
5875 (replace 'check
5876 (lambda _
5877 (setenv "PYTHONPATH"
5878 (string-append (getcwd) "/build/lib:"
5879 (getenv "PYTHONPATH")))
5880 (invoke "py.test" "-v"))))))
5881 (native-inputs
5882 `(("python-flake8" ,python-flake8)
5883 ("python-mock" ,python-mock)
5884 ("python-pep8" ,python-pep8)
5885 ("python-pycodestyle" ,python-pycodestyle)
5886 ("python-pytest" ,python-pytest)))
5887 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
5888 (synopsis "Polyfill package for Flake8 plugins")
5889 (description
5890 "This package that provides some compatibility helpers for Flake8
5891 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
5892 (license license:expat)))
5893
5894 (define-public python2-flake8-polyfill
5895 (package-with-python2 python-flake8-polyfill))
5896
5897 (define-public python-mistune
5898 (package
5899 (name "python-mistune")
5900 (version "0.8.4")
5901 (source
5902 (origin
5903 (method url-fetch)
5904 (uri (pypi-uri "mistune" version))
5905 (sha256
5906 (base32
5907 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
5908 (build-system python-build-system)
5909 (native-inputs
5910 `(("python-nose" ,python-nose)
5911 ("python-cython" ,python-cython)))
5912 (home-page "https://github.com/lepture/mistune")
5913 (synopsis "Markdown parser in pure Python")
5914 (description "This package provides a fast markdown parser in pure
5915 Python.")
5916 (license license:bsd-3)))
5917
5918 (define-public python2-mistune
5919 (package-with-python2 python-mistune))
5920
5921 (define-public python-markdown
5922 (package
5923 (name "python-markdown")
5924 (version "3.0.1")
5925 (source
5926 (origin
5927 (method url-fetch)
5928 (uri (pypi-uri "Markdown" version))
5929 (sha256
5930 (base32
5931 "0z6v8649sr434d5r5zmrhydka7v7f9yas4bwcgkcs0650jdhybnh"))))
5932 (build-system python-build-system)
5933 (native-inputs
5934 `(("python-nose" ,python-nose)
5935 ("python-pyyaml" ,python-pyyaml)))
5936 (home-page "https://python-markdown.github.io/")
5937 (synopsis "Python implementation of Markdown")
5938 (description
5939 "This package provides a Python implementation of John Gruber's
5940 Markdown. The library features international input, various Markdown
5941 extensions, and several HTML output formats. A command line wrapper
5942 markdown_py is also provided to convert Markdown files to HTML.")
5943 (license license:bsd-3)))
5944
5945 (define-public python2-markdown
5946 (package-with-python2 python-markdown))
5947
5948 (define-public python-ptyprocess
5949 (package
5950 (name "python-ptyprocess")
5951 (version "0.5.2")
5952 (source
5953 (origin
5954 (method url-fetch)
5955 (uri (pypi-uri "ptyprocess" version))
5956 (sha256
5957 (base32
5958 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
5959 (build-system python-build-system)
5960 (native-inputs
5961 `(("python-nose" ,python-nose)))
5962 (arguments
5963 `(#:phases
5964 (modify-phases %standard-phases
5965 (replace 'check
5966 (lambda _ (invoke "nosetests"))))))
5967 (home-page "https://github.com/pexpect/ptyprocess")
5968 (synopsis "Run a subprocess in a pseudo terminal")
5969 (description
5970 "This package provides a Python library used to launch a subprocess in a
5971 pseudo terminal (pty), and interact with both the process and its pty.")
5972 (license license:isc)))
5973
5974 (define-public python2-ptyprocess
5975 (package-with-python2 python-ptyprocess))
5976
5977 (define-public python-cram
5978 (package
5979 (name "python-cram")
5980 (version "0.7")
5981 (home-page "https://bitheap.org/cram/")
5982 (source (origin
5983 (method url-fetch)
5984 (uri (list (string-append home-page "cram-"
5985 version ".tar.gz")
5986 (pypi-uri "cram" version)))
5987 (sha256
5988 (base32
5989 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
5990 (arguments
5991 '(#:phases
5992 (modify-phases %standard-phases
5993 (add-after 'unpack 'patch-source
5994 (lambda _
5995 (substitute* (find-files "cram" ".*\\.py$")
5996 ;; Replace default shell path.
5997 (("/bin/sh") (which "sh")))
5998 (substitute* (find-files "tests" ".*\\.t$")
5999 (("md5") "md5sum")
6000 (("/bin/bash") (which "bash"))
6001 (("/bin/sh") (which "sh")))
6002 (substitute* "cram/_test.py"
6003 ;; This hack works around a bug triggered by substituting
6004 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6005 ;; "cram -h", which breaks the output at 80 characters. This
6006 ;; causes the line showing the default shell to break into two
6007 ;; lines, but the test expects a single line...
6008 (("env\\['COLUMNS'\\] = '80'")
6009 "env['COLUMNS'] = '160'"))
6010 #t))
6011 (delete 'check)
6012 (add-after 'install 'check
6013 ;; The test phase uses the built library and executable.
6014 ;; It's easier to run it after install since the build
6015 ;; directory contains version-specific PATH.
6016 (lambda* (#:key inputs outputs #:allow-other-keys)
6017 (add-installed-pythonpath inputs outputs)
6018 (setenv "PATH" (string-append (getenv "PATH") ":"
6019 (assoc-ref outputs "out") "/bin"))
6020 (invoke "make" "test"))))))
6021 (build-system python-build-system)
6022 (native-inputs
6023 `(("python-coverage" ,python-coverage)
6024 ("which" ,which)))
6025 (synopsis "Simple testing framework for command line applications")
6026 (description
6027 "Cram is a functional testing framework for command line applications.
6028 Cram tests look like snippets of interactive shell sessions. Cram runs each
6029 command and compares the command output in the test with the command’s actual
6030 output.")
6031 (license license:gpl2+)))
6032
6033 (define-public python2-cram
6034 (package-with-python2 python-cram))
6035
6036 (define-public python-straight-plugin
6037 (package
6038 (name "python-straight-plugin")
6039 (version "1.4.1")
6040 (source
6041 (origin
6042 (method url-fetch)
6043 (uri (pypi-uri "straight.plugin" version))
6044 (sha256
6045 (base32
6046 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6047 (build-system python-build-system)
6048 (home-page "https://github.com/ironfroggy/straight.plugin")
6049 (synopsis "Simple namespaced plugin facility")
6050 (description "Straight Plugin provides a type of plugin you can create from
6051 almost any existing Python modules, and an easy way for outside developers to
6052 add functionality and customization to your projects with their own plugins.")
6053 (license license:expat)))
6054
6055 (define-public python2-straight-plugin
6056 (package-with-python2 python-straight-plugin))
6057
6058 (define-public python-fonttools
6059 (package
6060 (name "python-fonttools")
6061 (version "3.28.0")
6062 (source (origin
6063 (method url-fetch)
6064 (uri (pypi-uri "fonttools" version ".zip"))
6065 (sha256
6066 (base32
6067 "0vsvjhidpb5kywpjgz1j3fywzkddxkb0afqai18qa3h6lqjyxwpb"))))
6068 (build-system python-build-system)
6069 (native-inputs
6070 `(("unzip" ,unzip)
6071 ("python-pytest" ,python-pytest)
6072 ("python-pytest-runner" ,python-pytest-runner)))
6073 (home-page "https://github.com/behdad/fonttools")
6074 (synopsis "Tools to manipulate font files")
6075 (description
6076 "FontTools/TTX is a library to manipulate font files from Python. It
6077 supports reading and writing of TrueType/OpenType fonts, reading and writing
6078 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6079 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6080 from an XML-based format.")
6081 (license license:expat)))
6082
6083 (define-public python2-fonttools
6084 (package-with-python2 python-fonttools))
6085
6086 (define-public python-ly
6087 (package
6088 (name "python-ly")
6089 (version "0.9.5")
6090 (source
6091 (origin
6092 (method url-fetch)
6093 (uri (pypi-uri name version))
6094 (sha256
6095 (base32
6096 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
6097 (build-system python-build-system)
6098 (arguments
6099 ;; FIXME: Some tests need network access.
6100 '(#:tests? #f))
6101 (synopsis "Tool and library for manipulating LilyPond files")
6102 (description "This package provides a Python library to parse, manipulate
6103 or create documents in LilyPond format. A command line program ly is also
6104 provided that can be used to do various manipulations with LilyPond files.")
6105 (home-page "https://pypi.python.org/pypi/python-ly")
6106 (license license:gpl2+)))
6107
6108 (define-public python-appdirs
6109 (package
6110 (name "python-appdirs")
6111 (version "1.4.3")
6112 (source
6113 (origin
6114 (method url-fetch)
6115 (uri (pypi-uri "appdirs" version))
6116 (sha256
6117 (base32
6118 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
6119 (build-system python-build-system)
6120 (home-page "https://github.com/ActiveState/appdirs")
6121 (synopsis
6122 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6123 (description
6124 "This module provides a portable way of finding out where user data
6125 should be stored on various operating systems.")
6126 (license license:expat)))
6127
6128 (define-public python2-appdirs
6129 (package-with-python2 python-appdirs))
6130
6131 (define-public python-llfuse
6132 (package
6133 (name "python-llfuse")
6134 (version "1.3.5")
6135 (source (origin
6136 (method url-fetch)
6137 (uri (pypi-uri "llfuse" version ".tar.bz2"))
6138 (sha256
6139 (base32
6140 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
6141 (build-system python-build-system)
6142 (inputs
6143 `(("fuse" ,fuse)
6144 ("attr" ,attr)))
6145 (native-inputs
6146 `(("pkg-config" ,pkg-config)))
6147 (synopsis "Python bindings for FUSE")
6148 (description
6149 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6150 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
6151 (license license:lgpl2.0+)
6152 (properties `((python2-variant . ,(delay python2-llfuse))))))
6153
6154 (define-public python2-llfuse
6155 (package (inherit (package-with-python2
6156 (strip-python2-variant python-llfuse)))
6157 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6158
6159 ;; For attic-0.16
6160 (define-public python-llfuse-0.41
6161 (package (inherit python-llfuse)
6162 (version "0.41.1")
6163 (source (origin
6164 (method url-fetch)
6165 (uri (string-append
6166 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6167 "llfuse-" version ".tar.bz2"))
6168 (sha256
6169 (base32
6170 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
6171 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6172 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
6173 (license (list license:expat license:lgpl2.0+))))
6174
6175 (define-public python-msgpack
6176 (package
6177 (name "python-msgpack")
6178 (version "0.5.6")
6179 (source (origin
6180 (method url-fetch)
6181 (uri (pypi-uri "msgpack" version))
6182 (sha256
6183 (base32
6184 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
6185 (build-system python-build-system)
6186 (arguments
6187 `(#:modules ((guix build utils)
6188 (guix build python-build-system)
6189 (ice-9 ftw)
6190 (srfi srfi-1)
6191 (srfi srfi-26))
6192 #:phases
6193 (modify-phases %standard-phases
6194 (replace 'check
6195 (lambda _
6196 (let ((cwd (getcwd)))
6197 (setenv "PYTHONPATH"
6198 (string-append cwd "/build/"
6199 (find (cut string-prefix? "lib" <>)
6200 (scandir (string-append cwd "/build")))
6201 ":"
6202 (getenv "PYTHONPATH")))
6203 (invoke "pytest" "-v" "test")))))))
6204 (native-inputs
6205 `(("python-pytest" ,python-pytest)))
6206 (synopsis "MessagePack (de)serializer")
6207 (description "MessagePack is a fast, compact binary serialization format,
6208 suitable for similar data to JSON. This package provides CPython bindings for
6209 reading and writing MessagePack data.")
6210 (home-page "https://pypi.python.org/pypi/msgpack/")
6211 (license license:asl2.0)))
6212
6213 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
6214 ;; release 0.5. Some packages like borg still call it by the old name for now.
6215 ;; <https://bugs.gnu.org/30662>
6216 (define-public python-msgpack-transitional
6217 (package
6218 (inherit python-msgpack)
6219 (name "python-msgpack-transitional")
6220 (arguments
6221 (substitute-keyword-arguments (package-arguments python-msgpack)
6222 ((#:phases phases)
6223 `(modify-phases ,phases
6224 (add-after 'unpack 'configure-transitional
6225 (lambda _
6226 ;; Keep using the old name.
6227 (substitute* "setup.py"
6228 (("TRANSITIONAL = False")
6229 "TRANSITIONAL = 1"))
6230 #t))))))))
6231
6232 (define-public python2-msgpack
6233 (package-with-python2 python-msgpack))
6234
6235 (define-public python-netaddr
6236 (package
6237 (name "python-netaddr")
6238 (version "0.7.19")
6239 (source
6240 (origin
6241 (method url-fetch)
6242 (uri (pypi-uri "netaddr" version))
6243 (sha256
6244 (base32
6245 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
6246 (build-system python-build-system)
6247 (arguments `(#:tests? #f)) ;; No tests.
6248 (home-page "https://github.com/drkjam/netaddr/")
6249 (synopsis "Pythonic manipulation of network addresses")
6250 (description
6251 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6252 and MAC network addresses.")
6253 (license license:bsd-3)))
6254
6255 (define-public python2-netaddr
6256 (package-with-python2 python-netaddr))
6257
6258 (define-public python-wrapt
6259 (package
6260 (name "python-wrapt")
6261 (version "1.11.1")
6262 (source
6263 (origin
6264 (method url-fetch)
6265 (uri (pypi-uri "wrapt" version))
6266 (sha256
6267 (base32
6268 "0cqmysny1pz01jw26q48q5zasvns6507rwhgm6wcw743f0r01sja"))))
6269 (build-system python-build-system)
6270 (arguments
6271 ;; Tests are not included in the tarball, they are only available in the
6272 ;; git repository.
6273 `(#:tests? #f))
6274 (home-page "https://github.com/GrahamDumpleton/wrapt")
6275 (synopsis "Module for decorators, wrappers and monkey patching")
6276 (description
6277 "The aim of the wrapt module is to provide a transparent object proxy for
6278 Python, which can be used as the basis for the construction of function
6279 wrappers and decorator functions.")
6280 (license license:bsd-2)))
6281
6282 (define-public python2-wrapt
6283 (package-with-python2 python-wrapt))
6284
6285 (define-public python-xlrd
6286 (package
6287 (name "python-xlrd")
6288 (version "1.0.0")
6289 (source (origin
6290 (method url-fetch)
6291 (uri (pypi-uri "xlrd" version))
6292 (sha256
6293 (base32
6294 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
6295 (build-system python-build-system)
6296 (arguments
6297 `(#:phases
6298 (modify-phases %standard-phases
6299 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
6300 ;; run tests instead for now.
6301 (replace 'check (lambda _ (invoke "nosetests"))))))
6302 (native-inputs `(("python-nose" ,python-nose)))
6303 (home-page "http://www.python-excel.org/")
6304 (synopsis "Library for extracting data from Excel files")
6305 (description "This packages provides a library to extract data from
6306 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
6307 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
6308 Unicode-aware. It is not intended as an end-user tool.")
6309 (license license:bsd-3)))
6310
6311 (define-public python2-xlrd
6312 (package-with-python2 python-xlrd))
6313
6314 (define-public python-prettytable
6315 (package
6316 (name "python-prettytable")
6317 (version "0.7.2")
6318 (source
6319 (origin
6320 (method url-fetch)
6321 (uri (pypi-uri "prettytable" version ".tar.bz2"))
6322 (sha256
6323 (base32
6324 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
6325 (build-system python-build-system)
6326 (home-page "http://code.google.com/p/prettytable/")
6327 (synopsis "Display tabular data in an ASCII table format")
6328 (description
6329 "A library designed to represent tabular data in visually appealing ASCII
6330 tables. PrettyTable allows for selection of which columns are to be printed,
6331 independent alignment of columns (left or right justified or centred) and
6332 printing of sub-tables by specifying a row range.")
6333 (license license:bsd-3)))
6334
6335 (define-public python2-prettytable
6336 (package-with-python2 python-prettytable))
6337
6338 (define-public python-tables
6339 (package
6340 (name "python-tables")
6341 (version "3.4.4")
6342 (source
6343 (origin
6344 (method url-fetch)
6345 (uri (pypi-uri "tables" version))
6346 (sha256
6347 (base32
6348 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
6349 (modules '((guix build utils)))
6350 (snippet
6351 '(begin
6352 ;; Remove pre-compiled .pyc files from source.
6353 (for-each delete-file-recursively
6354 (find-files "." "__pycache__" #:directories? #t))
6355 (for-each delete-file (find-files "." "\\.pyc$"))
6356 #t))))
6357 (build-system python-build-system)
6358 (arguments
6359 `(;; FIXME: python-build-system does not pass configure-flags to "build"
6360 ;; or "check", so we must override the build and check phases.
6361 #:phases
6362 (modify-phases %standard-phases
6363 (add-after 'unpack 'use-gcc
6364 (lambda _
6365 (substitute* "setup.py"
6366 (("compiler = new_compiler\\(\\)" line)
6367 (string-append line
6368 "\ncompiler.set_executables(compiler='gcc',"
6369 "compiler_so='gcc',"
6370 "linker_exe='gcc',"
6371 "linker_so='gcc -shared')")))
6372 #t))
6373 (replace 'build
6374 (lambda* (#:key inputs #:allow-other-keys)
6375 (invoke "python" "setup.py" "build"
6376 (string-append "--hdf5="
6377 (assoc-ref inputs "hdf5")))))
6378 (replace 'check
6379 (lambda* (#:key inputs #:allow-other-keys)
6380 (invoke "python" "setup.py" "check"
6381 (string-append "--hdf5="
6382 (assoc-ref inputs "hdf5"))))))))
6383 (propagated-inputs
6384 `(("python-numexpr" ,python-numexpr)
6385 ("python-numpy" ,python-numpy)))
6386 (native-inputs
6387 `(("python-cython" ,python-cython)
6388 ("pkg-config" ,pkg-config)))
6389 (inputs
6390 `(("hdf5" ,hdf5)
6391 ("bzip2" ,bzip2)
6392 ("zlib" ,zlib)))
6393 (home-page "http://www.pytables.org/")
6394 (synopsis "Hierarchical datasets for Python")
6395 (description "PyTables is a package for managing hierarchical datasets and
6396 designed to efficiently cope with extremely large amounts of data.")
6397 (license license:bsd-3)))
6398
6399 (define-public python2-tables
6400 (package-with-python2 python-tables))
6401
6402 (define-public python-pyasn1
6403 (package
6404 (name "python-pyasn1")
6405 (version "0.4.3")
6406 (source
6407 (origin
6408 (method url-fetch)
6409 (uri (pypi-uri "pyasn1" version))
6410 (sha256
6411 (base32
6412 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
6413 (build-system python-build-system)
6414 (home-page "http://pyasn1.sourceforge.net/")
6415 (synopsis "ASN.1 types and codecs")
6416 (description
6417 "This is an implementation of ASN.1 types and codecs in Python. It is
6418 suitable for a wide range of protocols based on the ASN.1 specification.")
6419 (license license:bsd-2)))
6420
6421 (define-public python2-pyasn1
6422 (package-with-python2 python-pyasn1))
6423
6424 (define-public python-pyasn1-modules
6425 (package
6426 (name "python-pyasn1-modules")
6427 (version "0.2.2")
6428 (source
6429 (origin
6430 (method url-fetch)
6431 (uri (pypi-uri "pyasn1-modules" version))
6432 (sha256
6433 (base32
6434 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
6435 (build-system python-build-system)
6436 (propagated-inputs
6437 `(("python-pyasn1" ,python-pyasn1)))
6438 (home-page "https://sourceforge.net/projects/pyasn1/")
6439 (synopsis "ASN.1 codec implementations")
6440 (description
6441 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
6442 implementations of ASN.1-based codecs and protocols.")
6443 (license license:bsd-3)))
6444
6445 (define-public python2-pyasn1-modules
6446 (package-with-python2 python-pyasn1-modules))
6447
6448 (define-public python-ipaddress
6449 (package
6450 (name "python-ipaddress")
6451 (version "1.0.22")
6452 (source (origin
6453 (method url-fetch)
6454 (uri (pypi-uri "ipaddress" version))
6455 (sha256
6456 (base32
6457 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
6458 (build-system python-build-system)
6459 (home-page "https://github.com/phihag/ipaddress")
6460 (synopsis "IP address manipulation library")
6461 (description
6462 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
6463 in Python. This library is used to create, poke at, and manipulate IPv4 and
6464 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
6465 module to older versions of Python.")
6466 (license license:psfl)))
6467
6468 (define-public python2-ipaddress
6469 (package-with-python2 python-ipaddress))
6470
6471 (define-public python2-ipaddr
6472 (package
6473 (name "python2-ipaddr")
6474 (version "2.1.11")
6475 (source
6476 (origin
6477 (method url-fetch)
6478 (uri (pypi-uri "ipaddr" version))
6479 (sha256
6480 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
6481 (build-system python-build-system)
6482 (arguments
6483 `(#:python ,python-2 ;version 2 only
6484 #:phases
6485 (modify-phases %standard-phases
6486 (replace 'check
6487 (lambda _ (invoke "python" "ipaddr_test.py"))))))
6488 (home-page "https://github.com/google/ipaddr-py")
6489 (synopsis "IP address manipulation library")
6490 (description
6491 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
6492 IPv6 addresses and networks.
6493
6494 For new implementations you may prefer to use the standard module
6495 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
6496 versions of Python.")
6497 (license license:asl2.0)))
6498
6499 (define-public python-idna
6500 (package
6501 (name "python-idna")
6502 (version "2.7")
6503 (source
6504 (origin
6505 (method url-fetch)
6506 (uri (pypi-uri "idna" version))
6507 (sha256
6508 (base32
6509 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))
6510 (build-system python-build-system)
6511 (home-page "https://github.com/kjd/idna")
6512 (synopsis "Internationalized domain names in applications")
6513 (description
6514 "This is a library to support the Internationalised Domain Names in
6515 Applications (IDNA) protocol as specified in RFC 5891. This version of the
6516 protocol is often referred to as “IDNA2008” and can produce different results
6517 from the earlier standard from 2003. The library is also intended to act as a
6518 suitable drop-in replacement for the “encodings.idna” module that comes with
6519 the Python standard library but currently only supports the older 2003
6520 specification.")
6521 (license license:bsd-4)))
6522
6523 (define-public python2-idna
6524 (package-with-python2 python-idna))
6525
6526 (define-public python-idna-ssl
6527 (package
6528 (name "python-idna-ssl")
6529 (version "1.0.1")
6530 (source
6531 (origin
6532 (method url-fetch)
6533 (uri (pypi-uri "idna-ssl" version))
6534 (sha256
6535 (base32
6536 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
6537 (build-system python-build-system)
6538 (arguments
6539 `(#:tests? #f)) ;circular dependency with python-aiohttp
6540 (home-page "https://github.com/aio-libs/idna-ssl")
6541 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
6542 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
6543 domains support.")
6544 (license license:expat)))
6545
6546 (define-public python-pretend
6547 (package
6548 (name "python-pretend")
6549 (version "1.0.9")
6550 (source
6551 (origin
6552 (method url-fetch)
6553 (uri (pypi-uri "pretend" version))
6554 (sha256
6555 (base32
6556 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
6557 (build-system python-build-system)
6558 (home-page "https://github.com/alex/pretend")
6559 (synopsis "Library for stubbing in Python")
6560 (description
6561 "Pretend is a library to make stubbing with Python easier. Stubbing is a
6562 technique for writing tests. You may hear the term mixed up with mocks,
6563 fakes, or doubles. Basically, a stub is an object that returns pre-canned
6564 responses, rather than doing any computation.")
6565 (license license:bsd-3)))
6566
6567 (define-public python2-pretend
6568 (package-with-python2 python-pretend))
6569
6570 (define-public python-pip
6571 (package
6572 (name "python-pip")
6573 (version "18.1")
6574 (source
6575 (origin
6576 (method url-fetch)
6577 (uri (pypi-uri "pip" version))
6578 (sha256
6579 (base32
6580 "188fclay154s520n43s7cxxlhdaiysvxf19zk8vr1xbyjyyr58n0"))))
6581 (build-system python-build-system)
6582 (arguments
6583 '(#:tests? #f)) ; there are no tests in the pypi archive.
6584 (home-page "https://pip.pypa.io/")
6585 (synopsis "Package manager for Python software")
6586 (description
6587 "Pip is a package manager for Python software, that finds packages on the
6588 Python Package Index (PyPI).")
6589 (license license:expat)))
6590
6591 (define-public python2-pip
6592 (package-with-python2 python-pip))
6593
6594 (define-public python-tlsh
6595 (package
6596 (name "python-tlsh")
6597 (version "3.4.5")
6598 (home-page "https://github.com/trendmicro/tlsh")
6599 (source (origin
6600 (method url-fetch)
6601 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
6602 version ".tar.gz"))
6603 (sha256
6604 (base32
6605 "1x1vahd4zg5kpyr9h9hs3fvh460p25rjy4cclwdnbbw8x3vc30q3"))
6606 (file-name (string-append name "-" version ".tar.gz"))))
6607 (build-system cmake-build-system)
6608 (arguments
6609 '(#:out-of-source? #f
6610 #:phases (modify-phases %standard-phases
6611 (replace
6612 'install
6613 (lambda* (#:key outputs #:allow-other-keys)
6614 ;; Build and install the Python bindings. The underlying
6615 ;; C++ library is apparently not meant to be installed.
6616 (let ((out (assoc-ref outputs "out")))
6617 (with-directory-excursion "py_ext"
6618 (and (system* "python" "setup.py" "build")
6619 (system* "python" "setup.py" "install"
6620 (string-append "--prefix=" out))))))))))
6621 (inputs `(("python" ,python-wrapper))) ;for the bindings
6622 (synopsis "Fuzzy matching library for Python")
6623 (description
6624 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
6625 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
6626 value which can be used for similarity comparisons. Similar objects have
6627 similar hash values, which allows for the detection of similar objects by
6628 comparing their hash values. The byte stream should have a sufficient amount
6629 of complexity; for example, a byte stream of identical bytes will not generate
6630 a hash value.")
6631 (license license:asl2.0)))
6632
6633 (define-public python2-tlsh
6634 (package
6635 (inherit python-tlsh)
6636 (name "python2-tlsh")
6637 (inputs `(("python" ,python-2)))))
6638
6639 (define-public python-termcolor
6640 (package
6641 (name "python-termcolor")
6642 (version "1.1.0")
6643 (source
6644 (origin
6645 (method url-fetch)
6646 (uri (pypi-uri "termcolor" version))
6647 (sha256
6648 (base32
6649 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
6650 (build-system python-build-system)
6651 (arguments
6652 ;; There are no tests.
6653 `(#:tests? #f))
6654 (home-page "https://pypi.python.org/pypi/termcolor")
6655 (synopsis "ANSII Color formatting for terminal output")
6656 (description
6657 "This package provides ANSII Color formatting for output in terminals.")
6658 (license license:expat)))
6659
6660 (define-public python2-termcolor
6661 (package-with-python2 python-termcolor))
6662
6663 (define-public python-libarchive-c
6664 (package
6665 (name "python-libarchive-c")
6666 (version "2.8")
6667 (source (origin
6668 (method url-fetch)
6669 (uri (pypi-uri "libarchive-c" version))
6670 (sha256
6671 (base32
6672 "0qg0v1s9c1xdk9philhnv8k6c6nicvnvfwlc0j9srg90jmdlvm06"))))
6673 (build-system python-build-system)
6674 (arguments
6675 '(#:phases (modify-phases %standard-phases
6676 (add-before
6677 'build 'reference-libarchive
6678 (lambda* (#:key inputs #:allow-other-keys)
6679 ;; Retain the absolute file name of libarchive.so.
6680 (let ((libarchive (assoc-ref inputs "libarchive")))
6681 (substitute* "libarchive/ffi.py"
6682 (("find_library\\('archive'\\)")
6683 (string-append "'" libarchive
6684 "/lib/libarchive.so'"))))))
6685 (replace 'check
6686 (lambda _ (invoke "pytest" "-vv"))))))
6687 (native-inputs
6688 `(("python-mock" ,python-mock)
6689 ("python-pytest" ,python-pytest)))
6690 (inputs
6691 `(("libarchive" ,libarchive)))
6692 (home-page "https://github.com/Changaco/python-libarchive-c")
6693 (synopsis "Python interface to libarchive")
6694 (description
6695 "This package provides Python bindings to libarchive, a C library to
6696 access possibly compressed archives in many different formats. It uses
6697 Python's @code{ctypes} foreign function interface (FFI).")
6698 (license license:lgpl2.0+)))
6699
6700 (define-public python2-libarchive-c
6701 (package-with-python2 python-libarchive-c))
6702
6703 (define-public python-file
6704 (package
6705 (inherit file)
6706 (name "python-file")
6707 (build-system python-build-system)
6708 (arguments
6709 '(#:tests? #f ;no tests
6710 #:configure-flags '("--single-version-externally-managed" "--root=/")
6711 #:phases (modify-phases %standard-phases
6712 (add-before 'build 'change-directory
6713 (lambda _
6714 (chdir "python")
6715 #t))
6716 (add-before 'build 'set-library-file-name
6717 (lambda* (#:key inputs #:allow-other-keys)
6718 (let ((file (assoc-ref inputs "file")))
6719 (substitute* "magic.py"
6720 (("find_library\\('magic'\\)")
6721 (string-append "'" file "/lib/libmagic.so'")))
6722 #t))))))
6723 (inputs `(("file" ,file)))
6724 (self-native-input? #f)
6725 (synopsis "Python bindings to the libmagic file type guesser. Note that
6726 this module and the python-magic module both provide a \"magic.py\" file;
6727 these two modules, which are different and were developed separately, both
6728 serve the same purpose: provide Python bindings for libmagic.")))
6729
6730 (define-public python2-file
6731 (package-with-python2 python-file))
6732
6733 (define-public python-debian
6734 (package
6735 (name "python-debian")
6736 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
6737 (version "0.1.28")
6738 (source
6739 (origin
6740 (method url-fetch)
6741 (uri (pypi-uri name version))
6742 (sha256
6743 (base32
6744 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
6745 (build-system python-build-system)
6746 (propagated-inputs
6747 `(("python-six" ,python-six)))
6748 (synopsis "Debian package related modules")
6749 (description
6750 ;; XXX: Use @enumerate instead of @itemize to work around
6751 ;; <http://bugs.gnu.org/21772>.
6752 "This package provides Python modules that abstract many formats of
6753 Debian-related files, such as:
6754
6755 @enumerate
6756 @item Debtags information;
6757 @item @file{debian/changelog} files;
6758 @item packages files, pdiffs;
6759 @item control files of single or multiple RFC822-style paragraphs---e.g.
6760 @file{debian/control}, @file{.changes}, @file{.dsc};
6761 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
6762 contained files and meta-information.
6763 @end enumerate\n")
6764
6765 ;; Modules are either GPLv2+ or GPLv3+.
6766 (license license:gpl3+)))
6767
6768 (define-public python2-debian
6769 (package-with-python2 python-debian))
6770
6771 (define-public python-nbformat
6772 (package
6773 (name "python-nbformat")
6774 (version "4.4.0")
6775 (source
6776 (origin
6777 (method url-fetch)
6778 (uri (pypi-uri "nbformat" version))
6779 (sha256
6780 (base32
6781 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
6782 (build-system python-build-system)
6783 (arguments `(#:tests? #f)) ; no test target
6784 (propagated-inputs
6785 `(("python-ipython-genutils" ,python-ipython-genutils)
6786 ("python-jsonschema" ,python-jsonschema)
6787 ("python-jupyter-core" ,python-jupyter-core)
6788 ("python-traitlets" ,python-traitlets)))
6789 (home-page "http://jupyter.org")
6790 (synopsis "Jupyter Notebook format")
6791 (description "This package provides the reference implementation of the
6792 Jupyter Notebook format and Python APIs for working with notebooks.")
6793 (license license:bsd-3)))
6794
6795 (define-public python2-nbformat
6796 (package-with-python2 python-nbformat))
6797
6798 (define-public python-bleach
6799 (package
6800 (name "python-bleach")
6801 (version "1.4.3")
6802 (source
6803 (origin
6804 (method url-fetch)
6805 (uri (pypi-uri "bleach" version))
6806 (sha256
6807 (base32
6808 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
6809 (build-system python-build-system)
6810 (propagated-inputs
6811 `(("python-html5lib" ,python-html5lib-0.9)
6812 ("python-six" ,python-six)))
6813 (native-inputs
6814 `(("python-nose" ,python-nose)))
6815 (home-page "https://github.com/jsocol/bleach")
6816 (synopsis "Whitelist-based HTML-sanitizing tool")
6817 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
6818 (license license:asl2.0)))
6819
6820 (define-public python2-bleach
6821 (package-with-python2 python-bleach))
6822
6823 (define-public python-entrypoints
6824 (package
6825 (name "python-entrypoints")
6826 (version "0.3")
6827 (source
6828 (origin
6829 (method url-fetch)
6830 (uri (pypi-uri "entrypoints" version))
6831 (sha256
6832 (base32
6833 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
6834 (build-system python-build-system)
6835 ;; The package does not come with a setup.py file, so we have to generate
6836 ;; one ourselves.
6837 (arguments
6838 `(#:tests? #f
6839 #:phases
6840 (modify-phases %standard-phases
6841 (add-after 'unpack 'create-setup.py
6842 (lambda _
6843 (call-with-output-file "setup.py"
6844 (lambda (port)
6845 (format port "\
6846 from setuptools import setup
6847 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
6848 " ,version))))))))
6849 (home-page "https://github.com/takluyver/entrypoints")
6850 (synopsis "Discover and load entry points from installed Python packages")
6851 (description "Entry points are a way for Python packages to advertise
6852 objects with some common interface. The most common examples are
6853 @code{console_scripts} entry points, which define shell commands by
6854 identifying a Python function to run. The @code{entrypoints} module contains
6855 functions to find and load entry points.")
6856 (license license:expat)))
6857
6858 (define-public python2-entrypoints
6859 (package-with-python2 python-entrypoints))
6860
6861 (define-public python-nbconvert
6862 (package
6863 (name "python-nbconvert")
6864 (version "5.0.0b1")
6865 (source
6866 (origin
6867 (method url-fetch)
6868 (uri (pypi-uri "nbconvert" version))
6869 (sha256
6870 (base32
6871 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
6872 (build-system python-build-system)
6873 (arguments
6874 `(;; The "bdist_egg" target is disabled by default, causing the installation
6875 ;; to fail.
6876 #:configure-flags (list "bdist_egg")
6877 ;; FIXME: 5 failures, 40 errors.
6878 #:tests? #f))
6879 ;; #:phases
6880 ;; (modify-phases %standard-phases
6881 ;; (replace 'check
6882 ;; (lambda _
6883 ;; (zero? (system* "py.test" "-v")))))
6884 (native-inputs
6885 `(("python-pytest" ,python-pytest)))
6886 (propagated-inputs
6887 `(("python-bleach" ,python-bleach)
6888 ("python-entrypoints" ,python-entrypoints)
6889 ("python-jinja2" ,python-jinja2)
6890 ("python-jupyter-core" ,python-jupyter-core)
6891 ("python-mistune" ,python-mistune)
6892 ("python-nbformat" ,python-nbformat)
6893 ("python-pygments" ,python-pygments)
6894 ("python-traitlets" ,python-traitlets)))
6895 (home-page "http://jupyter.org")
6896 (synopsis "Converting Jupyter Notebooks")
6897 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
6898 notebooks to various other formats via Jinja templates. It allows you to
6899 convert an @code{.ipynb} notebook file into various static formats including:
6900
6901 @enumerate
6902 @item HTML
6903 @item LaTeX
6904 @item PDF
6905 @item Reveal JS
6906 @item Markdown (md)
6907 @item ReStructured Text (rst)
6908 @item executable script
6909 @end enumerate\n")
6910 (license license:bsd-3)))
6911
6912 (define-public python2-nbconvert
6913 (package-with-python2 python-nbconvert))
6914
6915 (define-public python-notebook
6916 (package
6917 (name "python-notebook")
6918 (version "5.7.4")
6919 (source (origin
6920 (method url-fetch)
6921 (uri (pypi-uri "notebook" version))
6922 (sha256
6923 (base32
6924 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
6925 (build-system python-build-system)
6926 (arguments
6927 `(#:phases
6928 (modify-phases %standard-phases
6929 (replace 'check
6930 (lambda _
6931 ;; These tests require a browser
6932 (delete-file-recursively "notebook/tests/selenium")
6933 ;; Some tests need HOME
6934 (setenv "HOME" "/tmp")
6935 ;; This file contains "warningfilters", which are not supported
6936 ;; by this version of nose.
6937 (delete-file "setup.cfg")
6938 (with-directory-excursion "/tmp"
6939 (invoke "nosetests" "-v"))
6940 #t)))))
6941 (propagated-inputs
6942 `(("python-jupyter-core" ,python-jupyter-core)
6943 ("python-nbformat" ,python-nbformat)
6944 ("python-nbconvert" ,python-nbconvert)
6945 ("python-prometheus-client" ,python-prometheus-client)
6946 ("python-send2trash" ,python-send2trash)
6947 ("python-terminado" ,python-terminado)))
6948 (native-inputs
6949 `(("python-nose" ,python-nose)
6950 ("python-sphinx" ,python-sphinx)
6951 ("python-requests" ,python-requests)))
6952 (home-page "http://jupyter.org/")
6953 (synopsis "Web-based notebook environment for interactive computing")
6954 (description
6955 "The Jupyter HTML notebook is a web-based notebook environment for
6956 interactive computing.")
6957 (properties `((python2-variant . ,(delay python2-notebook))))
6958 (license license:bsd-3)))
6959
6960 (define-public python2-notebook
6961 (let ((base (package-with-python2
6962 (strip-python2-variant python-notebook))))
6963 (package (inherit base)
6964 (native-inputs
6965 `(("python2-mock" ,python2-mock)
6966 ,@(package-native-inputs base)))
6967 (arguments
6968 (substitute-keyword-arguments (package-arguments base)
6969 ((#:phases phases)
6970 `(modify-phases ,phases
6971 (add-before 'check 'disable-test-case
6972 ;; The test requires network access to localhost. Curiously it
6973 ;; fails with Python 2 only. Simply make the test-case return
6974 ;; immediately.
6975 (lambda _
6976 (substitute*
6977 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
6978 (("formats = self.nbconvert_api") "return #")))))))))))
6979
6980 (define-public python-widgetsnbextension
6981 (package
6982 (name "python-widgetsnbextension")
6983 (version "3.4.2")
6984 (source
6985 (origin
6986 (method url-fetch)
6987 (uri (pypi-uri "widgetsnbextension" version))
6988 (sha256
6989 (base32
6990 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
6991 (build-system python-build-system)
6992 (propagated-inputs
6993 `(("python-ipykernel" ,python-ipykernel)
6994 ("python-notebook" ,python-notebook)))
6995 (native-inputs
6996 `(("python-certifi" ,python-certifi)
6997 ("python-nose" ,python-nose)))
6998 (home-page "https://ipython.org")
6999 (synopsis "IPython HTML widgets for Jupyter")
7000 (description "This package provides interactive HTML widgets for Jupyter
7001 notebooks.")
7002 (license license:bsd-3)))
7003
7004 (define-public python2-widgetsnbextension
7005 (package-with-python2 python-widgetsnbextension))
7006
7007 (define-public python-ipywidgets
7008 (package
7009 (name "python-ipywidgets")
7010 (version "5.2.2")
7011 (source
7012 (origin
7013 (method url-fetch)
7014 (uri (pypi-uri "ipywidgets" version))
7015 (sha256
7016 (base32
7017 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7018 (build-system python-build-system)
7019 (propagated-inputs
7020 `(("python-ipython" ,python-ipython)
7021 ("python-traitlets" ,python-traitlets)
7022 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7023 (native-inputs
7024 `(("python-nose" ,python-nose)
7025 ("python-pytest" ,python-pytest)))
7026 (home-page "https://ipython.org")
7027 (synopsis "IPython HTML widgets for Jupyter")
7028 (description "Ipywidgets are interactive HTML widgets for Jupyter
7029 notebooks and the IPython kernel. Notebooks come alive when interactive
7030 widgets are used. Users gain control of their data and can visualize changes
7031 in the data.")
7032 (license license:bsd-3)))
7033
7034 (define-public python2-ipywidgets
7035 (package-with-python2 python-ipywidgets))
7036
7037 (define-public python-jupyter-console
7038 (package
7039 (name "python-jupyter-console")
7040 (version "5.2.0")
7041 (source
7042 (origin
7043 (method url-fetch)
7044 (uri (pypi-uri "jupyter_console" version))
7045 (sha256
7046 (base32
7047 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
7048 (build-system python-build-system)
7049 ;; Tests only run in an TTY.
7050 (arguments `(#:tests? #f))
7051 (propagated-inputs
7052 `(("python-ipykernel" ,python-ipykernel)
7053 ("python-jupyter-client" ,python-jupyter-client)
7054 ("python-prompt-toolkit" ,python-prompt-toolkit-1)
7055 ("python-pygments" ,python-pygments)))
7056 (native-inputs
7057 `(("python-nose" ,python-nose)))
7058 (home-page "https://jupyter.org")
7059 (synopsis "Jupyter terminal console")
7060 (description "This package provides a terminal-based console frontend for
7061 Jupyter kernels. It also allows for console-based interaction with non-Python
7062 Jupyter kernels such as IJulia and IRKernel.")
7063 (license license:bsd-3)))
7064
7065 (define-public python2-jupyter-console
7066 (package-with-python2 python-jupyter-console))
7067
7068 ;; The python-ipython and python-jupyter-console require each other. To get
7069 ;; the functionality in both packages working, strip down the
7070 ;; python-jupyter-console package when using it as an input to python-ipython.
7071 (define python-jupyter-console-minimal
7072 (package
7073 (inherit python-jupyter-console)
7074 (name "python-jupyter-console-minimal")
7075 (arguments
7076 (substitute-keyword-arguments
7077 (package-arguments python-jupyter-console)
7078 ((#:phases phases)
7079 `(modify-phases ,phases
7080 (add-after 'install 'delete-bin
7081 (lambda* (#:key outputs #:allow-other-keys)
7082 ;; Delete the bin files, to avoid conflicts in profiles
7083 ;; where python-ipython and python-jupyter-console are
7084 ;; both present.
7085 (delete-file-recursively
7086 (string-append
7087 (assoc-ref outputs "out") "/bin"))))))))
7088 ;; Remove the python-ipython propagated input, to avoid the cycle
7089 (propagated-inputs
7090 (alist-delete
7091 "python-ipython"
7092 (package-propagated-inputs python-jupyter-console)))))
7093
7094 (define-public python-qtconsole
7095 (package
7096 (name "python-qtconsole")
7097 (version "4.4.3")
7098 (source
7099 (origin
7100 (method url-fetch)
7101 (uri (pypi-uri "qtconsole" version))
7102 (sha256
7103 (base32
7104 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
7105 (build-system python-build-system)
7106 (arguments
7107 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
7108 ;; but we only have the LTS version 5.x. This means that there might be
7109 ;; runtime errors, but since this is a dependency of the Jupyter package,
7110 ;; and Jupyter can be used without the qtconsole we can overlook this for
7111 ;; now.
7112 `(#:tests? #f
7113 #:phases
7114 (modify-phases %standard-phases
7115 (add-before 'check 'pre-check
7116 (lambda _
7117 (setenv "QT_QPA_PLATFORM" "offscreen")
7118 #t)))))
7119 (propagated-inputs
7120 `(("python-ipykernel" ,python-ipykernel)
7121 ("python-ipython" ,python-ipython)))
7122 (native-inputs
7123 `(("python-pytest" ,python-pytest)))
7124 (home-page "http://jupyter.org")
7125 (synopsis "Jupyter Qt console")
7126 (description "This package provides a Qt-based console for Jupyter with
7127 support for rich media output.")
7128 (license license:bsd-3)))
7129
7130 (define-public jupyter
7131 (package
7132 (name "jupyter")
7133 (version "1.0.0")
7134 (source
7135 (origin
7136 (method url-fetch)
7137 (uri (pypi-uri "jupyter" version))
7138 (sha256
7139 (base32
7140 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
7141 (build-system python-build-system)
7142 (arguments '(#:tests? #f)) ; there are none.
7143 (propagated-inputs
7144 `(("python-ipykernel" ,python-ipykernel)
7145 ("python-ipywidgets" ,python-ipywidgets)
7146 ("python-jupyter-console" ,python-jupyter-console)
7147 ("python-nbconvert" ,python-nbconvert)
7148 ("python-notebook" ,python-notebook)
7149 ("python-qtconsole" ,python-qtconsole)))
7150 (native-search-paths
7151 (list (search-path-specification
7152 (variable "JUPYTER_PATH")
7153 (files '("share/jupyter")))))
7154 (home-page "https://jupyter.org")
7155 (synopsis "Web application for interactive documents")
7156 (description
7157 "The Jupyter Notebook is a web application that allows you to create and
7158 share documents that contain live code, equations, visualizations and
7159 explanatory text. Uses include: data cleaning and transformation, numerical
7160 simulation, statistical modeling, machine learning and much more.")
7161 (license license:bsd-3)))
7162
7163 (define-public python-chardet
7164 (package
7165 (name "python-chardet")
7166 (version "3.0.4")
7167 (source
7168 (origin
7169 (method url-fetch)
7170 (uri (pypi-uri "chardet" version))
7171 (sha256
7172 (base32
7173 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
7174 (native-inputs
7175 `(("python-hypothesis" ,python-hypothesis)
7176 ("python-pytest" ,python-pytest)
7177 ("python-pytest-runner" ,python-pytest-runner)))
7178 (build-system python-build-system)
7179 (home-page "https://github.com/chardet/chardet")
7180 (synopsis "Universal encoding detector for Python 2 and 3")
7181 (description
7182 "This package provides @code{chardet}, a Python module that can
7183 automatically detect a wide range of file encodings.")
7184 (license license:lgpl2.1+)))
7185
7186 (define-public python2-chardet
7187 (package-with-python2 python-chardet))
7188
7189 (define-public python-docopt
7190 (package
7191 (name "python-docopt")
7192 (version "0.6.2")
7193 (source
7194 (origin
7195 (method url-fetch)
7196 ;; The release on PyPI does not include tests.
7197 (uri (string-append
7198 "https://github.com/docopt/docopt/archive/"
7199 version ".tar.gz"))
7200 (file-name (string-append name "-" version ".tar.gz"))
7201 (sha256
7202 (base32
7203 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
7204 (build-system python-build-system)
7205 (native-inputs
7206 `(("python-pytest" ,python-pytest)))
7207 (arguments
7208 `(#:phases
7209 (modify-phases %standard-phases
7210 (replace 'check
7211 (lambda _ (invoke "py.test"))))))
7212 (home-page "http://docopt.org")
7213 (synopsis "Command-line interface description language for Python")
7214 (description "This library allows the user to define a command-line
7215 interface from a program's help message rather than specifying it
7216 programatically with command-line parsers like @code{getopt} and
7217 @code{argparse}.")
7218 (license license:expat)))
7219
7220 (define-public python2-docopt
7221 (package-with-python2 python-docopt))
7222
7223 (define-public python-pythondialog
7224 (package
7225 (name "python-pythondialog")
7226 (version "3.4.0")
7227 (source
7228 (origin
7229 (method url-fetch)
7230 (uri (pypi-uri "pythondialog" version))
7231 (sha256
7232 (base32
7233 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
7234 (build-system python-build-system)
7235 (arguments
7236 `(#:phases
7237 (modify-phases %standard-phases
7238 (add-after 'unpack 'patch-path
7239 (lambda* (#:key inputs #:allow-other-keys)
7240 (let* ((dialog (assoc-ref inputs "dialog")))
7241 ;; Since this library really wants to grovel the search path, we
7242 ;; must hardcode dialog's store path into it.
7243 (substitute* "dialog.py"
7244 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
7245 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
7246 #t))))
7247 #:tests? #f)) ; no test suite
7248 (propagated-inputs
7249 `(("dialog" ,dialog)))
7250 (home-page "http://pythondialog.sourceforge.net/")
7251 (synopsis "Python interface to the UNIX dialog utility")
7252 (description "A Python wrapper for the dialog utility. Its purpose is to
7253 provide an easy to use, pythonic and comprehensive Python interface to dialog.
7254 This allows one to make simple text-mode user interfaces on Unix-like systems")
7255 (license license:lgpl2.1)
7256 (properties `((python2-variant . ,(delay python2-pythondialog))))))
7257
7258 (define-public python2-pythondialog
7259 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
7260 (package
7261 (inherit base)
7262 (version (package-version python-pythondialog))
7263 (source (origin
7264 (method url-fetch)
7265 (uri (pypi-uri "python2-pythondialog" version))
7266 (sha256
7267 (base32
7268 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
7269
7270 (define-public python-configobj
7271 (package
7272 (name "python-configobj")
7273 (version "5.0.6")
7274 (source (origin
7275 (method url-fetch)
7276 (uri (pypi-uri "configobj" version))
7277 (sha256
7278 (base32
7279 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
7280 ;; Patch setup.py so it looks for python-setuptools, which is
7281 ;; required to parse the keyword 'install_requires' in setup.py.
7282 (patches (search-patches "python-configobj-setuptools.patch"))))
7283 (build-system python-build-system)
7284 (propagated-inputs
7285 `(("python-six" ,python-six)))
7286 (synopsis "Config file reading, writing and validation")
7287 (description "ConfigObj is a simple but powerful config file reader and
7288 writer: an ini file round tripper. Its main feature is that it is very easy to
7289 use, with a straightforward programmer’s interface and a simple syntax for
7290 config files.")
7291 (home-page "https://github.com/DiffSK/configobj")
7292 (license license:bsd-3)))
7293
7294 (define-public python2-configobj
7295 (package-with-python2 python-configobj))
7296
7297 (define-public python-configargparse
7298 (package
7299 (name "python-configargparse")
7300 (version "0.14.0")
7301 (source (origin
7302 (method url-fetch)
7303 (uri (pypi-uri "ConfigArgParse" version))
7304 (sha256
7305 (base32
7306 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
7307 (build-system python-build-system)
7308 (native-inputs
7309 `(("python-pyyaml" ,python-pyyaml)))
7310 (arguments
7311 `(#:phases
7312 (modify-phases %standard-phases
7313 (replace 'check
7314 (lambda _
7315 ;; Bypass setuptools-shim because one test relies on "setup.py"
7316 ;; being the first argument passed to the python call.
7317 ;;
7318 ;; NOTE: Many tests do not run because they rely on Python's
7319 ;; built-in test.test_argparse, but we remove the unit tests from
7320 ;; our Python installation.
7321 (invoke "python" "setup.py" "test"))))))
7322 (synopsis "Replacement for argparse")
7323 (description "A drop-in replacement for argparse that allows options to also
7324 be set via config files and/or environment variables.")
7325 (home-page "https://github.com/bw2/ConfigArgParse")
7326 (license license:expat)))
7327
7328 (define-public python2-configargparse
7329 (package-with-python2 python-configargparse))
7330
7331 (define-public python-argparse-manpage
7332 (package
7333 (name "python-argparse-manpage")
7334 (version "1.1")
7335 (source
7336 (origin
7337 (method url-fetch)
7338 (uri (pypi-uri "argparse-manpage" version))
7339 (sha256
7340 (base32
7341 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
7342 (build-system python-build-system)
7343 (home-page "https://github.com/praiskup/argparse-manpage")
7344 (synopsis "Build manual page from Python's ArgumentParser object")
7345 (description
7346 "This package provides tools to build manual pages from Python's
7347 @code{ArgumentParser} object.")
7348 (license license:asl2.0)))
7349
7350 (define-public python2-contextlib2
7351 (package
7352 (name "python2-contextlib2")
7353 (version "0.5.5")
7354 (source
7355 (origin
7356 (method url-fetch)
7357 (uri (pypi-uri "contextlib2" version))
7358 (sha256
7359 (base32
7360 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
7361 (build-system python-build-system)
7362 (arguments
7363 `(#:python ,python-2
7364 #:phases
7365 (modify-phases %standard-phases
7366 (replace 'check
7367 (lambda _ (invoke "python" "test_contextlib2.py" "-v"))))))
7368 (native-inputs
7369 `(("python2-unittest2" ,python2-unittest2)))
7370 (home-page "http://contextlib2.readthedocs.org/")
7371 (synopsis "Tools for decorators and context managers")
7372 (description "This module is primarily a backport of the Python
7373 3.2 contextlib to earlier Python versions. Like contextlib, it
7374 provides utilities for common tasks involving decorators and context
7375 managers. It also contains additional features that are not part of
7376 the standard library.")
7377 (license license:psfl)))
7378
7379 (define-public python-texttable
7380 (package
7381 (name "python-texttable")
7382 (version "0.8.7")
7383 (source
7384 (origin
7385 (method url-fetch)
7386 (uri (pypi-uri "texttable" version))
7387 (sha256
7388 (base32
7389 "1liiiydgkg37i46a418aw19fyf6z3ds51wdwwpyjbs12x0phhf4a"))))
7390 (build-system python-build-system)
7391 (arguments '(#:tests? #f)) ; no tests
7392 (home-page "https://github.com/foutaise/texttable/")
7393 (synopsis "Python module for creating simple ASCII tables")
7394 (description "Texttable is a Python module for creating simple ASCII
7395 tables.")
7396 (license license:lgpl2.1+)))
7397
7398 (define-public python2-texttable
7399 (package-with-python2 python-texttable))
7400
7401 (define-public python-atomicwrites
7402 (package
7403 (name "python-atomicwrites")
7404 (version "1.1.5")
7405 (source (origin
7406 (method url-fetch)
7407 (uri (pypi-uri "atomicwrites" version))
7408 (sha256
7409 (base32
7410 "11bm90fwm2avvf4f3ib8g925w7jr4m11vcsinn1bi6ns4bm32214"))))
7411 (build-system python-build-system)
7412 (synopsis "Atomic file writes in Python")
7413 (description "Library for atomic file writes using platform dependent tools
7414 for atomic file system operations.")
7415 (home-page "https://github.com/untitaker/python-atomicwrites")
7416 (license license:expat)))
7417
7418 (define-public python2-atomicwrites
7419 (package-with-python2 python-atomicwrites))
7420
7421 (define-public python-click-threading
7422 (package
7423 (name "python-click-threading")
7424 (version "0.4.4")
7425 (source (origin
7426 (method url-fetch)
7427 (uri (pypi-uri "click-threading" version))
7428 (sha256
7429 (base32
7430 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
7431 (build-system python-build-system)
7432 (propagated-inputs
7433 `(("python-click" ,python-click)))
7434 (synopsis "Utilities for multithreading in Click")
7435 (description "This package provides utilities for multithreading in Click
7436 applications.")
7437 (home-page "https://github.com/click-contrib/click-threading")
7438 (license license:expat)))
7439
7440 (define-public python-click-log
7441 (package
7442 (name "python-click-log")
7443 (version "0.3.2")
7444 (source (origin
7445 (method url-fetch)
7446 (uri (pypi-uri "click-log" version))
7447 (sha256
7448 (base32
7449 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
7450 (build-system python-build-system)
7451 (propagated-inputs
7452 `(("python-click" ,python-click)))
7453 (synopsis "Logging for click applications")
7454 (description "This package provides a Python library for logging Click
7455 applications.")
7456 (home-page "https://github.com/click-contrib/click-log")
7457 (license license:expat)))
7458
7459 (define-public python-apipkg
7460 (package
7461 (name "python-apipkg")
7462 (version "1.4")
7463 (source (origin
7464 (method url-fetch)
7465 (uri (pypi-uri "apipkg" version))
7466 (sha256
7467 (base32
7468 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
7469 (build-system python-build-system)
7470 (native-inputs
7471 `(("python-pytest" ,python-pytest)))
7472 (synopsis "Namespace control and lazy-import mechanism")
7473 (description "With apipkg you can control the exported namespace of a Python
7474 package and greatly reduce the number of imports for your users. It is a small
7475 pure Python module that works on virtually all Python versions.")
7476 (home-page "https://github.com/pytest-dev/apipkg")
7477 (license license:expat)))
7478
7479 (define-public python2-apipkg
7480 (package-with-python2 python-apipkg))
7481
7482 (define-public python-execnet
7483 (package
7484 (name "python-execnet")
7485 (version "1.4.1")
7486 (source (origin
7487 (method url-fetch)
7488 (uri (pypi-uri "execnet" version))
7489 (sha256
7490 (base32
7491 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
7492 (build-system python-build-system)
7493 (arguments
7494 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
7495 ;; The two test failures are caused by the lack of an `ssh` executable.
7496 ;; The test suite can be run with pytest after the 'install' phase.
7497 #:tests? #f))
7498 (native-inputs
7499 `(("python-pytest" ,python-pytest)
7500 ("python-setuptools-scm" ,python-setuptools-scm)))
7501 (propagated-inputs
7502 `(("python-apipkg" ,python-apipkg)))
7503 (synopsis "Rapid multi-Python deployment")
7504 (description "Execnet provides a share-nothing model with
7505 channel-send/receive communication for distributing execution across many
7506 Python interpreters across version, platform and network barriers. It has a
7507 minimal and fast API targeting the following uses:
7508 @enumerate
7509 @item distribute tasks to (many) local or remote CPUs
7510 @item write and deploy hybrid multi-process applications
7511 @item write scripts to administer multiple environments
7512 @end enumerate")
7513 (home-page "http://codespeak.net/execnet/")
7514 (license license:expat)))
7515
7516 (define-public python2-execnet
7517 (package-with-python2 python-execnet))
7518
7519 (define-public python-icalendar
7520 (package
7521 (name "python-icalendar")
7522 (version "4.0.3")
7523 (source (origin
7524 (method url-fetch)
7525 (uri (pypi-uri "icalendar" version))
7526 (sha256
7527 (base32
7528 "0mk3dk1dxkcm46jy48v27j2w2349iv4sbimqj1yb5js43mx49hh7"))))
7529 (build-system python-build-system)
7530 (propagated-inputs
7531 `(("python-dateutil" ,python-dateutil)
7532 ("python-pytz" ,python-pytz)))
7533 (synopsis "Python library for parsing iCalendar files")
7534 (description "The icalendar package is a parser/generator of iCalendar
7535 files for use with Python.")
7536 (home-page "https://github.com/collective/icalendar")
7537 (license license:bsd-2)))
7538
7539 (define-public python-sphinxcontrib-newsfeed
7540 (package
7541 (name "python-sphinxcontrib-newsfeed")
7542 (version "0.1.4")
7543 (source (origin
7544 (method url-fetch)
7545 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
7546 (sha256
7547 (base32
7548 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
7549 (arguments '(#:tests? #f)) ; No tests.
7550 (build-system python-build-system)
7551 (propagated-inputs
7552 `(("python-sphinx" ,python-sphinx)))
7553 (synopsis "News Feed extension for Sphinx")
7554 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
7555 Blog, News or Announcements section to a Sphinx website.")
7556 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
7557 (license license:bsd-2)))
7558
7559 (define-public python-args
7560 (package
7561 (name "python-args")
7562 (version "0.1.0")
7563 (source (origin
7564 (method url-fetch)
7565 (uri (pypi-uri "args" version))
7566 (sha256
7567 (base32
7568 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
7569 (build-system python-build-system)
7570 (home-page "https://github.com/kennethreitz/args")
7571 (synopsis "Command-line argument parser")
7572 (description
7573 "This library provides a Python module to parse command-line arguments.")
7574 (license license:bsd-3)))
7575
7576 (define-public python2-args
7577 (package-with-python2 python-args))
7578
7579 (define-public python-clint
7580 (package
7581 (name "python-clint")
7582 (version "0.5.1")
7583 (source (origin
7584 (method url-fetch)
7585 (uri (pypi-uri "clint" version))
7586 (sha256
7587 (base32
7588 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
7589 (build-system python-build-system)
7590 (arguments
7591 '(#:phases
7592 (modify-phases %standard-phases
7593 (replace 'check
7594 (lambda _ (invoke "py.test" "-v"))))))
7595 (native-inputs
7596 `(("python-pytest" ,python-pytest)))
7597 (propagated-inputs
7598 `(("python-args" ,python-args)))
7599 (home-page "https://github.com/kennethreitz/clint")
7600 (synopsis "Command-line interface tools")
7601 (description
7602 "Clint is a Python module filled with a set of tools for developing
7603 command-line applications, including tools for colored and indented
7604 output, progress bar display, and pipes.")
7605 (license license:isc)))
7606
7607 (define-public python2-clint
7608 (package-with-python2 python-clint))
7609
7610 (define-public python-rply
7611 (package
7612 (name "python-rply")
7613 (version "0.7.5")
7614 (source (origin
7615 (method url-fetch)
7616 (uri (pypi-uri "rply" version))
7617 (sha256
7618 (base32
7619 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
7620 (build-system python-build-system)
7621 (propagated-inputs
7622 `(("python-appdirs" ,python-appdirs)))
7623 (home-page "https://github.com/alex/rply")
7624 (synopsis "Parser generator for Python")
7625 (description
7626 "This package provides a pure Python based parser generator, that also
7627 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
7628 with a new public API, and RPython support.")
7629 (license license:bsd-3)))
7630
7631 (define-public python2-rply
7632 (package-with-python2 python-rply))
7633
7634 (define-public python-hy
7635 (package
7636 (name "python-hy")
7637 (version "0.13.0")
7638 (source (origin
7639 (method url-fetch)
7640 (uri (pypi-uri "hy" version))
7641 (sha256
7642 (base32
7643 "19sfymaksx9jhksfnb15ahid46mzrhdfzz6yy2craz2qnzvpmky8"))))
7644 (build-system python-build-system)
7645 (arguments
7646 '(#:phases
7647 (modify-phases %standard-phases
7648 (replace 'check
7649 (lambda _
7650 ;; Tests require write access to HOME.
7651 (setenv "HOME" "/tmp")
7652 (invoke "nosetests"))))))
7653 (native-inputs
7654 `(("python-coverage" ,python-coverage)
7655 ("python-nose" ,python-nose)))
7656 (propagated-inputs
7657 `(("python-astor" ,python-astor)
7658 ("python-clint" ,python-clint)
7659 ("python-rply" ,python-rply)))
7660 (home-page "http://hylang.org/")
7661 (synopsis "Lisp frontend to Python")
7662 (description
7663 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
7664 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
7665 Python at your fingertips, in Lisp form.")
7666 (license license:expat)))
7667
7668 (define-public python2-hy
7669 (package-with-python2 python-hy))
7670
7671 (define-public python2-functools32
7672 (package
7673 (name "python2-functools32")
7674 (version "3.2.3-2")
7675 (source
7676 (origin
7677 (method url-fetch)
7678 (uri (pypi-uri "functools32" version))
7679 (sha256
7680 (base32
7681 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
7682 (build-system python-build-system)
7683 (arguments
7684 `(#:python ,python-2
7685 #:tests? #f)) ; no test target
7686 (home-page "https://github.com/MiCHiLU/python-functools32")
7687 (synopsis
7688 "Backport of the functools module from Python 3.2.3")
7689 (description
7690 "This package is a backport of the @code{functools} module from Python
7691 3.2.3 for use with older versions of Python and PyPy.")
7692 (license license:expat)))
7693
7694 (define-public python2-subprocess32
7695 (package
7696 (name "python2-subprocess32")
7697 (version "3.2.7")
7698 (source (origin
7699 (method url-fetch)
7700 (uri (pypi-uri "subprocess32" version))
7701 (sha256
7702 (base32
7703 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
7704 (patches
7705 (search-patches "python2-subprocess32-disable-input-test.patch"))))
7706 (build-system python-build-system)
7707 (arguments
7708 `(#:python ,python-2
7709 ;; The test suite fails with Python > 2.7.13:
7710 ;; import test.support
7711 ;; ImportError: No module named support
7712 #:tests? #f
7713 #:phases
7714 (modify-phases %standard-phases
7715 (add-after 'unpack 'patch-/bin/sh
7716 (lambda _
7717 (substitute* '("subprocess32.py"
7718 "test_subprocess32.py")
7719 (("/bin/sh") (which "sh")))
7720 #t)))))
7721 (home-page "https://github.com/google/python-subprocess32")
7722 (synopsis "Backport of the subprocess module from Python 3.2")
7723 (description
7724 "This is a backport of the @code{subprocess} standard library module
7725 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
7726 new features. On POSIX systems it is guaranteed to be reliable when used
7727 in threaded applications. It includes timeout support from Python 3.3 but
7728 otherwise matches 3.2’s API.")
7729 (license license:psfl)))
7730
7731 (define-public python2-futures
7732 (package
7733 (name "python2-futures")
7734 (version "3.2.0")
7735 (source
7736 (origin
7737 (method url-fetch)
7738 (uri (pypi-uri "futures" version))
7739 (sha256
7740 (base32
7741 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
7742 (build-system python-build-system)
7743 (arguments `(#:python ,python-2
7744 ;; FIXME: Python 2.7.14 moved the test.support library,
7745 ;; but our package has not yet been adjusted. Enable
7746 ;; tests when the python2 package has been fixed.
7747 #:tests? #f))
7748 (home-page "https://github.com/agronholm/pythonfutures")
7749 (synopsis
7750 "Backport of the concurrent.futures package from Python 3.2")
7751 (description
7752 "The concurrent.futures module provides a high-level interface for
7753 asynchronously executing callables. This package backports the
7754 concurrent.futures package from Python 3.2")
7755 (license license:bsd-3)))
7756
7757 (define-public python-promise
7758 (package
7759 (name "python-promise")
7760 (version "0.4.2")
7761 (source
7762 (origin
7763 (method url-fetch)
7764 (uri (pypi-uri "promise" version))
7765 (sha256
7766 (base32
7767 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
7768 (build-system python-build-system)
7769 ;; Tests wants python-futures, which is a python2 only program, and
7770 ;; can't be found by python-promise at test time.
7771 (arguments `(#:tests? #f))
7772 (home-page "https://github.com/syrusakbary/promise")
7773 (synopsis "Promises/A+ implementation for Python")
7774 (description
7775 "Promises/A+ implementation for Python")
7776 (properties `((python2-variant . ,(delay python2-promise))))
7777 (license license:expat)))
7778
7779 (define-public python2-promise
7780 (let ((promise (package-with-python2
7781 (strip-python2-variant python-promise))))
7782 (package (inherit promise)
7783 (arguments (substitute-keyword-arguments (package-arguments promise)
7784 ((#:tests? _) #t)))
7785 (native-inputs
7786 `(("python2-futures" ,python2-futures)
7787 ("python2-pytest" ,python2-pytest)
7788 ,@(package-native-inputs promise))))))
7789
7790 (define-public python-colorama
7791 (package
7792 (name "python-colorama")
7793 (version "0.3.9")
7794 (source
7795 (origin
7796 (method url-fetch)
7797 (uri (pypi-uri "colorama" version))
7798 (sha256
7799 (base32
7800 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
7801 (build-system python-build-system)
7802 (synopsis "Colored terminal text rendering for Python")
7803 (description "Colorama is a Python library for rendering colored terminal
7804 text.")
7805 (home-page "https://pypi.python.org/pypi/colorama")
7806 (license license:bsd-3)))
7807
7808 (define-public python2-colorama
7809 (package-with-python2 python-colorama))
7810
7811 (define-public python-rsa
7812 (package
7813 (name "python-rsa")
7814 (version "3.4.2")
7815 (source
7816 (origin
7817 (method url-fetch)
7818 (uri (pypi-uri "rsa" version))
7819 (sha256
7820 (base32
7821 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
7822 (build-system python-build-system)
7823 (propagated-inputs
7824 `(("python-pyasn1" ,python-pyasn1)))
7825 (synopsis "Pure-Python RSA implementation")
7826 (description "Python-RSA is a pure-Python RSA implementation. It supports
7827 encryption and decryption, signing and verifying signatures, and key
7828 generation according to PKCS#1 version 1.5. It can be used as a Python
7829 library as well as on the command line.")
7830 (home-page "https://stuvel.eu/rsa")
7831 (license license:asl2.0)))
7832
7833 (define-public python2-rsa
7834 (package-with-python2 python-rsa))
7835
7836 (define-public python-pluggy
7837 (package
7838 (name "python-pluggy")
7839 (version "0.7.1")
7840 (source
7841 (origin
7842 (method url-fetch)
7843 (uri (pypi-uri "pluggy" version))
7844 (sha256
7845 (base32
7846 "1qbn70mksmr03hac6jgp6fiqc4l7859z8dchx2x950vhlij87swm"))))
7847 (build-system python-build-system)
7848 (native-inputs
7849 `(("python-setuptools-scm" ,python-setuptools-scm)))
7850 (synopsis "Plugin and hook calling mechanism for Python")
7851 (description "Pluggy is an extraction of the plugin manager as used by
7852 Pytest but stripped of Pytest specific details.")
7853 (home-page "https://pypi.python.org/pypi/pluggy")
7854 (license license:expat)))
7855
7856 (define-public python2-pluggy
7857 (package-with-python2 python-pluggy))
7858
7859 (define-public python-tox
7860 (package
7861 (name "python-tox")
7862 (version "2.8.1")
7863 (source
7864 (origin
7865 (method url-fetch)
7866 (uri (pypi-uri "tox" version))
7867 (sha256
7868 (base32
7869 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
7870 (build-system python-build-system)
7871 (arguments
7872 ;; FIXME: Tests require pytest-timeout, which itself requires
7873 ;; pytest>=2.8.0 for installation.
7874 '(#:tests? #f))
7875 (propagated-inputs
7876 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
7877 ("python-py" ,python-py)
7878 ("python-virtualenv" ,python-virtualenv)))
7879 (native-inputs
7880 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
7881 ("python-pytest" ,python-pytest) ; >= 2.3.5
7882 ("python-setuptools-scm" ,python-setuptools-scm)))
7883 (home-page "http://tox.testrun.org/")
7884 (synopsis "Virtualenv-based automation of test activities")
7885 (description "Tox is a generic virtualenv management and test command line
7886 tool. It can be used to check that a package installs correctly with
7887 different Python versions and interpreters, or run tests in each type of
7888 supported environment, or act as a frontend to continuous integration
7889 servers.")
7890 (license license:expat)))
7891
7892 (define-public python2-tox
7893 (package-with-python2 python-tox))
7894
7895 (define-public python-jmespath
7896 (package
7897 (name "python-jmespath")
7898 (version "0.9.3")
7899 (source
7900 (origin
7901 (method url-fetch)
7902 (uri (pypi-uri "jmespath" version))
7903 (sha256
7904 (base32
7905 "0r7wc7fsxmlwzxx9j1j7rms06c6xs6d4sysirdhz1jk2mb4x90ba"))))
7906 (build-system python-build-system)
7907 (native-inputs
7908 `(("python-nose" ,python-nose)))
7909 (synopsis "JSON Matching Expressions")
7910 (description "JMESPath (pronounced “james path”) is a Python library that
7911 allows one to declaratively specify how to extract elements from a JSON
7912 document.")
7913 (home-page "https://github.com/jmespath/jmespath.py")
7914 (license license:expat)))
7915
7916 (define-public python2-jmespath
7917 (package-with-python2 python-jmespath))
7918
7919 (define-public python-botocore
7920 (package
7921 (name "python-botocore")
7922 (version "1.8.43")
7923 (source
7924 (origin
7925 (method url-fetch)
7926 (uri (pypi-uri "botocore" version))
7927 (sha256
7928 (base32
7929 "12cqpbnz3vfv41mp9admvciw7bc7hz57sjpqs2bxaw9wnfmbw5lg"))))
7930 (build-system python-build-system)
7931 (arguments
7932 ;; FIXME: Many tests are failing.
7933 '(#:tests? #f))
7934 (propagated-inputs
7935 `(("python-dateutil" ,python-dateutil)
7936 ("python-docutils" ,python-docutils)
7937 ("python-jmespath" ,python-jmespath)))
7938 (native-inputs
7939 `(("python-mock" ,python-mock)
7940 ("python-nose" ,python-nose)
7941 ("behave" ,behave)
7942 ("python-tox" ,python-tox)
7943 ("python-wheel" ,python-wheel)))
7944 (home-page "https://github.com/boto/botocore")
7945 (synopsis "Low-level interface to AWS")
7946 (description "Botocore is a Python library that provides a low-level
7947 interface to the Amazon Web Services (AWS) API.")
7948 (license license:asl2.0)))
7949
7950 (define-public python2-botocore
7951 (package-with-python2 python-botocore))
7952
7953 (define-public python-xdo
7954 (package
7955 (name "python-xdo")
7956 (version "0.3")
7957 (source (origin
7958 (method url-fetch)
7959 (uri (string-append
7960 "http://http.debian.net/debian/pool/main/p/python-xdo/"
7961 "python-xdo_" version ".orig.tar.gz"))
7962 (sha256
7963 (base32
7964 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
7965 (build-system python-build-system)
7966 (arguments
7967 '(#:phases
7968 (modify-phases %standard-phases
7969 (add-before 'install 'patch-libxdo-path
7970 ;; Hardcode the path of dynamically loaded libxdo library.
7971 (lambda* (#:key inputs #:allow-other-keys)
7972 (let ((libxdo (string-append
7973 (assoc-ref inputs "xdotool")
7974 "/lib/libxdo.so")))
7975 (substitute* "xdo/_xdo.py"
7976 (("find_library\\(\"xdo\"\\)")
7977 (simple-format #f "\"~a\"" libxdo)))
7978 #t))))
7979 #:tests? #f)) ; no tests provided
7980 (propagated-inputs
7981 `(("python-six" ,python-six)))
7982 (inputs
7983 `(("xdotool" ,xdotool)
7984 ("libX11" ,libx11)))
7985 (home-page "https://tracker.debian.org/pkg/python-xdo")
7986 (synopsis "Python library for simulating X11 keyboard/mouse input")
7987 (description "Provides bindings to libxdo for manipulating X11 via simulated
7988 input. (Note that this is mostly a legacy library; you may wish to look at
7989 python-xdo for newer bindings.)")
7990 (license license:bsd-3)))
7991
7992 (define-public python2-xdo
7993 (package-with-python2 python-xdo))
7994
7995 (define-public python-mako
7996 (package
7997 (name "python-mako")
7998 (version "1.0.7")
7999 (source
8000 (origin
8001 (method url-fetch)
8002 (uri (pypi-uri "Mako" version))
8003 (sha256
8004 (base32
8005 "1bi5gnr8r8dva06qpyx4kgjc6spm2k1y908183nbbaylggjzs0jf"))))
8006 (build-system python-build-system)
8007 (propagated-inputs
8008 `(("python-markupsafe" ,python-markupsafe)))
8009 (native-inputs
8010 `(("python-mock" ,python-mock)
8011 ("python-nose" ,python-nose)
8012 ("python-pytest" ,python-pytest)))
8013 (home-page "http://www.makotemplates.org/")
8014 (synopsis "Templating language for Python")
8015 (description "Mako is a templating language for Python that compiles
8016 templates into Python modules.")
8017 (license license:expat)))
8018
8019 (define-public python2-mako
8020 (package-with-python2 python-mako))
8021
8022 (define-public python-waitress
8023 (package
8024 (name "python-waitress")
8025 (version "1.1.0")
8026 (source
8027 (origin
8028 (method url-fetch)
8029 (uri (pypi-uri "waitress" version))
8030 (patches (search-patches "python-waitress-fix-tests.patch"))
8031 (sha256
8032 (base32
8033 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
8034 (build-system python-build-system)
8035 (home-page "https://github.com/Pylons/waitress")
8036 (synopsis "Waitress WSGI server")
8037 (description "Waitress is meant to be a production-quality pure-Python WSGI
8038 server with very acceptable performance.")
8039 (license license:zpl2.1)))
8040
8041 (define-public python2-waitress
8042 (package-with-python2 python-waitress))
8043
8044 (define-public python-pyquery
8045 (package
8046 (name "python-pyquery")
8047 (version "1.2.17")
8048 (source
8049 (origin
8050 (method url-fetch)
8051 (uri (pypi-uri "pyquery" version))
8052 (sha256
8053 (base32
8054 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
8055 (build-system python-build-system)
8056 (native-inputs
8057 `(("python-webob" ,python-webob)
8058 ("python-webtest" ,python-webtest)))
8059 (propagated-inputs
8060 `(("python-lxml" ,python-lxml)
8061 ("python-cssselect" ,python-cssselect)))
8062 (home-page "https://github.com/gawel/pyquery")
8063 (synopsis "Make jQuery-like queries on xml documents")
8064 (description "pyquery allows you to make jQuery queries on xml documents.
8065 The API is as much as possible the similar to jQuery. pyquery uses lxml for
8066 fast xml and html manipulation.")
8067 (license license:bsd-3)))
8068
8069 (define-public python-anyjson
8070 (package
8071 (name "python-anyjson")
8072 (version "0.3.3")
8073 (source
8074 (origin
8075 (method url-fetch)
8076 (uri (pypi-uri "anyjson" version))
8077 (sha256
8078 (base32
8079 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
8080 (build-system python-build-system)
8081 (arguments
8082 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
8083 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
8084 ;; whatever) so this transformation needs to be done before the tests
8085 ;; can be run. Maybe we could add a build step to transform beforehand
8086 ;; but it could be annoying/difficult.
8087 ;; We can enable tests for the Python 2 version, though, and do below.
8088 #:tests? #f))
8089 (home-page "https://bitbucket.org/runeh/anyjson/")
8090 (synopsis
8091 "Wraps best available JSON implementation in a common interface")
8092 (description
8093 "Anyjson loads whichever is the fastest JSON module installed
8094 and provides a uniform API regardless of which JSON implementation is used.")
8095 (license license:bsd-3)
8096 (properties `((python2-variant . ,(delay python2-anyjson))))))
8097
8098 (define-public python2-anyjson
8099 (let ((anyjson (package-with-python2
8100 (strip-python2-variant python-anyjson))))
8101 (package
8102 (inherit anyjson)
8103 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
8104 #:tests? #t
8105 ,@(package-arguments anyjson)))
8106 (native-inputs `(("python2-nose" ,python2-nose))))))
8107
8108 (define-public python-amqp
8109 (package
8110 (name "python-amqp")
8111 (version "2.3.2")
8112 (source
8113 (origin
8114 (method url-fetch)
8115 (uri (pypi-uri "amqp" version))
8116 (sha256
8117 (base32
8118 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
8119 (build-system python-build-system)
8120 (native-inputs
8121 `(("python-case" ,python-case)
8122 ("python-pytest-sugar" ,python-pytest-sugar)
8123 ("python-mock" ,python-mock)))
8124 (propagated-inputs
8125 `(("python-vine" ,python-vine)))
8126 (home-page "https://github.com/celery/py-amqp")
8127 (synopsis
8128 "Low-level AMQP client for Python (fork of amqplib)")
8129 (description
8130 "This is a fork of amqplib which was originally written by Barry Pederson.
8131 It is maintained by the Celery project, and used by kombu as a pure python
8132 alternative when librabbitmq is not available.")
8133 (license license:lgpl2.1+)
8134 (properties `((python2-variant . ,(delay python2-amqp))))))
8135
8136 (define-public python2-amqp
8137 (let ((amqp (package-with-python2
8138 (strip-python2-variant python-amqp))))
8139 (package
8140 (inherit amqp)
8141 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
8142 ;; unmaintained. Weirdly, does not do this on the python 3
8143 ;; version?
8144 #:tests? #f
8145 ,@(package-arguments amqp))))))
8146
8147 (define-public python-txamqp
8148 (package
8149 (name "python-txamqp")
8150 (version "0.8.2")
8151 (source
8152 (origin
8153 (method url-fetch)
8154 (uri (pypi-uri "txAMQP" version))
8155 (sha256
8156 (base32
8157 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
8158 (build-system python-build-system)
8159 (propagated-inputs
8160 `(("python-six" ,python-six)
8161 ("python-twisted" ,python-twisted)))
8162 (home-page "https://github.com/txamqp/txamqp")
8163 (synopsis "Communicate with AMQP peers and brokers using Twisted")
8164 (description
8165 "This package provides a Python library for communicating with AMQP peers
8166 and brokers using the asynchronous networking framework Twisted. It contains
8167 all the necessary code to connect, send and receive messages to/from an
8168 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
8169 also includes support for using Thrift RPC over AMQP in Twisted
8170 applications.")
8171 (license license:asl2.0)))
8172
8173 (define-public python2-txamqp
8174 (package-with-python2 python-txamqp))
8175
8176 (define-public python-kombu
8177 (package
8178 (name "python-kombu")
8179 (version "4.2.2")
8180 (source
8181 (origin
8182 (method url-fetch)
8183 (uri (pypi-uri "kombu" version))
8184 (sha256
8185 (base32
8186 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
8187 (build-system python-build-system)
8188 (native-inputs
8189 `(("python-mock" ,python-mock)
8190 ("python-case" ,python-case)
8191 ("python-pyro4" ,python-pyro4)
8192 ("python-pytest-sugar" ,python-pytest-sugar)
8193 ("python-pytz" ,python-pytz)))
8194 (propagated-inputs
8195 `(("python-anyjson" ,python-anyjson)
8196 ("python-amqp" ,python-amqp)
8197 ("python-redis" ,python-redis)))
8198 (home-page "https://kombu.readthedocs.io")
8199 (synopsis "Message passing library for Python")
8200 (description "The aim of Kombu is to make messaging in Python as easy as
8201 possible by providing an idiomatic high-level interface for the AMQ protocol,
8202 and also provide proven and tested solutions to common messaging problems.
8203 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
8204 message orientation, queuing, routing, reliability and security, for which the
8205 RabbitMQ messaging server is the most popular implementation.")
8206 (license license:bsd-3)
8207 (properties `((python2-variant . ,(delay python2-kombu))))))
8208
8209 (define-public python2-kombu
8210 (let ((kombu (package-with-python2
8211 (strip-python2-variant python-kombu))))
8212 (package
8213 (inherit kombu)
8214 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
8215 ;; It works fine on the python3 variant.
8216 #:tests? #f
8217 ,@(package-arguments kombu)))
8218 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8219 ,@(package-native-inputs kombu))))))
8220
8221 (define-public python-billiard
8222 (package
8223 (name "python-billiard")
8224 (version "3.5.0.5")
8225 (source
8226 (origin
8227 (method url-fetch)
8228 (uri (pypi-uri "billiard" version))
8229 (sha256
8230 (base32
8231 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
8232 (build-system python-build-system)
8233 (native-inputs
8234 `(("python-case" ,python-case)
8235 ("python-pytest" ,python-pytest)))
8236 (home-page "https://github.com/celery/billiard")
8237 (synopsis
8238 "Python multiprocessing fork with improvements and bugfixes")
8239 (description
8240 "Billiard is a fork of the Python 2.7 multiprocessing package. The
8241 multiprocessing package itself is a renamed and updated version of R Oudkerk's
8242 pyprocessing package. This standalone variant is intended to be compatible with
8243 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
8244 (license license:bsd-3)
8245 (properties `((python2-variant . ,(delay python2-billiard))))))
8246
8247 (define-public python2-billiard
8248 (let ((billiard (package-with-python2
8249 (strip-python2-variant python-billiard))))
8250 (package
8251 (inherit billiard)
8252 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8253 ("python2-mock" ,python2-mock)
8254 ,@(package-native-inputs billiard))))))
8255
8256 (define-public python-celery
8257 (package
8258 (name "python-celery")
8259 (version "4.2.1")
8260 (source
8261 (origin
8262 (method url-fetch)
8263 (uri (pypi-uri "celery" version))
8264 (sha256
8265 (base32
8266 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
8267 (build-system python-build-system)
8268 (arguments
8269 '(;; TODO The tests fail with Python 3.7
8270 ;; https://github.com/celery/celery/issues/4849
8271 #:tests? #f
8272 #:phases
8273 (modify-phases %standard-phases
8274 (add-after 'unpack 'patch-requirements
8275 (lambda _
8276 (substitute* "requirements/test.txt"
8277 (("pytest>=3\\.0,<3\\.3")
8278 "pytest>=3.0"))
8279 #t)))))
8280 (native-inputs
8281 `(("python-case" ,python-case)
8282 ("python-pytest" ,python-pytest)))
8283 (propagated-inputs
8284 `(("python-pytz" ,python-pytz)
8285 ("python-billiard" ,python-billiard)
8286 ("python-kombu" ,python-kombu)))
8287 (home-page "https://celeryproject.org")
8288 (synopsis "Distributed Task Queue")
8289 (description "Celery is an asynchronous task queue/job queue based on
8290 distributed message passing. It is focused on real-time operation, but
8291 supports scheduling as well. The execution units, called tasks, are executed
8292 concurrently on a single or more worker servers using multiprocessing,
8293 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
8294 synchronously (wait until ready).")
8295 (license license:bsd-3)
8296 (properties `((python2-variant . ,(delay python2-celery))))))
8297
8298 (define-public python2-celery
8299 (let ((celery (package-with-python2
8300 (strip-python2-variant python-celery))))
8301 (package
8302 (inherit celery)
8303 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8304 ("python2-mock" ,python2-mock)
8305 ,@(package-native-inputs celery))))))
8306
8307 (define-public python-translitcodec
8308 (package
8309 (name "python-translitcodec")
8310 (version "0.4.0")
8311 (source
8312 (origin
8313 (method url-fetch)
8314 (uri (pypi-uri "translitcodec" version))
8315 (sha256
8316 (base32
8317 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
8318 (build-system python-build-system)
8319 (arguments
8320 `(#:tests? #f)) ; no tests provided
8321 (home-page
8322 "https://github.com/claudep/translitcodec")
8323 (synopsis
8324 "Unicode to 8-bit charset transliteration codec")
8325 (description
8326 "This package contains codecs for transliterating ISO 10646 texts into
8327 best-effort representations using smaller coded character sets (ASCII,
8328 ISO 8859, etc.).")
8329 (license license:expat)))
8330
8331 (define-public python2-translitcodec
8332 (package-with-python2 python-translitcodec))
8333
8334 (define-public python-editor
8335 (package
8336 (name "python-editor")
8337 (version "0.5")
8338 (source
8339 (origin
8340 (method url-fetch)
8341 (uri (pypi-uri "python-editor" version))
8342 (sha256
8343 (base32
8344 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
8345 (build-system python-build-system)
8346 (home-page
8347 "https://github.com/fmoo/python-editor")
8348 (synopsis
8349 "Programmatically open an editor, capture the result")
8350 (description
8351 "python-editor is a library that provides the editor module for
8352 programmatically interfacing with your system's $EDITOR.")
8353 (license license:asl2.0)))
8354
8355 (define-public python2-editor
8356 (package-with-python2 python-editor))
8357
8358 (define-public python-sphinxcontrib-programoutput
8359 (package
8360 (name "python-sphinxcontrib-programoutput")
8361 (version "0.10")
8362 (source (origin
8363 (method url-fetch)
8364 (uri (pypi-uri "sphinxcontrib-programoutput" version))
8365 (sha256
8366 (base32
8367 "153hhnlbx4688zj9wd64819ps5znc2jlyp5crkgzvn5hxgy99vpx"))))
8368 (build-system python-build-system)
8369 (arguments
8370 ;; FIXME: Many tests are failing and the upstream is gone.
8371 '(#:tests? #f))
8372 (propagated-inputs
8373 `(("python-sphinx" ,python-sphinx)))
8374 (synopsis "Sphinx extension to include program output")
8375 (description "A Sphinx extension to literally insert the output of arbitrary
8376 commands into documents, helping you to keep your command examples up to date.")
8377 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
8378 (license license:bsd-2)))
8379
8380 (define-public python2-sphinxcontrib-programoutput
8381 (package-with-python2 python-sphinxcontrib-programoutput))
8382
8383 (define-public python-sphinx-repoze-autointerface
8384 (package
8385 (name "python-sphinx-repoze-autointerface")
8386 (version "0.8")
8387 (source (origin
8388 (method url-fetch)
8389 (uri (pypi-uri "repoze.sphinx.autointerface" version))
8390 (sha256
8391 (base32
8392 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
8393 (build-system python-build-system)
8394 (arguments '(#:tests? #f)) ; No tests.
8395 (propagated-inputs
8396 `(("python-sphinx" ,python-sphinx)
8397 ("python-zope-interface" ,python-zope-interface)))
8398 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
8399 (description "This package defines an extension for the Sphinx documentation
8400 system. The extension allows generation of API documentation by
8401 introspection of @code{zope.interface} instances in code.")
8402 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
8403 (license license:repoze)))
8404
8405 (define-public python2-sphinx-repoze-autointerface
8406 (package-with-python2 python-sphinx-repoze-autointerface))
8407
8408 (define-public python-vobject
8409 (package
8410 (name "python-vobject")
8411 (version "0.9.5")
8412 (source (origin
8413 (method url-fetch)
8414 (uri (pypi-uri "vobject" version))
8415 (sha256
8416 (base32
8417 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
8418 (build-system python-build-system)
8419 (arguments
8420 '(;; The test suite relies on some non-portable Windows interfaces.
8421 #:tests? #f))
8422 (propagated-inputs
8423 `(("python-dateutil" ,python-dateutil)
8424 ("python-pyicu" ,python-pyicu)))
8425 (synopsis "Parse and generate vCard and vCalendar files")
8426 (description "Vobject is intended to be a full featured Python package for
8427 parsing and generating vCard and vCalendar files. Currently, iCalendar files
8428 are supported and well tested. vCard 3.0 files are supported, and all data
8429 should be imported, but only a few components are understood in a sophisticated
8430 way.")
8431 (home-page "http://eventable.github.io/vobject/")
8432 (license license:asl2.0)))
8433
8434 (define-public python2-vobject
8435 (package-with-python2 python-vobject))
8436
8437 (define-public python-munkres
8438 (package
8439 (name "python-munkres")
8440 (version "1.0.8")
8441 (source (origin
8442 (method url-fetch)
8443 (uri (pypi-uri "munkres" version))
8444 (sha256
8445 (base32
8446 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
8447 (build-system python-build-system)
8448 (arguments
8449 '(#:tests? #f)) ; no test suite
8450 (home-page "http://software.clapper.org/munkres/")
8451 (synopsis "Implementation of the Munkres algorithm")
8452 (description "The Munkres module provides an implementation of the Munkres
8453 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
8454 useful for solving the Assignment Problem.")
8455 (license license:bsd-3)))
8456
8457 (define-public python2-munkres
8458 (package-with-python2 python-munkres))
8459
8460 (define-public python-whoosh
8461 (package
8462 (name "python-whoosh")
8463 (version "2.7.4")
8464 (source
8465 (origin
8466 (method url-fetch)
8467 (uri (pypi-uri "Whoosh" version))
8468 (sha256
8469 (base32
8470 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
8471 (build-system python-build-system)
8472 (native-inputs
8473 `(("python-pytest" ,python-pytest)))
8474 (home-page "https://bitbucket.org/mchaput/whoosh")
8475 (synopsis "Full text indexing, search, and spell checking library")
8476 (description
8477 "Whoosh is a fast, pure-Python full text indexing, search, and spell
8478 checking library.")
8479 (license license:bsd-2)))
8480
8481 (define-public python2-whoosh
8482 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
8483 (package (inherit whoosh)
8484 (propagated-inputs
8485 `(("python2-backport-ssl-match-hostname"
8486 ,python2-backport-ssl-match-hostname)
8487 ,@(package-propagated-inputs whoosh))))))
8488
8489 (define-public python-pathlib
8490 (package
8491 (name "python-pathlib")
8492 (version "1.0.1")
8493 (source (origin
8494 (method url-fetch)
8495 (uri (pypi-uri "pathlib" version))
8496 (sha256
8497 (base32
8498 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
8499 (build-system python-build-system)
8500 ;; The tests depend on the internal "test" module, which does not provide
8501 ;; a stable interface.
8502 (arguments `(#:tests? #f))
8503 (home-page "https://pathlib.readthedocs.org/")
8504 (synopsis "Object-oriented file system paths")
8505 (description "Pathlib offers a set of classes to handle file system paths.
8506 It offers the following advantages over using string objects:
8507
8508 @enumerate
8509 @item No more cumbersome use of os and os.path functions. Everything can
8510 be done easily through operators, attribute accesses, and method calls.
8511 @item Embodies the semantics of different path types. For example,
8512 comparing Windows paths ignores casing.
8513 @item Well-defined semantics, eliminating any inconsistencies or
8514 ambiguities (forward vs. backward slashes, etc.).
8515 @end enumerate
8516
8517 Note: In Python 3.4, pathlib is now part of the standard library. For other
8518 Python versions please consider python-pathlib2 instead, which tracks the
8519 standard library module. This module (python-pathlib) isn't maintained
8520 anymore.")
8521 (license license:expat)))
8522
8523 (define-public python2-pathlib
8524 (package-with-python2 python-pathlib))
8525
8526 (define-public python2-pathlib2
8527 (package
8528 (name "python2-pathlib2")
8529 (version "2.3.2")
8530 (source (origin
8531 (method url-fetch)
8532 (uri (pypi-uri "pathlib2" version))
8533 (sha256
8534 (base32
8535 "10yb0iv5x2hs631rcppkhbddx799d3h8pcwmkbh2a66ns3w71ccf"))))
8536 (build-system python-build-system)
8537 ;; We only need the the Python 2 variant, since for Python 3 our minimum
8538 ;; version is 3.4 which already includes this package as part of the
8539 ;; standard library.
8540 (arguments
8541 `(#:python ,python-2))
8542 (propagated-inputs
8543 `(("python2-scandir" ,python2-scandir)
8544 ("python2-six" ,python2-six)))
8545 (home-page "https://pypi.python.org/pypi/pathlib2/")
8546 (synopsis "Object-oriented file system paths - backport of standard
8547 pathlib module")
8548 (description "The goal of pathlib2 is to provide a backport of standard
8549 pathlib module which tracks the standard library module, so all the newest
8550 features of the standard pathlib can be used also on older Python versions.
8551
8552 Pathlib offers a set of classes to handle file system paths. It offers the
8553 following advantages over using string objects:
8554
8555 @enumerate
8556 @item No more cumbersome use of os and os.path functions. Everything can
8557 be done easily through operators, attribute accesses, and method calls.
8558 @item Embodies the semantics of different path types. For example,
8559 comparing Windows paths ignores casing.
8560 @item Well-defined semantics, eliminating any inconsistencies or
8561 ambiguities (forward vs. backward slashes, etc.).
8562 @end enumerate")
8563 (license license:expat)))
8564
8565 (define-public python2-pathlib2-bootstrap
8566 (hidden-package
8567 (package
8568 (inherit python2-pathlib2)
8569 (name "python2-pathlib2-bootstrap")
8570 (propagated-inputs
8571 `(("python2-scandir" ,python2-scandir)
8572 ("python2-six" ,python2-six-bootstrap))))))
8573
8574 (define-public python-jellyfish
8575 (package
8576 (name "python-jellyfish")
8577 (version "0.5.6")
8578 (source (origin
8579 (method url-fetch)
8580 (uri (pypi-uri "jellyfish" version))
8581 (sha256
8582 (base32
8583 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
8584 (build-system python-build-system)
8585 (native-inputs
8586 `(("python-pytest" ,python-pytest)))
8587 (home-page "https://github.com/jamesturk/jellyfish")
8588 (synopsis "Approximate and phonetic matching of strings")
8589 (description "Jellyfish uses a variety of string comparison and phonetic
8590 encoding algorithms to do fuzzy string matching.")
8591 (license license:bsd-2)
8592 (properties `((python2-variant . ,(delay python2-jellyfish))))))
8593
8594 (define-public python2-jellyfish
8595 (let ((jellyfish (package-with-python2
8596 (strip-python2-variant python-jellyfish))))
8597 (package (inherit jellyfish)
8598 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
8599 ,@(package-native-inputs jellyfish))))))
8600
8601 (define-public python2-unicodecsv
8602 (package
8603 (name "python2-unicodecsv")
8604 (version "0.14.1")
8605 (source (origin
8606 (method url-fetch)
8607 ;; The test suite is not included in the PyPi release.
8608 ;; https://github.com/jdunck/python-unicodecsv/issues/19
8609 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
8610 "archive/" version ".tar.gz"))
8611 (file-name (string-append name "-" version ".tar.gz"))
8612 (sha256
8613 (base32
8614 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
8615 (build-system python-build-system)
8616 (arguments
8617 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
8618 #:python ,python-2))
8619 (native-inputs
8620 `(("python2-unittest2" ,python2-unittest2)))
8621 (home-page "https://github.com/jdunck/python-unicodecsv")
8622 (synopsis "Unicode CSV module for Python 2")
8623 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
8624 module, adding support for Unicode strings.")
8625 (license license:bsd-2)))
8626
8627 (define-public python-rarfile
8628 (package
8629 (name "python-rarfile")
8630 (version "2.8")
8631 (source (origin
8632 (method url-fetch)
8633 (uri (pypi-uri "rarfile" version))
8634 (sha256
8635 (base32
8636 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
8637 (build-system python-build-system)
8638 (arguments
8639 '(#:phases
8640 (modify-phases %standard-phases
8641 (replace 'check
8642 ;; Many tests fail, but the installation proceeds.
8643 (lambda _ (invoke "make" "-C" "test" "test"))))))
8644 (native-inputs
8645 `(("which" ,which))) ; required for tests
8646 (propagated-inputs
8647 `(("libarchive" ,libarchive)))
8648 (home-page "https://github.com/markokr/rarfile")
8649 (synopsis "RAR archive reader for Python")
8650 (description "This is Python module for RAR archive reading. The interface
8651 is made as zipfile like as possible.")
8652 (license license:isc)))
8653
8654 (define-public python2-rarfile
8655 (package-with-python2 python-rarfile))
8656
8657 (define-public python-magic
8658 (package
8659 (name "python-magic")
8660 (version "0.4.15")
8661 (source
8662 (origin
8663 (method url-fetch)
8664 (uri (pypi-uri "python-magic" version))
8665 (sha256
8666 (base32
8667 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
8668 (file-name (string-append name "-" version "-checkout"))))
8669 (build-system python-build-system)
8670 (arguments
8671 ;; The tests are unreliable, so don't run them. The tests fail
8672 ;; under Python3 because they were written for Python2 and
8673 ;; contain import statements that do not work in Python3. One of
8674 ;; the tests fails under Python2 because its assertions are
8675 ;; overly stringent; it relies on comparing output strings which
8676 ;; are brittle and can change depending on the version of
8677 ;; libmagic being used and the system on which the test is
8678 ;; running. In my case, under GuixSD 0.10.0, only one test
8679 ;; failed, and it seems to have failed only because the version
8680 ;; of libmagic that is packaged in Guix outputs a slightly
8681 ;; different (but not wrong) string than the one that the test
8682 ;; expected.
8683 '(#:tests? #f
8684 #:phases (modify-phases %standard-phases
8685 ;; Replace a specific method call with a hard-coded
8686 ;; path to the necessary libmagic.so file in the
8687 ;; store. If we don't do this, then the method call
8688 ;; will fail to find the libmagic.so file, which in
8689 ;; turn will cause any application using
8690 ;; python-magic to fail.
8691 (add-before 'build 'hard-code-path-to-libmagic
8692 (lambda* (#:key inputs #:allow-other-keys)
8693 (let ((file (assoc-ref inputs "file")))
8694 (substitute* "magic.py"
8695 (("ctypes.util.find_library\\('magic'\\)")
8696 (string-append "'" file "/lib/libmagic.so'")))
8697 #t)))
8698 (add-before 'install 'disable-egg-compression
8699 (lambda _
8700 (let ((port (open-file "setup.cfg" "a")))
8701 (display "\n[easy_install]\nzip_ok = 0\n"
8702 port)
8703 (close-port port)
8704 #t))))))
8705 (inputs
8706 ;; python-magic needs to be able to find libmagic.so.
8707 `(("file" ,file)))
8708 (home-page
8709 "https://github.com/ahupp/python-magic")
8710 (synopsis
8711 "File type identification using libmagic")
8712 (description
8713 "This module uses ctypes to access the libmagic file type
8714 identification library. It makes use of the local magic database and
8715 supports both textual and MIME-type output. Note that this module and
8716 the python-file module both provide a \"magic.py\" file; these two
8717 modules, which are different and were developed separately, both serve
8718 the same purpose: to provide Python bindings for libmagic.")
8719 (license license:expat)))
8720
8721 (define-public python2-magic
8722 (package-with-python2 python-magic))
8723
8724 (define-public python2-s3cmd
8725 (package
8726 (name "python2-s3cmd")
8727 (version "1.6.1")
8728 (source
8729 (origin
8730 (method url-fetch)
8731 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
8732 "s3cmd-" version ".tar.gz"))
8733 (sha256
8734 (base32
8735 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
8736 (build-system python-build-system)
8737 (arguments
8738 ;; s3cmd is written for python2 only and contains no tests.
8739 `(#:python ,python-2
8740 #:tests? #f))
8741 (propagated-inputs
8742 `(("python2-dateutil" ,python2-dateutil)
8743 ;; The python-file package also provides a magic.py module.
8744 ;; This is an unfortunate state of affairs; however, s3cmd
8745 ;; fails to install if it cannot find specifically the
8746 ;; python-magic package. Thus we include it, instead of using
8747 ;; python-file. Ironically, s3cmd sometimes works better
8748 ;; without libmagic bindings at all:
8749 ;; https://github.com/s3tools/s3cmd/issues/198
8750 ("python2-magic" ,python2-magic)))
8751 (home-page "http://s3tools.org/s3cmd")
8752 (synopsis "Command line tool for S3-compatible storage services")
8753 (description
8754 "S3cmd is a command line tool for uploading, retrieving and managing data
8755 in storage services that are compatible with the Amazon Simple Storage
8756 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
8757 GnuPG encryption, and more. It also supports management of Amazon's
8758 CloudFront content delivery network.")
8759 (license license:gpl2+)))
8760
8761 (define-public python-pkgconfig
8762 (package
8763 (name "python-pkgconfig")
8764 (version "1.3.1")
8765 (source
8766 (origin
8767 (method url-fetch)
8768 (uri (pypi-uri "pkgconfig" version))
8769 (sha256
8770 (base32
8771 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
8772 (build-system python-build-system)
8773 (native-inputs
8774 `(("python-nose" ,python-nose)))
8775 (inputs
8776 `(("pkg-config" ,pkg-config)))
8777 (arguments
8778 `(#:phases
8779 (modify-phases %standard-phases
8780 (add-before 'build 'patch
8781 ;; Hard-code the path to pkg-config.
8782 (lambda _
8783 (substitute* "pkgconfig/pkgconfig.py"
8784 (("cmd = 'pkg-config")
8785 (string-append "cmd = '" (which "pkg-config"))))
8786 #t))
8787 (replace 'check
8788 (lambda _
8789 (invoke "nosetests" "test.py"))))))
8790 (home-page "https://github.com/matze/pkgconfig")
8791 (synopsis "Python interface for pkg-config")
8792 (description "This module provides a Python interface to pkg-config. It
8793 can be used to find all pkg-config packages, check if a package exists,
8794 check if a package meets certain version requirements, query CFLAGS and
8795 LDFLAGS and parse the output to build extensions with setup.py.")
8796 (license license:expat)))
8797
8798 (define-public python2-pkgconfig
8799 (package-with-python2 python-pkgconfig))
8800
8801 (define-public python-bz2file
8802 (package
8803 (name "python-bz2file")
8804 (version "0.98")
8805 (source
8806 (origin
8807 (method url-fetch)
8808 (uri (pypi-uri "bz2file" version))
8809 (sha256
8810 (base32
8811 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
8812 (build-system python-build-system)
8813 (arguments
8814 `(#:tests? #f)) ; Tests use deprecated python modules.
8815 (home-page "https://github.com/nvawda/bz2file")
8816 (synopsis "Read and write bzip2-compressed files")
8817 (description
8818 "Bz2file is a Python library for reading and writing bzip2-compressed
8819 files. It contains a drop-in replacement for the I/O interface in the
8820 standard library's @code{bz2} module, including features from the latest
8821 development version of CPython that are not available in older releases.")
8822 (license license:asl2.0)))
8823
8824 (define-public python2-bz2file
8825 (package-with-python2 python-bz2file))
8826
8827 (define-public python-future
8828 (package
8829 (name "python-future")
8830 (version "0.16.0")
8831 (source
8832 (origin
8833 (method url-fetch)
8834 (uri (pypi-uri "future" version))
8835 (sha256
8836 (base32
8837 "1nzy1k4m9966sikp0qka7lirh8sqrsyainyf8rk97db7nwdfv773"))))
8838 (build-system python-build-system)
8839 ;; Many tests connect to the network or are otherwise flawed.
8840 ;; https://github.com/PythonCharmers/python-future/issues/210
8841 (arguments
8842 `(#:tests? #f))
8843 (home-page "http://python-future.org")
8844 (synopsis "Single-source support for Python 3 and 2")
8845 (description
8846 "@code{python-future} is the missing compatibility layer between Python 2 and
8847 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
8848 to support both Python 2 and Python 3 with minimal overhead.")
8849 (license license:expat)))
8850
8851 (define-public python2-future
8852 (package-with-python2 python-future))
8853
8854 (define-public python-cysignals
8855 (package
8856 (name "python-cysignals")
8857 (version "1.9.0")
8858 (source
8859 (origin
8860 (method url-fetch)
8861 (uri (pypi-uri "cysignals" version))
8862 (sha256
8863 (base32
8864 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
8865 (build-system python-build-system)
8866 (native-inputs
8867 `(("python-cython" ,python-cython)
8868 ("python-sphinx" ,python-sphinx)))
8869 (inputs
8870 `(("pari-gp" ,pari-gp)))
8871 (arguments
8872 `(#:modules ((guix build python-build-system)
8873 ((guix build gnu-build-system) #:prefix gnu:)
8874 (guix build utils))
8875 ;; FIXME: Tests are executed after installation and currently fail
8876 ;; when not installing into standard locations; the author is working
8877 ;; on a fix.
8878 #:tests? #f
8879 #:phases
8880 (modify-phases %standard-phases
8881 (add-before
8882 'build 'configure
8883 (assoc-ref gnu:%standard-phases 'configure)))))
8884 (home-page
8885 "https://github.com/sagemath/cysignals")
8886 (synopsis
8887 "Handling of interrupts and signals for Cython")
8888 (description
8889 "The cysignals package provides mechanisms to handle interrupts (and
8890 other signals and errors) in Cython code, using two related approaches,
8891 for mixed Cython/Python code or external C libraries and pure Cython code,
8892 respectively.")
8893 (license license:lgpl3+)))
8894
8895 (define-public python2-cysignals
8896 (package-with-python2 python-cysignals))
8897
8898 (define-public python2-shedskin
8899 (package
8900 (name "python2-shedskin")
8901 (version "0.9.4")
8902 (source
8903 (origin
8904 (method url-fetch)
8905 (uri (string-append "https://github.com/shedskin/shedskin/"
8906 "releases/download/v" version
8907 "/shedskin-" version ".tgz"))
8908 (sha256
8909 (base32
8910 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
8911 (build-system python-build-system)
8912 (arguments
8913 `(#:python ,python-2
8914 #:phases (modify-phases %standard-phases
8915 (add-after 'unpack 'fix-resulting-include-libs
8916 (lambda* (#:key inputs #:allow-other-keys)
8917 (let ((libgc (assoc-ref inputs "libgc"))
8918 (pcre (assoc-ref inputs "pcre")))
8919 (substitute* "shedskin/makefile.py"
8920 (("variable == 'CCFLAGS':[ ]*")
8921 (string-append "variable == 'CCFLAGS':\n"
8922 " line += ' -I " pcre "/include"
8923 " -I " libgc "/include'"))
8924 (("variable == 'LFLAGS':[ ]*")
8925 (string-append "variable == 'LFLAGS':\n"
8926 " line += ' -L" pcre "/lib"
8927 " -L " libgc "/lib'")))
8928 #t))))))
8929 (inputs `(("pcre" ,pcre)
8930 ("libgc" ,libgc)))
8931 (home-page "https://shedskin.github.io/")
8932 (synopsis "Experimental Python-2 to C++ Compiler")
8933 (description (string-append "This is an experimental compiler for a subset of
8934 Python. It generates C++ code and a Makefile."))
8935 (license (list license:gpl3 license:bsd-3 license:expat))))
8936
8937 (define-public python2-rope
8938 (package
8939 (name "python2-rope")
8940 (version "0.11.0")
8941 (source
8942 (origin
8943 (method url-fetch)
8944 (uri (pypi-uri "rope" version))
8945 (sha256
8946 (base32
8947 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
8948 (arguments
8949 ;; Rope has only partial python3 support, see `python-rope'
8950 `(#:python ,python-2))
8951 (build-system python-build-system)
8952 (native-inputs
8953 `(("python2-unittest2" ,python2-unittest2)))
8954 (home-page "https://github.com/python-rope/rope")
8955 (synopsis "Refactoring library for Python")
8956 (description "Rope is a refactoring library for Python. It facilitates
8957 the renaming, moving and extracting of attributes, functions, modules, fields
8958 and parameters in Python 2 source code. These refactorings can also be applied
8959 to occurrences in strings and comments.")
8960 (license license:gpl2)))
8961
8962 (define-public python-rope
8963 (package
8964 (inherit python2-rope)
8965 (name "python-rope")
8966 (arguments `(#:python ,python-wrapper
8967 ;; XXX: Only partial python3 support, results in some failing
8968 ;; tests: <https://github.com/python-rope/rope/issues/247>.
8969 #:tests? #f))
8970 (properties `((python2-variant . ,(delay python2-rope))))))
8971
8972 (define-public python-py3status
8973 (package
8974 (name "python-py3status")
8975 (version "3.7")
8976 (source
8977 (origin
8978 (method url-fetch)
8979 (uri (pypi-uri "py3status" version))
8980 (sha256
8981 (base32
8982 "0shxcfz4wcczj0mhwp4w0dvwd2fdd9bgprq8slim1519iiqzgwhq"))))
8983 (build-system python-build-system)
8984 (inputs
8985 `(("file" ,file)))
8986 (arguments
8987 '(#:phases
8988 (modify-phases %standard-phases
8989 ;; 'file' is used for detection of configuration file encoding
8990 ;; let's make link the dependency to particular input
8991 (add-before 'build 'patch-file-path
8992 (lambda* (#:key inputs #:allow-other-keys)
8993 (let ((file-path (assoc-ref inputs "file")))
8994 (substitute* "py3status/parse_config.py"
8995 (("\\['file', '-b'")
8996 (string-append "['" file-path "/bin/file', '-b'")))
8997 #t))))
8998 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
8999 (home-page "https://github.com/ultrabug/py3status")
9000 (synopsis "Extensible i3status wrapper written in Python")
9001 (description "py3status is an i3status wrapper which extends i3status
9002 functionality in a modular way, allowing you to extend your panel with your
9003 own code, responding to click events and updating clock every second.")
9004 (license license:bsd-3)))
9005
9006 (define-public python-tblib
9007 (package
9008 (name "python-tblib")
9009 (version "1.3.2")
9010 (source (origin
9011 (method url-fetch)
9012 (uri (pypi-uri "tblib" version))
9013 (sha256 (base32
9014 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
9015 (build-system python-build-system)
9016 (arguments
9017 `(#:phases
9018 (modify-phases %standard-phases
9019 (add-before 'check 'adjust-tests
9020 (lambda _
9021 (when (which "python3")
9022 ;; Adjust the example output to match that of Python 3.7:
9023 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
9024 (substitute* "README.rst"
9025 (("Exception\\('fail',") "Exception('fail'"))
9026 #t)))
9027 (replace 'check
9028 (lambda _
9029 ;; Upstream runs tests after installation and the package itself
9030 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
9031 ;; found.
9032 (setenv "PYTHONPATH"
9033 (string-append (getcwd) "/build/lib:"
9034 (getenv "PYTHONPATH")))
9035 (invoke "py.test" "-vv" "tests" "README.rst"))))))
9036 (native-inputs
9037 `(("python-pytest" ,python-pytest)
9038 ("python-six" ,python-six)))
9039 (home-page "https://github.com/ionelmc/python-tblib")
9040 (synopsis "Traceback serialization library")
9041 (description
9042 "Traceback serialization allows you to:
9043
9044 @enumerate
9045 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
9046 different processes. This allows better error handling when running code over
9047 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
9048
9049 @item Parse traceback strings and raise with the parsed tracebacks.
9050 @end enumerate\n")
9051 (license license:bsd-3)))
9052
9053 (define-public python2-tblib
9054 (package-with-python2 python-tblib))
9055
9056 (define-public python-greenlet
9057 (package
9058 (name "python-greenlet")
9059 (version "0.4.15")
9060 (source (origin
9061 (method url-fetch)
9062 (uri (pypi-uri "greenlet" version))
9063 (sha256
9064 (base32
9065 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
9066 (build-system python-build-system)
9067 (home-page "https://greenlet.readthedocs.io/")
9068 (synopsis "Lightweight in-process concurrent programming")
9069 (description
9070 "Greenlet package is a spin-off of Stackless, a version of CPython
9071 that supports micro-threads called \"tasklets\". Tasklets run
9072 pseudo-concurrently (typically in a single or a few OS-level threads) and
9073 are synchronized with data exchanges on \"channels\".")
9074 (license (list license:psfl license:expat))))
9075
9076 (define-public python2-greenlet
9077 (package-with-python2 python-greenlet))
9078
9079 (define-public python-objgraph
9080 (package
9081 (name "python-objgraph")
9082 (version "3.4.0")
9083 (source
9084 (origin
9085 (method url-fetch)
9086 (uri (pypi-uri "objgraph" version))
9087 (sha256
9088 (base32
9089 "184m09am5gpbqfaiy7l0hwh476mczbrly1dffs0rw2p1d1i2q32a"))))
9090 (build-system python-build-system)
9091 (propagated-inputs
9092 `(("python-graphviz" ,python-graphviz)))
9093 (native-inputs
9094 `(("python-mock" ,python-mock)
9095 ("graphviz" ,graphviz)))
9096 (home-page "https://mg.pov.lt/objgraph/")
9097 (synopsis "Draw Python object reference graphs with graphviz")
9098 (description
9099 "This package provides tools to draw Python object reference graphs with
9100 graphviz.")
9101 (license license:expat)))
9102
9103 (define-public python-gevent
9104 (package
9105 (name "python-gevent")
9106 (version "1.3.7")
9107 (source (origin
9108 (method url-fetch)
9109 (uri (pypi-uri "gevent" version))
9110 (sha256
9111 (base32
9112 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
9113 (modules '((guix build utils)))
9114 (snippet
9115 '(begin
9116 ;; unbunding libev and c-ares
9117 (delete-file-recursively "deps")
9118 #t))))
9119 (build-system python-build-system)
9120 (arguments
9121 `(#:modules ((ice-9 ftw)
9122 (ice-9 match)
9123 (srfi srfi-26)
9124 (guix build utils)
9125 (guix build python-build-system))
9126 #:phases (modify-phases %standard-phases
9127 (add-after 'unpack 'unpack-libev
9128 (lambda* (#:key inputs #:allow-other-keys)
9129 (mkdir-p "deps/libev")
9130 ;; FIXME: gevent requires building libev, even though
9131 ;; it only links against the proper one.
9132 (invoke "tar" "-xf" (assoc-ref inputs "libev-source")
9133 "--strip-components=1" "-C" "deps/libev")))
9134 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
9135 (lambda _
9136 (substitute* "src/gevent/subprocess.py"
9137 (("/bin/sh") (which "sh")))
9138 (for-each (lambda (file)
9139 (substitute* file
9140 (("/bin/sh") (which "sh"))
9141 (("/bin/true") (which "true"))))
9142 (find-files "src/greentest" "\\.py$"))
9143 #t))
9144 (add-before 'build 'do-not-use-bundled-sources
9145 (lambda* (#:key inputs #:allow-other-keys)
9146 (setenv "CONFIG_SHELL" (which "bash"))
9147 (setenv "LIBEV_EMBED" "false")
9148 (setenv "CARES_EMBED" "false")
9149 (setenv "EMBED" "false")
9150
9151 (let ((greenlet (string-append
9152 (assoc-ref inputs "python-greenlet")
9153 "/include")))
9154 (match (scandir greenlet
9155 (lambda (item)
9156 (string-prefix? "python" item)))
9157 ((python)
9158 (setenv "CPATH"
9159 (string-append greenlet "/" python)))))
9160 #t))
9161 (add-before 'check 'skip-timer-test
9162 (lambda _
9163 ;; XXX: Skip 'TestTimerResolution', which appears to be
9164 ;; unreliable.
9165 (substitute* "src/greentest/test__core_timer.py"
9166 (("not greentest.RUNNING_ON_CI") "False"))
9167 #t))
9168 (replace 'check
9169 (lambda _
9170 ;; Make sure the build directory is on PYTHONPATH.
9171 (setenv "PYTHONPATH"
9172 (string-append
9173 (getenv "PYTHONPATH") ":"
9174 (getcwd) "/build/"
9175 (car (scandir "build" (cut string-prefix? "lib." <>)))))
9176 (with-directory-excursion "src/greentest"
9177 ;; XXX: Many tests require network access. Instead we only
9178 ;; run known-good tests. Unfortunately we cannot use
9179 ;; recursion here since this directory also contains
9180 ;; Python-version-specific subfolders.
9181 (apply invoke "python" "testrunner.py" "--config"
9182 "known_failures.py"
9183 (scandir "." (cut regexp-exec
9184 (make-regexp "test_+(subprocess|core)")
9185 <>)))))))))
9186 (propagated-inputs
9187 `(("python-greenlet" ,python-greenlet)
9188 ("python-objgraph" ,python-objgraph)))
9189 (native-inputs
9190 `(("libev-source" ,(package-source libev))
9191 ("python-six" ,python-six)))
9192 (inputs
9193 `(("c-ares" ,c-ares)
9194 ("libev" ,libev)))
9195 (home-page "http://www.gevent.org/")
9196 (synopsis "Coroutine-based network library")
9197 (description
9198 "gevent is a coroutine-based Python networking library that uses greenlet
9199 to provide a high-level synchronous API on top of the libev event loop.")
9200 (license license:expat)
9201 (properties `((python2-variant . ,(delay python2-gevent))))))
9202
9203 (define-public python2-gevent
9204 (let ((base (package-with-python2
9205 (strip-python2-variant python-gevent))))
9206 (package
9207 (inherit base)
9208 (native-inputs `(,@(package-native-inputs python-gevent)
9209 ("python-mock" ,python2-mock))))))
9210
9211 (define-public python-fastimport
9212 (package
9213 (name "python-fastimport")
9214 (version "0.9.6")
9215 (source
9216 (origin
9217 (method url-fetch)
9218 (uri (pypi-uri "fastimport" version))
9219 (sha256
9220 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
9221 (build-system python-build-system)
9222 (home-page "https://github.com/jelmer/python-fastimport")
9223 (synopsis "VCS fastimport parser and generator in Python")
9224 (description "This package provides a parser for and generator of the Git
9225 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
9226 format.")
9227 (license license:gpl2+)))
9228
9229 (define-public python2-fastimport
9230 (package-with-python2 python-fastimport))
9231
9232 (define-public python-twisted
9233 (package
9234 (name "python-twisted")
9235 (version "17.1.0")
9236 (source (origin
9237 (method url-fetch)
9238 (uri (pypi-uri "Twisted" version ".tar.bz2"))
9239 (sha256
9240 (base32
9241 "1p245mg15hkxp7hy5cyq2fgvlgjkb4cg0gwkwd148nzy1bbi3wnv"))))
9242 (build-system python-build-system)
9243 (arguments
9244 '(#:tests? #f)) ; FIXME: Some tests are failing.
9245 ;; #:phases
9246 ;; (modify-phases %standard-phases
9247 ;; (replace 'check
9248 ;; (lambda _
9249 ;; (zero? (system* "./bin/trial" "twisted")))))
9250 (propagated-inputs
9251 `(("python-zope-interface" ,python-zope-interface)
9252 ("python-incremental" ,python-incremental)
9253 ("python-constantly" ,python-constantly)
9254 ("python-automat" ,python-automat)))
9255 (home-page "https://twistedmatrix.com/")
9256 (synopsis "Asynchronous networking framework written in Python")
9257 (description
9258 "Twisted is an extensible framework for Python programming, with special
9259 focus on event-based network programming and multiprotocol integration.")
9260 (license license:expat)))
9261
9262 (define-public python2-twisted
9263 (package-with-python2 python-twisted))
9264
9265 (define-public python-pika
9266 (package
9267 (name "python-pika")
9268 (version "0.12.0")
9269 (source
9270 (origin
9271 (method url-fetch)
9272 (uri (pypi-uri "pika" version))
9273 (sha256
9274 (base32
9275 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
9276 (build-system python-build-system)
9277 (native-inputs
9278 `(("python-pyev" ,python-pyev)
9279 ("python-tornado" ,python-tornado)
9280 ("python-twisted" ,python-twisted)))
9281 (home-page "https://pika.readthedocs.org")
9282 (synopsis "Pure Python AMQP Client Library")
9283 (description
9284 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
9285 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
9286 network support library.")
9287 (license license:bsd-3)))
9288
9289 (define-public python2-pika
9290 (package-with-python2 python-pika))
9291
9292 (define-public python-ply
9293 (package
9294 (name "python-ply")
9295 (version "3.10")
9296 (source
9297 (origin
9298 (method url-fetch)
9299 (uri (pypi-uri "ply" version))
9300 (sha256
9301 (base32
9302 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
9303 (build-system python-build-system)
9304 (home-page "http://www.dabeaz.com/ply/")
9305 (synopsis "Python Lex & Yacc")
9306 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
9307 It uses LR parsing and does extensive error checking.")
9308 (license license:bsd-3)))
9309
9310 (define-public python2-ply
9311 (package-with-python2 python-ply))
9312
9313 (define-public python-tabulate
9314 (package
9315 (name "python-tabulate")
9316 (version "0.7.7")
9317 (source (origin
9318 (method url-fetch)
9319 (uri (pypi-uri "tabulate" version))
9320 (sha256
9321 (base32
9322 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
9323 (build-system python-build-system)
9324 (arguments
9325 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
9326 ;; and the latest release is not tagged in the upstream repository.
9327 '(#:tests? #f))
9328 (home-page "https://bitbucket.org/astanin/python-tabulate")
9329 (synopsis "Pretty-print tabular data")
9330 (description
9331 "Tabulate is a library and command-line utility to pretty-print tabular
9332 data in Python.")
9333 (license license:expat)))
9334
9335 (define-public python2-tabulate
9336 (package-with-python2 python-tabulate))
9337
9338 (define-public python-kazoo
9339 (package
9340 (name "python-kazoo")
9341 (version "2.4.0")
9342 (source
9343 (origin
9344 (method url-fetch)
9345 (uri (pypi-uri "kazoo" version))
9346 (sha256
9347 (base32
9348 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
9349 (build-system python-build-system)
9350 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
9351 (propagated-inputs
9352 `(("python-six" ,python-six)))
9353 (home-page "https://kazoo.readthedocs.org")
9354 (synopsis "High-level Zookeeper client library")
9355 (description
9356 "Kazoo is a Python client library for the Apache Zookeeper distributed
9357 application service. It is designed to be easy to use and to avoid common
9358 programming errors.")
9359 (license license:asl2.0)))
9360
9361 (define-public python2-kazoo
9362 (package-with-python2 python-kazoo))
9363
9364 (define-public python-pykafka
9365 (package
9366 (name "python-pykafka")
9367 (version "2.4.0")
9368 (source (origin
9369 (method url-fetch)
9370 (uri (pypi-uri "pykafka" version))
9371 (sha256
9372 (base32
9373 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
9374 (build-system python-build-system)
9375 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
9376 (propagated-inputs
9377 `(("python-gevent" ,python-gevent)
9378 ("python-kazoo" ,python-kazoo)
9379 ("python-tabulate" ,python-tabulate)))
9380 (inputs
9381 `(("librdkafka" ,librdkafka)))
9382 (home-page "https://pykafka.readthedocs.io/")
9383 (synopsis "Apache Kafka client for Python")
9384 (description
9385 "PyKafka is a client for the Apache Kafka distributed messaging system.
9386 It includes Python implementations of Kafka producers and consumers, which
9387 are optionally backed by a C extension built on librdkafka.")
9388 (license license:asl2.0)))
9389
9390 (define-public python2-pykafka
9391 (package-with-python2 python-pykafka))
9392
9393 (define-public python-wcwidth
9394 (package
9395 (name "python-wcwidth")
9396 (version "0.1.7")
9397 (source
9398 (origin
9399 (method url-fetch)
9400 (uri (pypi-uri "wcwidth" version))
9401 (sha256
9402 (base32
9403 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
9404 (build-system python-build-system)
9405 (home-page "https://github.com/jquast/wcwidth")
9406 (synopsis "Measure number of terminal column cells of wide-character codes")
9407 (description "Wcwidth measures the number of terminal column cells of
9408 wide-character codes. It is useful for those implementing a terminal emulator,
9409 or programs that carefully produce output to be interpreted by one. It is a
9410 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
9411 specified in POSIX.1-2001 and POSIX.1-2008.")
9412 (license license:expat)))
9413
9414 (define-public python2-wcwidth
9415 (package-with-python2 python-wcwidth))
9416
9417 (define-public python2-jsonrpclib
9418 (package
9419 (name "python2-jsonrpclib")
9420 (version "0.1.7")
9421 (source (origin
9422 (method url-fetch)
9423 (uri (pypi-uri "jsonrpclib" version))
9424 (sha256
9425 (base32
9426 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
9427 (build-system python-build-system)
9428 (arguments
9429 `(#:tests? #f
9430 #:python ,python-2))
9431 (home-page "https://github.com/joshmarshall/jsonrpclib/")
9432 (synopsis "Implementation of JSON-RPC specification for Python")
9433 (description
9434 "This library is an implementation of the JSON-RPC specification.
9435 It supports both the original 1.0 specification, as well as the
9436 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
9437 etc.")
9438 (license license:asl2.0)))
9439
9440 (define-public python-chai
9441 (package
9442 (name "python-chai")
9443 (version "1.1.2")
9444 (source (origin
9445 (method url-fetch)
9446 (uri (pypi-uri "chai" version))
9447 (sha256
9448 (base32
9449 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
9450 (build-system python-build-system)
9451 (home-page "https://github.com/agoragames/chai")
9452 (synopsis "Mocking framework for Python")
9453 (description
9454 "Chai provides an api for mocking, stubbing and spying your python
9455 objects, patterned after the Mocha library for Ruby.")
9456 (license license:bsd-3)))
9457
9458 (define-public python2-chai
9459 (package-with-python2 python-chai))
9460
9461 (define-public python-inflection
9462 (package
9463 (name "python-inflection")
9464 (version "0.3.1")
9465 (source
9466 (origin (method url-fetch)
9467 (uri (pypi-uri "inflection" version))
9468 (sha256
9469 (base32
9470 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
9471 (build-system python-build-system)
9472 (native-inputs
9473 `(("python-pytest" ,python-pytest)))
9474 (home-page "https://github.com/jpvanhal/inflection")
9475 (synopsis "Python string transformation library")
9476 (description
9477 "Inflection is a string transformation library. It singularizes
9478 and pluralizes English words, and transforms strings from CamelCase to
9479 underscored string.")
9480 (license license:expat)))
9481
9482 (define-public python2-inflection
9483 (package-with-python2 python-inflection))
9484
9485 (define-public python-pylev
9486 (package
9487 (name "python-pylev")
9488 (version "1.3.0")
9489 (source (origin
9490 (method url-fetch)
9491 (uri (pypi-uri "pylev" version))
9492 (sha256
9493 (base32
9494 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
9495 (build-system python-build-system)
9496 (home-page "https://github.com/toastdriven/pylev")
9497 (synopsis "Levenshtein distance implementation in Python")
9498 (description "Pure Python Levenshtein implementation, based off the
9499 Wikipedia code samples at
9500 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
9501 (license license:bsd-3)))
9502
9503 (define-public python2-pylev
9504 (package-with-python2 python-pylev))
9505
9506 (define-public python-cleo
9507 (package
9508 (name "python-cleo")
9509 (version "0.6.1")
9510 (source (origin
9511 (method url-fetch)
9512 (uri (pypi-uri "cleo" version))
9513 (sha256
9514 (base32
9515 "0q1cf0szr0d54am4pypzwdnm74zpladdsinad94c2fz5i06fdpf7"))))
9516 (build-system python-build-system)
9517 (native-inputs
9518 `(;; For testing
9519 ("python-mock" ,python-mock)
9520 ("python-pytest-mock" ,python-pytest-mock)
9521 ("python-pytest" ,python-pytest)))
9522 (propagated-inputs
9523 `(("python-backpack" ,python-backpack)
9524 ("python-pastel" ,python-pastel)
9525 ("python-pylev" ,python-pylev)))
9526 (home-page "https://github.com/sdispater/cleo")
9527 (synopsis "Command-line arguments library for Python")
9528 (description
9529 "Cleo allows you to create command-line commands with signature in
9530 docstring and colored output.")
9531 (license license:expat)))
9532
9533 (define-public python2-cleo
9534 (package-with-python2 python-cleo))
9535
9536 (define-public python-lazy-object-proxy
9537 (package
9538 (name "python-lazy-object-proxy")
9539 (version "1.3.1")
9540 (source (origin
9541 (method url-fetch)
9542 (uri (pypi-uri "lazy-object-proxy" version))
9543 (sha256
9544 (base32
9545 "0yha7q9bhw857fwaby785d63mffhngl9npwzlk9i0pwlkwvbx4gb"))))
9546 (build-system python-build-system)
9547 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
9548 (synopsis "Lazy object proxy for python")
9549 (description
9550 "Lazy object proxy is an object that wraps a callable but defers the call
9551 until the object is actually required, and caches the result of said call.")
9552 (license license:bsd-2)))
9553
9554 (define-public python2-lazy-object-proxy
9555 (package-with-python2 python-lazy-object-proxy))
9556
9557 (define-public python-dnspython
9558 (package
9559 (name "python-dnspython")
9560 (version "1.15.0")
9561 (source (origin
9562 (method url-fetch)
9563 (uri (string-append "http://www.dnspython.org/kits/"
9564 version "/dnspython-" version ".tar.gz"))
9565 (sha256
9566 (base32
9567 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
9568 (build-system python-build-system)
9569 (arguments '(#:tests? #f)) ; XXX: requires internet access
9570 (home-page "http://www.dnspython.org")
9571 (synopsis "DNS toolkit for Python")
9572 (description
9573 "dnspython is a DNS toolkit for Python. It supports almost all record
9574 types. It can be used for queries, zone transfers, and dynamic updates.
9575 It supports TSIG authenticated messages and EDNS0.")
9576 (license license:expat)))
9577
9578 (define-public python2-dnspython
9579 (package-with-python2 python-dnspython))
9580
9581 (define-public python-email-validator
9582 (package
9583 (name "python-email-validator")
9584 (version "1.0.2")
9585 (source
9586 (origin (method url-fetch)
9587 (uri (pypi-uri "email_validator" version))
9588 (sha256
9589 (base32
9590 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
9591 (build-system python-build-system)
9592 (arguments
9593 '(#:phases
9594 (modify-phases %standard-phases
9595 (add-before 'build 'use-dnspython
9596 (lambda _
9597 (substitute* "setup.py"
9598 (("dnspython3") "dnspython"))
9599 #t)))))
9600 (propagated-inputs
9601 `(("python-dnspython" ,python-dnspython)
9602 ("python-idna" ,python-idna)))
9603 (home-page "https://github.com/JoshData/python-email-validator")
9604 (synopsis "Email address validation library for Python")
9605 (description
9606 "This library validates email address syntax and deliverability.")
9607 (license license:cc0)))
9608
9609 (define-public python2-email-validator
9610 (package-with-python2 python-email-validator))
9611
9612 (define-public python-ukpostcodeparser
9613 (package
9614 (name "python-ukpostcodeparser")
9615 (version "1.0.3")
9616 (source (origin
9617 (method url-fetch)
9618 (uri (pypi-uri "UkPostcodeParser" version))
9619 (sha256
9620 (base32
9621 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
9622 (build-system python-build-system)
9623 (home-page "https://github.com/hamstah/ukpostcodeparser")
9624 (synopsis "UK Postcode parser for Python")
9625 (description
9626 "This library provides the @code{parse_uk_postcode} function for
9627 parsing UK postcodes.")
9628 (license license:expat)))
9629
9630 (define-public python2-ukpostcodeparser
9631 (package-with-python2 python-ukpostcodeparser))
9632
9633 (define-public python-faker
9634 (package
9635 (name "python-faker")
9636 (version "0.7.9")
9637 (source (origin
9638 (method url-fetch)
9639 (uri (pypi-uri "Faker" version))
9640 (sha256
9641 (base32
9642 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
9643 (patches
9644 (search-patches "python-faker-fix-build-32bit.patch"))
9645 (modules '((guix build utils)))
9646 (snippet
9647 '(begin
9648 (for-each delete-file (find-files "." "\\.pyc$"))
9649 #t))))
9650 (build-system python-build-system)
9651 (arguments
9652 '(#:phases
9653 (modify-phases %standard-phases
9654 (replace 'check
9655 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
9656 (native-inputs
9657 `(;; For testing
9658 ("python-email-validator" ,python-email-validator)
9659 ("python-mock" ,python-mock)
9660 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
9661 (propagated-inputs
9662 `(("python-dateutil" ,python-dateutil)
9663 ("python-six" ,python-six)))
9664 (home-page "https://github.com/joke2k/faker")
9665 (synopsis "Python package that generates fake data")
9666 (description
9667 "Faker is a Python package that generates fake data such as names,
9668 addresses, and phone numbers.")
9669 (license license:expat)
9670 (properties `((python2-variant . ,(delay python2-faker))))))
9671
9672 (define-public python2-faker
9673 (let ((base (package-with-python2 (strip-python2-variant
9674 python-faker))))
9675 (package
9676 (inherit base)
9677 (propagated-inputs
9678 `(("python2-ipaddress" ,python2-ipaddress)
9679 ,@(package-propagated-inputs base))))))
9680
9681 (define-public python-pyaml
9682 (package
9683 (name "python-pyaml")
9684 (version "18.11.0")
9685 (source (origin
9686 (method url-fetch)
9687 (uri (pypi-uri "pyaml" version))
9688 (sha256
9689 (base32
9690 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
9691 (build-system python-build-system)
9692 (native-inputs
9693 `(("python-unidecode" ,python-unidecode)))
9694 (propagated-inputs
9695 `(("python-pyyaml" ,python-pyyaml)))
9696 (home-page "https://github.com/mk-fg/pretty-yaml")
9697 (synopsis "YAML pretty-print library for Python")
9698 (description
9699 "pyaml is a PyYAML based python module to produce pretty and readable
9700 YAML-serialized data.")
9701 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
9702
9703 (define-public python2-pyaml
9704 (package-with-python2 python-pyaml))
9705
9706 (define-public python-backpack
9707 (package
9708 (name "python-backpack")
9709 (version "0.1")
9710 (source
9711 (origin
9712 (method url-fetch)
9713 (uri (pypi-uri "backpack" version))
9714 (sha256
9715 (base32
9716 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
9717 (build-system python-build-system)
9718 (native-inputs
9719 `(("python-pytest" ,python-pytest)
9720 ("python-nose" ,python-nose)))
9721 (propagated-inputs
9722 `(("python-simplejson" ,python-simplejson)))
9723 (home-page "https://github.com/sdispater/backpack")
9724 (synopsis "Utilities for working with Python collections")
9725 (description "Backpack provides some useful utilities for working with
9726 collections of data.")
9727 (license license:expat)))
9728
9729 (define-public python2-backpack
9730 (package-with-python2 python-backpack))
9731
9732 (define-public python-prompt-toolkit
9733 (package
9734 (name "python-prompt-toolkit")
9735 (version "2.0.7")
9736 (source
9737 (origin
9738 (method url-fetch)
9739 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
9740 (sha256
9741 (base32
9742 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
9743 (build-system python-build-system)
9744 (arguments
9745 `(#:phases
9746 (modify-phases %standard-phases
9747 (delete 'check)
9748 (add-after 'install 'post-install-check
9749 (lambda* (#:key inputs outputs #:allow-other-keys)
9750 ;; HOME is needed for the test
9751 ;; "test_pathcompleter_can_expanduser".
9752 (setenv "HOME" "/tmp")
9753 (add-installed-pythonpath inputs outputs)
9754 (invoke "py.test"))))))
9755 (propagated-inputs
9756 `(("python-wcwidth" ,python-wcwidth)
9757 ("python-six" ,python-six)
9758 ("python-pygments" ,python-pygments)))
9759 (native-inputs
9760 `(("python-pytest" ,python-pytest)))
9761 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
9762 (synopsis "Library for building command line interfaces in Python")
9763 (description
9764 "Prompt-Toolkit is a library for building interactive command line
9765 interfaces in Python. It's like GNU Readline but it also features syntax
9766 highlighting while typing, out-of-the-box multi-line input editing, advanced
9767 code completion, incremental search, support for Chinese double-width
9768 characters, mouse support, and auto suggestions.")
9769 (license license:bsd-3)))
9770
9771 (define-public python2-prompt-toolkit
9772 (package-with-python2 python-prompt-toolkit))
9773
9774 (define-public python-prompt-toolkit-1
9775 (package (inherit python-prompt-toolkit)
9776 (version "1.0.15")
9777 (source
9778 (origin
9779 (method url-fetch)
9780 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
9781 (sha256
9782 (base32
9783 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
9784
9785 (define-public python2-prompt-toolkit-1
9786 (package-with-python2 python-prompt-toolkit-1))
9787
9788 (define-public python-jedi
9789 (package
9790 (name "python-jedi")
9791 (version "0.13.2")
9792 (source
9793 (origin
9794 (method url-fetch)
9795 (uri (pypi-uri "jedi" version))
9796 (sha256
9797 (base32
9798 "1za944msp0f8x36qa8l309jhv0kzlsdh7r9nj3z12y8npnsh45sp"))))
9799 (build-system python-build-system)
9800 (arguments
9801 `( ;; Many tests are failing with Python 3.7.x as of version 0.13.2 (see:
9802 ;; https://github.com/davidhalter/jedi/issues/1263)
9803 #:tests? #f
9804 #:phases
9805 (modify-phases %standard-phases
9806 (replace 'check
9807 (lambda* (#:key tests? #:allow-other-keys)
9808 (when tests?
9809 (invoke "py.test" "-vv")))))))
9810 (native-inputs
9811 `(("python-pytest" ,python-pytest)
9812 ("python-docopt" ,python-docopt)))
9813 (propagated-inputs
9814 `(("python-parso" ,python-parso)))
9815 (home-page "https://github.com/davidhalter/jedi")
9816 (synopsis "Autocompletion and static analysis library for Python")
9817 (description
9818 "Jedi is a static analysis tool for Python that can be used in Integrated
9819 Development Environments (@dfn{IDE}s) and text editors. It understands Python
9820 on a deeper level than many other static analysis frameworks for Python.
9821
9822 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
9823 well.")
9824 (license license:expat)))
9825
9826 (define-public python2-jedi
9827 (package-with-python2 python-jedi))
9828
9829 (define-public ptpython
9830 (package
9831 (name "ptpython")
9832 (version "0.34")
9833 (source (origin
9834 (method url-fetch)
9835 (uri (pypi-uri "ptpython" version))
9836 (sha256
9837 (base32
9838 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
9839 (build-system python-build-system)
9840 (arguments
9841 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
9842 (propagated-inputs
9843 `(("python-docopt" ,python-docopt)
9844 ("python-jedi" ,python-jedi)
9845 ("python-prompt-toolkit" ,python-prompt-toolkit)
9846 ("python-pygments" ,python-pygments)))
9847 (home-page "https://github.com/jonathanslenders/ptpython")
9848 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
9849 (description
9850 "ptpython is a Python read-eval-print loop with IDE-like features.
9851 It supports syntax highlighting, multiline editing, autocompletion, mouse,
9852 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
9853 etc.")
9854 (license license:bsd-3)
9855 (properties `((python2-variant . ,(delay ptpython-2))))))
9856
9857 (define-public ptpython-2
9858 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
9859 (package
9860 (inherit base)
9861 (name "ptpython2"))))
9862
9863 (define-public python-stem
9864 (package
9865 (name "python-stem")
9866 (version "1.7.0")
9867 (source
9868 (origin
9869 (method url-fetch)
9870 (uri (pypi-uri "stem" version))
9871 (sha256
9872 (base32
9873 "1awiglfiajnx2hva9aqpj3fmdvdb4qg7cwnlfyih827m68y3cq8v"))))
9874 (build-system python-build-system)
9875 (arguments
9876 `(#:phases
9877 (modify-phases %standard-phases
9878 (replace 'check
9879 (lambda _
9880 (invoke "./run_tests.py" "--unit")
9881 #t)))))
9882 (native-inputs
9883 `(("python-mock" ,python-mock)
9884 ("python-pycodestyle" ,python-pycodestyle)
9885 ("python-pyflakes" ,python-pyflakes)))
9886 (home-page "https://stem.torproject.org/")
9887 (synopsis
9888 "Python controller library that allows applications to interact with Tor")
9889 (description
9890 "Stem is a Python controller library for Tor. With it you can use Tor's
9891 control protocol to script against the Tor process and read descriptor data
9892 relays publish about themselves.")
9893 (license license:lgpl3)))
9894
9895 (define-public python2-stem
9896 (package-with-python2 python-stem))
9897
9898 (define-public python-pyserial
9899 (package
9900 (name "python-pyserial")
9901 (version "3.1.1")
9902 (source
9903 (origin
9904 (method url-fetch)
9905 (uri (pypi-uri "pyserial" version))
9906 (sha256
9907 (base32
9908 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
9909 (build-system python-build-system)
9910 (arguments
9911 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
9912 ;; #:phases
9913 ;; (modify-phases %standard-phases
9914 ;; (replace 'check
9915 ;; (lambda _
9916 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
9917 (home-page
9918 "https://github.com/pyserial/pyserial")
9919 (synopsis "Python Serial Port Bindings")
9920 (description "@code{pyserial} provide serial port bindings for Python. It
9921 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
9922 and/or Xon/Xoff. The port is accessed in RAW mode.")
9923 (license license:bsd-3)))
9924
9925 (define-public python2-pyserial
9926 (package-with-python2 python-pyserial))
9927
9928 (define-public python-kivy
9929 (package
9930 (name "python-kivy")
9931 (version "1.10.1")
9932 (source
9933 (origin
9934 (method url-fetch)
9935 (uri (pypi-uri "Kivy" version))
9936 (file-name (string-append name "-" version ".tar.gz"))
9937 (sha256
9938 (base32
9939 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
9940 (build-system python-build-system)
9941 (arguments
9942 `(#:tests? #f ; Tests require many optional packages
9943 #:phases
9944 (modify-phases %standard-phases
9945 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
9946 (lambda* (#:key inputs #:allow-other-keys)
9947 (setenv "KIVY_SDL2_PATH"
9948 (string-append (assoc-ref inputs "sdl-union")
9949 "/include/SDL2"))
9950 #t)))))
9951 (native-inputs
9952 `(("git" ,git)
9953 ("pkg-config" ,pkg-config)
9954 ("python-cython" ,python-cython)))
9955 (inputs
9956 `(("gstreamer" ,gstreamer)
9957 ("mesa" ,mesa)
9958 ("sdl-union"
9959 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
9960 (home-page "http://kivy.org")
9961 (synopsis
9962 "Multitouch application framework")
9963 (description
9964 "A software library for rapid development of
9965 hardware-accelerated multitouch applications.")
9966 (license license:expat)))
9967
9968 (define-public python2-kivy
9969 (package-with-python2 python-kivy))
9970
9971 (define-public python-kivy-next
9972 (deprecated-package "python-kivy-next" python-kivy))
9973
9974 (define-public python2-kivy-next
9975 (deprecated-package "python2-kivy-next" python2-kivy))
9976
9977 (define-public python-binaryornot
9978 (package
9979 (name "python-binaryornot")
9980 (version "0.4.4")
9981 (source (origin
9982 (method url-fetch)
9983 (uri (pypi-uri "binaryornot" version))
9984 (sha256
9985 (base32
9986 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
9987 (build-system python-build-system)
9988 (propagated-inputs
9989 `(("python-chardet" ,python-chardet)
9990 ("python-hypothesis" ,python-hypothesis)))
9991 (home-page "https://github.com/audreyr/binaryornot")
9992 (synopsis "Package to check if a file is binary or text")
9993 (description "Ultra-lightweight pure Python package to check if a file is
9994 binary or text.")
9995 (license license:bsd-3)
9996 (properties `((python2-variant . ,(delay python2-binaryornot))))))
9997
9998 (define-public python2-binaryornot
9999 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
10000 (package (inherit base)
10001 (propagated-inputs
10002 `(("python2-enum34" ,python2-enum34)
10003 ,@(package-propagated-inputs base))))))
10004
10005 (define-public python-nltk
10006 (package
10007 (name "python-nltk")
10008 (version "3.2.1")
10009 (source (origin
10010 (method url-fetch)
10011 (uri (pypi-uri "nltk" version))
10012 (sha256
10013 (base32
10014 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
10015 (build-system python-build-system)
10016 (arguments
10017 '(;; The tests require some extra resources to be downloaded.
10018 ;; TODO Try packaging these resources.
10019 #:tests? #f))
10020 (home-page "http://nltk.org/")
10021 (synopsis "Natural Language Toolkit")
10022 (description "It provides interfaces to over 50 corpora and lexical
10023 resources such as WordNet, along with a suite of text processing libraries
10024 for classification, tokenization, stemming, tagging, parsing, and semantic
10025 reasoning, wrappers for natural language processing libraries.")
10026 (license license:asl2.0)))
10027
10028 (define-public python2-nltk
10029 (package-with-python2 python-nltk))
10030
10031 (define-public python-pymongo
10032 (package
10033 (name "python-pymongo")
10034 (version "3.7.2")
10035 (source (origin
10036 (method url-fetch)
10037 (uri (pypi-uri "pymongo" version))
10038 (sha256
10039 (base32
10040 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
10041 (build-system python-build-system)
10042 (propagated-inputs
10043 `(("python-certifi" ,python-certifi)))
10044 (home-page "https://github.com/mongodb/mongo-python-driver")
10045 (synopsis "Python driver for MongoDB")
10046 (description "Python driver for MongoDB.")
10047 (license license:asl2.0)))
10048
10049 (define-public python2-pymongo
10050 (package-with-python2 python-pymongo))
10051
10052 (define-public python-consul
10053 (package
10054 (name "python-consul")
10055 (version "0.6.1")
10056 (source
10057 (origin
10058 (method url-fetch)
10059 (uri (pypi-uri "python-consul" version))
10060 (sha256
10061 (base32
10062 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
10063 (build-system python-build-system)
10064 (arguments
10065 '(#:tests? #f)) ; The tests are not distributed
10066 (propagated-inputs
10067 `(("python-requests" ,python-requests)
10068 ("python-six" ,python-six)))
10069 (home-page "https://github.com/cablehead/python-consul")
10070 (synopsis "Python client for Consul")
10071 (description
10072 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
10073 discovery, monitoring and configuration.")
10074 (license license:expat)))
10075
10076 (define-public python2-consul
10077 (package-with-python2 python-consul))
10078
10079 (define-public python-schematics
10080 (package
10081 (name "python-schematics")
10082 (version "1.1.1")
10083 (source
10084 (origin
10085 (method url-fetch)
10086 (uri (string-append
10087 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
10088 (file-name (string-append name "-" version ".tar.gz"))
10089 (sha256
10090 (base32
10091 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
10092 (build-system python-build-system)
10093 (propagated-inputs
10094 `(("python-six" ,python-six)))
10095 (arguments
10096 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
10097 ; version requirements (eg python-coveralls)
10098 (home-page "https://github.com/schematics/schematics")
10099 (synopsis "Python Data Structures for Humans")
10100 (description "Python Data Structures for Humans.")
10101 (license license:bsd-3)))
10102
10103 (define-public python2-schematics
10104 (package-with-python2 python-schematics))
10105
10106 (define-public python-odfpy
10107 (package
10108 (name "python-odfpy")
10109 (version "1.3.3")
10110 (source (origin
10111 (method url-fetch)
10112 (uri (pypi-uri "odfpy" version))
10113 (sha256
10114 (base32
10115 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
10116 (arguments
10117 `(#:modules ((srfi srfi-1)
10118 (guix build python-build-system)
10119 (guix build utils))
10120 #:phases
10121 (modify-phases %standard-phases
10122 (replace 'check
10123 ;; The test runner invokes python2 and python3 for test*.py.
10124 ;; To avoid having both in inputs, we replicate it here.
10125 (lambda _
10126 (for-each (lambda (test-file) (invoke "python" test-file))
10127 (find-files "tests" "^test.*\\.py$"))
10128 #t)))))
10129 (build-system python-build-system)
10130 (home-page "https://github.com/eea/odfpy")
10131 (synopsis "Python API and tools to manipulate OpenDocument files")
10132 (description "Collection of libraries and utility programs written in
10133 Python to manipulate OpenDocument 1.2 files.")
10134 (license
10135 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
10136 ;; number of files with other licenses.
10137 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
10138
10139 (define-public python2-odfpy
10140 (package-with-python2 python-odfpy))
10141
10142 (define-public python-natsort
10143 (package
10144 (name "python-natsort")
10145 (version "5.4.1")
10146 (source (origin
10147 (method url-fetch)
10148 (uri (pypi-uri "natsort" version))
10149 (sha256
10150 (base32
10151 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
10152 (build-system python-build-system)
10153 (arguments
10154 `(#:modules ((guix build utils)
10155 (guix build python-build-system)
10156 (srfi srfi-1)
10157 (srfi srfi-26)
10158 (ice-9 ftw))
10159 #:phases
10160 (modify-phases %standard-phases
10161 (add-before 'check 'set-cachedir
10162 ;; Tests require write access to $HOME by default
10163 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
10164 (replace 'check
10165 (lambda _
10166 (let ((cwd (getcwd)))
10167 (setenv "PYTHONPATH"
10168 (string-append
10169 cwd "/build/"
10170 (find (cut string-prefix? "lib" <>)
10171 (scandir (string-append cwd "/build")))
10172 ":"
10173 (getenv "PYTHONPATH")))
10174 (invoke "pytest" "-v")))))))
10175 (native-inputs
10176 `(("python-hypothesis" ,python-hypothesis)
10177 ("python-pytest-cov" ,python-pytest-cov)
10178 ("python-pytest-mock" ,python-pytest-mock)
10179 ("python-pytest" ,python-pytest)))
10180 (propagated-inputs ; TODO: Add python-fastnumbers.
10181 `(("python-pyicu" ,python-pyicu)))
10182 (home-page "https://github.com/SethMMorton/natsort")
10183 (synopsis "Natural sorting for python and shell")
10184 (description
10185 "Natsort lets you apply natural sorting on lists instead of
10186 lexicographical. If you use the built-in @code{sorted} method in python
10187 on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
10188 returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
10189 function @code{natsorted} that identifies numbers and sorts them separately
10190 from strings. It can also sort version numbers, real numbers, mixed types
10191 and more, and comes with a shell command @command{natsort} that exposes this
10192 functionality in the command line.")
10193 (license license:expat)
10194 (properties `((python2-variant . ,(delay python2-natsort))))))
10195
10196 (define-public python2-natsort
10197 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
10198 (package (inherit base)
10199 (native-inputs
10200 `(("python2-pathlib" ,python2-pathlib)
10201 ,@(package-native-inputs base))))))
10202
10203 (define-public python-glances
10204 (package
10205 (name "python-glances")
10206 (version "3.0.2")
10207 (source
10208 (origin
10209 (method url-fetch)
10210 (uri (pypi-uri "Glances" version))
10211 (sha256
10212 (base32
10213 "09fxysfp1n16csqvzvawy74qm6a94nvwjf3vcf5gkqp4i6k4vjjy"))))
10214 (build-system python-build-system)
10215 (propagated-inputs
10216 `(("python-psutil" ,python-psutil)))
10217 (home-page
10218 "https://github.com/nicolargo/glances")
10219 (synopsis
10220 "A cross-platform curses-based monitoring tool")
10221 (description
10222 "Glances is a curses-based monitoring tool for a wide variety of platforms.
10223 Glances uses the PsUtil library to get information from your system. It monitors
10224 CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
10225 (license license:lgpl3+)))
10226
10227 (define-public python2-glances
10228 (package-with-python2 python-glances))
10229
10230 (define-public python-graphql-core
10231 (package
10232 (name "python-graphql-core")
10233 (version "0.5.3")
10234 (source
10235 (origin
10236 (method url-fetch)
10237 (uri (pypi-uri "graphql-core" version))
10238 (sha256
10239 (base32
10240 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
10241 (build-system python-build-system)
10242 (arguments
10243 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
10244 #:phases
10245 (modify-phases %standard-phases
10246 (add-after 'unpack 'patch-hardcoded-version
10247 (lambda _ (substitute*
10248 "setup.py"
10249 (("'gevent==1.1rc1'") "'gevent'"))
10250 #t)))))
10251 (native-inputs
10252 `(("python-gevent" ,python-gevent)
10253 ("python-mock" ,python-mock)
10254 ("python-pytest-mock" ,python-pytest-mock)))
10255 (propagated-inputs
10256 `(("python-promise" ,python-promise)
10257 ("python-six" ,python-six)))
10258 (home-page "https://github.com/graphql-python/graphql-core")
10259 (synopsis "GraphQL implementation for Python")
10260 (description
10261 "GraphQL implementation for Python. GraphQL is a data query language and
10262 runtime designed and used to request and deliver data to mobile and web apps.
10263 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
10264 to Python.")
10265 (license license:expat)))
10266
10267 (define-public python2-graphql-core
10268 (package-with-python2 python-graphql-core))
10269
10270 (define-public python-graphql-relay
10271 (package
10272 (name "python-graphql-relay")
10273 (version "0.4.5")
10274 (source
10275 (origin
10276 (method url-fetch)
10277 (uri (pypi-uri "graphql-relay" version))
10278 (sha256
10279 (base32
10280 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
10281 (build-system python-build-system)
10282 (arguments
10283 '(#:tests? #f)) ; The tests are not distributed
10284 (propagated-inputs
10285 `(("python-graphql-core" ,python-graphql-core)
10286 ("python-promise" ,python-promise)
10287 ("python-six" ,python-six)))
10288 (home-page "https://github.com/graphql-python/graphql-relay-py")
10289 (synopsis "Relay implementation for Python")
10290 (description
10291 "This is a library to allow the easy creation of Relay-compliant servers
10292 using the GraphQL Python reference implementation of a GraphQL server. It
10293 should be noted that the code is a exact port of the original
10294 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
10295 from Facebook.")
10296 (license license:expat)))
10297
10298 (define-public python2-graphql-relay
10299 (package-with-python2 python-graphql-relay))
10300
10301 (define-public python-graphene
10302 (package
10303 (name "python-graphene")
10304 (version "0.10.2")
10305 (source
10306 (origin
10307 (method url-fetch)
10308 (uri (pypi-uri "graphene" version))
10309 (sha256
10310 (base32
10311 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
10312 (build-system python-build-system)
10313 (propagated-inputs
10314 `(("python-graphql-core" ,python-graphql-core)
10315 ("python-graphql-relay" ,python-graphql-relay)
10316 ("python-iso8601" ,python-iso8601)
10317 ("python-promise" ,python-promise)
10318 ("python-six" ,python-six)))
10319 (arguments
10320 `(#:tests? #f)) ; no tests/ in the PyPI tarball
10321 (home-page "http://graphene-python.org/")
10322 (synopsis "GraphQL Framework for Python")
10323 (description
10324 "Graphene is a Python library for building GraphQL schemas/types.
10325 A GraphQL schema describes your data model, and provides a GraphQL server
10326 with an associated set of resolve methods that know how to fetch data.")
10327 (properties `((python2-variant . ,(delay python2-graphene))))
10328 (license license:expat)))
10329
10330 (define-public python2-graphene
10331 (let ((base (package-with-python2
10332 (strip-python2-variant python-graphene))))
10333 (package (inherit base)
10334 (native-inputs
10335 `(("python2-sqlalchemy" ,python2-sqlalchemy)
10336 ,@(package-native-inputs base))))))
10337
10338 (define-public python-nautilus
10339 (package
10340 (name "python-nautilus")
10341 (version "0.4.9")
10342 (source
10343 (origin
10344 (method url-fetch)
10345 (uri (pypi-uri "nautilus" version))
10346 (sha256
10347 (base32
10348 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
10349 (build-system python-build-system)
10350 (arguments `(#:tests? #f)) ; fails to import test modules
10351 (propagated-inputs
10352 `(("python-bcrypt" ,python-bcrypt)
10353 ("python-click" ,python-click)
10354 ("python-consul" ,python-consul)
10355 ("python-graphene" ,python-graphene)
10356 ("python-jinja2" ,python-jinja2)
10357 ("python-peewee" ,python-peewee)
10358 ("python-pika" ,python-pika)
10359 ("python-tornado" ,python-tornado)
10360 ("python-wtforms" ,python-wtforms)))
10361 (native-inputs
10362 `(("python-nose2" ,python-nose2)))
10363 (home-page "https://github.com/AlecAivazis/nautilus")
10364 (synopsis "Library for creating microservice applications")
10365 (description
10366 "Nautilus is a framework for flux based microservices that looks to
10367 provide extendible implementations of common aspects of a cloud so that you can
10368 focus on building massively scalable web applications.")
10369 (license license:expat)))
10370
10371 (define-public python-snowballstemmer
10372 (package
10373 (name "python-snowballstemmer")
10374 (version "1.2.1")
10375 (source (origin
10376 (method url-fetch)
10377 (uri (pypi-uri "snowballstemmer" version))
10378 (sha256
10379 (base32
10380 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
10381 (build-system python-build-system)
10382 (arguments
10383 `(;; No tests exist
10384 #:tests? #f))
10385 (home-page "https://github.com/shibukawa/snowball_py")
10386 (synopsis "Snowball stemming library collection for Python")
10387 (description "This package provides 16 word stemmer algorithms generated
10388 from Snowball algorithms. It includes the 15 original ones plus the Poerter
10389 English stemmer.")
10390 (license license:bsd-3)))
10391
10392 (define-public python2-snowballstemmer
10393 (package-with-python2 python-snowballstemmer))
10394
10395 (define-public python-sphinx-cloud-sptheme
10396 (package
10397 (name "python-sphinx-cloud-sptheme")
10398 (version "1.8.0")
10399 (source (origin
10400 (method url-fetch)
10401 (uri (pypi-uri "cloud_sptheme" version))
10402 (sha256
10403 (base32
10404 "1dniqb6a39yh786f86c4jn666rwnyi1jvzn4616zhcchb7sfdshd"))))
10405 (build-system python-build-system)
10406 ;; FIXME: The 'pypi' release archive does not contain tests.
10407 (arguments '(#:tests? #f))
10408 (native-inputs
10409 `(("python-sphinx" ,python-sphinx)))
10410 (home-page "https://bitbucket.org/ecollins/cloud_sptheme")
10411 (synopsis "'Cloud' theme for Sphinx documenter")
10412 (description "This package contains the \"Cloud\" theme for Sphinx and some
10413 related extensions.")
10414 (license license:bsd-3)))
10415
10416 (define-public python2-sphinx-cloud-sptheme
10417 (package-with-python2 python-sphinx-cloud-sptheme))
10418
10419 (define-public python-sphinx-alabaster-theme
10420 (package
10421 (name "python-sphinx-alabaster-theme")
10422 (version "0.7.12")
10423 (source (origin
10424 (method url-fetch)
10425 (uri (pypi-uri "alabaster" version))
10426 (sha256
10427 (base32
10428 "00nwwjj2d2ym4s2kk217x7jkx1hnczc3fvm8yxbqmsp6b0nxfqd6"))))
10429 (build-system python-build-system)
10430 (propagated-inputs
10431 `(("python-pygments" ,python-pygments)))
10432 (home-page "https://alabaster.readthedocs.io/")
10433 (synopsis "Configurable sidebar-enabled Sphinx theme")
10434 (description "Alabaster is a visually (c)lean, responsive, configurable
10435 theme for the Sphinx documentation system. It's the default theme of Sphinx.")
10436 (license license:bsd-3)))
10437
10438 (define-public python2-sphinx-alabaster-theme
10439 (package-with-python2 python-sphinx-alabaster-theme))
10440
10441 (define-public python-setproctitle
10442 (package
10443 (name "python-setproctitle")
10444 (version "1.1.10")
10445 (source
10446 (origin
10447 (method url-fetch)
10448 (uri (pypi-uri "setproctitle" version))
10449 (sha256
10450 (base32
10451 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
10452 (build-system python-build-system)
10453 (arguments
10454 '(#:phases
10455 (modify-phases %standard-phases
10456 (add-before 'check 'patch-Makefile
10457 ;; Stricly this is only required for the python2 variant.
10458 ;; But adding a phase in an inherited package seems to be
10459 ;; cumbersum. So we patch even for python3.
10460 (lambda _
10461 (let ((nose (assoc-ref %build-inputs "python2-nose")))
10462 (when nose
10463 (substitute* "Makefile"
10464 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
10465 (string-append nose "/bin/nosetests "))))
10466 #t)))
10467 (replace 'check
10468 (lambda _
10469 (setenv "PYTHON" (or (which "python3") (which "python")))
10470 (setenv "PYCONFIG" (or (which "python3-config")
10471 (which "python-config")))
10472 (setenv "CC" "gcc")
10473 ;; No need to extend PYTHONPATH to find the built package, since
10474 ;; the Makefile will build anyway
10475 (invoke "make" "check"))))))
10476 (native-inputs
10477 `(("procps" ,procps))) ; required for tests
10478 (home-page
10479 "https://github.com/dvarrazzo/py-setproctitle")
10480 (synopsis
10481 "Setproctitle implementation for Python to customize the process title")
10482 (description "The library allows a process to change its title (as displayed
10483 by system tools such as ps and top).
10484
10485 Changing the title is mostly useful in multi-process systems, for
10486 example when a master process is forked: changing the children's title
10487 allows to identify the task each process is busy with. The technique
10488 is used by PostgreSQL and the OpenSSH Server for example.")
10489 (license license:bsd-3)
10490 (properties `((python2-variant . ,(delay python2-setproctitle))))))
10491
10492 (define-public python2-setproctitle
10493 (let ((base (package-with-python2
10494 (strip-python2-variant python-setproctitle))))
10495 (package
10496 (inherit base)
10497 (native-inputs `(("python2-nose" ,python2-nose)
10498 ,@(package-native-inputs base))))))
10499
10500 (define-public python-validictory
10501 (package
10502 (name "python-validictory")
10503 (version "1.0.1")
10504 (source
10505 (origin
10506 (method url-fetch)
10507 (uri (pypi-uri "validictory" version))
10508 (sha256
10509 (base32
10510 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
10511 (build-system python-build-system)
10512 (arguments
10513 '(#:phases
10514 (modify-phases %standard-phases
10515 (add-after 'unpack 'bootstrap
10516 ;; Move the tests out of the package directory to avoid
10517 ;; packaging them.
10518 (lambda* _
10519 (rename-file "validictory/tests" "tests")
10520 (delete-file "tests/__init__.py")))
10521 (replace 'check
10522 (lambda _
10523 ;; Extend PYTHONPATH so the built package will be found.
10524 (setenv "PYTHONPATH"
10525 (string-append (getcwd) "/build/lib:"
10526 (getenv "PYTHONPATH")))
10527 (invoke "py.test" "-vv" ))))))
10528 (native-inputs
10529 `(("python-pytest" ,python-pytest)))
10530 (home-page
10531 "https://github.com/jamesturk/validictory")
10532 (synopsis "General purpose Python data validator")
10533 (description "It allows validation of arbitrary Python data structures.
10534
10535 The schema format is based on the JSON Schema
10536 proposal (http://json-schema.org), so combined with json the library is also
10537 useful as a validator for JSON data.")
10538 (license license:expat)))
10539
10540 (define-public python2-validictory
10541 (package-with-python2 python-validictory))
10542
10543 (define-public python-pyelftools
10544 (package
10545 (name "python-pyelftools")
10546 (version "0.25")
10547 (source
10548 (origin
10549 (method url-fetch)
10550 (uri (pypi-uri "pyelftools" version))
10551 (sha256
10552 (base32
10553 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
10554 (build-system python-build-system)
10555 (arguments
10556 `(#:phases
10557 (modify-phases %standard-phases
10558 (add-before 'check 'set-pythonpath
10559 (lambda _
10560 (setenv "PYTHONPATH"
10561 (string-append
10562 (getcwd) "/test/"
10563 ":" (getenv "PYTHONPATH")))
10564 #t)))))
10565 (home-page
10566 "https://github.com/eliben/pyelftools")
10567 (synopsis
10568 "Analyze binary and library file information")
10569 (description "This Python library provides interfaces for parsing and
10570 analyzing two binary and library file formats; the Executable and Linking
10571 Format (ELF), and debugging information in the Debugging With Attributed
10572 Record Format (DWARF).")
10573 (license license:public-domain)))
10574
10575 (define-public python-pyev
10576 (package
10577 (name "python-pyev")
10578 (version "0.9.0")
10579 (source
10580 (origin
10581 (method url-fetch)
10582 (uri (pypi-uri "pyev" version))
10583 (sha256
10584 (base32
10585 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
10586 (build-system python-build-system)
10587 (arguments
10588 `(#:tests? #f ; no test suite
10589 #:phases
10590 (modify-phases %standard-phases
10591 (add-after 'unpack 'patch
10592 (lambda* (#:key inputs #:allow-other-keys)
10593 (let ((libev (string-append (assoc-ref inputs "libev")
10594 "/lib/libev.so.4")))
10595 (substitute* "setup.py"
10596 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
10597 (string-append "libev_dll_name = \"" libev "\"")))))))))
10598 (inputs
10599 `(("libev" ,libev)))
10600 (home-page "http://pythonhosted.org/pyev/")
10601 (synopsis "Python libev interface")
10602 (description "Pyev provides a Python interface to libev.")
10603 (license license:gpl3)))
10604
10605 (define-public python2-pyev
10606 (package-with-python2 python-pyev))
10607
10608 (define-public python-imagesize
10609 (package
10610 (name "python-imagesize")
10611 (version "1.1.0")
10612 (source
10613 (origin
10614 (method url-fetch)
10615 (uri (pypi-uri "imagesize" version))
10616 (sha256
10617 (base32
10618 "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk"))))
10619 (build-system python-build-system)
10620 (home-page "https://github.com/shibukawa/imagesize_py")
10621 (synopsis "Gets image size of files in various formats in Python")
10622 (description
10623 "This package allows determination of image size from
10624 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
10625 (license license:expat)))
10626
10627 (define-public python2-imagesize
10628 (package-with-python2 python-imagesize))
10629
10630 (define-public python-termstyle
10631 (package
10632 (name "python-termstyle")
10633 (version "0.1.11")
10634 (source
10635 (origin
10636 (method url-fetch)
10637 (uri (pypi-uri "termstyle" version))
10638 (sha256
10639 (base32
10640 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
10641 (build-system python-build-system)
10642 (arguments
10643 '(#:phases
10644 (modify-phases %standard-phases
10645 (replace 'check
10646 (lambda _
10647 (invoke "python" "test3.py"))))))
10648 (home-page "https://github.com/gfxmonk/termstyle")
10649 (synopsis "Console text coloring for Python")
10650 (description "This package provides console text coloring for Python.")
10651 (license license:bsd-3)))
10652
10653 (define-public python-argcomplete
10654 (package
10655 (name "python-argcomplete")
10656 (version "1.7.0")
10657 (source
10658 (origin
10659 (method url-fetch)
10660 (uri (pypi-uri "argcomplete" version))
10661 (sha256
10662 (base32
10663 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
10664 (build-system python-build-system)
10665 (native-inputs
10666 `(("python-pexpect" ,python-pexpect)
10667 ("tcsh" ,tcsh)
10668 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
10669 (home-page "https://github.com/kislyuk/argcomplete")
10670 (synopsis "Shell tab completion for Python argparse")
10671 (description "argcomplete provides extensible command line tab completion
10672 of arguments and options for Python scripts using @code{argparse}. It's
10673 particularly useful for programs with many options or sub-parsers that can
10674 dynamically suggest completions; for example, when browsing resources over the
10675 network.")
10676 (license license:asl2.0)))
10677
10678 (define-public python2-argcomplete
10679 (package-with-python2 python-argcomplete))
10680
10681 (define-public python-xopen
10682 (package
10683 (name "python-xopen")
10684 (version "0.3.3")
10685 (source
10686 (origin
10687 (method url-fetch)
10688 (uri (pypi-uri "xopen" version))
10689 (sha256
10690 (base32
10691 "1a0wbil552wsmklwd89ssmgz3pjd86qa9i7jh8wqb9wslc8a2qjr"))
10692 (file-name (string-append name "-" version ".tar.gz"))))
10693 (build-system python-build-system)
10694 (home-page "https://github.com/marcelm/xopen/")
10695 (synopsis "Open compressed files transparently")
10696 (description "This module provides an @code{xopen} function that works like
10697 Python's built-in @code{open} function, but can also deal with compressed files.
10698 Supported compression formats are gzip, bzip2 and, xz, and are automatically
10699 recognized by their file extensions. The focus is on being as efficient as
10700 possible on all supported Python versions.")
10701 (license license:expat)))
10702
10703 (define-public python2-xopen
10704 (let ((base (package-with-python2
10705 (strip-python2-variant python-xopen))))
10706 (package
10707 (inherit base)
10708 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
10709 ,@(package-propagated-inputs base))))))
10710
10711 (define-public python-cheetah
10712 (package
10713 (name "python-cheetah")
10714 (version "3.1.0")
10715 (source
10716 (origin
10717 (method url-fetch)
10718 (uri (pypi-uri "Cheetah3" version))
10719 (sha256
10720 (base32
10721 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
10722 (build-system python-build-system)
10723 (arguments
10724 `(#:modules ((guix build utils)
10725 (guix build python-build-system)
10726 (ice-9 ftw)
10727 (srfi srfi-1)
10728 (srfi srfi-26))
10729 #:phases (modify-phases %standard-phases
10730 (add-after 'unpack 'use-absolute-python
10731 (lambda _
10732 (substitute* "Cheetah/CheetahWrapper.py"
10733 (("#!/usr/bin/env python")
10734 (string-append "#!" (which "python"))))
10735 #t))
10736 (replace 'check
10737 (lambda _
10738 (let ((cwd (getcwd)))
10739 (setenv "PYTHONPATH"
10740 (string-append
10741 cwd "/build/"
10742 (find (cut string-prefix? "lib" <>)
10743 (scandir (string-append cwd "/build")))
10744 ":" (getenv "PYTHONPATH")))
10745 (setenv "PATH"
10746 (string-append (getenv "PATH")
10747 ":" cwd "/bin"))
10748 (setenv "TMPDIR" "/tmp")
10749
10750 (substitute* "Cheetah/Tests/Test.py"
10751 (("unittest.TextTestRunner\\(\\)")
10752 "unittest.TextTestRunner(verbosity=2)"))
10753
10754 (invoke "python" "Cheetah/Tests/Test.py")))))))
10755 (propagated-inputs
10756 `(("python-markdown" ,python-markdown))) ;optional
10757 (home-page "http://cheetahtemplate.org/")
10758 (synopsis "Template engine")
10759 (description "Cheetah is a text-based template engine and Python code
10760 generator.
10761
10762 Cheetah can be used as a standalone templating utility or referenced as
10763 a library from other Python applications. It has many potential uses,
10764 but web developers looking for a viable alternative to ASP, JSP, PHP and
10765 PSP are expected to be its principle user group.
10766
10767 Features:
10768 @enumerate
10769 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
10770 text-based format.
10771 @item Cleanly separates content, graphic design, and program code.
10772 @item Blends the power and flexibility of Python with a simple template language
10773 that non-programmers can understand.
10774 @item Gives template writers full access to any Python data structure, module,
10775 function, object, or method in their templates.
10776 @item Makes code reuse easy by providing an object-orientated interface to
10777 templates that is accessible from Python code or other Cheetah templates.
10778 One template can subclass another and selectively reimplement sections of it.
10779 @item Provides a simple, yet powerful, caching mechanism that can dramatically
10780 improve the performance of a dynamic website.
10781 @item Compiles templates into optimized, yet readable, Python code.
10782 @end enumerate")
10783 (license (license:x11-style "file://LICENSE"))))
10784
10785 (define-public python2-cheetah
10786 (package-with-python2 python-cheetah))
10787
10788 (define-public python-dulwich
10789 (package
10790 (name "python-dulwich")
10791 (version "0.18.6")
10792 (source
10793 (origin
10794 (method url-fetch)
10795 (uri (list (string-append "https://www.dulwich.io/releases/"
10796 "dulwich-" version ".tar.gz")
10797 (pypi-uri "dulwich" version)))
10798 (sha256
10799 (base32
10800 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
10801 (build-system python-build-system)
10802 (arguments
10803 `(#:phases
10804 (modify-phases %standard-phases
10805 (add-before 'check 'fix-tests
10806 (lambda* (#:key inputs #:allow-other-keys)
10807 ;; The tests use Popen with a custom environment which doesn't
10808 ;; include PATH.
10809 (substitute* "dulwich/tests/compat/utils.py"
10810 (("'git'") (string-append "'"
10811 (which "git")
10812 "'")))
10813 (substitute* '("dulwich/tests/test_repository.py"
10814 "dulwich/tests/test_hooks.py")
10815 (("#!/bin/sh") (string-append "#!" (which "sh"))))
10816 (setenv "TEST_RUNNER" "unittest")
10817 (setenv "PYTHONHASHSEED" "random")
10818 #t)))))
10819 (propagated-inputs
10820 `(("python-fastimport" ,python-fastimport)))
10821 (native-inputs
10822 `(("python-mock" ,python-mock)
10823 ("python-geventhttpclient" ,python-geventhttpclient)
10824 ("git" ,git)))
10825 (home-page "https://www.dulwich.io/")
10826 (synopsis "Git implementation in Python")
10827 (description "Dulwich is an implementation of the Git file formats and
10828 protocols written in pure Python.")
10829 ;; Can be used with either license.
10830 (license (list license:asl2.0 license:gpl2+))))
10831
10832 (define-public python2-dulwich
10833 (package-with-python2 python-dulwich))
10834
10835 (define-public python-pbkdf2
10836 (package
10837 (name "python-pbkdf2")
10838 (version "1.3")
10839 (source
10840 (origin
10841 (method url-fetch)
10842 (uri (pypi-uri "pbkdf2" version))
10843 (sha256
10844 (base32
10845 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
10846 (build-system python-build-system)
10847 (arguments
10848 '(#:phases
10849 (modify-phases %standard-phases
10850 (replace 'check
10851 (lambda _
10852 (setenv "PYTHONPATH"
10853 (string-append (getcwd) "/build/lib:"
10854 (getenv "PYTHONPATH")))
10855 (invoke "python" "test/test_pbkdf2.py"))))))
10856 (propagated-inputs
10857 `(("python-pycrypto" ,python-pycrypto))) ; optional
10858 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
10859 (synopsis "Password-based key derivation")
10860 (description "This module implements the password-based key derivation
10861 function, PBKDF2, specified in RSA PKCS#5 v2.0.
10862
10863 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
10864 is part of the RSA Public Key Cryptography Standards series. The provided
10865 implementation takes a password or a passphrase and a salt value (and
10866 optionally a iteration count, a digest module, and a MAC module) and provides
10867 a file-like object from which an arbitrarly-sized key can be read.")
10868 (license license:expat)))
10869
10870 (define-public python2-pbkdf2
10871 (package-with-python2 python-pbkdf2))
10872
10873 (define-public python-qrcode
10874 (package
10875 (name "python-qrcode")
10876 (version "6.1")
10877 (source
10878 (origin
10879 (method url-fetch)
10880 (uri (pypi-uri "qrcode" version))
10881 (sha256
10882 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
10883 (build-system python-build-system)
10884 (arguments
10885 ;; FIXME: Tests require packaging 'pymaging'.
10886 '(#:tests? #f))
10887 (propagated-inputs
10888 `(("python-lxml" ,python-lxml) ; for SVG output
10889 ("python-pillow" ,python-pillow) ; for PNG output
10890 ("python-six" ,python-six)))
10891 (home-page "https://github.com/lincolnloop/python-qrcode")
10892 (synopsis "QR Code image generator")
10893 (description "This package provides a pure Python QR Code generator
10894 module. It uses the Python Imaging Library (PIL) to allow for the generation
10895 of QR Codes.
10896
10897 In addition this package provides a command line tool to generate QR codes and
10898 either write these QR codes to a file or do the output as ascii art at the
10899 console.")
10900 (license license:bsd-3)))
10901
10902 (define-public python2-qrcode
10903 (package-with-python2 python-qrcode))
10904
10905 (define-public python-rst2ansi
10906 (package
10907 (name "python-rst2ansi")
10908 (version "0.1.5")
10909 (source
10910 (origin
10911 (method url-fetch)
10912 (uri (pypi-uri "rst2ansi" version))
10913 (sha256
10914 (base32
10915 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
10916 (build-system python-build-system)
10917 (propagated-inputs
10918 `(("python-docutils" ,python-docutils)))
10919 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
10920 (synopsis "Convert RST to ANSI-decorated console output")
10921 (description
10922 "Python module dedicated to rendering RST (reStructuredText) documents
10923 to ansi-escaped strings suitable for display in a terminal.")
10924 (license license:expat)))
10925
10926 (define-public python-ansi2html
10927 (package
10928 (name "python-ansi2html")
10929 (version "1.2.0")
10930 (source
10931 (origin
10932 (method url-fetch)
10933 (uri (pypi-uri "ansi2html" version))
10934 (sha256
10935 (base32
10936 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
10937 (build-system python-build-system)
10938 (native-inputs
10939 `(("python-mock" ,python-mock)
10940 ("python-nose" ,python-nose)))
10941 (propagated-inputs
10942 `(("python-six" ,python-six)))
10943 (home-page "https://github.com/ralphbean/ansi2html")
10944 (synopsis "Convert ANSI-decorated console output to HTML")
10945 (description
10946 "@command{ansi2html} is a Python library and command line utility for
10947 convering text with ANSI color codes to HTML or LaTeX.")
10948 (license license:gpl3+)))
10949
10950 (define-public python2-ansi2html
10951 (package-with-python2 python-ansi2html))
10952
10953 (define-public python-ddt
10954 (package
10955 (name "python-ddt")
10956 (version "1.1.3")
10957 (source
10958 (origin
10959 (method url-fetch)
10960 (uri (pypi-uri "ddt" version))
10961 (sha256
10962 (base32
10963 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
10964 (build-system python-build-system)
10965 (native-inputs
10966 `(("python-mock" ,python-mock)
10967 ("python-nose" ,python-nose)))
10968 (propagated-inputs
10969 `(("python-six" ,python-six)
10970 ("python-pyyaml" ,python-pyyaml)))
10971 (home-page "https://github.com/txels/ddt")
10972 (synopsis "Data-Driven Tests")
10973 (description
10974 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
10975 running it with different test data, and make it appear as multiple test
10976 cases.")
10977 (license license:expat)))
10978
10979 (define-public python2-ddt
10980 (package-with-python2 python-ddt))
10981
10982 (define-public python-pycountry
10983 (package
10984 (name "python-pycountry")
10985 (version "18.5.26")
10986 (source
10987 (origin
10988 (method url-fetch)
10989 (uri (pypi-uri "pycountry" version))
10990 (sha256
10991 (base32
10992 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
10993 (build-system python-build-system)
10994 (home-page "https://bitbucket.org/flyingcircus/pycountry")
10995 (synopsis "ISO databases for languages, countries, currencies, etc.")
10996 (description
10997 "@code{pycountry} provides the ISO databases for the standards:
10998 @enumerate
10999 @item 639-3 (Languages)
11000 @item 3166 (Countries)
11001 @item 3166-3 (Deleted Countries)
11002 @item 3166-2 (Subdivisions of countries)
11003 @item 4217 (Currencies)
11004 @item 15924 (Scripts)
11005 @end enumerate
11006 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
11007 through a Python API.")
11008 (license license:lgpl2.1+)))
11009
11010 (define-public python2-pycountry
11011 (package-with-python2 python-pycountry))
11012
11013 (define-public python-pycosat
11014 (package
11015 (name "python-pycosat")
11016 (version "0.6.1")
11017 (source
11018 (origin
11019 (method url-fetch)
11020 (uri (pypi-uri "pycosat" version))
11021 (sha256
11022 (base32
11023 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
11024 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
11025 (build-system python-build-system)
11026 (home-page "https://github.com/ContinuumIO/pycosat")
11027 (synopsis "Bindings to picosat (a SAT solver)")
11028 (description
11029 "This package provides efficient Python bindings to @code{picosat} on
11030 the C level. When importing pycosat, the @code{picosat} solver becomes part
11031 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
11032 Problem} (SAT) solver.")
11033 (license license:expat)))
11034
11035 (define-public python2-pycosat
11036 (package-with-python2 python-pycosat))
11037
11038 (define-public python2-ruamel.ordereddict
11039 (package
11040 (name "python2-ruamel.ordereddict")
11041 (version "0.4.9")
11042 (source
11043 (origin
11044 (method url-fetch)
11045 (uri (pypi-uri "ruamel.ordereddict" version))
11046 (sha256
11047 (base32
11048 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
11049 (build-system python-build-system)
11050 (arguments
11051 `(#:python ,python-2
11052 #:phases
11053 (modify-phases %standard-phases
11054 (delete 'check)
11055 (add-after 'install 'check
11056 (lambda* (#:key inputs outputs #:allow-other-keys)
11057 (add-installed-pythonpath inputs outputs)
11058 (invoke "python" "test/testordereddict.py"))))))
11059 (home-page "https://bitbucket.org/ruamel/ordereddict")
11060 (synopsis "Version of dict that keeps keys in insertion order")
11061 (description
11062 "This is an implementation of an ordered dictionary with @dfn{Key
11063 Insertion Order} (KIO: updates of values do not affect the position of the
11064 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
11065 removed and put at the back). The standard library module @code{OrderedDict},
11066 implemented later, implements a subset of @code{ordereddict} functionality.
11067 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
11068 Order} (KSO, no sorting function can be specified, but a transform can be
11069 specified to apply on the key before comparison (e.g. @code{string.lower})).")
11070 (license license:expat)))
11071
11072 (define-public python-pypeg2
11073 (package
11074 (name "python-pypeg2")
11075 (version "2.15.2")
11076 (source
11077 (origin
11078 (method url-fetch)
11079 (uri (pypi-uri "pyPEG2" version))
11080 (sha256
11081 (base32
11082 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
11083 (build-system python-build-system)
11084 (propagated-inputs `(("python-lxml" ,python-lxml)))
11085 (arguments
11086 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
11087 '(#:tests? #f))
11088 (home-page "https://fdik.org/pyPEG/")
11089 (synopsis "Parsering Expression Grammars in Python")
11090 (description "PyPEG is an intrinsic parser interpreter framework for
11091 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
11092 parse many formal languages.")
11093 (license license:gpl2)))
11094
11095 (define-public python-incremental
11096 (package
11097 (name "python-incremental")
11098 (version "17.5.0")
11099 (source
11100 (origin
11101 (method url-fetch)
11102 (uri (pypi-uri "incremental" version))
11103 (sha256
11104 (base32
11105 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
11106 (build-system python-build-system)
11107 (home-page "https://github.com/hawkowl/incremental")
11108 (synopsis "Library for versioning Python projects")
11109 (description "Incremental is a small library that versions your Python
11110 projects.")
11111 (license license:expat)))
11112
11113 (define-public python2-incremental
11114 (package-with-python2 python-incremental))
11115
11116 (define-public python-invoke
11117 (package
11118 (name "python-invoke")
11119 (home-page "http://www.pyinvoke.org/")
11120 (version "1.1.0")
11121 (source (origin
11122 (method url-fetch)
11123 (uri (pypi-uri "invoke" version))
11124 (sha256
11125 (base32
11126 "0aiy1xvk1f91246zxd1zqrm679vdvd10h843a2na41cqr3cflpi6"))))
11127 (build-system python-build-system)
11128 (arguments
11129 ;; XXX: Requires many dependencies that are not yet in Guix.
11130 `(#:tests? #f))
11131 (synopsis "Pythonic task execution")
11132 (description
11133 "Invoke is a Python task execution tool and library, drawing inspiration
11134 from various sources to arrive at a powerful and clean feature set. It is
11135 evolved from the Fabric project, but focuses on local and abstract concerns
11136 instead of servers and network commands.")
11137 (license license:bsd-3)))
11138
11139 (define-public python2-invoke
11140 (package-with-python2 python-invoke))
11141
11142 (define-public python-automat
11143 (package
11144 (name "python-automat")
11145 (version "0.6.0")
11146 (source (origin
11147 (method url-fetch)
11148 (uri (pypi-uri "Automat" version))
11149 (sha256
11150 (base32
11151 "1a7nsrljysfmdqmpn2apfa1gg6rfah4y9sizvns8gb08rx7d07rw"))))
11152 (build-system python-build-system)
11153 ;; We disable the tests because they require python-twisted, while
11154 ;; python-twisted depends on python-automat. Twisted is optional, but the
11155 ;; tests fail if it is not available. Also see
11156 ;; <https://github.com/glyph/automat/issues/71>.
11157 (arguments '(#:tests? #f))
11158 (native-inputs
11159 `(("python-m2r" ,python-m2r)
11160 ("python-setuptools-scm" ,python-setuptools-scm)
11161 ("python-graphviz" ,python-graphviz)))
11162 (propagated-inputs
11163 `(("python-six" ,python-six)
11164 ("python-attrs" ,python-attrs)))
11165 (home-page "https://github.com/glyph/Automat")
11166 (synopsis "Self-service finite-state machines")
11167 (description "Automat is a library for concise, idiomatic Python
11168 expression of finite-state automata (particularly deterministic finite-state
11169 transducers).")
11170 (license license:expat)))
11171
11172 (define-public python2-automat
11173 (package-with-python2 python-automat))
11174
11175 (define-public python-m2r
11176 (package
11177 (name "python-m2r")
11178 (version "0.1.12")
11179 (source (origin
11180 (method url-fetch)
11181 (uri (pypi-uri "m2r" version))
11182 (sha256
11183 (base32
11184 "1axrwnf425sz4qz3c0qc7yhhki4myzb8rki7pczcsgzznzmqdyxd"))))
11185 (build-system python-build-system)
11186 (propagated-inputs
11187 `(("python-docutils" ,python-docutils)
11188 ("python-mistune" ,python-mistune)))
11189 (native-inputs
11190 `(("python-pygments" ,python-pygments)
11191 ("python-mock" ,python-mock)))
11192 (home-page "https://github.com/miyakogi/m2r")
11193 (synopsis "Markdown to reStructuredText converter")
11194 (description "M2R converts a markdown file including reST markups to valid
11195 reST format.")
11196 (license license:expat)))
11197
11198 (define-public python2-m2r
11199 (package-with-python2 python-m2r))
11200
11201 (define-public python-constantly
11202 (package
11203 (name "python-constantly")
11204 (version "15.1.0")
11205 (source (origin
11206 (method url-fetch)
11207 (uri (pypi-uri "constantly" version))
11208 (sha256
11209 (base32
11210 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
11211 (build-system python-build-system)
11212 (home-page "https://github.com/twisted/constantly")
11213 (synopsis "Symbolic constants in Python")
11214 (description "Constantly is a Python library that provides symbolic
11215 constant support. It includes collections and constants with text, numeric,
11216 and bit flag values.")
11217 (license license:expat)))
11218
11219 (define-public python2-constantly
11220 (package-with-python2 python-constantly))
11221
11222 (define-public python-attrs
11223 (package
11224 (name "python-attrs")
11225 (version "18.2.0")
11226 (source (origin
11227 (method url-fetch)
11228 (uri (pypi-uri "attrs" version))
11229 (sha256
11230 (base32
11231 "0s9ydh058wmmf5v391pym877x4ahxg45dw6a0w4c7s5wgpigdjqh"))))
11232 (build-system python-build-system)
11233 (arguments
11234 `(#:modules ((guix build utils)
11235 (guix build python-build-system)
11236 (ice-9 ftw)
11237 (srfi srfi-1)
11238 (srfi srfi-26))
11239 #:phases (modify-phases %standard-phases
11240 (replace 'check
11241 (lambda _
11242 (let ((cwd (getcwd)))
11243 (setenv "PYTHONPATH"
11244 (string-append
11245 cwd "/build/"
11246 (find (cut string-prefix? "lib" <>)
11247 (scandir (string-append cwd "/build")))
11248 ":"
11249 (getenv "PYTHONPATH")))
11250 (invoke "python" "-m" "pytest")))))))
11251 (native-inputs
11252 `(("python-coverage" ,python-coverage)
11253 ("python-hypothesis" ,python-hypothesis)
11254 ("python-pympler" ,python-pympler)
11255 ("python-pytest" ,python-pytest)
11256 ("python-six" ,python-six)
11257 ("python-sphinx" ,python-sphinx)
11258 ("python-zope-interface" ,python-zope-interface)))
11259 (home-page "https://github.com/python-attrs/attrs/")
11260 (synopsis "Attributes without boilerplate")
11261 (description "@code{attrs} is a Python package with class decorators that
11262 ease the chores of implementing the most common attribute-related object
11263 protocols.")
11264 (license license:expat)))
11265
11266 (define-public python2-attrs
11267 (package-with-python2 python-attrs))
11268
11269 (define-public python-attrs-bootstrap
11270 (package
11271 (inherit python-attrs)
11272 (name "python-attrs-bootstrap")
11273 ;; Keep this on a fixed version so python-attrs can be updated without
11274 ;; triggering a mass-rebuild. FIXME: Update this in the next rebuild cycle.
11275 (version "17.4.0")
11276 (source (origin
11277 (method url-fetch)
11278 (uri (pypi-uri "attrs" version))
11279 (sha256
11280 (base32
11281 "1jafnn1kzd6qhxgprhx6y6ik1r5m2rilx25syzcmq03azp660y8w"))))
11282 (native-inputs `())
11283 (arguments `(#:tests? #f))))
11284
11285 (define-public python2-attrs-bootstrap
11286 (package-with-python2 python-attrs-bootstrap))
11287
11288 (define-public python2-cliapp
11289 (package
11290 (name "python2-cliapp")
11291 (version "1.20170823")
11292 (source
11293 (origin
11294 (method url-fetch)
11295 (uri (string-append
11296 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
11297 version ".tar.gz"))
11298 (sha256
11299 (base32
11300 "1i9gik0xrj6jmi95s5w988jl1y265baz5xm5pbqdyvsh8h9ln6yq"))))
11301 (build-system python-build-system)
11302 (arguments
11303 `(#:python ,python-2
11304 #:phases
11305 (modify-phases %standard-phases
11306 ;; check phase needs to be run before the build phase. If not,
11307 ;; coverage-test-runner looks for tests for the built source files,
11308 ;; and fails.
11309 (delete 'check)
11310 (add-before 'build 'check
11311 (lambda _
11312 ;; Disable python3 tests
11313 (substitute* "check"
11314 (("python3") "# python3"))
11315 (invoke "./check"))))))
11316 (native-inputs
11317 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
11318 ("python2-pep8" ,python2-pep8)))
11319 (propagated-inputs
11320 `(("python2-pyaml" ,python2-pyaml)))
11321 (home-page "https://liw.fi/cliapp/")
11322 (synopsis "Python framework for command line programs")
11323 (description "@code{python2-cliapp} is a python framework for
11324 command line programs. It contains the typical stuff such programs
11325 need to do, such as parsing the command line for options, and
11326 iterating over input files.")
11327 (license license:gpl2+)))
11328
11329 (define-public python2-ttystatus
11330 (package
11331 (name "python2-ttystatus")
11332 (version "0.35")
11333 (source
11334 (origin
11335 (method url-fetch)
11336 (uri (string-append
11337 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
11338 version ".tar.gz"))
11339 (sha256
11340 (base32
11341 "0vivqbw7ddhsq1zj3g9cvvv4f0phl0pis2smsnwcr2szz2fk3hl6"))))
11342 (build-system python-build-system)
11343 (native-inputs
11344 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
11345 ("python2-pep8" ,python2-pep8)))
11346 (arguments
11347 `(#:python ,python-2
11348 #:phases
11349 (modify-phases %standard-phases
11350 ;; check phase needs to be run before the build phase. If not,
11351 ;; coverage-test-runner looks for tests for the built source files,
11352 ;; and fails.
11353 (delete 'check)
11354 (add-before 'build 'check
11355 (lambda _ (invoke "make" "check"))))))
11356 (home-page "https://liw.fi/ttystatus/")
11357 (synopsis "Python library for showing progress reporting and
11358 status updates on terminals")
11359 (description "@code{python2-ttystatus} is a python library for
11360 showing progress reporting and status updates on terminals, for
11361 command line programs. Output is automatically adapted to the width
11362 of the terminal: truncated if it does not fit, and resized if the
11363 terminal size changes.")
11364 (license license:gpl3+)))
11365
11366 (define-public python2-tracing
11367 (package
11368 (name "python2-tracing")
11369 (version "0.10")
11370 (source
11371 (origin
11372 (method url-fetch)
11373 (uri (string-append
11374 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
11375 version ".tar.gz"))
11376 (sha256
11377 (base32
11378 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
11379 (build-system python-build-system)
11380 (arguments
11381 `(#:python ,python-2))
11382 (home-page "https://liw.fi/tracing/")
11383 (synopsis "Python debug logging helper")
11384 (description "@code{python2-tracing} is a python library for
11385 logging debug messages. It provides a way to turn debugging messages
11386 on and off, based on the filename they occur in. It is much faster
11387 than using @code{logging.Filter} to accomplish the same thing, which
11388 matters when code is run in production mode. The actual logging still
11389 happens using the @code{logging} library.")
11390 (license license:gpl3+)))
11391
11392 (define-public python2-larch
11393 (package
11394 (name "python2-larch")
11395 (version "1.20151025")
11396 (source
11397 (origin
11398 (method url-fetch)
11399 (uri (string-append
11400 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
11401 version ".tar.gz"))
11402 (patches (search-patches
11403 "python2-larch-coverage-4.0a6-compatibility.patch"))
11404 (sha256
11405 (base32
11406 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
11407 (build-system python-build-system)
11408 (arguments
11409 `(#:python ,python-2
11410 #:phases
11411 (modify-phases %standard-phases
11412 ;; check phase needs to be run before the build phase. If not,
11413 ;; coverage-test-runner looks for tests for the built source files,
11414 ;; and fails.
11415 (delete 'check)
11416 (add-before 'build 'check
11417 (lambda _ (invoke "make" "check"))))))
11418 (native-inputs
11419 `(("cmdtest" ,cmdtest)
11420 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
11421 (propagated-inputs
11422 `(("python2-tracing" ,python2-tracing)))
11423 (home-page "https://liw.fi/larch/")
11424 (synopsis "Python copy-on-write B-tree library")
11425 (description "@code{python2-larch} is an implementation of
11426 particular kind of B-tree, based on research by Ohad Rodeh. See
11427 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
11428 on the data structure.
11429
11430 The distinctive feature of this B-tree is that a node is never
11431 (conceptually) modified. Instead, all updates are done by
11432 copy-on-write. This makes it easy to clone a tree, and modify only the
11433 clone, while other processes access the original tree.")
11434 (license license:gpl3+)))
11435
11436 (define-public python-astroid
11437 (package
11438 (name "python-astroid")
11439 (version "2.1.0")
11440 (source
11441 (origin
11442 (method url-fetch)
11443 (uri (pypi-uri "astroid" version))
11444 (sha256
11445 (base32
11446 "08hz675knh4294bancdapql392fmbjyimhbyrmfkz1ka7l035c1m"))))
11447 (build-system python-build-system)
11448 (propagated-inputs
11449 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
11450 ("python-six" ,python-six)
11451 ("python-wrapt" ,python-wrapt)))
11452 (native-inputs
11453 `(("python-dateutil" ,python-dateutil)
11454 ("python-nose" ,python-nose)
11455 ("python-pytest" ,python-pytest)
11456 ("python-pytest-runner" ,python-pytest-runner)))
11457 (arguments
11458 `(#:phases
11459 (modify-phases %standard-phases
11460 (add-after 'unpack 'remove-spurious-test
11461 (lambda _
11462 ;; This can be removed after upgrading from python-3.7
11463 ;; https://github.com/PyCQA/astroid/issues/593
11464 ;; https://bugs.python.org/issue34056
11465 (delete-file "astroid/tests/unittest_modutils.py")
11466 #t))
11467 (replace 'check
11468 (lambda _
11469 (invoke "pytest" "astroid"))))))
11470 (home-page "https://github.com/PyCQA/astroid")
11471 (synopsis "Common base representation of python source code for pylint and
11472 other projects")
11473 (description "@code{python-astroid} provides a common base representation
11474 of python source code for projects such as pychecker, pyreverse, pylint, etc.
11475
11476 It provides a compatible representation which comes from the _ast module. It
11477 rebuilds the tree generated by the builtin _ast module by recursively walking
11478 down the AST and building an extended ast. The new node classes have
11479 additional methods and attributes for different usages. They include some
11480 support for static inference and local name scopes. Furthermore, astroid
11481 builds partial trees by inspecting living objects.")
11482 (license license:lgpl2.1+)
11483 (properties `((python2-variant . ,(delay python2-astroid))))))
11484
11485 (define-public python2-astroid
11486 (let ((base (package-with-python2
11487 (strip-python2-variant python-astroid))))
11488 (package (inherit base)
11489 ;; Version 2.x removes python2 support.
11490 (version "1.6.5")
11491 (source
11492 (origin
11493 (method url-fetch)
11494 (uri (pypi-uri "astroid" version))
11495 (sha256
11496 (base32
11497 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
11498 (arguments
11499 (substitute-keyword-arguments (package-arguments base)
11500 ((#:phases phases)
11501 `(modify-phases ,phases
11502 (add-after 'unpack 'remove-spurious-test
11503 (lambda _
11504 ;; https://github.com/PyCQA/astroid/issues/276
11505 (delete-file "astroid/tests/unittest_brain.py")
11506 #t))
11507 (replace 'check
11508 (lambda _
11509 (invoke"python" "-m" "unittest" "discover"
11510 "-p" "unittest*.py")))))))
11511 (native-inputs `())
11512 (propagated-inputs
11513 `(("python2-backports-functools-lru-cache"
11514 ,python2-backports-functools-lru-cache)
11515 ("python2-enum34" ,python2-enum34)
11516 ("python2-singledispatch" ,python2-singledispatch)
11517 ,@(package-propagated-inputs base))))))
11518
11519 (define-public python-isort
11520 (package
11521 (name "python-isort")
11522 (version "4.3.4")
11523 (source
11524 (origin
11525 (method git-fetch)
11526 (uri (git-reference
11527 ;; Tests pass only from the Github sources
11528 (url "https://github.com/timothycrosley/isort")
11529 (commit version)))
11530 (file-name (git-file-name name version))
11531 (sha256
11532 (base32
11533 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
11534 (build-system python-build-system)
11535 (native-inputs
11536 `(("python-mock" ,python-mock)
11537 ("python-pytest" ,python-pytest)))
11538 (home-page "https://github.com/timothycrosley/isort")
11539 (synopsis "Python utility/library to sort python imports")
11540 (description "@code{python-isort} is a python utility/library to sort
11541 imports alphabetically, and automatically separated into sections. It
11542 provides a command line utility, a python library and plugins for various
11543 editors.")
11544 (license license:expat)
11545 (properties `((python2-variant . ,(delay python2-isort))))))
11546
11547 (define-public python2-isort
11548 (let ((base (package-with-python2
11549 (strip-python2-variant python-isort))))
11550 (package (inherit base)
11551 (native-inputs
11552 `(("python2-futures" ,python2-futures)
11553 ,@(package-native-inputs base))))))
11554
11555 (define-public python2-backports-functools-lru-cache
11556 (package
11557 (name "python2-backports-functools-lru-cache")
11558 (version "1.5")
11559 (source
11560 (origin
11561 (method url-fetch)
11562 ;; only the pypi tarballs contain the necessary metadata
11563 (uri (pypi-uri "backports.functools_lru_cache" version))
11564 (sha256
11565 (base32
11566 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
11567 (build-system python-build-system)
11568 (native-inputs
11569 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
11570 (arguments
11571 `(#:python ,python-2))
11572 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
11573 (synopsis "Backport of functools.lru_cache from Python 3.3")
11574 (description "@code{python2-backports-functools-lru-cache} is a backport
11575 of @code{functools.lru_cache} from python 3.3.")
11576 (license license:expat)))
11577
11578 (define-public python-configparser
11579 (package
11580 (name "python-configparser")
11581 (version "3.5.0")
11582 (source
11583 (origin
11584 (method url-fetch)
11585 (uri (string-append
11586 "https://bitbucket.org/ambv/configparser/get/"
11587 version ".tar.bz2"))
11588 (file-name (string-append name "-" version ".tar.gz"))
11589 (sha256
11590 (base32
11591 "0waq40as14abwzbb321hfz4vr1fi363nscy32ga14qvfygrg96wa"))))
11592 (build-system python-build-system)
11593 (home-page "https://github.com/jaraco/configparser/")
11594 (synopsis "Backport of configparser from python 3.5")
11595 (description "@code{python-configparser} is a backport of
11596 @code{configparser} from Python 3.5 so that it can be used directly
11597 in other versions.")
11598 (license license:expat)))
11599
11600 (define-public python2-configparser
11601 (package-with-python2 python-configparser))
11602
11603 (define-public python-mando
11604 (package
11605 (name "python-mando")
11606 (version "0.6.4")
11607 (source (origin
11608 (method url-fetch)
11609 (uri (pypi-uri "mando" version))
11610 (sha256
11611 (base32
11612 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
11613 (build-system python-build-system)
11614 (propagated-inputs
11615 `(("python-rst2ansi" ,python-rst2ansi)
11616 ("python-six" ,python-six)))
11617 (native-inputs
11618 `(("python-pytest" ,python-pytest)))
11619 (home-page "https://mando.readthedocs.org/")
11620 (synopsis
11621 "Wrapper around argparse, allowing creation of complete CLI applications")
11622 (description
11623 "This package is a wrapper around argparse, allowing you to write complete CLI
11624 applications in seconds while maintaining all the flexibility.")
11625 (license license:expat)))
11626
11627 (define-public python2-mando
11628 (package-with-python2 python-mando))
11629
11630 (define-public python-fudge
11631 (package
11632 (name "python-fudge")
11633 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
11634 ;; package, which is currently the only use of this package.
11635 (version "0.9.6")
11636 (source
11637 (origin
11638 (method url-fetch)
11639 (uri (pypi-uri "fudge" version))
11640 (sha256
11641 (base32
11642 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
11643 (build-system python-build-system)
11644 (arguments
11645 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
11646 (home-page "https://github.com/fudge-py/fudge")
11647 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
11648 (description
11649 "Fudge is a Python module for using fake objects (mocks and stubs) to
11650 test real ones.
11651
11652 In readable Python code, you declare the methods available on your fake object
11653 and how they should be called. Then you inject that into your application and
11654 start testing. This declarative approach means you don’t have to record and
11655 playback actions and you don’t have to inspect your fakes after running code.
11656 If the fake object was used incorrectly then you’ll see an informative
11657 exception message with a traceback that points to the culprit.")
11658 (license license:expat)))
11659
11660 (define-public python2-fudge
11661 (package-with-python2 python-fudge))
11662
11663 (define-public python-mwclient
11664 (package
11665 (name "python-mwclient")
11666 (version "0.8.4")
11667 (source
11668 (origin
11669 (method url-fetch)
11670 ;; The PyPI version wouldn't contain tests.
11671 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
11672 "v" version ".tar.gz"))
11673 (file-name (string-append name "-" version ".tar.gz"))
11674 (sha256
11675 (base32
11676 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
11677 (build-system python-build-system)
11678 (propagated-inputs
11679 `(("python-requests" ,python-requests)
11680 ("python-requests-oauthlib"
11681 ,python-requests-oauthlib)
11682 ("python-six" ,python-six)))
11683 (native-inputs
11684 `(("python-mock" ,python-mock)
11685 ("python-pytest" ,python-pytest)
11686 ("python-pytest-pep8" ,python-pytest-pep8)
11687 ("python-pytest-cache" ,python-pytest-cache)
11688 ("python-pytest-cov" ,python-pytest-cov)
11689 ("python-responses" ,python-responses)))
11690 (home-page "https://github.com/btongminh/mwclient")
11691 (synopsis "MediaWiki API client")
11692 (description "This package provides a MediaWiki API client.")
11693 (license license:expat)))
11694
11695 (define-public python2-mwclient
11696 (package-with-python2 python-mwclient))
11697
11698 (define-public python-utils
11699 (package
11700 (name "python-utils")
11701 (version "2.1.0")
11702 (source (origin
11703 (method url-fetch)
11704 (uri (pypi-uri "python-utils" version))
11705 (sha256
11706 (base32
11707 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
11708 (build-system python-build-system)
11709 (native-inputs
11710 `(("pytest-runner" ,python-pytest-runner)
11711 ("pytest" ,python-pytest)
11712 ("six" ,python-six)))
11713 (home-page "https://github.com/WoLpH/python-utils")
11714 (synopsis "Convenient utilities not included with the standard Python install")
11715 (description
11716 "Python Utils is a collection of small Python functions and classes which
11717 make common patterns shorter and easier.")
11718 (license license:bsd-2)))
11719
11720 (define-public python2-utils
11721 (package-with-python2 python-utils))
11722
11723 (define-public python-sphinx-me
11724 (package
11725 (name "python-sphinx-me")
11726 (version "0.3")
11727 (source
11728 (origin
11729 (method url-fetch)
11730 (uri (pypi-uri "sphinx-me" version))
11731 (sha256
11732 (base32
11733 "06jzgp213zihnvpcy2y5jy3ykid3apc2ncp2pg6a2g05lhiziglq"))))
11734 (build-system python-build-system)
11735 (home-page "https://github.com/stephenmcd/sphinx-me")
11736 (synopsis "Create a Sphinx documentation shell")
11737 (description
11738 "Create a Sphinx documentation shell for your project and include the
11739 README file as the documentation index. It handles extracting the required
11740 meta data such as the project name, author and version from your project for
11741 use in your Sphinx docs.")
11742 (license license:bsd-2)))
11743
11744 (define-public python2-sphinx-me
11745 (package-with-python2 python-sphinx-me))
11746
11747 (define-public python-diff-match-patch
11748 (package
11749 (name "python-diff-match-patch")
11750 (version "20121119")
11751 (source
11752 (origin
11753 (method url-fetch)
11754 (uri (pypi-uri "diff-match-patch" version))
11755 (sha256
11756 (base32
11757 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
11758 (build-system python-build-system)
11759 (home-page "https://code.google.com/p/google-diff-match-patch")
11760 (synopsis "Synchronize plain text")
11761 (description "Diff Match and Patch libraries offer robust algorithms to
11762 perform the operations required for synchronizing plain text.")
11763 (license license:asl2.0)))
11764
11765 (define-public python2-diff-match-patch
11766 (package-with-python2 python-diff-match-patch))
11767
11768 (define-public python-dirsync
11769 (package
11770 (name "python-dirsync")
11771 (version "2.2.3")
11772 (source
11773 (origin
11774 (method url-fetch)
11775 (uri (pypi-uri "dirsync" version))
11776 (sha256
11777 (base32
11778 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
11779 (build-system python-build-system)
11780 (propagated-inputs
11781 `(("six" ,python-six)))
11782 (home-page "https://bitbucket.org/tkhyn/dirsync")
11783 (synopsis "Advanced directory tree synchronisation tool")
11784 (description "Advanced directory tree synchronisation tool.")
11785 (license license:expat)))
11786
11787 (define-public python2-dirsync
11788 (package-with-python2 python-dirsync))
11789
11790 (define-public python-levenshtein
11791 (package
11792 (name "python-levenshtein")
11793 (version "0.12.0")
11794 (source
11795 (origin
11796 (method url-fetch)
11797 (uri (pypi-uri "python-Levenshtein" version))
11798 (sha256
11799 (base32
11800 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
11801 (build-system python-build-system)
11802 (home-page "https://github.com/ztane/python-Levenshtein")
11803 (synopsis "Fast computation of Levenshtein distance and string similarity")
11804 (description
11805 "The Levenshtein Python C extension module contains functions for fast computation of
11806 @enumerate
11807 @item Levenshtein (edit) distance, and edit operations
11808 @item string similarity
11809 @item approximate median strings, and generally string averaging
11810 @item string sequence and set similarity
11811 @end enumerate
11812 It supports both normal and Unicode strings.")
11813 (license license:gpl2+)))
11814
11815 (define-public python2-levenshtein
11816 (package-with-python2 python-levenshtein))
11817
11818 (define-public python-scandir
11819 (package
11820 (name "python-scandir")
11821 (version "1.9.0")
11822 (source
11823 (origin
11824 (method url-fetch)
11825 (uri (pypi-uri "scandir" version))
11826 (sha256
11827 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
11828 (build-system python-build-system)
11829 (arguments
11830 `(#:phases (modify-phases %standard-phases
11831 (replace 'check
11832 (lambda _
11833 (invoke "python" "test/run_tests.py"))))))
11834 (home-page "https://github.com/benhoyt/scandir")
11835 (synopsis "Directory iteration function")
11836 (description
11837 "Directory iteration function like os.listdir(), except that instead of
11838 returning a list of bare filenames, it yields DirEntry objects that include
11839 file type and stat information along with the name. Using scandir() increases
11840 the speed of os.walk() by 2-20 times (depending on the platform and file
11841 system) by avoiding unnecessary calls to os.stat() in most cases.
11842
11843 This package is part of the Python standard library since version 3.5.")
11844 (license license:bsd-3)))
11845
11846 (define-public python2-scandir
11847 (package-with-python2 python-scandir))
11848
11849 (define-public python2-stemming
11850 (package
11851 (name "python2-stemming")
11852 (version "1.0.1")
11853 (source
11854 (origin
11855 (method url-fetch)
11856 (uri (pypi-uri "stemming" version))
11857 (sha256
11858 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
11859 (build-system python-build-system)
11860 (arguments
11861 `(#:python ,python-2))
11862 (home-page "https://bitbucket.org/mchaput/stemming/overview")
11863 (synopsis "Python implementations of various stemming algorithms")
11864 (description
11865 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
11866 stemming algorithms for English. These implementations are straightforward and
11867 efficient, unlike some Python versions of the same algorithms available on the
11868 Web. This package is an extraction of the stemming code included in the Whoosh
11869 search engine.")
11870 (license license:public-domain)))
11871
11872 (define-public python-factory-boy
11873 (package
11874 (name "python-factory-boy")
11875 (version "2.8.1")
11876 (source
11877 (origin
11878 (method url-fetch)
11879 (uri (pypi-uri "factory_boy" version))
11880 (sha256
11881 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
11882 (build-system python-build-system)
11883 (arguments
11884 ;; Tests are not included in the tarball.
11885 `(#:tests? #f))
11886 (propagated-inputs
11887 `(("faker" ,python-faker)))
11888 (home-page "https://github.com/benhoyt/scandir")
11889 (synopsis "Versatile test fixtures replacement")
11890 (description
11891 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
11892
11893 As a fixtures replacement tool, it aims to replace static, hard to maintain
11894 fixtures with easy-to-use factories for complex object.
11895
11896 Instead of building an exhaustive test setup with every possible combination
11897 of corner cases, factory_boy allows you to use objects customized for the
11898 current test, while only declaring the test-specific fields")
11899 (license license:expat)))
11900
11901 (define-public python2-factory-boy
11902 (package-with-python2 python-factory-boy))
11903
11904 (define-public python-translate-toolkit
11905 (package
11906 (name "python-translate-toolkit")
11907 (version "2.1.0")
11908 (source
11909 (origin
11910 (method url-fetch)
11911 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
11912 (sha256
11913 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
11914 (build-system python-build-system)
11915 (native-inputs
11916 `(("python-pytest" ,python-pytest)
11917 ("python-sphinx" ,python-sphinx)))
11918 (propagated-inputs
11919 `(("python-babel" ,python-babel)
11920 ("python-beautifulsoup4" ,python-beautifulsoup4)
11921 ("python-chardet" ,python-chardet)
11922 ("python-diff-match-patch" ,python-diff-match-patch)
11923 ("python-levenshtein" ,python-levenshtein)
11924 ("python-lxml" ,python-lxml)
11925 ("python-six" ,python-six)
11926 ("python-vobject" ,python-vobject)
11927 ("python-pyyaml" ,python-pyyaml)))
11928 (arguments
11929 ;; TODO: tests are not run, because they end with
11930 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
11931 ;; 'parse_funcs'
11932 ;; during test setup.
11933 `(#:tests? #f))
11934 (home-page "http://toolkit.translatehouse.org")
11935 (synopsis "Tools and API for translation and localization engineering")
11936 (description
11937 "Tools and API for translation and localization engineering. It contains
11938 several utilities, as well as an API for building localization tools.")
11939 (license license:gpl2+)))
11940
11941 (define-public python2-translate-toolkit
11942 (package-with-python2 python-translate-toolkit))
11943
11944 (define-public python-packaging
11945 (package
11946 (name "python-packaging")
11947 (version "18.0")
11948 (source
11949 (origin
11950 (method url-fetch)
11951 (uri (pypi-uri "packaging" version))
11952 (sha256
11953 (base32
11954 "01wq9c53ix5rz6qg2c98gy8n4ff768rmanifm8m5jpjiaizj51h8"))))
11955 (build-system python-build-system)
11956 (arguments
11957 `(#:phases (modify-phases %standard-phases
11958 (replace 'check
11959 (lambda _ (invoke "py.test" "-vv"))))))
11960 (native-inputs
11961 `(("python-pretend" ,python-pretend)
11962 ("python-pytest" ,python-pytest)))
11963 (propagated-inputs
11964 `(("python-pyparsing" ,python-pyparsing)
11965 ("python-six" ,python-six)))
11966 (home-page "https://github.com/pypa/packaging")
11967 (synopsis "Core utilities for Python packages")
11968 (description "Packaging is a Python module for dealing with Python packages.
11969 It offers an interface for working with package versions, names, and dependency
11970 information.")
11971 ;; From 'LICENSE': This software is made available under the terms of
11972 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
11973 ;; Contributions to this software is made under the terms of *both* these
11974 ;; licenses.
11975 (license (list license:asl2.0 license:bsd-2))))
11976
11977 (define-public python2-packaging
11978 (package-with-python2 python-packaging))
11979
11980 (define-public python-relatorio
11981 (package
11982 (name "python-relatorio")
11983 (version "0.8.0")
11984 (source
11985 (origin
11986 (method url-fetch)
11987 (uri (pypi-uri "relatorio" version))
11988 (sha256
11989 (base32
11990 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
11991 (build-system python-build-system)
11992 (propagated-inputs
11993 `(("python-lxml" ,python-lxml)
11994 ("python-genshi" ,python-genshi)))
11995 (native-inputs
11996 `(("python-magic" ,python-magic)))
11997 (home-page "https://relatorio.tryton.org/")
11998 (synopsis "Templating library able to output ODT and PDF files")
11999 (description "Relatorio is a templating library which provides a way to
12000 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
12001 for more filetypes can be easily added by creating plugins for them.")
12002 (license license:gpl3+)))
12003
12004 (define-public python2-relatorio
12005 (package-with-python2 python-relatorio))
12006
12007 (define-public python-radon
12008 (package
12009 (name "python-radon")
12010 (version "2.2.0")
12011 (source
12012 (origin
12013 (method url-fetch)
12014 (uri (pypi-uri "radon" version))
12015 (sha256
12016 (base32
12017 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
12018 (build-system python-build-system)
12019 (arguments
12020 `(#:phases (modify-phases %standard-phases
12021 (replace 'check
12022 (lambda _
12023 (invoke "python" "radon/tests/run.py"))))))
12024 (propagated-inputs
12025 `(("python-colorama" ,python-colorama)
12026 ("python-flake8-polyfill" ,python-flake8-polyfill)
12027 ("python-mando" ,python-mando)))
12028 (native-inputs
12029 `(("python-pytest" ,python-pytest)
12030 ("python-pytest-mock" ,python-pytest-mock)))
12031 (home-page "https://radon.readthedocs.org/")
12032 (synopsis "Code Metrics in Python")
12033 (description "Radon is a Python tool which computes various code metrics.
12034 Supported metrics are:
12035 @itemize @bullet
12036 @item raw metrics: SLOC, comment lines, blank lines, &c.
12037 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
12038 @item Halstead metrics (all of them)
12039 @item the Maintainability Index (a Visual Studio metric)
12040 @end itemize")
12041 (license license:expat)))
12042
12043 (define-public python2-radon
12044 (package-with-python2 python-radon))
12045
12046 (define-public python-sure
12047 (package
12048 (name "python-sure")
12049 (version "1.4.11")
12050 (source
12051 (origin
12052 (method url-fetch)
12053 (uri (pypi-uri "sure" version))
12054 (sha256
12055 (base32
12056 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
12057 (build-system python-build-system)
12058 (propagated-inputs
12059 `(("python-mock" ,python-mock)
12060 ("python-six" ,python-six)))
12061 (native-inputs
12062 `(("python-nose" ,python-nose)))
12063 (home-page "https://github.com/gabrielfalcao/sure")
12064 (synopsis "Automated testing library in python for python")
12065 (description
12066 "Sure is a python library that leverages a DSL for writing assertions.
12067 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
12068 (license license:gpl3+)))
12069
12070 (define-public python2-sure
12071 (package-with-python2 python-sure))
12072
12073 (define-public python2-couleur
12074 ;; This package does not seem to support python3 at all, hence,
12075 ;; only the python2 variant definition is provided.
12076 (package
12077 (name "python2-couleur")
12078 (version "0.6.2")
12079 (source
12080 (origin
12081 (method url-fetch)
12082 (uri (pypi-uri "couleur" version))
12083 (sha256
12084 (base32
12085 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
12086 (build-system python-build-system)
12087 (arguments
12088 `(#:python ,python-2))
12089 (home-page "https://github.com/gabrielfalcao/couleur")
12090 (synopsis
12091 "ANSI terminal tool for python, colored shell and other handy fancy features")
12092 (description
12093 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
12094 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
12095 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
12096 ;; https://github.com/gabrielfalcao/couleur/issues/11
12097 (license license:lgpl3+)))
12098
12099 (define-public python-misaka
12100 (package
12101 (name "python-misaka")
12102 (version "2.1.0")
12103 (source
12104 (origin
12105 (method url-fetch)
12106 (uri (pypi-uri "misaka" version))
12107 (sha256
12108 (base32
12109 "1yqrq3a5rracirmvk52n28nn6ckdaz897gnigv89a9gmyn87sqw7"))))
12110 (build-system python-build-system)
12111 (arguments
12112 `(;; Line 37 of setup.py calls self.run_command('develop')
12113 ;; in the 'check' phase. This command seems to be trying
12114 ;; to write to
12115 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
12116 ;; for which it does not have the permission to write.
12117 #:tests? #f))
12118 (propagated-inputs
12119 `(("python-cffi" ,python-cffi)))
12120 (home-page "https://github.com/FSX/misaka")
12121 (synopsis "Python binding for Hoedown")
12122 (description
12123 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
12124 library written in C. It features a fast HTML renderer and functionality to make custom
12125 renderers (e.g. man pages or LaTeX).")
12126 (license license:expat)))
12127
12128 (define-public python2-misaka
12129 (package-with-python2 python-misaka))
12130
12131 (define-public python2-steadymark
12132 ;; This is forced into being a python2 only variant
12133 ;; due to its dependence on couleur that has no support
12134 ;; for python3
12135 (package
12136 (name "python2-steadymark")
12137 (version "0.7.3")
12138 (source
12139 (origin
12140 (method url-fetch)
12141 (uri (pypi-uri "steadymark" version))
12142 (sha256
12143 (base32
12144 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
12145 (build-system python-build-system)
12146 (native-inputs
12147 `(("python-couleur" ,python2-couleur)
12148 ("python-sure" ,python2-sure)
12149 ("python-misaka" ,python2-misaka)))
12150 (arguments
12151 `(#:python ,python-2
12152 #:phases
12153 (modify-phases %standard-phases
12154 (add-before 'build 'patch-setup-py
12155 (lambda _
12156 ;; Update requirements from dependency==version
12157 ;; to dependency>=version
12158 (substitute* "setup.py"
12159 (("==") ">="))
12160 #t)))))
12161 (home-page "https://github.com/gabrielfalcao/steadymark")
12162 (synopsis "Markdown-based test runner for python")
12163 (description
12164 "@code{Steadymark} allows documentation to be written in github-flavoured
12165 markdown. The documentation may contain snippets of code surrounded by python
12166 code blocks and @code{Steadymark} will find these snippets and run them, making
12167 sure that there are no old malfunctional examples in the documentation examples.")
12168 (license license:expat)))
12169
12170 (define-public python-jsonpointer
12171 (package
12172 (name "python-jsonpointer")
12173 (version "1.10")
12174 (source
12175 (origin
12176 (method url-fetch)
12177 (uri (pypi-uri "jsonpointer" version))
12178 (sha256
12179 (base32
12180 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
12181 (build-system python-build-system)
12182 (home-page "https://github.com/stefankoegl/python-json-pointer")
12183 (synopsis "Identify specific nodes in a JSON document")
12184 (description "@code{jsonpointer} allows you to access specific nodes
12185 by path in a JSON document (see RFC 6901).")
12186 (license license:bsd-3)))
12187
12188 (define-public python2-jsonpointer
12189 (package-with-python2 python-jsonpointer))
12190
12191 (define-public python-jsonpatch
12192 (package
12193 (name "python-jsonpatch")
12194 (version "1.16")
12195 (source
12196 (origin
12197 (method url-fetch)
12198 ;; pypi version lacks tests.js
12199 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12200 "archive/v" version ".tar.gz"))
12201 (file-name (string-append name "-" version ".tar.gz"))
12202 (sha256
12203 (base32
12204 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
12205 (build-system python-build-system)
12206 (native-inputs
12207 `(("python-jsonpointer" ,python-jsonpointer)))
12208 (home-page "https://github.com/stefankoegl/python-json-patch")
12209 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
12210 (description "@code{jsonpatch} is a library and program that allows
12211 applying JSON Patches according to RFC 6902.")
12212 (license license:bsd-3)))
12213
12214 (define-public python2-jsonpatch
12215 (package-with-python2 python-jsonpatch))
12216
12217 (define-public python-jsonpatch-0.4
12218 (package (inherit python-jsonpatch)
12219 (name "python-jsonpatch")
12220 (version "0.4")
12221 (source
12222 (origin
12223 (method url-fetch)
12224 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12225 "archive/v" version ".tar.gz"))
12226 (file-name (string-append name "-" version ".tar.gz"))
12227 (sha256
12228 (base32
12229 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
12230
12231 (define-public python2-jsonpatch-0.4
12232 (package-with-python2 python-jsonpatch-0.4))
12233
12234 (define-public python-rfc3986
12235 (package
12236 (name "python-rfc3986")
12237 (version "1.1.0")
12238 (source (origin
12239 (method url-fetch)
12240 (uri (pypi-uri "rfc3986" version))
12241 (sha256
12242 (base32
12243 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
12244 (build-system python-build-system)
12245 (arguments
12246 `(#:modules ((guix build utils)
12247 (guix build python-build-system)
12248 (ice-9 ftw)
12249 (srfi srfi-1)
12250 (srfi srfi-26))
12251 #:phases
12252 (modify-phases %standard-phases
12253 (replace 'check
12254 (lambda _
12255 (let ((cwd (getcwd)))
12256 (setenv "PYTHONPATH"
12257 (string-append cwd "/build/"
12258 (find (cut string-prefix? "lib" <>)
12259 (scandir (string-append cwd "/build")))
12260 ":"
12261 (getenv "PYTHONPATH")))
12262 (invoke "pytest" "-v")))))))
12263 (native-inputs
12264 `(("python-pytest" ,python-pytest)))
12265 (home-page "https://rfc3986.readthedocs.io/")
12266 (synopsis "Parse and validate URI references")
12267 (description
12268 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
12269 validation and authority parsing. This module also supports RFC@tie{}6874
12270 which adds support for zone identifiers to IPv6 addresses.")
12271 (license license:asl2.0)))
12272
12273 (define-public python2-rfc3986
12274 (package-with-python2 python-rfc3986))
12275
12276 (define-public python-rfc3987
12277 (package
12278 (name "python-rfc3987")
12279 (version "1.3.7")
12280 (source
12281 (origin
12282 (method url-fetch)
12283 (uri (pypi-uri "rfc3987" version))
12284 (sha256
12285 (base32
12286 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
12287 (build-system python-build-system)
12288 (home-page "https://pypi.python.org/pypi/rfc3987")
12289 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
12290 (description "@code{rfc3987} provides routines for parsing and
12291 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
12292 (license license:gpl3+)))
12293
12294 (define-public python2-rfc3987
12295 (package-with-python2 python-rfc3987))
12296
12297 (define-public python-validate-email
12298 (package
12299 (name "python-validate-email")
12300 (version "1.3")
12301 (source
12302 (origin
12303 (method url-fetch)
12304 (uri (pypi-uri "validate_email" version))
12305 (sha256
12306 (base32
12307 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
12308 (build-system python-build-system)
12309 (home-page "https://github.com/syrusakbary/validate_email")
12310 (synopsis "Verifies if an email address is valid and really exists")
12311 (description "@code{validate_email} can be used to verify if an email
12312 address is valid and really exists.")
12313 (license license:lgpl3+)))
12314
12315 (define-public python2-validate-email
12316 (package-with-python2 python-validate-email))
12317
12318 (define-public python-flex
12319 (package
12320 (name "python-flex")
12321 (version "6.10.0")
12322 (source
12323 (origin
12324 (method url-fetch)
12325 (uri (pypi-uri "flex" version))
12326 (sha256
12327 (base32
12328 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
12329 (build-system python-build-system)
12330 (propagated-inputs
12331 `(("python-click" ,python-click)
12332 ("python-iso8601" ,python-iso8601)
12333 ("python-jsonpointer" ,python-jsonpointer)
12334 ("python-pyyaml" ,python-pyyaml)
12335 ("python-requests" ,python-requests)
12336 ("python-rfc3987" ,python-rfc3987)
12337 ("python-six" ,python-six)
12338 ("python-validate-email" ,python-validate-email)))
12339 (home-page "https://github.com/pipermerriam/flex")
12340 (synopsis "Validates Swagger schemata")
12341 (description "@code{flex} can be used to validate Swagger schemata.")
12342 (license license:bsd-3)))
12343
12344 (define-public python2-flex
12345 (package-with-python2 python-flex))
12346
12347 (define-public python-marshmallow
12348 (package
12349 (name "python-marshmallow")
12350 (version "3.0.0b14")
12351 (source
12352 (origin
12353 (method url-fetch)
12354 (uri (pypi-uri "marshmallow" version))
12355 (sha256
12356 (base32
12357 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
12358 (build-system python-build-system)
12359 (propagated-inputs
12360 `(("python-dateutil" ,python-dateutil)
12361 ("python-simplejson" ,python-simplejson)))
12362 (native-inputs
12363 `(("python-pytest" ,python-pytest)
12364 ("python-pytz" ,python-pytz)))
12365 (home-page "https://github.com/marshmallow-code/marshmallow")
12366 (synopsis "Convert complex datatypes to and from native
12367 Python datatypes.")
12368 (description "@code{marshmallow} provides a library for converting
12369 complex datatypes to and from native Python datatypes.")
12370 (license license:expat)))
12371
12372 (define-public python2-marshmallow
12373 (package-with-python2 python-marshmallow))
12374
12375 (define-public python-apispec
12376 (package
12377 (name "python-apispec")
12378 (version "0.25.3")
12379 (source
12380 (origin
12381 (method url-fetch)
12382 (uri (pypi-uri "apispec" version))
12383 (sha256
12384 (base32
12385 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
12386 (build-system python-build-system)
12387 (propagated-inputs
12388 `(("python-pyyaml" ,python-pyyaml)))
12389 (native-inputs
12390 `(("python-pytest" ,python-pytest)
12391 ("python-flask" ,python-flask)
12392 ("python-marshmallow" ,python-marshmallow)
12393 ("python-tornado" ,python-tornado)
12394 ("python-bottle" ,python-bottle)
12395 ("python-mock" ,python-mock)))
12396 (home-page "https://github.com/marshmallow-code/apispec")
12397 (synopsis "Swagger 2.0 API specification generator")
12398 (description "@code{python-apispec} is a pluggable API specification
12399 generator. Currently supports the OpenAPI specification (f.k.a.
12400 Swagger 2.0).")
12401 (license license:expat)))
12402
12403 (define-public python2-apispec
12404 (package-with-python2 python-apispec))
12405
12406 (define-public python-flasgger
12407 (package
12408 (name "python-flasgger")
12409 (version "0.6.3")
12410 (source
12411 (origin
12412 (method url-fetch)
12413 (uri (string-append "https://github.com/rochacbruno/flasgger/archive/"
12414 version ".tar.gz"))
12415 (file-name (string-append name "-" version ".tar.gz"))
12416 (sha256
12417 (base32
12418 "1gqzlm0rb55fdpsy5ipkganlx9cnpi454fqyycr03jm22zql14ay"))))
12419 (build-system python-build-system)
12420 (arguments
12421 `(#:phases
12422 (modify-phases %standard-phases
12423 (replace 'check
12424 (lambda* (#:key inputs outputs #:allow-other-keys)
12425 (substitute* "Makefile"
12426 (("flake8 flasgger --ignore=F403")
12427 "flake8 flasgger --ignore=E731,F403"))
12428 (setenv "PYTHONPATH" (string-append (getcwd)
12429 ":"
12430 (getenv "PYTHONPATH")))
12431 (invoke "py.test"))))))
12432 (propagated-inputs
12433 `(("python-flask" ,python-flask)
12434 ("python-pyyaml" ,python-pyyaml)
12435 ("python-jsonschema" ,python-jsonschema)
12436 ("python-mistune" ,python-mistune)
12437 ("python-six" ,python-six)))
12438 (native-inputs
12439 `(("python-decorator" ,python-decorator)
12440 ("python-flake8" ,python-flake8)
12441 ("python-flask-restful" ,python-flask-restful)
12442 ("python-flex" ,python-flex)
12443 ("python-pytest" ,python-pytest)
12444 ("python-pytest-cov" ,python-pytest-cov)
12445 ("python-marshmallow" ,python-marshmallow)
12446 ("python-apispec" ,python-apispec)))
12447 (home-page "https://github.com/rochacbruno/flasgger/")
12448 (synopsis "Extract Swagger specs from your Flask project")
12449 (description "@code{python-flasgger} allows extracting Swagger specs
12450 from your Flask project. It is a fork of Flask-Swagger.")
12451 (license license:expat)))
12452
12453 (define-public python2-flasgger
12454 (package-with-python2 python-flasgger))
12455
12456 (define-public python-swagger-spec-validator
12457 (package
12458 (name "python-swagger-spec-validator")
12459 (version "2.1.0")
12460 (source
12461 (origin
12462 (method url-fetch)
12463 (uri (pypi-uri "swagger-spec-validator" version))
12464 (sha256
12465 (base32
12466 "13hkpn2lycwr0468yqhjb3kwszqf7hjwlq61w7vdxq1caz31k4nw"))))
12467 (build-system python-build-system)
12468 (propagated-inputs
12469 `(("python-jsonschema" ,python-jsonschema)
12470 ("python-six" ,python-six)))
12471 (home-page
12472 "https://github.com/Yelp/swagger_spec_validator")
12473 (synopsis "Validation of Swagger specifications")
12474 (description "@code{swagger_spec_validator} provides a library for
12475 validating Swagger API specifications.")
12476 (license license:asl2.0)))
12477
12478 (define-public python2-swagger-spec-validator
12479 (package-with-python2 python-swagger-spec-validator))
12480
12481 (define-public python-apache-libcloud
12482 (package
12483 (name "python-apache-libcloud")
12484 (version "2.4.0")
12485 (source
12486 (origin
12487 (method url-fetch)
12488 (uri (pypi-uri "apache-libcloud" version))
12489 (sha256
12490 (base32
12491 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
12492 (build-system python-build-system)
12493 (arguments
12494 `(#:phases
12495 (modify-phases %standard-phases
12496 (add-after 'unpack 'patch-ssh
12497 (lambda* (#:key inputs #:allow-other-keys)
12498 (substitute* "libcloud/compute/ssh.py"
12499 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
12500 "/bin/ssh" "'")))
12501 #t))
12502 (add-after 'unpack 'patch-tests
12503 (lambda _
12504 (substitute* "./libcloud/test/test_file_fixtures.py"
12505 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
12506 (("def _ascii") "def _raw_data(self, method, url, body, headers):
12507 return (httplib.OK,
12508 \"1234abcd\",
12509 {\"test\": \"value\"},
12510 httplib.responses[httplib.OK])
12511 def _ascii"))
12512 (substitute* "libcloud/test/compute/test_ssh_client.py"
12513 (("class ShellOutSSHClientTests")
12514 "@unittest.skip(\"Guix container doesn't have ssh service\")
12515 class ShellOutSSHClientTests")
12516 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
12517 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
12518 (("'.xF0', '.x90', '.x8D', '.x88'")
12519 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
12520 #t))
12521 (add-before 'check 'copy-secret
12522 (lambda _
12523 (copy-file "libcloud/test/secrets.py-dist"
12524 "libcloud/test/secrets.py")
12525 #t)))))
12526 (inputs
12527 `(("openssh" ,openssh)))
12528 (propagated-inputs
12529 `(("python-paramiko" ,python-paramiko)
12530 ("python-requests" ,python-requests)))
12531 (native-inputs
12532 `(("python-lockfile" ,python-lockfile)
12533 ("python-mock" ,python-mock)
12534 ("python-pytest" ,python-pytest)
12535 ("python-pytest-runner" ,python-pytest-runner)
12536 ("python-requests-mock" ,python-requests-mock)))
12537 (home-page "https://libcloud.apache.org/")
12538 (synopsis "Unified Cloud API")
12539 (description "@code{libcloud} is a Python library for interacting with
12540 many of the popular cloud service providers using a unified API.")
12541 (license license:asl2.0)))
12542
12543 (define-public python2-apache-libcloud
12544 (package-with-python2 python-apache-libcloud))
12545
12546 (define-public python-smmap2
12547 (package
12548 (name "python-smmap2")
12549 (version "2.0.3")
12550 (source
12551 (origin
12552 (method url-fetch)
12553 (uri (pypi-uri "smmap2" version))
12554 (sha256
12555 (base32
12556 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
12557 (build-system python-build-system)
12558 (native-inputs
12559 `(("python-nosexcover" ,python-nosexcover)))
12560 (home-page "https://github.com/Byron/smmap")
12561 (synopsis "Python sliding window memory map manager")
12562 (description "@code{smmap2} is a pure Python implementation of a sliding
12563 window memory map manager.")
12564 (license license:bsd-3)))
12565
12566 (define-public python2-smmap2
12567 (package-with-python2 python-smmap2))
12568
12569 (define-public python-regex
12570 (package
12571 (name "python-regex")
12572 (version "2017.06.07")
12573 (source (origin
12574 (method url-fetch)
12575 (uri (pypi-uri "regex" version))
12576 (sha256
12577 (base32
12578 "06r6b7yigikbj3a72whl85r2b64pj1r0ypmw9yalmkm0wnxq8mz4"))))
12579 (build-system python-build-system)
12580 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
12581 (synopsis "Alternative regular expression module")
12582 (description "This regular expression implementation is backwards-
12583 compatible with the standard @code{re} module, but offers additional
12584 functionality like full case-folding for case-insensitive matches in Unicode.")
12585 (license license:psfl)))
12586
12587 (define-public python2-regex
12588 (package-with-python2 python-regex))
12589
12590 (define-public python2-pyopengl
12591 (package
12592 (name "python2-pyopengl")
12593 (version "3.1.0")
12594 (source
12595 (origin
12596 (method url-fetch)
12597 (uri (pypi-uri "PyOpenGL" version))
12598 (sha256
12599 (base32
12600 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
12601 (arguments
12602 `(#:python ,python-2))
12603 (build-system python-build-system)
12604 (home-page "http://pyopengl.sourceforge.net")
12605 (synopsis "Standard OpenGL bindings for Python")
12606 (description
12607 "PyOpenGL is the most common cross platform Python binding to OpenGL and
12608 related APIs. The binding is created using the standard @code{ctypes}
12609 library.")
12610 (license license:bsd-3)))
12611
12612 (define-public python2-pyopengl-accelerate
12613 (package
12614 (inherit python2-pyopengl)
12615 (name "python2-pyopengl-accelerate")
12616 (version "3.1.0")
12617 (source
12618 (origin
12619 (method url-fetch)
12620 (uri (pypi-uri "PyOpenGL-accelerate" version))
12621 (sha256
12622 (base32
12623 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
12624 (synopsis "Acceleration code for PyOpenGL")
12625 (description
12626 "This is the Cython-coded accelerator module for PyOpenGL.")))
12627
12628 (define-public python-rencode
12629 (package
12630 (name "python-rencode")
12631 (version "1.0.5")
12632 (source
12633 (origin
12634 (method url-fetch)
12635 (uri (pypi-uri "rencode" version))
12636 (sha256
12637 (base32
12638 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
12639 (build-system python-build-system)
12640 (arguments
12641 `(#:phases
12642 (modify-phases %standard-phases
12643 (add-before 'check 'delete-bogus-test
12644 ;; This test requires /home/aresch/Downloads, which is not provided by
12645 ;; the build environment.
12646 (lambda _
12647 (delete-file "rencode/t.py")
12648 #t)))))
12649 (native-inputs `(("pkg-config" ,pkg-config)
12650 ("python-cython" ,python-cython)))
12651 (home-page "https://github.com/aresch/rencode")
12652 (synopsis "Serialization of heterogeneous data structures")
12653 (description
12654 "The @code{rencode} module is a data structure serialization library,
12655 similar to @code{bencode} from the BitTorrent project. For complex,
12656 heterogeneous data structures with many small elements, r-encoding stake up
12657 significantly less space than b-encodings. This version of rencode is a
12658 complete rewrite in Cython to attempt to increase the performance over the
12659 pure Python module.")
12660 (license license:bsd-3)))
12661
12662 (define-public python2-rencode
12663 (package-with-python2 python-rencode))
12664
12665 (define-public python-xenon
12666 (package
12667 (name "python-xenon")
12668 (version "0.5.4")
12669 (source
12670 (origin
12671 (method url-fetch)
12672 (uri (pypi-uri "xenon" version))
12673 (sha256
12674 (base32
12675 "029cbhysg2vr5n4jz8gpg2793f8wkwnqpr1qgv6c1dn685vy31mc"))))
12676 (build-system python-build-system)
12677 (native-inputs
12678 `(("python-pyyaml" ,python-pyyaml)
12679 ("python-radon" ,python-radon)
12680 ("python-requests" ,python-requests)
12681 ("python-flake8" ,python-flake8)
12682 ("python-tox" ,python-tox)))
12683 (arguments
12684 `(#:phases
12685 (modify-phases %standard-phases
12686 (add-before 'build 'patch-test-requirements
12687 (lambda _
12688 ;; Remove httpretty dependency for tests.
12689 (substitute* "setup.py"
12690 (("httpretty") ""))
12691 #t)))))
12692 (home-page "https://xenon.readthedocs.org/")
12693 (synopsis "Monitor code metrics for Python on your CI server")
12694 (description
12695 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
12696 Ideally, @code{xenon} is run every time code is committed. Through command
12697 line options, various thresholds can be set for the complexity of code. It
12698 will fail (i.e. it will exit with a non-zero exit code) when any of these
12699 requirements is not met.")
12700 (license license:expat)))
12701
12702 (define-public python2-xenon
12703 (package-with-python2 python-xenon))
12704
12705 (define-public python-pysocks
12706 (package
12707 (name "python-pysocks")
12708 (version "1.6.8")
12709 (source
12710 (origin
12711 (method url-fetch)
12712 (uri (pypi-uri "PySocks" version))
12713 (sha256
12714 (base32
12715 "0wn6xafwy9c1gamwljw3fyvih5w19qy9xp39zmv8c90ai5ajrr9z"))))
12716 (build-system python-build-system)
12717 (arguments `(#:tests? #f))
12718 (home-page "https://github.com/Anorov/PySocks")
12719 (synopsis "SOCKS client module")
12720 (description "@code{pysocks} is an updated and semi-actively maintained
12721 version of @code{SocksiPy} with bug fixes and extra features.")
12722 (license license:bsd-3)))
12723
12724 (define-public python2-pysocks
12725 (package-with-python2 python-pysocks))
12726
12727 (define-public python-pydiff
12728 (package
12729 (name "python-pydiff")
12730 (version "0.2")
12731 (source
12732 (origin
12733 (method url-fetch)
12734 (uri (pypi-uri "pydiff" version))
12735 (sha256
12736 (base32
12737 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
12738 (build-system python-build-system)
12739 (home-page "https://github.com/myint/pydiff")
12740 (synopsis "Library to diff two Python files at the bytecode level")
12741 (description
12742 "@code{pydiff} makes it easy to look for actual code changes while
12743 ignoring formatting changes.")
12744 (license license:expat)))
12745
12746 (define-public python2-pydiff
12747 (package-with-python2 python-pydiff))
12748
12749 (define-public python-tqdm
12750 (package
12751 (name "python-tqdm")
12752 (version "4.19.6")
12753 (source
12754 (origin
12755 (method url-fetch)
12756 (uri (pypi-uri "tqdm" version))
12757 (sha256
12758 (base32
12759 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
12760 (build-system python-build-system)
12761 (native-inputs
12762 `(("python-flake8" ,python-flake8)
12763 ("python-nose" ,python-nose)
12764 ("python-coverage" ,python-coverage)))
12765 (home-page "https://github.com/tqdm/tqdm")
12766 (synopsis "Fast, extensible progress meter")
12767 (description
12768 "Make loops show a progress bar on the console by just wrapping any
12769 iterable with @code{|tqdm(iterable)|}. Offers many options to define
12770 design and layout.")
12771 (license (list license:mpl2.0 license:expat))))
12772
12773 (define-public python2-tqdm
12774 (package-with-python2 python-tqdm))
12775
12776 (define-public python-pkginfo
12777 (package
12778 (name "python-pkginfo")
12779 (version "1.4.2")
12780 (source
12781 (origin
12782 (method url-fetch)
12783 (uri (pypi-uri "pkginfo" version))
12784 (sha256
12785 (base32
12786 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
12787 (build-system python-build-system)
12788 (arguments
12789 ;; The tests are broken upstream.
12790 '(#:tests? #f))
12791 (home-page
12792 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
12793 (synopsis
12794 "Query metadatdata from sdists, bdists, and installed packages")
12795 (description
12796 "API to query the distutils metadata written in @file{PKG-INFO} inside a
12797 source distriubtion (an sdist) or a binary distribution (e.g., created by
12798 running bdist_egg). It can also query the EGG-INFO directory of an installed
12799 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
12800 created by running @code{python setup.py develop}).")
12801 (license license:expat)))
12802
12803 (define-public python2-pkginfo
12804 (package-with-python2 python-pkginfo))
12805
12806 (define-public python-twine
12807 (package
12808 (name "python-twine")
12809 (version "1.9.1")
12810 (source
12811 (origin
12812 (method url-fetch)
12813 (uri (pypi-uri "twine" version))
12814 (sha256
12815 (base32
12816 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
12817 (build-system python-build-system)
12818 (propagated-inputs
12819 `(("python-tqdm" ,python-tqdm)
12820 ("python-pkginfo" ,python-pkginfo)
12821 ("python-requests" ,python-requests)
12822 ("python-requests-toolbelt" ,python-requests-toolbelt)))
12823 (home-page "https://github.com/pypa/twine")
12824 (synopsis "Collection of utilities for interacting with PyPI")
12825 (description
12826 "@code{twine} currently supports registering projects and uploading
12827 distributions. It authenticates the user over HTTPS, allows them to pre-sign
12828 their files and supports any packaging format (including wheels).")
12829 (license license:asl2.0)))
12830
12831 (define-public python2-twine
12832 (package-with-python2 python-twine))
12833
12834 (define-public python-linecache2
12835 (package
12836 (name "python-linecache2")
12837 (version "1.0.0")
12838 (source
12839 (origin
12840 (method url-fetch)
12841 (uri (pypi-uri "linecache2" version))
12842 (sha256
12843 (base32
12844 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
12845 (build-system python-build-system)
12846 (arguments
12847 `(;; The tests depend on unittest2, and our version is a bit too old.
12848 #:tests? #f))
12849 (native-inputs
12850 `(("python-pbr" ,python-pbr-minimal)))
12851 (home-page
12852 "https://github.com/testing-cabal/linecache2")
12853 (synopsis "Backports of the linecache module")
12854 (description
12855 "The linecache module allows one to get any line from any file, while
12856 attempting to optimize internally, using a cache, the common case where many
12857 lines are read from a single file.")
12858 (license license:psfl)))
12859
12860 (define-public python2-linecache2
12861 (package-with-python2 python-linecache2))
12862
12863 (define-public python-traceback2
12864 (package
12865 (name "python-traceback2")
12866 (version "1.4.0")
12867 (source
12868 (origin
12869 (method url-fetch)
12870 (uri (pypi-uri "traceback2" version))
12871 (sha256
12872 (base32
12873 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
12874 (build-system python-build-system)
12875 (arguments
12876 `(;; python-traceback2 and python-unittest2 depend on one another.
12877 #:tests? #f))
12878 (native-inputs
12879 `(("python-pbr" ,python-pbr-minimal)))
12880 (propagated-inputs
12881 `(("python-linecache2" ,python-linecache2)))
12882 (home-page
12883 "https://github.com/testing-cabal/traceback2")
12884 (synopsis "Backports of the traceback module")
12885 (description
12886 "This module provides a standard interface to extract, format and print
12887 stack traces of Python programs. It exactly mimics the behavior of the Python
12888 interpreter when it prints a stack trace.")
12889 (license license:psfl)))
12890
12891 (define-public python2-traceback2
12892 (package-with-python2 python-traceback2))
12893
12894 (define-public python-ratelimiter
12895 (package
12896 (name "python-ratelimiter")
12897 (version "1.2.0")
12898 (source
12899 (origin
12900 (method url-fetch)
12901 (uri (pypi-uri "ratelimiter" version))
12902 (sha256
12903 (base32
12904 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
12905 (build-system python-build-system)
12906 (arguments
12907 '(#:tests? #f)) ; There are no tests in the pypi archive.
12908 (home-page "https://github.com/RazerM/ratelimiter")
12909 (synopsis "Simple rate limiting object")
12910 (description
12911 "The @code{ratelimiter} module ensures that an operation will not be
12912 executed more than a given number of times during a given period.")
12913 (license license:asl2.0)))
12914
12915 (define-public python2-ratelimiter
12916 (package-with-python2 python-ratelimiter))
12917
12918 (define-public python-dukpy
12919 (package
12920 (name "python-dukpy")
12921 (version "0.3")
12922 (source
12923 (origin
12924 (method url-fetch)
12925 (uri (string-append "https://github.com/kovidgoyal/dukpy/archive/v"
12926 version ".tar.gz"))
12927 (file-name (string-append name "-" version ".tar.gz"))
12928 (sha256
12929 (base32
12930 "0pj39rfwlzivqm5hkrsza7gssg6ggpxlq5ivc8f3h7x5pfgc6y6c"))))
12931 (build-system python-build-system)
12932 (home-page "https://github.com/kovidgoyal/dukpy")
12933 (synopsis "Run JavaScript in python")
12934 (description
12935 "dukpy is a JavaScript runtime environment for Python using the duktape
12936 embeddable JavaScript engine.")
12937 ;; Dukpy is licensed under MIT like the embedded duktape library,
12938 ;; with 'errors.c' as GPL3.
12939 (license (list license:expat license:gpl3))))
12940
12941 (define-public python2-dukpy
12942 (package-with-python2 python-dukpy))
12943
12944 (define-public python-jsonrpclib-pelix
12945 (package
12946 (name "python-jsonrpclib-pelix")
12947 (version "0.3.2")
12948 (source
12949 (origin
12950 (method url-fetch)
12951 (uri (pypi-uri "jsonrpclib-pelix" version))
12952 (sha256
12953 (base32
12954 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
12955 (build-system python-build-system)
12956 (arguments
12957 `(#:tests? #f)) ; no tests in PyPI tarball
12958 (home-page "https://github.com/tcalmant/jsonrpclib/")
12959 (synopsis "JSON-RPC 2.0 client library for Python")
12960 (description
12961 "This library implements the JSON-RPC v2.0
12962 specification (backwards-compatible) as a client library for Python. This
12963 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
12964 services.")
12965 (license license:asl2.0)))
12966
12967 (define-public python2-jsonrpclib-pelix
12968 (package-with-python2 python-jsonrpclib-pelix))
12969
12970 (define-public python-setuptools-scm-git-archive
12971 (package
12972 (name "python-setuptools-scm-git-archive")
12973 (version "1.0")
12974 (source
12975 (origin
12976 (method url-fetch)
12977 (uri (pypi-uri "setuptools_scm_git_archive" version))
12978 (sha256
12979 (base32
12980 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
12981 (build-system python-build-system)
12982 (native-inputs
12983 `(("python-pytest" ,python-pytest)))
12984 (propagated-inputs
12985 `(("python-setuptools-scm" ,python-setuptools-scm)))
12986 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
12987 (synopsis "Setuptools_scm plugin for git archives")
12988 (description
12989 "The setuptools_scm_git_archive package is a plugin to
12990 setuptools_scm, which supports obtaining versions from git archives that
12991 belong to tagged versions.")
12992 (license license:expat)))
12993
12994 (define-public python2-setuptools-scm-git-archive
12995 (package-with-python2 python-setuptools-scm-git-archive))
12996
12997 (define-public python-pyclipper
12998 (package
12999 (name "python-pyclipper")
13000 (version "1.1.0.post1")
13001 (source
13002 (origin
13003 (method url-fetch)
13004 (uri (pypi-uri "pyclipper" version ".zip"))
13005 (sha256
13006 (base32
13007 "0ldbkbnx94an4zzrwb1sxmg6k0jgk4cwmvcdyy8y5k1zslc612wa"))
13008 (modules '((guix build utils)))
13009 (snippet
13010 '(begin
13011 ;; This file is generated by Cython.
13012 (delete-file "pyclipper/pyclipper.cpp") #t))))
13013 (build-system python-build-system)
13014 (arguments
13015 `(#:phases
13016 (modify-phases %standard-phases
13017 (add-before 'build 'cythonize-sources
13018 (lambda _
13019 (with-directory-excursion "pyclipper"
13020 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
13021 (propagated-inputs
13022 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
13023 (native-inputs
13024 `(("python-cython" ,python-cython)
13025 ("python-pytest" ,python-pytest)
13026 ("python-pytest-runner" ,python-pytest-runner)
13027 ("python-unittest2" ,python-unittest2)
13028 ("unzip" ,unzip)))
13029 (home-page "https://github.com/greginvm/pyclipper")
13030 (synopsis "Wrapper for Angus Johnson's Clipper library")
13031 (description
13032 "Pyclipper is a Cython wrapper for the C++ translation of the
13033 Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
13034 (license license:expat)))
13035
13036 (define-public python2-pyclipper
13037 (package-with-python2 python-pyclipper))
13038
13039 (define-public python2-booleanoperations
13040 (package
13041 (name "python2-booleanoperations")
13042 (version "0.7.1")
13043 (source
13044 (origin
13045 (method url-fetch)
13046 (uri (pypi-uri "booleanOperations" version ".zip"))
13047 (sha256
13048 (base32
13049 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
13050 (build-system python-build-system)
13051 (arguments
13052 `(#:python ,python-2))
13053 (native-inputs
13054 `(("unzip" ,unzip)
13055 ("python2-pytest" ,python2-pytest)
13056 ("python2-pytest-runner" ,python2-pytest-runner)))
13057 (propagated-inputs
13058 `(("python-fonttools" ,python2-fonttools)
13059 ("python-pyclipper" ,python2-pyclipper)
13060 ("python-ufolib" ,python2-ufolib)))
13061 (home-page "https://github.com/typemytype/booleanOperations")
13062 (synopsis "Boolean operations on paths")
13063 (description
13064 "BooleanOperations provides a Python library that enables
13065 boolean operations on paths.")
13066 (license license:expat)))
13067
13068 (define-public python-tempdir
13069 (package
13070 (name "python-tempdir")
13071 (version "0.7.1")
13072 (source
13073 (origin
13074 (method url-fetch)
13075 (uri (pypi-uri "tempdir" version))
13076 (sha256
13077 (base32
13078 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
13079 (build-system python-build-system)
13080 (home-page "https://pypi.org/project/tempdir/")
13081 (arguments
13082 ;; the package has no tests
13083 '(#:tests? #f))
13084 (synopsis "Python library for managing temporary directories")
13085 (description
13086 "This library manages temporary directories that are automatically
13087 deleted with all their contents when they are no longer needed. It is
13088 particularly convenient for use in tests.")
13089 (license license:expat)))
13090
13091 (define-public python2-tempdir
13092 (package-with-python2 python-tempdir))
13093
13094 (define-public python-activepapers
13095 (package
13096 (name "python-activepapers")
13097 (version "0.2.2")
13098 (source
13099 (origin
13100 (method url-fetch)
13101 (uri (pypi-uri "ActivePapers.Py" version))
13102 (sha256
13103 (base32
13104 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
13105 (build-system python-build-system)
13106 (arguments
13107 `(#:modules ((ice-9 ftw)
13108 (srfi srfi-1)
13109 (guix build utils)
13110 (guix build python-build-system))
13111
13112 #:phases
13113 (modify-phases %standard-phases
13114 (add-after 'unpack 'delete-python2-code
13115 (lambda _
13116 (for-each delete-file
13117 '("lib/activepapers/builtins2.py"
13118 "lib/activepapers/standardlib2.py"
13119 "lib/activepapers/utility2.py"))))
13120 (replace 'check
13121 (lambda _
13122 ;; Deactivate the test cases that download files
13123 (setenv "NO_NETWORK_ACCESS" "1")
13124 ;; For some strange reason, some tests fail if nosetests runs all
13125 ;; test modules in a single execution. They pass if each test
13126 ;; module is run individually.
13127 (for-each (lambda (filename)
13128 (invoke "nosetests"
13129 (string-append "tests/" filename)))
13130 (scandir "tests"
13131 (lambda (filename)
13132 (string-suffix? ".py" filename)))))))))
13133 (native-inputs
13134 `(("python-tempdir" ,python-tempdir)
13135 ("python-nose" ,python-nose)))
13136 (propagated-inputs
13137 `(("python-h5py" ,python-h5py)))
13138 (home-page "http://www.activepapers.org/")
13139 (synopsis "Executable papers for scientific computing")
13140 (description
13141 "ActivePapers is a tool for working with executable papers, which
13142 combine data, code, and documentation in single-file packages,
13143 suitable for publication as supplementary material or on repositories
13144 such as figshare or Zenodo.")
13145 (properties `((python2-variant . ,(delay python2-activepapers))))
13146 (license license:bsd-3)))
13147
13148 (define-public python2-activepapers
13149 (let ((base (package-with-python2
13150 (strip-python2-variant python-activepapers))))
13151 (package
13152 (inherit base)
13153 (arguments
13154 (substitute-keyword-arguments (package-arguments base)
13155 ((#:phases phases)
13156 `(modify-phases ,phases
13157 (delete 'delete-python2-code)
13158 (add-after 'unpack 'delete-python3-code
13159 (lambda _
13160 (for-each delete-file
13161 '("lib/activepapers/builtins3.py"
13162 "lib/activepapers/standardlib3.py"
13163 "lib/activepapers/utility3.py")))))))))))
13164
13165 (define-public python-semver
13166 (package
13167 (name "python-semver")
13168 (version "2.7.9")
13169 (source
13170 (origin
13171 (method url-fetch)
13172 (uri (pypi-uri "semver" version))
13173 (sha256
13174 (base32
13175 "0hhgqppchv59rqj0yzi1prdg2nfsywqmjsqy2rycyxm0hvxmbyqz"))))
13176 (build-system python-build-system)
13177 (arguments
13178 `(#:phases
13179 (modify-phases %standard-phases
13180 (add-after 'unpack 'patch-test-requirements
13181 (lambda _
13182 (substitute* "setup.py"
13183 ;; Our Python is new enough.
13184 (("'virtualenv<14\\.0\\.0'") "'virtualenv'"))
13185 #t)))))
13186 (native-inputs
13187 `(("python-tox" ,python-tox)
13188 ("python-virtualenv" ,python-virtualenv)))
13189 (home-page "https://github.com/k-bx/python-semver")
13190 (synopsis "Python helper for Semantic Versioning")
13191 (description "This package provides a Python library for
13192 @url{Semantic Versioning, http://semver.org/}.")
13193 (license license:bsd-3)))
13194
13195 (define-public python2-semver
13196 (package-with-python2 python-semver))
13197
13198 (define-public python-pyro4
13199 (package
13200 (name "python-pyro4")
13201 (version "4.74")
13202 (source
13203 (origin
13204 (method url-fetch)
13205 (uri (pypi-uri "Pyro4" version))
13206 (sha256
13207 (base32
13208 "0pzp7c6q3vvkxq0wy9lr6wd5wky40sajz69g697i5rb2q497pvc9"))))
13209 (build-system python-build-system)
13210 (propagated-inputs
13211 `(("python-serpent" ,python-serpent)))
13212 (home-page "https://pyro4.readthedocs.io")
13213 (synopsis "Distributed object middleware for Python")
13214 (description
13215 "Pyro enables you to build applications in which objects can talk to each
13216 other over the network. You can just use normal Python method calls to call
13217 objects on other machines, also known as remote procedure calls (RPC).")
13218 (license license:expat)))
13219
13220 (define-public python2-pyro
13221 (package
13222 (name "python2-pyro")
13223 (version "3.16")
13224 (source
13225 (origin
13226 (method url-fetch)
13227 (uri (pypi-uri "Pyro" version))
13228 (file-name (string-append "Pyro-" version ".tar.gz"))
13229 (sha256
13230 (base32
13231 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
13232 (build-system python-build-system)
13233 (arguments
13234 ;; Pyro is not compatible with Python 3
13235 `(#:python ,python-2
13236 ;; Pyro has no test cases for automatic execution
13237 #:tests? #f))
13238 (home-page "http://pythonhosted.org/Pyro/")
13239 (synopsis "Distributed object manager for Python")
13240 (description "Pyro is a Distributed Object Technology system
13241 written in Python that is designed to be easy to use. It resembles
13242 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
13243 which is a system and language independent Distributed Object Technology
13244 and has much more to offer than Pyro or RMI. Pyro 3.x is no
13245 longer maintained. New projects should use Pyro4 instead, which
13246 is the new Pyro version that is actively developed.")
13247 (license license:expat)))
13248
13249 (define-public python2-scientific
13250 (package
13251 (name "python2-scientific")
13252 (version "2.9.4")
13253 (source
13254 (origin
13255 (method url-fetch)
13256 (uri (string-append "https://bitbucket.org/khinsen/"
13257 "scientificpython/downloads/ScientificPython-"
13258 version ".tar.gz"))
13259 (file-name (string-append "ScientificPython-" version ".tar.gz"))
13260 (sha256
13261 (base32
13262 "0fc69zhlsn9d2jvbzyjl9ah53vj598h84nkq230c83ahfvgzx5y3"))))
13263 (build-system python-build-system)
13264 (inputs
13265 `(("netcdf" ,netcdf)))
13266 (propagated-inputs
13267 `(("python-numpy" ,python2-numpy-1.8)
13268 ("python-pyro" ,python2-pyro)))
13269 (arguments
13270 ;; ScientificPython is not compatible with Python 3
13271 `(#:python ,python-2
13272 #:tests? #f ; No test suite
13273 #:phases
13274 (modify-phases %standard-phases
13275 (replace 'build
13276 (lambda* (#:key inputs #:allow-other-keys)
13277 (invoke "python" "setup.py" "build"
13278 (string-append "--netcdf_prefix="
13279 (assoc-ref inputs "netcdf"))))))))
13280 (home-page "https://bitbucket.org/khinsen/scientificpython")
13281 (synopsis "Python modules for scientific computing")
13282 (description "ScientificPython is a collection of Python modules that are
13283 useful for scientific computing. Most modules are rather general (Geometry,
13284 physical units, automatic derivatives, ...) whereas others are more
13285 domain-specific (e.g. netCDF and PDB support). The library is currently
13286 not actively maintained and works only with Python 2 and NumPy < 1.9.")
13287 (license license:cecill-c)))
13288
13289 (define-public python2-mmtk
13290 (package
13291 (name "python2-mmtk")
13292 (version "2.7.11")
13293 (source
13294 (origin
13295 (method url-fetch)
13296 (uri (string-append "https://bitbucket.org/khinsen/"
13297 "mmtk/downloads/MMTK-" version ".tar.gz"))
13298 (file-name (string-append "MMTK-" version ".tar.gz"))
13299 (sha256
13300 (base32
13301 "1d0nnjx4lwsvh8f99vv1r6gi50d93yba0adkz8b4zgv4za4c5862"))))
13302 (build-system python-build-system)
13303 (native-inputs
13304 `(("netcdf" ,netcdf)))
13305 (propagated-inputs
13306 `(("python-scientific" ,python2-scientific)
13307 ("python-tkinter" ,python-2 "tk")))
13308 (arguments
13309 `(#:python ,python-2
13310 #:tests? #f
13311 #:phases
13312 (modify-phases %standard-phases
13313 (add-before 'build 'includes-from-scientific
13314 (lambda* (#:key inputs #:allow-other-keys)
13315 (mkdir-p "Include/Scientific")
13316 (copy-recursively
13317 (string-append
13318 (assoc-ref inputs "python-scientific")
13319 "/include/python2.7/Scientific")
13320 "Include/Scientific"))))))
13321 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
13322 (synopsis "Python library for molecular simulation")
13323 (description "MMTK is a library for molecular simulations with an emphasis
13324 on biomolecules. It provides widely used methods such as Molecular Dynamics
13325 and normal mode analysis, but also basic routines for implementing new methods
13326 for simulation and analysis. The library is currently not actively maintained
13327 and works only with Python 2 and NumPy < 1.9.")
13328 (license license:cecill-c)))
13329
13330 (define-public python-phonenumbers
13331 (package
13332 (name "python-phonenumbers")
13333 (version "8.9.1")
13334 (source
13335 (origin
13336 (method url-fetch)
13337 (uri (pypi-uri "phonenumbers" version))
13338 (sha256
13339 (base32
13340 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
13341 (build-system python-build-system)
13342 (home-page
13343 "https://github.com/daviddrysdale/python-phonenumbers")
13344 (synopsis
13345 "Python library for dealing with international phone numbers")
13346 (description
13347 "This package provides a Python port of Google's libphonenumber library.")
13348 (license license:asl2.0)))
13349
13350 (define-public python2-phonenumbers
13351 (package-with-python2 python-phonenumbers))
13352
13353 (define-public python-send2trash
13354 (package
13355 (name "python-send2trash")
13356 (version "1.5.0")
13357 (source
13358 (origin (method git-fetch)
13359 ;; Source tarball on PyPI doesn't include tests.
13360 (uri (git-reference
13361 (url "https://github.com/hsoft/send2trash.git")
13362 (commit version)))
13363 (file-name (git-file-name name version))
13364 (sha256
13365 (base32
13366 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
13367 (build-system python-build-system)
13368 (arguments
13369 '(#:phases
13370 (modify-phases %standard-phases
13371 (add-before 'check 'pre-check
13372 (lambda _
13373 (mkdir-p "/tmp/foo")
13374 (setenv "HOME" "/tmp/foo")
13375 #t)))))
13376 (home-page "https://github.com/hsoft/send2trash")
13377 (synopsis "Send files to the user's @file{~/Trash} directory")
13378 (description "This package provides a Python library to send files to the
13379 user's @file{~/Trash} directory.")
13380 (license license:bsd-3)))
13381
13382 (define-public python2-send2trash
13383 (package
13384 (inherit (package-with-python2 python-send2trash))
13385 (arguments
13386 (substitute-keyword-arguments (package-arguments python-send2trash)
13387 ((#:phases phases)
13388 `(modify-phases ,phases
13389 (add-before 'check 'setenv
13390 (lambda _
13391 (setenv "PYTHONPATH"
13392 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
13393 #t))))))
13394 (properties `((python2-variant . ,(delay python-send2trash))))))
13395
13396 (define-public python-yapf
13397 (package
13398 (name "python-yapf")
13399 (version "0.24.0")
13400 (source
13401 (origin
13402 (method url-fetch)
13403 (uri (pypi-uri "yapf" version))
13404 (sha256
13405 (base32
13406 "0anwby0ydmyzcsgjc5dn1ryddwvii4dq61vck447q0n96npnzfyf"))))
13407 (build-system python-build-system)
13408 (home-page "https://github.com/google/yapf")
13409 (synopsis "Formatter for Python code")
13410 (description "YAPF is a formatter for Python code. It's based off of
13411 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
13412 takes the code and reformats it to the best formatting that conforms to the
13413 style guide, even if the original code didn't violate the style guide.")
13414 (license license:asl2.0)))
13415
13416 (define-public python2-yapf
13417 (package-with-python2 python-yapf))
13418
13419 (define-public python-gyp
13420 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
13421 (revision "0"))
13422 (package
13423 (name "python-gyp")
13424 ;; Google does not release versions,
13425 ;; based on second most recent commit date.
13426 (version (git-version "0.0.0" revision commit))
13427 (source
13428 (origin
13429 ;; Google does not release tarballs,
13430 ;; git checkout is needed.
13431 (method git-fetch)
13432 (uri (git-reference
13433 (url "https://chromium.googlesource.com/external/gyp")
13434 (commit commit)))
13435 (file-name (git-file-name name version))
13436 (sha256
13437 (base32
13438 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
13439 (build-system python-build-system)
13440 (home-page "https://gyp.gsrc.io/")
13441 (synopsis "GYP is a Meta-Build system")
13442 (description
13443 "GYP builds build systems for large, cross platform applications.
13444 It can be used to generate XCode projects, Visual Studio projects, Ninja build
13445 files, and Makefiles.")
13446 (license license:bsd-3))))
13447
13448 (define-public python2-gyp
13449 (package-with-python2 python-gyp))
13450
13451 (define-public python-whatever
13452 (package
13453 (name "python-whatever")
13454 (version "0.5")
13455 (source
13456 (origin
13457 (method url-fetch)
13458 (uri (string-append "https://github.com/Suor/whatever/archive/" version
13459 ".tar.gz"))
13460 (sha256
13461 (base32
13462 "1iqvnaf0zpc6b4rvbqq4xy45mszcscyzpzknv8wg6j84pbp22sap"))
13463 (file-name (string-append name "-" version ".tar.gz"))))
13464 (build-system python-build-system)
13465 (arguments
13466 `(#:phases
13467 (modify-phases %standard-phases
13468 (replace 'check
13469 (lambda _
13470 (invoke "py.test"))))))
13471 (native-inputs
13472 `(("python-pytest" ,python-pytest)))
13473 (home-page "http://github.com/Suor/whatever")
13474 (synopsis "Make anonymous functions by partial application of operators")
13475 (description "@code{whatever} provides an easy way to make anonymous
13476 functions by partial application of operators.")
13477 (license license:bsd-3)))
13478
13479 (define-public python2-whatever
13480 (package-with-python2 python-whatever))
13481
13482 (define-public python-funcy
13483 (package
13484 (name "python-funcy")
13485 (version "1.10")
13486 (source
13487 (origin
13488 (method url-fetch)
13489 (uri (string-append "https://github.com/Suor/funcy/archive/" version
13490 ".tar.gz"))
13491 (sha256
13492 (base32
13493 "1fanxivsip29vgarw6dn39xym3q4pbxcpa11plpp548lvxajpahz"))
13494 (file-name (string-append name "-" version ".tar.gz"))))
13495 (build-system python-build-system)
13496 (arguments
13497 `(#:phases
13498 (modify-phases %standard-phases
13499 (replace 'check
13500 (lambda _
13501 (invoke "py.test"))))))
13502 (native-inputs
13503 `(("python-pytest" ,python-pytest)
13504 ("python-whatever" ,python-whatever)))
13505 (home-page "http://github.com/Suor/funcy")
13506 (synopsis "Functional tools")
13507 (description "@code{funcy} is a library that provides functional tools.
13508 Examples are:
13509 @enumerate
13510 @item merge - Merges collections of the same type
13511 @item walk - Type-preserving map
13512 @item select - Selects a part of a collection
13513 @item take - Takes the first n items of a collection
13514 @item first - Takes the first item of a collection
13515 @item remove - Predicated-removes items of a collection
13516 @item concat - Concatenates two collections
13517 @item flatten - Flattens a collection with subcollections
13518 @item distinct - Returns only distinct items
13519 @item split - Predicated-splits a collection
13520 @item split_at - Splits a collection at a given item
13521 @item group_by - Groups items by group
13522 @item pairwise - Pairs off adjacent items
13523 @item partial - Partially-applies a function
13524 @item curry - Curries a function
13525 @item compose - Composes functions
13526 @item complement - Complements a predicate
13527 @item all_fn - \"all\" with predicate
13528 @end enumerate")
13529 (license license:bsd-3)))
13530
13531 (define-public python2-funcy
13532 (package-with-python2 python-funcy))
13533
13534 (define-public python-isoweek
13535 (package
13536 (name "python-isoweek")
13537 (version "1.3.3")
13538 (source
13539 (origin
13540 (method url-fetch)
13541 (uri (pypi-uri "isoweek" version))
13542 (sha256
13543 (base32
13544 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
13545 (build-system python-build-system)
13546 (home-page "https://github.com/gisle/isoweek")
13547 (synopsis "Objects representing a week")
13548 (description "The @code{isoweek} module provide the class Week that
13549 implements the week definition of ISO 8601. This standard also defines
13550 a notation for identifying weeks; yyyyWww (where the W is a literal).
13551 Week instances stringify to this form.")
13552 (license license:bsd-3)))
13553
13554 (define-public python2-isoweek
13555 (package-with-python2 python-isoweek))
13556
13557 (define-public python-tokenize-rt
13558 (package
13559 (name "python-tokenize-rt")
13560 (version "2.0.1")
13561 (source
13562 (origin
13563 (method url-fetch)
13564 (uri (pypi-uri "tokenize-rt" version))
13565 (sha256
13566 (base32
13567 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
13568 (build-system python-build-system)
13569 (home-page "https://github.com/asottile/tokenize-rt")
13570 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
13571 (description
13572 "This Python library is a wrapper around @code{tokenize} from the Python
13573 standard library. It provides two additional tokens @code{ESCAPED_NL} and
13574 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
13575 and @code{tokens_to_src} to roundtrip.")
13576 (license license:expat)))
13577
13578 (define-public python-future-fstrings
13579 (package
13580 (name "python-future-fstrings")
13581 (version "0.4.1")
13582 (source
13583 (origin
13584 (method url-fetch)
13585 (uri (pypi-uri "future_fstrings" version))
13586 (sha256
13587 (base32
13588 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
13589 (build-system python-build-system)
13590 (propagated-inputs
13591 `(("python-tokenize-rt" ,python-tokenize-rt)))
13592 (home-page "https://github.com/asottile/future-fstrings")
13593 (synopsis "Backport of fstrings to Python < 3.6")
13594 (description
13595 "This package provides a UTF-8 compatible encoding
13596 @code{future_fstrings}, which performs source manipulation. It decodes the
13597 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
13598 @code{f} strings.")
13599 (license license:expat)))
13600
13601 (define-public python-typing
13602 (package
13603 (name "python-typing")
13604 (version "3.6.6")
13605 (source
13606 (origin
13607 (method url-fetch)
13608 (uri (pypi-uri "typing" version))
13609 (sha256
13610 (base32
13611 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
13612 (build-system python-build-system)
13613 (home-page "https://docs.python.org/3/library/typing.html")
13614 (synopsis "Type hints for Python")
13615 (description "This is a backport of the standard library @code{typing}
13616 module to Python versions older than 3.5. Typing defines a standard notation
13617 for Python function and variable type annotations. The notation can be used
13618 for documenting code in a concise, standard format, and it has been designed
13619 to also be used by static and runtime type checkers, static analyzers, IDEs
13620 and other tools.")
13621 (license license:psfl)))
13622
13623 (define-public python2-typing
13624 (package-with-python2 python-typing))
13625
13626 (define-public python-typing-extensions
13627 (package
13628 (name "python-typing-extensions")
13629 (version "3.7.2")
13630 (source
13631 (origin
13632 (method url-fetch)
13633 (uri (pypi-uri "typing_extensions" version))
13634 (sha256
13635 (base32
13636 "0wfsv71pvkyf2na938l579jh0v3kzl6g744ijgnahcwd4d9x0b7v"))))
13637 (build-system python-build-system)
13638 (home-page
13639 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
13640 (synopsis "Experimental type hints for Python")
13641 (description
13642 "The typing_extensions module contains additional @code{typing} hints not
13643 yet present in the of the @code{typing} standard library.
13644 Included are implementations of:
13645 @enumerate
13646 @item ClassVar
13647 @item ContextManager
13648 @item Counter
13649 @item DefaultDict
13650 @item Deque
13651 @item NewType
13652 @item NoReturn
13653 @item overload
13654 @item Protocol
13655 @item runtime
13656 @item Text
13657 @item Type
13658 @item TYPE_CHECKING
13659 @item AsyncGenerator
13660 @end enumerate\n")
13661 (license license:psfl)))
13662
13663 (define-public bpython
13664 (package
13665 (name "bpython")
13666 (version "0.17.1")
13667 (source
13668 (origin
13669 (method url-fetch)
13670 (uri (pypi-uri "bpython" version))
13671 (sha256
13672 (base32
13673 "0bxhxi5zxdkrf8b4gwn0d363kdz3qnypjwhm1aydki53ph8ca1w9"))))
13674 (build-system python-build-system)
13675 (arguments
13676 `(#:phases
13677 (modify-phases %standard-phases
13678 (add-after 'unpack 'remove-failing-test
13679 (lambda _
13680 ;; Remove failing test. FIXME: make it pass
13681 (delete-file "bpython/test/test_args.py")
13682 #t))
13683 (add-after 'wrap 'add-aliases
13684 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
13685 (lambda* (#:key outputs #:allow-other-keys)
13686 (let ((out (assoc-ref outputs "out")))
13687 (for-each
13688 (lambda (old new)
13689 (symlink old (string-append out "/bin/" new)))
13690 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
13691 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
13692 #t)))))
13693 (propagated-inputs
13694 `(("python-pygments" ,python-pygments)
13695 ("python-requests" ,python-requests)
13696 ("python-babel" ,python-babel) ; optional, for internationalization
13697 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
13698 ("python-greenlet" ,python-greenlet)
13699 ("python-urwid" ,python-urwid) ; for bpython-urwid only
13700 ("python-six" ,python-six)))
13701 (native-inputs
13702 `(("python-sphinx" ,python-sphinx)
13703 ("python-mock" ,python-mock)))
13704 (home-page "https://bpython-interpreter.org/")
13705 (synopsis "Fancy interface to the Python interpreter")
13706 (description "Bpython is a fancy interface to the Python
13707 interpreter. bpython's main features are
13708
13709 @enumerate
13710 @item in-line syntax highlighting,
13711 @item readline-like autocomplete with suggestions displayed as you type,
13712 @item expected parameter list for any Python function,
13713 @item \"rewind\" function to pop the last line of code from memory and
13714 re-evaluate,
13715 @item send the code you've entered off to a pastebin,
13716 @item save the code you've entered to a file, and
13717 @item auto-indentation.
13718 @end enumerate")
13719 (license license:expat)))
13720
13721 (define-public bpython2
13722 (let ((base (package-with-python2
13723 (strip-python2-variant bpython))))
13724 (package (inherit base)
13725 (name "bpython2")
13726 (arguments
13727 `(#:python ,python-2
13728 #:phases
13729 (modify-phases %standard-phases
13730 (add-after 'unpack 'remove-failing-test
13731 (lambda _
13732 ;; Remove failing test. FIXME: make it pass
13733 (delete-file "bpython/test/test_args.py")
13734 ;; Disable failing test-cases (renaming inhibits they are
13735 ;; discovered)
13736 (substitute* "bpython/test/test_curtsies_repl.py"
13737 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
13738 (string-append a "xxx_off_" b))
13739 (("^(\\s*def )(test_complex\\W)" _ a b)
13740 (string-append a "xxx_off_" b)))
13741 #t))
13742 (add-before 'build 'rename-scripts
13743 ;; rename the scripts to bypthon2, bpdb2, etc.
13744 (lambda _
13745 (substitute* "setup.py"
13746 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
13747 (string-append name "2" rest "\n"))
13748 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
13749 (string-append name "2" (or sub "") rest "\n")))
13750 #t))))))))
13751
13752 (define-public python-pyinotify
13753 (package
13754 (name "python-pyinotify")
13755 (version "0.9.6")
13756 (source (origin
13757 (method url-fetch)
13758 (uri (pypi-uri "pyinotify" version))
13759 (sha256
13760 (base32
13761 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
13762 (build-system python-build-system)
13763 (arguments `(#:tests? #f)) ;no tests
13764 (home-page "https://github.com/seb-m/pyinotify")
13765 (synopsis "Python library for monitoring inotify events")
13766 (description
13767 "@code{pyinotify} provides a Python interface for monitoring
13768 file system events on Linux.")
13769 (license license:expat)))
13770
13771 (define-public python2-pyinotify
13772 (package-with-python2 python-pyinotify))
13773
13774 ;; Ada parser uses this version.
13775 (define-public python2-quex-0.67.3
13776 (package
13777 (name "python2-quex")
13778 (version "0.67.3")
13779 (source
13780 (origin
13781 (method url-fetch)
13782 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
13783 (version-major+minor version)
13784 "/quex-" version ".zip"))
13785 (sha256
13786 (base32
13787 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
13788 (build-system python-build-system)
13789 (native-inputs
13790 `(("unzip" ,unzip)))
13791 (arguments
13792 `(#:python ,python-2
13793 #:tests? #f
13794 #:phases
13795 (modify-phases %standard-phases
13796 (delete 'configure)
13797 (delete 'build)
13798 (replace 'install
13799 (lambda* (#:key outputs #:allow-other-keys)
13800 (let* ((out (assoc-ref outputs "out"))
13801 (share/quex (string-append out "/share/quex"))
13802 (bin (string-append out "/bin")))
13803 (copy-recursively "." share/quex)
13804 (mkdir-p bin)
13805 (symlink (string-append share/quex "/quex-exe.py")
13806 (string-append bin "/quex"))
13807 #t))))))
13808 (native-search-paths
13809 (list (search-path-specification
13810 (variable "QUEX_PATH")
13811 (files '("share/quex")))))
13812 (home-page "http://quex.sourceforge.net/")
13813 (synopsis "Lexical analyzer generator in Python")
13814 (description "@code{quex} is a lexical analyzer generator in Python.")
13815 (license license:lgpl2.1+))) ; Non-military
13816
13817 (define-public python2-quex
13818 (package (inherit python2-quex-0.67.3)
13819 (name "python2-quex")
13820 (version "0.68.1")
13821 (source
13822 (origin
13823 (method url-fetch)
13824 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
13825 (sha256
13826 (base32
13827 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
13828 (file-name (string-append name "-" version ".tar.gz"))))))
13829
13830 (define-public python-more-itertools
13831 (package
13832 (name "python-more-itertools")
13833 (version "4.3.0")
13834 (source
13835 (origin
13836 (method url-fetch)
13837 (uri (pypi-uri "more-itertools" version))
13838 (sha256
13839 (base32
13840 "17h3na0rdh8xq30w4b9pizgkdxmm51896bxw600x84jflg9vaxn4"))))
13841 (build-system python-build-system)
13842 (arguments
13843 `(,@(if (any (cute string-prefix? <> (or (%current-system)
13844 (%current-target-system)))
13845 '("armhf" "i686"))
13846 '(#:phases
13847 (modify-phases %standard-phases
13848 ;; This is required for 32-bit hardware.
13849 ;; TODO: Try to remove this when upgrading.
13850 (add-after 'unpack 'patch-test
13851 (lambda _
13852 (substitute* "more_itertools/tests/test_more.py"
13853 (("10 \\*\\* 10") "9 ** 9"))
13854 #t))))
13855 '())))
13856 (propagated-inputs
13857 `(("python-six" ,python-six-bootstrap)))
13858 (home-page "https://github.com/erikrose/more-itertools")
13859 (synopsis "More routines for operating on iterables, beyond itertools")
13860 (description "Python's built-in @code{itertools} module implements a
13861 number of iterator building blocks inspired by constructs from APL, Haskell,
13862 and SML. @code{more-itertools} includes additional building blocks for
13863 working with iterables.")
13864 (license license:expat)))
13865
13866 (define-public python2-more-itertools
13867 (package-with-python2 python-more-itertools))
13868
13869 (define-public python-latexcodec
13870 (package
13871 (name "python-latexcodec")
13872 (version "1.0.5")
13873 (source
13874 (origin
13875 (method url-fetch)
13876 (uri (pypi-uri "latexcodec" version))
13877 (sha256
13878 (base32
13879 "0zdd1gf24i83ykadx0y30n3001j43scqr2saql3vckk5c39dj1wn"))))
13880 (build-system python-build-system)
13881 (inputs
13882 `(("python-six" ,python-six)))
13883 (home-page "https://readthedocs.org/projects/latexcodec/")
13884 (synopsis "Work with LaTeX code in Python")
13885 (description "Lexer and codec to work with LaTeX code in Python.")
13886 (license license:expat)))
13887
13888 (define-public python-pybtex
13889 (package
13890 (name "python-pybtex")
13891 (version "0.21")
13892 (source
13893 (origin
13894 (method url-fetch)
13895 (uri (pypi-uri "pybtex" version))
13896 (sha256
13897 (base32
13898 "00300j8dn5pxq4ndxmfmbmycg2znawkqs49val2x6jlmfiy6r2mg"))))
13899 (build-system python-build-system)
13900 (native-inputs
13901 `(("python-nose" ,python-nose)))
13902 (inputs
13903 `(("python-latexcodec" ,python-latexcodec)
13904 ("python-pyyaml" ,python-pyyaml)
13905 ("python-six" ,python-six)))
13906 (arguments
13907 `(#:test-target "nosetests"))
13908 (home-page "https://pybtex.org/")
13909 (synopsis "BibTeX-compatible bibliography processor")
13910 (description "Pybtex is a BibTeX-compatible bibliography processor written
13911 in Python. You can simply type pybtex instead of bibtex.")
13912 (license license:expat)))
13913
13914 (define-public python-onetimepass
13915 (package
13916 (name "python-onetimepass")
13917 (version "1.0.1")
13918 (source
13919 (origin
13920 (method url-fetch)
13921 (uri (pypi-uri "onetimepass" version))
13922 (sha256
13923 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
13924 (build-system python-build-system)
13925 (propagated-inputs `(("python-six" ,python-six)))
13926 (home-page "https://github.com/tadeck/onetimepass/")
13927 (synopsis "One-time password library")
13928 (description "Python one-time password library for HMAC-based (HOTP) and
13929 time-based (TOTP) passwords.")
13930 (license license:expat)))
13931
13932 (define-public python-parso
13933 (package
13934 (name "python-parso")
13935 (version "0.3.1")
13936 (source
13937 (origin
13938 (method url-fetch)
13939 (uri (pypi-uri "parso" version))
13940 (sha256
13941 (base32
13942 "18p89iwcm8mnf380f92g9w0bhx5km8wxp392vvjcq4y1ld1llw1m"))))
13943 (native-inputs
13944 `(("python-pytest" ,python-pytest)))
13945 (build-system python-build-system)
13946 (home-page "https://github.com/davidhalter/parso")
13947 (synopsis "Python Parser")
13948 (description "Parso is a Python parser that supports error recovery and
13949 round-trip parsing for different Python versions (in multiple Python versions).
13950 Parso is also able to list multiple syntax errors in your Python file.")
13951 (license license:expat)))
13952
13953 (define-public python2-parso
13954 (package-with-python2 python-parso))
13955
13956 (define-public python-async-generator
13957 (package
13958 (name "python-async-generator")
13959 (version "1.9")
13960 (source
13961 (origin
13962 (method url-fetch)
13963 (uri (pypi-uri "async_generator" version))
13964 (sha256
13965 (base32
13966 "0wc3hidz1q85cja93k5pzybn0fprfnqyrv4qlkdqdzklc5f4dmdp"))))
13967 (build-system python-build-system)
13968 (native-inputs
13969 `(("python-pytest" ,python-pytest)))
13970 (home-page "https://github.com/python-trio/async_generator")
13971 (synopsis "Async generators and context managers for Python 3.5+")
13972 (description "@code{async_generator} back-ports Python 3.6's native async
13973 generators and Python 3.7's context managers into Python 3.5.")
13974 ;; Dual licensed.
13975 (license (list license:expat license:asl2.0))))
13976
13977 (define-public python-async-timeout
13978 (package
13979 (name "python-async-timeout")
13980 (version "3.0.1")
13981 (source
13982 (origin
13983 (method url-fetch)
13984 (uri (pypi-uri "async-timeout" version))
13985 (sha256
13986 (base32
13987 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
13988 (build-system python-build-system)
13989 (home-page "https://github.com/aio-libs/async_timeout/")
13990 (synopsis "Timeout context manager for asyncio programs")
13991 (description "@code{async-timeout} provides a timeout timeout context
13992 manager compatible with @code{asyncio}.")
13993 (license license:asl2.0)))
13994
13995 (define-public python-glob2
13996 (package
13997 (name "python-glob2")
13998 (version "0.6")
13999 (source (origin
14000 (method url-fetch)
14001 (uri (string-append
14002 "https://github.com/miracle2k/python-glob2/archive/"
14003 version
14004 ".tar.gz"))
14005 (sha256
14006 (base32
14007 "0ja168f0dz4kbz4m06dm0rd3acaypk6hjx2km541pw22y9s40mag"))
14008 (file-name (string-append name "-" version ".tar.gz"))))
14009 (build-system python-build-system)
14010 (home-page "https://github.com/miracle2k/python-glob2/")
14011 (synopsis "Extended Version of the python buildin glob module")
14012 (description "This is an extended version of the Python
14013 @url{http://docs.python.org/library/glob.html, built-in glob module} which
14014 adds:
14015
14016 @itemize
14017 @item The ability to capture the text matched by glob patterns, and return
14018 those matches alongside the file names.
14019 @item A recursive @code{**} globbing syntax, akin for example to the
14020 @code{globstar} option of Bash.
14021 @item The ability to replace the file system functions used, in order to glob
14022 on virtual file systems.
14023 @item Compatible with Python 2 and Python 3 (tested with 3.3).
14024 @end itemize
14025
14026 Glob2 currently based on the glob code from Python 3.3.1.")
14027 (license license:bsd-2)))
14028
14029 (define-public python2-glob2
14030 (package-with-python2 python-glob2))
14031
14032 (define-public python-gipc
14033 (package
14034 (name "python-gipc")
14035 (version "0.6.0")
14036 (source
14037 (origin
14038 (method url-fetch)
14039 (uri (pypi-uri "gipc" version ".zip"))
14040 (sha256
14041 (base32
14042 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
14043 (build-system python-build-system)
14044 (native-inputs
14045 `(("unzip" ,unzip)))
14046 (propagated-inputs
14047 `(("python-gevent" ,python-gevent)))
14048 (home-page "http://gehrcke.de/gipc")
14049 (synopsis "Child process management in the context of gevent")
14050 (description "Usage of Python's multiprocessing package in a
14051 gevent-powered application may raise problems. With @code{gipc},
14052 process-based child processes can safely be created anywhere within a
14053 gevent-powered application.")
14054 (license license:expat)))
14055
14056 (define-public python2-gipc
14057 (package-with-python2 python-gipc))
14058
14059 (define-public python-fusepy
14060 (package
14061 (name "python-fusepy")
14062 (version "2.0.4")
14063 (source
14064 (origin
14065 (method url-fetch)
14066 (uri (pypi-uri "fusepy" version))
14067 (sha256
14068 (base32
14069 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
14070 (build-system python-build-system)
14071 (arguments
14072 `(#:phases
14073 (modify-phases %standard-phases
14074 (add-before 'build 'set-library-file-name
14075 (lambda* (#:key inputs #:allow-other-keys)
14076 (let ((fuse (assoc-ref inputs "fuse")))
14077 (substitute* "fuse.py"
14078 (("find_library\\('fuse'\\)")
14079 (string-append "'" fuse "/lib/libfuse.so'")))
14080 #t))))))
14081 (propagated-inputs
14082 `(("fuse" ,fuse)))
14083 (home-page "https://github.com/fusepy/fusepy")
14084 (synopsis "Simple ctypes bindings for FUSE")
14085 (description "Python module that provides a simple interface to FUSE and
14086 MacFUSE. The binding is created using the standard @code{ctypes} library.")
14087 (license license:isc)))
14088
14089 (define-public python2-fusepy
14090 (package-with-python2 python-fusepy))
14091
14092 (define-public python2-gdrivefs
14093 (package
14094 (name "python2-gdrivefs")
14095 (version "0.14.9")
14096 (source
14097 (origin
14098 (method url-fetch)
14099 (uri (pypi-uri "gdrivefs" version))
14100 (sha256
14101 (base32
14102 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
14103 (build-system python-build-system)
14104 (arguments
14105 `(#:python ,python-2
14106 #:phases
14107 (modify-phases %standard-phases
14108 (add-before 'build 'patch-setup-py
14109 (lambda _
14110 ;; Update requirements from dependency==version
14111 ;; to dependency>=version
14112 (substitute* "gdrivefs/resources/requirements.txt"
14113 (("==") ">="))
14114 #t)))))
14115 (native-inputs
14116 `(("python2-gipc" ,python2-gipc)
14117 ("python2-gevent" ,python2-gevent)
14118 ("python2-greenlet" ,python2-greenlet)
14119 ("python2-httplib2" ,python2-httplib2)
14120 ("python2-uritemplate" ,python2-uritemplate)
14121 ("python2-oauth2client" ,python2-oauth2client)
14122 ("python2-six" ,python2-six)))
14123 (propagated-inputs
14124 `(("python2-dateutil" ,python2-dateutil)
14125 ("python2-fusepy" ,python2-fusepy)
14126 ("python2-google-api-client" ,python2-google-api-client)))
14127 (home-page "https://github.com/dsoprea/GDriveFS")
14128 (synopsis "Mount Google Drive as a local file system")
14129 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
14130 under Python 2.7.")
14131 (license license:gpl2)))
14132
14133 (define-public pybind11
14134 (package
14135 (name "pybind11")
14136 (version "2.2.4")
14137 (source (origin
14138 (method git-fetch)
14139 (uri (git-reference
14140 (url "https://github.com/pybind/pybind11.git")
14141 (commit (string-append "v" version))))
14142 (sha256
14143 (base32
14144 "0pa79ymcasv8br5ifbx7878id5py2jpjac3i20cqxr6gs9l6ivlv"))
14145 (file-name (git-file-name name version))))
14146 (build-system cmake-build-system)
14147 (native-inputs
14148 `(("python" ,python)
14149 ("python-pytest" ,python-pytest)))
14150 (arguments
14151 `(#:test-target "check"))
14152 (home-page "https://github.com/pybind/pybind11/")
14153 (synopsis "Seamless operability between C++11 and Python")
14154 (description "pybind11 is a lightweight header-only library that exposes
14155 C++ types in Python and vice versa, mainly to create Python bindings of
14156 existing C++ code. Its goals and syntax are similar to the excellent
14157 Boost.Python library by David Abrahams: to minimize boilerplate code in
14158 traditional extension modules by inferring type information using compile-time
14159 introspection.")
14160 (license license:expat)))
14161
14162 (define-public python-fasteners
14163 (package
14164 (name "python-fasteners")
14165 (version "0.14.1")
14166 (source
14167 (origin
14168 (method url-fetch)
14169 (uri (pypi-uri "fasteners" version))
14170 (sha256
14171 (base32
14172 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
14173 (build-system python-build-system)
14174 (propagated-inputs
14175 `(("python-monotonic" ,python-monotonic)
14176 ("python-six" ,python-six)
14177 ("python-testtools" ,python-testtools)))
14178 (home-page "https://github.com/harlowja/fasteners")
14179 (synopsis "Python package that provides useful locks")
14180 (description
14181 "This package provides a Python program that provides following locks:
14182
14183 @itemize
14184 @item Locking decorator
14185 @item Reader-writer locks
14186 @item Inter-process locks
14187 @item Generic helpers
14188 @end itemize\n")
14189 (properties `((python2-variant . ,(delay python2-fasteners))))
14190 (license license:asl2.0)))
14191
14192 (define-public python2-fasteners
14193 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
14194 (package
14195 (inherit base)
14196 (propagated-inputs
14197 `(("python2-futures" ,python2-futures)
14198 ,@(package-propagated-inputs base))))))
14199
14200 (define-public python-requests-file
14201 (package
14202 (name "python-requests-file")
14203 (version "1.4.3")
14204 (source
14205 (origin
14206 (method url-fetch)
14207 (uri (pypi-uri "requests-file" version))
14208 (sha256
14209 (base32
14210 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
14211 (build-system python-build-system)
14212 (propagated-inputs
14213 `(("python-requests" ,python-requests)
14214 ("python-six" ,python-six)))
14215 (home-page
14216 "https://github.com/dashea/requests-file")
14217 (synopsis "File transport adapter for Requests")
14218 (description
14219 "Requests-File is a transport adapter for use with the Requests Python
14220 library to allow local filesystem access via file:// URLs.")
14221 (license license:asl2.0)))
14222
14223 (define-public python2-requests-file
14224 (package-with-python2 python-requests-file))
14225
14226 (define-public python-tldextract
14227 (package
14228 (name "python-tldextract")
14229 (version "2.2.0")
14230 (source
14231 (origin
14232 (method url-fetch)
14233 (uri (pypi-uri "tldextract" version))
14234 (sha256
14235 (base32
14236 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
14237 (build-system python-build-system)
14238 (native-inputs
14239 `(("python-pytest" ,python-pytest)
14240 ("python-responses" ,python-responses)))
14241 (propagated-inputs
14242 `(("python-idna" ,python-idna)
14243 ("python-requests" ,python-requests)
14244 ("python-requests-file" ,python-requests-file)))
14245 (home-page
14246 "https://github.com/john-kurkowski/tldextract")
14247 (synopsis
14248 "Separate the TLD from the registered domain and subdomains of a URL")
14249 (description
14250 "TLDExtract accurately separates the TLD from the registered domain and
14251 subdomains of a URL, using the Public Suffix List. By default, this includes
14252 the public ICANN TLDs and their exceptions. It can optionally support the
14253 Public Suffix List's private domains as well.")
14254 (license license:bsd-3)))
14255
14256 (define-public python2-tldextract
14257 (package-with-python2 python-tldextract))
14258
14259 (define-public python-pynamecheap
14260 (package
14261 (name "python-pynamecheap")
14262 (version "0.0.3")
14263 (source
14264 (origin
14265 (method url-fetch)
14266 (uri (pypi-uri "PyNamecheap" version))
14267 (sha256
14268 (base32
14269 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
14270 (build-system python-build-system)
14271 (propagated-inputs
14272 `(("python-requests" ,python-requests)))
14273 (home-page
14274 "https://github.com/Bemmu/PyNamecheap")
14275 (synopsis
14276 "Namecheap API client in Python")
14277 (description
14278 "PyNamecheap is a Namecheap API client in Python.")
14279 (license license:expat)))
14280
14281 (define-public python2-pynamecheap
14282 (package-with-python2 python-pynamecheap))
14283
14284 (define-public python-dns-lexicon
14285 (package
14286 (name "python-dns-lexicon")
14287 (version "2.4.0")
14288 (source
14289 (origin
14290 (method url-fetch)
14291 (uri (pypi-uri "dns-lexicon" version))
14292 (sha256
14293 (base32
14294 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
14295 (build-system python-build-system)
14296 (arguments
14297 `(#:tests? #f)) ;requires internet access
14298 (propagated-inputs
14299 `(("python-future" ,python-future)
14300 ("python-pynamecheap" ,python-pynamecheap)
14301 ("python-requests" ,python-requests)
14302 ("python-tldextract" ,python-tldextract)
14303 ("python-urllib3" ,python-urllib3)))
14304 (home-page "https://github.com/AnalogJ/lexicon")
14305 (synopsis
14306 "Manipulate DNS records on various DNS providers")
14307 (description
14308 "Lexicon provides a way to manipulate DNS records on multiple DNS
14309 providers in a standardized way. It has a CLI but it can also be used as a
14310 Python library. It was designed to be used in automation, specifically with
14311 Let's Encrypt.")
14312 (license license:expat)))
14313
14314 (define-public python2-dns-lexicon
14315 (package-with-python2 python-dns-lexicon))
14316
14317 (define-public python-commandlines
14318 (package
14319 (name "python-commandlines")
14320 (version "0.4.1")
14321 (source
14322 (origin
14323 (method url-fetch)
14324 (uri (pypi-uri "commandlines" version))
14325 (sha256
14326 (base32
14327 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
14328 (build-system python-build-system)
14329 (home-page "https://github.com/chrissimpkins/commandlines")
14330 (synopsis "Command line argument to object parsing library")
14331 (description
14332 "@code{Commandlines} is a Python library for command line application
14333 development that supports command line argument parsing, command string
14334 validation testing and application logic.")
14335 (license license:expat)))
14336
14337 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
14338 ;; python-numba. They have a very unflexible relationship.
14339 (define-public python-numba
14340 (package
14341 (name "python-numba")
14342 (version "0.39.0")
14343 (source
14344 (origin
14345 (method url-fetch)
14346 (uri (pypi-uri "numba" version))
14347 (sha256
14348 (base32
14349 "1bibvkwga1v8293i9ivl469d8bzgabn3vgr2ig7c1i68v8frsx07"))))
14350 (build-system python-build-system)
14351 (arguments
14352 `(#:modules ((guix build utils)
14353 (guix build python-build-system)
14354 (ice-9 ftw)
14355 (srfi srfi-1)
14356 (srfi srfi-26))
14357 #:phases
14358 (modify-phases %standard-phases
14359 (add-after 'unpack 'disable-proprietary-features
14360 (lambda _
14361 (setenv "NUMBA_DISABLE_HSA" "1")
14362 (setenv "NUMBA_DISABLE_CUDA" "1")
14363 #t))
14364 (add-after 'unpack 'remove-failing-tests
14365 (lambda _
14366 ;; FIXME: these tests fail for unknown reasons:
14367 ;; test_non_writable_pycache, test_non_creatable_pycache, and
14368 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
14369 (substitute* "numba/tests/test_dispatcher.py"
14370 (("def test(_non_writable_pycache)" _ m)
14371 (string-append "def guix_skip" m))
14372 (("def test(_non_creatable_pycache)" _ m)
14373 (string-append "def guix_skip" m))
14374 (("def test(_frozen)" _ m)
14375 (string-append "def guix_skip" m)))
14376
14377 ;; These tests fail because we don't run the tests from the build
14378 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
14379 ;; They ar in numba.tests.test_pycc.TestDistutilsSupport.
14380 (substitute* "numba/tests/test_pycc.py"
14381 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
14382 (string-append "def guix_skip" m)))
14383 #t))
14384 (replace 'check
14385 (lambda _
14386 (let ((cwd (getcwd)))
14387 (setenv "PYTHONPATH"
14388 (string-append cwd "/build/"
14389 (find (cut string-prefix? "lib" <>)
14390 (scandir (string-append cwd "/build")))
14391 ":"
14392 (getenv "PYTHONPATH")))
14393 ;; Something is wrong with the PYTHONPATH when running the
14394 ;; tests from the build directory, as it complains about not being
14395 ;; able to import certain modules.
14396 (with-directory-excursion "/tmp"
14397 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
14398 #t)))))
14399 (propagated-inputs
14400 `(("python-llvmlite" ,python-llvmlite)
14401 ("python-numpy" ,python-numpy)
14402 ("python-singledispatch" ,python-singledispatch)))
14403 ;; Needed for tests.
14404 (inputs
14405 `(("python-jinja2" ,python-jinja2)
14406 ("python-pygments" ,python-pygments)))
14407 (home-page "https://numba.pydata.org")
14408 (synopsis "Compile Python code using LLVM")
14409 (description "Numba gives you the power to speed up your applications with
14410 high performance functions written directly in Python. With a few
14411 annotations, array-oriented and math-heavy Python code can be just-in-time
14412 compiled to native machine instructions, similar in performance to C, C++ and
14413 Fortran, without having to switch languages or Python interpreters.
14414
14415 Numba works by generating optimized machine code using the LLVM compiler
14416 infrastructure at import time, runtime, or statically (using the included pycc
14417 tool).")
14418 (license license:bsd-3)))
14419
14420 (define-public python-anndata
14421 (package
14422 (name "python-anndata")
14423 (version "0.6.9")
14424 (source
14425 (origin
14426 (method url-fetch)
14427 (uri (pypi-uri "anndata" version))
14428 (sha256
14429 (base32
14430 "1fh461xyyc7pcrjfgd013bdc2alf53r46ss3gfw3431mbb1gappi"))))
14431 (build-system python-build-system)
14432 (propagated-inputs
14433 `(("python-h5py" ,python-h5py)
14434 ("python-natsort" ,python-natsort)
14435 ("python-pandas" ,python-pandas)
14436 ("python-scipy" ,python-scipy)))
14437 (home-page "https://github.com/theislab/anndata")
14438 (synopsis "Annotated data for data analysis pipelines")
14439 (description "Anndata is a package for simple (functional) high-level APIs
14440 for data analysis pipelines. In this context, it provides an efficient,
14441 scalable way of keeping track of data together with learned annotations and
14442 reduces the code overhead typically encountered when using a mostly
14443 object-oriented library such as @code{scikit-learn}.")
14444 (license license:bsd-3)))
14445
14446 (define-public python-dill
14447 (package
14448 (name "python-dill")
14449 (version "0.2.8.2")
14450 (source
14451 (origin
14452 (method url-fetch)
14453 (uri (pypi-uri "dill" version))
14454 (sha256
14455 (base32
14456 "1cymzn9fxwdy33h21zkk4gqgzvd25110hh3zdqnvnwa3p52c4kb2"))))
14457 (build-system python-build-system)
14458 ;; FIXME: The check phase fails with "don't know how to make test".
14459 (arguments '(#:tests? #f))
14460 (home-page "https://pypi.org/project/dill")
14461 (synopsis "Serialize all of Python")
14462 (description "Dill extends Python's @code{pickle} module for serializing
14463 and de-serializing Python objects to the majority of the built-in Python
14464 types. Dill provides the user the same interface as the @code{pickle} module,
14465 and also includes some additional features. In addition to pickling Python
14466 objects, @code{dill} provides the ability to save the state of an interpreter
14467 session in a single command. Hence, it would be feasable to save a
14468 interpreter session, close the interpreter, ship the pickled file to another
14469 computer, open a new interpreter, unpickle the session and thus continue from
14470 the saved state of the original interpreter session.")
14471 (license license:bsd-3)))
14472
14473 (define-public python-multiprocess
14474 (package
14475 (name "python-multiprocess")
14476 (version "0.70.6.1")
14477 (source
14478 (origin
14479 (method url-fetch)
14480 (uri (pypi-uri "multiprocess" version))
14481 (sha256
14482 (base32
14483 "1ip5caz67b3q0553mr8gm8xwsb8x500jn8ml0gihgyfy52m2ypcq"))))
14484 (build-system python-build-system)
14485 (propagated-inputs
14486 `(("python-dill" ,python-dill)))
14487 (home-page "https://pypi.org/project/multiprocess")
14488 (synopsis "Multiprocessing and multithreading in Python")
14489 (description
14490 "This package is a fork of the multiprocessing Python package, a package
14491 which supports the spawning of processes using the API of the standard
14492 library's @code{threading} module.")
14493 (license license:bsd-3)))
14494
14495 (define-public python-toolz
14496 (package
14497 (name "python-toolz")
14498 (version "0.9.0")
14499 (source
14500 (origin
14501 (method url-fetch)
14502 (uri (pypi-uri "toolz" version))
14503 (sha256
14504 (base32
14505 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
14506 (build-system python-build-system)
14507 ;; FIXME: tests cannot be computed: "Can't perform this operation for
14508 ;; unregistered loader type"
14509 (arguments '(#:tests? #f))
14510 (home-page "https://github.com/pytoolz/toolz/")
14511 (synopsis "List processing tools and functional utilities")
14512 (description
14513 "This package provides a set of utility functions for iterators,
14514 functions, and dictionaries.")
14515 (license license:bsd-3)))
14516
14517 (define-public python2-toolz
14518 (package-with-python2 python-toolz))
14519
14520 (define-public python-cytoolz
14521 (package
14522 (name "python-cytoolz")
14523 (version "0.9.0.1")
14524 (source
14525 (origin
14526 (method url-fetch)
14527 (uri (pypi-uri "cytoolz" version))
14528 (sha256
14529 (base32
14530 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
14531 (build-system python-build-system)
14532 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
14533 ;; 'exceptions'"
14534 (arguments '(#:tests? #f))
14535 (propagated-inputs
14536 `(("python-toolz" ,python-toolz)))
14537 (native-inputs
14538 `(("python-cython" ,python-cython)))
14539 (home-page "https://github.com/pytoolz/cytoolz")
14540 (synopsis "High performance functional utilities")
14541 (description
14542 "The cytoolz package implements the same API as provided by toolz. The
14543 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
14544 that is accessible to other projects developed in Cython.")
14545 (license license:bsd-3)))
14546
14547 (define-public python-sortedcontainers
14548 (package
14549 (name "python-sortedcontainers")
14550 (version "2.0.4")
14551 (source
14552 (origin
14553 (method url-fetch)
14554 (uri (pypi-uri "sortedcontainers" version))
14555 (sha256
14556 (base32
14557 "10hrk2k0hbf9x78vd3f0lj277m1yzfhzzxr0hja718liwb398wk0"))))
14558 (build-system python-build-system)
14559 (native-inputs
14560 `(("python-tox" ,python-tox)))
14561 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
14562 (synopsis "Sorted List, Sorted Dict, Sorted Set")
14563 (description
14564 "This package provides a sorted collections library, written in
14565 pure-Python.")
14566 (license license:asl2.0)))
14567
14568 (define-public python-cloudpickle
14569 (package
14570 (name "python-cloudpickle")
14571 (version "0.6.1")
14572 (source
14573 (origin
14574 (method url-fetch)
14575 (uri (pypi-uri "cloudpickle" version))
14576 (sha256
14577 (base32
14578 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
14579 (build-system python-build-system)
14580 ;; FIXME: there are 5 errors in 122 tests:
14581 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
14582 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
14583 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
14584 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
14585 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
14586 ;; TypeError: cannot serialize '_io.BufferedRandom' object
14587 (arguments '(#:tests? #f))
14588 (native-inputs
14589 `(("python-pytest" ,python-pytest)
14590 ("python-mock" ,python-mock)
14591 ("python-tornado" ,python-tornado)))
14592 (home-page "https://github.com/cloudpipe/cloudpickle")
14593 (synopsis "Extended pickling support for Python objects")
14594 (description
14595 "Cloudpickle makes it possible to serialize Python constructs not
14596 supported by the default pickle module from the Python standard library. It
14597 is especially useful for cluster computing where Python expressions are
14598 shipped over the network to execute on remote hosts, possibly close to the
14599 data.")
14600 (license license:bsd-3)))
14601
14602 (define-public python2-cloudpickle
14603 (package-with-python2 python-cloudpickle))
14604
14605 (define-public python-locket
14606 (package
14607 (name "python-locket")
14608 (version "0.2.0")
14609 (source
14610 (origin
14611 (method url-fetch)
14612 (uri (pypi-uri "locket" version))
14613 (sha256
14614 (base32
14615 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
14616 (build-system python-build-system)
14617 (home-page "https://github.com/mwilliamson/locket.py")
14618 (synopsis "File-based locks for Python")
14619 (description
14620 "Locket implements a lock that can be used by multiple processes provided
14621 they use the same path.")
14622 (license license:bsd-2)))
14623
14624 (define-public python2-locket
14625 (package-with-python2 python-locket))
14626
14627 (define-public python-blosc
14628 (package
14629 (name "python-blosc")
14630 (version "1.5.1")
14631 (source
14632 (origin
14633 (method url-fetch)
14634 (uri (pypi-uri "blosc" version))
14635 (sha256
14636 (base32
14637 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
14638 (build-system python-build-system)
14639 ;; FIXME: all tests pass, but then this error is printed:
14640 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
14641 (arguments '(#:tests? #f))
14642 (propagated-inputs
14643 `(("python-numpy" ,python-numpy)))
14644 (home-page "https://github.com/blosc/python-blosc")
14645 (synopsis "Python wrapper for the Blosc data compressor library")
14646 (description "Blosc is a high performance compressor optimized for binary
14647 data. It has been designed to transmit data to the processor cache faster
14648 than the traditional, non-compressed, direct memory fetch approach via a
14649 @code{memcpy()} system call.
14650
14651 Blosc works well for compressing numerical arrays that contains data with
14652 relatively low entropy, like sparse data, time series, grids with
14653 regular-spaced values, etc.
14654
14655 This Python package wraps the Blosc library.")
14656 (license license:bsd-3)))
14657
14658 (define-public python2-blosc
14659 (package-with-python2 python-blosc))
14660
14661 (define-public python-partd
14662 (package
14663 (name "python-partd")
14664 (version "0.3.9")
14665 (source
14666 (origin
14667 (method url-fetch)
14668 (uri (pypi-uri "partd" version))
14669 (sha256
14670 (base32
14671 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
14672 (build-system python-build-system)
14673 (propagated-inputs
14674 `(("python-blosc" ,python-blosc)
14675 ("python-locket" ,python-locket)
14676 ("python-numpy" ,python-numpy)
14677 ("python-pandas" ,python-pandas)
14678 ("python-pyzmq" ,python-pyzmq)
14679 ("python-toolz" ,python-toolz)))
14680 (home-page "https://github.com/dask/partd/")
14681 (synopsis "Appendable key-value storage")
14682 (description "Partd stores key-value pairs. Values are raw bytes. We
14683 append on old values. Partd excels at shuffling operations.")
14684 (license license:bsd-3)))
14685
14686 (define-public python2-partd
14687 (package-with-python2 python-partd))
14688
14689 (define-public python-dask
14690 (package
14691 (name "python-dask")
14692 (version "1.0.0")
14693 (source
14694 (origin
14695 (method url-fetch)
14696 (uri (pypi-uri "dask" version))
14697 (sha256
14698 (base32
14699 "1xwz8h020ipwav2p5gcq9pskya1cvzd6hjyvd06dvr3w5lxlmym1"))))
14700 (build-system python-build-system)
14701 ;; A single test out of 5000+ fails. This test is marked as xfail when
14702 ;; pytest-xdist is used.
14703 (arguments
14704 `(#:phases
14705 (modify-phases %standard-phases
14706 (add-after 'unpack 'disable-broken-test
14707 (lambda _
14708 (substitute* "dask/tests/test_threaded.py"
14709 (("def test_interrupt\\(\\)" m)
14710 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
14711 m)))
14712 (when (which "python2")
14713 ;; This test fails with recent Pandas:
14714 ;; <https://github.com/dask/dask/issues/3794>.
14715 (substitute* "dask/dataframe/tests/test_dataframe.py"
14716 (("def test_info\\(\\)" m)
14717 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
14718 m))))
14719 #t))
14720 (replace 'check
14721 (lambda _ (invoke "pytest" "-vv"))))))
14722 (propagated-inputs
14723 `(("python-cloudpickle" ,python-cloudpickle)
14724 ("python-numpy" ,python-numpy)
14725 ("python-pandas" ,python-pandas)
14726 ("python-partd" ,python-partd)
14727 ("python-toolz" ,python-toolz)
14728 ("python-pyyaml" ,python-pyyaml)))
14729 (native-inputs
14730 `(("python-pytest" ,python-pytest)
14731 ("python-pytest-runner" ,python-pytest-runner)))
14732 (home-page "https://github.com/dask/dask/")
14733 (synopsis "Parallel computing with task scheduling")
14734 (description
14735 "Dask is a flexible parallel computing library for analytics. It
14736 consists of two components: dynamic task scheduling optimized for computation,
14737 and large data collections like parallel arrays, dataframes, and lists that
14738 extend common interfaces like NumPy, Pandas, or Python iterators to
14739 larger-than-memory or distributed environments. These parallel collections
14740 run on top of the dynamic task schedulers. ")
14741 (license license:bsd-3)))
14742
14743 (define-public python2-dask
14744 (package-with-python2 python-dask))
14745
14746 (define-public python-ilinkedlist
14747 (package
14748 (name "python-ilinkedlist")
14749 (version "0.4.0")
14750 (source
14751 (origin
14752 (method url-fetch)
14753 (uri (pypi-uri "ilinkedlist" version))
14754 (sha256
14755 (base32
14756 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
14757 (build-system python-build-system)
14758 (native-inputs `(("python-pytest" ,python-pytest)))
14759 (inputs `(("python" ,python)))
14760 (home-page "https://github.com/luther9/ilinkedlist-py")
14761 (synopsis "Immutable linked list library")
14762 (description
14763 "This is a implementation of immutable linked lists for Python. It
14764 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
14765 Since a linked list is treated as immutable, it is hashable, and its length
14766 can be retrieved in constant time. Some of the terminology is inspired by
14767 LISP. It is possible to create an improper list by creating a @code{Pair}
14768 with a non-list @code{cdr}.")
14769 (license license:gpl3+)))
14770
14771 (define-public python-readlike
14772 (package
14773 (name "python-readlike")
14774 (version "0.1.3")
14775 (source
14776 (origin
14777 (method url-fetch)
14778 (uri (pypi-uri "readlike" version))
14779 (sha256
14780 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
14781 (build-system python-build-system)
14782 (home-page "https://github.com/jangler/readlike")
14783 (synopsis "GNU Readline-like line editing module")
14784 (description
14785 "This Python module provides line editing functions similar to the default
14786 Emacs-style ones of GNU Readline. Unlike the Python standard library's
14787 @code{readline} package, this one allows access to those capabilties in settings
14788 outside of a standard command-line interface. It is especially well-suited to
14789 interfacing with Urwid, due to a shared syntax for describing key inputs.
14790
14791 Currently, all stateless Readline commands are implemented. Yanking and history
14792 are not supported.")
14793 (license license:expat)))
14794
14795 (define-public python2-readlike
14796 (package-with-python2 python-readlike))
14797
14798 (define-public python-reparser
14799 (package
14800 (name "python-reparser")
14801 (version "1.4.3")
14802 (source
14803 (origin
14804 (method url-fetch)
14805 (uri (pypi-uri "ReParser" version))
14806 (sha256
14807 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
14808 (build-system python-build-system)
14809 (home-page "https://github.com/xmikos/reparser")
14810 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
14811 (description
14812 "This Python library provides a simple lexer/parser for inline markup based
14813 on regular expressions.")
14814 (license license:expat)))
14815
14816 (define-public python2-reparser
14817 (let ((reparser (package-with-python2
14818 (strip-python2-variant python-reparser))))
14819 (package (inherit reparser)
14820 (propagated-inputs
14821 `(("python2-enum34" ,python2-enum34)
14822 ,@(package-propagated-inputs reparser))))))
14823
14824 (define-public python-precis-i18n
14825 (package
14826 (name "python-precis-i18n")
14827 (version "1.0.0")
14828 (source
14829 (origin
14830 (method url-fetch)
14831 (uri (pypi-uri "precis_i18n" version))
14832 (sha256
14833 (base32
14834 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
14835 (build-system python-build-system)
14836 (home-page "https://github.com/byllyfish/precis_i18n")
14837 (synopsis "Implementation of the PRECIS framework")
14838 (description
14839 "This module implements the PRECIS Framework as described in RFC 8264,
14840 RFC 8265 and RFC 8266.")
14841 (license license:expat)))
14842
14843 (define-public python-absl-py
14844 (package
14845 (name "python-absl-py")
14846 (version "0.6.1")
14847 (source
14848 (origin
14849 (method url-fetch)
14850 (uri (pypi-uri "absl-py" version))
14851 (sha256
14852 (base32
14853 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
14854 (build-system python-build-system)
14855 (propagated-inputs
14856 `(("python-six" ,python-six)))
14857 (home-page "https://github.com/abseil/abseil-py")
14858 (synopsis "Abseil Python common libraries")
14859 (description
14860 "This package provides the Abseil Python Common Libraries, a collection
14861 of Python libraries for building Python applications.")
14862 (license license:asl2.0)))
14863
14864 (define-public python-astor
14865 (package
14866 (name "python-astor")
14867 (version "0.7.1")
14868 (source
14869 (origin
14870 (method url-fetch)
14871 (uri (pypi-uri "astor" version))
14872 (sha256
14873 (base32
14874 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
14875 (build-system python-build-system)
14876 ;; FIXME: There are two errors and two test failures.
14877 (arguments `(#:tests? #f))
14878 (home-page "https://github.com/berkerpeksag/astor")
14879 (synopsis "Read and write Python ASTs")
14880 (description "Astor is designed to allow easy manipulation of Python
14881 source via the Abstract Syntax Tree.")
14882 (license license:bsd-3)))
14883
14884 (define-public python2-astor
14885 (package-with-python2 python-astor))
14886
14887 (define-public python-grpcio
14888 (package
14889 (name "python-grpcio")
14890 (version "1.17.1")
14891 (source
14892 (origin
14893 (method url-fetch)
14894 (uri (pypi-uri "grpcio" version))
14895 (sha256
14896 (base32
14897 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
14898 (build-system python-build-system)
14899 (propagated-inputs
14900 `(("python-six" ,python-six)))
14901 (home-page "https://grpc.io")
14902 (synopsis "HTTP/2-based RPC framework")
14903 (description "This package provides a Python library for communicating
14904 with the HTTP/2-based RPC framework gRPC.")
14905 (license license:asl2.0)))
14906
14907 (define-public python-astunparse
14908 (package
14909 (name "python-astunparse")
14910 (version "1.6.1")
14911 (source
14912 (origin
14913 (method url-fetch)
14914 (uri (pypi-uri "astunparse" version))
14915 (sha256
14916 (base32
14917 "1jhidwyrqn17avqh9xnnm3wd7q7aahaq009cba67g86y6gxicyyj"))))
14918 (build-system python-build-system)
14919 (arguments '(#:tests? #f)) ; there are none
14920 (propagated-inputs
14921 `(("python-six" ,python-six)
14922 ("python-wheel" ,python-wheel)))
14923 (home-page "https://github.com/simonpercivall/astunparse")
14924 (synopsis "AST unparser for Python")
14925 (description "This package provides an AST unparser for Python. It is a
14926 factored out version of @code{unparse} found in the Python source
14927 distribution.")
14928 (license license:bsd-3)))
14929
14930 (define-public python-gast
14931 (package
14932 (name "python-gast")
14933 (version "0.2.0")
14934 (source
14935 (origin
14936 (method url-fetch)
14937 (uri (pypi-uri "gast" version))
14938 (sha256
14939 (base32
14940 "0c296xm1vz9x4w4inmdl0k8mnc0i9arw94si2i7pglpc461r0s3h"))))
14941 (build-system python-build-system)
14942 (propagated-inputs
14943 `(("python-astunparse" ,python-astunparse)))
14944 (home-page "https://pypi.org/project/gast/")
14945 (synopsis "Generic Python AST that abstracts the underlying Python version")
14946 (description
14947 "GAST provides a compatibility layer between the AST of various Python
14948 versions, as produced by @code{ast.parse} from the standard @code{ast}
14949 module.")
14950 (license license:bsd-3)))
14951
14952 (define-public python-wikidata
14953 (package
14954 (name "python-wikidata")
14955 (version "0.6.1")
14956 (source
14957 (origin
14958 (method url-fetch)
14959 (uri (pypi-uri "Wikidata" version))
14960 (sha256
14961 (base32
14962 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
14963 (build-system python-build-system)
14964 (propagated-inputs
14965 `(("python-babel" ,python-babel)))
14966 (home-page "https://github.com/dahlia/wikidata")
14967 (synopsis "Wikidata client library")
14968 (description
14969 "This package provides a Python interface to
14970 @url{https://www.wikidata.org/, Wikidata}.")
14971 (properties '((upstream-name . "Wikidata")))
14972 (license license:gpl3+)))
14973
14974 (define-public python-doctest-ignore-unicode
14975 (package
14976 (name "python-doctest-ignore-unicode")
14977 (version "0.1.2")
14978 (source
14979 (origin
14980 (method url-fetch)
14981 (uri (pypi-uri "doctest-ignore-unicode" version))
14982 (sha256
14983 (base32
14984 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
14985 (build-system python-build-system)
14986 (native-inputs
14987 `(("python-nose" ,python-nose)))
14988 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
14989 (synopsis "Ignore Unicode literal prefixes in doctests")
14990 (description
14991 "This package adds support for a flag to ignore Unicode literal prefixes
14992 in doctests.")
14993 (license license:asl2.0)))
14994
14995 (define-public python-attr
14996 (package
14997 (name "python-attr")
14998 (version "0.3.1")
14999 (source
15000 (origin
15001 (method url-fetch)
15002 (uri (pypi-uri "attr" version))
15003 (sha256
15004 (base32
15005 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
15006 (build-system python-build-system)
15007 (home-page "https://github.com/denis-ryzhkov/attr")
15008 (synopsis "Decorator for attributes of target function or class")
15009 (description "Simple decorator to set attributes of target function or
15010 class in a @acronym{DRY, Don't Repeat Yourself} way.")
15011 (license license:expat)))
15012
15013 (define-public python-construct
15014 (package
15015 (name "python-construct")
15016 (version "2.9.45")
15017 (source
15018 (origin
15019 (method url-fetch)
15020 (uri (pypi-uri "construct" version))
15021 (sha256
15022 (base32
15023 "130iy05awzigm2xah2yvlmb08mac5bi4gzr5m3g7k1krs3ps0w92"))))
15024 (build-system python-build-system)
15025 (arguments
15026 `(#:tests? #f)) ; No tests exist.
15027 (propagated-inputs
15028 `(("python-extras" ,python-extras)
15029 ("python-arrow" ,python-arrow)
15030 ("python-numpy" ,python-numpy)
15031 ("python-ruamel.yaml" ,python-ruamel.yaml)))
15032 (home-page "http://construct.readthedocs.io")
15033 (synopsis "Declarative and symmetrical parser and builder for binary data")
15034 (description
15035 "This package provides both simple, atomic constructs (such as
15036 integers of various sizes), as well as composite ones which allow you
15037 form hierarchical and sequential structures of increasing complexity.
15038 It features bit and byte granularity, easy debugging and testing, an
15039 easy-to-extend subclass system, and lots of primitive constructs to
15040 make your work easier.")
15041 (license license:expat)))