gnu: python-wheel: Update to 0.32.2.
[jackhill/guix/guix.git] / gnu / packages / python-xyz.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
3 ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
4 ;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr>
5 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
6 ;;; Copyright © 2014, 2017 Eric Bavier <bavier@member.fsf.org>
7 ;;; Copyright © 2014, 2015 Federico Beffa <beffa@fbengineering.ch>
8 ;;; Copyright © 2015 Omar Radwan <toxemicsquire4@gmail.com>
9 ;;; Copyright © 2015 Pierre-Antoine Rault <par@rigelk.eu>
10 ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
11 ;;; Copyright © 2015, 2016 Christopher Allan Webber <cwebber@dustycloud.org>
12 ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
13 ;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
14 ;;; Copyright © 2015, 2016, 2017 Leo Famulari <leo@famulari.name>
15 ;;; Copyright © 2015, 2017 Ben Woodcroft <donttrustben@gmail.com>
16 ;;; Copyright © 2015, 2016 Erik Edrosa <erik.edrosa@gmail.com>
17 ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
18 ;;; Copyright © 2015, 2017 Kyle Meyer <kyle@kyleam.com>
19 ;;; Copyright © 2015, 2016 Chris Marusich <cmmarusich@gmail.com>
20 ;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
21 ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
22 ;;; Copyright © 2016, 2018 Hartmut Goebel <h.goebel@crazy-compilers.com>
23 ;;; Copyright © 2016 Daniel Pimentel <d4n1@d4n1.org>
24 ;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
25 ;;; Copyright © 2016, 2017 Troy Sankey <sankeytms@gmail.com>
26 ;;; Copyright © 2016, 2017 Nils Gillmann <ng0@n0.is>
27 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
28 ;;; Copyright © 2016 David Craven <david@craven.ch>
29 ;;; Copyright © 2016, 2017, 2018 Marius Bakke <mbakke@fastmail.com>
30 ;;; Copyright © 2016, 2017 Stefan Reichör <stefan@xsteve.at>
31 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
32 ;;; Copyright © 2016, 2017 Alex Vong <alexvong1995@gmail.com>
33 ;;; Copyright © 2016, 2017, 2018 Arun Isaac <arunisaac@systemreboot.net>
34 ;;; Copyright © 2016, 2017, 2018 Julien Lepiller <julien@lepiller.eu>
35 ;;; Copyright © 2016, 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
36 ;;; Copyright © 2016, 2017 Thomas Danckaert <post@thomasdanckaert.be>
37 ;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
38 ;;; Copyright © 2017 Frederick M. Muriithi <fredmanglis@gmail.com>
39 ;;; Copyright © 2017, 2018 Adriano Peluso <catonano@gmail.com>
40 ;;; Copyright © 2017 Ben Sturmfels <ben@sturm.com.au>
41 ;;; Copyright © 2017, 2018 Mathieu Othacehe <m.othacehe@gmail.com>
42 ;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.org>
43 ;;; Copyright © 2017 Roel Janssen <roel@gnu.org>
44 ;;; Copyright © 2017, 2018 Kei Kebreau <kkebreau@posteo.net>
45 ;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
46 ;;; Copyright © 2017 Muriithi Frederick Muriuki <fredmanglis@gmail.com>
47 ;;; Copyright © 2017 Brendan Tildesley <brendan.tildesley@openmailbox.org>
48 ;;; Copyright © 2018 Ethan R. Jones <ethanrjones97@gmail.com
49 ;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
50 ;;; Copyright © 2018 Vijayalakshmi Vedantham <vijimay12@gmail.com>
51 ;;; Copyright © 2018 Mathieu Lirzin <mthl@gnu.org>
52 ;;; Copyright © 2018 Adam Massmann <massmannak@gmail.com>
53 ;;; Copyright © 2016, 2018 Tomáš Čech <sleep_walker@gnu.org>
54 ;;; Copyright © 2018 Nicolas Goaziou <mail@nicolasgoaziou.fr>
55 ;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
56 ;;; Copyright © 2018 Clément Lassieur <clement@lassieur.org>
57 ;;; Copyright © 2018 Maxim Cournoyer <maxim.cournoyer@gmail.com>
58 ;;; Copyright © 2018 Luther Thompson <lutheroto@gmail.com>
59 ;;; Copyright © 2018 Vagrant Cascadian <vagrant@debian.org>
60 ;;;
61 ;;; This file is part of GNU Guix.
62 ;;;
63 ;;; GNU Guix is free software; you can redistribute it and/or modify it
64 ;;; under the terms of the GNU General Public License as published by
65 ;;; the Free Software Foundation; either version 3 of the License, or (at
66 ;;; your option) any later version.
67 ;;;
68 ;;; GNU Guix is distributed in the hope that it will be useful, but
69 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
70 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
71 ;;; GNU General Public License for more details.
72 ;;;
73 ;;; You should have received a copy of the GNU General Public License
74 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
75
76 (define-module (gnu packages python-xyz)
77 #:use-module ((guix licenses) #:prefix license:)
78 #:use-module (gnu packages)
79 #:use-module (gnu packages algebra)
80 #:use-module (gnu packages adns)
81 #:use-module (gnu packages attr)
82 #:use-module (gnu packages backup)
83 #:use-module (gnu packages bash)
84 #:use-module (gnu packages check)
85 #:use-module (gnu packages compression)
86 #:use-module (gnu packages crypto)
87 #:use-module (gnu packages databases)
88 #:use-module (gnu packages file)
89 #:use-module (gnu packages fontutils)
90 #:use-module (gnu packages gcc)
91 #:use-module (gnu packages geo)
92 #:use-module (gnu packages ghostscript)
93 #:use-module (gnu packages gl)
94 #:use-module (gnu packages glib)
95 #:use-module (gnu packages graphviz)
96 #:use-module (gnu packages graphics)
97 #:use-module (gnu packages gstreamer)
98 #:use-module (gnu packages gtk)
99 #:use-module (gnu packages icu4c)
100 #:use-module (gnu packages image)
101 #:use-module (gnu packages imagemagick)
102 #:use-module (gnu packages libevent)
103 #:use-module (gnu packages libffi)
104 #:use-module (gnu packages linux)
105 #:use-module (gnu packages llvm)
106 #:use-module (gnu packages man)
107 #:use-module (gnu packages maths)
108 #:use-module (gnu packages monitoring)
109 #:use-module (gnu packages multiprecision)
110 #:use-module (gnu packages networking)
111 #:use-module (gnu packages ncurses)
112 #:use-module (gnu packages openstack)
113 #:use-module (gnu packages pcre)
114 #:use-module (gnu packages perl)
115 #:use-module (gnu packages pkg-config)
116 #:use-module (gnu packages python)
117 #:use-module (gnu packages python-check)
118 #:use-module (gnu packages python-crypto)
119 #:use-module (gnu packages python-web)
120 #:use-module (gnu packages qt)
121 #:use-module (gnu packages readline)
122 #:use-module (gnu packages sdl)
123 #:use-module (gnu packages search)
124 #:use-module (gnu packages shells)
125 #:use-module (gnu packages ssh)
126 #:use-module (gnu packages terminals)
127 #:use-module (gnu packages tex)
128 #:use-module (gnu packages texinfo)
129 #:use-module (gnu packages time)
130 #:use-module (gnu packages tls)
131 #:use-module (gnu packages version-control)
132 #:use-module (gnu packages video)
133 #:use-module (gnu packages web)
134 #:use-module (gnu packages base)
135 #:use-module (gnu packages xml)
136 #:use-module (gnu packages xorg)
137 #:use-module (gnu packages xdisorg)
138 #:use-module (gnu packages tcl)
139 #:use-module (gnu packages bdw-gc)
140 #:use-module (guix packages)
141 #:use-module (guix download)
142 #:use-module (guix git-download)
143 #:use-module (guix utils)
144 #:use-module (guix build-system gnu)
145 #:use-module (guix build-system cmake)
146 #:use-module (guix build-system python)
147 #:use-module (guix build-system trivial)
148 #:use-module (srfi srfi-1)
149 #:use-module (srfi srfi-26))
150
151 (define-public python-psutil
152 (package
153 (name "python-psutil")
154 (version "5.4.3")
155 (source
156 (origin
157 (method url-fetch)
158 (uri (pypi-uri "psutil" version))
159 (sha256
160 (base32
161 "063v69x7spyclyaxrd3gmzj3p16q5ayg97xqhwb1kyn22a9pwip2"))))
162 (build-system python-build-system)
163 (arguments
164 ;; FIXME: some tests does not return and times out.
165 '(#:tests? #f))
166 (home-page "https://www.github.com/giampaolo/psutil")
167 (synopsis "Library for retrieving information on running processes")
168 (description
169 "psutil (Python system and process utilities) is a library for retrieving
170 information on running processes and system utilization (CPU, memory, disks,
171 network) in Python. It is useful mainly for system monitoring, profiling and
172 limiting process resources and management of running processes. It implements
173 many functionalities offered by command line tools such as: ps, top, lsof,
174 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
175 pidof, tty, taskset, pmap.")
176 (properties `((python2-variant . ,(delay python2-psutil))))
177 (license license:bsd-3)))
178
179 (define-public python2-psutil
180 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
181 (package
182 (inherit base)
183 (propagated-inputs
184 `(("python2-enum34" ,python2-enum34) ;optional
185 ,@(package-propagated-inputs base))))))
186
187 (define-public python-shapely
188 (package
189 (name "python-shapely")
190 (version "1.6.3")
191 (source
192 (origin
193 (method url-fetch)
194 (uri (pypi-uri "Shapely" version))
195 (sha256
196 (base32
197 "0svc58dzcw9gj92b4sgq35sdxkf85z0qwlzxarkzq4bp3h8jy58l"))))
198 (build-system python-build-system)
199 (native-inputs
200 `(("python-cython" ,python-cython)
201 ("python-matplotlib" ,python-matplotlib)
202 ("python-pytest" ,python-pytest)
203 ("python-pytest-cov" ,python-pytest-cov)))
204 (inputs
205 `(("geos" ,geos)))
206 (propagated-inputs
207 `(("python-numpy" ,python-numpy)))
208 (arguments
209 `(#:phases
210 (modify-phases %standard-phases
211 (add-after 'unpack 'patch-geos-path
212 (lambda* (#:key inputs #:allow-other-keys)
213 (let ((geos (assoc-ref inputs "geos"))
214 (glibc (assoc-ref inputs ,(if (%current-target-system)
215 "cross-libc" "libc"))))
216 (substitute* "shapely/geos.py"
217 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
218 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
219 geos "/lib/libgeos_c.so'])"))
220 (("free = load_dll\\('c'\\)\\.free")
221 (string-append "free = load_dll('c', fallbacks=['"
222 glibc "/lib/libc.so.6']).free"))))
223 #t)))))
224 (home-page "https://github.com/Toblerity/Shapely")
225 (synopsis "Library for the manipulation and analysis of geometric objects")
226 (description "Shapely is a Python package for manipulation and analysis of
227 planar geometric objects. It is based on the @code{GEOS} library.")
228 (license license:bsd-3)))
229
230 (define-public python-logwrap
231 (package
232 (name "python-logwrap")
233 (version "3.2.1")
234 (source
235 (origin
236 (method url-fetch)
237 (uri (pypi-uri "logwrap" version ".zip"))
238 (sha256
239 (base32
240 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
241 (build-system python-build-system)
242 (propagated-inputs
243 `(("python-six" ,python-six)
244 ("python-typing" ,python-typing)))
245 (native-inputs
246 `(("unzip" ,unzip)
247 ("python-cython" ,python-cython)
248 ("python-pytest" ,python-pytest)
249 ("python-pytest-cov" ,python-pytest-cov)
250 ("python-pytest-runner" ,python-pytest-runner)))
251 (home-page "https://github.com/penguinolog/logwrap")
252 (synopsis "Decorator for logging function arguments")
253 (description "This package provides a decorator to log function arguments
254 and function call return values in a human-readable way.")
255 (license license:asl2.0)))
256
257 (define-public python2-shapely
258 (package-with-python2 python-shapely))
259
260 (define-public python-clyent
261 (package
262 (name "python-clyent")
263 (version "1.2.1")
264 (source
265 (origin
266 (method url-fetch)
267 (uri (pypi-uri "clyent" version))
268 (sha256
269 (base32
270 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
271 (build-system python-build-system)
272 (native-inputs
273 `(("python-mock" ,python-mock)))
274 (home-page "https://github.com/binstar/clyent")
275 (synopsis "Command line client library")
276 (description "Clyent is a Python command line utiliy library. It is used
277 by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
278 (license license:bsd-3)))
279
280 (define-public python2-clyent
281 (package-with-python2 python-clyent))
282
283 (define-public python-babel
284 (package
285 (name "python-babel")
286 (version "2.6.0")
287 (source
288 (origin
289 (method url-fetch)
290 (uri (pypi-uri "Babel" version))
291 (sha256
292 (base32
293 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))
294 (build-system python-build-system)
295 (native-inputs
296 `(("python-freezegun" ,python-freezegun)
297 ("python-pytest" ,python-pytest)))
298 (propagated-inputs
299 `(("python-pytz" ,python-pytz)))
300 (arguments
301 `(#:phases (modify-phases %standard-phases
302 (replace 'check
303 (lambda _ (invoke "pytest" "-vv"))))))
304 (home-page "http://babel.pocoo.org/")
305 (synopsis
306 "Tools for internationalizing Python applications")
307 (description
308 "Babel is composed of two major parts:
309 - tools to build and work with gettext message catalogs
310 - a Python interface to the CLDR (Common Locale Data Repository), providing
311 access to various locale display names, localized number and date formatting,
312 etc. ")
313 (license license:bsd-3)))
314
315 (define-public python2-babel
316 (package-with-python2 python-babel))
317
318 (define-public python2-backport-ssl-match-hostname
319 (package
320 (name "python2-backport-ssl-match-hostname")
321 (version "3.5.0.1")
322 (source
323 (origin
324 (method url-fetch)
325 (uri (pypi-uri "backports.ssl_match_hostname" version))
326 (sha256
327 (base32
328 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
329 (build-system python-build-system)
330 (arguments
331 `(#:python ,python-2
332 #:tests? #f)) ; no test target
333 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
334 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
335 (description
336 "This backport brings the ssl.match_hostname() function to users of
337 earlier versions of Python. The function checks the hostname in the
338 certificate returned by the server to which a connection has been established,
339 and verifies that it matches the intended target hostname.")
340 (license license:psfl)))
341
342 (define-public python-hdf4
343 (package
344 (name "python-hdf4")
345 (version "0.9")
346 (source
347 (origin
348 (method url-fetch)
349 (uri (pypi-uri name version))
350 (sha256
351 (base32
352 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
353 (build-system python-build-system)
354 (native-inputs `(("nose" ,python-nose)))
355 (propagated-inputs `(("numpy" ,python-numpy)))
356 (inputs
357 `(("hdf4" ,hdf4)
358 ("libjpeg" ,libjpeg)
359 ("zlib" ,zlib)))
360 (arguments
361 `(#:phases
362 (modify-phases %standard-phases
363 (replace 'check
364 (lambda _
365 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
366 ;; on to import numpy. Somehow this works on their CI system.
367 ;; Let's just manage PYTHONPATH here instead.
368 (substitute* "runexamples.sh"
369 (("export PYTHONPATH=.*") ""))
370 (setenv "PYTHONPATH"
371 (string-append (getcwd) ":"
372 (getenv "PYTHONPATH")))
373 (invoke "./runexamples.sh")
374 (invoke "nosetests" "-v"))))))
375 (home-page "https://github.com/fhs/python-hdf4")
376 (synopsis "Python interface to the NCSA HDF4 library")
377 (description
378 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
379 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
380 NetCDF files can also be read and modified. Python-HDF4 is a fork of
381 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
382 (license license:expat)))
383
384 (define-public python2-hdf4
385 (package-with-python2 python-hdf4))
386
387 (define-public python-h5py
388 (package
389 (name "python-h5py")
390 (version "2.8.0")
391 (source
392 (origin
393 (method url-fetch)
394 (uri (pypi-uri "h5py" version))
395 (sha256
396 (base32
397 "0mdr6wrq02ac93m1aqx9kad0ppfzmm4imlxqgyy1x4l7hmdcc9p6"))))
398 (build-system python-build-system)
399 (arguments
400 `(#:tests? #f ; no test target
401 #:phases
402 (modify-phases %standard-phases
403 (add-after 'unpack 'fix-hdf5-paths
404 (lambda* (#:key inputs #:allow-other-keys)
405 (let ((prefix (assoc-ref inputs "hdf5")))
406 (substitute* "setup_build.py"
407 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
408 (string-append "['" prefix "/lib" "']"))
409 (("'/opt/local/include', '/usr/local/include'")
410 (string-append "'" prefix "/include" "'")))
411 (substitute* "setup_configure.py"
412 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
413 (string-append "['" prefix "/lib" "']")))
414 #t))))))
415 (propagated-inputs
416 `(("python-six" ,python-six)
417 ("python-numpy" ,python-numpy)))
418 (inputs
419 `(("hdf5" ,hdf5)))
420 (native-inputs
421 `(("python-cython" ,python-cython)
422 ("python-pkgconfig" ,python-pkgconfig)))
423 (home-page "http://www.h5py.org/")
424 (synopsis "Read and write HDF5 files from Python")
425 (description
426 "The h5py package provides both a high- and low-level interface to the
427 HDF5 library from Python. The low-level interface is intended to be a
428 complete wrapping of the HDF5 API, while the high-level component supports
429 access to HDF5 files, datasets and groups using established Python and NumPy
430 concepts.")
431 (license license:bsd-3)))
432
433 (define-public python2-h5py
434 (package-with-python2 python-h5py))
435
436 (define-public python-sh
437 (package
438 (name "python-sh")
439 (version "1.12.14")
440 (source
441 (origin
442 (method url-fetch)
443 (uri (pypi-uri "sh" version))
444 (sha256
445 (base32
446 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
447 (build-system python-build-system)
448 (arguments
449 '(#:phases
450 (modify-phases %standard-phases
451 (replace 'check
452 (lambda _
453 (invoke "python" "sh.py" "test"))))))
454 (native-inputs
455 `(("python-coverage" ,python-coverage)))
456 (home-page "https://github.com/amoffat/sh")
457 (synopsis "Python subprocess replacement")
458 (description "This package provides a replacement for Python's
459 @code{subprocess} feature.")
460 (license license:expat)))
461
462 (define-public python2-sh
463 (package-with-python2 python-sh))
464
465 (define-public python-cftime
466 (package
467 (name "python-cftime")
468 (version "1.0.3.4")
469 (source
470 (origin
471 (method url-fetch)
472 (uri (pypi-uri "cftime" version))
473 (sha256
474 (base32
475 "0362dhxbzk593walyjz30dll6y2y79wialik647cbwdsf3ad0x6x"))))
476 (build-system python-build-system)
477 (propagated-inputs
478 `(("python-numpy" ,python-numpy)))
479 (native-inputs
480 `(("python-coveralls" ,python-coveralls)
481 ("python-cython" ,python-cython)
482 ("python-pytest-cov" ,python-pytest-cov)))
483 (home-page "https://github.com/Unidata/cftime")
484 (synopsis "Library for time handling")
485 (description
486 "This package provides time-handling functionality that used to be part
487 of the netcdf4 package before.")
488 ;; This package claims to include code under the GPLv3 but is released
489 ;; under ISC.
490 (license (list license:isc license:gpl3+))))
491
492 (define-public python-netcdf4
493 (package
494 (name "python-netcdf4")
495 (version "1.4.2")
496 (source
497 (origin
498 (method url-fetch)
499 (uri (pypi-uri "netCDF4" version))
500 (sha256
501 (base32
502 "0c0sklgrmv15ygliin8qq0hp7vanmbi74m6zpi0r1ksr0hssyd5r"))))
503 (build-system python-build-system)
504 (arguments
505 '(#:phases
506 (modify-phases %standard-phases
507 (add-after 'unpack 'configure-locations
508 (lambda* (#:key inputs #:allow-other-keys)
509 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
510 #t)))))
511 (native-inputs
512 `(("python-cython" ,python-cython)))
513 (propagated-inputs
514 `(("python-numpy" ,python-numpy)
515 ("python-cftime" ,python-cftime)))
516 (inputs
517 `(("netcdf" ,netcdf)
518 ("hdf4" ,hdf4)
519 ("hdf5" ,hdf5)))
520 (home-page "https://github.com/Unidata/netcdf4-python")
521 (synopsis "Python/numpy interface to the netCDF library")
522 (description "Netcdf4-python is a Python interface to the netCDF C
523 library. netCDF version 4 has many features not found in earlier
524 versions of the library and is implemented on top of HDF5. This module
525 can read and write files in both the new netCDF 4 and the old netCDF 3
526 format, and can create files that are readable by HDF5 clients. The
527 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
528 to users of that module.")
529 ;; The software is mainly ISC, but includes some files covered
530 ;; by the Expat license.
531 (license (list license:isc license:expat))))
532
533 (define-public python2-netcdf4
534 (package-with-python2 python-netcdf4))
535
536 (define-public python-lockfile
537 (package
538 (name "python-lockfile")
539 (version "0.12.2")
540 (source
541 (origin
542 (method url-fetch)
543 (uri (pypi-uri "lockfile" version))
544 (sha256
545 (base32
546 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
547 (build-system python-build-system)
548 (arguments '(#:test-target "check"))
549 (native-inputs
550 `(("python-pbr" ,python-pbr)))
551 (home-page "https://launchpad.net/pylockfile")
552 (synopsis "Platform-independent file locking module")
553 (description
554 "The lockfile package exports a LockFile class which provides a simple
555 API for locking files.")
556 (license license:expat)))
557
558 (define-public python2-lockfile
559 (package-with-python2 python-lockfile))
560
561 (define-public python-semantic-version
562 (package
563 (name "python-semantic-version")
564 (version "2.6.0")
565 (source
566 (origin
567 (method url-fetch)
568 (uri (pypi-uri "semantic_version" version))
569 (sha256
570 (base32
571 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
572 (build-system python-build-system)
573 (arguments
574 `(#:tests? #f)) ; PyPI tarball lacks tests
575 (home-page "https://github.com/rbarrois/python-semanticversion")
576 (synopsis "Semantic versioning module for Python")
577 (description
578 "The @code{semantic_version} class is a small library for handling
579 @uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
580
581 It can compare versions, generate a new version that represents a bump in one of
582 the version levels, and check whether any given string is a proper semantic
583 version identifier.")
584 (license license:bsd-3)))
585
586 (define-public python2-semantic-version
587 (package-with-python2 python-semantic-version))
588
589 (define-public python-serpent
590 (package
591 (name "python-serpent")
592 (version "1.27")
593 (source
594 (origin
595 (method url-fetch)
596 (uri (pypi-uri "serpent" version))
597 (sha256
598 (base32
599 "04p9dsrm5pv8vhk3flvih55kgvlzpi38hlaykdiakddmgwqw93bg"))))
600 (build-system python-build-system)
601 (home-page "https://github.com/irmen/Serpent")
602 (synopsis "Serializer for literal Python expressions")
603 (description
604 "Serpent provides ast.literal_eval() compatible object tree
605 serialization. It serializes an object tree into bytes (utf-8 encoded string)
606 that can be decoded and then passed as-is to ast.literal_eval() to rebuild it
607 as the original object tree. As such it is safe to send serpent data to other
608 machines over the network for instance (because only safe literals are
609 encoded).")
610 (license license:expat)))
611
612 (define-public python-setuptools
613 (package
614 (name "python-setuptools")
615 (version "40.0.0")
616 (source
617 (origin
618 (method url-fetch)
619 (uri (pypi-uri "setuptools" version ".zip"))
620 (sha256
621 (base32
622 "0pq116lr14gnc62v76nk0npkm6krb2mpp7p9ab369zgv4n7dnah1"))
623 (modules '((guix build utils)))
624 (snippet
625 '(begin
626 ;; Remove included binaries which are used to build self-extracting
627 ;; installers for Windows.
628 ;; TODO: Find some way to build them ourself so we can include them.
629 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
630 #t))))
631 (build-system python-build-system)
632 ;; FIXME: Tests require pytest, which itself relies on setuptools.
633 ;; One could bootstrap with an internal untested setuptools.
634 (arguments
635 `(#:tests? #f))
636 (home-page "https://pypi.python.org/pypi/setuptools")
637 (synopsis
638 "Library designed to facilitate packaging Python projects")
639 (description
640 "Setuptools is a fully-featured, stable library designed to facilitate
641 packaging Python projects, where packaging includes:
642 Python package and module definitions,
643 distribution package metadata,
644 test hooks,
645 project installation,
646 platform-specific details,
647 Python 3 support.")
648 ;; TODO: setuptools now bundles the following libraries:
649 ;; packaging, pyparsing, six and appdirs. How to unbundle?
650 (license (list license:psfl ; setuptools itself
651 license:expat ; six, appdirs, pyparsing
652 license:asl2.0 ; packaging is dual ASL2/BSD-2
653 license:bsd-2))))
654
655 (define-public python2-setuptools
656 (package-with-python2 python-setuptools))
657
658 (define-public python-uniseg
659 (package
660 (name "python-uniseg")
661 (version "0.7.1")
662 (source
663 (origin
664 (method url-fetch)
665 (uri (pypi-uri "uniseg" version ".zip"))
666 (sha256
667 (base32
668 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
669 (build-system python-build-system)
670 (arguments
671 '(#:tests? #f)) ; The test suite requires network access.
672 (native-inputs
673 `(("unzip" ,unzip)))
674 (home-page
675 "https://bitbucket.org/emptypage/uniseg-python")
676 (synopsis
677 "Python library to determine Unicode text segmentations")
678 (description
679 "Uniseg is a Python package used to determine Unicode text segmentations.
680 Supported segmentations include:
681 @enumerate
682 @item @dfn{Code point} (any value in the Unicode codespace)
683 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
684 multiple Unicode code points, e.g. \"G\" + acute-accent)
685 @item Word break
686 @item Sentence break
687 @item Line break
688 @end enumerate")
689 (license license:expat)))
690
691 (define-public python2-uniseg
692 (package-with-python2 python-uniseg))
693
694 (define-public python-humanfriendly
695 (package
696 (name "python-humanfriendly")
697 (version "4.4.1")
698 (source
699 (origin
700 (method url-fetch)
701 (uri (pypi-uri "humanfriendly" version))
702 (sha256
703 (base32
704 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
705 (build-system python-build-system)
706 (arguments
707 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
708 #:tests? #f))
709 (propagated-inputs
710 `(("python-monotonic" ,python-monotonic)))
711 (home-page "https://humanfriendly.readthedocs.io")
712 (synopsis "Human-friendly input and output in Python")
713 (description
714 "The functions and classes in @code{humanfriendly} can be used to make
715 text interfaces more user-friendly. It includes tools to parse and format
716 numbers, file sizes, and timespans, timers for long-running operations, menus
717 to allow the user to choose from a list of options, and terminal interaction
718 helpers.")
719 (license license:expat)))
720
721 (define-public python2-humanfriendly
722 (package-with-python2 python-humanfriendly))
723
724 (define-public python-capturer
725 (package
726 (name "python-capturer")
727 (version "2.4")
728 (source
729 (origin
730 (method url-fetch)
731 (uri (pypi-uri "capturer" version))
732 (sha256
733 (base32
734 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
735 (build-system python-build-system)
736 (arguments
737 `(#:tests? #f))
738 (propagated-inputs
739 `(("python-humanfriendly" ,python-humanfriendly)))
740 (home-page "https://capturer.readthedocs.io")
741 (synopsis "Capture stdout and stderr streams of the current process")
742 (description
743 "The capturer package makes it easy to capture the stdout and stderr
744 streams of the current process and subprocesses. Output can be relayed
745 to the terminal in real time but is also available to the Python program
746 for additional processing.")
747 (license license:expat)))
748
749 (define-public python2-capturer
750 (package-with-python2 python-capturer))
751
752 (define-public python-case
753 (package
754 (name "python-case")
755 (version "1.5.3")
756 (source
757 (origin
758 (method url-fetch)
759 (uri (pypi-uri "case" version))
760 (sha256
761 (base32
762 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
763 (build-system python-build-system)
764 (propagated-inputs
765 `(("python-mock" ,python-mock)
766 ("python-nose" ,python-nose)
767 ("python-six" ,python-six)
768 ("python-unittest2" ,python-unittest2)))
769 (native-inputs
770 `(("python-coverage" ,python-coverage)))
771 (home-page "https://github.com/celery/case")
772 (synopsis "Unittest utilities and convenience methods")
773 (description
774 "The @code{case} package provides utilities on top of unittest, including
775 some helpful Python 2 compatibility convenience methods.")
776 (license license:bsd-3)))
777
778 (define-public python-verboselogs
779 (package
780 (name "python-verboselogs")
781 (version "1.7")
782 (source
783 (origin
784 (method url-fetch)
785 (uri (pypi-uri "verboselogs" version))
786 (sha256
787 (base32
788 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
789 (build-system python-build-system)
790 (native-inputs
791 `(("python-mock" ,python-mock)
792 ("python-astroid" ,python-astroid)
793 ("python-pylint" ,python-pylint)))
794 (home-page "https://verboselogs.readthedocs.io")
795 (synopsis "Verbose logging level for Python's logging module")
796 (description
797 "The @code{verboselogs} package extends Python's @code{logging} module to
798 add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
799 (license license:expat)))
800
801 (define-public python2-verboselogs
802 (package-with-python2 python-verboselogs))
803
804 (define-public python-coloredlogs
805 (package
806 (name "python-coloredlogs")
807 (version "7.3")
808 (source
809 (origin
810 (method url-fetch)
811 (uri (pypi-uri "coloredlogs" version))
812 (sha256
813 (base32
814 "1blcann6dyg5dhps9pg12rn0q0rjrlajpmmil0gy0j4cbvnl2il9"))))
815 (build-system python-build-system)
816 (arguments
817 `(;Tests require some updated modules
818 #:tests? #f))
819 (propagated-inputs
820 `(("python-capturer" ,python-capturer)))
821 (home-page "https://coloredlogs.readthedocs.io")
822 (synopsis "Colored stream handler for Python's logging module")
823 (description
824 "The @code{coloredlogs} package enables colored terminal output for
825 Python's logging module. The @code{ColoredFormatter} class inherits from
826 @code{logging.Formatter} and uses ANSI escape sequences to render your logging
827 messages in color.")
828 (license license:expat)))
829
830 (define-public python2-coloredlogs
831 (package-with-python2 python-coloredlogs))
832
833 (define-public python-eventlet
834 (package
835 (name "python-eventlet")
836 (version "0.20.1")
837 (source
838 (origin
839 (method url-fetch)
840 (uri (pypi-uri "eventlet" version))
841 (sha256
842 (base32
843 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
844 (build-system python-build-system)
845 (propagated-inputs
846 `(("python-greenlet" ,python-greenlet)))
847 (arguments
848 ;; TODO: Requires unpackaged 'enum-compat'.
849 '(#:tests? #f))
850 (home-page "http://eventlet.net")
851 (synopsis "Concurrent networking library for Python")
852 (description
853 "Eventlet is a concurrent networking library for Python that
854 allows you to change how you run your code, not how you write it.
855 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
856 Coroutines ensure that the developer uses a blocking style of programming
857 that is similar to threading, but provide the benefits of non-blocking I/O.
858 The event dispatch is implicit, which means you can easily use @code{Eventlet}
859 from the Python interpreter, or as a small part of a larger application.")
860 (license license:expat)))
861
862 (define-public python2-eventlet
863 (let ((base (package-with-python2
864 (strip-python2-variant python-eventlet))))
865 (package (inherit base)
866 (propagated-inputs
867 `(("python2-enum34" ,python2-enum34)
868 ,@(package-propagated-inputs base))))))
869
870 (define-public python-six
871 (package
872 (name "python-six")
873 (version "1.11.0")
874 (source
875 (origin
876 (method url-fetch)
877 (uri (pypi-uri "six" version))
878 (sha256
879 (base32
880 "1scqzwc51c875z23phj48gircqjgnn3af8zy2izjwmnlxrxsgs3h"))))
881 (build-system python-build-system)
882 (arguments
883 `(#:phases
884 (modify-phases %standard-phases
885 (replace 'check
886 (lambda _
887 (invoke "py.test" "-v"))))))
888 (native-inputs
889 `(("python-py" ,python-py)
890 ("python-pytest" ,python-pytest-bootstrap)))
891 (home-page "https://pypi.python.org/pypi/six/")
892 (synopsis "Python 2 and 3 compatibility utilities")
893 (description
894 "Six is a Python 2 and 3 compatibility library. It provides utility
895 functions for smoothing over the differences between the Python versions with
896 the goal of writing Python code that is compatible on both Python versions.
897 Six supports every Python version since 2.5. It is contained in only one
898 Python file, so it can be easily copied into your project.")
899 (license license:x11)))
900
901 (define-public python2-six
902 (package-with-python2 python-six))
903
904 (define-public python-six-bootstrap
905 (package
906 (inherit python-six)
907 (name "python-six-bootstrap")
908 (native-inputs `())
909 (arguments `(#:tests? #f))))
910
911 (define-public python2-six-bootstrap
912 (package-with-python2 python-six-bootstrap))
913
914 (define-public python-schedule
915 (package
916 (name "python-schedule")
917 (version "0.4.3")
918 (source
919 (origin
920 (method url-fetch)
921 (uri (pypi-uri "schedule" version))
922 (sha256
923 (base32
924 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
925 (build-system python-build-system)
926 (native-inputs
927 `(("python-pytest" ,python-pytest)
928 ("python-mock" ,python-mock)))
929 (home-page "https://github.com/dbader/schedule")
930 (synopsis "Schedule periodic function calls in Python")
931 (description
932 "Schedule is an in-process scheduler for periodic jobs that uses the
933 builder pattern for configuration. Schedule lets you run Python functions (or
934 any other callable) periodically at pre-determined intervals using a simple,
935 human-friendly syntax.")
936 (license license:expat)))
937
938 (define-public python2-schedule
939 (package-with-python2 python-schedule))
940
941 (define-public python-pandas
942 (package
943 (name "python-pandas")
944 (version "0.23.4")
945 (source
946 (origin
947 (method url-fetch)
948 (uri (pypi-uri "pandas" version))
949 (sha256
950 (base32 "1x54pd7hr3y7qahx6b5bf2wzj54xvl8r3s1h4pl254pnmi3wl92v"))))
951 (build-system python-build-system)
952 (arguments
953 `(#:modules ((guix build utils)
954 (guix build python-build-system)
955 (ice-9 ftw)
956 (srfi srfi-26))
957 #:phases (modify-phases %standard-phases
958 (replace 'check
959 (lambda _
960 (let ((build-directory
961 (string-append
962 (getcwd) "/build/"
963 (car (scandir "build"
964 (cut string-prefix? "lib." <>))))))
965 ;; Disable the "strict data files" option which causes
966 ;; the build to error out if required data files are not
967 ;; available (as is the case with PyPI archives).
968 (substitute* "setup.cfg"
969 (("addopts = --strict-data-files") "addopts = "))
970 (with-directory-excursion build-directory
971 ;; Delete tests that require "moto" which is not yet in Guix.
972 (for-each delete-file
973 '("pandas/tests/io/conftest.py"
974 "pandas/tests/io/json/test_compression.py"
975 "pandas/tests/io/parser/test_network.py"
976 "pandas/tests/io/test_excel.py"
977 "pandas/tests/io/test_parquet.py"))
978 (invoke "pytest" "-vv" "pandas" "--skip-slow"
979 "--skip-network" "-k"
980 ;; XXX: Due to the deleted tests above.
981 "not test_read_s3_jsonl"))))))))
982 (propagated-inputs
983 `(("python-numpy" ,python-numpy)
984 ("python-pytz" ,python-pytz)
985 ("python-dateutil" ,python-dateutil)))
986 (native-inputs
987 `(("python-cython" ,python-cython)
988 ("python-beautifulsoup4" ,python-beautifulsoup4)
989 ("python-lxml" ,python-lxml)
990 ("python-html5lib" ,python-html5lib)
991 ("python-nose" ,python-nose)
992 ("python-pytest" ,python-pytest)))
993 (home-page "https://pandas.pydata.org")
994 (synopsis "Data structures for data analysis, time series, and statistics")
995 (description
996 "Pandas is a Python package providing fast, flexible, and expressive data
997 structures designed to make working with structured (tabular,
998 multidimensional, potentially heterogeneous) and time series data both easy
999 and intuitive. It aims to be the fundamental high-level building block for
1000 doing practical, real world data analysis in Python.")
1001 (license license:bsd-3)))
1002
1003 (define-public python2-pandas
1004 (package-with-python2 python-pandas))
1005
1006 (define-public python2-mechanize
1007 (package
1008 (name "python2-mechanize")
1009 (version "0.2.5")
1010 (source
1011 (origin
1012 (method url-fetch)
1013 (uri (pypi-uri "mechanize" version))
1014 (sha256
1015 (base32
1016 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1017 (build-system python-build-system)
1018 (arguments
1019 `(#:python ,python-2 ; apparently incompatible with Python 3
1020 #:tests? #f))
1021 ;; test fails with message
1022 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1023 ;; (python-3.3.2) or
1024 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1025 ;; (python-2.7.5).
1026 ;; The source code is from March 2011 and probably not up-to-date
1027 ;; with respect to python unit tests.
1028 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1029 (synopsis
1030 "Stateful programmatic web browsing in Python")
1031 (description
1032 "Mechanize implements stateful programmatic web browsing in Python,
1033 after Andy Lester’s Perl module WWW::Mechanize.")
1034 (license (license:non-copyleft
1035 "file://COPYING"
1036 "See COPYING in the distribution."))))
1037
1038
1039 (define-public python-simplejson
1040 (package
1041 (name "python-simplejson")
1042 (version "3.14.0")
1043 (source
1044 (origin
1045 (method url-fetch)
1046 (uri (pypi-uri "simplejson" version))
1047 (sha256
1048 (base32
1049 "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy"))))
1050 (build-system python-build-system)
1051 (home-page "http://simplejson.readthedocs.org/en/latest/")
1052 (synopsis
1053 "Json library for Python")
1054 (description
1055 "JSON (JavaScript Object Notation) is a subset of JavaScript
1056 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1057 format.
1058
1059 Simplejson exposes an API familiar to users of the standard library marshal
1060 and pickle modules. It is the externally maintained version of the json
1061 library contained in Python 2.6, but maintains compatibility with Python 2.5
1062 and (currently) has significant performance advantages, even without using
1063 the optional C extension for speedups. Simplejson is also supported on
1064 Python 3.3+.")
1065 (license license:x11)))
1066
1067 (define-public python2-simplejson
1068 (package-with-python2 python-simplejson))
1069
1070
1071 (define-public python-pyicu
1072 (package
1073 (name "python-pyicu")
1074 (version "2.2")
1075 (source
1076 (origin
1077 (method url-fetch)
1078 (uri (pypi-uri "PyICU" version))
1079 (sha256
1080 (base32
1081 "0wq9y5fi1ighgf5aws9nr87vi1w44p7q1k83rx2y3qj5d2xyhspa"))))
1082 (build-system python-build-system)
1083 (inputs
1084 `(("icu4c" ,icu4c)))
1085 (native-inputs
1086 `(("python-pytest" ,python-pytest)
1087 ("python-six" ,python-six)))
1088 (home-page "https://github.com/ovalhub/pyicu")
1089 (synopsis "Python extension wrapping the ICU C++ API")
1090 (description
1091 "PyICU is a python extension wrapping the ICU C++ API.")
1092 (properties `((python2-variant . ,(delay python2-pyicu))))
1093 (license license:x11)))
1094
1095 (define-public python2-pyicu
1096 (let ((base (package-with-python2
1097 (strip-python2-variant python-pyicu))))
1098 (package
1099 (inherit base)
1100 (arguments
1101 `(,@(package-arguments base)
1102 #:phases
1103 (modify-phases %standard-phases
1104 (add-before 'check 'delete-failing-test
1105 (λ _
1106 ;; XXX: This fails due to Unicode issues unique to Python 2,
1107 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1108 (delete-file "test/test_Script.py")
1109 #t))))))))
1110
1111 (define-public python2-dogtail
1112 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1113 ;; spaces in indentation" with Python 3.
1114 (package
1115 (name "python2-dogtail")
1116 (version "0.9.9")
1117 (source (origin
1118 (method url-fetch)
1119 (uri (pypi-uri "dogtail" version))
1120 (sha256
1121 (base32
1122 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1123 (build-system python-build-system)
1124 (arguments `(#:python ,python-2
1125 #:tests? #f)) ; invalid command "test"
1126 ;; Currently no offical homepage.
1127 (home-page "https://pypi.python.org/pypi/dogtail/")
1128 (synopsis "GUI test tool and automation framework written in Python")
1129 (description
1130 "Dogtail is a GUI test tool and automation framework written in Python.
1131 It uses Accessibility (a11y) technologies to communicate with desktop
1132 applications. dogtail scripts are written in Python and executed like any
1133 other Python program.")
1134 (license license:gpl2+)))
1135
1136 (define-public python-empy
1137 (package
1138 (name "python-empy")
1139 (version "3.3")
1140 (source (origin
1141 (method url-fetch)
1142 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1143 version ".tar.gz"))
1144 (sha256
1145 (base32
1146 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1147 (build-system python-build-system)
1148 (arguments
1149 `(#:tests? #f)) ;python2 only
1150 (home-page "http://www.alcyone.com/software/empy/")
1151 (synopsis "Templating system for Python")
1152 (description
1153 "EmPy is a system for embedding Python expressions and statements in
1154 template text; it takes an EmPy source file, processes it, and produces
1155 output. This is accomplished via expansions, which are special signals to the
1156 EmPy system and are set off by a special prefix (by default the at sign, @@).
1157 EmPy can expand arbitrary Python expressions and statements in this way, as
1158 well as a variety of special forms. Textual data not explicitly delimited in
1159 this way is sent unaffected to the output, allowing Python to be used in
1160 effect as a markup language. Also supported are callbacks via hooks,
1161 recording and playback via diversions, and dynamic, chainable filters. The
1162 system is highly configurable via command line options and embedded
1163 commands.")
1164 (license license:lgpl2.1+)))
1165
1166 (define-public python2-empy
1167 (package-with-python2 python-empy))
1168
1169 (define-public python2-element-tree
1170 (package
1171 (name "python2-element-tree")
1172 (version "1.2.6")
1173 (source (origin
1174 (method url-fetch)
1175 (uri (string-append
1176 "http://effbot.org/media/downloads/elementtree-"
1177 version "-20050316.tar.gz"))
1178 (sha256
1179 (base32
1180 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1181 (build-system python-build-system)
1182 (arguments
1183 `(#:python ,python-2 ; seems to be part of Python 3
1184 #:tests? #f)) ; no 'test' sub-command
1185 (synopsis "Toolkit for XML processing in Python")
1186 (description
1187 "ElementTree is a Python library supporting lightweight XML processing.")
1188 (home-page "http://effbot.org/zone/element-index.htm")
1189 (license (license:x11-style
1190 "http://docs.python.org/2/license.html"
1191 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1192
1193 (define-public python2-pybugz
1194 (package
1195 (name "python2-pybugz")
1196 (version "0.6.11")
1197 (source (origin
1198 (method url-fetch)
1199 (uri (string-append
1200 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1201 version ".tar.gz"))
1202 (sha256
1203 (base32
1204 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1205 (patches (search-patches "pybugz-stty.patch"
1206 "pybugz-encode-error.patch"))))
1207 (build-system python-build-system)
1208 (arguments
1209 `(#:python ,python-2 ; SyntaxError with Python 3
1210 #:tests? #f)) ; no 'test' sub-command
1211 (propagated-inputs
1212 `(("element-tree" ,python2-element-tree)))
1213 (synopsis "Python and command-line interface to Bugzilla")
1214 (description
1215 "PyBugz is a Python library and command-line tool to query the Bugzilla
1216 bug tracking system. It is meant as an aid to speed up interaction with the
1217 bug tracker.")
1218 (home-page "http://www.liquidx.net/pybugz/")
1219 (license license:gpl2)))
1220
1221 (define-public python2-enum
1222 (package
1223 (name "python2-enum")
1224 (version "0.4.6")
1225 (source (origin
1226 (method url-fetch)
1227 (uri (pypi-uri "enum" version))
1228 (sha256
1229 (base32
1230 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1231 (build-system python-build-system)
1232 (arguments
1233 `(#:python ,python-2))
1234 (home-page "http://pypi.python.org/pypi/enum/")
1235 (synopsis "Robust enumerated type support in Python")
1236 (description
1237 "This provides a module for robust enumerations in Python. It has
1238 been superseded by the Python standard library and is provided only for
1239 compatibility.")
1240 ;; Choice of either license.
1241 (license (list license:gpl3+ license:psfl))))
1242
1243 (define-public python-enum34
1244 (package
1245 (name "python-enum34")
1246 (version "1.1.6")
1247 (source
1248 (origin
1249 (method url-fetch)
1250 (uri (pypi-uri "enum34" version))
1251 (sha256
1252 (base32
1253 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1254 (build-system python-build-system)
1255 (home-page "https://pypi.python.org/pypi/enum34")
1256 (synopsis "Backported Python 3.4 Enum")
1257 (description
1258 "Enum34 is the new Python stdlib enum module available in Python 3.4
1259 backported for previous versions of Python from 2.4 to 3.3.")
1260 (license license:bsd-3)))
1261
1262 (define-public python2-enum34
1263 (package-with-python2 python-enum34))
1264
1265 (define-public python-parse-type
1266 (package
1267 (name "python-parse-type")
1268 (version "0.4.2")
1269 (source
1270 (origin
1271 (method url-fetch)
1272 (uri (pypi-uri "parse_type" version))
1273 (sha256
1274 (base32
1275 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1276 (build-system python-build-system)
1277 (propagated-inputs
1278 `(("python-six" ,python-six)
1279 ("python-parse" ,python-parse)))
1280 (native-inputs
1281 `(("python-pytest" ,python-pytest)
1282 ("python-pytest-runner" ,python-pytest-runner)))
1283 (home-page "https://github.com/jenisys/parse_type")
1284 (synopsis "Extended parse module")
1285 (description
1286 "Parse_type extends the python parse module.")
1287 (properties
1288 `((python2-variant . ,(delay python2-parse-type))))
1289 (license license:bsd-3)))
1290
1291 (define-public python2-parse-type
1292 (let ((base (package-with-python2
1293 (strip-python2-variant python-parse-type))))
1294 (package (inherit base)
1295 (propagated-inputs
1296 `(("python2-enum34" ,python2-enum34)
1297 ,@(package-propagated-inputs base))))))
1298
1299 (define-public python-parse
1300 (package
1301 (name "python-parse")
1302 (version "1.8.4")
1303 (source
1304 (origin
1305 (method url-fetch)
1306 (uri (pypi-uri "parse" version))
1307 (sha256
1308 (base32
1309 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
1310 (build-system python-build-system)
1311 (arguments
1312 `(#:phases
1313 (modify-phases %standard-phases
1314 (replace 'check
1315 (lambda _ (invoke "python" "test_parse.py"))))))
1316 (home-page "https://github.com/r1chardj0n3s/parse")
1317 (synopsis "Parse strings")
1318 (description
1319 "Parse strings using a specification based on the Python @code{format()}
1320 syntax.")
1321 (license license:x11)))
1322
1323 (define-public python-polib
1324 (package
1325 (name "python-polib")
1326 (version "1.0.8")
1327 (source (origin
1328 (method url-fetch)
1329 (uri (pypi-uri "polib" version))
1330 (sha256
1331 (base32
1332 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1333 (build-system python-build-system)
1334 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1335 (synopsis "Manipulate, create and modify gettext files")
1336 (description "Polib can manipulate any gettext format (po, pot and mo)
1337 files. It can be used to create po files from scratch or to modify
1338 existing ones.")
1339 (license license:expat)))
1340
1341 (define-public python2-polib
1342 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1343 (package
1344 (inherit base)
1345 (arguments `(,@(package-arguments base)
1346 ;; Tests don't work with python2.
1347 #:tests? #f)))))
1348
1349 (define-public scons
1350 (package
1351 (name "scons")
1352 (version "3.0.3")
1353 (source (origin
1354 (method git-fetch)
1355 (uri (git-reference
1356 (url "https://github.com/SCons/scons.git")
1357 (commit version)))
1358 (file-name (git-file-name name version))
1359 (sha256
1360 (base32
1361 "1xizkjgrvydkjhpv7i5rx0mdkp3618sis7jsckjh57nxcynlk5dc"))))
1362 (build-system python-build-system)
1363 (arguments
1364 `(#:use-setuptools? #f ; still relies on distutils
1365 #:tests? #f ; no 'python setup.py test' command
1366 #:phases
1367 (modify-phases %standard-phases
1368 (add-before 'build 'bootstrap
1369 (lambda _
1370 (substitute* "src/engine/SCons/compat/__init__.py"
1371 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
1372 "sys.modules[new] = __import__(old)"))
1373 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
1374 (chdir "build/scons")
1375 #t)))))
1376 (home-page "http://scons.org/")
1377 (synopsis "Software construction tool written in Python")
1378 (description
1379 "SCons is a software construction tool. Think of SCons as an improved,
1380 cross-platform substitute for the classic Make utility with integrated
1381 functionality similar to autoconf/automake and compiler caches such as ccache.
1382 In short, SCons is an easier, more reliable and faster way to build
1383 software.")
1384 (license license:x11)))
1385
1386 (define-public scons-python2
1387 (package
1388 (inherit (package-with-python2 scons))
1389 (name "scons-python2")))
1390
1391 (define-public python-extras
1392 (package
1393 (name "python-extras")
1394 (version "1.0.0")
1395 (source
1396 (origin
1397 (method url-fetch)
1398 (uri (pypi-uri "extras" version))
1399 (sha256
1400 (base32
1401 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1402 (build-system python-build-system)
1403 (arguments
1404 ;; FIXME: Circular dependency on testtools.
1405 '(#:tests? #f))
1406 (home-page "https://github.com/testing-cabal/extras")
1407 (synopsis "Useful extensions to the Python standard library")
1408 (description
1409 "Extras is a set of extensions to the Python standard library.")
1410 (license license:expat)))
1411
1412 (define-public python2-extras
1413 (package-with-python2 python-extras))
1414
1415 (define-public python-mimeparse
1416 (package
1417 (name "python-mimeparse")
1418 (version "1.6.0")
1419 (source
1420 (origin
1421 (method url-fetch)
1422 (uri (pypi-uri "python-mimeparse" version))
1423 (sha256
1424 (base32
1425 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
1426 (build-system python-build-system)
1427 (arguments
1428 '(#:phases
1429 (modify-phases %standard-phases
1430 (replace 'check
1431 (lambda _
1432 (invoke "./mimeparse_test.py"))))))
1433 (home-page
1434 "https://github.com/dbtsai/python-mimeparse")
1435 (synopsis "Python library for parsing MIME types")
1436 (description
1437 "Mimeparse provides basic functions for parsing MIME type names and
1438 matching them against a list of media-ranges.")
1439 (license license:expat)))
1440
1441 (define-public python2-mimeparse
1442 (package-with-python2 python-mimeparse))
1443
1444 (define-public python-miniboa
1445 (package
1446 (name "python-miniboa")
1447 (version "1.0.7")
1448 (source
1449 (origin
1450 (method url-fetch)
1451 (uri (pypi-uri "miniboa" version))
1452 (sha256
1453 (base32
1454 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
1455 (build-system python-build-system)
1456 (home-page "https://github.com/shmup/miniboa")
1457 (synopsis "Simple, single-threaded Telnet server")
1458 (description
1459 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
1460 server.")
1461 (license license:asl2.0)))
1462
1463 (define-public python2-miniboa
1464 (package-with-python2 python-miniboa))
1465
1466 (define-public python-pafy
1467 (package
1468 (name "python-pafy")
1469 (version "0.5.3.1")
1470 (source
1471 (origin
1472 (method url-fetch)
1473 (uri (pypi-uri "pafy" version))
1474 (sha256
1475 (base32
1476 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1477 (build-system python-build-system)
1478 (arguments
1479 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1480 (propagated-inputs
1481 ;; Youtube-dl is a python package which is imported in the file
1482 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1483 `(("youtube-dl" ,youtube-dl)))
1484 (home-page "https://np1.github.io/pafy/")
1485 (synopsis "Retrieve YouTube content and metadata")
1486 (description
1487 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1488 (license license:lgpl3+)))
1489
1490 (define-public python2-funcsigs
1491 (package
1492 (name "python2-funcsigs")
1493 (version "1.0.2")
1494 (source (origin
1495 (method url-fetch)
1496 (uri (pypi-uri "funcsigs" version))
1497 (sha256
1498 (base32
1499 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1500 (build-system python-build-system)
1501 (arguments
1502 `(#:python ,python-2))
1503 (native-inputs
1504 `(("python2-unittest2" ,python2-unittest2)))
1505 (home-page "http://funcsigs.readthedocs.org")
1506 (synopsis "Python function signatures from PEP362")
1507 (description
1508 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1509 (license license:asl2.0)))
1510
1511 (define-public python2-funcsigs-bootstrap
1512 (package
1513 (inherit python2-funcsigs)
1514 (name "python2-funcsigs-bootstrap")
1515 (native-inputs `())
1516 (arguments
1517 `(#:tests? #f
1518 ,@(package-arguments python2-funcsigs)))))
1519
1520 (define-public python-py
1521 (package
1522 (name "python-py")
1523 (version "1.5.4")
1524 (source
1525 (origin
1526 (method url-fetch)
1527 (uri (pypi-uri "py" version))
1528 (sha256
1529 (base32
1530 "1xxvwfn82457djf55f5n2c94699rfqnk43br8fif2r2q8gvrmm9z"))))
1531 (build-system python-build-system)
1532 (arguments
1533 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1534 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1535 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1536 ;; Is this module globally installed?"
1537 '(#:tests? #f))
1538 (native-inputs
1539 `(("python-setuptools-scm" ,python-setuptools-scm)))
1540 (home-page "https://github.com/pytest-dev/py")
1541 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1542 (description
1543 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1544 code introspection, and logging.")
1545 (license license:expat)))
1546
1547 (define-public python2-py
1548 (package-with-python2 python-py))
1549
1550 ;; Recent versions of python-fixtures and python-testrepository need
1551 ;; python-pbr for packaging, which itself needs these two packages for
1552 ;; testing.
1553 ;; To fix this circular dependency, we use a build of python-pbr, based on the
1554 ;; same source, just without any test dependencies and with tests disabled.
1555 ;; python-pbr-minmal is then used to package python-fixtures and
1556 ;; python-testrepository.
1557 ;; Strictly speaking we currently could remove the test-requirements from the
1558 ;; normal python-pbr package (and save this package) since test are disabled
1559 ;; there anyway. But this may change in future.
1560 (define-public python-pbr-minimal
1561 (package
1562 (name "python-pbr-minimal")
1563 (version "3.0.1")
1564 (source
1565 (origin
1566 (method url-fetch)
1567 (uri (pypi-uri "pbr" version))
1568 (sha256
1569 (base32
1570 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
1571 (build-system python-build-system)
1572 (arguments
1573 `(#:tests? #f))
1574 (home-page "http://docs.openstack.org/developer/pbr/")
1575 (synopsis "Minimal build of python-pbr used for bootstrapping")
1576 (description
1577 "Used only for bootstrapping python2-pbr, you should not need this.")
1578 (license license:asl2.0)))
1579
1580 (define-public python2-pbr-minimal
1581 (package-with-python2 python-pbr-minimal))
1582
1583 (define-public python-pbr
1584 (package
1585 (inherit python-pbr-minimal)
1586 (name "python-pbr")
1587 (arguments
1588 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1589 (propagated-inputs
1590 `(("git" ,git))) ;; pbr actually uses the "git" binary.
1591 (native-inputs
1592 `(("python-fixtures" ,python-fixtures-bootstrap)
1593 ;; discover, coverage, hacking, subunit
1594 ("python-mock" ,python-mock)
1595 ("python-six" ,python-six)
1596 ("python-sphinx" ,python-sphinx)
1597 ("python-testrepository" ,python-testrepository-bootstrap)
1598 ("python-testresources" ,python-testresources-bootstrap)
1599 ("python-testscenarios" ,python-testscenarios-bootstrap)
1600 ("python-testtools" ,python-testtools-bootstrap)
1601 ("python-virtualenv" ,python-virtualenv)))
1602 (synopsis "Enhance the default behavior of Python’s setuptools")
1603 (description
1604 "Python Build Reasonableness (PBR) is a library that injects some useful
1605 and sensible default behaviors into your setuptools run. It will set
1606 versions, process requirements files and generate AUTHORS and ChangeLog file
1607 from git information.
1608 ")))
1609
1610 (define-public python2-pbr
1611 (package-with-python2 python-pbr))
1612
1613 (define-public python-exif-read
1614 (package
1615 (name "python-exif-read")
1616 (version "2.1.2")
1617 (source (origin
1618 (method url-fetch)
1619 (uri (pypi-uri "ExifRead" version))
1620 (sha256
1621 (base32
1622 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
1623 (build-system python-build-system)
1624 (arguments `(#:tests? #f)) ; no tests
1625 (home-page "https://github.com/ianare/exif-py")
1626 (synopsis "Python library to extract EXIF data from image files")
1627 (description
1628 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1629 files.")
1630 (license license:bsd-3)))
1631
1632 (define-public python2-exif-read
1633 (package-with-python2 python-exif-read))
1634
1635 (define-public python-pyld
1636 (package
1637 (name "python-pyld")
1638 (version "1.0.3")
1639 (source (origin
1640 (method url-fetch)
1641 (uri (pypi-uri "PyLD" version))
1642 (sha256
1643 (base32
1644 "12i2g6xdj30k7xxcibg3sc5y76snwq8l6n8fy9lyi577kgy0h2pm"))))
1645 (build-system python-build-system)
1646 (home-page "https://github.com/digitalbazaar/pyld")
1647 (synopsis "Python implementation of the JSON-LD specification")
1648 (description
1649 "PyLD is an implementation of the JSON-LD specification.")
1650 (license license:bsd-3)))
1651
1652 (define-public python2-pyld
1653 (package-with-python2 python-pyld))
1654
1655 (define-public python-click
1656 (package
1657 (name "python-click")
1658 (version "7.0")
1659 (source
1660 (origin
1661 (method url-fetch)
1662 (uri (pypi-uri "click" version))
1663 (sha256
1664 (base32
1665 "1mzjixd4vjbjvzb6vylki9w1556a9qmdh35kzmq6cign46av952v"))))
1666 (build-system python-build-system)
1667 (arguments
1668 `(#:phases
1669 (modify-phases %standard-phases
1670 (add-after 'unpack 'fix-paths
1671 (lambda* (#:key inputs #:allow-other-keys)
1672 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
1673 "cross-libc" "libc"))))
1674 (substitute* "click/_unicodefun.py"
1675 (("'locale'")
1676 (string-append "'" glibc "/bin/locale'"))))
1677 #t))
1678 (replace 'check
1679 (lambda _
1680 (invoke "python" "-m" "pytest"))))))
1681 (native-inputs
1682 `(("python-pytest" ,python-pytest)))
1683 (home-page "https://palletsprojects.com/p/click/")
1684 (synopsis "Command line library for Python")
1685 (description
1686 "Click is a Python package for creating command line interfaces in a
1687 composable way with as little code as necessary. Its name stands for
1688 \"Command Line Interface Creation Kit\". It's highly configurable but comes
1689 with sensible defaults out of the box.")
1690 (license license:bsd-3)))
1691
1692 (define-public python2-click
1693 (package-with-python2 python-click))
1694
1695 (define-public python-wheel
1696 (package
1697 (name "python-wheel")
1698 (version "0.32.3")
1699 (source
1700 (origin
1701 (method url-fetch)
1702 (uri (pypi-uri "wheel" version))
1703 (sha256
1704 (base32
1705 "1dhxl1bf18bx9szmqcnxbg6204hp3im8089q3hkwh5jfa6zh75q2"))))
1706 (build-system python-build-system)
1707 (native-inputs
1708 `(("python-jsonschema" ,python-jsonschema)
1709 ("python-pytest-cov" ,python-pytest-cov)))
1710 (home-page "https://bitbucket.org/pypa/wheel/")
1711 (synopsis "Format for built Python packages")
1712 (description
1713 "A wheel is a ZIP-format archive with a specially formatted filename and
1714 the @code{.whl} extension. It is designed to contain all the files for a PEP
1715 376 compatible install in a way that is very close to the on-disk format. Many
1716 packages will be properly installed with only the @code{Unpack} step and the
1717 unpacked archive preserves enough information to @code{Spread} (copy data and
1718 scripts to their final locations) at any later time. Wheel files can be
1719 installed with a newer @code{pip} or with wheel's own command line utility.")
1720 (license license:expat)
1721 (properties `((python2-variant . ,(delay python2-wheel))))))
1722
1723 (define-public python2-wheel
1724 (let ((wheel (package-with-python2
1725 (strip-python2-variant python-wheel))))
1726 (package (inherit wheel)
1727 (native-inputs `(("python2-functools32" ,python2-functools32)
1728 ,@(package-native-inputs wheel))))))
1729
1730 (define-public python-vcversioner
1731 (package
1732 (name "python-vcversioner")
1733 (version "2.16.0.0")
1734 (source
1735 (origin
1736 (method url-fetch)
1737 (uri (pypi-uri "vcversioner" version))
1738 (sha256
1739 (base32
1740 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
1741 (build-system python-build-system)
1742 (synopsis "Python library for version number discovery")
1743 (description "Vcversioner is a Python library that inspects tagging
1744 information in a variety of version control systems in order to discover
1745 version numbers.")
1746 (home-page "https://github.com/habnabit/vcversioner")
1747 (license license:isc)))
1748
1749 (define-public python2-vcversioner
1750 (package-with-python2 python-vcversioner))
1751
1752 (define-public python-jsonschema
1753 (package
1754 (name "python-jsonschema")
1755 (version "2.6.0")
1756 (source (origin
1757 (method url-fetch)
1758 (uri (pypi-uri "jsonschema" version))
1759 (sha256
1760 (base32
1761 "00kf3zmpp9ya4sydffpifn0j0mzm342a2vzh82p6r0vh10cg7xbg"))))
1762 (build-system python-build-system)
1763 (arguments
1764 '(#:phases
1765 (modify-phases %standard-phases
1766 (replace 'check (lambda _ (invoke "nosetests"))))))
1767 (native-inputs
1768 `(("python-nose" ,python-nose)
1769 ("python-vcversioner" ,python-vcversioner)))
1770 (home-page "https://github.com/Julian/jsonschema")
1771 (synopsis "Implementation of JSON Schema for Python")
1772 (description
1773 "Jsonschema is an implementation of JSON Schema for Python.")
1774 (license license:expat)
1775 (properties `((python2-variant . ,(delay python2-jsonschema))))))
1776
1777 (define-public python2-jsonschema
1778 (let ((jsonschema (package-with-python2
1779 (strip-python2-variant python-jsonschema))))
1780 (package (inherit jsonschema)
1781 (native-inputs
1782 `(("python2-mock" ,python2-mock)
1783 ,@(package-native-inputs jsonschema)))
1784 (propagated-inputs
1785 `(("python2-functools32" ,python2-functools32))))))
1786
1787 (define-public python-schema
1788 (package
1789 (name "python-schema")
1790 (version "0.6.6")
1791 (source
1792 (origin
1793 (method url-fetch)
1794 (uri (pypi-uri "schema" version))
1795 (sha256
1796 (base32
1797 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
1798 (build-system python-build-system)
1799 (native-inputs
1800 `(("python-pytest" ,python-pytest)))
1801 (home-page "https://github.com/keleshev/schema")
1802 (synopsis "Simple data validation library")
1803 (description
1804 "@code{python-schema} is a library for validating Python data
1805 structures, such as those obtained from config-files, forms, external
1806 services or command-line parsing, converted from JSON/YAML (or
1807 something else) to Python data-types.")
1808 (license license:psfl)))
1809
1810 (define-public python2-schema
1811 (package-with-python2 python-schema))
1812
1813 (define-public python-schema-0.5
1814 (package (inherit python-schema)
1815 (version "0.5.0")
1816 (source
1817 (origin
1818 (method url-fetch)
1819 (uri (pypi-uri "schema" version))
1820 (sha256
1821 (base32
1822 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
1823
1824 (define-public python2-schema-0.5
1825 (package-with-python2 python-schema-0.5))
1826
1827 (define-public python-kitchen
1828 (package
1829 (name "python-kitchen")
1830 (version "1.2.5")
1831 (source
1832 (origin
1833 (method url-fetch)
1834 (uri (pypi-uri "kitchen" version))
1835 (sha256
1836 (base32
1837 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
1838 (build-system python-build-system)
1839 (propagated-inputs
1840 `(("python-chardet" ,python-chardet)))
1841 (home-page "https://github.com/fedora-infra/kitchen")
1842 (synopsis "Python API for snippets")
1843 (description "@code{kitchen} module provides a python API for all sorts of
1844 little useful snippets of code that everybody ends up writing for their projects
1845 but never seem big enough to build an independent release. Use kitchen and stop
1846 cutting and pasting that code over and over.")
1847 (license (list license:lgpl2.1+
1848 ;; subprocess.py, test_subprocess.py,
1849 ;; kitchen/pycompat25/defaultdict.py:
1850 license:psfl))))
1851
1852 (define-public python2-kitchen
1853 (package-with-python2 python-kitchen))
1854
1855 (define-public python-unidecode
1856 (package
1857 (name "python-unidecode")
1858 (version "1.0.23")
1859 (source (origin
1860 (method url-fetch)
1861 (uri (pypi-uri "Unidecode" version))
1862 (sha256
1863 (base32
1864 "1ysjbr3nqfqj97h8zyj3v9pya413vkv7a1mzml80w37xx15kb1cb"))))
1865 (build-system python-build-system)
1866 (home-page "https://pypi.python.org/pypi/Unidecode")
1867 (synopsis "ASCII transliterations of Unicode text")
1868 (description
1869 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
1870 useful when integrating with legacy code that doesn't support Unicode, or for
1871 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
1872 machine identifiers from human-readable Unicode strings that should still be
1873 somewhat intelligible.")
1874 (license license:gpl2+)))
1875
1876 (define-public python2-unidecode
1877 (package-with-python2 python-unidecode))
1878
1879 (define-public python-pyjwt
1880 (package
1881 (name "python-pyjwt")
1882 (version "1.5.3")
1883 (source
1884 (origin
1885 (method url-fetch)
1886 (uri (pypi-uri "PyJWT" version))
1887 (sha256
1888 (base32
1889 "1rxsg14i33vm2i6lz0my628108c81k43v10n4h3p0gx62xdyf2sh"))
1890 (modules '((guix build utils)))
1891 (snippet
1892 '(begin
1893 (for-each delete-file-recursively
1894 (find-files "." "\\.pyc$"))
1895 #t))))
1896 (build-system python-build-system)
1897 (native-inputs
1898 `(("python-pytest" ,python-pytest)
1899 ("python-pytest-cov" ,python-pytest-cov)
1900 ("python-pytest-runner" ,python-pytest-runner)))
1901 (home-page "https://github.com/progrium/pyjwt")
1902 (synopsis "JSON Web Token implementation in Python")
1903 (description
1904 "PyJWT is a JSON Web Token implementation written in Python.")
1905 (license license:expat)))
1906
1907 (define-public python2-pyjwt
1908 (package-with-python2 python-pyjwt))
1909
1910 (define-public python-pykka
1911 (package
1912 (name "python-pykka")
1913 (version "1.2.1")
1914 (source
1915 (origin
1916 (method url-fetch)
1917 (uri (pypi-uri "Pykka" version))
1918 (sha256
1919 (base32
1920 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
1921 (build-system python-build-system)
1922 (native-inputs
1923 `(("python-mock" ,python-mock)
1924 ("python-nose" ,python-nose)
1925 ("python-gevent" ,python-gevent)
1926 ("python-eventlet" ,python-eventlet)))
1927 (home-page "https://www.pykka.org/")
1928 (synopsis "Pykka is a Python implementation of the actor model")
1929 (description
1930 "Pykka is a Python implementation of the actor model.
1931 The actor model introduces some simple rules to control the sharing
1932 of state and cooperation between execution units, which makes it
1933 easier to build concurrent applications.")
1934 (license license:asl2.0)))
1935
1936 (define-public python2-pykka
1937 (package-with-python2 python-pykka))
1938
1939 (define-public python-pympler
1940 (package
1941 (name "python-pympler")
1942 (home-page "https://pythonhosted.org/Pympler/")
1943 (version "0.5")
1944 (source (origin
1945 (method url-fetch)
1946 (uri (pypi-uri "Pympler" version))
1947 (sha256
1948 (base32
1949 "03qwsbilqgvnbl3a1jmpgixbr2kq6m3fvdlzyr3wdp01bwlc85kx"))))
1950 (build-system python-build-system)
1951 (arguments
1952 `(#:phases (modify-phases %standard-phases
1953 (delete 'check)
1954 (add-after 'install 'check
1955 (lambda* (#:key inputs outputs #:allow-other-keys)
1956 (add-installed-pythonpath inputs outputs)
1957 (invoke "python" "setup.py" "test"))))))
1958 (synopsis "Measure, monitor and analyze memory behavior")
1959 (description
1960 "Pympler is a development tool to measure, monitor and analyze
1961 the memory behavior of Python objects in a running Python application.
1962
1963 By pympling a Python application, detailed insight in the size and the
1964 lifetime of Python objects can be obtained. Undesirable or unexpected
1965 runtime behavior like memory bloat and other @samp{pymples} can easily
1966 be identified.
1967
1968 A web profiling frontend exposes process statistics, garbage
1969 visualisation and class tracker statistics.")
1970 (license license:asl2.0)))
1971
1972 (define-public python2-pympler
1973 (package-with-python2 python-pympler))
1974
1975 (define-public python-itsdangerous
1976 (package
1977 (name "python-itsdangerous")
1978 (version "1.1.0")
1979 (source
1980 (origin
1981 (method url-fetch)
1982 (uri (pypi-uri "itsdangerous" version))
1983 (sha256
1984 (base32
1985 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
1986 (build-system python-build-system)
1987 (home-page "https://palletsprojects.com/p/itsdangerous/")
1988 (synopsis "Python library for passing data to/from untrusted environments")
1989 (description
1990 "Itsdangerous provides various helpers to pass trusted data to untrusted
1991 environments and back.")
1992 (license license:bsd-3)))
1993
1994 (define-public python2-itsdangerous
1995 (package-with-python2 python-itsdangerous))
1996
1997 (define-public python-pyyaml
1998 (package
1999 (name "python-pyyaml")
2000 (version "3.13")
2001 (source
2002 (origin
2003 (method url-fetch)
2004 (uri (pypi-uri "PyYAML" version))
2005 (sha256
2006 (base32
2007 "1gx603g484z46cb74j9rzr6sjlh2vndxayicvlyhxdz98lhhkwry"))))
2008 (build-system python-build-system)
2009 (inputs
2010 `(("libyaml" ,libyaml)))
2011 (home-page "http://pyyaml.org/wiki/PyYAML")
2012 (synopsis "YAML parser and emitter for Python")
2013 (description
2014 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2015 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2016 API, and sensible error messages. PyYAML supports standard YAML tags and
2017 provides Python-specific tags that allow to represent an arbitrary Python
2018 object.")
2019 (license license:expat)))
2020
2021 (define-public python2-pyyaml
2022 (package-with-python2 python-pyyaml))
2023
2024 (define-public python-vine
2025 (package
2026 (name "python-vine")
2027 (version "1.1.4")
2028 (source
2029 (origin
2030 (method url-fetch)
2031 (uri (pypi-uri "vine" version))
2032 (sha256
2033 (base32
2034 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
2035 (build-system python-build-system)
2036 (native-inputs
2037 `(("python-pytest" ,python-pytest)
2038 ("python-case" ,python-case)))
2039 (home-page "https://github.com/celery/vine")
2040 (synopsis "Promises for Python")
2041 (description
2042 "@code{vine} provides a special implementation of promises in that it can
2043 be used both for \"promise of a value\" and lazy evaluation. The biggest
2044 upside for this is that everything in a promise can also be a promise,
2045 e.g. filters, callbacks and errbacks can all be promises.")
2046 (license license:bsd-3)))
2047
2048 (define-public python-virtualenv
2049 (package
2050 (name "python-virtualenv")
2051 (version "16.1.0")
2052 (source
2053 (origin
2054 (method url-fetch)
2055 (uri (pypi-uri "virtualenv" version))
2056 (sha256
2057 (base32
2058 "0242cg3hdq3qdvx5flyrki8lpwlgwf5k45c21ks5049fv7ygm6gq"))))
2059 (build-system python-build-system)
2060 (arguments
2061 `(#:phases
2062 (modify-phases %standard-phases
2063 (add-before 'check 'disable-failing-test
2064 (lambda _
2065 ;; Disable failing test. See upstream bug report
2066 ;; https://github.com/pypa/virtualenv/issues/957
2067 (substitute* "tests/test_virtualenv.py"
2068 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2069 #t)))))
2070 (native-inputs
2071 `(("python-mock" ,python-mock)
2072 ("python-pytest" ,python-pytest)))
2073 (home-page "https://virtualenv.pypa.io/")
2074 (synopsis "Virtual Python environment builder")
2075 (description
2076 "Virtualenv is a tool to create isolated Python environments.")
2077 (license license:expat)))
2078
2079 (define-public python2-virtualenv
2080 (package-with-python2 python-virtualenv))
2081
2082 (define-public python-markupsafe
2083 (package
2084 (name "python-markupsafe")
2085 (version "1.0")
2086 (source
2087 (origin
2088 (method url-fetch)
2089 (uri (pypi-uri "MarkupSafe" version))
2090 (sha256
2091 (base32
2092 "0rdn1s8x9ni7ss8rfiacj7x1085lx8mh2zdwqslnw8xc3l4nkgm6"))))
2093 (build-system python-build-system)
2094 (home-page "https://github.com/mitsuhiko/markupsafe")
2095 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2096 (description
2097 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2098 for Python.")
2099 (license license:bsd-3)))
2100
2101 (define-public python2-markupsafe
2102 (package-with-python2 python-markupsafe))
2103
2104 (define-public python-jinja2
2105 (package
2106 (name "python-jinja2")
2107 (version "2.10")
2108 (source
2109 (origin
2110 (method url-fetch)
2111 (uri (pypi-uri "Jinja2" version))
2112 (sha256
2113 (base32
2114 "190l36hfw3wb2n3n68yacjabxyb1pnxwn7vjx96cmjj002xy2jzq"))))
2115 (build-system python-build-system)
2116 (propagated-inputs
2117 `(("python-markupsafe" ,python-markupsafe)))
2118 (home-page "http://jinja.pocoo.org/")
2119 (synopsis "Python template engine")
2120 (description
2121 "Jinja2 is a small but fast and easy to use stand-alone template engine
2122 written in pure Python.")
2123 (license license:bsd-3)))
2124
2125 (define-public python2-jinja2
2126 (package-with-python2 python-jinja2))
2127
2128 (define-public python-pystache
2129 (package
2130 (name "python-pystache")
2131 (version "0.5.4")
2132 (source (origin
2133 (method url-fetch)
2134 (uri (pypi-uri "pystache" version))
2135 (sha256
2136 (base32
2137 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2138 (build-system python-build-system)
2139 (arguments
2140 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2141 (home-page "http://defunkt.io/pystache/")
2142 (synopsis "Python logic-less template engine")
2143 (description
2144 "Pystache is a Python implementation of the framework agnostic,
2145 logic-free templating system Mustache.")
2146 (license license:expat)
2147 (properties `((python2-variant . ,(delay python2-pystache))))))
2148
2149 (define-public python2-pystache
2150 (package (inherit (package-with-python2
2151 (strip-python2-variant python-pystache)))
2152 (arguments
2153 `(#:python ,python-2
2154 #:phases
2155 (modify-phases %standard-phases
2156 (replace 'check
2157 (lambda _
2158 (invoke "python" "test_pystache.py"))))))))
2159
2160 (define-public python-joblib
2161 (package
2162 (name "python-joblib")
2163 (version "0.13.0")
2164 (source (origin
2165 (method url-fetch)
2166 (uri (pypi-uri "joblib" version))
2167 (sha256
2168 (base32
2169 "0612nazad8dxmn3xghfrmjax6456l4xy6hn9cngs7vydi14ds7v5"))))
2170 (build-system python-build-system)
2171 (arguments
2172 `(#:phases
2173 (modify-phases %standard-phases
2174 (replace 'check
2175 (lambda _ (invoke "pytest" "-v" "joblib"))))))
2176 (native-inputs
2177 `(("python-pytest" ,python-pytest)))
2178 (home-page "https://joblib.readthedocs.io/")
2179 (synopsis "Using Python functions as pipeline jobs")
2180 (description
2181 "Joblib is a set of tools to provide lightweight pipelining in Python.
2182 In particular, joblib offers: transparent disk-caching of the output values
2183 and lazy re-evaluation (memoize pattern), easy simple parallel computing
2184 logging and tracing of the execution.")
2185 (license license:bsd-3)))
2186
2187 (define-public python2-joblib
2188 (package-with-python2 python-joblib))
2189
2190 (define-public python-docutils
2191 (package
2192 (name "python-docutils")
2193 (version "0.14")
2194 (source
2195 (origin
2196 (method url-fetch)
2197 (uri (pypi-uri "docutils" version))
2198 (sha256
2199 (base32
2200 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
2201 (build-system python-build-system)
2202 (arguments
2203 '(#:tests? #f)) ; no setup.py test command
2204 (home-page "http://docutils.sourceforge.net/")
2205 (synopsis "Python Documentation Utilities")
2206 (description
2207 "Docutils is a modular system for processing documentation into useful
2208 formats, such as HTML, XML, and LaTeX. For input Docutils supports
2209 reStructuredText.")
2210 ;; Most of the source code is public domain, but some source files are
2211 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2212 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2213
2214 (define-public python2-docutils
2215 (package-with-python2 python-docutils))
2216
2217 (define-public python-pygments
2218 (package
2219 (name "python-pygments")
2220 (version "2.2.0")
2221 (source
2222 (origin
2223 (method url-fetch)
2224 (uri (pypi-uri "Pygments" version))
2225 (sha256
2226 (base32
2227 "1k78qdvir1yb1c634nkv6rbga8wv4289xarghmsbbvzhvr311bnv"))))
2228 (build-system python-build-system)
2229 (arguments
2230 ;; FIXME: Tests require sphinx, which depends on this.
2231 '(#:tests? #f))
2232 (home-page "http://pygments.org/")
2233 (synopsis "Syntax highlighting")
2234 (description
2235 "Pygments is a syntax highlighting package written in Python.")
2236 (license license:bsd-2)))
2237
2238 (define-public python2-pygments
2239 (package-with-python2 python-pygments))
2240
2241 (define-public python-sphinxcontrib-websupport
2242 (package
2243 (name "python-sphinxcontrib-websupport")
2244 (version "1.1.0")
2245 (source (origin
2246 (method url-fetch)
2247 (uri (pypi-uri "sphinxcontrib-websupport" version))
2248 (sha256
2249 (base32
2250 "1ff3ix76xi1y6m99qxhaq5161ix9swwzydilvdya07mgbcvpzr4x"))))
2251 (build-system python-build-system)
2252 (arguments
2253 ;; FIXME: Tests depend on Sphinx, which depends on this.
2254 `(#:tests? #f))
2255 (home-page "http://sphinx-doc.org/")
2256 (synopsis "Sphinx API for web applications")
2257 (description "This package provides a Python API to easily integrate
2258 Sphinx documentation into your web application. It provides tools to
2259 integrate Sphinx documents in web templates and to handle searches.")
2260 (license license:bsd-3)))
2261
2262 (define-public python2-sphinxcontrib-websupport
2263 (package-with-python2 python-sphinxcontrib-websupport))
2264
2265 (define-public python-sphinx
2266 (package
2267 (name "python-sphinx")
2268 (version "1.7.7")
2269 (source
2270 (origin
2271 (method url-fetch)
2272 (uri (pypi-uri "Sphinx" version))
2273 (sha256
2274 (base32
2275 "0pkkbfj7cl157q550gcs45am5y78ps0h7q6455d64s1zmw01jlvi"))))
2276 (build-system python-build-system)
2277 (arguments
2278 `(#:phases
2279 (modify-phases %standard-phases
2280 (replace 'check
2281 (lambda _
2282 ;; Requires Internet access.
2283 (delete-file "tests/test_build_linkcheck.py")
2284 (substitute* "tests/test_build_latex.py"
2285 (("@pytest.mark.sphinx\\('latex', testroot='images'\\)")
2286 "@pytest.mark.skip()"))
2287 (when (which "python")
2288 ;; XXX: These tests are broken when using Python2:
2289 ;; <https://github.com/sphinx-doc/sphinx/issues/4710>.
2290 (delete-file "tests/test_api_translator.py")
2291 (delete-file "tests/test_setup_command.py"))
2292 (invoke "make" "test"))))))
2293 (propagated-inputs
2294 `(("python-imagesize" ,python-imagesize)
2295 ("python-sphinx-alabaster-theme"
2296 ,python-sphinx-alabaster-theme)
2297 ("python-babel" ,python-babel)
2298 ("python-snowballstemmer" ,python-snowballstemmer)
2299 ("python-docutils" ,python-docutils)
2300 ("python-jinja2" ,python-jinja2)
2301 ("python-packaging" ,python-packaging)
2302 ("python-pygments" ,python-pygments)
2303 ("python-requests" ,python-requests)
2304 ("python-six" ,python-six)
2305 ("python-sphinxcontrib-websupport" ,python-sphinxcontrib-websupport)))
2306 (native-inputs
2307 `(("graphviz" ,graphviz)
2308 ("imagemagick" ,imagemagick) ;for "convert"
2309 ("python-html5lib" ,python-html5lib)
2310 ("python-mock" ,python-mock)
2311 ("python-nose" ,python-nose)
2312 ("python-pytest" ,python-pytest)))
2313 (home-page "http://sphinx-doc.org/")
2314 (synopsis "Python documentation generator")
2315 (description "Sphinx is a tool that makes it easy to create documentation
2316 for Python projects or other documents consisting of multiple reStructuredText
2317 sources.")
2318 (license license:bsd-3)
2319 (properties `((python2-variant . ,(delay python2-sphinx))))))
2320
2321 (define-public python2-sphinx
2322 (let ((base (package-with-python2 (strip-python2-variant python-sphinx))))
2323 (package
2324 (inherit base)
2325 (native-inputs `(("python2-mock" ,python2-mock)
2326 ("python2-enum34" ,python2-enum34)
2327 ,@(package-native-inputs base)))
2328 (propagated-inputs `(("python2-pytz" ,python2-pytz)
2329 ("python2-typing" ,python2-typing)
2330 ,@(package-propagated-inputs base))))))
2331
2332 (define-public python-sphinx-gallery
2333 (package
2334 (name "python-sphinx-gallery")
2335 (version "0.1.13")
2336 (source (origin
2337 (method url-fetch)
2338 (uri (string-append "https://github.com/sphinx-gallery/sphinx-gallery"
2339 "/archive/v" version ".tar.gz"))
2340 (file-name (string-append name "-" version ".tar.gz"))
2341 (sha256
2342 (base32
2343 "03fs99mcb1r7qp0xixqv07vcz98sk21yq19ffdysi0infdcpzfkd"))))
2344 (build-system python-build-system)
2345 (arguments
2346 ;; FIXME: Tests attempt to download <https://docs.python.org/3/objects.inv>,
2347 ;; <https://docs.scipy.org/doc/numpy/objects.inv>, and
2348 ;; <https://matplotlib.org/objects.inv>.
2349 `(#:tests? #f))
2350 (native-inputs
2351 `(("python-pytest-runner" ,python-pytest-runner)))
2352 (home-page "https://sphinx-gallery.github.io/")
2353 (synopsis "Generate an examples gallery automatically")
2354 (description
2355 "@code{sphinx_gallery} is a Sphinx extension that builds an HTML version
2356 from any set of Python scripts and puts it into an examples gallery.")
2357 (license license:bsd-3)))
2358
2359 (define-public python2-sphinx-gallery
2360 (package-with-python2 python-sphinx-gallery))
2361
2362 (define-public python-sphinx-rtd-theme
2363 (package
2364 (name "python-sphinx-rtd-theme")
2365 (version "0.2.4")
2366 (source
2367 (origin
2368 (method url-fetch)
2369 (uri (pypi-uri "sphinx_rtd_theme" version))
2370 (sha256
2371 (base32
2372 "05rlhjzdyapr2w74jjs7mrm8hi69qskcr5vya9f9drpsys7lpxrd"))))
2373 (build-system python-build-system)
2374 (arguments '(#:tests? #f)) ; No tests.
2375 (propagated-inputs
2376 `(("python-sphinx" ,python-sphinx)))
2377 (home-page "https://github.com/snide/sphinx_rtd_theme/")
2378 (synopsis "ReadTheDocs.org theme for Sphinx")
2379 (description "A theme for Sphinx used by ReadTheDocs.org.")
2380 (license license:expat)))
2381
2382 (define-public python2-sphinx-rtd-theme
2383 (package-with-python2 python-sphinx-rtd-theme))
2384
2385 (define-public python-guzzle-sphinx-theme
2386 (package
2387 (name "python-guzzle-sphinx-theme")
2388 (version "0.7.11")
2389 (source
2390 (origin
2391 (method url-fetch)
2392 (uri (pypi-uri "guzzle_sphinx_theme" version))
2393 (sha256
2394 (base32
2395 "1rnkzrrsbnifn3vsb4pfaia3nlvgvw6ndpxp7lzjrh23qcwid34v"))))
2396 (build-system python-build-system)
2397 (propagated-inputs
2398 `(("python-sphinx" ,python-sphinx)))
2399 (home-page "https://github.com/guzzle/guzzle_sphinx_theme")
2400 (synopsis "Sphinx theme used by Guzzle")
2401 (description "This package provides guzzle_sphinx_theme, a theme for the
2402 Sphinx documentation system, used by @uref{http://docs.guzzlephp.org, Guzzle}
2403 and several other projects.")
2404 (license license:expat)))
2405
2406 (define-public python2-guzzle-sphinx-theme
2407 (package-with-python2 python-guzzle-sphinx-theme))
2408
2409 (define-public python-rst.linker
2410 (package
2411 (name "python-rst.linker")
2412 (version "1.10")
2413 (source
2414 (origin
2415 (method url-fetch)
2416 (uri (pypi-uri "rst.linker" version))
2417 (sha256
2418 (base32
2419 "0iqaacp7pj1s8avs4kc0qg0r7dscywaq37y6l9j14glqdikk0wdj"))))
2420 (build-system python-build-system)
2421 (propagated-inputs
2422 `(("python-dateutil" ,python-dateutil)
2423 ("python-six" ,python-six)))
2424 (native-inputs
2425 `(("python-setuptools-scm" ,python-setuptools-scm)))
2426 ;; Test would require path.py, which would introduce a cyclic dependence.
2427 (arguments `(#:tests? #f))
2428 ;; Note: As of version 1.7 the documentation is not worth building.
2429 (home-page "https://github.com/jaraco/rst.linker")
2430 (synopsis "Sphinx plugin to add links and timestamps")
2431 (description "rst.linker allows to automatically replace text by a
2432 reStructuredText external reference or timestamps. It's primary purpose is to
2433 augment the changelog, but it can be used for other documents, too.")
2434 (license license:expat)))
2435
2436 (define-public python2-rst.linker
2437 (package-with-python2 python-rst.linker))
2438
2439 (define-public python-feedgenerator
2440 (package
2441 (name "python-feedgenerator")
2442 (version "1.9")
2443 (source
2444 (origin
2445 (method url-fetch)
2446 (uri (pypi-uri "feedgenerator" version))
2447 (sha256
2448 (base32
2449 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
2450 (modules '((guix build utils)))
2451 (snippet
2452 '(begin
2453 ;; Remove pre-compiled .pyc files from source.
2454 (for-each delete-file-recursively
2455 (find-files "." "__pycache__" #:directories? #t))
2456 (for-each delete-file (find-files "." "\\.pyc$"))
2457 #t))))
2458 (build-system python-build-system)
2459 (propagated-inputs
2460 `(("python-pytz" ,python-pytz)
2461 ("python-six" ,python-six)))
2462 (home-page "https://github.com/getpelican/feedgenerator")
2463 (synopsis
2464 "Standalone version of Django's Atom/RSS feed generator")
2465 (description
2466 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2467 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
2468 (license license:bsd-3)))
2469
2470 (define-public python2-feedgenerator
2471 (package-with-python2 python-feedgenerator))
2472
2473 (define-public python-toml
2474 (package
2475 (name "python-toml")
2476 (version "0.9.4")
2477 (source
2478 (origin
2479 (method url-fetch)
2480 (uri (pypi-uri "toml" version))
2481 (sha256
2482 (base32
2483 "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf"))))
2484 (build-system python-build-system)
2485 (arguments
2486 `(#:tests? #f)) ;no tests suite in release
2487 (home-page "https://github.com/uiri/toml")
2488 (synopsis "Library for TOML")
2489 (description
2490 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
2491 Language (TOML) configuration files.")
2492 (license license:expat)))
2493
2494 (define-public python-black
2495 (package
2496 (name "python-black")
2497 (version "18.6b4")
2498 (source
2499 (origin
2500 (method url-fetch)
2501 (uri (pypi-uri "black" version))
2502 (sha256
2503 (base32
2504 "0i4sfqgz6w15vd50kbhi7g7rifgqlf8yfr8y78rypd56q64qn592"))))
2505 (build-system python-build-system)
2506 (arguments
2507 `(#:phases
2508 (modify-phases %standard-phases
2509 (add-after 'patch-source-shebangs 'patch-extra-shebangs
2510 (lambda _
2511 (let ((python3 (which "python3")))
2512 (substitute* '("tests/data/fmtonoff.py"
2513 "tests/data/string_prefixes.py"
2514 "tests/data/function.py")
2515 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
2516 (string-append "#!" python3 (if (string? minor-version)
2517 minor-version
2518 ""))))))))))
2519 (propagated-inputs
2520 `(("python-click" ,python-click)
2521 ("python-attrs" ,python-attrs)
2522 ("python-appdirs" ,python-appdirs)
2523 ("python-toml" ,python-toml)))
2524 (home-page "https://github.com/ambv/black")
2525 (synopsis "The uncompromising code formatter")
2526 (description "Black is the uncompromising Python code formatter.")
2527 (license license:expat)))
2528
2529 (define-public python-blinker
2530 (package
2531 (name "python-blinker")
2532 (version "1.4")
2533 (source
2534 (origin
2535 (method url-fetch)
2536 (uri (pypi-uri "blinker" version))
2537 (sha256
2538 (base32
2539 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
2540 (build-system python-build-system)
2541 (home-page "http://pythonhosted.org/blinker/")
2542 (synopsis "Fast, simple object-to-object and broadcast signaling")
2543 (description
2544 "Blinker provides a fast dispatching system that allows any number of
2545 interested parties to subscribe to events, or \"signals\".")
2546 (license license:expat)))
2547
2548 (define-public python2-blinker
2549 (package-with-python2 python-blinker))
2550
2551 (define-public pelican
2552 (package
2553 (name "pelican")
2554 (version "3.7.1")
2555 (source
2556 (origin
2557 (method url-fetch)
2558 (uri (pypi-uri "pelican" version))
2559 (sha256
2560 (base32
2561 "12spygavv9b6xpb5pgp7f0p3z0mms60nx6zrpx1yfkj68zz4flra"))))
2562 (build-system python-build-system)
2563 (propagated-inputs
2564 `(("python-feedgenerator" ,python-feedgenerator)
2565 ("python-jinja2" ,python-jinja2)
2566 ("python-pygments" ,python-pygments)
2567 ("python-docutils" ,python-docutils)
2568 ("python-pytz" ,python-pytz)
2569 ("python-blinker" ,python-blinker)
2570 ("python-unidecode" ,python-unidecode)
2571 ("python-six" ,python-six)
2572 ("python-dateutil" ,python-dateutil)
2573 ("python-markdown" ,python-markdown)))
2574 (home-page "https://getpelican.com/")
2575 (arguments
2576 `(;; XXX Requires a lot more packages to do unit tests :P
2577 #:tests? #f
2578 #:phases (modify-phases %standard-phases
2579 (add-before
2580 'install 'adjust-requires
2581 ;; Since feedgenerator is installed from git, it doesn't
2582 ;; conform to the version requirements.
2583 ;;
2584 ;; We *do have* "feedgenerator >= 1.6", but strip off the
2585 ;; version requirement so setuptools doesn't get confused.
2586 (lambda _
2587 (substitute* "setup.py"
2588 (("['\"]feedgenerator.*?['\"]")
2589 "'feedgenerator'")))))))
2590 (synopsis "Python-based static site publishing system")
2591 (description
2592 "Pelican is a tool to generate a static blog from reStructuredText,
2593 Markdown input files, and more. Pelican uses Jinja2 for templating
2594 and is very extensible.")
2595 (license license:agpl3+)))
2596
2597 (define-public python-scikit-image
2598 (package
2599 (name "python-scikit-image")
2600 (version "0.14.1")
2601 (source
2602 (origin
2603 (method url-fetch)
2604 (uri (pypi-uri "scikit-image" version))
2605 (sha256
2606 (base32 "0l1c3rl4s1jyv80i5hns4pgih09zrxfj7lygdc51w8sgyysb7ac6"))))
2607 (build-system python-build-system)
2608 (arguments
2609 ;; TODO: Some tests require running X11 server. Disable them?
2610 '(#:tests? #f))
2611 ;; See DEPENDS.txt for the list of build and run time requiremnts
2612 (propagated-inputs
2613 `(("python-cloudpickle" ,python-cloudpickle)
2614 ("python-dask" ,python-dask)
2615 ("python-matplotlib" ,python-matplotlib)
2616 ("python-networkx" ,python-networkx)
2617 ("python-numpy" ,python-numpy)
2618 ("python-pillow" ,python-pillow)
2619 ("python-pywavelets" ,python-pywavelets)
2620 ("python-scipy" ,python-scipy)
2621 ("python-six" ,python-six)))
2622 (native-inputs
2623 `(("python-cython" ,python-cython)))
2624 (home-page "http://scikit-image.org/")
2625 (synopsis "Image processing in Python")
2626 (description
2627 "Scikit-image is a collection of algorithms for image processing.")
2628 (license license:bsd-3)))
2629
2630 (define-public python2-scikit-image
2631 (package-with-python2 python-scikit-image))
2632
2633 (define-public python-cython
2634 (package
2635 (name "python-cython")
2636 (version "0.28.4")
2637 (source
2638 (origin
2639 (method url-fetch)
2640 (uri (pypi-uri "Cython" version))
2641 (sha256
2642 (base32
2643 "0imw9s2rbrh32clbl10csnwmig9p3nzkrd2baxxxfmnrsc42pb3n"))))
2644 (build-system python-build-system)
2645 ;; we need the full python package and not just the python-wrapper
2646 ;; because we need libpython3.3m.so
2647 (inputs
2648 `(("python" ,python)))
2649 (arguments
2650 `(#:phases
2651 (modify-phases %standard-phases
2652 (add-before 'check 'set-HOME
2653 ;; some tests require access to "$HOME/.cython"
2654 (lambda _ (setenv "HOME" "/tmp") #t))
2655
2656 ;; FIXME: These tests started failing on armhf after the 0.28 update
2657 ;; (commit c69d11c5930), both with an error such as this:
2658 ;; compiling (cpp) and running dictcomp ...
2659 ;; === C/C++ compiler error output: ===
2660 ;; ‘
2661 ;; dictcomp.cpp:5221: confused by earlier errors, bailing out
2662 ;; See <https://hydra.gnu.org/build/2948724> for logs.
2663 ,@(if (target-arm32?)
2664 `((add-before 'check 'disable-failing-tests
2665 (lambda _
2666 (let ((disabled-tests (open-file "tests/bugs.txt" "a")))
2667 (for-each (lambda (test)
2668 (format disabled-tests "~a\n" test))
2669 '("memslice" "dictcomp"))
2670 (close-port disabled-tests)))))
2671 '())
2672
2673 (replace 'check
2674 (lambda _
2675 ;; The "with_outer_raising" test fails with Python 3.7. See
2676 ;; https://github.com/cython/cython/issues/2454
2677 (delete-file "tests/run/generators_py.py")
2678 (invoke "python" "runtests.py" "-vv"))))))
2679 (home-page "http://cython.org/")
2680 (synopsis "C extensions for Python")
2681 (description "Cython is an optimising static compiler for both the Python
2682 programming language and the extended Cython programming language. It makes
2683 writing C extensions for Python as easy as Python itself.")
2684 (license license:asl2.0)
2685 (properties `((python2-variant . ,(delay python2-cython))))))
2686
2687 (define-public python2-cython
2688 (package (inherit (package-with-python2
2689 (strip-python2-variant python-cython)))
2690 (name "python2-cython")
2691 (inputs
2692 `(("python-2" ,python-2))))) ; this is not automatically changed
2693
2694 ;; The RPython toolchain currently does not support Python 3.
2695 (define-public python2-rpython
2696 (package
2697 (name "python2-rpython")
2698 (version "0.2.1")
2699 (source
2700 (origin
2701 (method url-fetch)
2702 (uri (pypi-uri "rpython" version))
2703 (sha256
2704 (base32
2705 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
2706 (build-system python-build-system)
2707 (arguments `(#:python ,python-2))
2708 (native-inputs
2709 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
2710 (home-page "https://rpython.readthedocs.org")
2711 (synopsis "Framework for implementing interpreters and virtual machines")
2712 (description "RPython is a translation and support framework for
2713 producing implementations of dynamic languages, emphasizing a clean separation
2714 between language specification and implementation aspects.")
2715 (license license:expat)))
2716
2717 ;; NOTE: when upgrading numpy please make sure that python-pandas and
2718 ;; python-scipy still build, as these three packages are often used together.
2719 (define-public python-numpy
2720 (package
2721 (name "python-numpy")
2722 (version "1.15.4")
2723 (source
2724 (origin
2725 (method url-fetch)
2726 (uri (string-append
2727 "https://github.com/numpy/numpy/releases/download/v"
2728 version "/numpy-" version ".tar.gz"))
2729 (sha256
2730 (base32
2731 "102vcl2qq4pjbm7a3d67vkkvn4466ngia1d8wi5avqwqh8j0jvkn"))))
2732 (build-system python-build-system)
2733 (inputs
2734 `(("openblas" ,openblas)
2735 ("lapack" ,lapack)))
2736 (native-inputs
2737 `(("python-cython" ,python-cython)
2738 ("python-pytest" ,python-pytest)
2739 ("gfortran" ,gfortran)))
2740 (arguments
2741 `(#:phases
2742 (modify-phases %standard-phases
2743 (add-before 'build 'configure-blas-lapack
2744 (lambda* (#:key inputs #:allow-other-keys)
2745 (call-with-output-file "site.cfg"
2746 (lambda (port)
2747 (format port
2748 "[openblas]
2749 libraries = openblas
2750 library_dirs = ~a/lib
2751 include_dirs = ~a/include
2752
2753 # backslash-n to make emacs happy
2754 \n[lapack]
2755 lapack_libs = lapack
2756 library_dirs = ~a/lib
2757 include_dirs = ~a/include
2758 "
2759 (assoc-ref inputs "openblas")
2760 (assoc-ref inputs "openblas")
2761 (assoc-ref inputs "lapack")
2762 (assoc-ref inputs "lapack"))))
2763 #t))
2764 (add-before 'build 'fix-executable-paths
2765 (lambda* (#:key inputs #:allow-other-keys)
2766 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
2767 ;; instead of /bin/sh.
2768 (substitute* "numpy/distutils/exec_command.py"
2769 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
2770 (string-append match-start (assoc-ref inputs "bash") match-end)))
2771 ;; Use "gcc" executable, not "cc".
2772 (substitute* "numpy/distutils/system_info.py"
2773 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
2774 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
2775 #t))
2776 ;; Tests can only be run after the library has been installed and not
2777 ;; within the source directory.
2778 (delete 'check)
2779 (add-after 'install 'check
2780 (lambda* (#:key outputs inputs #:allow-other-keys)
2781 ;; Make installed package available for running the tests
2782 (add-installed-pythonpath inputs outputs)
2783 ;; Make sure "f2py" etc is found.
2784 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
2785 ":" (getenv "PATH")))
2786 (with-directory-excursion "/tmp"
2787 (invoke "python" "-c"
2788 "import numpy; numpy.test(verbose=2)")))))))
2789 (home-page "http://www.numpy.org/")
2790 (synopsis "Fundamental package for scientific computing with Python")
2791 (description "NumPy is the fundamental package for scientific computing
2792 with Python. It contains among other things: a powerful N-dimensional array
2793 object, sophisticated (broadcasting) functions, tools for integrating C/C++
2794 and Fortran code, useful linear algebra, Fourier transform, and random number
2795 capabilities.")
2796 (license license:bsd-3)))
2797
2798 (define-public python2-numpy
2799 (package-with-python2 python-numpy))
2800
2801 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
2802 ;; interest only for legacy code going back to NumPy's predecessor
2803 ;; Numeric.
2804 (define-public python2-numpy-1.8
2805 (package (inherit python2-numpy)
2806 (version "1.8.2")
2807 (source
2808 (origin
2809 (method url-fetch)
2810 (uri (string-append
2811 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
2812 (file-name (string-append "python2-numpy-" version ".tar.gz"))
2813 (sha256
2814 (base32
2815 "0sc20gz1b17xnyrkp5frca3ql5qfalpv916hfg2kqxpwr6jg0f1g"))))
2816 (arguments
2817 (substitute-keyword-arguments (package-arguments python2-numpy)
2818 ((#:phases phases)
2819 `(modify-phases ,phases
2820 (replace 'configure-blas-lapack
2821 (lambda* (#:key inputs #:allow-other-keys)
2822 (call-with-output-file "site.cfg"
2823 (lambda (port)
2824 (format port
2825 "[openblas]
2826 libraries = openblas,lapack
2827 library_dirs = ~a/lib:~a/lib
2828 include_dirs = ~a/include:~a/include
2829 "
2830 (assoc-ref inputs "openblas")
2831 (assoc-ref inputs "lapack")
2832 (assoc-ref inputs "openblas")
2833 (assoc-ref inputs "lapack"))))
2834 #t))))))
2835 (native-inputs
2836 `(("python2-nose" ,python2-nose)))
2837 (description "NumPy is the fundamental package for scientific computing
2838 with Python. It contains among other things: a powerful N-dimensional array
2839 object, sophisticated (broadcasting) functions, tools for integrating C/C++
2840 and Fortran code, useful linear algebra, Fourier transform, and random number
2841 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
2842 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
2843 Numeric.")
2844 (license license:bsd-3)))
2845
2846 (define-public python-munch
2847 (package
2848 (name "python-munch")
2849 (version "2.0.4")
2850 (source
2851 (origin
2852 (method url-fetch)
2853 (uri (pypi-uri "munch" version))
2854 (sha256
2855 (base32
2856 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
2857 (build-system python-build-system)
2858 (home-page "https://github.com/Infinidat/munch")
2859 (synopsis "Dot-accessible dictionary")
2860 (description "Munch is a dot-accessible dictionary similar to JavaScript
2861 objects.")
2862 (license license:expat)))
2863
2864 (define-public python2-munch
2865 (package-with-python2 python-munch))
2866
2867 (define-public python-colormath
2868 (package
2869 (name "python-colormath")
2870 (version "3.0.0")
2871 (source
2872 (origin
2873 (method url-fetch)
2874 (uri (pypi-uri "colormath" version))
2875 (sha256
2876 (base32
2877 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
2878 (build-system python-build-system)
2879 (propagated-inputs
2880 `(("python-networkx" ,python-networkx)
2881 ("python-numpy" ,python-numpy)))
2882 (home-page "https://github.com/gtaylor/python-colormath")
2883 (synopsis "Color math and conversion library")
2884 (description
2885 "This is a Python library for color math and conversions.")
2886 (license license:bsd-3)))
2887
2888 (define-public python2-colormath
2889 (package-with-python2 python-colormath))
2890
2891 (define-public python-spectra
2892 (package
2893 (name "python-spectra")
2894 (version "0.0.11")
2895 (source
2896 (origin
2897 (method url-fetch)
2898 (uri (pypi-uri "spectra" version))
2899 (sha256
2900 (base32
2901 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
2902 (build-system python-build-system)
2903 (arguments
2904 `(#:phases
2905 (modify-phases %standard-phases
2906 (replace 'check
2907 (lambda _ (invoke "nosetests" "-v"))))))
2908 (propagated-inputs
2909 `(("python-colormath" ,python-colormath)))
2910 (native-inputs
2911 `(("python-nose" ,python-nose)))
2912 (home-page "https://github.com/jsvine/spectra")
2913 (synopsis "Color scales and color conversion")
2914 (description
2915 "This package provides a Python library intended to make color math,
2916 color scales, and color space conversion easy. It has support for:
2917
2918 @enumerate
2919 @item Color scales
2920 @item Color ranges
2921 @item Color blending
2922 @item Brightening/darkening colors
2923 @item Saturating/desaturating colors
2924 @item Conversion to/from multiple color spaces.
2925 @end enumerate\n")
2926 (license license:expat)))
2927
2928 (define-public python2-spectra
2929 (package-with-python2 python-spectra))
2930
2931 (define-public python-numpy-documentation
2932 (package
2933 (name "python-numpy-documentation")
2934 (version (package-version python-numpy))
2935 (source (package-source python-numpy))
2936 (build-system python-build-system)
2937 (native-inputs
2938 `(("python-matplotlib" ,python-matplotlib)
2939 ("python-numpy" ,python-numpy)
2940 ("pkg-config" ,pkg-config)
2941 ("python-sphinx" ,python-sphinx)
2942 ("python-numpydoc" ,python-numpydoc)
2943 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
2944 texlive-fonts-cm-super
2945 texlive-fonts-ec
2946 texlive-generic-ifxetex
2947 texlive-generic-pdftex
2948 texlive-latex-amsfonts
2949 texlive-latex-capt-of
2950 texlive-latex-cmap
2951 texlive-latex-environ
2952 texlive-latex-eqparbox
2953 texlive-latex-etoolbox
2954 texlive-latex-expdlist
2955 texlive-latex-fancyhdr
2956 texlive-latex-fancyvrb
2957 texlive-latex-fncychap
2958 texlive-latex-float
2959 texlive-latex-framed
2960 texlive-latex-geometry
2961 texlive-latex-graphics
2962 texlive-latex-hyperref
2963 texlive-latex-mdwtools
2964 texlive-latex-multirow
2965 texlive-latex-needspace
2966 texlive-latex-oberdiek
2967 texlive-latex-parskip
2968 texlive-latex-preview
2969 texlive-latex-tabulary
2970 texlive-latex-threeparttable
2971 texlive-latex-titlesec
2972 texlive-latex-trimspaces
2973 texlive-latex-ucs
2974 texlive-latex-upquote
2975 texlive-latex-url
2976 texlive-latex-varwidth
2977 texlive-latex-wrapfig)))
2978 ("texinfo" ,texinfo)
2979 ("perl" ,perl)
2980 ("scipy-sphinx-theme"
2981 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
2982 (method git-fetch)
2983 (uri (git-reference
2984 (url "https://github.com/scipy/scipy-sphinx-theme.git")
2985 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
2986 (sha256
2987 (base32
2988 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
2989 ,@(package-native-inputs python-numpy)))
2990 (arguments
2991 `(#:tests? #f ; we're only generating the documentation
2992 #:phases
2993 (modify-phases %standard-phases
2994 (delete 'build)
2995 (replace 'install
2996 (lambda* (#:key inputs outputs #:allow-other-keys)
2997 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
2998 (doc (string-append
2999 data "/doc/" ,name "-"
3000 ,(package-version python-numpy)))
3001 (info-reader (string-append data "/info"))
3002 (html (string-append doc "/html"))
3003 (scipy-sphinx-theme "scipy-sphinx-theme")
3004 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3005 (pyver ,(string-append "PYVER=")))
3006
3007 ;; FIXME: this is needed to for texlive-union to generate
3008 ;; fonts, which are not found.
3009 (setenv "HOME" "/tmp")
3010
3011 (with-directory-excursion "doc"
3012 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3013 (mkdir-p html)
3014 (invoke "make" "html" pyver)
3015 (invoke "make" "latex" "PAPER=a4" pyver)
3016 (invoke "make" "-C" "build/latex"
3017 "all-pdf" "PAPER=a4" pyver)
3018 ;; FIXME: Generation of the info file fails.
3019 ;; (invoke "make" "info" pyver)
3020 ;; (mkdir-p info)
3021 ;; (copy-file "build/texinfo/numpy.info"
3022 ;; (string-append info "/numpy.info"))
3023 (for-each (lambda (file)
3024 (copy-file (string-append "build/latex" file)
3025 (string-append doc file)))
3026 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3027 (with-directory-excursion "build/html"
3028 (for-each (lambda (file)
3029 (let* ((dir (dirname file))
3030 (tgt-dir (string-append html "/" dir)))
3031 (unless (equal? "." dir)
3032 (mkdir-p tgt-dir))
3033 (install-file file html)))
3034 (find-files "." ".*")))))
3035 #t)))))
3036 (home-page (package-home-page python-numpy))
3037 (synopsis "Documentation for the python-numpy package")
3038 (description (package-description python-numpy))
3039 (license (package-license python-numpy))))
3040
3041 (define-public python2-numpy-documentation
3042 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3043 (package
3044 (inherit numpy-documentation)
3045 (native-inputs `(("python2-functools32" ,python2-functools32)
3046 ,@(package-native-inputs numpy-documentation))))))
3047
3048 (define-public python-pygit2
3049 (package
3050 (name "python-pygit2")
3051 (version "0.27.3")
3052 (source
3053 (origin
3054 (method url-fetch)
3055 (uri (pypi-uri "pygit2" version))
3056 (sha256
3057 (base32
3058 "046ahvsb7a20sgvscqfm3cb32sp3sii4gim9vz7zzrkf7yz16xlv"))))
3059 (build-system python-build-system)
3060 (arguments
3061 '(#:phases
3062 (modify-phases %standard-phases
3063 ;; Remove after the next update. See:
3064 ;; https://github.com/libgit2/pygit2/pull/851
3065 (add-after 'unpack 'compile-with-cffi
3066 (lambda _
3067 (substitute* "setup.py"
3068 (("install_requires")
3069 "setup_requires=['cffi'],\n install_requires"))
3070 #t))
3071 (add-after 'unpack 'fix-dependency-versioning
3072 (lambda _
3073 (substitute* "setup.py"
3074 (("<") "<="))
3075 #t)))))
3076 (propagated-inputs
3077 `(("python-six" ,python-six)
3078 ("python-cffi" ,python-cffi)
3079 ("libgit2" ,libgit2)
3080 ("python-tox" ,python-tox)))
3081 (native-inputs
3082 `(("python-pytest" ,python-pytest)))
3083 (home-page "https://github.com/libgit2/pygit2")
3084 (synopsis "Python bindings for libgit2")
3085 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3086 library, libgit2 implements Git plumbing.")
3087 ;; GPL2.0 only, with linking exception.
3088 (license license:gpl2)))
3089
3090 (define-public python2-pygit2
3091 (package-with-python2 python-pygit2))
3092
3093 (define-public python-pyparsing
3094 (package
3095 (name "python-pyparsing")
3096 (version "2.2.1")
3097 (source
3098 (origin
3099 (method url-fetch)
3100 (uri (pypi-uri "pyparsing" version))
3101 (sha256
3102 (base32 "06dgd0iilvf8m0ssmfpcbh8l6jf0zkp8adbb84llksg17crfx4zl"))))
3103 (build-system python-build-system)
3104 (outputs '("out" "doc"))
3105 (arguments
3106 `(#:tests? #f ; no test target
3107 #:phases
3108 (modify-phases %standard-phases
3109 (add-after 'install 'install-doc
3110 (lambda* (#:key outputs #:allow-other-keys)
3111 (let* ((doc (string-append (assoc-ref outputs "doc")
3112 "/share/doc/" ,name "-" ,version))
3113 (html-doc (string-append doc "/html"))
3114 (examples (string-append doc "/examples")))
3115 (mkdir-p html-doc)
3116 (mkdir-p examples)
3117 (for-each
3118 (lambda (dir tgt)
3119 (map (lambda (file)
3120 (install-file file tgt))
3121 (find-files dir ".*")))
3122 (list "docs" "htmldoc" "examples")
3123 (list doc html-doc examples))
3124 #t))))))
3125 (home-page "https://github.com/pyparsing/pyparsing")
3126 (synopsis "Python parsing class library")
3127 (description
3128 "The pyparsing module is an alternative approach to creating and
3129 executing simple grammars, vs. the traditional lex/yacc approach, or the use
3130 of regular expressions. The pyparsing module provides a library of classes
3131 that client code uses to construct the grammar directly in Python code.")
3132 (license license:expat)))
3133
3134 (define-public python2-pyparsing
3135 (package-with-python2 python-pyparsing))
3136
3137 (define-public python-numpydoc
3138 (package
3139 (name "python-numpydoc")
3140 (version "0.8.0")
3141 (source
3142 (origin
3143 (method url-fetch)
3144 (uri (pypi-uri "numpydoc" version))
3145 (sha256
3146 (base32
3147 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
3148 (build-system python-build-system)
3149 (propagated-inputs
3150 `(("python-sphinx" ,python-sphinx)))
3151 (native-inputs
3152 `(("python-nose" ,python-nose)))
3153 (home-page "https://pypi.python.org/pypi/numpydoc")
3154 (synopsis
3155 "Numpy's Sphinx extensions")
3156 (description
3157 "Sphinx extension to support docstrings in Numpy format.")
3158 (license license:bsd-2)))
3159
3160 (define-public python2-numpydoc
3161 (package-with-python2 python-numpydoc))
3162
3163 (define-public python-numexpr
3164 (package
3165 (name "python-numexpr")
3166 (version "2.6.5")
3167 (source
3168 (origin
3169 (method url-fetch)
3170 (uri (pypi-uri "numexpr" version))
3171 (sha256
3172 (base32
3173 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3174 (build-system python-build-system)
3175 (arguments `(#:tests? #f)) ; no tests included
3176 (propagated-inputs
3177 `(("python-numpy" ,python-numpy)))
3178 (home-page "https://github.com/pydata/numexpr")
3179 (synopsis "Fast numerical expression evaluator for NumPy")
3180 (description
3181 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3182 expressions that operate on arrays are accelerated and use less memory than
3183 doing the same calculation in Python. In addition, its multi-threaded
3184 capabilities can make use of all your cores, which may accelerate
3185 computations, most specially if they are not memory-bounded (e.g. those using
3186 transcendental functions).")
3187 (license license:expat)))
3188
3189 (define-public python2-numexpr
3190 (package-with-python2 python-numexpr))
3191
3192 (define-public python-cycler
3193 (package
3194 (name "python-cycler")
3195 (version "0.10.0")
3196 (source (origin
3197 (method url-fetch)
3198 (uri (pypi-uri "cycler" version))
3199 (sha256
3200 (base32
3201 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3202 (build-system python-build-system)
3203 (arguments
3204 ;; XXX: The current version requires 'coveralls' which we don't have.
3205 ;; Enable this for the next release which uses 'python-pytest'.
3206 '(#:tests? #f))
3207 (propagated-inputs
3208 `(("python-six" ,python-six)))
3209 (home-page "http://matplotlib.org/cycler/")
3210 (synopsis "Composable keyword argument iterator")
3211 (description
3212 "When using @code{matplotlib} and plotting more than one line, it is
3213 common to want to be able to want to be able to cycle over one or more artist
3214 styles; but the plotting logic can quickly become involved.
3215 To address this and enable easy cycling over arbitrary @code{kwargs}, the
3216 @code{Cycler} class was developed.")
3217 (license license:bsd-3)))
3218
3219 (define-public python2-cycler
3220 (package-with-python2 python-cycler))
3221
3222 (define-public python-colorspacious
3223 (package
3224 (name "python-colorspacious")
3225 (version "1.1.0")
3226 (source
3227 (origin
3228 (method url-fetch)
3229 (uri (string-append "https://github.com/njsmith/colorspacious/archive/v"
3230 version ".tar.gz"))
3231 (file-name (string-append name "-" version))
3232 (sha256
3233 (base32 "1vflh5jm32qb0skza2i8pjacv09w6gq84fqpp2nj77s0rbmzgr4k"))))
3234 (build-system python-build-system)
3235 (propagated-inputs
3236 `(("python-numpy" ,python-numpy)))
3237 (native-inputs
3238 `(("python-nose" ,python-nose)))
3239 (arguments
3240 `(#:phases
3241 (modify-phases %standard-phases
3242 (replace 'check
3243 (lambda _
3244 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
3245 (home-page "https://github.com/njsmith/colorspacious")
3246 (synopsis "Python library for colorspace conversions")
3247 (description "@code{colorspacious} is a Python library that lets you
3248 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3249 (license license:expat)))
3250
3251 (define-public python2-colorspacious
3252 (package-with-python2 python-colorspacious))
3253
3254 (define-public python-matplotlib
3255 (package
3256 (name "python-matplotlib")
3257 (version "2.2.3")
3258 (source
3259 (origin
3260 (method url-fetch)
3261 (uri (pypi-uri "matplotlib" version))
3262 (sha256
3263 (base32
3264 "1rcc7x9ig3hpchkc4cwdvym3y451w74275fxr455zkfagrsvymbk"))))
3265 (build-system python-build-system)
3266 (propagated-inputs ; the following packages are all needed at run time
3267 `(("python-cycler" ,python-cycler)
3268 ("python-kiwisolver" ,python-kiwisolver)
3269 ("python-pyparsing" ,python-pyparsing)
3270 ("python-pygobject" ,python-pygobject)
3271 ("gobject-introspection" ,gobject-introspection)
3272 ("python-tkinter" ,python "tk")
3273 ("python-dateutil" ,python-dateutil)
3274 ("python-numpy" ,python-numpy)
3275 ("python-pillow" ,python-pillow)
3276 ("python-pytz" ,python-pytz)
3277 ("python-six" ,python-six)
3278 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3279 ;; from 'gtk+') provides the required 'typelib' files used by
3280 ;; 'gobject-introspection'. The location of these files is set with the
3281 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3282 ;; is done automatically by a 'native-search-path' procedure. However,
3283 ;; at run-time the user must set this variable as follows:
3284 ;;
3285 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
3286 ("gtk+" ,gtk+)
3287 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3288 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3289 ;; object. For this reason we need to import both libraries.
3290 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3291 ("python-pycairo" ,python-pycairo)
3292 ;; XXX: qtwebkit cannot be built reliably.
3293 ("python-pyqt" ,python-pyqt-without-qtwebkit)
3294 ("python-cairocffi" ,python-cairocffi)))
3295 (inputs
3296 `(("libpng" ,libpng)
3297 ("imagemagick" ,imagemagick)
3298 ("freetype" ,freetype)
3299 ("cairo" ,cairo)
3300 ("glib" ,glib)
3301 ;; FIXME: Add backends when available.
3302 ;("python-wxpython" ,python-wxpython)
3303 ("tcl" ,tcl)
3304 ("tk" ,tk)))
3305 (native-inputs
3306 `(("pkg-config" ,pkg-config)
3307 ("python-nose" ,python-nose)
3308 ("python-mock" ,python-mock)))
3309 (arguments
3310 `(#:phases
3311 (modify-phases %standard-phases
3312 (add-before 'build 'configure-environment
3313 (lambda* (#:key outputs inputs #:allow-other-keys)
3314 (let ((cairo (assoc-ref inputs "cairo"))
3315 (gtk+ (assoc-ref inputs "gtk+")))
3316 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3317 ;; has not effect.
3318 (setenv "LD_LIBRARY_PATH"
3319 (string-append cairo "/lib:" gtk+ "/lib"))
3320 (setenv "HOME" (getcwd))
3321 (call-with-output-file "setup.cfg"
3322 (lambda (port)
3323 (format port "[directories]~%
3324 basedirlist = ~a,~a~%
3325 [rc_options]~%
3326 backend = TkAgg~%"
3327 (assoc-ref inputs "tcl")
3328 (assoc-ref inputs "tk")))))
3329 #t)))))
3330 (home-page "http://matplotlib.org")
3331 (synopsis "2D plotting library for Python")
3332 (description
3333 "Matplotlib is a Python 2D plotting library which produces publication
3334 quality figures in a variety of hardcopy formats and interactive environments
3335 across platforms. Matplotlib can be used in Python scripts, the python and
3336 ipython shell, web application servers, and six graphical user interface
3337 toolkits.")
3338 (license license:psfl)
3339 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3340
3341 (define-public python2-matplotlib
3342 (let ((matplotlib (package-with-python2
3343 (strip-python2-variant python-matplotlib))))
3344 (package (inherit matplotlib)
3345 ;; Make sure to use special packages for Python 2 instead
3346 ;; of those automatically rewritten by package-with-python2.
3347 (propagated-inputs
3348 `(("python2-pycairo" ,python2-pycairo)
3349 ("python2-backports-functools-lru-cache"
3350 ,python2-backports-functools-lru-cache)
3351 ("python2-functools32" ,python2-functools32)
3352 ("python2-pygobject-2" ,python2-pygobject-2)
3353 ("python2-subprocess32" ,python2-subprocess32)
3354 ("python2-tkinter" ,python-2 "tk")
3355 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3356 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
3357
3358 (define-public python-matplotlib-documentation
3359 (package
3360 (name "python-matplotlib-documentation")
3361 (version (package-version python-matplotlib))
3362 (source (package-source python-matplotlib))
3363 (build-system python-build-system)
3364 (native-inputs
3365 `(("python-matplotlib" ,python-matplotlib)
3366 ("python-colorspacious" ,python-colorspacious)
3367 ("python-sphinx" ,python-sphinx)
3368 ("python-sphinx-gallery" ,python-sphinx-gallery)
3369 ("python-numpydoc" ,python-numpydoc)
3370 ("python-ipython" ,python-ipython)
3371 ("python-mock" ,python-mock)
3372 ("graphviz" ,graphviz)
3373 ("texlive" ,texlive)
3374 ("texinfo" ,texinfo)
3375 ,@(package-native-inputs python-matplotlib)))
3376 (arguments
3377 `(#:tests? #f ; we're only generating documentation
3378 #:phases
3379 (modify-phases %standard-phases
3380 (replace 'build
3381 (lambda _
3382 (chdir "doc")
3383 ;; Produce pdf in 'A4' format.
3384 (substitute* "conf.py"
3385 (("latex_paper_size = 'letter'") "")
3386 ;; latex_paper_size is deprecated -> set paper size using
3387 ;; latex_elements
3388 (("latex_elements\\['pointsize'\\] = '11pt'" match)
3389 ;; insert at a point where latex_elements{} is defined:
3390 (string-append match "\nlatex_elements['papersize'] = 'a4paper'")))
3391 (invoke "make" "SPHINXBUILD=sphinx-build" "html" "latex" "texinfo")))
3392 (replace 'install
3393 (lambda* (#:key inputs outputs #:allow-other-keys)
3394 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3395 (doc (string-append data "/doc/python-matplotlib-" ,version))
3396 (info (string-append data "/info"))
3397 (html (string-append doc "/html")))
3398 (mkdir-p html)
3399 (mkdir-p info)
3400 (copy-recursively "build/html" html)
3401 (symlink (string-append html "/_images")
3402 (string-append info "/matplotlib-figures"))
3403 (with-directory-excursion "build/texinfo"
3404 (substitute* "matplotlib.texi"
3405 (("@image\\{([^,]*)" all file)
3406 (string-append "@image{matplotlib-figures/" file)))
3407 (symlink (string-append html "/_images")
3408 "./matplotlib-figures")
3409 (system* "makeinfo" "--no-split"
3410 "-o" "matplotlib.info" "matplotlib.texi"))
3411 (copy-file "build/texinfo/matplotlib.info"
3412 (string-append info "/matplotlib.info"))
3413 (copy-file "build/latex/Matplotlib.pdf"
3414 (string-append doc "/Matplotlib.pdf")))
3415 #t)))))
3416 (home-page (package-home-page python-matplotlib))
3417 (synopsis "Documentation for the python-matplotlib package")
3418 (description (package-description python-matplotlib))
3419 (license (package-license python-matplotlib))))
3420
3421 (define-public python2-matplotlib-documentation
3422 (package-with-python2 python-matplotlib-documentation))
3423
3424 (define-public python2-pysnptools
3425 (package
3426 (name "python2-pysnptools")
3427 (version "0.3.13")
3428 (source
3429 (origin
3430 (method url-fetch)
3431 (uri (pypi-uri "pysnptools" version))
3432 (sha256
3433 (base32
3434 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
3435 (build-system python-build-system)
3436 (arguments
3437 `(#:python ,python-2 ; only Python 2.7 is supported
3438 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
3439 (propagated-inputs
3440 `(("python2-numpy" ,python2-numpy)
3441 ("python2-scipy" ,python2-scipy)
3442 ("python2-pandas" ,python2-pandas)))
3443 (native-inputs
3444 `(("python2-cython" ,python2-cython)))
3445 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
3446 (synopsis "Library for reading and manipulating genetic data")
3447 (description
3448 "PySnpTools is a library for reading and manipulating genetic data. It
3449 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
3450 those files. It can also efficiently manipulate ranges of integers using set
3451 operators such as union, intersection, and difference.")
3452 (license license:asl2.0)))
3453
3454 (define-public python-scipy
3455 (package
3456 (name "python-scipy")
3457 (version "1.1.0")
3458 (source
3459 (origin
3460 (method url-fetch)
3461 (uri (pypi-uri "scipy" version))
3462 (sha256
3463 (base32
3464 "1lfg686w6vv2m2dfs8v9d0bf2i18z7wz5vgzjnkgmpr4hi0550w7"))))
3465 (build-system python-build-system)
3466 (propagated-inputs
3467 `(("python-numpy" ,python-numpy)
3468 ("python-matplotlib" ,python-matplotlib)
3469 ("python-pyparsing" ,python-pyparsing)))
3470 (inputs
3471 `(("lapack" ,lapack)
3472 ("openblas" ,openblas)))
3473 (native-inputs
3474 `(("python-cython" ,python-cython)
3475 ("python-pytest" ,python-pytest)
3476 ("python-sphinx" ,python-sphinx)
3477 ("python-numpydoc" ,python-numpydoc)
3478 ("gfortran" ,gfortran)
3479 ("perl" ,perl)
3480 ("which" ,which)))
3481 (outputs '("out" "doc"))
3482 (arguments
3483 `(#:phases
3484 (modify-phases %standard-phases
3485 (add-after 'unpack 'disable-broken-tests
3486 (lambda _
3487 (substitute* "scipy/sparse/linalg/dsolve/tests/test_linsolve.py"
3488 (("^( +)def test_threads_parallel\\(self\\):" m indent)
3489 (string-append indent
3490 "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
3491 m)))
3492 (substitute* "scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py"
3493 (("^def test_parallel_threads\\(\\):" m)
3494 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
3495 m)))
3496 #t))
3497 (add-before 'build 'configure-openblas
3498 (lambda* (#:key inputs #:allow-other-keys)
3499 (call-with-output-file "site.cfg"
3500 (lambda (port)
3501 (format port
3502 "[blas]
3503 libraries = openblas
3504 library_dirs = ~a/lib
3505 include_dirs = ~a/include
3506
3507 # backslash-n to make emacs happy
3508 \n[atlas]
3509 library_dirs = ~a/lib
3510 atlas_libs = openblas
3511 "
3512 (assoc-ref inputs "openblas")
3513 (assoc-ref inputs "openblas")
3514 (assoc-ref inputs "openblas"))))
3515 #t))
3516 (add-after 'install 'install-doc
3517 (lambda* (#:key inputs outputs #:allow-other-keys)
3518 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3519 (doc (string-append data "/doc/" ,name "-" ,version))
3520 (html (string-append doc "/html"))
3521 (pyver ,(string-append "PYVER=" (version-major+minor
3522 (package-version python))))
3523 ;; By default it tries to run sphinx-build through the Python
3524 ;; interpreter which won't work with our shell wrapper.
3525 (sphinxbuild "SPHINXBUILD=LANG=C sphinx-build"))
3526 ;; Make installed package available for building the
3527 ;; documentation
3528 (add-installed-pythonpath inputs outputs)
3529 (with-directory-excursion "doc"
3530 ;; Fix generation of images for mathematical expressions.
3531 (substitute* (find-files "source" "conf\\.py")
3532 (("pngmath_use_preview = True")
3533 "pngmath_use_preview = False"))
3534 (mkdir-p html)
3535 (invoke "make" "html" pyver sphinxbuild)
3536 (with-directory-excursion "build/html"
3537 (for-each (lambda (file)
3538 (let* ((dir (dirname file))
3539 (tgt-dir (string-append html "/" dir)))
3540 (install-file file html)))
3541 (find-files "." ".*")))))
3542 #t))
3543 ;; Tests can only be run after the library has been installed and not
3544 ;; within the source directory.
3545 (delete 'check)
3546 (add-after 'install 'check
3547 (lambda* (#:key inputs outputs #:allow-other-keys)
3548 (add-installed-pythonpath inputs outputs)
3549 (with-directory-excursion "/tmp"
3550 (invoke "python" "-c"
3551 "import scipy; scipy.test(verbose=2)")))))))
3552 (home-page "https://www.scipy.org/")
3553 (synopsis "The Scipy library provides efficient numerical routines")
3554 (description "The SciPy library is one of the core packages that make up
3555 the SciPy stack. It provides many user-friendly and efficient numerical
3556 routines such as routines for numerical integration and optimization.")
3557 (properties `((python2-variant . ,(delay python2-scipy))))
3558 (license license:bsd-3)))
3559
3560 (define-public python2-scipy
3561 (package-with-python2
3562 (strip-python2-variant python-scipy)))
3563
3564 (define-public python-socksipy-branch
3565 (package
3566 (name "python-socksipy-branch")
3567 (version "1.01")
3568 (source
3569 (origin
3570 (method url-fetch)
3571 (uri (pypi-uri "SocksiPy-branch" version))
3572 (sha256
3573 (base32
3574 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
3575 (build-system python-build-system)
3576 (arguments
3577 `(#:tests? #f)) ; There are no tests
3578 (home-page "https://code.google.com/archive/p/socksipy-branch/")
3579 (synopsis "Python SOCKS module")
3580 (description
3581 "SocksiPy - A Python SOCKS client module. It provides a
3582 socket-like interface that supports connections to any TCP
3583 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
3584 The original version was developed by Dan Haim, this is a
3585 branch created by Mario Vilas to address some open issues,
3586 as the original project seems to have been abandoned circa 2007.")
3587 (license license:bsd-3)))
3588
3589 (define-public python2-socksipy-branch
3590 (package-with-python2 python-socksipy-branch))
3591
3592 (define-public python-pycodestyle
3593 (package
3594 (name "python-pycodestyle")
3595 (version "2.4.0")
3596 (source
3597 (origin
3598 (method url-fetch)
3599 (uri (pypi-uri "pycodestyle" version))
3600 (sha256
3601 (base32
3602 "0fhy4vnlgpjq4qd1wdnl6pvdw7rah0ypmn8c9mkhz8clsndskz6b"))))
3603 (build-system python-build-system)
3604 (home-page "https://pycodestyle.readthedocs.io/")
3605 (synopsis "Python style guide checker")
3606 (description "@code{pycodestyle} (formerly pep8) is a tool to check
3607 Python code against some of the style conventions in
3608 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
3609 (license license:expat)))
3610
3611 (define-public python2-pycodestyle
3612 (package-with-python2 python-pycodestyle))
3613
3614 (define-public python-multidict
3615 (package
3616 (name "python-multidict")
3617 (version "4.2.0")
3618 (source
3619 (origin
3620 (method url-fetch)
3621 (uri (pypi-uri "multidict" version))
3622 (sha256
3623 (base32
3624 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
3625 (build-system python-build-system)
3626 (native-inputs
3627 `(("python-pytest" ,python-pytest)
3628 ("python-pytest-runner" ,python-pytest-runner)))
3629 (home-page "https://github.com/aio-libs/multidict/")
3630 (synopsis "Multidict implementation")
3631 (description "Multidict is dict-like collection of key-value pairs
3632 where key might be occurred more than once in the container.")
3633 (license license:asl2.0)))
3634
3635 (define-public python-orderedmultidict
3636 (package
3637 (name "python-orderedmultidict")
3638 (version "0.7.11")
3639 (source
3640 (origin
3641 (method url-fetch)
3642 (uri (pypi-uri "orderedmultidict" version))
3643 (sha256
3644 (base32
3645 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
3646 (build-system python-build-system)
3647 (arguments
3648 `(#:phases
3649 (modify-phases %standard-phases
3650 (add-after 'unpack 'fix-tests
3651 (lambda _
3652 ;; The package uses nosetest for running the tests.
3653 ;; Adding this initfile allows to run the test suite
3654 ;; without requiring nosetest.
3655 (with-output-to-file "tests/__init__.py" newline)
3656 #t)))))
3657 (propagated-inputs
3658 `(("python-six" ,python-six)))
3659 (native-inputs
3660 `(("python-pycodestyle" ,python-pycodestyle)))
3661 (home-page "https://github.com/gruns/orderedmultidict")
3662 (synopsis "Python Ordered Multivalue Dictionary - omdict")
3663 (description "This package contains a library for ordered multivalue
3664 dictionaries. A multivalue dictionary is a dictionary that can store
3665 multiple values for the same key. An ordered multivalue dictionary is a
3666 multivalue dictionary that retains the order of insertions and deletions.")
3667 (license license:unlicense)))
3668
3669 (define-public python2-orderedmultidict
3670 (package-with-python2 python-orderedmultidict))
3671
3672 (define-public python-autopep8
3673 (package
3674 (name "python-autopep8")
3675 (version "1.3.5")
3676 (source
3677 (origin
3678 (method url-fetch)
3679 (uri (pypi-uri "autopep8" version))
3680 (sha256
3681 (base32
3682 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
3683 (build-system python-build-system)
3684 (propagated-inputs
3685 `(("python-pycodestyle" ,python-pycodestyle)))
3686 (home-page "https://github.com/hhatto/autopep8")
3687 (synopsis "Format Python code according to the PEP 8 style guide")
3688 (description
3689 "@code{autopep8} automatically formats Python code to conform to
3690 the PEP 8 style guide. It uses the pycodestyle utility to determine
3691 what parts of the code needs to be formatted. @code{autopep8} is
3692 capable of fixing most of the formatting issues that can be reported
3693 by pycodestyle.")
3694 (license (license:non-copyleft
3695 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
3696
3697 (define-public python2-autopep8
3698 (package-with-python2 python-autopep8))
3699
3700 (define-public python-distutils-extra
3701 (package
3702 (name "python-distutils-extra")
3703 (version "2.38")
3704 (source
3705 (origin
3706 (method url-fetch)
3707 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
3708 version "/+download/python-distutils-extra-"
3709 version ".tar.gz"))
3710 (sha256
3711 (base32
3712 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
3713 (build-system python-build-system)
3714 (home-page "https://launchpad.net/python-distutils-extra/")
3715 (synopsis "Enhancements to Python's distutils")
3716 (description
3717 "The python-distutils-extra module enables you to easily integrate
3718 gettext support, themed icons, and scrollkeeper-based documentation into
3719 Python's distutils.")
3720 (license license:gpl2)))
3721
3722 (define-public python2-distutils-extra
3723 (package-with-python2 python-distutils-extra))
3724
3725 (define-public python2-elib.intl
3726 (package
3727 (name "python2-elib.intl")
3728 (version "0.0.3")
3729 (source
3730 (origin
3731 ;; This project doesn't tag releases or publish tarballs, so we take
3732 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
3733 (method git-fetch)
3734 (uri (git-reference
3735 (url "https://github.com/dieterv/elib.intl.git")
3736 (commit "d09997cfef")))
3737 (file-name (string-append name "-" version "-checkout"))
3738 (sha256
3739 (base32
3740 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
3741 (build-system python-build-system)
3742 (arguments
3743 ;; incompatible with Python 3 (exception syntax)
3744 `(#:python ,python-2
3745 #:tests? #f))
3746 (home-page "https://github.com/dieterv/elib.intl")
3747 (synopsis "Enhanced internationalization for Python")
3748 (description
3749 "The elib.intl module provides enhanced internationalization (I18N)
3750 services for your Python modules and applications.")
3751 (license license:lgpl3+)))
3752
3753 (define-public python-olefile
3754 (package
3755 (name "python-olefile")
3756 (version "0.45.1")
3757 (source
3758 (origin
3759 (method url-fetch)
3760 (uri (string-append "https://github.com/decalage2/olefile/archive/v"
3761 version ".tar.gz"))
3762 (file-name (string-append name "-" version ".tar.gz"))
3763 (sha256
3764 (base32
3765 "18ai19zwagm6nli14k8bii31ipbab2rp7plrvsm6gmfql551a8ai"))))
3766 (build-system python-build-system)
3767 (home-page
3768 "https://www.decalage.info/python/olefileio")
3769 (synopsis "Read and write Microsoft OLE2 files.")
3770 (description
3771 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
3772 Storage or Compound Document, Microsoft Office). It is an improved version of
3773 the OleFileIO module from PIL, the Python Image Library.")
3774 (license license:bsd-3)))
3775
3776 (define-public python2-olefile
3777 (package-with-python2 python-olefile))
3778
3779 (define-public python-pillow
3780 (package
3781 (name "python-pillow")
3782 (version "5.4.1")
3783 (source
3784 (origin
3785 (method url-fetch)
3786 (uri (pypi-uri "Pillow" version))
3787 (sha256
3788 (base32
3789 "17waygkhhzjd75kajlfw9v57mbb41lcpg6cvkdijqd7smm76ccsj"))))
3790 (build-system python-build-system)
3791 (native-inputs
3792 `(("python-pytest" ,python-pytest)))
3793 (inputs
3794 `(("freetype" ,freetype)
3795 ("lcms" ,lcms)
3796 ("zlib" ,zlib)
3797 ("libjpeg" ,libjpeg)
3798 ("openjpeg" ,openjpeg)
3799 ("libtiff" ,libtiff)
3800 ("libwebp" ,libwebp)))
3801 (propagated-inputs
3802 `(("python-olefile" ,python-olefile)))
3803 (arguments
3804 `(#:phases
3805 (modify-phases %standard-phases
3806 (add-after 'unpack 'patch-ldconfig
3807 (lambda _
3808 (substitute* "setup.py"
3809 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
3810 (delete 'check) ; We must run checks after python-pillow is installed.
3811 (add-after 'install 'check-installed
3812 (lambda* (#:key outputs inputs #:allow-other-keys)
3813 (begin
3814 (setenv "HOME" (getcwd))
3815 ;; Make installed package available for running the tests.
3816 (add-installed-pythonpath inputs outputs)
3817 (invoke "python" "selftest.py" "--installed")
3818 (invoke "python" "-m" "pytest" "-vv")))))))
3819 (home-page "https://python-pillow.org")
3820 (synopsis "Fork of the Python Imaging Library")
3821 (description
3822 "The Python Imaging Library adds image processing capabilities to your
3823 Python interpreter. This library provides extensive file format support, an
3824 efficient internal representation, and fairly powerful image processing
3825 capabilities. The core image library is designed for fast access to data
3826 stored in a few basic pixel formats. It should provide a solid foundation for
3827 a general image processing tool.")
3828 (license (license:x11-style
3829 "http://www.pythonware.com/products/pil/license.htm"
3830 "The PIL Software License"))))
3831
3832 (define-public python2-pillow
3833 (package-with-python2 python-pillow))
3834
3835 (define-public python-pycparser
3836 (package
3837 (name "python-pycparser")
3838 (version "2.18")
3839 (source
3840 (origin
3841 (method url-fetch)
3842 (uri (pypi-uri "pycparser" version))
3843 (sha256
3844 (base32
3845 "09mjyw82ibqzl449g7swy8bfxnfpmas0815d2rkdjlcqw81wma4r"))))
3846 (outputs '("out" "doc"))
3847 (build-system python-build-system)
3848 (native-inputs
3849 `(("pkg-config" ,pkg-config)))
3850 (arguments
3851 `(#:phases
3852 (modify-phases %standard-phases
3853 (replace 'check
3854 (lambda _
3855 (with-directory-excursion "tests"
3856 (invoke "python" "all_tests.py"))
3857 #t))
3858 (add-after 'install 'install-doc
3859 (lambda* (#:key outputs #:allow-other-keys)
3860 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3861 (doc (string-append data "/doc/" ,name "-" ,version))
3862 (examples (string-append doc "/examples")))
3863 (mkdir-p examples)
3864 (for-each (lambda (file)
3865 (copy-file (string-append "." file)
3866 (string-append doc file)))
3867 '("/README.rst" "/CHANGES" "/LICENSE"))
3868 (copy-recursively "examples" examples)))))))
3869 (home-page "https://github.com/eliben/pycparser")
3870 (synopsis "C parser in Python")
3871 (description
3872 "Pycparser is a complete parser of the C language, written in pure Python
3873 using the PLY parsing library. It parses C code into an AST and can serve as
3874 a front-end for C compilers or analysis tools.")
3875 (license license:bsd-3)))
3876
3877 (define-public python2-pycparser
3878 (package-with-python2 python-pycparser))
3879
3880 (define-public python-pywavelets
3881 (package
3882 (name "python-pywavelets")
3883 (version "1.0.1")
3884 (home-page "https://github.com/PyWavelets/pywt")
3885 (source (origin
3886 (method url-fetch)
3887 (uri (pypi-uri "PyWavelets" version))
3888 (sha256
3889 (base32
3890 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
3891 (build-system python-build-system)
3892 (arguments
3893 '(#:modules ((ice-9 ftw)
3894 (srfi srfi-1)
3895 (srfi srfi-26)
3896 (guix build utils)
3897 (guix build python-build-system))
3898 #:phases (modify-phases %standard-phases
3899 (replace 'check
3900 (lambda _
3901 (let ((cwd (getcwd))
3902 (libdir (find (cut string-prefix? "lib." <>)
3903 (scandir "build"))))
3904 (with-directory-excursion (string-append cwd "/build/" libdir)
3905 (invoke "nosetests" "-v" "."))))))))
3906 (native-inputs
3907 `(("python-matplotlib" ,python-matplotlib) ;for tests
3908 ("python-nose" ,python-nose)))
3909 (propagated-inputs
3910 `(("python-numpy" ,python-numpy)))
3911 (synopsis "Wavelet transforms in Python")
3912 (description
3913 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
3914 mathematical basis functions that are localized in both time and frequency.
3915 Wavelet transforms are time-frequency transforms employing wavelets. They are
3916 similar to Fourier transforms, the difference being that Fourier transforms are
3917 localized only in frequency instead of in time and frequency.")
3918 (license license:expat)))
3919
3920 (define-public python2-pywavelets
3921 (package-with-python2 python-pywavelets))
3922
3923 (define-public python-xcffib
3924 (package
3925 (name "python-xcffib")
3926 (version "0.6.0")
3927 (source
3928 (origin
3929 (method url-fetch)
3930 (uri (pypi-uri "xcffib" version))
3931 (sha256
3932 (base32
3933 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
3934 (build-system python-build-system)
3935 (inputs
3936 `(("libxcb" ,libxcb)))
3937 (propagated-inputs
3938 `(("python-cffi" ,python-cffi) ; used at run time
3939 ("python-six" ,python-six)))
3940 (arguments
3941 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
3942 #:tests? #f
3943 #:phases
3944 (modify-phases %standard-phases
3945 (add-after 'unpack 'fix-libxcb-path
3946 (lambda* (#:key inputs #:allow-other-keys)
3947 (let ((libxcb (assoc-ref inputs "libxcb")))
3948 (substitute* '("xcffib/__init__.py")
3949 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
3950 #t)))
3951 (add-after 'install 'install-doc
3952 (lambda* (#:key outputs #:allow-other-keys)
3953 (let ((doc (string-append (assoc-ref outputs "out") "/share"
3954 "/doc/" ,name "-" ,version)))
3955 (mkdir-p doc)
3956 (copy-file "README.md"
3957 (string-append doc "/README.md"))
3958 #t))))))
3959 (home-page "https://github.com/tych0/xcffib")
3960 (synopsis "XCB Python bindings")
3961 (description
3962 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
3963 support for Python 3 and PyPy. It is based on cffi.")
3964 (license license:expat)))
3965
3966 (define-public python2-xcffib
3967 (package-with-python2 python-xcffib))
3968
3969 (define-public python-cairocffi
3970 (package
3971 (name "python-cairocffi")
3972 (version "0.9.0")
3973 (source
3974 (origin
3975 (method url-fetch)
3976 (uri (pypi-uri "cairocffi" version))
3977 (sha256
3978 (base32
3979 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
3980 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
3981 (build-system python-build-system)
3982 (outputs '("out" "doc"))
3983 (inputs
3984 `(("glib" ,glib)
3985 ("gtk+" ,gtk+)
3986 ("gdk-pixbuf" ,gdk-pixbuf)
3987 ("cairo" ,cairo)
3988 ("pango" ,pango)))
3989 (native-inputs
3990 `(("pkg-config" ,pkg-config)
3991 ("python-pytest" ,python-pytest)
3992 ("python-pytest-cov" ,python-pytest-cov)
3993 ("python-pytest-runner" ,python-pytest-runner)
3994 ("python-sphinx" ,python-sphinx)
3995 ("python-docutils" ,python-docutils)))
3996 (propagated-inputs
3997 `(("python-xcffib" ,python-xcffib))) ; used at run time
3998 (arguments
3999 `(#:phases
4000 (modify-phases %standard-phases
4001 (add-after 'unpack 'patch-paths
4002 (lambda* (#:key inputs outputs #:allow-other-keys)
4003 (substitute* (find-files "." "\\.py$")
4004 (("dlopen\\(ffi, 'cairo'")
4005 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
4006 "/lib/libcairo.so.2'"))
4007 (("dlopen\\(ffi, 'gdk-3'")
4008 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
4009 "/lib/libgtk-3.so.0'"))
4010 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
4011 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
4012 "/lib/libgdk_pixbuf-2.0.so.0'"))
4013 (("dlopen\\(ffi, 'glib-2.0'")
4014 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4015 "/lib/libglib-2.0.so.0'"))
4016 (("dlopen\\(ffi, 'gobject-2.0'")
4017 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4018 "/lib/libgobject-2.0.so.0'"))
4019 (("dlopen\\(ffi, 'pangocairo-1.0'")
4020 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4021 "/lib/libpangocairo-1.0.so.0'"))
4022 (("dlopen\\(ffi, 'pango-1.0'")
4023 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4024 "/lib/libpango-1.0.so.0'")))
4025 #t))
4026 (add-after 'install 'install-doc
4027 (lambda* (#:key inputs outputs #:allow-other-keys)
4028 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4029 (doc (string-append data "/doc/" ,name "-" ,version))
4030 (html (string-append doc "/html")))
4031 (setenv "LD_LIBRARY_PATH"
4032 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4033 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4034 (setenv "LANG" "en_US.UTF-8")
4035 (mkdir-p html)
4036 (for-each (lambda (file)
4037 (copy-file (string-append "." file)
4038 (string-append doc file)))
4039 '("/README.rst" "/CHANGES" "/LICENSE"))
4040 (system* "python" "setup.py" "build_sphinx")
4041 (copy-recursively "docs/_build/html" html)
4042 #t))))))
4043 (home-page "https://github.com/Kozea/cairocffi")
4044 (synopsis "Python bindings and object-oriented API for Cairo")
4045 (description
4046 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4047 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4048 graphics library with support for multiple backends including image buffers,
4049 PNG, PostScript, PDF, and SVG file output.")
4050 (license license:bsd-3)))
4051
4052 (define-public python2-cairocffi
4053 (package-with-python2 python-cairocffi))
4054
4055 (define-public python-decorator
4056 (package
4057 (name "python-decorator")
4058 (version "4.3.0")
4059 (source
4060 (origin
4061 (method url-fetch)
4062 (uri (pypi-uri "decorator" version))
4063 (sha256
4064 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
4065 (build-system python-build-system)
4066 (home-page "https://pypi.python.org/pypi/decorator/")
4067 (synopsis "Python module to simplify usage of decorators")
4068 (description
4069 "The aim of the decorator module is to simplify the usage of decorators
4070 for the average programmer, and to popularize decorators usage giving examples
4071 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4072 etc. The core of this module is a decorator factory.")
4073 (license license:expat)))
4074
4075 (define-public python2-decorator
4076 (package-with-python2 python-decorator))
4077
4078 (define-public python-drmaa
4079 (package
4080 (name "python-drmaa")
4081 (version "0.7.7")
4082 (source
4083 (origin
4084 (method url-fetch)
4085 (uri (pypi-uri "drmaa" version))
4086 (sha256
4087 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4088 (build-system python-build-system)
4089 ;; The test suite requires libdrmaa which is provided by the cluster
4090 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4091 ;; should be set to the path of the libdrmaa library.
4092 (arguments '(#:tests? #f))
4093 (native-inputs
4094 `(("python-nose" ,python-nose)))
4095 (home-page "https://pypi.python.org/pypi/drmaa")
4096 (synopsis "Python bindings for the DRMAA library")
4097 (description
4098 "A Python package for Distributed Resource Management (DRM) job
4099 submission and control. This package is an implementation of the DRMAA 1.0
4100 Python language binding specification.")
4101 (license license:bsd-3)))
4102
4103 (define-public python2-drmaa
4104 (package-with-python2 python-drmaa))
4105
4106 (define-public python-grako
4107 (package
4108 (name "python-grako")
4109 (version "3.99.9")
4110 (source
4111 (origin
4112 (method url-fetch)
4113 (uri
4114 (pypi-uri "grako" version ".zip"))
4115 (sha256
4116 (base32
4117 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4118 (build-system python-build-system)
4119 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4120 (native-inputs
4121 `(("unzip" ,unzip)
4122 ("python-pytest" ,python-pytest)
4123 ("python-pytest-runner" ,python-pytest-runner)))
4124 (home-page "https://bitbucket.org/neogeny/grako")
4125 (synopsis "EBNF parser generator")
4126 (description
4127 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4128 memoizing PEG/Packrat parser in Python.")
4129 (license license:bsd-3)))
4130
4131 (define-public python2-grako
4132 (package-with-python2 python-grako))
4133
4134 (define-public python-gridmap
4135 (package
4136 (name "python-gridmap")
4137 (version "0.13.0")
4138 (source
4139 (origin
4140 (method url-fetch)
4141 (uri (string-append
4142 "https://github.com/pygridtools/gridmap/archive/v"
4143 version ".tar.gz"))
4144 (file-name (string-append name "-" version ".tar.gz"))
4145 (sha256
4146 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
4147 (build-system python-build-system)
4148 (arguments
4149 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4150 (propagated-inputs
4151 `(("python-psutil" ,python-psutil)
4152 ("python-drmaa" ,python-drmaa)
4153 ("python-pyzmq" ,python-pyzmq)))
4154 (home-page "https://github.com/pygridtools/gridmap")
4155 (synopsis "Create jobs on a cluster directly from Python")
4156 (description
4157 "Gridmap is a Python package to allow you to easily create jobs on the
4158 cluster directly from Python. You can directly map Python functions onto the
4159 cluster without needing to write any wrapper code yourself.")
4160 (license license:gpl3+)))
4161
4162 (define-public python2-gridmap
4163 (package-with-python2 python-gridmap))
4164
4165 (define-public python-honcho
4166 (package
4167 (name "python-honcho")
4168 (version "1.0.1")
4169 (source
4170 (origin
4171 (method url-fetch)
4172 (uri (string-append
4173 "https://github.com/nickstenning/honcho/archive/v"
4174 version ".tar.gz"))
4175 (file-name (string-append name "-" version ".tar.gz"))
4176 (sha256
4177 (base32 "0zizn61n5z5hq421hkypk9pw8s6fpxw30f4hsg7k4ivwzy3gjw9j"))))
4178 (build-system python-build-system)
4179 (native-inputs
4180 `(("python-pytest" ,python-pytest)
4181 ("python-mock" ,python-mock)
4182 ("python-tox" ,python-tox)
4183 ("which" ,which))) ;for tests
4184 (propagated-inputs
4185 `(("python-jinja2" ,python-jinja2)))
4186 (arguments
4187 `(#:phases
4188 (modify-phases %standard-phases
4189 (delete 'check)
4190 (add-after 'install 'check
4191 (lambda* (#:key outputs inputs #:allow-other-keys)
4192 ;; fix honcho path in testsuite
4193 (substitute* "tests/conftest.py"
4194 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
4195 "/bin/honcho" "'")))
4196 ;; It's easier to run tests after install.
4197 ;; Make installed package available for running the tests
4198 (add-installed-pythonpath inputs outputs)
4199 (invoke "py.test" "-v"))))))
4200 (home-page "https://github.com/nickstenning/honcho")
4201 (synopsis "Manage Procfile-based applications")
4202 (description
4203 "A Procfile is a file which describes how to run an application
4204 consisting of serveral processes. honcho starts all listed processes.
4205 The output of all running processes is collected by honcho and
4206 displayed.")
4207 (license license:expat)))
4208
4209 (define-public python2-honcho
4210 (package-with-python2 python-honcho))
4211
4212 (define-public python-pexpect
4213 (package
4214 (name "python-pexpect")
4215 (version "4.6.0")
4216 (source
4217 (origin
4218 (method url-fetch)
4219 (uri (pypi-uri "pexpect" version))
4220 (sha256
4221 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
4222 (build-system python-build-system)
4223 (arguments
4224 `(#:phases
4225 (modify-phases %standard-phases
4226 (add-before 'check 'prepare-tests
4227 (lambda _
4228 (substitute* (find-files "tests")
4229 (("/bin/ls") (which "ls"))
4230 (("/bin/echo") (which "echo"))
4231 (("/bin/which") (which "which"))
4232 ;; Many tests try to use the /bin directory which
4233 ;; is not present in the build environment.
4234 ;; Use one that's non-empty and unlikely to change.
4235 (("/bin'") "/dev'"))
4236 ;; XXX: Socket connection test gets "Connection reset by peer".
4237 ;; Why does it not work? Delete for now.
4238 (delete-file "tests/test_socket.py")
4239 #t))
4240 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
4241 (native-inputs
4242 `(("python-nose" ,python-nose)
4243 ("python-pytest" ,python-pytest)
4244 ("man-db" ,man-db)
4245 ("which" ,which)
4246 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
4247 (propagated-inputs
4248 `(("python-ptyprocess" ,python-ptyprocess)))
4249 (home-page "http://pexpect.readthedocs.org/")
4250 (synopsis "Controlling interactive console applications")
4251 (description
4252 "Pexpect is a pure Python module for spawning child applications;
4253 controlling them; and responding to expected patterns in their output.
4254 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4255 child application and control it as if a human were typing commands.")
4256 (license license:isc)))
4257
4258 (define-public python2-pexpect
4259 (package-with-python2 python-pexpect))
4260
4261 (define-public python-setuptools-scm
4262 (package
4263 (name "python-setuptools-scm")
4264 (version "3.1.0")
4265 (source (origin
4266 (method url-fetch)
4267 (uri (pypi-uri "setuptools_scm" version))
4268 (sha256
4269 (base32
4270 "0h4bglwfz8b9prqljv8z3w9rgydfyxzaj05bm1y6zs5m6shz548i"))))
4271 (build-system python-build-system)
4272 (home-page "https://github.com/pypa/setuptools_scm/")
4273 (synopsis "Manage Python package versions in SCM metadata")
4274 (description
4275 "Setuptools_scm handles managing your Python package versions in
4276 @dfn{software configuration management} (SCM) metadata instead of declaring
4277 them as the version argument or in a SCM managed file.")
4278 (license license:expat)))
4279
4280 (define-public python2-setuptools-scm
4281 (package-with-python2 python-setuptools-scm))
4282
4283 (define-public python-pathpy
4284 (package
4285 (name "python-pathpy")
4286 (version "11.0.1")
4287 (source
4288 (origin
4289 (method url-fetch)
4290 (uri (pypi-uri "path.py" version))
4291 (sha256
4292 (base32 "07x15v8c7ry9bvycw294c9yq6ky9v2b0dalvgi6rn38ilh69vsz7"))))
4293 ;; (outputs '("out" "doc"))
4294 (build-system python-build-system)
4295 (propagated-inputs
4296 `(("python-appdirs" ,python-appdirs)))
4297 (native-inputs
4298 `(("python-setuptools-scm" ,python-setuptools-scm)
4299 ("python-sphinx" ,python-sphinx)
4300 ("python-rst.linker" ,python-rst.linker)
4301 ("python-pytest" ,python-pytest)
4302 ("python-pytest-runner" ,python-pytest-runner)))
4303 (arguments
4304 ;; FIXME: Documentation and tests require "jaraco.packaging".
4305 `(#:tests? #f))
4306 ;; #:phases
4307 ;; (modify-phases %standard-phases
4308 ;; (add-after 'build 'build-doc
4309 ;; (lambda _
4310 ;; (setenv "LANG" "en_US.UTF-8")
4311 ;; (zero? (system* "python" "setup.py" "build_sphinx"))))
4312 ;; (add-after 'install 'install-doc
4313 ;; (lambda* (#:key outputs #:allow-other-keys)
4314 ;; (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4315 ;; (doc (string-append data "/doc/" ,name "-" ,version))
4316 ;; (html (string-append doc "/html")))
4317 ;; (mkdir-p html)
4318 ;; (for-each (lambda (file)
4319 ;; (copy-file file (string-append doc "/" file)))
4320 ;; '("README.rst" "CHANGES.rst"))
4321 ;; (copy-recursively "build/sphinx/html" html)))))))
4322 (home-page "https://github.com/jaraco/path.py")
4323 (synopsis "Python module wrapper for built-in os.path")
4324 (description
4325 "@code{path.py} implements path objects as first-class entities, allowing
4326 common operations on files to be invoked on those path objects directly.")
4327 (license license:expat)))
4328
4329 (define-public python2-pathpy
4330 (package-with-python2 python-pathpy))
4331
4332 (define-public python-simplegeneric
4333 (package
4334 (name "python-simplegeneric")
4335 (version "0.8.1")
4336 (source
4337 (origin
4338 (method url-fetch)
4339 (uri (pypi-uri "simplegeneric" version ".zip"))
4340 (sha256
4341 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
4342 (build-system python-build-system)
4343 (native-inputs
4344 `(("unzip" ,unzip)))
4345 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
4346 (synopsis "Python module for simple generic functions")
4347 (description
4348 "The simplegeneric module lets you define simple single-dispatch generic
4349 functions, akin to Python’s built-in generic functions like @code{len()},
4350 @code{iter()} and so on. However, instead of using specially-named methods,
4351 these generic functions use simple lookup tables, akin to those used by
4352 e.g. @code{pickle.dump()} and other generic functions found in the Python
4353 standard library.")
4354 (license license:zpl2.1)))
4355
4356 (define-public python2-simplegeneric
4357 (package-with-python2 python-simplegeneric))
4358
4359 (define-public python-ipython-genutils
4360 ;; TODO: This package is retired, check if can be removed, see description.
4361 (package
4362 (name "python-ipython-genutils")
4363 (version "0.1.0")
4364 (source
4365 (origin
4366 (method url-fetch)
4367 (uri (pypi-uri "ipython_genutils" version))
4368 (sha256
4369 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
4370 (build-system python-build-system)
4371 (arguments `(#:tests? #f)) ; no tests
4372 (home-page "https://ipython.org")
4373 (synopsis "Vestigial utilities from IPython")
4374 (description
4375 "This package provides retired utilities from IPython. No packages
4376 outside IPython/Jupyter should depend on it.
4377
4378 This package shouldn't exist. It contains some common utilities shared by
4379 Jupyter and IPython projects during The Big Split. As soon as possible, those
4380 packages will remove their dependency on this, and this package will go
4381 away.")
4382 (license license:bsd-3)))
4383
4384 (define-public python2-ipython-genutils
4385 (package-with-python2 python-ipython-genutils))
4386
4387 (define-public python-traitlets
4388 (package
4389 (name "python-traitlets")
4390 (version "4.3.2")
4391 (source
4392 (origin
4393 (method url-fetch)
4394 (uri (pypi-uri "traitlets" version))
4395 (sha256
4396 (base32
4397 "0dbq7sx26xqz5ixs711k5nc88p8a0nqyz6162pwks5dpcz9d4jww"))))
4398 (build-system python-build-system)
4399 (arguments
4400 `(#:phases
4401 (modify-phases %standard-phases
4402 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
4403 (propagated-inputs
4404 `(("python-ipython-genutils" ,python-ipython-genutils)
4405 ("python-decorator" ,python-decorator))) ;not needed for >4.3.2
4406 (native-inputs
4407 `(("python-pytest" ,python-pytest)))
4408 (properties `((python2-variant . ,(delay python2-traitlets))))
4409 (home-page "https://ipython.org")
4410 (synopsis "Configuration system for Python applications")
4411 (description
4412 "Traitlets is a framework that lets Python classes have attributes with
4413 type checking, dynamically calculated default values, and ‘on change’
4414 callbacks. The package also includes a mechanism to use traitlets for
4415 configuration, loading values from files or from command line arguments. This
4416 is a distinct layer on top of traitlets, so you can use traitlets in your code
4417 without using the configuration machinery.")
4418 (license license:bsd-3)))
4419
4420 (define-public python2-traitlets
4421 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
4422 (package
4423 (inherit traitlets)
4424 (propagated-inputs
4425 `(("python2-enum34" ,python2-enum34)
4426 ,@(package-propagated-inputs traitlets))))))
4427
4428 (define-public python-jupyter-core
4429 (package
4430 (name "python-jupyter-core")
4431 (version "4.4.0")
4432 (source
4433 (origin
4434 (method url-fetch)
4435 (uri (string-append (pypi-uri "jupyter_core" version)))
4436 (sha256
4437 (base32
4438 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
4439 (build-system python-build-system)
4440 ;; FIXME: not sure how to run the tests
4441 (arguments `(#:tests? #f))
4442 (propagated-inputs
4443 `(("python-traitlets" ,python-traitlets)))
4444 (home-page "http://jupyter.org/")
4445 (synopsis "Jupyter base package")
4446 (description
4447 "Jupyter core is the base package on which Jupyter projects rely.")
4448 (license license:bsd-3)))
4449
4450 (define-public python2-jupyter-core
4451 (package-with-python2 python-jupyter-core))
4452
4453 (define-public python-jupyter-client
4454 (package
4455 (name "python-jupyter-client")
4456 (version "5.2.4")
4457 (source
4458 (origin
4459 (method url-fetch)
4460 (uri (pypi-uri "jupyter_client" version))
4461 (sha256
4462 (base32
4463 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
4464 (build-system python-build-system)
4465 ;; Tests fail because of missing native python kernel which I assume is
4466 ;; provided by the ipython package, which we cannot use because it would
4467 ;; cause a dependency cycle.
4468 (arguments `(#:tests? #f))
4469 (propagated-inputs
4470 `(("python-pyzmq" ,python-pyzmq)
4471 ("python-traitlets" ,python-traitlets)
4472 ("python-jupyter-core" ,python-jupyter-core)))
4473 (home-page "http://jupyter.org/")
4474 (synopsis "Jupyter protocol implementation and client libraries")
4475 (description
4476 "The @code{jupyter_client} package contains the reference implementation
4477 of the Jupyter protocol. It also provides client and kernel management APIs
4478 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
4479 installing @code{kernelspec}s for use with Jupyter frontends.")
4480 (license license:bsd-3)))
4481
4482 (define-public python2-jupyter-client
4483 (package-with-python2 python-jupyter-client))
4484
4485 (define-public python-ipykernel
4486 (package
4487 (name "python-ipykernel")
4488 (version "5.1.0")
4489 (source
4490 (origin
4491 (method url-fetch)
4492 (uri (pypi-uri "ipykernel" version))
4493 (sha256
4494 (base32 "0br95qhrd5k65g10djngiy27hs0642301hlf2q142i8djabvzh0g"))))
4495 (build-system python-build-system)
4496 (arguments
4497 `(#:phases
4498 (modify-phases %standard-phases
4499 (replace 'check
4500 (lambda _
4501 (setenv "HOME" "/tmp")
4502 (invoke "pytest" "-v")
4503 #t)))))
4504 (propagated-inputs
4505 `(("python-ipython" ,python-ipython)
4506 ;; imported at runtime during connect
4507 ("python-jupyter-client" ,python-jupyter-client)))
4508 (native-inputs
4509 `(("python-pytest" ,python-pytest)
4510 ("python-nose" ,python-nose)))
4511 (home-page "https://ipython.org")
4512 (synopsis "IPython Kernel for Jupyter")
4513 (description
4514 "This package provides the IPython kernel for Jupyter.")
4515 (license license:bsd-3)))
4516
4517 (define-public python2-ipykernel
4518 (package-with-python2 python-ipykernel))
4519
4520 ;; This is the latest release of the LTS version of ipython with support for
4521 ;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
4522 ;; dropped support for Python 2.7. We may want to rename this package.
4523 (define-public python-ipython
4524 (package
4525 (name "python-ipython")
4526 (version "5.8.0")
4527 (source
4528 (origin
4529 (method url-fetch)
4530 (uri (pypi-uri "ipython" version ".tar.gz"))
4531 (sha256
4532 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
4533 (build-system python-build-system)
4534 (outputs '("out" "doc"))
4535 (propagated-inputs
4536 `(("python-pyzmq" ,python-pyzmq)
4537 ("python-prompt-toolkit" ,python-prompt-toolkit-1)
4538 ("python-terminado" ,python-terminado)
4539 ("python-matplotlib" ,python-matplotlib)
4540 ("python-numpy" ,python-numpy)
4541 ("python-numpydoc" ,python-numpydoc)
4542 ("python-jinja2" ,python-jinja2)
4543 ("python-mistune" ,python-mistune)
4544 ("python-pexpect" ,python-pexpect)
4545 ("python-pickleshare" ,python-pickleshare)
4546 ("python-simplegeneric" ,python-simplegeneric)
4547 ("python-jsonschema" ,python-jsonschema)
4548 ("python-traitlets" ,python-traitlets)
4549 ("python-nbformat" ,python-nbformat)
4550 ("python-pygments" ,python-pygments)))
4551 (inputs
4552 `(("readline" ,readline)
4553 ("which" ,which)))
4554 (native-inputs
4555 `(("graphviz" ,graphviz)
4556 ("pkg-config" ,pkg-config)
4557 ("python-requests" ,python-requests) ;; for tests
4558 ("python-testpath" ,python-testpath)
4559 ("python-nose" ,python-nose)
4560 ("python-sphinx" ,python-sphinx)
4561 ("python-shpinx-rtd-theme" ,python-sphinx-rtd-theme)
4562 ;; FIXME: It's possible that a smaller union would work just as well.
4563 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
4564 texlive-fonts-ec
4565 texlive-generic-ifxetex
4566 texlive-generic-pdftex
4567 texlive-latex-amsfonts
4568 texlive-latex-capt-of
4569 texlive-latex-cmap
4570 texlive-latex-environ
4571 texlive-latex-eqparbox
4572 texlive-latex-etoolbox
4573 texlive-latex-expdlist
4574 texlive-latex-fancyhdr
4575 texlive-latex-fancyvrb
4576 texlive-latex-fncychap
4577 texlive-latex-float
4578 texlive-latex-framed
4579 texlive-latex-geometry
4580 texlive-latex-graphics
4581 texlive-latex-hyperref
4582 texlive-latex-mdwtools
4583 texlive-latex-multirow
4584 texlive-latex-oberdiek
4585 texlive-latex-parskip
4586 texlive-latex-preview
4587 texlive-latex-tabulary
4588 texlive-latex-threeparttable
4589 texlive-latex-titlesec
4590 texlive-latex-trimspaces
4591 texlive-latex-ucs
4592 texlive-latex-upquote
4593 texlive-latex-url
4594 texlive-latex-varwidth
4595 texlive-latex-wrapfig)))
4596 ("texinfo" ,texinfo)))
4597 (arguments
4598 `(#:phases
4599 (modify-phases %standard-phases
4600 (add-after 'install 'install-doc
4601 (lambda* (#:key inputs outputs #:allow-other-keys)
4602 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4603 (doc (string-append data "/doc/" ,name "-" ,version))
4604 (html (string-append doc "/html"))
4605 (man1 (string-append data "/man/man1"))
4606 (info (string-append data "/info"))
4607 (examples (string-append doc "/examples"))
4608 (python-arg (string-append "PYTHON=" (which "python"))))
4609 (setenv "LANG" "en_US.utf8")
4610 ;; Make installed package available for running the tests
4611 (add-installed-pythonpath inputs outputs)
4612 (with-directory-excursion "docs"
4613 ;; FIXME: pdf fails to build
4614 ;;(system* "make" "pdf" "PAPER=a4")
4615 (system* "make" python-arg "html")
4616 (system* "make" python-arg "info"))
4617 (copy-recursively "docs/man" man1)
4618 (copy-recursively "examples" examples)
4619 (copy-recursively "docs/build/html" html)
4620 ;; (copy-file "docs/build/latex/ipython.pdf"
4621 ;; (string-append doc "/ipython.pdf"))
4622 (mkdir-p info)
4623 (copy-file "docs/build/texinfo/ipython.info"
4624 (string-append info "/ipython.info"))
4625 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
4626 #t))
4627 ;; Tests can only be run after the library has been installed and not
4628 ;; within the source directory.
4629 (delete 'check)
4630 (add-after 'install 'check
4631 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
4632 (if tests?
4633 (begin
4634 ;; Make installed package available for running the tests
4635 (add-installed-pythonpath inputs outputs)
4636 (setenv "HOME" "/tmp/") ;; required by a test
4637 ;; We only test the core because one of the other tests
4638 ;; tries to import ipykernel.
4639 (invoke "python" "IPython/testing/iptest.py"
4640 "-v" "IPython/core/tests"))
4641 #t)))
4642 (add-before 'check 'fix-tests
4643 (lambda* (#:key inputs #:allow-other-keys)
4644 (substitute* "./IPython/utils/_process_posix.py"
4645 (("/usr/bin/env', 'which") (which "which")))
4646 (substitute* "./IPython/core/tests/test_inputtransformer.py"
4647 (("#!/usr/bin/env python")
4648 (string-append "#!" (which "python"))))
4649 ;; Disable 1 failing test
4650 (substitute* "./IPython/core/tests/test_magic.py"
4651 (("def test_dirops\\(\\):" all)
4652 (string-append "@dec.skipif(True)\n" all)))
4653 ;; This test introduces a circular dependency on ipykernel
4654 ;; (which depends on ipython).
4655 (delete-file "IPython/core/tests/test_display.py")
4656 ;; These tests throw errors for unknown reasons.
4657 (delete-file "IPython/extensions/tests/test_storemagic.py")
4658 (delete-file "IPython/core/tests/test_displayhook.py")
4659 (delete-file "IPython/core/tests/test_interactiveshell.py")
4660 (delete-file "IPython/core/tests/test_pylabtools.py")
4661 (delete-file "IPython/core/tests/test_paths.py")
4662 #t)))))
4663 (home-page "https://ipython.org")
4664 (synopsis "IPython is a tool for interactive computing in Python")
4665 (description
4666 "IPython provides a rich architecture for interactive computing with:
4667 Powerful interactive shells, a browser-based notebook, support for interactive
4668 data visualization, embeddable interpreters and tools for parallel
4669 computing.")
4670 (license license:bsd-3)
4671 (properties `((python2-variant . ,(delay python2-ipython))))))
4672
4673 (define-public python2-ipython
4674 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
4675 (package
4676 (inherit ipython)
4677 ;; FIXME: add pyreadline once available.
4678 (propagated-inputs
4679 `(("python2-backports-shutil-get-terminal-size"
4680 ,python2-backports-shutil-get-terminal-size)
4681 ("python2-pathlib2" ,python2-pathlib2)
4682 ,@(package-propagated-inputs ipython)))
4683 (native-inputs
4684 `(("python2-mock" ,python2-mock)
4685 ,@(package-native-inputs ipython))))))
4686
4687 (define-public python-urwid
4688 (package
4689 (name "python-urwid")
4690 (version "2.0.1")
4691 (source
4692 (origin
4693 (method url-fetch)
4694 (uri (pypi-uri "urwid" version))
4695 (sha256
4696 (base32
4697 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
4698 (build-system python-build-system)
4699 (home-page "http://urwid.org")
4700 (synopsis "Console user interface library for Python")
4701 (description
4702 "Urwid is a curses-based UI/widget library for Python. It includes many
4703 features useful for text console applications.")
4704 (license license:lgpl2.1+)))
4705
4706 (define-public python2-urwid
4707 (package-with-python2 python-urwid))
4708
4709 (define-public python-urwidtrees
4710 (package
4711 (name "python-urwidtrees")
4712 (version "1.0.2")
4713 (source
4714 (origin
4715 (method url-fetch)
4716 ;; package author intends on distributing via github rather than pypi:
4717 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
4718 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
4719 version ".tar.gz"))
4720 (file-name (string-append name "-" version ".tar.gz"))
4721 (sha256
4722 (base32
4723 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
4724 (build-system python-build-system)
4725 (arguments
4726 '(#:tests? #f)) ; no tests
4727 (propagated-inputs `(("python-urwid" ,python-urwid)))
4728 (home-page "https://github.com/pazz/urwidtrees")
4729 (synopsis "Tree widgets for urwid")
4730 (description "Urwidtrees is a Widget Container API for the @code{urwid}
4731 toolkit. Use it to build trees of widgets.")
4732 (license license:gpl3+)))
4733
4734 (define-public python2-urwidtrees
4735 (package-with-python2 python-urwidtrees))
4736
4737 (define-public python-ua-parser
4738 (package
4739 (name "python-ua-parser")
4740 (version "0.8.0")
4741 (source
4742 (origin
4743 (method url-fetch)
4744 (uri (pypi-uri "ua-parser" version))
4745 (sha256
4746 (base32
4747 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
4748 (build-system python-build-system)
4749 (arguments
4750 `(#:tests? #f)) ;no test suite in release
4751 (native-inputs
4752 `(("python-pyyaml" ,python-pyyaml)))
4753 (home-page "https://github.com/ua-parser/uap-python")
4754 (synopsis "User agent parser")
4755 (description
4756 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
4757 (license license:asl2.0)))
4758
4759 (define-public python2-ua-parser
4760 (package-with-python2 python-ua-parser))
4761
4762 (define-public python-user-agents
4763 (package
4764 (name "python-user-agents")
4765 (version "1.1.0")
4766 (source
4767 (origin
4768 (method url-fetch)
4769 (uri (pypi-uri "user-agents" version))
4770 (sha256
4771 (base32
4772 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
4773 (build-system python-build-system)
4774 (arguments
4775 `(#:tests? #f)) ;missing devices.json test file in release
4776 (propagated-inputs
4777 `(("python-ua-parser" ,python-ua-parser)))
4778 (home-page "https://github.com/selwin/python-user-agents")
4779 (synopsis "User Agent strings parsing library")
4780 (description
4781 "A library to identify devices (phones, tablets) and their capabilities by
4782 parsing (browser/HTTP) user agent strings.")
4783 (license license:expat)))
4784
4785 (define-public python2-user-agents
4786 (package-with-python2 python-user-agents))
4787
4788 (define-public python-dbus
4789 (package
4790 (name "python-dbus")
4791 (version "1.2.8")
4792 (source
4793 (origin
4794 (method url-fetch)
4795 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
4796 "dbus-python-" version ".tar.gz"))
4797 (sha256
4798 (base32
4799 "0vvvjmiwnc9cjlks3gcdk43ap7llhlpz7cm1wbw0nc2yfsxjpwdb"))))
4800 (build-system gnu-build-system)
4801 (arguments
4802 '(#:phases
4803 (modify-phases %standard-phases
4804 (add-before
4805 'check 'pre-check
4806 (lambda _
4807 ;; XXX: For the missing '/etc/machine-id'.
4808 (substitute* "test/run-test.sh"
4809 (("DBUS_FATAL_WARNINGS=1")
4810 "DBUS_FATAL_WARNINGS=0"))
4811 #t)))))
4812 (native-inputs
4813 `(("pkg-config" ,pkg-config)))
4814 (inputs
4815 `(("python" ,python-wrapper)
4816 ("dbus-glib" ,dbus-glib)))
4817 (synopsis "Python bindings for D-bus")
4818 (description "python-dbus provides bindings for libdbus, the reference
4819 implementation of D-Bus.")
4820 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
4821 (license license:expat)))
4822
4823 (define-public python2-dbus
4824 (package (inherit python-dbus)
4825 (name "python2-dbus")
4826 (inputs `(("python" ,python-2)
4827 ,@(alist-delete "python"
4828 (package-inputs python-dbus)
4829 equal?)))
4830 ;; FIXME: on Python 2, the test_utf8 fails with:
4831 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
4832 (arguments `(#:tests? #f))))
4833
4834 (define-public python-lxml
4835 (package
4836 (name "python-lxml")
4837 (version "4.2.5")
4838 (source
4839 (origin
4840 (method url-fetch)
4841 (uri (pypi-uri "lxml" version))
4842 (sha256
4843 (base32
4844 "0zw0y9hs0nflxhl9cs6ipwwh53szi3w2x06wl0k9cylyqac0cwin"))))
4845 (build-system python-build-system)
4846 (inputs
4847 `(("libxml2" ,libxml2)
4848 ("libxslt" ,libxslt)))
4849 (home-page "http://lxml.de/")
4850 (synopsis
4851 "Python XML processing library")
4852 (description
4853 "The lxml XML toolkit is a Pythonic binding for the C libraries
4854 libxml2 and libxslt.")
4855 (license license:bsd-3))) ; and a few more, see LICENSES.txt
4856
4857 (define-public python2-lxml
4858 (package-with-python2 python-lxml))
4859
4860 ;; beautifulsoup4 has a totally different namespace than 3.x,
4861 ;; and pypi seems to put it under its own name, so I guess we should too
4862 (define-public python-beautifulsoup4
4863 (package
4864 (name "python-beautifulsoup4")
4865 (version "4.6.3")
4866 (source
4867 (origin
4868 (method url-fetch)
4869 (uri (pypi-uri "beautifulsoup4" version))
4870 (sha256
4871 (base32
4872 "041dhalzjciw6qyzzq7a2k4h1yvyk76xigp35hv5ibnn448ydy4h"))))
4873 (build-system python-build-system)
4874 (arguments
4875 `(#:phases
4876 (modify-phases %standard-phases
4877 ;; The Python 2 source is the definitive source of beautifulsoup4. We
4878 ;; must use this conversion script when building with Python 3. The
4879 ;; conversion script also runs the tests.
4880 ;; For more information, see the file 'convert-py3k' in the source
4881 ;; distribution.
4882 (replace 'check
4883 (lambda _ (invoke "./convert-py3k"))))))
4884 (home-page
4885 "https://www.crummy.com/software/BeautifulSoup/bs4/")
4886 (synopsis
4887 "Python screen-scraping library")
4888 (description
4889 "Beautiful Soup is a Python library designed for rapidly setting up
4890 screen-scraping projects. It offers Pythonic idioms for navigating,
4891 searching, and modifying a parse tree, providing a toolkit for
4892 dissecting a document and extracting what you need. It automatically
4893 converts incoming documents to Unicode and outgoing documents to UTF-8.")
4894 (license license:expat)
4895 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
4896
4897 (define-public python2-beautifulsoup4
4898 (package
4899 (inherit (package-with-python2
4900 (strip-python2-variant python-beautifulsoup4)))
4901 (arguments `(#:python ,python-2))))
4902
4903 (define-public python-netifaces
4904 (package
4905 (name "python-netifaces")
4906 (version "0.10.7")
4907 (source
4908 (origin
4909 (method url-fetch)
4910 (uri (pypi-uri "netifaces" version))
4911 (sha256
4912 (base32
4913 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
4914 (build-system python-build-system)
4915 (home-page "https://github.com/al45tair/netifaces")
4916 (synopsis
4917 "Python module for portable network interface information")
4918 (description
4919 "Netifaces is a Python module providing information on network
4920 interfaces in an easy and portable manner.")
4921 (license license:expat)))
4922
4923 (define-public python2-netifaces
4924 (package-with-python2 python-netifaces))
4925
4926 (define-public python-networkx
4927 (package
4928 (name "python-networkx")
4929 (version "2.2")
4930 (source
4931 (origin
4932 (method url-fetch)
4933 (uri (pypi-uri "networkx" version ".zip"))
4934 (sha256
4935 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
4936 (build-system python-build-system)
4937 ;; python-decorator is needed at runtime.
4938 (propagated-inputs
4939 `(("python-decorator" ,python-decorator)))
4940 (native-inputs
4941 `(("python-nose" ,python-nose)
4942 ("unzip" ,unzip)))
4943 (home-page "https://networkx.github.io/")
4944 (synopsis "Python module for creating and manipulating graphs and networks")
4945 (description
4946 "NetworkX is a Python package for the creation, manipulation, and study
4947 of the structure, dynamics, and functions of complex networks.")
4948 (license license:bsd-3)))
4949
4950 (define-public python2-networkx
4951 (package-with-python2 python-networkx))
4952
4953 (define-public python-datrie
4954 (package
4955 (name "python-datrie")
4956 (version "0.7.1")
4957 (source
4958 (origin
4959 (method url-fetch)
4960 (uri (pypi-uri "datrie" version))
4961 (sha256
4962 (base32
4963 "08r0if7dry2q7p34gf7ffyrlnf4bdvnprxgydlfxgfnvq8f3f4bs"))))
4964 (build-system python-build-system)
4965 (arguments
4966 `(#:phases (modify-phases %standard-phases
4967 (add-before 'build 'cythonize
4968 (lambda _
4969 ;; Regenerate Cython classes to solve ABI issues with Python
4970 ;; 3.7.0. See <https://github.com/pytries/datrie/issues/52>.
4971 (invoke "cython" "src/datrie.pyx" "src/cdatrie.pxd"
4972 "src/stdio_ext.pxd" "-a"))))))
4973 (native-inputs
4974 `(("python-cython" ,python-cython)
4975 ("python-hypothesis" ,python-hypothesis)
4976 ("python-pytest" ,python-pytest)
4977 ("python-pytest-runner" ,python-pytest-runner)))
4978 (home-page "https://github.com/kmike/datrie")
4979 (synopsis "Fast, efficiently stored trie for Python")
4980 (description
4981 "This package provides a fast, efficiently stored trie implementation for
4982 Python.")
4983 (license license:lgpl2.1+)))
4984
4985 (define-public snakemake
4986 (package
4987 (name "snakemake")
4988 (version "5.2.4")
4989 (source
4990 (origin
4991 (method url-fetch)
4992 (uri (pypi-uri "snakemake" version))
4993 (sha256
4994 (base32 "0gj0xxgiq3mp9qyyrbfzldiaq1giliqw0in64nqiz7vx49myqj7z"))))
4995 (build-system python-build-system)
4996 (arguments
4997 ;; TODO: Package missing test dependencies.
4998 '(#:tests? #f
4999 #:phases
5000 (modify-phases %standard-phases
5001 ;; For cluster execution Snakemake will call Python. Since there is
5002 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
5003 ;; this by calling the snakemake wrapper instead.
5004 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
5005 (lambda* (#:key outputs #:allow-other-keys)
5006 (substitute* "snakemake/executors.py"
5007 (("\\{sys.executable\\} -m snakemake")
5008 (string-append (assoc-ref outputs "out")
5009 "/bin/snakemake")))
5010 #t)))))
5011 (propagated-inputs
5012 `(("python-gitpython" ,python-gitpython)
5013 ("python-wrapt" ,python-wrapt)
5014 ("python-requests" ,python-requests)
5015 ("python-appdirs" ,python-appdirs)
5016 ("python-configargparse" ,python-configargparse)
5017 ("python-datrie" ,python-datrie)
5018 ("python-docutils" ,python-docutils)
5019 ("python-jinja2" ,python-jinja2)
5020 ("python-jsonschema" ,python-jsonschema)
5021 ("python-networkx" ,python-networkx)
5022 ("python-pyyaml" ,python-pyyaml)
5023 ("python-ratelimiter" ,python-ratelimiter)))
5024 (home-page "https://snakemake.readthedocs.io")
5025 (synopsis "Python-based execution environment for make-like workflows")
5026 (description
5027 "Snakemake aims to reduce the complexity of creating workflows by
5028 providing a clean and modern domain specific specification language (DSL) in
5029 Python style, together with a fast and comfortable execution environment.")
5030 (license license:expat)))
5031
5032 ;; This is currently needed for the pigx-* packages.
5033 (define-public snakemake-4
5034 (package (inherit snakemake)
5035 (version "4.4.0")
5036 (source
5037 (origin
5038 (method url-fetch)
5039 (uri (pypi-uri "snakemake" version))
5040 (sha256
5041 (base32 "0g0paia4z7w3srnqdmavq3hrb2x7qnpf81jx50njl0p7y4y0j8jv"))))
5042 (propagated-inputs
5043 `(("python-wrapt" ,python-wrapt)
5044 ("python-requests" ,python-requests)
5045 ("python-appdirs" ,python-appdirs)
5046 ("python-configargparse" ,python-configargparse)
5047 ("python-pyyaml" ,python-pyyaml)
5048 ("python-ratelimiter" ,python-ratelimiter)))))
5049
5050 (define-public python-pyqrcode
5051 (package
5052 (name "python-pyqrcode")
5053 (version "1.2.1")
5054 (source
5055 (origin
5056 (method url-fetch)
5057 (uri (pypi-uri "PyQRCode" version))
5058 (sha256
5059 (base32
5060 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
5061 (build-system python-build-system)
5062 (home-page
5063 "https://github.com/mnooner256/pyqrcode")
5064 (synopsis "QR code generator")
5065 (description
5066 "Pyqrcode is a QR code generator written purely in Python with
5067 SVG, EPS, PNG and terminal output.")
5068 (license license:bsd-3)))
5069
5070 (define-public python-seaborn
5071 (package
5072 (name "python-seaborn")
5073 (version "0.9.0")
5074 (source
5075 (origin
5076 (method url-fetch)
5077 (uri (pypi-uri "seaborn" version))
5078 (sha256
5079 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))))
5080 (build-system python-build-system)
5081 (arguments
5082 `(#:phases
5083 (modify-phases %standard-phases
5084 (add-before 'check 'start-xserver
5085 (lambda* (#:key inputs #:allow-other-keys)
5086 (let ((xorg-server (assoc-ref inputs "xorg-server")))
5087 ;; There must be a running X server and make check doesn't
5088 ;; start one. Therefore we must do it.
5089 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
5090 (setenv "DISPLAY" ":1")
5091 #t)))
5092 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
5093 (propagated-inputs
5094 `(("python-pandas" ,python-pandas)
5095 ("python-matplotlib" ,python-matplotlib)
5096 ("python-numpy" ,python-numpy)
5097 ("python-scipy" ,python-scipy)))
5098 (native-inputs
5099 `(("python-pytest" ,python-pytest)
5100 ("xorg-server" ,xorg-server)))
5101 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5102 (synopsis "Statistical data visualization")
5103 (description
5104 "Seaborn is a library for making attractive and informative statistical
5105 graphics in Python. It is built on top of matplotlib and tightly integrated
5106 with the PyData stack, including support for numpy and pandas data structures
5107 and statistical routines from scipy and statsmodels.")
5108 (license license:bsd-3)))
5109
5110 (define-public python2-seaborn
5111 (package-with-python2 python-seaborn))
5112
5113 (define-public python-mpmath
5114 (package
5115 (name "python-mpmath")
5116 (version "0.19")
5117 (source (origin
5118 (method url-fetch)
5119 (uri (string-append "http://mpmath.org/files/mpmath-"
5120 version ".tar.gz"))
5121 (sha256
5122 (base32
5123 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
5124 (build-system python-build-system)
5125 (arguments
5126 '(#:phases
5127 (modify-phases %standard-phases
5128 (replace 'check
5129 (lambda _
5130 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
5131 (home-page "http://mpmath.org")
5132 (synopsis "Arbitrary-precision floating-point arithmetic in python")
5133 (description
5134 "@code{mpmath} can be used as an arbitrary-precision substitute for
5135 Python's float/complex types and math/cmath modules, but also does much
5136 more advanced mathematics.")
5137 (license license:bsd-3)))
5138
5139 (define-public python2-mpmath
5140 (package-with-python2 python-mpmath))
5141
5142 (define-public python-bigfloat
5143 (package
5144 (name "python-bigfloat")
5145 (version "0.3.0")
5146 (source
5147 (origin
5148 (method url-fetch)
5149 (uri (pypi-uri "bigfloat" version))
5150 (sha256
5151 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
5152 (build-system python-build-system)
5153 (inputs
5154 `(("mpfr" ,mpfr)))
5155 (home-page "https://github.com/mdickinson/bigfloat")
5156 (synopsis "Arbitrary precision floating-point arithmetic for Python")
5157 (description
5158 "This packages provides a Python interface to the MPFR library for
5159 multiprecision arithmetic.")
5160 (license license:lgpl3+)))
5161
5162 (define-public python2-bigfloat
5163 (package-with-python2 python-bigfloat))
5164
5165 (define-public python-sympy
5166 (package
5167 (name "python-sympy")
5168 (version "1.1.1")
5169 (source
5170 (origin
5171 (method url-fetch)
5172 (uri (string-append
5173 "https://github.com/sympy/sympy/releases/download/sympy-"
5174 version "/sympy-" version ".tar.gz"))
5175 (sha256
5176 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
5177 (build-system python-build-system)
5178 (arguments
5179 `(#:phases
5180 (modify-phases %standard-phases
5181 ;; Run the core tests after installation. By default it would run
5182 ;; *all* tests, which take a very long time to complete and are known
5183 ;; to be flaky.
5184 (delete 'check)
5185 (add-after 'install 'check
5186 (lambda* (#:key outputs #:allow-other-keys)
5187 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
5188 #t)))))
5189 (propagated-inputs
5190 `(("python-mpmath" ,python-mpmath)))
5191 (home-page "http://www.sympy.org/")
5192 (synopsis "Python library for symbolic mathematics")
5193 (description
5194 "SymPy is a Python library for symbolic mathematics. It aims to become a
5195 full-featured computer algebra system (CAS) while keeping the code as simple
5196 as possible in order to be comprehensible and easily extensible.")
5197 (license license:bsd-3)))
5198
5199 (define-public python2-sympy
5200 (package
5201 (inherit (package-with-python2 python-sympy))
5202 (arguments
5203 `(#:phases
5204 (modify-phases %standard-phases
5205 ;; Run the core tests after installation. By default it would run
5206 ;; *all* tests, which take a very long time to complete and are known
5207 ;; to be flaky.
5208 (delete 'check)
5209 (add-after 'install 'check
5210 (lambda* (#:key outputs #:allow-other-keys)
5211 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
5212 #t)))))))
5213
5214 (define-public python-q
5215 (package
5216 (name "python-q")
5217 (version "2.6")
5218 (source
5219 (origin
5220 (method url-fetch)
5221 (uri (pypi-uri "q" version))
5222 (sha256
5223 (base32
5224 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
5225 (build-system python-build-system)
5226 (home-page "https://github.com/zestyping/q")
5227 (synopsis "Quick-and-dirty debugging output for tired programmers")
5228 (description
5229 "q is a Python module for \"print\" style of debugging Python code. It
5230 provides convenient short API for print out of values, tracebacks, and
5231 falling into the Python interpreter.")
5232 (license license:asl2.0)))
5233
5234 (define-public python2-q
5235 (package-with-python2 python-q))
5236
5237 (define-public python2-xlib
5238 (package
5239 (name "python2-xlib")
5240 (version "0.14")
5241 (source (origin
5242 (method url-fetch)
5243 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
5244 "/" version "/"
5245 "python-xlib-" version ".tar.gz"))
5246 (sha256
5247 (base32
5248 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
5249 (build-system python-build-system)
5250 (arguments
5251 `(#:python ,python-2 ;Python 2 only
5252 #:tests? #f)) ;no tests
5253 (home-page "http://python-xlib.sourceforge.net/")
5254 (synopsis "Python X11 client library")
5255 (description
5256 "The Python X Library is intended to be a fully functional X client
5257 library for Python programs. It is useful to implement low-level X clients.
5258 It is written entirely in Python.")
5259 (license license:gpl2+)))
5260
5261 (define-public python-singledispatch
5262 (package
5263 (name "python-singledispatch")
5264 (version "3.4.0.3")
5265 (source
5266 (origin
5267 (method url-fetch)
5268 (uri (pypi-uri "singledispatch" version))
5269 (sha256
5270 (base32
5271 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
5272 (build-system python-build-system)
5273 (native-inputs
5274 `(("python-six" ,python-six))) ; required for conversion, not at run-time
5275 (home-page
5276 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
5277 (synopsis "Backport of singledispatch feature from Python 3.4")
5278 (description
5279 "This library brings functools.singledispatch from Python 3.4 to Python
5280 2.6-3.3.")
5281 (license license:expat)))
5282
5283 (define-public python2-singledispatch
5284 (package-with-python2 python-singledispatch))
5285
5286 ;; the python- version can be removed with python-3.5
5287 (define-public python-backports-abc
5288 (package
5289 (name "python-backports-abc")
5290 (version "0.5")
5291 (source
5292 (origin
5293 (method url-fetch)
5294 (uri (pypi-uri "backports_abc" version))
5295 (sha256
5296 (base32
5297 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
5298 (build-system python-build-system)
5299 (home-page "https://github.com/cython/backports_abc")
5300 (synopsis "Backport of additions to the 'collections.abc' module")
5301 (description
5302 "Python-backports-abc provides a backport of additions to the
5303 'collections.abc' module in Python-3.5.")
5304 (license license:psfl)))
5305
5306 (define-public python2-backports-abc
5307 (package-with-python2 python-backports-abc))
5308
5309 (define-public python-backports-csv
5310 (package
5311 (name "python-backports-csv")
5312 (version "1.0.5")
5313 (source
5314 (origin
5315 (method url-fetch)
5316 (uri (pypi-uri "backports.csv" version))
5317 (sha256
5318 (base32
5319 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
5320 (build-system python-build-system)
5321 (home-page "https://github.com/ryanhiebert/backports.csv")
5322 (synopsis "Backport of Python 3's csv module for Python 2")
5323 (description
5324 "Provides a backport of Python 3's @code{csv} module for parsing
5325 comma separated values. The API of the @code{csv} module in Python 2
5326 is drastically different from the @code{csv} module in Python 3.
5327 This is due, for the most part, to the difference between str in
5328 Python 2 and Python 3.")
5329 (license license:psfl)))
5330
5331 (define-public python2-backports-csv
5332 (package-with-python2 python-backports-csv))
5333
5334 (define-public python2-backports-shutil-get-terminal-size
5335 (package
5336 (name "python2-backports-shutil-get-terminal-size")
5337 (version "1.0.0")
5338 (source
5339 (origin
5340 (method url-fetch)
5341 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
5342 (sha256
5343 (base32
5344 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
5345 (build-system python-build-system)
5346 (arguments
5347 `(#:python ,python-2
5348 #:phases
5349 (modify-phases %standard-phases
5350 (replace 'check
5351 (lambda _
5352 (invoke "py.test" "-v"))))))
5353 (native-inputs
5354 `(("python2-pytest" ,python2-pytest)))
5355 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
5356 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
5357 (description
5358 "This package provides a backport of the @code{get_terminal_size
5359 function} from Python 3.3's @code{shutil}.
5360 Unlike the original version it is written in pure Python rather than C,
5361 so it might be a tiny bit slower.")
5362 (license license:expat)))
5363
5364 (define-public python-waf
5365 (package
5366 (name "python-waf")
5367 (version "2.0.11")
5368 (source (origin
5369 (method url-fetch)
5370 (uri (string-append "https://waf.io/"
5371 "waf-" version ".tar.bz2"))
5372 (sha256
5373 (base32
5374 "13zrniwkmfqgsgzi9v5m1367fppp9yzrz6z2ny6hy8dmpb8mj4z4"))))
5375 (build-system python-build-system)
5376 (arguments
5377 '(#:phases
5378 (modify-phases %standard-phases
5379 (replace 'build
5380 (lambda _
5381 (invoke "python" "waf-light" "configure" "build")))
5382 (replace 'check
5383 (lambda _
5384 (invoke "python" "waf" "--version")))
5385 (replace 'install
5386 (lambda* (#:key outputs #:allow-other-keys)
5387 (let ((out (assoc-ref outputs "out")))
5388 (install-file "waf" (string-append out "/bin")))
5389 #t))
5390 ;; waf breaks when it is wrapped.
5391 (delete 'wrap))))
5392 (home-page "https://waf.io/")
5393 (synopsis "Python-based build system")
5394 (description
5395 "Waf is a Python-based framework for configuring, compiling and installing
5396 applications.")
5397 (license license:bsd-3)))
5398
5399 (define-public python2-waf
5400 (package-with-python2 python-waf))
5401
5402 (define-public python-pyzmq
5403 (package
5404 (name "python-pyzmq")
5405 (version "17.1.2")
5406 (source
5407 (origin
5408 (method url-fetch)
5409 (uri (pypi-uri "pyzmq" version))
5410 (sha256
5411 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
5412 (build-system python-build-system)
5413 (arguments
5414 `(#:configure-flags
5415 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
5416 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
5417 ;; --inplace' for 'python setup.py test' to work.
5418 #:tests? #f))
5419 (inputs
5420 `(("zeromq" ,zeromq)))
5421 (native-inputs
5422 `(("pkg-config" ,pkg-config)
5423 ("python-nose" ,python-nose)))
5424 (home-page "https://github.com/zeromq/pyzmq")
5425 (synopsis "Python bindings for 0MQ")
5426 (description
5427 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
5428 (license license:bsd-4)))
5429
5430 (define-public python2-pyzmq
5431 (package-with-python2 python-pyzmq))
5432
5433 (define-public python-pep8
5434 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
5435 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
5436 ;; some dependents' test suites, and nothing more.
5437 (package
5438 (name "python-pep8")
5439 (version "1.7.0")
5440 (source
5441 (origin
5442 (method url-fetch)
5443 (uri (pypi-uri "pep8" version))
5444 (sha256
5445 (base32
5446 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
5447 (build-system python-build-system)
5448 (home-page "https://pep8.readthedocs.org/")
5449 (synopsis "Python style guide checker")
5450 (description
5451 "This tools checks Python code against some of the style conventions in
5452 PEP 8.")
5453 (license license:expat)))
5454
5455 (define-public python2-pep8
5456 (package-with-python2 python-pep8))
5457
5458 (define-public python-pyflakes
5459 (package
5460 (name "python-pyflakes")
5461 (version "2.0.0")
5462 (source
5463 (origin
5464 (method url-fetch)
5465 (uri (pypi-uri "pyflakes" version))
5466 (sha256
5467 (base32
5468 "0jba28czyvimdc72llms3f17swp3i8jdcabf5w0j00adfbn64xls"))))
5469 (build-system python-build-system)
5470 (home-page
5471 "https://github.com/pyflakes/pyflakes")
5472 (synopsis "Passive checker of Python programs")
5473 (description
5474 "Pyflakes statically checks Python source code for common errors.")
5475 (license license:expat)))
5476
5477 (define-public python2-pyflakes
5478 (package-with-python2 python-pyflakes))
5479
5480 (define-public python-mccabe
5481 (package
5482 (name "python-mccabe")
5483 (version "0.6.1")
5484 (source
5485 (origin
5486 (method url-fetch)
5487 (uri (pypi-uri "mccabe" version))
5488 (sha256
5489 (base32
5490 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
5491 (build-system python-build-system)
5492 (native-inputs
5493 `(("python-pytest" ,python-pytest-bootstrap)
5494 ("python-pytest-runner" ,python-pytest-runner)))
5495 (home-page "https://github.com/flintwork/mccabe")
5496 (synopsis "McCabe checker, plugin for flake8")
5497 (description
5498 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
5499 complexity of Python source code.")
5500 (license license:expat)))
5501
5502 (define-public python2-mccabe
5503 (package-with-python2 python-mccabe))
5504
5505 (define-public python-mccabe-0.2.1
5506 (package (inherit python-mccabe)
5507 (version "0.2.1")
5508 (source
5509 (origin
5510 (method url-fetch)
5511 (uri (pypi-uri "mccabe" version))
5512 (sha256
5513 (base32
5514 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
5515
5516 (define-public python2-mccabe-0.2.1
5517 (package-with-python2 python-mccabe-0.2.1))
5518
5519 ;; Flake8 2.4.1 requires an older version of pep8.
5520 ;; This should be removed ASAP.
5521 (define-public python-pep8-1.5.7
5522 (package (inherit python-pep8)
5523 (version "1.5.7")
5524 (source
5525 (origin
5526 (method url-fetch)
5527 (uri (pypi-uri "pep8" version))
5528 (sha256
5529 (base32
5530 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
5531 (arguments
5532 ;; XXX Tests not compatible with Python 3.5.
5533 '(#:tests? #f))))
5534
5535 (define-public python2-pep8-1.5.7
5536 (package-with-python2 python-pep8-1.5.7))
5537
5538 ;; Flake8 2.4.1 requires an older version of pyflakes.
5539 ;; This should be removed ASAP.
5540 (define-public python-pyflakes-0.8.1
5541 (package (inherit python-pyflakes)
5542 (version "0.8.1")
5543 (source
5544 (origin
5545 (method url-fetch)
5546 (uri (pypi-uri "pyflakes" version))
5547 (sha256
5548 (base32
5549 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
5550 (arguments
5551 ;; XXX Tests not compatible with Python 3.5.
5552 '(#:tests? #f))))
5553
5554 (define-public python2-pyflakes-0.8.1
5555 (package-with-python2 python-pyflakes-0.8.1))
5556
5557 ;; This package is used by hypothesis which has thousands of dependent packages.
5558 ;; FIXME: Consolidate this with "python-flake8" below in the next rebuild cycle.
5559 (define-public python-flake8-3.5
5560 (package
5561 (name "python-flake8")
5562 (version "3.5.0")
5563 (source
5564 (origin
5565 (method url-fetch)
5566 (uri (pypi-uri "flake8" version))
5567 (sha256
5568 (base32
5569 "184b33grvvjmiwlv9kyd7yng9qv5ld24154j70z332xxg9gjclvj"))))
5570 (build-system python-build-system)
5571 (arguments
5572 `(#:phases
5573 (modify-phases %standard-phases
5574 ;; Two errors don't seem to have assigned codes.
5575 (add-after 'unpack 'delete-broken-test
5576 (lambda _ (delete-file "tests/unit/test_pyflakes_codes.py") #t))
5577 (add-after 'unpack 'fix-problem-with-pycodestyle
5578 (lambda _
5579 ;; See https://gitlab.com/pycqa/flake8/merge_requests/230
5580 ;; This should no longer be needed with the next release.
5581 (substitute* "setup.py"
5582 (("PEP8_PLUGIN\\('break_around_binary_operator'\\),")
5583 "PEP8_PLUGIN('break_after_binary_operator'),\
5584 PEP8_PLUGIN('break_before_binary_operator'),"))
5585 #t))
5586 (delete 'check)
5587 (add-after 'install 'check
5588 (lambda* (#:key inputs outputs #:allow-other-keys)
5589 (add-installed-pythonpath inputs outputs)
5590 (invoke "pytest" "-v")
5591 #t)))))
5592 (propagated-inputs
5593 `(("python-pycodestyle" ,python-pycodestyle)
5594 ("python-pyflakes" ,python-pyflakes)
5595 ("python-mccabe" ,python-mccabe)))
5596 (native-inputs
5597 `(("python-mock" ,python-mock)
5598 ("python-pytest" ,python-pytest-bootstrap)
5599 ("python-pytest-runner" ,python-pytest-runner)))
5600 (home-page "https://gitlab.com/pycqa/flake8")
5601 (synopsis
5602 "The modular source code checker: pep8, pyflakes and co")
5603 (description
5604 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
5605 (properties `((python2-variant . ,(delay python2-flake8-3.5))))
5606 (license license:expat)))
5607
5608 (define-public python2-flake8-3.5
5609 (let ((base (package-with-python2 (strip-python2-variant python-flake8-3.5))))
5610 (package (inherit base)
5611 (propagated-inputs
5612 `(("python2-configparser" ,python2-configparser)
5613 ("python2-enum34" ,python2-enum34)
5614 ,@(package-propagated-inputs base))))))
5615
5616 ;; Version 3.5.0 has compatibility issues with Pyflakes 2.0, so we need
5617 ;; this newer version. Keep it as a separate variable for now to avoid
5618 ;; rebuilding "python-hypothesis"; this should be removed in the next
5619 ;; rebuild cycle.
5620 (define-public python-flake8
5621 (package
5622 (inherit python-flake8-3.5)
5623 (version "3.6.0")
5624 (source (origin
5625 (method url-fetch)
5626 (uri (pypi-uri "flake8" version))
5627 (sha256
5628 (base32
5629 "0w0nprx22rbvrrkbfx9v5jc5gskbm08g219l7r8wai8zfswgadba"))))
5630 (arguments
5631 (substitute-keyword-arguments (package-arguments python-flake8-3.5)
5632 ((#:phases phases)
5633 `(modify-phases ,phases
5634 (delete 'delete-broken-test)
5635 (delete 'fix-problem-with-pycodestyle)))))
5636 (properties `((python2-variant . ,(delay python2-flake8))))))
5637
5638 (define-public python2-flake8
5639 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
5640 (package (inherit base)
5641 (propagated-inputs
5642 (package-propagated-inputs python2-flake8-3.5)))))
5643
5644 ;; python-hacking requires flake8 <2.6.0.
5645 (define-public python-flake8-2.5
5646 (package
5647 (inherit python-flake8)
5648 (version "2.5.5")
5649 (source (origin
5650 (method url-fetch)
5651 (uri (pypi-uri "flake8" version))
5652 (sha256
5653 (base32
5654 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
5655 (propagated-inputs
5656 `(("python-pep8" ,python-pep8)
5657 ,@(package-propagated-inputs python-flake8)))
5658 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
5659
5660 (define-public python2-flake8-2.5
5661 (package
5662 (inherit python2-flake8)
5663 (version (package-version python-flake8-2.5))
5664 (source (origin
5665 (inherit (package-source python-flake8-2.5))))
5666 (propagated-inputs
5667 `(("python2-pep8" ,python2-pep8)
5668 ,@(package-propagated-inputs python2-flake8)))))
5669
5670 (define-public python-flake8-polyfill
5671 (package
5672 (name "python-flake8-polyfill")
5673 (version "1.0.2")
5674 (source
5675 (origin
5676 (method url-fetch)
5677 (uri (pypi-uri "flake8-polyfill" version))
5678 (sha256
5679 (base32
5680 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
5681 (build-system python-build-system)
5682 (arguments
5683 '(#:phases
5684 (modify-phases %standard-phases
5685 (replace 'check
5686 (lambda _
5687 (setenv "PYTHONPATH"
5688 (string-append (getcwd) "/build/lib:"
5689 (getenv "PYTHONPATH")))
5690 (invoke "py.test" "-v"))))))
5691 (native-inputs
5692 `(("python-flake8" ,python-flake8)
5693 ("python-mock" ,python-mock)
5694 ("python-pep8" ,python-pep8)
5695 ("python-pycodestyle" ,python-pycodestyle)
5696 ("python-pytest" ,python-pytest)))
5697 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
5698 (synopsis "Polyfill package for Flake8 plugins")
5699 (description
5700 "This package that provides some compatibility helpers for Flake8
5701 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
5702 (license license:expat)))
5703
5704 (define-public python2-flake8-polyfill
5705 (package-with-python2 python-flake8-polyfill))
5706
5707 (define-public python-mistune
5708 (package
5709 (name "python-mistune")
5710 (version "0.8.4")
5711 (source
5712 (origin
5713 (method url-fetch)
5714 (uri (pypi-uri "mistune" version))
5715 (sha256
5716 (base32
5717 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
5718 (build-system python-build-system)
5719 (native-inputs
5720 `(("python-nose" ,python-nose)
5721 ("python-cython" ,python-cython)))
5722 (home-page "https://github.com/lepture/mistune")
5723 (synopsis "Markdown parser in pure Python")
5724 (description "This package provides a fast markdown parser in pure
5725 Python.")
5726 (license license:bsd-3)))
5727
5728 (define-public python2-mistune
5729 (package-with-python2 python-mistune))
5730
5731 (define-public python-markdown
5732 (package
5733 (name "python-markdown")
5734 (version "3.0.1")
5735 (source
5736 (origin
5737 (method url-fetch)
5738 (uri (pypi-uri "Markdown" version))
5739 (sha256
5740 (base32
5741 "0z6v8649sr434d5r5zmrhydka7v7f9yas4bwcgkcs0650jdhybnh"))))
5742 (build-system python-build-system)
5743 (native-inputs
5744 `(("python-nose" ,python-nose)
5745 ("python-pyyaml" ,python-pyyaml)))
5746 (home-page "https://python-markdown.github.io/")
5747 (synopsis "Python implementation of Markdown")
5748 (description
5749 "This package provides a Python implementation of John Gruber's
5750 Markdown. The library features international input, various Markdown
5751 extensions, and several HTML output formats. A command line wrapper
5752 markdown_py is also provided to convert Markdown files to HTML.")
5753 (license license:bsd-3)))
5754
5755 (define-public python2-markdown
5756 (package-with-python2 python-markdown))
5757
5758 (define-public python-ptyprocess
5759 (package
5760 (name "python-ptyprocess")
5761 (version "0.5.2")
5762 (source
5763 (origin
5764 (method url-fetch)
5765 (uri (pypi-uri "ptyprocess" version))
5766 (sha256
5767 (base32
5768 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
5769 (build-system python-build-system)
5770 (native-inputs
5771 `(("python-nose" ,python-nose)))
5772 (arguments
5773 `(#:phases
5774 (modify-phases %standard-phases
5775 (replace 'check
5776 (lambda _ (invoke "nosetests"))))))
5777 (home-page "https://github.com/pexpect/ptyprocess")
5778 (synopsis "Run a subprocess in a pseudo terminal")
5779 (description
5780 "This package provides a Python library used to launch a subprocess in a
5781 pseudo terminal (pty), and interact with both the process and its pty.")
5782 (license license:isc)))
5783
5784 (define-public python2-ptyprocess
5785 (package-with-python2 python-ptyprocess))
5786
5787 (define-public python-cram
5788 (package
5789 (name "python-cram")
5790 (version "0.7")
5791 (home-page "https://bitheap.org/cram/")
5792 (source (origin
5793 (method url-fetch)
5794 (uri (list (string-append home-page "cram-"
5795 version ".tar.gz")
5796 (pypi-uri "cram" version)))
5797 (sha256
5798 (base32
5799 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
5800 (arguments
5801 '(#:phases
5802 (modify-phases %standard-phases
5803 (add-after 'unpack 'patch-source
5804 (lambda _
5805 (substitute* (find-files "cram" ".*\\.py$")
5806 ;; Replace default shell path.
5807 (("/bin/sh") (which "sh")))
5808 (substitute* (find-files "tests" ".*\\.t$")
5809 (("md5") "md5sum")
5810 (("/bin/bash") (which "bash"))
5811 (("/bin/sh") (which "sh")))
5812 (substitute* "cram/_test.py"
5813 ;; This hack works around a bug triggered by substituting
5814 ;; the /bin/sh paths. "tests/usage.t" compares the output of
5815 ;; "cram -h", which breaks the output at 80 characters. This
5816 ;; causes the line showing the default shell to break into two
5817 ;; lines, but the test expects a single line...
5818 (("env\\['COLUMNS'\\] = '80'")
5819 "env['COLUMNS'] = '160'"))
5820 #t))
5821 (delete 'check)
5822 (add-after 'install 'check
5823 ;; The test phase uses the built library and executable.
5824 ;; It's easier to run it after install since the build
5825 ;; directory contains version-specific PATH.
5826 (lambda* (#:key inputs outputs #:allow-other-keys)
5827 (add-installed-pythonpath inputs outputs)
5828 (setenv "PATH" (string-append (getenv "PATH") ":"
5829 (assoc-ref outputs "out") "/bin"))
5830 (invoke "make" "test"))))))
5831 (build-system python-build-system)
5832 (native-inputs
5833 `(("python-coverage" ,python-coverage)
5834 ("which" ,which)))
5835 (synopsis "Simple testing framework for command line applications")
5836 (description
5837 "Cram is a functional testing framework for command line applications.
5838 Cram tests look like snippets of interactive shell sessions. Cram runs each
5839 command and compares the command output in the test with the command’s actual
5840 output.")
5841 (license license:gpl2+)))
5842
5843 (define-public python2-cram
5844 (package-with-python2 python-cram))
5845
5846 (define-public python-straight-plugin
5847 (package
5848 (name "python-straight-plugin")
5849 (version "1.4.1")
5850 (source
5851 (origin
5852 (method url-fetch)
5853 (uri (pypi-uri "straight.plugin" version))
5854 (sha256
5855 (base32
5856 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
5857 (build-system python-build-system)
5858 (home-page "https://github.com/ironfroggy/straight.plugin")
5859 (synopsis "Simple namespaced plugin facility")
5860 (description "Straight Plugin provides a type of plugin you can create from
5861 almost any existing Python modules, and an easy way for outside developers to
5862 add functionality and customization to your projects with their own plugins.")
5863 (license license:expat)))
5864
5865 (define-public python2-straight-plugin
5866 (package-with-python2 python-straight-plugin))
5867
5868 (define-public python-fonttools
5869 (package
5870 (name "python-fonttools")
5871 (version "3.28.0")
5872 (source (origin
5873 (method url-fetch)
5874 (uri (pypi-uri "fonttools" version ".zip"))
5875 (sha256
5876 (base32
5877 "0vsvjhidpb5kywpjgz1j3fywzkddxkb0afqai18qa3h6lqjyxwpb"))))
5878 (build-system python-build-system)
5879 (native-inputs
5880 `(("unzip" ,unzip)
5881 ("python-pytest" ,python-pytest)
5882 ("python-pytest-runner" ,python-pytest-runner)))
5883 (home-page "https://github.com/behdad/fonttools")
5884 (synopsis "Tools to manipulate font files")
5885 (description
5886 "FontTools/TTX is a library to manipulate font files from Python. It
5887 supports reading and writing of TrueType/OpenType fonts, reading and writing
5888 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
5889 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
5890 from an XML-based format.")
5891 (license license:expat)))
5892
5893 (define-public python2-fonttools
5894 (package-with-python2 python-fonttools))
5895
5896 (define-public python-ly
5897 (package
5898 (name "python-ly")
5899 (version "0.9.5")
5900 (source
5901 (origin
5902 (method url-fetch)
5903 (uri (pypi-uri name version))
5904 (sha256
5905 (base32
5906 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
5907 (build-system python-build-system)
5908 (arguments
5909 ;; FIXME: Some tests need network access.
5910 '(#:tests? #f))
5911 (synopsis "Tool and library for manipulating LilyPond files")
5912 (description "This package provides a Python library to parse, manipulate
5913 or create documents in LilyPond format. A command line program ly is also
5914 provided that can be used to do various manipulations with LilyPond files.")
5915 (home-page "https://pypi.python.org/pypi/python-ly")
5916 (license license:gpl2+)))
5917
5918 (define-public python-appdirs
5919 (package
5920 (name "python-appdirs")
5921 (version "1.4.3")
5922 (source
5923 (origin
5924 (method url-fetch)
5925 (uri (pypi-uri "appdirs" version))
5926 (sha256
5927 (base32
5928 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
5929 (build-system python-build-system)
5930 (home-page "https://github.com/ActiveState/appdirs")
5931 (synopsis
5932 "Determine platform-specific dirs, e.g. a \"user data dir\"")
5933 (description
5934 "This module provides a portable way of finding out where user data
5935 should be stored on various operating systems.")
5936 (license license:expat)))
5937
5938 (define-public python2-appdirs
5939 (package-with-python2 python-appdirs))
5940
5941 (define-public python-llfuse
5942 (package
5943 (name "python-llfuse")
5944 (version "1.3.5")
5945 (source (origin
5946 (method url-fetch)
5947 (uri (pypi-uri "llfuse" version ".tar.bz2"))
5948 (sha256
5949 (base32
5950 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
5951 (build-system python-build-system)
5952 (inputs
5953 `(("fuse" ,fuse)
5954 ("attr" ,attr)))
5955 (native-inputs
5956 `(("pkg-config" ,pkg-config)))
5957 (synopsis "Python bindings for FUSE")
5958 (description
5959 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
5960 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
5961 (license license:lgpl2.0+)
5962 (properties `((python2-variant . ,(delay python2-llfuse))))))
5963
5964 (define-public python2-llfuse
5965 (package (inherit (package-with-python2
5966 (strip-python2-variant python-llfuse)))
5967 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
5968
5969 ;; For attic-0.16
5970 (define-public python-llfuse-0.41
5971 (package (inherit python-llfuse)
5972 (version "0.41.1")
5973 (source (origin
5974 (method url-fetch)
5975 (uri (string-append
5976 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
5977 "llfuse-" version ".tar.bz2"))
5978 (sha256
5979 (base32
5980 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
5981 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
5982 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
5983 (license (list license:expat license:lgpl2.0+))))
5984
5985 (define-public python-msgpack
5986 (package
5987 (name "python-msgpack")
5988 (version "0.5.6")
5989 (source (origin
5990 (method url-fetch)
5991 (uri (pypi-uri "msgpack" version))
5992 (sha256
5993 (base32
5994 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
5995 (build-system python-build-system)
5996 (arguments
5997 `(#:modules ((guix build utils)
5998 (guix build python-build-system)
5999 (ice-9 ftw)
6000 (srfi srfi-1)
6001 (srfi srfi-26))
6002 #:phases
6003 (modify-phases %standard-phases
6004 (replace 'check
6005 (lambda _
6006 (let ((cwd (getcwd)))
6007 (setenv "PYTHONPATH"
6008 (string-append cwd "/build/"
6009 (find (cut string-prefix? "lib" <>)
6010 (scandir (string-append cwd "/build")))
6011 ":"
6012 (getenv "PYTHONPATH")))
6013 (invoke "pytest" "-v" "test")))))))
6014 (native-inputs
6015 `(("python-pytest" ,python-pytest)))
6016 (synopsis "MessagePack (de)serializer")
6017 (description "MessagePack is a fast, compact binary serialization format,
6018 suitable for similar data to JSON. This package provides CPython bindings for
6019 reading and writing MessagePack data.")
6020 (home-page "https://pypi.python.org/pypi/msgpack/")
6021 (license license:asl2.0)))
6022
6023 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
6024 ;; release 0.5. Some packages like borg still call it by the old name for now.
6025 ;; <https://bugs.gnu.org/30662>
6026 (define-public python-msgpack-transitional
6027 (package
6028 (inherit python-msgpack)
6029 (name "python-msgpack-transitional")
6030 (arguments
6031 (substitute-keyword-arguments (package-arguments python-msgpack)
6032 ((#:phases phases)
6033 `(modify-phases ,phases
6034 (add-after 'unpack 'configure-transitional
6035 (lambda _
6036 ;; Keep using the old name.
6037 (substitute* "setup.py"
6038 (("TRANSITIONAL = False")
6039 "TRANSITIONAL = 1"))
6040 #t))))))))
6041
6042 (define-public python2-msgpack
6043 (package-with-python2 python-msgpack))
6044
6045 (define-public python-netaddr
6046 (package
6047 (name "python-netaddr")
6048 (version "0.7.19")
6049 (source
6050 (origin
6051 (method url-fetch)
6052 (uri (pypi-uri "netaddr" version))
6053 (sha256
6054 (base32
6055 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
6056 (build-system python-build-system)
6057 (arguments `(#:tests? #f)) ;; No tests.
6058 (home-page "https://github.com/drkjam/netaddr/")
6059 (synopsis "Pythonic manipulation of network addresses")
6060 (description
6061 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6062 and MAC network addresses.")
6063 (license license:bsd-3)))
6064
6065 (define-public python2-netaddr
6066 (package-with-python2 python-netaddr))
6067
6068 (define-public python-wrapt
6069 (package
6070 (name "python-wrapt")
6071 (version "1.11.1")
6072 (source
6073 (origin
6074 (method url-fetch)
6075 (uri (pypi-uri "wrapt" version))
6076 (sha256
6077 (base32
6078 "0cqmysny1pz01jw26q48q5zasvns6507rwhgm6wcw743f0r01sja"))))
6079 (build-system python-build-system)
6080 (arguments
6081 ;; Tests are not included in the tarball, they are only available in the
6082 ;; git repository.
6083 `(#:tests? #f))
6084 (home-page "https://github.com/GrahamDumpleton/wrapt")
6085 (synopsis "Module for decorators, wrappers and monkey patching")
6086 (description
6087 "The aim of the wrapt module is to provide a transparent object proxy for
6088 Python, which can be used as the basis for the construction of function
6089 wrappers and decorator functions.")
6090 (license license:bsd-2)))
6091
6092 (define-public python2-wrapt
6093 (package-with-python2 python-wrapt))
6094
6095 (define-public python-xlrd
6096 (package
6097 (name "python-xlrd")
6098 (version "1.0.0")
6099 (source (origin
6100 (method url-fetch)
6101 (uri (pypi-uri "xlrd" version))
6102 (sha256
6103 (base32
6104 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
6105 (build-system python-build-system)
6106 (arguments
6107 `(#:phases
6108 (modify-phases %standard-phases
6109 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
6110 ;; run tests instead for now.
6111 (replace 'check (lambda _ (invoke "nosetests"))))))
6112 (native-inputs `(("python-nose" ,python-nose)))
6113 (home-page "http://www.python-excel.org/")
6114 (synopsis "Library for extracting data from Excel files")
6115 (description "This packages provides a library to extract data from
6116 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
6117 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
6118 Unicode-aware. It is not intended as an end-user tool.")
6119 (license license:bsd-3)))
6120
6121 (define-public python2-xlrd
6122 (package-with-python2 python-xlrd))
6123
6124 (define-public python-prettytable
6125 (package
6126 (name "python-prettytable")
6127 (version "0.7.2")
6128 (source
6129 (origin
6130 (method url-fetch)
6131 (uri (pypi-uri "prettytable" version ".tar.bz2"))
6132 (sha256
6133 (base32
6134 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
6135 (build-system python-build-system)
6136 (home-page "http://code.google.com/p/prettytable/")
6137 (synopsis "Display tabular data in an ASCII table format")
6138 (description
6139 "A library designed to represent tabular data in visually appealing ASCII
6140 tables. PrettyTable allows for selection of which columns are to be printed,
6141 independent alignment of columns (left or right justified or centred) and
6142 printing of sub-tables by specifying a row range.")
6143 (license license:bsd-3)))
6144
6145 (define-public python2-prettytable
6146 (package-with-python2 python-prettytable))
6147
6148 (define-public python-tables
6149 (package
6150 (name "python-tables")
6151 (version "3.4.4")
6152 (source
6153 (origin
6154 (method url-fetch)
6155 (uri (pypi-uri "tables" version))
6156 (sha256
6157 (base32
6158 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
6159 (modules '((guix build utils)))
6160 (snippet
6161 '(begin
6162 ;; Remove pre-compiled .pyc files from source.
6163 (for-each delete-file-recursively
6164 (find-files "." "__pycache__" #:directories? #t))
6165 (for-each delete-file (find-files "." "\\.pyc$"))
6166 #t))))
6167 (build-system python-build-system)
6168 (arguments
6169 `(;; FIXME: python-build-system does not pass configure-flags to "build"
6170 ;; or "check", so we must override the build and check phases.
6171 #:phases
6172 (modify-phases %standard-phases
6173 (add-after 'unpack 'use-gcc
6174 (lambda _
6175 (substitute* "setup.py"
6176 (("compiler = new_compiler\\(\\)" line)
6177 (string-append line
6178 "\ncompiler.set_executables(compiler='gcc',"
6179 "compiler_so='gcc',"
6180 "linker_exe='gcc',"
6181 "linker_so='gcc -shared')")))
6182 #t))
6183 (replace 'build
6184 (lambda* (#:key inputs #:allow-other-keys)
6185 (invoke "python" "setup.py" "build"
6186 (string-append "--hdf5="
6187 (assoc-ref inputs "hdf5")))))
6188 (replace 'check
6189 (lambda* (#:key inputs #:allow-other-keys)
6190 (invoke "python" "setup.py" "check"
6191 (string-append "--hdf5="
6192 (assoc-ref inputs "hdf5"))))))))
6193 (propagated-inputs
6194 `(("python-numexpr" ,python-numexpr)
6195 ("python-numpy" ,python-numpy)))
6196 (native-inputs
6197 `(("python-cython" ,python-cython)
6198 ("pkg-config" ,pkg-config)))
6199 (inputs
6200 `(("hdf5" ,hdf5)
6201 ("bzip2" ,bzip2)
6202 ("zlib" ,zlib)))
6203 (home-page "http://www.pytables.org/")
6204 (synopsis "Hierarchical datasets for Python")
6205 (description "PyTables is a package for managing hierarchical datasets and
6206 designed to efficiently cope with extremely large amounts of data.")
6207 (license license:bsd-3)))
6208
6209 (define-public python2-tables
6210 (package-with-python2 python-tables))
6211
6212 (define-public python-pyasn1
6213 (package
6214 (name "python-pyasn1")
6215 (version "0.4.3")
6216 (source
6217 (origin
6218 (method url-fetch)
6219 (uri (pypi-uri "pyasn1" version))
6220 (sha256
6221 (base32
6222 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
6223 (build-system python-build-system)
6224 (home-page "http://pyasn1.sourceforge.net/")
6225 (synopsis "ASN.1 types and codecs")
6226 (description
6227 "This is an implementation of ASN.1 types and codecs in Python. It is
6228 suitable for a wide range of protocols based on the ASN.1 specification.")
6229 (license license:bsd-2)))
6230
6231 (define-public python2-pyasn1
6232 (package-with-python2 python-pyasn1))
6233
6234 (define-public python-pyasn1-modules
6235 (package
6236 (name "python-pyasn1-modules")
6237 (version "0.2.2")
6238 (source
6239 (origin
6240 (method url-fetch)
6241 (uri (pypi-uri "pyasn1-modules" version))
6242 (sha256
6243 (base32
6244 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
6245 (build-system python-build-system)
6246 (propagated-inputs
6247 `(("python-pyasn1" ,python-pyasn1)))
6248 (home-page "https://sourceforge.net/projects/pyasn1/")
6249 (synopsis "ASN.1 codec implementations")
6250 (description
6251 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
6252 implementations of ASN.1-based codecs and protocols.")
6253 (license license:bsd-3)))
6254
6255 (define-public python2-pyasn1-modules
6256 (package-with-python2 python-pyasn1-modules))
6257
6258 (define-public python-ipaddress
6259 (package
6260 (name "python-ipaddress")
6261 (version "1.0.22")
6262 (source (origin
6263 (method url-fetch)
6264 (uri (pypi-uri "ipaddress" version))
6265 (sha256
6266 (base32
6267 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
6268 (build-system python-build-system)
6269 (home-page "https://github.com/phihag/ipaddress")
6270 (synopsis "IP address manipulation library")
6271 (description
6272 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
6273 in Python. This library is used to create, poke at, and manipulate IPv4 and
6274 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
6275 module to older versions of Python.")
6276 (license license:psfl)))
6277
6278 (define-public python2-ipaddress
6279 (package-with-python2 python-ipaddress))
6280
6281 (define-public python2-ipaddr
6282 (package
6283 (name "python2-ipaddr")
6284 (version "2.1.11")
6285 (source
6286 (origin
6287 (method url-fetch)
6288 (uri (pypi-uri "ipaddr" version))
6289 (sha256
6290 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
6291 (build-system python-build-system)
6292 (arguments
6293 `(#:python ,python-2 ;version 2 only
6294 #:phases
6295 (modify-phases %standard-phases
6296 (replace 'check
6297 (lambda _ (invoke "python" "ipaddr_test.py"))))))
6298 (home-page "https://github.com/google/ipaddr-py")
6299 (synopsis "IP address manipulation library")
6300 (description
6301 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
6302 IPv6 addresses and networks.
6303
6304 For new implementations you may prefer to use the standard module
6305 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
6306 versions of Python.")
6307 (license license:asl2.0)))
6308
6309 (define-public python-idna
6310 (package
6311 (name "python-idna")
6312 (version "2.7")
6313 (source
6314 (origin
6315 (method url-fetch)
6316 (uri (pypi-uri "idna" version))
6317 (sha256
6318 (base32
6319 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))
6320 (build-system python-build-system)
6321 (home-page "https://github.com/kjd/idna")
6322 (synopsis "Internationalized domain names in applications")
6323 (description
6324 "This is a library to support the Internationalised Domain Names in
6325 Applications (IDNA) protocol as specified in RFC 5891. This version of the
6326 protocol is often referred to as “IDNA2008” and can produce different results
6327 from the earlier standard from 2003. The library is also intended to act as a
6328 suitable drop-in replacement for the “encodings.idna” module that comes with
6329 the Python standard library but currently only supports the older 2003
6330 specification.")
6331 (license license:bsd-4)))
6332
6333 (define-public python2-idna
6334 (package-with-python2 python-idna))
6335
6336 (define-public python-idna-ssl
6337 (package
6338 (name "python-idna-ssl")
6339 (version "1.0.1")
6340 (source
6341 (origin
6342 (method url-fetch)
6343 (uri (pypi-uri "idna-ssl" version))
6344 (sha256
6345 (base32
6346 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
6347 (build-system python-build-system)
6348 (arguments
6349 `(#:tests? #f)) ;circular dependency with python-aiohttp
6350 (home-page "https://github.com/aio-libs/idna-ssl")
6351 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
6352 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
6353 domains support.")
6354 (license license:expat)))
6355
6356 (define-public python-pretend
6357 (package
6358 (name "python-pretend")
6359 (version "1.0.9")
6360 (source
6361 (origin
6362 (method url-fetch)
6363 (uri (pypi-uri "pretend" version))
6364 (sha256
6365 (base32
6366 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
6367 (build-system python-build-system)
6368 (home-page "https://github.com/alex/pretend")
6369 (synopsis "Library for stubbing in Python")
6370 (description
6371 "Pretend is a library to make stubbing with Python easier. Stubbing is a
6372 technique for writing tests. You may hear the term mixed up with mocks,
6373 fakes, or doubles. Basically, a stub is an object that returns pre-canned
6374 responses, rather than doing any computation.")
6375 (license license:bsd-3)))
6376
6377 (define-public python2-pretend
6378 (package-with-python2 python-pretend))
6379
6380 (define-public python-pip
6381 (package
6382 (name "python-pip")
6383 (version "18.1")
6384 (source
6385 (origin
6386 (method url-fetch)
6387 (uri (pypi-uri "pip" version))
6388 (sha256
6389 (base32
6390 "188fclay154s520n43s7cxxlhdaiysvxf19zk8vr1xbyjyyr58n0"))))
6391 (build-system python-build-system)
6392 (arguments
6393 '(#:tests? #f)) ; there are no tests in the pypi archive.
6394 (home-page "https://pip.pypa.io/")
6395 (synopsis "Package manager for Python software")
6396 (description
6397 "Pip is a package manager for Python software, that finds packages on the
6398 Python Package Index (PyPI).")
6399 (license license:expat)))
6400
6401 (define-public python2-pip
6402 (package-with-python2 python-pip))
6403
6404 (define-public python-tlsh
6405 (package
6406 (name "python-tlsh")
6407 (version "3.4.5")
6408 (home-page "https://github.com/trendmicro/tlsh")
6409 (source (origin
6410 (method url-fetch)
6411 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
6412 version ".tar.gz"))
6413 (sha256
6414 (base32
6415 "1x1vahd4zg5kpyr9h9hs3fvh460p25rjy4cclwdnbbw8x3vc30q3"))
6416 (file-name (string-append name "-" version ".tar.gz"))))
6417 (build-system cmake-build-system)
6418 (arguments
6419 '(#:out-of-source? #f
6420 #:phases (modify-phases %standard-phases
6421 (replace
6422 'install
6423 (lambda* (#:key outputs #:allow-other-keys)
6424 ;; Build and install the Python bindings. The underlying
6425 ;; C++ library is apparently not meant to be installed.
6426 (let ((out (assoc-ref outputs "out")))
6427 (with-directory-excursion "py_ext"
6428 (and (system* "python" "setup.py" "build")
6429 (system* "python" "setup.py" "install"
6430 (string-append "--prefix=" out))))))))))
6431 (inputs `(("python" ,python-wrapper))) ;for the bindings
6432 (synopsis "Fuzzy matching library for Python")
6433 (description
6434 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
6435 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
6436 value which can be used for similarity comparisons. Similar objects have
6437 similar hash values, which allows for the detection of similar objects by
6438 comparing their hash values. The byte stream should have a sufficient amount
6439 of complexity; for example, a byte stream of identical bytes will not generate
6440 a hash value.")
6441 (license license:asl2.0)))
6442
6443 (define-public python2-tlsh
6444 (package
6445 (inherit python-tlsh)
6446 (name "python2-tlsh")
6447 (inputs `(("python" ,python-2)))))
6448
6449 (define-public python-termcolor
6450 (package
6451 (name "python-termcolor")
6452 (version "1.1.0")
6453 (source
6454 (origin
6455 (method url-fetch)
6456 (uri (pypi-uri "termcolor" version))
6457 (sha256
6458 (base32
6459 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
6460 (build-system python-build-system)
6461 (arguments
6462 ;; There are no tests.
6463 `(#:tests? #f))
6464 (home-page "https://pypi.python.org/pypi/termcolor")
6465 (synopsis "ANSII Color formatting for terminal output")
6466 (description
6467 "This package provides ANSII Color formatting for output in terminals.")
6468 (license license:expat)))
6469
6470 (define-public python2-termcolor
6471 (package-with-python2 python-termcolor))
6472
6473 (define-public python-libarchive-c
6474 (package
6475 (name "python-libarchive-c")
6476 (version "2.8")
6477 (source (origin
6478 (method url-fetch)
6479 (uri (pypi-uri "libarchive-c" version))
6480 (sha256
6481 (base32
6482 "0qg0v1s9c1xdk9philhnv8k6c6nicvnvfwlc0j9srg90jmdlvm06"))))
6483 (build-system python-build-system)
6484 (arguments
6485 '(#:phases (modify-phases %standard-phases
6486 (add-before
6487 'build 'reference-libarchive
6488 (lambda* (#:key inputs #:allow-other-keys)
6489 ;; Retain the absolute file name of libarchive.so.
6490 (let ((libarchive (assoc-ref inputs "libarchive")))
6491 (substitute* "libarchive/ffi.py"
6492 (("find_library\\('archive'\\)")
6493 (string-append "'" libarchive
6494 "/lib/libarchive.so'"))))))
6495 (replace 'check
6496 (lambda _ (invoke "pytest" "-vv"))))))
6497 (native-inputs
6498 `(("python-mock" ,python-mock)
6499 ("python-pytest" ,python-pytest)))
6500 (inputs
6501 `(("libarchive" ,libarchive)))
6502 (home-page "https://github.com/Changaco/python-libarchive-c")
6503 (synopsis "Python interface to libarchive")
6504 (description
6505 "This package provides Python bindings to libarchive, a C library to
6506 access possibly compressed archives in many different formats. It uses
6507 Python's @code{ctypes} foreign function interface (FFI).")
6508 (license license:lgpl2.0+)))
6509
6510 (define-public python2-libarchive-c
6511 (package-with-python2 python-libarchive-c))
6512
6513 (define-public python-file
6514 (package
6515 (inherit file)
6516 (name "python-file")
6517 (build-system python-build-system)
6518 (arguments
6519 '(#:tests? #f ;no tests
6520 #:configure-flags '("--single-version-externally-managed" "--root=/")
6521 #:phases (modify-phases %standard-phases
6522 (add-before 'build 'change-directory
6523 (lambda _
6524 (chdir "python")
6525 #t))
6526 (add-before 'build 'set-library-file-name
6527 (lambda* (#:key inputs #:allow-other-keys)
6528 (let ((file (assoc-ref inputs "file")))
6529 (substitute* "magic.py"
6530 (("find_library\\('magic'\\)")
6531 (string-append "'" file "/lib/libmagic.so'")))
6532 #t))))))
6533 (inputs `(("file" ,file)))
6534 (self-native-input? #f)
6535 (synopsis "Python bindings to the libmagic file type guesser. Note that
6536 this module and the python-magic module both provide a \"magic.py\" file;
6537 these two modules, which are different and were developed separately, both
6538 serve the same purpose: provide Python bindings for libmagic.")))
6539
6540 (define-public python2-file
6541 (package-with-python2 python-file))
6542
6543 (define-public python-debian
6544 (package
6545 (name "python-debian")
6546 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
6547 (version "0.1.28")
6548 (source
6549 (origin
6550 (method url-fetch)
6551 (uri (pypi-uri name version))
6552 (sha256
6553 (base32
6554 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
6555 (build-system python-build-system)
6556 (propagated-inputs
6557 `(("python-six" ,python-six)))
6558 (synopsis "Debian package related modules")
6559 (description
6560 ;; XXX: Use @enumerate instead of @itemize to work around
6561 ;; <http://bugs.gnu.org/21772>.
6562 "This package provides Python modules that abstract many formats of
6563 Debian-related files, such as:
6564
6565 @enumerate
6566 @item Debtags information;
6567 @item @file{debian/changelog} files;
6568 @item packages files, pdiffs;
6569 @item control files of single or multiple RFC822-style paragraphs---e.g.
6570 @file{debian/control}, @file{.changes}, @file{.dsc};
6571 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
6572 contained files and meta-information.
6573 @end enumerate\n")
6574
6575 ;; Modules are either GPLv2+ or GPLv3+.
6576 (license license:gpl3+)))
6577
6578 (define-public python2-debian
6579 (package-with-python2 python-debian))
6580
6581 (define-public python-nbformat
6582 (package
6583 (name "python-nbformat")
6584 (version "4.4.0")
6585 (source
6586 (origin
6587 (method url-fetch)
6588 (uri (pypi-uri "nbformat" version))
6589 (sha256
6590 (base32
6591 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
6592 (build-system python-build-system)
6593 (arguments `(#:tests? #f)) ; no test target
6594 (propagated-inputs
6595 `(("python-ipython-genutils" ,python-ipython-genutils)
6596 ("python-jsonschema" ,python-jsonschema)
6597 ("python-jupyter-core" ,python-jupyter-core)
6598 ("python-traitlets" ,python-traitlets)))
6599 (home-page "http://jupyter.org")
6600 (synopsis "Jupyter Notebook format")
6601 (description "This package provides the reference implementation of the
6602 Jupyter Notebook format and Python APIs for working with notebooks.")
6603 (license license:bsd-3)))
6604
6605 (define-public python2-nbformat
6606 (package-with-python2 python-nbformat))
6607
6608 (define-public python-bleach
6609 (package
6610 (name "python-bleach")
6611 (version "1.4.3")
6612 (source
6613 (origin
6614 (method url-fetch)
6615 (uri (pypi-uri "bleach" version))
6616 (sha256
6617 (base32
6618 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
6619 (build-system python-build-system)
6620 (propagated-inputs
6621 `(("python-html5lib" ,python-html5lib-0.9)
6622 ("python-six" ,python-six)))
6623 (native-inputs
6624 `(("python-nose" ,python-nose)))
6625 (home-page "https://github.com/jsocol/bleach")
6626 (synopsis "Whitelist-based HTML-sanitizing tool")
6627 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
6628 (license license:asl2.0)))
6629
6630 (define-public python2-bleach
6631 (package-with-python2 python-bleach))
6632
6633 (define-public python-entrypoints
6634 (package
6635 (name "python-entrypoints")
6636 (version "0.3")
6637 (source
6638 (origin
6639 (method url-fetch)
6640 (uri (pypi-uri "entrypoints" version))
6641 (sha256
6642 (base32
6643 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
6644 (build-system python-build-system)
6645 ;; The package does not come with a setup.py file, so we have to generate
6646 ;; one ourselves.
6647 (arguments
6648 `(#:tests? #f
6649 #:phases
6650 (modify-phases %standard-phases
6651 (add-after 'unpack 'create-setup.py
6652 (lambda _
6653 (call-with-output-file "setup.py"
6654 (lambda (port)
6655 (format port "\
6656 from setuptools import setup
6657 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
6658 " ,version))))))))
6659 (home-page "https://github.com/takluyver/entrypoints")
6660 (synopsis "Discover and load entry points from installed Python packages")
6661 (description "Entry points are a way for Python packages to advertise
6662 objects with some common interface. The most common examples are
6663 @code{console_scripts} entry points, which define shell commands by
6664 identifying a Python function to run. The @code{entrypoints} module contains
6665 functions to find and load entry points.")
6666 (license license:expat)))
6667
6668 (define-public python2-entrypoints
6669 (package-with-python2 python-entrypoints))
6670
6671 (define-public python-nbconvert
6672 (package
6673 (name "python-nbconvert")
6674 (version "5.0.0b1")
6675 (source
6676 (origin
6677 (method url-fetch)
6678 (uri (pypi-uri "nbconvert" version))
6679 (sha256
6680 (base32
6681 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
6682 (build-system python-build-system)
6683 (arguments
6684 `(;; The "bdist_egg" target is disabled by default, causing the installation
6685 ;; to fail.
6686 #:configure-flags (list "bdist_egg")
6687 ;; FIXME: 5 failures, 40 errors.
6688 #:tests? #f))
6689 ;; #:phases
6690 ;; (modify-phases %standard-phases
6691 ;; (replace 'check
6692 ;; (lambda _
6693 ;; (zero? (system* "py.test" "-v")))))
6694 (native-inputs
6695 `(("python-pytest" ,python-pytest)))
6696 (propagated-inputs
6697 `(("python-bleach" ,python-bleach)
6698 ("python-entrypoints" ,python-entrypoints)
6699 ("python-jinja2" ,python-jinja2)
6700 ("python-jupyter-core" ,python-jupyter-core)
6701 ("python-mistune" ,python-mistune)
6702 ("python-nbformat" ,python-nbformat)
6703 ("python-pygments" ,python-pygments)
6704 ("python-traitlets" ,python-traitlets)))
6705 (home-page "http://jupyter.org")
6706 (synopsis "Converting Jupyter Notebooks")
6707 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
6708 notebooks to various other formats via Jinja templates. It allows you to
6709 convert an @code{.ipynb} notebook file into various static formats including:
6710
6711 @enumerate
6712 @item HTML
6713 @item LaTeX
6714 @item PDF
6715 @item Reveal JS
6716 @item Markdown (md)
6717 @item ReStructured Text (rst)
6718 @item executable script
6719 @end enumerate\n")
6720 (license license:bsd-3)))
6721
6722 (define-public python2-nbconvert
6723 (package-with-python2 python-nbconvert))
6724
6725 (define-public python-notebook
6726 (package
6727 (name "python-notebook")
6728 (version "5.7.4")
6729 (source (origin
6730 (method url-fetch)
6731 (uri (pypi-uri "notebook" version))
6732 (sha256
6733 (base32
6734 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
6735 (build-system python-build-system)
6736 (arguments
6737 `(#:phases
6738 (modify-phases %standard-phases
6739 (replace 'check
6740 (lambda _
6741 ;; These tests require a browser
6742 (delete-file-recursively "notebook/tests/selenium")
6743 ;; Some tests need HOME
6744 (setenv "HOME" "/tmp")
6745 ;; This file contains "warningfilters", which are not supported
6746 ;; by this version of nose.
6747 (delete-file "setup.cfg")
6748 (with-directory-excursion "/tmp"
6749 (invoke "nosetests" "-v"))
6750 #t)))))
6751 (propagated-inputs
6752 `(("python-jupyter-core" ,python-jupyter-core)
6753 ("python-nbformat" ,python-nbformat)
6754 ("python-nbconvert" ,python-nbconvert)
6755 ("python-prometheus-client" ,python-prometheus-client)
6756 ("python-send2trash" ,python-send2trash)
6757 ("python-terminado" ,python-terminado)))
6758 (native-inputs
6759 `(("python-nose" ,python-nose)
6760 ("python-sphinx" ,python-sphinx)
6761 ("python-requests" ,python-requests)))
6762 (home-page "http://jupyter.org/")
6763 (synopsis "Web-based notebook environment for interactive computing")
6764 (description
6765 "The Jupyter HTML notebook is a web-based notebook environment for
6766 interactive computing.")
6767 (properties `((python2-variant . ,(delay python2-notebook))))
6768 (license license:bsd-3)))
6769
6770 (define-public python2-notebook
6771 (let ((base (package-with-python2
6772 (strip-python2-variant python-notebook))))
6773 (package (inherit base)
6774 (native-inputs
6775 `(("python2-mock" ,python2-mock)
6776 ,@(package-native-inputs base)))
6777 (arguments
6778 (substitute-keyword-arguments (package-arguments base)
6779 ((#:phases phases)
6780 `(modify-phases ,phases
6781 (add-before 'check 'disable-test-case
6782 ;; The test requires network access to localhost. Curiously it
6783 ;; fails with Python 2 only. Simply make the test-case return
6784 ;; immediately.
6785 (lambda _
6786 (substitute*
6787 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
6788 (("formats = self.nbconvert_api") "return #")))))))))))
6789
6790 (define-public python-widgetsnbextension
6791 (package
6792 (name "python-widgetsnbextension")
6793 (version "3.4.2")
6794 (source
6795 (origin
6796 (method url-fetch)
6797 (uri (pypi-uri "widgetsnbextension" version))
6798 (sha256
6799 (base32
6800 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
6801 (build-system python-build-system)
6802 (propagated-inputs
6803 `(("python-ipykernel" ,python-ipykernel)
6804 ("python-notebook" ,python-notebook)))
6805 (native-inputs
6806 `(("python-certifi" ,python-certifi)
6807 ("python-nose" ,python-nose)))
6808 (home-page "https://ipython.org")
6809 (synopsis "IPython HTML widgets for Jupyter")
6810 (description "This package provides interactive HTML widgets for Jupyter
6811 notebooks.")
6812 (license license:bsd-3)))
6813
6814 (define-public python2-widgetsnbextension
6815 (package-with-python2 python-widgetsnbextension))
6816
6817 (define-public python-ipywidgets
6818 (package
6819 (name "python-ipywidgets")
6820 (version "5.2.2")
6821 (source
6822 (origin
6823 (method url-fetch)
6824 (uri (pypi-uri "ipywidgets" version))
6825 (sha256
6826 (base32
6827 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
6828 (build-system python-build-system)
6829 (propagated-inputs
6830 `(("python-ipython" ,python-ipython)
6831 ("python-traitlets" ,python-traitlets)
6832 ("python-widgetsnbextension" ,python-widgetsnbextension)))
6833 (native-inputs
6834 `(("python-nose" ,python-nose)
6835 ("python-pytest" ,python-pytest)))
6836 (home-page "https://ipython.org")
6837 (synopsis "IPython HTML widgets for Jupyter")
6838 (description "Ipywidgets are interactive HTML widgets for Jupyter
6839 notebooks and the IPython kernel. Notebooks come alive when interactive
6840 widgets are used. Users gain control of their data and can visualize changes
6841 in the data.")
6842 (license license:bsd-3)))
6843
6844 (define-public python2-ipywidgets
6845 (package-with-python2 python-ipywidgets))
6846
6847 (define-public python-jupyter-console
6848 (package
6849 (name "python-jupyter-console")
6850 (version "5.2.0")
6851 (source
6852 (origin
6853 (method url-fetch)
6854 (uri (pypi-uri "jupyter_console" version))
6855 (sha256
6856 (base32
6857 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
6858 (build-system python-build-system)
6859 ;; Tests only run in an TTY.
6860 (arguments `(#:tests? #f))
6861 (propagated-inputs
6862 `(("python-ipykernel" ,python-ipykernel)
6863 ("python-jupyter-client" ,python-jupyter-client)
6864 ("python-prompt-toolkit" ,python-prompt-toolkit-1)
6865 ("python-pygments" ,python-pygments)))
6866 (native-inputs
6867 `(("python-nose" ,python-nose)))
6868 (home-page "https://jupyter.org")
6869 (synopsis "Jupyter terminal console")
6870 (description "This package provides a terminal-based console frontend for
6871 Jupyter kernels. It also allows for console-based interaction with non-Python
6872 Jupyter kernels such as IJulia and IRKernel.")
6873 (license license:bsd-3)))
6874
6875 (define-public python2-jupyter-console
6876 (package-with-python2 python-jupyter-console))
6877
6878 ;; The python-ipython and python-jupyter-console require each other. To get
6879 ;; the functionality in both packages working, strip down the
6880 ;; python-jupyter-console package when using it as an input to python-ipython.
6881 (define python-jupyter-console-minimal
6882 (package
6883 (inherit python-jupyter-console)
6884 (name "python-jupyter-console-minimal")
6885 (arguments
6886 (substitute-keyword-arguments
6887 (package-arguments python-jupyter-console)
6888 ((#:phases phases)
6889 `(modify-phases ,phases
6890 (add-after 'install 'delete-bin
6891 (lambda* (#:key outputs #:allow-other-keys)
6892 ;; Delete the bin files, to avoid conflicts in profiles
6893 ;; where python-ipython and python-jupyter-console are
6894 ;; both present.
6895 (delete-file-recursively
6896 (string-append
6897 (assoc-ref outputs "out") "/bin"))))))))
6898 ;; Remove the python-ipython propagated input, to avoid the cycle
6899 (propagated-inputs
6900 (alist-delete
6901 "python-ipython"
6902 (package-propagated-inputs python-jupyter-console)))))
6903
6904 (define-public python-qtconsole
6905 (package
6906 (name "python-qtconsole")
6907 (version "4.4.3")
6908 (source
6909 (origin
6910 (method url-fetch)
6911 (uri (pypi-uri "qtconsole" version))
6912 (sha256
6913 (base32
6914 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
6915 (build-system python-build-system)
6916 (arguments
6917 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
6918 ;; but we only have the LTS version 5.x. This means that there might be
6919 ;; runtime errors, but since this is a dependency of the Jupyter package,
6920 ;; and Jupyter can be used without the qtconsole we can overlook this for
6921 ;; now.
6922 `(#:tests? #f
6923 #:phases
6924 (modify-phases %standard-phases
6925 (add-before 'check 'pre-check
6926 (lambda _
6927 (setenv "QT_QPA_PLATFORM" "offscreen")
6928 #t)))))
6929 (propagated-inputs
6930 `(("python-ipykernel" ,python-ipykernel)
6931 ("python-ipython" ,python-ipython)))
6932 (native-inputs
6933 `(("python-pytest" ,python-pytest)))
6934 (home-page "http://jupyter.org")
6935 (synopsis "Jupyter Qt console")
6936 (description "This package provides a Qt-based console for Jupyter with
6937 support for rich media output.")
6938 (license license:bsd-3)))
6939
6940 (define-public jupyter
6941 (package
6942 (name "jupyter")
6943 (version "1.0.0")
6944 (source
6945 (origin
6946 (method url-fetch)
6947 (uri (pypi-uri "jupyter" version))
6948 (sha256
6949 (base32
6950 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
6951 (build-system python-build-system)
6952 (arguments '(#:tests? #f)) ; there are none.
6953 (propagated-inputs
6954 `(("python-ipykernel" ,python-ipykernel)
6955 ("python-ipywidgets" ,python-ipywidgets)
6956 ("python-jupyter-console" ,python-jupyter-console)
6957 ("python-nbconvert" ,python-nbconvert)
6958 ("python-notebook" ,python-notebook)
6959 ("python-qtconsole" ,python-qtconsole)))
6960 (native-search-paths
6961 (list (search-path-specification
6962 (variable "JUPYTER_PATH")
6963 (files '("share/jupyter")))))
6964 (home-page "https://jupyter.org")
6965 (synopsis "Web application for interactive documents")
6966 (description
6967 "The Jupyter Notebook is a web application that allows you to create and
6968 share documents that contain live code, equations, visualizations and
6969 explanatory text. Uses include: data cleaning and transformation, numerical
6970 simulation, statistical modeling, machine learning and much more.")
6971 (license license:bsd-3)))
6972
6973 (define-public python-chardet
6974 (package
6975 (name "python-chardet")
6976 (version "3.0.4")
6977 (source
6978 (origin
6979 (method url-fetch)
6980 (uri (pypi-uri "chardet" version))
6981 (sha256
6982 (base32
6983 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
6984 (native-inputs
6985 `(("python-hypothesis" ,python-hypothesis)
6986 ("python-pytest" ,python-pytest)
6987 ("python-pytest-runner" ,python-pytest-runner)))
6988 (build-system python-build-system)
6989 (home-page "https://github.com/chardet/chardet")
6990 (synopsis "Universal encoding detector for Python 2 and 3")
6991 (description
6992 "This package provides @code{chardet}, a Python module that can
6993 automatically detect a wide range of file encodings.")
6994 (license license:lgpl2.1+)))
6995
6996 (define-public python2-chardet
6997 (package-with-python2 python-chardet))
6998
6999 (define-public python-docopt
7000 (package
7001 (name "python-docopt")
7002 (version "0.6.2")
7003 (source
7004 (origin
7005 (method url-fetch)
7006 ;; The release on PyPI does not include tests.
7007 (uri (string-append
7008 "https://github.com/docopt/docopt/archive/"
7009 version ".tar.gz"))
7010 (file-name (string-append name "-" version ".tar.gz"))
7011 (sha256
7012 (base32
7013 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
7014 (build-system python-build-system)
7015 (native-inputs
7016 `(("python-pytest" ,python-pytest)))
7017 (arguments
7018 `(#:phases
7019 (modify-phases %standard-phases
7020 (replace 'check
7021 (lambda _ (invoke "py.test"))))))
7022 (home-page "http://docopt.org")
7023 (synopsis "Command-line interface description language for Python")
7024 (description "This library allows the user to define a command-line
7025 interface from a program's help message rather than specifying it
7026 programatically with command-line parsers like @code{getopt} and
7027 @code{argparse}.")
7028 (license license:expat)))
7029
7030 (define-public python2-docopt
7031 (package-with-python2 python-docopt))
7032
7033 (define-public python-pythondialog
7034 (package
7035 (name "python-pythondialog")
7036 (version "3.4.0")
7037 (source
7038 (origin
7039 (method url-fetch)
7040 (uri (pypi-uri "pythondialog" version))
7041 (sha256
7042 (base32
7043 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
7044 (build-system python-build-system)
7045 (arguments
7046 `(#:phases
7047 (modify-phases %standard-phases
7048 (add-after 'unpack 'patch-path
7049 (lambda* (#:key inputs #:allow-other-keys)
7050 (let* ((dialog (assoc-ref inputs "dialog")))
7051 ;; Since this library really wants to grovel the search path, we
7052 ;; must hardcode dialog's store path into it.
7053 (substitute* "dialog.py"
7054 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
7055 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
7056 #t))))
7057 #:tests? #f)) ; no test suite
7058 (propagated-inputs
7059 `(("dialog" ,dialog)))
7060 (home-page "http://pythondialog.sourceforge.net/")
7061 (synopsis "Python interface to the UNIX dialog utility")
7062 (description "A Python wrapper for the dialog utility. Its purpose is to
7063 provide an easy to use, pythonic and comprehensive Python interface to dialog.
7064 This allows one to make simple text-mode user interfaces on Unix-like systems")
7065 (license license:lgpl2.1)
7066 (properties `((python2-variant . ,(delay python2-pythondialog))))))
7067
7068 (define-public python2-pythondialog
7069 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
7070 (package
7071 (inherit base)
7072 (version (package-version python-pythondialog))
7073 (source (origin
7074 (method url-fetch)
7075 (uri (pypi-uri "python2-pythondialog" version))
7076 (sha256
7077 (base32
7078 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
7079
7080 (define-public python-configobj
7081 (package
7082 (name "python-configobj")
7083 (version "5.0.6")
7084 (source (origin
7085 (method url-fetch)
7086 (uri (pypi-uri "configobj" version))
7087 (sha256
7088 (base32
7089 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
7090 ;; Patch setup.py so it looks for python-setuptools, which is
7091 ;; required to parse the keyword 'install_requires' in setup.py.
7092 (patches (search-patches "python-configobj-setuptools.patch"))))
7093 (build-system python-build-system)
7094 (propagated-inputs
7095 `(("python-six" ,python-six)))
7096 (synopsis "Config file reading, writing and validation")
7097 (description "ConfigObj is a simple but powerful config file reader and
7098 writer: an ini file round tripper. Its main feature is that it is very easy to
7099 use, with a straightforward programmer’s interface and a simple syntax for
7100 config files.")
7101 (home-page "https://github.com/DiffSK/configobj")
7102 (license license:bsd-3)))
7103
7104 (define-public python2-configobj
7105 (package-with-python2 python-configobj))
7106
7107 (define-public python-configargparse
7108 (package
7109 (name "python-configargparse")
7110 (version "0.12.0")
7111 (source (origin
7112 (method url-fetch)
7113 (uri (pypi-uri "ConfigArgParse" version))
7114 (sha256
7115 (base32
7116 "0fgkiqh6r3rbkdq3k8c48m85g52k96686rw3a6jg4lcncrkpvk98"))))
7117 (build-system python-build-system)
7118 (native-inputs
7119 `(("python-pyyaml" ,python-pyyaml)))
7120 (arguments
7121 `(#:phases
7122 (modify-phases %standard-phases
7123 (replace 'check
7124 (lambda _
7125 ;; Bypass setuptools-shim because one test relies on "setup.py"
7126 ;; being the first argument passed to the python call.
7127 ;;
7128 ;; NOTE: Many tests do not run because they rely on Python's
7129 ;; built-in test.test_argparse, but we remove the unit tests from
7130 ;; our Python installation.
7131 (invoke "python" "setup.py" "test"))))))
7132 (synopsis "Replacement for argparse")
7133 (description "A drop-in replacement for argparse that allows options to also
7134 be set via config files and/or environment variables.")
7135 (home-page "https://github.com/bw2/ConfigArgParse")
7136 (license license:expat)))
7137
7138 (define-public python2-configargparse
7139 (package-with-python2 python-configargparse))
7140
7141 (define-public python-argparse-manpage
7142 (package
7143 (name "python-argparse-manpage")
7144 (version "1.1")
7145 (source
7146 (origin
7147 (method url-fetch)
7148 (uri (pypi-uri "argparse-manpage" version))
7149 (sha256
7150 (base32
7151 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
7152 (build-system python-build-system)
7153 (home-page "https://github.com/praiskup/argparse-manpage")
7154 (synopsis "Build manual page from Python's ArgumentParser object")
7155 (description
7156 "This package provides tools to build manual pages from Python's
7157 @code{ArgumentParser} object.")
7158 (license license:asl2.0)))
7159
7160 (define-public python2-contextlib2
7161 (package
7162 (name "python2-contextlib2")
7163 (version "0.5.5")
7164 (source
7165 (origin
7166 (method url-fetch)
7167 (uri (pypi-uri "contextlib2" version))
7168 (sha256
7169 (base32
7170 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
7171 (build-system python-build-system)
7172 (arguments
7173 `(#:python ,python-2
7174 #:phases
7175 (modify-phases %standard-phases
7176 (replace 'check
7177 (lambda _ (invoke "python" "test_contextlib2.py" "-v"))))))
7178 (native-inputs
7179 `(("python2-unittest2" ,python2-unittest2)))
7180 (home-page "http://contextlib2.readthedocs.org/")
7181 (synopsis "Tools for decorators and context managers")
7182 (description "This module is primarily a backport of the Python
7183 3.2 contextlib to earlier Python versions. Like contextlib, it
7184 provides utilities for common tasks involving decorators and context
7185 managers. It also contains additional features that are not part of
7186 the standard library.")
7187 (license license:psfl)))
7188
7189 (define-public python-texttable
7190 (package
7191 (name "python-texttable")
7192 (version "0.8.7")
7193 (source
7194 (origin
7195 (method url-fetch)
7196 (uri (pypi-uri "texttable" version))
7197 (sha256
7198 (base32
7199 "1liiiydgkg37i46a418aw19fyf6z3ds51wdwwpyjbs12x0phhf4a"))))
7200 (build-system python-build-system)
7201 (arguments '(#:tests? #f)) ; no tests
7202 (home-page "https://github.com/foutaise/texttable/")
7203 (synopsis "Python module for creating simple ASCII tables")
7204 (description "Texttable is a Python module for creating simple ASCII
7205 tables.")
7206 (license license:lgpl2.1+)))
7207
7208 (define-public python2-texttable
7209 (package-with-python2 python-texttable))
7210
7211 (define-public python-atomicwrites
7212 (package
7213 (name "python-atomicwrites")
7214 (version "1.1.5")
7215 (source (origin
7216 (method url-fetch)
7217 (uri (pypi-uri "atomicwrites" version))
7218 (sha256
7219 (base32
7220 "11bm90fwm2avvf4f3ib8g925w7jr4m11vcsinn1bi6ns4bm32214"))))
7221 (build-system python-build-system)
7222 (synopsis "Atomic file writes in Python")
7223 (description "Library for atomic file writes using platform dependent tools
7224 for atomic file system operations.")
7225 (home-page "https://github.com/untitaker/python-atomicwrites")
7226 (license license:expat)))
7227
7228 (define-public python2-atomicwrites
7229 (package-with-python2 python-atomicwrites))
7230
7231 (define-public python-click-threading
7232 (package
7233 (name "python-click-threading")
7234 (version "0.4.4")
7235 (source (origin
7236 (method url-fetch)
7237 (uri (pypi-uri "click-threading" version))
7238 (sha256
7239 (base32
7240 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
7241 (build-system python-build-system)
7242 (propagated-inputs
7243 `(("python-click" ,python-click)))
7244 (synopsis "Utilities for multithreading in Click")
7245 (description "This package provides utilities for multithreading in Click
7246 applications.")
7247 (home-page "https://github.com/click-contrib/click-threading")
7248 (license license:expat)))
7249
7250 (define-public python-click-log
7251 (package
7252 (name "python-click-log")
7253 (version "0.3.2")
7254 (source (origin
7255 (method url-fetch)
7256 (uri (pypi-uri "click-log" version))
7257 (sha256
7258 (base32
7259 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
7260 (build-system python-build-system)
7261 (propagated-inputs
7262 `(("python-click" ,python-click)))
7263 (synopsis "Logging for click applications")
7264 (description "This package provides a Python library for logging Click
7265 applications.")
7266 (home-page "https://github.com/click-contrib/click-log")
7267 (license license:expat)))
7268
7269 (define-public python-apipkg
7270 (package
7271 (name "python-apipkg")
7272 (version "1.4")
7273 (source (origin
7274 (method url-fetch)
7275 (uri (pypi-uri "apipkg" version))
7276 (sha256
7277 (base32
7278 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
7279 (build-system python-build-system)
7280 (native-inputs
7281 `(("python-pytest" ,python-pytest)))
7282 (synopsis "Namespace control and lazy-import mechanism")
7283 (description "With apipkg you can control the exported namespace of a Python
7284 package and greatly reduce the number of imports for your users. It is a small
7285 pure Python module that works on virtually all Python versions.")
7286 (home-page "https://github.com/pytest-dev/apipkg")
7287 (license license:expat)))
7288
7289 (define-public python2-apipkg
7290 (package-with-python2 python-apipkg))
7291
7292 (define-public python-execnet
7293 (package
7294 (name "python-execnet")
7295 (version "1.4.1")
7296 (source (origin
7297 (method url-fetch)
7298 (uri (pypi-uri "execnet" version))
7299 (sha256
7300 (base32
7301 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
7302 (build-system python-build-system)
7303 (arguments
7304 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
7305 ;; The two test failures are caused by the lack of an `ssh` executable.
7306 ;; The test suite can be run with pytest after the 'install' phase.
7307 #:tests? #f))
7308 (native-inputs
7309 `(("python-pytest" ,python-pytest)
7310 ("python-setuptools-scm" ,python-setuptools-scm)))
7311 (propagated-inputs
7312 `(("python-apipkg" ,python-apipkg)))
7313 (synopsis "Rapid multi-Python deployment")
7314 (description "Execnet provides a share-nothing model with
7315 channel-send/receive communication for distributing execution across many
7316 Python interpreters across version, platform and network barriers. It has a
7317 minimal and fast API targeting the following uses:
7318 @enumerate
7319 @item distribute tasks to (many) local or remote CPUs
7320 @item write and deploy hybrid multi-process applications
7321 @item write scripts to administer multiple environments
7322 @end enumerate")
7323 (home-page "http://codespeak.net/execnet/")
7324 (license license:expat)))
7325
7326 (define-public python2-execnet
7327 (package-with-python2 python-execnet))
7328
7329 (define-public python-icalendar
7330 (package
7331 (name "python-icalendar")
7332 (version "4.0.3")
7333 (source (origin
7334 (method url-fetch)
7335 (uri (pypi-uri "icalendar" version))
7336 (sha256
7337 (base32
7338 "0mk3dk1dxkcm46jy48v27j2w2349iv4sbimqj1yb5js43mx49hh7"))))
7339 (build-system python-build-system)
7340 (propagated-inputs
7341 `(("python-dateutil" ,python-dateutil)
7342 ("python-pytz" ,python-pytz)))
7343 (synopsis "Python library for parsing iCalendar files")
7344 (description "The icalendar package is a parser/generator of iCalendar
7345 files for use with Python.")
7346 (home-page "https://github.com/collective/icalendar")
7347 (license license:bsd-2)))
7348
7349 (define-public python-sphinxcontrib-newsfeed
7350 (package
7351 (name "python-sphinxcontrib-newsfeed")
7352 (version "0.1.4")
7353 (source (origin
7354 (method url-fetch)
7355 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
7356 (sha256
7357 (base32
7358 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
7359 (arguments '(#:tests? #f)) ; No tests.
7360 (build-system python-build-system)
7361 (propagated-inputs
7362 `(("python-sphinx" ,python-sphinx)))
7363 (synopsis "News Feed extension for Sphinx")
7364 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
7365 Blog, News or Announcements section to a Sphinx website.")
7366 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
7367 (license license:bsd-2)))
7368
7369 (define-public python-args
7370 (package
7371 (name "python-args")
7372 (version "0.1.0")
7373 (source (origin
7374 (method url-fetch)
7375 (uri (pypi-uri "args" version))
7376 (sha256
7377 (base32
7378 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
7379 (build-system python-build-system)
7380 (home-page "https://github.com/kennethreitz/args")
7381 (synopsis "Command-line argument parser")
7382 (description
7383 "This library provides a Python module to parse command-line arguments.")
7384 (license license:bsd-3)))
7385
7386 (define-public python2-args
7387 (package-with-python2 python-args))
7388
7389 (define-public python-clint
7390 (package
7391 (name "python-clint")
7392 (version "0.5.1")
7393 (source (origin
7394 (method url-fetch)
7395 (uri (pypi-uri "clint" version))
7396 (sha256
7397 (base32
7398 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
7399 (build-system python-build-system)
7400 (arguments
7401 '(#:phases
7402 (modify-phases %standard-phases
7403 (replace 'check
7404 (lambda _ (invoke "py.test" "-v"))))))
7405 (native-inputs
7406 `(("python-pytest" ,python-pytest)))
7407 (propagated-inputs
7408 `(("python-args" ,python-args)))
7409 (home-page "https://github.com/kennethreitz/clint")
7410 (synopsis "Command-line interface tools")
7411 (description
7412 "Clint is a Python module filled with a set of tools for developing
7413 command-line applications, including tools for colored and indented
7414 output, progress bar display, and pipes.")
7415 (license license:isc)))
7416
7417 (define-public python2-clint
7418 (package-with-python2 python-clint))
7419
7420 (define-public python-rply
7421 (package
7422 (name "python-rply")
7423 (version "0.7.5")
7424 (source (origin
7425 (method url-fetch)
7426 (uri (pypi-uri "rply" version))
7427 (sha256
7428 (base32
7429 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
7430 (build-system python-build-system)
7431 (propagated-inputs
7432 `(("python-appdirs" ,python-appdirs)))
7433 (home-page "https://github.com/alex/rply")
7434 (synopsis "Parser generator for Python")
7435 (description
7436 "This package provides a pure Python based parser generator, that also
7437 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
7438 with a new public API, and RPython support.")
7439 (license license:bsd-3)))
7440
7441 (define-public python2-rply
7442 (package-with-python2 python-rply))
7443
7444 (define-public python-hy
7445 (package
7446 (name "python-hy")
7447 (version "0.13.0")
7448 (source (origin
7449 (method url-fetch)
7450 (uri (pypi-uri "hy" version))
7451 (sha256
7452 (base32
7453 "19sfymaksx9jhksfnb15ahid46mzrhdfzz6yy2craz2qnzvpmky8"))))
7454 (build-system python-build-system)
7455 (arguments
7456 '(#:phases
7457 (modify-phases %standard-phases
7458 (replace 'check
7459 (lambda _
7460 ;; Tests require write access to HOME.
7461 (setenv "HOME" "/tmp")
7462 (invoke "nosetests"))))))
7463 (native-inputs
7464 `(("python-coverage" ,python-coverage)
7465 ("python-nose" ,python-nose)))
7466 (propagated-inputs
7467 `(("python-astor" ,python-astor)
7468 ("python-clint" ,python-clint)
7469 ("python-rply" ,python-rply)))
7470 (home-page "http://hylang.org/")
7471 (synopsis "Lisp frontend to Python")
7472 (description
7473 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
7474 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
7475 Python at your fingertips, in Lisp form.")
7476 (license license:expat)))
7477
7478 (define-public python2-hy
7479 (package-with-python2 python-hy))
7480
7481 (define-public python2-functools32
7482 (package
7483 (name "python2-functools32")
7484 (version "3.2.3-2")
7485 (source
7486 (origin
7487 (method url-fetch)
7488 (uri (pypi-uri "functools32" version))
7489 (sha256
7490 (base32
7491 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
7492 (build-system python-build-system)
7493 (arguments
7494 `(#:python ,python-2
7495 #:tests? #f)) ; no test target
7496 (home-page "https://github.com/MiCHiLU/python-functools32")
7497 (synopsis
7498 "Backport of the functools module from Python 3.2.3")
7499 (description
7500 "This package is a backport of the @code{functools} module from Python
7501 3.2.3 for use with older versions of Python and PyPy.")
7502 (license license:expat)))
7503
7504 (define-public python2-subprocess32
7505 (package
7506 (name "python2-subprocess32")
7507 (version "3.2.7")
7508 (source (origin
7509 (method url-fetch)
7510 (uri (pypi-uri "subprocess32" version))
7511 (sha256
7512 (base32
7513 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
7514 (patches
7515 (search-patches "python2-subprocess32-disable-input-test.patch"))))
7516 (build-system python-build-system)
7517 (arguments
7518 `(#:python ,python-2
7519 ;; The test suite fails with Python > 2.7.13:
7520 ;; import test.support
7521 ;; ImportError: No module named support
7522 #:tests? #f
7523 #:phases
7524 (modify-phases %standard-phases
7525 (add-after 'unpack 'patch-/bin/sh
7526 (lambda _
7527 (substitute* '("subprocess32.py"
7528 "test_subprocess32.py")
7529 (("/bin/sh") (which "sh")))
7530 #t)))))
7531 (home-page "https://github.com/google/python-subprocess32")
7532 (synopsis "Backport of the subprocess module from Python 3.2")
7533 (description
7534 "This is a backport of the @code{subprocess} standard library module
7535 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
7536 new features. On POSIX systems it is guaranteed to be reliable when used
7537 in threaded applications. It includes timeout support from Python 3.3 but
7538 otherwise matches 3.2’s API.")
7539 (license license:psfl)))
7540
7541 (define-public python2-futures
7542 (package
7543 (name "python2-futures")
7544 (version "3.2.0")
7545 (source
7546 (origin
7547 (method url-fetch)
7548 (uri (pypi-uri "futures" version))
7549 (sha256
7550 (base32
7551 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
7552 (build-system python-build-system)
7553 (arguments `(#:python ,python-2
7554 ;; FIXME: Python 2.7.14 moved the test.support library,
7555 ;; but our package has not yet been adjusted. Enable
7556 ;; tests when the python2 package has been fixed.
7557 #:tests? #f))
7558 (home-page "https://github.com/agronholm/pythonfutures")
7559 (synopsis
7560 "Backport of the concurrent.futures package from Python 3.2")
7561 (description
7562 "The concurrent.futures module provides a high-level interface for
7563 asynchronously executing callables. This package backports the
7564 concurrent.futures package from Python 3.2")
7565 (license license:bsd-3)))
7566
7567 (define-public python-promise
7568 (package
7569 (name "python-promise")
7570 (version "0.4.2")
7571 (source
7572 (origin
7573 (method url-fetch)
7574 (uri (pypi-uri "promise" version))
7575 (sha256
7576 (base32
7577 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
7578 (build-system python-build-system)
7579 ;; Tests wants python-futures, which is a python2 only program, and
7580 ;; can't be found by python-promise at test time.
7581 (arguments `(#:tests? #f))
7582 (home-page "https://github.com/syrusakbary/promise")
7583 (synopsis "Promises/A+ implementation for Python")
7584 (description
7585 "Promises/A+ implementation for Python")
7586 (properties `((python2-variant . ,(delay python2-promise))))
7587 (license license:expat)))
7588
7589 (define-public python2-promise
7590 (let ((promise (package-with-python2
7591 (strip-python2-variant python-promise))))
7592 (package (inherit promise)
7593 (arguments (substitute-keyword-arguments (package-arguments promise)
7594 ((#:tests? _) #t)))
7595 (native-inputs
7596 `(("python2-futures" ,python2-futures)
7597 ("python2-pytest" ,python2-pytest)
7598 ,@(package-native-inputs promise))))))
7599
7600 (define-public python-colorama
7601 (package
7602 (name "python-colorama")
7603 (version "0.3.9")
7604 (source
7605 (origin
7606 (method url-fetch)
7607 (uri (pypi-uri "colorama" version))
7608 (sha256
7609 (base32
7610 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
7611 (build-system python-build-system)
7612 (synopsis "Colored terminal text rendering for Python")
7613 (description "Colorama is a Python library for rendering colored terminal
7614 text.")
7615 (home-page "https://pypi.python.org/pypi/colorama")
7616 (license license:bsd-3)))
7617
7618 (define-public python2-colorama
7619 (package-with-python2 python-colorama))
7620
7621 (define-public python-rsa
7622 (package
7623 (name "python-rsa")
7624 (version "3.4.2")
7625 (source
7626 (origin
7627 (method url-fetch)
7628 (uri (pypi-uri "rsa" version))
7629 (sha256
7630 (base32
7631 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
7632 (build-system python-build-system)
7633 (propagated-inputs
7634 `(("python-pyasn1" ,python-pyasn1)))
7635 (synopsis "Pure-Python RSA implementation")
7636 (description "Python-RSA is a pure-Python RSA implementation. It supports
7637 encryption and decryption, signing and verifying signatures, and key
7638 generation according to PKCS#1 version 1.5. It can be used as a Python
7639 library as well as on the command line.")
7640 (home-page "https://stuvel.eu/rsa")
7641 (license license:asl2.0)))
7642
7643 (define-public python2-rsa
7644 (package-with-python2 python-rsa))
7645
7646 (define-public python-pluggy
7647 (package
7648 (name "python-pluggy")
7649 (version "0.7.1")
7650 (source
7651 (origin
7652 (method url-fetch)
7653 (uri (pypi-uri "pluggy" version))
7654 (sha256
7655 (base32
7656 "1qbn70mksmr03hac6jgp6fiqc4l7859z8dchx2x950vhlij87swm"))))
7657 (build-system python-build-system)
7658 (native-inputs
7659 `(("python-setuptools-scm" ,python-setuptools-scm)))
7660 (synopsis "Plugin and hook calling mechanism for Python")
7661 (description "Pluggy is an extraction of the plugin manager as used by
7662 Pytest but stripped of Pytest specific details.")
7663 (home-page "https://pypi.python.org/pypi/pluggy")
7664 (license license:expat)))
7665
7666 (define-public python2-pluggy
7667 (package-with-python2 python-pluggy))
7668
7669 (define-public python-tox
7670 (package
7671 (name "python-tox")
7672 (version "2.8.1")
7673 (source
7674 (origin
7675 (method url-fetch)
7676 (uri (pypi-uri "tox" version))
7677 (sha256
7678 (base32
7679 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
7680 (build-system python-build-system)
7681 (arguments
7682 ;; FIXME: Tests require pytest-timeout, which itself requires
7683 ;; pytest>=2.8.0 for installation.
7684 '(#:tests? #f))
7685 (propagated-inputs
7686 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
7687 ("python-py" ,python-py)
7688 ("python-virtualenv" ,python-virtualenv)))
7689 (native-inputs
7690 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
7691 ("python-pytest" ,python-pytest) ; >= 2.3.5
7692 ("python-setuptools-scm" ,python-setuptools-scm)))
7693 (home-page "http://tox.testrun.org/")
7694 (synopsis "Virtualenv-based automation of test activities")
7695 (description "Tox is a generic virtualenv management and test command line
7696 tool. It can be used to check that a package installs correctly with
7697 different Python versions and interpreters, or run tests in each type of
7698 supported environment, or act as a frontend to continuous integration
7699 servers.")
7700 (license license:expat)))
7701
7702 (define-public python2-tox
7703 (package-with-python2 python-tox))
7704
7705 (define-public python-jmespath
7706 (package
7707 (name "python-jmespath")
7708 (version "0.9.3")
7709 (source
7710 (origin
7711 (method url-fetch)
7712 (uri (pypi-uri "jmespath" version))
7713 (sha256
7714 (base32
7715 "0r7wc7fsxmlwzxx9j1j7rms06c6xs6d4sysirdhz1jk2mb4x90ba"))))
7716 (build-system python-build-system)
7717 (native-inputs
7718 `(("python-nose" ,python-nose)))
7719 (synopsis "JSON Matching Expressions")
7720 (description "JMESPath (pronounced “james path”) is a Python library that
7721 allows one to declaratively specify how to extract elements from a JSON
7722 document.")
7723 (home-page "https://github.com/jmespath/jmespath.py")
7724 (license license:expat)))
7725
7726 (define-public python2-jmespath
7727 (package-with-python2 python-jmespath))
7728
7729 (define-public python-botocore
7730 (package
7731 (name "python-botocore")
7732 (version "1.8.43")
7733 (source
7734 (origin
7735 (method url-fetch)
7736 (uri (pypi-uri "botocore" version))
7737 (sha256
7738 (base32
7739 "12cqpbnz3vfv41mp9admvciw7bc7hz57sjpqs2bxaw9wnfmbw5lg"))))
7740 (build-system python-build-system)
7741 (arguments
7742 ;; FIXME: Many tests are failing.
7743 '(#:tests? #f))
7744 (propagated-inputs
7745 `(("python-dateutil" ,python-dateutil)
7746 ("python-docutils" ,python-docutils)
7747 ("python-jmespath" ,python-jmespath)))
7748 (native-inputs
7749 `(("python-mock" ,python-mock)
7750 ("python-nose" ,python-nose)
7751 ("behave" ,behave)
7752 ("python-tox" ,python-tox)
7753 ("python-wheel" ,python-wheel)))
7754 (home-page "https://github.com/boto/botocore")
7755 (synopsis "Low-level interface to AWS")
7756 (description "Botocore is a Python library that provides a low-level
7757 interface to the Amazon Web Services (AWS) API.")
7758 (license license:asl2.0)))
7759
7760 (define-public python2-botocore
7761 (package-with-python2 python-botocore))
7762
7763 (define-public python-xdo
7764 (package
7765 (name "python-xdo")
7766 (version "0.3")
7767 (source (origin
7768 (method url-fetch)
7769 (uri (string-append
7770 "http://http.debian.net/debian/pool/main/p/python-xdo/"
7771 "python-xdo_" version ".orig.tar.gz"))
7772 (sha256
7773 (base32
7774 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
7775 (build-system python-build-system)
7776 (arguments
7777 '(#:phases
7778 (modify-phases %standard-phases
7779 (add-before 'install 'patch-libxdo-path
7780 ;; Hardcode the path of dynamically loaded libxdo library.
7781 (lambda* (#:key inputs #:allow-other-keys)
7782 (let ((libxdo (string-append
7783 (assoc-ref inputs "xdotool")
7784 "/lib/libxdo.so")))
7785 (substitute* "xdo/_xdo.py"
7786 (("find_library\\(\"xdo\"\\)")
7787 (simple-format #f "\"~a\"" libxdo)))
7788 #t))))
7789 #:tests? #f)) ; no tests provided
7790 (propagated-inputs
7791 `(("python-six" ,python-six)))
7792 (inputs
7793 `(("xdotool" ,xdotool)
7794 ("libX11" ,libx11)))
7795 (home-page "https://tracker.debian.org/pkg/python-xdo")
7796 (synopsis "Python library for simulating X11 keyboard/mouse input")
7797 (description "Provides bindings to libxdo for manipulating X11 via simulated
7798 input. (Note that this is mostly a legacy library; you may wish to look at
7799 python-xdo for newer bindings.)")
7800 (license license:bsd-3)))
7801
7802 (define-public python2-xdo
7803 (package-with-python2 python-xdo))
7804
7805 (define-public python-mako
7806 (package
7807 (name "python-mako")
7808 (version "1.0.7")
7809 (source
7810 (origin
7811 (method url-fetch)
7812 (uri (pypi-uri "Mako" version))
7813 (sha256
7814 (base32
7815 "1bi5gnr8r8dva06qpyx4kgjc6spm2k1y908183nbbaylggjzs0jf"))))
7816 (build-system python-build-system)
7817 (propagated-inputs
7818 `(("python-markupsafe" ,python-markupsafe)))
7819 (native-inputs
7820 `(("python-mock" ,python-mock)
7821 ("python-nose" ,python-nose)
7822 ("python-pytest" ,python-pytest)))
7823 (home-page "http://www.makotemplates.org/")
7824 (synopsis "Templating language for Python")
7825 (description "Mako is a templating language for Python that compiles
7826 templates into Python modules.")
7827 (license license:expat)))
7828
7829 (define-public python2-mako
7830 (package-with-python2 python-mako))
7831
7832 (define-public python-waitress
7833 (package
7834 (name "python-waitress")
7835 (version "1.1.0")
7836 (source
7837 (origin
7838 (method url-fetch)
7839 (uri (pypi-uri "waitress" version))
7840 (patches (search-patches "python-waitress-fix-tests.patch"))
7841 (sha256
7842 (base32
7843 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
7844 (build-system python-build-system)
7845 (home-page "https://github.com/Pylons/waitress")
7846 (synopsis "Waitress WSGI server")
7847 (description "Waitress is meant to be a production-quality pure-Python WSGI
7848 server with very acceptable performance.")
7849 (license license:zpl2.1)))
7850
7851 (define-public python2-waitress
7852 (package-with-python2 python-waitress))
7853
7854 (define-public python-pyquery
7855 (package
7856 (name "python-pyquery")
7857 (version "1.2.17")
7858 (source
7859 (origin
7860 (method url-fetch)
7861 (uri (pypi-uri "pyquery" version))
7862 (sha256
7863 (base32
7864 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
7865 (build-system python-build-system)
7866 (native-inputs
7867 `(("python-webob" ,python-webob)
7868 ("python-webtest" ,python-webtest)))
7869 (propagated-inputs
7870 `(("python-lxml" ,python-lxml)
7871 ("python-cssselect" ,python-cssselect)))
7872 (home-page "https://github.com/gawel/pyquery")
7873 (synopsis "Make jQuery-like queries on xml documents")
7874 (description "pyquery allows you to make jQuery queries on xml documents.
7875 The API is as much as possible the similar to jQuery. pyquery uses lxml for
7876 fast xml and html manipulation.")
7877 (license license:bsd-3)))
7878
7879 (define-public python2-pyquery
7880 (package-with-python2 python-pyquery))
7881
7882 (define-public python-anyjson
7883 (package
7884 (name "python-anyjson")
7885 (version "0.3.3")
7886 (source
7887 (origin
7888 (method url-fetch)
7889 (uri (pypi-uri "anyjson" version))
7890 (sha256
7891 (base32
7892 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
7893 (build-system python-build-system)
7894 (arguments
7895 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
7896 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
7897 ;; whatever) so this transformation needs to be done before the tests
7898 ;; can be run. Maybe we could add a build step to transform beforehand
7899 ;; but it could be annoying/difficult.
7900 ;; We can enable tests for the Python 2 version, though, and do below.
7901 #:tests? #f))
7902 (home-page "https://bitbucket.org/runeh/anyjson/")
7903 (synopsis
7904 "Wraps best available JSON implementation in a common interface")
7905 (description
7906 "Anyjson loads whichever is the fastest JSON module installed
7907 and provides a uniform API regardless of which JSON implementation is used.")
7908 (license license:bsd-3)
7909 (properties `((python2-variant . ,(delay python2-anyjson))))))
7910
7911 (define-public python2-anyjson
7912 (let ((anyjson (package-with-python2
7913 (strip-python2-variant python-anyjson))))
7914 (package
7915 (inherit anyjson)
7916 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
7917 #:tests? #t
7918 ,@(package-arguments anyjson)))
7919 (native-inputs `(("python2-nose" ,python2-nose))))))
7920
7921 (define-public python-amqp
7922 (package
7923 (name "python-amqp")
7924 (version "2.3.2")
7925 (source
7926 (origin
7927 (method url-fetch)
7928 (uri (pypi-uri "amqp" version))
7929 (sha256
7930 (base32
7931 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
7932 (build-system python-build-system)
7933 (native-inputs
7934 `(("python-case" ,python-case)
7935 ("python-pytest-sugar" ,python-pytest-sugar)
7936 ("python-mock" ,python-mock)))
7937 (propagated-inputs
7938 `(("python-vine" ,python-vine)))
7939 (home-page "https://github.com/celery/py-amqp")
7940 (synopsis
7941 "Low-level AMQP client for Python (fork of amqplib)")
7942 (description
7943 "This is a fork of amqplib which was originally written by Barry Pederson.
7944 It is maintained by the Celery project, and used by kombu as a pure python
7945 alternative when librabbitmq is not available.")
7946 (license license:lgpl2.1+)
7947 (properties `((python2-variant . ,(delay python2-amqp))))))
7948
7949 (define-public python2-amqp
7950 (let ((amqp (package-with-python2
7951 (strip-python2-variant python-amqp))))
7952 (package
7953 (inherit amqp)
7954 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
7955 ;; unmaintained. Weirdly, does not do this on the python 3
7956 ;; version?
7957 #:tests? #f
7958 ,@(package-arguments amqp))))))
7959
7960 (define-public python-txamqp
7961 (package
7962 (name "python-txamqp")
7963 (version "0.8.2")
7964 (source
7965 (origin
7966 (method url-fetch)
7967 (uri (pypi-uri "txAMQP" version))
7968 (sha256
7969 (base32
7970 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
7971 (build-system python-build-system)
7972 (propagated-inputs
7973 `(("python-six" ,python-six)
7974 ("python-twisted" ,python-twisted)))
7975 (home-page "https://github.com/txamqp/txamqp")
7976 (synopsis "Communicate with AMQP peers and brokers using Twisted")
7977 (description
7978 "This package provides a Python library for communicating with AMQP peers
7979 and brokers using the asynchronous networking framework Twisted. It contains
7980 all the necessary code to connect, send and receive messages to/from an
7981 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
7982 also includes support for using Thrift RPC over AMQP in Twisted
7983 applications.")
7984 (license license:asl2.0)))
7985
7986 (define-public python2-txamqp
7987 (package-with-python2 python-txamqp))
7988
7989 (define-public python-kombu
7990 (package
7991 (name "python-kombu")
7992 (version "4.2.2")
7993 (source
7994 (origin
7995 (method url-fetch)
7996 (uri (pypi-uri "kombu" version))
7997 (sha256
7998 (base32
7999 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
8000 (build-system python-build-system)
8001 (native-inputs
8002 `(("python-mock" ,python-mock)
8003 ("python-case" ,python-case)
8004 ("python-pyro4" ,python-pyro4)
8005 ("python-pytest-sugar" ,python-pytest-sugar)
8006 ("python-pytz" ,python-pytz)))
8007 (propagated-inputs
8008 `(("python-anyjson" ,python-anyjson)
8009 ("python-amqp" ,python-amqp)
8010 ("python-redis" ,python-redis)))
8011 (home-page "https://kombu.readthedocs.io")
8012 (synopsis "Message passing library for Python")
8013 (description "The aim of Kombu is to make messaging in Python as easy as
8014 possible by providing an idiomatic high-level interface for the AMQ protocol,
8015 and also provide proven and tested solutions to common messaging problems.
8016 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
8017 message orientation, queuing, routing, reliability and security, for which the
8018 RabbitMQ messaging server is the most popular implementation.")
8019 (license license:bsd-3)
8020 (properties `((python2-variant . ,(delay python2-kombu))))))
8021
8022 (define-public python2-kombu
8023 (let ((kombu (package-with-python2
8024 (strip-python2-variant python-kombu))))
8025 (package
8026 (inherit kombu)
8027 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
8028 ;; It works fine on the python3 variant.
8029 #:tests? #f
8030 ,@(package-arguments kombu)))
8031 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8032 ,@(package-native-inputs kombu))))))
8033
8034 (define-public python-billiard
8035 (package
8036 (name "python-billiard")
8037 (version "3.5.0.5")
8038 (source
8039 (origin
8040 (method url-fetch)
8041 (uri (pypi-uri "billiard" version))
8042 (sha256
8043 (base32
8044 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
8045 (build-system python-build-system)
8046 (native-inputs
8047 `(("python-case" ,python-case)
8048 ("python-pytest" ,python-pytest)))
8049 (home-page "https://github.com/celery/billiard")
8050 (synopsis
8051 "Python multiprocessing fork with improvements and bugfixes")
8052 (description
8053 "Billiard is a fork of the Python 2.7 multiprocessing package. The
8054 multiprocessing package itself is a renamed and updated version of R Oudkerk's
8055 pyprocessing package. This standalone variant is intended to be compatible with
8056 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
8057 (license license:bsd-3)
8058 (properties `((python2-variant . ,(delay python2-billiard))))))
8059
8060 (define-public python2-billiard
8061 (let ((billiard (package-with-python2
8062 (strip-python2-variant python-billiard))))
8063 (package
8064 (inherit billiard)
8065 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8066 ("python2-mock" ,python2-mock)
8067 ,@(package-native-inputs billiard))))))
8068
8069 (define-public python-celery
8070 (package
8071 (name "python-celery")
8072 (version "4.2.1")
8073 (source
8074 (origin
8075 (method url-fetch)
8076 (uri (pypi-uri "celery" version))
8077 (sha256
8078 (base32
8079 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
8080 (build-system python-build-system)
8081 (arguments
8082 '(;; TODO The tests fail with Python 3.7
8083 ;; https://github.com/celery/celery/issues/4849
8084 #:tests? #f
8085 #:phases
8086 (modify-phases %standard-phases
8087 (add-after 'unpack 'patch-requirements
8088 (lambda _
8089 (substitute* "requirements/test.txt"
8090 (("pytest>=3\\.0,<3\\.3")
8091 "pytest>=3.0"))
8092 #t)))))
8093 (native-inputs
8094 `(("python-case" ,python-case)
8095 ("python-pytest" ,python-pytest)))
8096 (propagated-inputs
8097 `(("python-pytz" ,python-pytz)
8098 ("python-billiard" ,python-billiard)
8099 ("python-kombu" ,python-kombu)))
8100 (home-page "https://celeryproject.org")
8101 (synopsis "Distributed Task Queue")
8102 (description "Celery is an asynchronous task queue/job queue based on
8103 distributed message passing. It is focused on real-time operation, but
8104 supports scheduling as well. The execution units, called tasks, are executed
8105 concurrently on a single or more worker servers using multiprocessing,
8106 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
8107 synchronously (wait until ready).")
8108 (license license:bsd-3)
8109 (properties `((python2-variant . ,(delay python2-celery))))))
8110
8111 (define-public python2-celery
8112 (let ((celery (package-with-python2
8113 (strip-python2-variant python-celery))))
8114 (package
8115 (inherit celery)
8116 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8117 ("python2-mock" ,python2-mock)
8118 ,@(package-native-inputs celery))))))
8119
8120 (define-public python-translitcodec
8121 (package
8122 (name "python-translitcodec")
8123 (version "0.4.0")
8124 (source
8125 (origin
8126 (method url-fetch)
8127 (uri (pypi-uri "translitcodec" version))
8128 (sha256
8129 (base32
8130 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
8131 (build-system python-build-system)
8132 (arguments
8133 `(#:tests? #f)) ; no tests provided
8134 (home-page
8135 "https://github.com/claudep/translitcodec")
8136 (synopsis
8137 "Unicode to 8-bit charset transliteration codec")
8138 (description
8139 "This package contains codecs for transliterating ISO 10646 texts into
8140 best-effort representations using smaller coded character sets (ASCII,
8141 ISO 8859, etc.).")
8142 (license license:expat)))
8143
8144 (define-public python2-translitcodec
8145 (package-with-python2 python-translitcodec))
8146
8147 (define-public python-editor
8148 (package
8149 (name "python-editor")
8150 (version "0.5")
8151 (source
8152 (origin
8153 (method url-fetch)
8154 (uri (pypi-uri "python-editor" version))
8155 (sha256
8156 (base32
8157 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
8158 (build-system python-build-system)
8159 (home-page
8160 "https://github.com/fmoo/python-editor")
8161 (synopsis
8162 "Programmatically open an editor, capture the result")
8163 (description
8164 "python-editor is a library that provides the editor module for
8165 programmatically interfacing with your system's $EDITOR.")
8166 (license license:asl2.0)))
8167
8168 (define-public python2-editor
8169 (package-with-python2 python-editor))
8170
8171 (define-public python-sphinxcontrib-programoutput
8172 (package
8173 (name "python-sphinxcontrib-programoutput")
8174 (version "0.10")
8175 (source (origin
8176 (method url-fetch)
8177 (uri (pypi-uri "sphinxcontrib-programoutput" version))
8178 (sha256
8179 (base32
8180 "153hhnlbx4688zj9wd64819ps5znc2jlyp5crkgzvn5hxgy99vpx"))))
8181 (build-system python-build-system)
8182 (arguments
8183 ;; FIXME: Many tests are failing and the upstream is gone.
8184 '(#:tests? #f))
8185 (propagated-inputs
8186 `(("python-sphinx" ,python-sphinx)))
8187 (synopsis "Sphinx extension to include program output")
8188 (description "A Sphinx extension to literally insert the output of arbitrary
8189 commands into documents, helping you to keep your command examples up to date.")
8190 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
8191 (license license:bsd-2)))
8192
8193 (define-public python2-sphinxcontrib-programoutput
8194 (package-with-python2 python-sphinxcontrib-programoutput))
8195
8196 (define-public python-sphinx-repoze-autointerface
8197 (package
8198 (name "python-sphinx-repoze-autointerface")
8199 (version "0.8")
8200 (source (origin
8201 (method url-fetch)
8202 (uri (pypi-uri "repoze.sphinx.autointerface" version))
8203 (sha256
8204 (base32
8205 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
8206 (build-system python-build-system)
8207 (arguments '(#:tests? #f)) ; No tests.
8208 (propagated-inputs
8209 `(("python-sphinx" ,python-sphinx)
8210 ("python-zope-interface" ,python-zope-interface)))
8211 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
8212 (description "This package defines an extension for the Sphinx documentation
8213 system. The extension allows generation of API documentation by
8214 introspection of @code{zope.interface} instances in code.")
8215 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
8216 (license license:repoze)))
8217
8218 (define-public python2-sphinx-repoze-autointerface
8219 (package-with-python2 python-sphinx-repoze-autointerface))
8220
8221 (define-public python-vobject
8222 (package
8223 (name "python-vobject")
8224 (version "0.9.5")
8225 (source (origin
8226 (method url-fetch)
8227 (uri (pypi-uri "vobject" version))
8228 (sha256
8229 (base32
8230 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
8231 (build-system python-build-system)
8232 (arguments
8233 '(;; The test suite relies on some non-portable Windows interfaces.
8234 #:tests? #f))
8235 (propagated-inputs
8236 `(("python-dateutil" ,python-dateutil)
8237 ("python-pyicu" ,python-pyicu)))
8238 (synopsis "Parse and generate vCard and vCalendar files")
8239 (description "Vobject is intended to be a full featured Python package for
8240 parsing and generating vCard and vCalendar files. Currently, iCalendar files
8241 are supported and well tested. vCard 3.0 files are supported, and all data
8242 should be imported, but only a few components are understood in a sophisticated
8243 way.")
8244 (home-page "http://eventable.github.io/vobject/")
8245 (license license:asl2.0)))
8246
8247 (define-public python2-vobject
8248 (package-with-python2 python-vobject))
8249
8250 (define-public python-munkres
8251 (package
8252 (name "python-munkres")
8253 (version "1.0.8")
8254 (source (origin
8255 (method url-fetch)
8256 (uri (pypi-uri "munkres" version))
8257 (sha256
8258 (base32
8259 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
8260 (build-system python-build-system)
8261 (arguments
8262 '(#:tests? #f)) ; no test suite
8263 (home-page "http://software.clapper.org/munkres/")
8264 (synopsis "Implementation of the Munkres algorithm")
8265 (description "The Munkres module provides an implementation of the Munkres
8266 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
8267 useful for solving the Assignment Problem.")
8268 (license license:bsd-3)))
8269
8270 (define-public python2-munkres
8271 (package-with-python2 python-munkres))
8272
8273 (define-public python-whoosh
8274 (package
8275 (name "python-whoosh")
8276 (version "2.7.4")
8277 (source
8278 (origin
8279 (method url-fetch)
8280 (uri (pypi-uri "Whoosh" version))
8281 (sha256
8282 (base32
8283 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
8284 (build-system python-build-system)
8285 (native-inputs
8286 `(("python-pytest" ,python-pytest)))
8287 (home-page "https://bitbucket.org/mchaput/whoosh")
8288 (synopsis "Full text indexing, search, and spell checking library")
8289 (description
8290 "Whoosh is a fast, pure-Python full text indexing, search, and spell
8291 checking library.")
8292 (license license:bsd-2)))
8293
8294 (define-public python2-whoosh
8295 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
8296 (package (inherit whoosh)
8297 (propagated-inputs
8298 `(("python2-backport-ssl-match-hostname"
8299 ,python2-backport-ssl-match-hostname)
8300 ,@(package-propagated-inputs whoosh))))))
8301
8302 (define-public python-pathlib
8303 (package
8304 (name "python-pathlib")
8305 (version "1.0.1")
8306 (source (origin
8307 (method url-fetch)
8308 (uri (pypi-uri "pathlib" version))
8309 (sha256
8310 (base32
8311 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
8312 (build-system python-build-system)
8313 ;; The tests depend on the internal "test" module, which does not provide
8314 ;; a stable interface.
8315 (arguments `(#:tests? #f))
8316 (home-page "https://pathlib.readthedocs.org/")
8317 (synopsis "Object-oriented file system paths")
8318 (description "Pathlib offers a set of classes to handle file system paths.
8319 It offers the following advantages over using string objects:
8320
8321 @enumerate
8322 @item No more cumbersome use of os and os.path functions. Everything can
8323 be done easily through operators, attribute accesses, and method calls.
8324 @item Embodies the semantics of different path types. For example,
8325 comparing Windows paths ignores casing.
8326 @item Well-defined semantics, eliminating any inconsistencies or
8327 ambiguities (forward vs. backward slashes, etc.).
8328 @end enumerate
8329
8330 Note: In Python 3.4, pathlib is now part of the standard library. For other
8331 Python versions please consider python-pathlib2 instead, which tracks the
8332 standard library module. This module (python-pathlib) isn't maintained
8333 anymore.")
8334 (license license:expat)))
8335
8336 (define-public python2-pathlib
8337 (package-with-python2 python-pathlib))
8338
8339 (define-public python2-pathlib2
8340 (package
8341 (name "python2-pathlib2")
8342 (version "2.3.2")
8343 (source (origin
8344 (method url-fetch)
8345 (uri (pypi-uri "pathlib2" version))
8346 (sha256
8347 (base32
8348 "10yb0iv5x2hs631rcppkhbddx799d3h8pcwmkbh2a66ns3w71ccf"))))
8349 (build-system python-build-system)
8350 ;; We only need the the Python 2 variant, since for Python 3 our minimum
8351 ;; version is 3.4 which already includes this package as part of the
8352 ;; standard library.
8353 (arguments
8354 `(#:python ,python-2))
8355 (propagated-inputs
8356 `(("python2-scandir" ,python2-scandir)
8357 ("python2-six" ,python2-six)))
8358 (home-page "https://pypi.python.org/pypi/pathlib2/")
8359 (synopsis "Object-oriented file system paths - backport of standard
8360 pathlib module")
8361 (description "The goal of pathlib2 is to provide a backport of standard
8362 pathlib module which tracks the standard library module, so all the newest
8363 features of the standard pathlib can be used also on older Python versions.
8364
8365 Pathlib offers a set of classes to handle file system paths. It offers the
8366 following advantages over using string objects:
8367
8368 @enumerate
8369 @item No more cumbersome use of os and os.path functions. Everything can
8370 be done easily through operators, attribute accesses, and method calls.
8371 @item Embodies the semantics of different path types. For example,
8372 comparing Windows paths ignores casing.
8373 @item Well-defined semantics, eliminating any inconsistencies or
8374 ambiguities (forward vs. backward slashes, etc.).
8375 @end enumerate")
8376 (license license:expat)))
8377
8378 (define-public python2-pathlib2-bootstrap
8379 (hidden-package
8380 (package
8381 (inherit python2-pathlib2)
8382 (name "python2-pathlib2-bootstrap")
8383 (propagated-inputs
8384 `(("python2-scandir" ,python2-scandir)
8385 ("python2-six" ,python2-six-bootstrap))))))
8386
8387 (define-public python-jellyfish
8388 (package
8389 (name "python-jellyfish")
8390 (version "0.5.6")
8391 (source (origin
8392 (method url-fetch)
8393 (uri (pypi-uri "jellyfish" version))
8394 (sha256
8395 (base32
8396 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
8397 (build-system python-build-system)
8398 (native-inputs
8399 `(("python-pytest" ,python-pytest)))
8400 (home-page "https://github.com/jamesturk/jellyfish")
8401 (synopsis "Approximate and phonetic matching of strings")
8402 (description "Jellyfish uses a variety of string comparison and phonetic
8403 encoding algorithms to do fuzzy string matching.")
8404 (license license:bsd-2)
8405 (properties `((python2-variant . ,(delay python2-jellyfish))))))
8406
8407 (define-public python2-jellyfish
8408 (let ((jellyfish (package-with-python2
8409 (strip-python2-variant python-jellyfish))))
8410 (package (inherit jellyfish)
8411 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
8412 ,@(package-native-inputs jellyfish))))))
8413
8414 (define-public python2-unicodecsv
8415 (package
8416 (name "python2-unicodecsv")
8417 (version "0.14.1")
8418 (source (origin
8419 (method url-fetch)
8420 ;; The test suite is not included in the PyPi release.
8421 ;; https://github.com/jdunck/python-unicodecsv/issues/19
8422 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
8423 "archive/" version ".tar.gz"))
8424 (file-name (string-append name "-" version ".tar.gz"))
8425 (sha256
8426 (base32
8427 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
8428 (build-system python-build-system)
8429 (arguments
8430 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
8431 #:python ,python-2))
8432 (native-inputs
8433 `(("python2-unittest2" ,python2-unittest2)))
8434 (home-page "https://github.com/jdunck/python-unicodecsv")
8435 (synopsis "Unicode CSV module for Python 2")
8436 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
8437 module, adding support for Unicode strings.")
8438 (license license:bsd-2)))
8439
8440 (define-public python-rarfile
8441 (package
8442 (name "python-rarfile")
8443 (version "2.8")
8444 (source (origin
8445 (method url-fetch)
8446 (uri (pypi-uri "rarfile" version))
8447 (sha256
8448 (base32
8449 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
8450 (build-system python-build-system)
8451 (arguments
8452 '(#:phases
8453 (modify-phases %standard-phases
8454 (replace 'check
8455 ;; Many tests fail, but the installation proceeds.
8456 (lambda _ (invoke "make" "-C" "test" "test"))))))
8457 (native-inputs
8458 `(("which" ,which))) ; required for tests
8459 (propagated-inputs
8460 `(("libarchive" ,libarchive)))
8461 (home-page "https://github.com/markokr/rarfile")
8462 (synopsis "RAR archive reader for Python")
8463 (description "This is Python module for RAR archive reading. The interface
8464 is made as zipfile like as possible.")
8465 (license license:isc)))
8466
8467 (define-public python2-rarfile
8468 (package-with-python2 python-rarfile))
8469
8470 (define-public python-magic
8471 (package
8472 (name "python-magic")
8473 (version "0.4.15")
8474 (source
8475 (origin
8476 (method url-fetch)
8477 (uri (pypi-uri "python-magic" version))
8478 (sha256
8479 (base32
8480 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
8481 (file-name (string-append name "-" version "-checkout"))))
8482 (build-system python-build-system)
8483 (arguments
8484 ;; The tests are unreliable, so don't run them. The tests fail
8485 ;; under Python3 because they were written for Python2 and
8486 ;; contain import statements that do not work in Python3. One of
8487 ;; the tests fails under Python2 because its assertions are
8488 ;; overly stringent; it relies on comparing output strings which
8489 ;; are brittle and can change depending on the version of
8490 ;; libmagic being used and the system on which the test is
8491 ;; running. In my case, under GuixSD 0.10.0, only one test
8492 ;; failed, and it seems to have failed only because the version
8493 ;; of libmagic that is packaged in Guix outputs a slightly
8494 ;; different (but not wrong) string than the one that the test
8495 ;; expected.
8496 '(#:tests? #f
8497 #:phases (modify-phases %standard-phases
8498 ;; Replace a specific method call with a hard-coded
8499 ;; path to the necessary libmagic.so file in the
8500 ;; store. If we don't do this, then the method call
8501 ;; will fail to find the libmagic.so file, which in
8502 ;; turn will cause any application using
8503 ;; python-magic to fail.
8504 (add-before 'build 'hard-code-path-to-libmagic
8505 (lambda* (#:key inputs #:allow-other-keys)
8506 (let ((file (assoc-ref inputs "file")))
8507 (substitute* "magic.py"
8508 (("ctypes.util.find_library\\('magic'\\)")
8509 (string-append "'" file "/lib/libmagic.so'")))
8510 #t)))
8511 (add-before 'install 'disable-egg-compression
8512 (lambda _
8513 (let ((port (open-file "setup.cfg" "a")))
8514 (display "\n[easy_install]\nzip_ok = 0\n"
8515 port)
8516 (close-port port)
8517 #t))))))
8518 (inputs
8519 ;; python-magic needs to be able to find libmagic.so.
8520 `(("file" ,file)))
8521 (home-page
8522 "https://github.com/ahupp/python-magic")
8523 (synopsis
8524 "File type identification using libmagic")
8525 (description
8526 "This module uses ctypes to access the libmagic file type
8527 identification library. It makes use of the local magic database and
8528 supports both textual and MIME-type output. Note that this module and
8529 the python-file module both provide a \"magic.py\" file; these two
8530 modules, which are different and were developed separately, both serve
8531 the same purpose: to provide Python bindings for libmagic.")
8532 (license license:expat)))
8533
8534 (define-public python2-magic
8535 (package-with-python2 python-magic))
8536
8537 (define-public python2-s3cmd
8538 (package
8539 (name "python2-s3cmd")
8540 (version "1.6.1")
8541 (source
8542 (origin
8543 (method url-fetch)
8544 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
8545 "s3cmd-" version ".tar.gz"))
8546 (sha256
8547 (base32
8548 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
8549 (build-system python-build-system)
8550 (arguments
8551 ;; s3cmd is written for python2 only and contains no tests.
8552 `(#:python ,python-2
8553 #:tests? #f))
8554 (propagated-inputs
8555 `(("python2-dateutil" ,python2-dateutil)
8556 ;; The python-file package also provides a magic.py module.
8557 ;; This is an unfortunate state of affairs; however, s3cmd
8558 ;; fails to install if it cannot find specifically the
8559 ;; python-magic package. Thus we include it, instead of using
8560 ;; python-file. Ironically, s3cmd sometimes works better
8561 ;; without libmagic bindings at all:
8562 ;; https://github.com/s3tools/s3cmd/issues/198
8563 ("python2-magic" ,python2-magic)))
8564 (home-page "http://s3tools.org/s3cmd")
8565 (synopsis "Command line tool for S3-compatible storage services")
8566 (description
8567 "S3cmd is a command line tool for uploading, retrieving and managing data
8568 in storage services that are compatible with the Amazon Simple Storage
8569 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
8570 GnuPG encryption, and more. It also supports management of Amazon's
8571 CloudFront content delivery network.")
8572 (license license:gpl2+)))
8573
8574 (define-public python-pkgconfig
8575 (package
8576 (name "python-pkgconfig")
8577 (version "1.3.1")
8578 (source
8579 (origin
8580 (method url-fetch)
8581 (uri (pypi-uri "pkgconfig" version))
8582 (sha256
8583 (base32
8584 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
8585 (build-system python-build-system)
8586 (native-inputs
8587 `(("python-nose" ,python-nose)))
8588 (inputs
8589 `(("pkg-config" ,pkg-config)))
8590 (arguments
8591 `(#:phases
8592 (modify-phases %standard-phases
8593 (add-before 'build 'patch
8594 ;; Hard-code the path to pkg-config.
8595 (lambda _
8596 (substitute* "pkgconfig/pkgconfig.py"
8597 (("cmd = 'pkg-config")
8598 (string-append "cmd = '" (which "pkg-config"))))
8599 #t))
8600 (replace 'check
8601 (lambda _
8602 (invoke "nosetests" "test.py"))))))
8603 (home-page "https://github.com/matze/pkgconfig")
8604 (synopsis "Python interface for pkg-config")
8605 (description "This module provides a Python interface to pkg-config. It
8606 can be used to find all pkg-config packages, check if a package exists,
8607 check if a package meets certain version requirements, query CFLAGS and
8608 LDFLAGS and parse the output to build extensions with setup.py.")
8609 (license license:expat)))
8610
8611 (define-public python2-pkgconfig
8612 (package-with-python2 python-pkgconfig))
8613
8614 (define-public python-bz2file
8615 (package
8616 (name "python-bz2file")
8617 (version "0.98")
8618 (source
8619 (origin
8620 (method url-fetch)
8621 (uri (pypi-uri "bz2file" version))
8622 (sha256
8623 (base32
8624 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
8625 (build-system python-build-system)
8626 (arguments
8627 `(#:tests? #f)) ; Tests use deprecated python modules.
8628 (home-page "https://github.com/nvawda/bz2file")
8629 (synopsis "Read and write bzip2-compressed files")
8630 (description
8631 "Bz2file is a Python library for reading and writing bzip2-compressed
8632 files. It contains a drop-in replacement for the I/O interface in the
8633 standard library's @code{bz2} module, including features from the latest
8634 development version of CPython that are not available in older releases.")
8635 (license license:asl2.0)))
8636
8637 (define-public python2-bz2file
8638 (package-with-python2 python-bz2file))
8639
8640 (define-public python-future
8641 (package
8642 (name "python-future")
8643 (version "0.16.0")
8644 (source
8645 (origin
8646 (method url-fetch)
8647 (uri (pypi-uri "future" version))
8648 (sha256
8649 (base32
8650 "1nzy1k4m9966sikp0qka7lirh8sqrsyainyf8rk97db7nwdfv773"))))
8651 (build-system python-build-system)
8652 ;; Many tests connect to the network or are otherwise flawed.
8653 ;; https://github.com/PythonCharmers/python-future/issues/210
8654 (arguments
8655 `(#:tests? #f))
8656 (home-page "http://python-future.org")
8657 (synopsis "Single-source support for Python 3 and 2")
8658 (description
8659 "@code{python-future} is the missing compatibility layer between Python 2 and
8660 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
8661 to support both Python 2 and Python 3 with minimal overhead.")
8662 (license license:expat)))
8663
8664 (define-public python2-future
8665 (package-with-python2 python-future))
8666
8667 (define-public python-cysignals
8668 (package
8669 (name "python-cysignals")
8670 (version "1.9.0")
8671 (source
8672 (origin
8673 (method url-fetch)
8674 (uri (pypi-uri "cysignals" version))
8675 (sha256
8676 (base32
8677 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
8678 (build-system python-build-system)
8679 (native-inputs
8680 `(("python-cython" ,python-cython)
8681 ("python-sphinx" ,python-sphinx)))
8682 (inputs
8683 `(("pari-gp" ,pari-gp)))
8684 (arguments
8685 `(#:modules ((guix build python-build-system)
8686 ((guix build gnu-build-system) #:prefix gnu:)
8687 (guix build utils))
8688 ;; FIXME: Tests are executed after installation and currently fail
8689 ;; when not installing into standard locations; the author is working
8690 ;; on a fix.
8691 #:tests? #f
8692 #:phases
8693 (modify-phases %standard-phases
8694 (add-before
8695 'build 'configure
8696 (assoc-ref gnu:%standard-phases 'configure)))))
8697 (home-page
8698 "https://github.com/sagemath/cysignals")
8699 (synopsis
8700 "Handling of interrupts and signals for Cython")
8701 (description
8702 "The cysignals package provides mechanisms to handle interrupts (and
8703 other signals and errors) in Cython code, using two related approaches,
8704 for mixed Cython/Python code or external C libraries and pure Cython code,
8705 respectively.")
8706 (license license:lgpl3+)))
8707
8708 (define-public python2-cysignals
8709 (package-with-python2 python-cysignals))
8710
8711 (define-public python2-shedskin
8712 (package
8713 (name "python2-shedskin")
8714 (version "0.9.4")
8715 (source
8716 (origin
8717 (method url-fetch)
8718 (uri (string-append "https://github.com/shedskin/shedskin/"
8719 "releases/download/v" version
8720 "/shedskin-" version ".tgz"))
8721 (sha256
8722 (base32
8723 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
8724 (build-system python-build-system)
8725 (arguments
8726 `(#:python ,python-2
8727 #:phases (modify-phases %standard-phases
8728 (add-after 'unpack 'fix-resulting-include-libs
8729 (lambda* (#:key inputs #:allow-other-keys)
8730 (let ((libgc (assoc-ref inputs "libgc"))
8731 (pcre (assoc-ref inputs "pcre")))
8732 (substitute* "shedskin/makefile.py"
8733 (("variable == 'CCFLAGS':[ ]*")
8734 (string-append "variable == 'CCFLAGS':\n"
8735 " line += ' -I " pcre "/include"
8736 " -I " libgc "/include'"))
8737 (("variable == 'LFLAGS':[ ]*")
8738 (string-append "variable == 'LFLAGS':\n"
8739 " line += ' -L" pcre "/lib"
8740 " -L " libgc "/lib'")))
8741 #t))))))
8742 (inputs `(("pcre" ,pcre)
8743 ("libgc" ,libgc)))
8744 (home-page "https://shedskin.github.io/")
8745 (synopsis "Experimental Python-2 to C++ Compiler")
8746 (description (string-append "This is an experimental compiler for a subset of
8747 Python. It generates C++ code and a Makefile."))
8748 (license (list license:gpl3 license:bsd-3 license:expat))))
8749
8750 (define-public python2-rope
8751 (package
8752 (name "python2-rope")
8753 (version "0.10.3")
8754 (source
8755 (origin
8756 (method url-fetch)
8757 (uri (pypi-uri "rope" version))
8758 (sha256
8759 (base32
8760 "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
8761 (arguments
8762 ;; Rope is currently python-2 only.
8763 ;; https://github.com/python-rope/rope/issues/57
8764 `(#:python ,python-2))
8765 (build-system python-build-system)
8766 (native-inputs
8767 `(("python2-unittest2" ,python2-unittest2)))
8768 (home-page "https://github.com/python-rope/rope")
8769 (synopsis "Refactoring library for Python")
8770 (description "Rope is a refactoring library for Python. It facilitates
8771 the renaming, moving and extracting of attributes, functions, modules, fields
8772 and parameters in Python 2 source code. These refactorings can also be applied
8773 to occurrences in strings and comments.")
8774 (license license:gpl2)))
8775
8776 (define-public python-py3status
8777 (package
8778 (name "python-py3status")
8779 (version "3.7")
8780 (source
8781 (origin
8782 (method url-fetch)
8783 (uri (pypi-uri "py3status" version))
8784 (sha256
8785 (base32
8786 "0shxcfz4wcczj0mhwp4w0dvwd2fdd9bgprq8slim1519iiqzgwhq"))))
8787 (build-system python-build-system)
8788 (inputs
8789 `(("file" ,file)))
8790 (arguments
8791 '(#:phases
8792 (modify-phases %standard-phases
8793 ;; 'file' is used for detection of configuration file encoding
8794 ;; let's make link the dependency to particular input
8795 (add-before 'build 'patch-file-path
8796 (lambda* (#:key inputs #:allow-other-keys)
8797 (let ((file-path (assoc-ref inputs "file")))
8798 (substitute* "py3status/parse_config.py"
8799 (("\\['file', '-b'")
8800 (string-append "['" file-path "/bin/file', '-b'")))
8801 #t))))
8802 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
8803 (home-page "https://github.com/ultrabug/py3status")
8804 (synopsis "Extensible i3status wrapper written in Python")
8805 (description "py3status is an i3status wrapper which extends i3status
8806 functionality in a modular way, allowing you to extend your panel with your
8807 own code, responding to click events and updating clock every second.")
8808 (license license:bsd-3)))
8809
8810 (define-public python-tblib
8811 (package
8812 (name "python-tblib")
8813 (version "1.3.2")
8814 (source (origin
8815 (method url-fetch)
8816 (uri (pypi-uri "tblib" version))
8817 (sha256 (base32
8818 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
8819 (build-system python-build-system)
8820 (arguments
8821 `(#:phases
8822 (modify-phases %standard-phases
8823 (add-before 'check 'adjust-tests
8824 (lambda _
8825 (when (which "python3")
8826 ;; Adjust the example output to match that of Python 3.7:
8827 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
8828 (substitute* "README.rst"
8829 (("Exception\\('fail',") "Exception('fail'"))
8830 #t)))
8831 (replace 'check
8832 (lambda _
8833 ;; Upstream runs tests after installation and the package itself
8834 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
8835 ;; found.
8836 (setenv "PYTHONPATH"
8837 (string-append (getcwd) "/build/lib:"
8838 (getenv "PYTHONPATH")))
8839 (invoke "py.test" "-vv" "tests" "README.rst"))))))
8840 (native-inputs
8841 `(("python-pytest" ,python-pytest)
8842 ("python-six" ,python-six)))
8843 (home-page "https://github.com/ionelmc/python-tblib")
8844 (synopsis "Traceback serialization library")
8845 (description
8846 "Traceback serialization allows you to:
8847
8848 @enumerate
8849 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
8850 different processes. This allows better error handling when running code over
8851 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
8852
8853 @item Parse traceback strings and raise with the parsed tracebacks.
8854 @end enumerate\n")
8855 (license license:bsd-3)))
8856
8857 (define-public python2-tblib
8858 (package-with-python2 python-tblib))
8859
8860 (define-public python-greenlet
8861 (package
8862 (name "python-greenlet")
8863 (version "0.4.15")
8864 (source (origin
8865 (method url-fetch)
8866 (uri (pypi-uri "greenlet" version))
8867 (sha256
8868 (base32
8869 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
8870 (build-system python-build-system)
8871 (home-page "https://greenlet.readthedocs.io/")
8872 (synopsis "Lightweight in-process concurrent programming")
8873 (description
8874 "Greenlet package is a spin-off of Stackless, a version of CPython
8875 that supports micro-threads called \"tasklets\". Tasklets run
8876 pseudo-concurrently (typically in a single or a few OS-level threads) and
8877 are synchronized with data exchanges on \"channels\".")
8878 (license (list license:psfl license:expat))))
8879
8880 (define-public python2-greenlet
8881 (package-with-python2 python-greenlet))
8882
8883 (define-public python-objgraph
8884 (package
8885 (name "python-objgraph")
8886 (version "3.4.0")
8887 (source
8888 (origin
8889 (method url-fetch)
8890 (uri (pypi-uri "objgraph" version))
8891 (sha256
8892 (base32
8893 "184m09am5gpbqfaiy7l0hwh476mczbrly1dffs0rw2p1d1i2q32a"))))
8894 (build-system python-build-system)
8895 (propagated-inputs
8896 `(("python-graphviz" ,python-graphviz)))
8897 (native-inputs
8898 `(("python-mock" ,python-mock)
8899 ("graphviz" ,graphviz)))
8900 (home-page "https://mg.pov.lt/objgraph/")
8901 (synopsis "Draw Python object reference graphs with graphviz")
8902 (description
8903 "This package provides tools to draw Python object reference graphs with
8904 graphviz.")
8905 (license license:expat)))
8906
8907 (define-public python-gevent
8908 (package
8909 (name "python-gevent")
8910 (version "1.3.7")
8911 (source (origin
8912 (method url-fetch)
8913 (uri (pypi-uri "gevent" version))
8914 (sha256
8915 (base32
8916 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
8917 (modules '((guix build utils)))
8918 (snippet
8919 '(begin
8920 ;; unbunding libev and c-ares
8921 (delete-file-recursively "deps")
8922 #t))))
8923 (build-system python-build-system)
8924 (arguments
8925 `(#:modules ((ice-9 ftw)
8926 (ice-9 match)
8927 (srfi srfi-26)
8928 (guix build utils)
8929 (guix build python-build-system))
8930 #:phases (modify-phases %standard-phases
8931 (add-after 'unpack 'unpack-libev
8932 (lambda* (#:key inputs #:allow-other-keys)
8933 (mkdir-p "deps/libev")
8934 ;; FIXME: gevent requires building libev, even though
8935 ;; it only links against the proper one.
8936 (invoke "tar" "-xf" (assoc-ref inputs "libev-source")
8937 "--strip-components=1" "-C" "deps/libev")))
8938 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
8939 (lambda _
8940 (substitute* "src/gevent/subprocess.py"
8941 (("/bin/sh") (which "sh")))
8942 (for-each (lambda (file)
8943 (substitute* file
8944 (("/bin/sh") (which "sh"))
8945 (("/bin/true") (which "true"))))
8946 (find-files "src/greentest" "\\.py$"))
8947 #t))
8948 (add-before 'build 'do-not-use-bundled-sources
8949 (lambda* (#:key inputs #:allow-other-keys)
8950 (setenv "CONFIG_SHELL" (which "bash"))
8951 (setenv "LIBEV_EMBED" "false")
8952 (setenv "CARES_EMBED" "false")
8953 (setenv "EMBED" "false")
8954
8955 (let ((greenlet (string-append
8956 (assoc-ref inputs "python-greenlet")
8957 "/include")))
8958 (match (scandir greenlet
8959 (lambda (item)
8960 (string-prefix? "python" item)))
8961 ((python)
8962 (setenv "CPATH"
8963 (string-append greenlet "/" python)))))
8964 #t))
8965 (add-before 'check 'skip-timer-test
8966 (lambda _
8967 ;; XXX: Skip 'TestTimerResolution', which appears to be
8968 ;; unreliable.
8969 (substitute* "src/greentest/test__core_timer.py"
8970 (("not greentest.RUNNING_ON_CI") "False"))
8971 #t))
8972 (replace 'check
8973 (lambda _
8974 ;; Make sure the build directory is on PYTHONPATH.
8975 (setenv "PYTHONPATH"
8976 (string-append
8977 (getenv "PYTHONPATH") ":"
8978 (getcwd) "/build/"
8979 (car (scandir "build" (cut string-prefix? "lib." <>)))))
8980 (with-directory-excursion "src/greentest"
8981 ;; XXX: Many tests require network access. Instead we only
8982 ;; run known-good tests. Unfortunately we cannot use
8983 ;; recursion here since this directory also contains
8984 ;; Python-version-specific subfolders.
8985 (apply invoke "python" "testrunner.py" "--config"
8986 "known_failures.py"
8987 (scandir "." (cut regexp-exec
8988 (make-regexp "test_+(subprocess|core)")
8989 <>)))))))))
8990 (propagated-inputs
8991 `(("python-greenlet" ,python-greenlet)
8992 ("python-objgraph" ,python-objgraph)))
8993 (native-inputs
8994 `(("libev-source" ,(package-source libev))
8995 ("python-six" ,python-six)))
8996 (inputs
8997 `(("c-ares" ,c-ares)
8998 ("libev" ,libev)))
8999 (home-page "http://www.gevent.org/")
9000 (synopsis "Coroutine-based network library")
9001 (description
9002 "gevent is a coroutine-based Python networking library that uses greenlet
9003 to provide a high-level synchronous API on top of the libev event loop.")
9004 (license license:expat)
9005 (properties `((python2-variant . ,(delay python2-gevent))))))
9006
9007 (define-public python2-gevent
9008 (let ((base (package-with-python2
9009 (strip-python2-variant python-gevent))))
9010 (package
9011 (inherit base)
9012 (native-inputs `(,@(package-native-inputs python-gevent)
9013 ("python-mock" ,python2-mock))))))
9014
9015 (define-public python-fastimport
9016 (package
9017 (name "python-fastimport")
9018 (version "0.9.6")
9019 (source
9020 (origin
9021 (method url-fetch)
9022 (uri (pypi-uri "fastimport" version))
9023 (sha256
9024 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
9025 (build-system python-build-system)
9026 (home-page "https://github.com/jelmer/python-fastimport")
9027 (synopsis "VCS fastimport parser and generator in Python")
9028 (description "This package provides a parser for and generator of the Git
9029 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
9030 format.")
9031 (license license:gpl2+)))
9032
9033 (define-public python2-fastimport
9034 (package-with-python2 python-fastimport))
9035
9036 (define-public python-twisted
9037 (package
9038 (name "python-twisted")
9039 (version "17.1.0")
9040 (source (origin
9041 (method url-fetch)
9042 (uri (pypi-uri "Twisted" version ".tar.bz2"))
9043 (sha256
9044 (base32
9045 "1p245mg15hkxp7hy5cyq2fgvlgjkb4cg0gwkwd148nzy1bbi3wnv"))))
9046 (build-system python-build-system)
9047 (arguments
9048 '(#:tests? #f)) ; FIXME: Some tests are failing.
9049 ;; #:phases
9050 ;; (modify-phases %standard-phases
9051 ;; (replace 'check
9052 ;; (lambda _
9053 ;; (zero? (system* "./bin/trial" "twisted")))))
9054 (propagated-inputs
9055 `(("python-zope-interface" ,python-zope-interface)
9056 ("python-incremental" ,python-incremental)
9057 ("python-constantly" ,python-constantly)
9058 ("python-automat" ,python-automat)))
9059 (home-page "https://twistedmatrix.com/")
9060 (synopsis "Asynchronous networking framework written in Python")
9061 (description
9062 "Twisted is an extensible framework for Python programming, with special
9063 focus on event-based network programming and multiprotocol integration.")
9064 (license license:expat)))
9065
9066 (define-public python2-twisted
9067 (package-with-python2 python-twisted))
9068
9069 (define-public python-pika
9070 (package
9071 (name "python-pika")
9072 (version "0.12.0")
9073 (source
9074 (origin
9075 (method url-fetch)
9076 (uri (pypi-uri "pika" version))
9077 (sha256
9078 (base32
9079 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
9080 (build-system python-build-system)
9081 (native-inputs
9082 `(("python-pyev" ,python-pyev)
9083 ("python-tornado" ,python-tornado)
9084 ("python-twisted" ,python-twisted)))
9085 (home-page "https://pika.readthedocs.org")
9086 (synopsis "Pure Python AMQP Client Library")
9087 (description
9088 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
9089 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
9090 network support library.")
9091 (license license:bsd-3)))
9092
9093 (define-public python2-pika
9094 (package-with-python2 python-pika))
9095
9096 (define-public python-ply
9097 (package
9098 (name "python-ply")
9099 (version "3.10")
9100 (source
9101 (origin
9102 (method url-fetch)
9103 (uri (pypi-uri "ply" version))
9104 (sha256
9105 (base32
9106 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
9107 (build-system python-build-system)
9108 (home-page "http://www.dabeaz.com/ply/")
9109 (synopsis "Python Lex & Yacc")
9110 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
9111 It uses LR parsing and does extensive error checking.")
9112 (license license:bsd-3)))
9113
9114 (define-public python2-ply
9115 (package-with-python2 python-ply))
9116
9117 (define-public python-tabulate
9118 (package
9119 (name "python-tabulate")
9120 (version "0.7.7")
9121 (source (origin
9122 (method url-fetch)
9123 (uri (pypi-uri "tabulate" version))
9124 (sha256
9125 (base32
9126 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
9127 (build-system python-build-system)
9128 (arguments
9129 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
9130 ;; and the latest release is not tagged in the upstream repository.
9131 '(#:tests? #f))
9132 (home-page "https://bitbucket.org/astanin/python-tabulate")
9133 (synopsis "Pretty-print tabular data")
9134 (description
9135 "Tabulate is a library and command-line utility to pretty-print tabular
9136 data in Python.")
9137 (license license:expat)))
9138
9139 (define-public python2-tabulate
9140 (package-with-python2 python-tabulate))
9141
9142 (define-public python-kazoo
9143 (package
9144 (name "python-kazoo")
9145 (version "2.4.0")
9146 (source
9147 (origin
9148 (method url-fetch)
9149 (uri (pypi-uri "kazoo" version))
9150 (sha256
9151 (base32
9152 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
9153 (build-system python-build-system)
9154 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
9155 (propagated-inputs
9156 `(("python-six" ,python-six)))
9157 (home-page "https://kazoo.readthedocs.org")
9158 (synopsis "High-level Zookeeper client library")
9159 (description
9160 "Kazoo is a Python client library for the Apache Zookeeper distributed
9161 application service. It is designed to be easy to use and to avoid common
9162 programming errors.")
9163 (license license:asl2.0)))
9164
9165 (define-public python2-kazoo
9166 (package-with-python2 python-kazoo))
9167
9168 (define-public python-pykafka
9169 (package
9170 (name "python-pykafka")
9171 (version "2.4.0")
9172 (source (origin
9173 (method url-fetch)
9174 (uri (pypi-uri "pykafka" version))
9175 (sha256
9176 (base32
9177 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
9178 (build-system python-build-system)
9179 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
9180 (propagated-inputs
9181 `(("python-gevent" ,python-gevent)
9182 ("python-kazoo" ,python-kazoo)
9183 ("python-tabulate" ,python-tabulate)))
9184 (inputs
9185 `(("librdkafka" ,librdkafka)))
9186 (home-page "https://pykafka.readthedocs.io/")
9187 (synopsis "Apache Kafka client for Python")
9188 (description
9189 "PyKafka is a client for the Apache Kafka distributed messaging system.
9190 It includes Python implementations of Kafka producers and consumers, which
9191 are optionally backed by a C extension built on librdkafka.")
9192 (license license:asl2.0)))
9193
9194 (define-public python2-pykafka
9195 (package-with-python2 python-pykafka))
9196
9197 (define-public python-wcwidth
9198 (package
9199 (name "python-wcwidth")
9200 (version "0.1.7")
9201 (source
9202 (origin
9203 (method url-fetch)
9204 (uri (pypi-uri "wcwidth" version))
9205 (sha256
9206 (base32
9207 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
9208 (build-system python-build-system)
9209 (home-page "https://github.com/jquast/wcwidth")
9210 (synopsis "Measure number of terminal column cells of wide-character codes")
9211 (description "Wcwidth measures the number of terminal column cells of
9212 wide-character codes. It is useful for those implementing a terminal emulator,
9213 or programs that carefully produce output to be interpreted by one. It is a
9214 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
9215 specified in POSIX.1-2001 and POSIX.1-2008.")
9216 (license license:expat)))
9217
9218 (define-public python2-wcwidth
9219 (package-with-python2 python-wcwidth))
9220
9221 (define-public python2-jsonrpclib
9222 (package
9223 (name "python2-jsonrpclib")
9224 (version "0.1.7")
9225 (source (origin
9226 (method url-fetch)
9227 (uri (pypi-uri "jsonrpclib" version))
9228 (sha256
9229 (base32
9230 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
9231 (build-system python-build-system)
9232 (arguments
9233 `(#:tests? #f
9234 #:python ,python-2))
9235 (home-page "https://github.com/joshmarshall/jsonrpclib/")
9236 (synopsis "Implementation of JSON-RPC specification for Python")
9237 (description
9238 "This library is an implementation of the JSON-RPC specification.
9239 It supports both the original 1.0 specification, as well as the
9240 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
9241 etc.")
9242 (license license:asl2.0)))
9243
9244 (define-public python-chai
9245 (package
9246 (name "python-chai")
9247 (version "1.1.2")
9248 (source (origin
9249 (method url-fetch)
9250 (uri (pypi-uri "chai" version))
9251 (sha256
9252 (base32
9253 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
9254 (build-system python-build-system)
9255 (home-page "https://github.com/agoragames/chai")
9256 (synopsis "Mocking framework for Python")
9257 (description
9258 "Chai provides an api for mocking, stubbing and spying your python
9259 objects, patterned after the Mocha library for Ruby.")
9260 (license license:bsd-3)))
9261
9262 (define-public python2-chai
9263 (package-with-python2 python-chai))
9264
9265 (define-public python-inflection
9266 (package
9267 (name "python-inflection")
9268 (version "0.3.1")
9269 (source
9270 (origin (method url-fetch)
9271 (uri (pypi-uri "inflection" version))
9272 (sha256
9273 (base32
9274 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
9275 (build-system python-build-system)
9276 (native-inputs
9277 `(("python-pytest" ,python-pytest)))
9278 (home-page "https://github.com/jpvanhal/inflection")
9279 (synopsis "Python string transformation library")
9280 (description
9281 "Inflection is a string transformation library. It singularizes
9282 and pluralizes English words, and transforms strings from CamelCase to
9283 underscored string.")
9284 (license license:expat)))
9285
9286 (define-public python2-inflection
9287 (package-with-python2 python-inflection))
9288
9289 (define-public python-pylev
9290 (package
9291 (name "python-pylev")
9292 (version "1.3.0")
9293 (source (origin
9294 (method url-fetch)
9295 (uri (pypi-uri "pylev" version))
9296 (sha256
9297 (base32
9298 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
9299 (build-system python-build-system)
9300 (home-page "https://github.com/toastdriven/pylev")
9301 (synopsis "Levenshtein distance implementation in Python")
9302 (description "Pure Python Levenshtein implementation, based off the
9303 Wikipedia code samples at
9304 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
9305 (license license:bsd-3)))
9306
9307 (define-public python2-pylev
9308 (package-with-python2 python-pylev))
9309
9310 (define-public python-cleo
9311 (package
9312 (name "python-cleo")
9313 (version "0.6.1")
9314 (source (origin
9315 (method url-fetch)
9316 (uri (pypi-uri "cleo" version))
9317 (sha256
9318 (base32
9319 "0q1cf0szr0d54am4pypzwdnm74zpladdsinad94c2fz5i06fdpf7"))))
9320 (build-system python-build-system)
9321 (native-inputs
9322 `(;; For testing
9323 ("python-mock" ,python-mock)
9324 ("python-pytest-mock" ,python-pytest-mock)
9325 ("python-pytest" ,python-pytest)))
9326 (propagated-inputs
9327 `(("python-backpack" ,python-backpack)
9328 ("python-pastel" ,python-pastel)
9329 ("python-pylev" ,python-pylev)))
9330 (home-page "https://github.com/sdispater/cleo")
9331 (synopsis "Command-line arguments library for Python")
9332 (description
9333 "Cleo allows you to create command-line commands with signature in
9334 docstring and colored output.")
9335 (license license:expat)))
9336
9337 (define-public python2-cleo
9338 (package-with-python2 python-cleo))
9339
9340 (define-public python-lazy-object-proxy
9341 (package
9342 (name "python-lazy-object-proxy")
9343 (version "1.3.1")
9344 (source (origin
9345 (method url-fetch)
9346 (uri (pypi-uri "lazy-object-proxy" version))
9347 (sha256
9348 (base32
9349 "0yha7q9bhw857fwaby785d63mffhngl9npwzlk9i0pwlkwvbx4gb"))))
9350 (build-system python-build-system)
9351 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
9352 (synopsis "Lazy object proxy for python")
9353 (description
9354 "Lazy object proxy is an object that wraps a callable but defers the call
9355 until the object is actually required, and caches the result of said call.")
9356 (license license:bsd-2)))
9357
9358 (define-public python2-lazy-object-proxy
9359 (package-with-python2 python-lazy-object-proxy))
9360
9361 (define-public python-dnspython
9362 (package
9363 (name "python-dnspython")
9364 (version "1.15.0")
9365 (source (origin
9366 (method url-fetch)
9367 (uri (string-append "http://www.dnspython.org/kits/"
9368 version "/dnspython-" version ".tar.gz"))
9369 (sha256
9370 (base32
9371 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
9372 (build-system python-build-system)
9373 (arguments '(#:tests? #f)) ; XXX: requires internet access
9374 (home-page "http://www.dnspython.org")
9375 (synopsis "DNS toolkit for Python")
9376 (description
9377 "dnspython is a DNS toolkit for Python. It supports almost all record
9378 types. It can be used for queries, zone transfers, and dynamic updates.
9379 It supports TSIG authenticated messages and EDNS0.")
9380 (license license:expat)))
9381
9382 (define-public python2-dnspython
9383 (package-with-python2 python-dnspython))
9384
9385 (define-public python-email-validator
9386 (package
9387 (name "python-email-validator")
9388 (version "1.0.2")
9389 (source
9390 (origin (method url-fetch)
9391 (uri (pypi-uri "email_validator" version))
9392 (sha256
9393 (base32
9394 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
9395 (build-system python-build-system)
9396 (arguments
9397 '(#:phases
9398 (modify-phases %standard-phases
9399 (add-before 'build 'use-dnspython
9400 (lambda _
9401 (substitute* "setup.py"
9402 (("dnspython3") "dnspython"))
9403 #t)))))
9404 (propagated-inputs
9405 `(("python-dnspython" ,python-dnspython)
9406 ("python-idna" ,python-idna)))
9407 (home-page "https://github.com/JoshData/python-email-validator")
9408 (synopsis "Email address validation library for Python")
9409 (description
9410 "This library validates email address syntax and deliverability.")
9411 (license license:cc0)))
9412
9413 (define-public python2-email-validator
9414 (package-with-python2 python-email-validator))
9415
9416 (define-public python-ukpostcodeparser
9417 (package
9418 (name "python-ukpostcodeparser")
9419 (version "1.0.3")
9420 (source (origin
9421 (method url-fetch)
9422 (uri (pypi-uri "UkPostcodeParser" version))
9423 (sha256
9424 (base32
9425 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
9426 (build-system python-build-system)
9427 (home-page "https://github.com/hamstah/ukpostcodeparser")
9428 (synopsis "UK Postcode parser for Python")
9429 (description
9430 "This library provides the @code{parse_uk_postcode} function for
9431 parsing UK postcodes.")
9432 (license license:expat)))
9433
9434 (define-public python2-ukpostcodeparser
9435 (package-with-python2 python-ukpostcodeparser))
9436
9437 (define-public python-faker
9438 (package
9439 (name "python-faker")
9440 (version "0.7.9")
9441 (source (origin
9442 (method url-fetch)
9443 (uri (pypi-uri "Faker" version))
9444 (sha256
9445 (base32
9446 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
9447 (patches
9448 (search-patches "python-faker-fix-build-32bit.patch"))
9449 (modules '((guix build utils)))
9450 (snippet
9451 '(begin
9452 (for-each delete-file (find-files "." "\\.pyc$"))
9453 #t))))
9454 (build-system python-build-system)
9455 (arguments
9456 '(#:phases
9457 (modify-phases %standard-phases
9458 (replace 'check
9459 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
9460 (native-inputs
9461 `(;; For testing
9462 ("python-email-validator" ,python-email-validator)
9463 ("python-mock" ,python-mock)
9464 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
9465 (propagated-inputs
9466 `(("python-dateutil" ,python-dateutil)
9467 ("python-six" ,python-six)))
9468 (home-page "https://github.com/joke2k/faker")
9469 (synopsis "Python package that generates fake data")
9470 (description
9471 "Faker is a Python package that generates fake data such as names,
9472 addresses, and phone numbers.")
9473 (license license:expat)
9474 (properties `((python2-variant . ,(delay python2-faker))))))
9475
9476 (define-public python2-faker
9477 (let ((base (package-with-python2 (strip-python2-variant
9478 python-faker))))
9479 (package
9480 (inherit base)
9481 (propagated-inputs
9482 `(("python2-ipaddress" ,python2-ipaddress)
9483 ,@(package-propagated-inputs base))))))
9484
9485 (define-public python-pyaml
9486 (package
9487 (name "python-pyaml")
9488 (version "18.11.0")
9489 (source (origin
9490 (method url-fetch)
9491 (uri (pypi-uri "pyaml" version))
9492 (sha256
9493 (base32
9494 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
9495 (build-system python-build-system)
9496 (native-inputs
9497 `(("python-unidecode" ,python-unidecode)))
9498 (propagated-inputs
9499 `(("python-pyyaml" ,python-pyyaml)))
9500 (home-page "https://github.com/mk-fg/pretty-yaml")
9501 (synopsis "YAML pretty-print library for Python")
9502 (description
9503 "pyaml is a PyYAML based python module to produce pretty and readable
9504 YAML-serialized data.")
9505 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
9506
9507 (define-public python2-pyaml
9508 (package-with-python2 python-pyaml))
9509
9510 (define-public python-backpack
9511 (package
9512 (name "python-backpack")
9513 (version "0.1")
9514 (source
9515 (origin
9516 (method url-fetch)
9517 (uri (pypi-uri "backpack" version))
9518 (sha256
9519 (base32
9520 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
9521 (build-system python-build-system)
9522 (native-inputs
9523 `(("python-pytest" ,python-pytest)
9524 ("python-nose" ,python-nose)))
9525 (propagated-inputs
9526 `(("python-simplejson" ,python-simplejson)))
9527 (home-page "https://github.com/sdispater/backpack")
9528 (synopsis "Utilities for working with Python collections")
9529 (description "Backpack provides some useful utilities for working with
9530 collections of data.")
9531 (license license:expat)))
9532
9533 (define-public python2-backpack
9534 (package-with-python2 python-backpack))
9535
9536 (define-public python-prompt-toolkit
9537 (package
9538 (name "python-prompt-toolkit")
9539 (version "2.0.7")
9540 (source
9541 (origin
9542 (method url-fetch)
9543 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
9544 (sha256
9545 (base32
9546 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
9547 (build-system python-build-system)
9548 (arguments
9549 `(#:phases
9550 (modify-phases %standard-phases
9551 (delete 'check)
9552 (add-after 'install 'post-install-check
9553 (lambda* (#:key inputs outputs #:allow-other-keys)
9554 ;; HOME is needed for the test
9555 ;; "test_pathcompleter_can_expanduser".
9556 (setenv "HOME" "/tmp")
9557 (add-installed-pythonpath inputs outputs)
9558 (invoke "py.test"))))))
9559 (propagated-inputs
9560 `(("python-wcwidth" ,python-wcwidth)
9561 ("python-six" ,python-six)
9562 ("python-pygments" ,python-pygments)))
9563 (native-inputs
9564 `(("python-pytest" ,python-pytest)))
9565 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
9566 (synopsis "Library for building command line interfaces in Python")
9567 (description
9568 "Prompt-Toolkit is a library for building interactive command line
9569 interfaces in Python. It's like GNU Readline but it also features syntax
9570 highlighting while typing, out-of-the-box multi-line input editing, advanced
9571 code completion, incremental search, support for Chinese double-width
9572 characters, mouse support, and auto suggestions.")
9573 (license license:bsd-3)))
9574
9575 (define-public python2-prompt-toolkit
9576 (package-with-python2 python-prompt-toolkit))
9577
9578 (define-public python-prompt-toolkit-1
9579 (package (inherit python-prompt-toolkit)
9580 (version "1.0.15")
9581 (source
9582 (origin
9583 (method url-fetch)
9584 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
9585 (sha256
9586 (base32
9587 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
9588
9589 (define-public python2-prompt-toolkit-1
9590 (package-with-python2 python-prompt-toolkit-1))
9591
9592 (define-public python-jedi
9593 (package
9594 (name "python-jedi")
9595 (version "0.13.2")
9596 (source
9597 (origin
9598 (method url-fetch)
9599 (uri (pypi-uri "jedi" version))
9600 (sha256
9601 (base32
9602 "1za944msp0f8x36qa8l309jhv0kzlsdh7r9nj3z12y8npnsh45sp"))))
9603 (build-system python-build-system)
9604 (arguments
9605 `( ;; Many tests are failing with Python 3.7.x as of version 0.13.2 (see:
9606 ;; https://github.com/davidhalter/jedi/issues/1263)
9607 #:tests? #f
9608 #:phases
9609 (modify-phases %standard-phases
9610 (replace 'check
9611 (lambda* (#:key tests? #:allow-other-keys)
9612 (when tests?
9613 (invoke "py.test" "-vv")))))))
9614 (native-inputs
9615 `(("python-pytest" ,python-pytest)
9616 ("python-docopt" ,python-docopt)))
9617 (propagated-inputs
9618 `(("python-parso" ,python-parso)))
9619 (home-page "https://github.com/davidhalter/jedi")
9620 (synopsis "Autocompletion and static analysis library for Python")
9621 (description
9622 "Jedi is a static analysis tool for Python that can be used in Integrated
9623 Development Environments (@dfn{IDE}s) and text editors. It understands Python
9624 on a deeper level than many other static analysis frameworks for Python.
9625
9626 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
9627 well.")
9628 (license license:expat)))
9629
9630 (define-public python2-jedi
9631 (package-with-python2 python-jedi))
9632
9633 (define-public ptpython
9634 (package
9635 (name "ptpython")
9636 (version "0.34")
9637 (source (origin
9638 (method url-fetch)
9639 (uri (pypi-uri "ptpython" version))
9640 (sha256
9641 (base32
9642 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
9643 (build-system python-build-system)
9644 (arguments
9645 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
9646 (propagated-inputs
9647 `(("python-docopt" ,python-docopt)
9648 ("python-jedi" ,python-jedi)
9649 ("python-prompt-toolkit" ,python-prompt-toolkit)
9650 ("python-pygments" ,python-pygments)))
9651 (home-page "https://github.com/jonathanslenders/ptpython")
9652 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
9653 (description
9654 "ptpython is a Python read-eval-print loop with IDE-like features.
9655 It supports syntax highlighting, multiline editing, autocompletion, mouse,
9656 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
9657 etc.")
9658 (license license:bsd-3)
9659 (properties `((python2-variant . ,(delay ptpython-2))))))
9660
9661 (define-public ptpython-2
9662 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
9663 (package
9664 (inherit base)
9665 (name "ptpython2"))))
9666
9667 (define-public python-stem
9668 (package
9669 (name "python-stem")
9670 (version "1.7.0")
9671 (source
9672 (origin
9673 (method url-fetch)
9674 (uri (pypi-uri "stem" version))
9675 (sha256
9676 (base32
9677 "1awiglfiajnx2hva9aqpj3fmdvdb4qg7cwnlfyih827m68y3cq8v"))))
9678 (build-system python-build-system)
9679 (arguments
9680 `(#:phases
9681 (modify-phases %standard-phases
9682 (replace 'check
9683 (lambda _
9684 (invoke "./run_tests.py" "--unit")
9685 #t)))))
9686 (native-inputs
9687 `(("python-mock" ,python-mock)
9688 ("python-pycodestyle" ,python-pycodestyle)
9689 ("python-pyflakes" ,python-pyflakes)))
9690 (home-page "https://stem.torproject.org/")
9691 (synopsis
9692 "Python controller library that allows applications to interact with Tor")
9693 (description
9694 "Stem is a Python controller library for Tor. With it you can use Tor's
9695 control protocol to script against the Tor process and read descriptor data
9696 relays publish about themselves.")
9697 (license license:lgpl3)))
9698
9699 (define-public python2-stem
9700 (package-with-python2 python-stem))
9701
9702 (define-public python-pyserial
9703 (package
9704 (name "python-pyserial")
9705 (version "3.1.1")
9706 (source
9707 (origin
9708 (method url-fetch)
9709 (uri (pypi-uri "pyserial" version))
9710 (sha256
9711 (base32
9712 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
9713 (build-system python-build-system)
9714 (arguments
9715 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
9716 ;; #:phases
9717 ;; (modify-phases %standard-phases
9718 ;; (replace 'check
9719 ;; (lambda _
9720 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
9721 (home-page
9722 "https://github.com/pyserial/pyserial")
9723 (synopsis "Python Serial Port Bindings")
9724 (description "@code{pyserial} provide serial port bindings for Python. It
9725 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
9726 and/or Xon/Xoff. The port is accessed in RAW mode.")
9727 (license license:bsd-3)))
9728
9729 (define-public python2-pyserial
9730 (package-with-python2 python-pyserial))
9731
9732 (define-public python-kivy
9733 (package
9734 (name "python-kivy")
9735 (version "1.10.1")
9736 (source
9737 (origin
9738 (method url-fetch)
9739 (uri (pypi-uri "Kivy" version))
9740 (file-name (string-append name "-" version ".tar.gz"))
9741 (sha256
9742 (base32
9743 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
9744 (build-system python-build-system)
9745 (arguments
9746 `(#:tests? #f ; Tests require many optional packages
9747 #:phases
9748 (modify-phases %standard-phases
9749 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
9750 (lambda* (#:key inputs #:allow-other-keys)
9751 (setenv "KIVY_SDL2_PATH"
9752 (string-append (assoc-ref inputs "sdl-union")
9753 "/include/SDL2"))
9754 #t)))))
9755 (native-inputs
9756 `(("git" ,git)
9757 ("pkg-config" ,pkg-config)
9758 ("python-cython" ,python-cython)))
9759 (inputs
9760 `(("gstreamer" ,gstreamer)
9761 ("mesa" ,mesa)
9762 ("sdl-union"
9763 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
9764 (home-page "http://kivy.org")
9765 (synopsis
9766 "Multitouch application framework")
9767 (description
9768 "A software library for rapid development of
9769 hardware-accelerated multitouch applications.")
9770 (license license:expat)))
9771
9772 (define-public python2-kivy
9773 (package-with-python2 python-kivy))
9774
9775 (define-public python-kivy-next
9776 (deprecated-package "python-kivy-next" python-kivy))
9777
9778 (define-public python2-kivy-next
9779 (deprecated-package "python2-kivy-next" python2-kivy))
9780
9781 (define-public python-binaryornot
9782 (package
9783 (name "python-binaryornot")
9784 (version "0.4.4")
9785 (source (origin
9786 (method url-fetch)
9787 (uri (pypi-uri "binaryornot" version))
9788 (sha256
9789 (base32
9790 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
9791 (build-system python-build-system)
9792 (propagated-inputs
9793 `(("python-chardet" ,python-chardet)
9794 ("python-hypothesis" ,python-hypothesis)))
9795 (home-page "https://github.com/audreyr/binaryornot")
9796 (synopsis "Package to check if a file is binary or text")
9797 (description "Ultra-lightweight pure Python package to check if a file is
9798 binary or text.")
9799 (license license:bsd-3)
9800 (properties `((python2-variant . ,(delay python2-binaryornot))))))
9801
9802 (define-public python2-binaryornot
9803 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
9804 (package (inherit base)
9805 (propagated-inputs
9806 `(("python2-enum34" ,python2-enum34)
9807 ,@(package-propagated-inputs base))))))
9808
9809 (define-public python-nltk
9810 (package
9811 (name "python-nltk")
9812 (version "3.2.1")
9813 (source (origin
9814 (method url-fetch)
9815 (uri (pypi-uri "nltk" version))
9816 (sha256
9817 (base32
9818 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
9819 (build-system python-build-system)
9820 (arguments
9821 '(;; The tests require some extra resources to be downloaded.
9822 ;; TODO Try packaging these resources.
9823 #:tests? #f))
9824 (home-page "http://nltk.org/")
9825 (synopsis "Natural Language Toolkit")
9826 (description "It provides interfaces to over 50 corpora and lexical
9827 resources such as WordNet, along with a suite of text processing libraries
9828 for classification, tokenization, stemming, tagging, parsing, and semantic
9829 reasoning, wrappers for natural language processing libraries.")
9830 (license license:asl2.0)))
9831
9832 (define-public python2-nltk
9833 (package-with-python2 python-nltk))
9834
9835 (define-public python-pymongo
9836 (package
9837 (name "python-pymongo")
9838 (version "3.7.2")
9839 (source (origin
9840 (method url-fetch)
9841 (uri (pypi-uri "pymongo" version))
9842 (sha256
9843 (base32
9844 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
9845 (build-system python-build-system)
9846 (propagated-inputs
9847 `(("python-certifi" ,python-certifi)))
9848 (home-page "https://github.com/mongodb/mongo-python-driver")
9849 (synopsis "Python driver for MongoDB")
9850 (description "Python driver for MongoDB.")
9851 (license license:asl2.0)))
9852
9853 (define-public python2-pymongo
9854 (package-with-python2 python-pymongo))
9855
9856 (define-public python-consul
9857 (package
9858 (name "python-consul")
9859 (version "0.6.1")
9860 (source
9861 (origin
9862 (method url-fetch)
9863 (uri (pypi-uri "python-consul" version))
9864 (sha256
9865 (base32
9866 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
9867 (build-system python-build-system)
9868 (arguments
9869 '(#:tests? #f)) ; The tests are not distributed
9870 (propagated-inputs
9871 `(("python-requests" ,python-requests)
9872 ("python-six" ,python-six)))
9873 (home-page "https://github.com/cablehead/python-consul")
9874 (synopsis "Python client for Consul")
9875 (description
9876 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
9877 discovery, monitoring and configuration.")
9878 (license license:expat)))
9879
9880 (define-public python2-consul
9881 (package-with-python2 python-consul))
9882
9883 (define-public python-schematics
9884 (package
9885 (name "python-schematics")
9886 (version "1.1.1")
9887 (source
9888 (origin
9889 (method url-fetch)
9890 (uri (string-append
9891 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
9892 (file-name (string-append name "-" version ".tar.gz"))
9893 (sha256
9894 (base32
9895 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
9896 (build-system python-build-system)
9897 (propagated-inputs
9898 `(("python-six" ,python-six)))
9899 (arguments
9900 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
9901 ; version requirements (eg python-coveralls)
9902 (home-page "https://github.com/schematics/schematics")
9903 (synopsis "Python Data Structures for Humans")
9904 (description "Python Data Structures for Humans.")
9905 (license license:bsd-3)))
9906
9907 (define-public python2-schematics
9908 (package-with-python2 python-schematics))
9909
9910 (define-public python-odfpy
9911 (package
9912 (name "python-odfpy")
9913 (version "1.3.3")
9914 (source (origin
9915 (method url-fetch)
9916 (uri (pypi-uri "odfpy" version))
9917 (sha256
9918 (base32
9919 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
9920 (arguments
9921 `(#:modules ((srfi srfi-1)
9922 (guix build python-build-system)
9923 (guix build utils))
9924 #:phases
9925 (modify-phases %standard-phases
9926 (replace 'check
9927 ;; The test runner invokes python2 and python3 for test*.py.
9928 ;; To avoid having both in inputs, we replicate it here.
9929 (lambda _
9930 (for-each (lambda (test-file) (invoke "python" test-file))
9931 (find-files "tests" "^test.*\\.py$"))
9932 #t)))))
9933 (build-system python-build-system)
9934 (home-page "https://github.com/eea/odfpy")
9935 (synopsis "Python API and tools to manipulate OpenDocument files")
9936 (description "Collection of libraries and utility programs written in
9937 Python to manipulate OpenDocument 1.2 files.")
9938 (license
9939 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
9940 ;; number of files with other licenses.
9941 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
9942
9943 (define-public python2-odfpy
9944 (package-with-python2 python-odfpy))
9945
9946 (define-public python-natsort
9947 (package
9948 (name "python-natsort")
9949 (version "5.4.1")
9950 (source (origin
9951 (method url-fetch)
9952 (uri (pypi-uri "natsort" version))
9953 (sha256
9954 (base32
9955 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
9956 (build-system python-build-system)
9957 (arguments
9958 `(#:modules ((guix build utils)
9959 (guix build python-build-system)
9960 (srfi srfi-1)
9961 (srfi srfi-26)
9962 (ice-9 ftw))
9963 #:phases
9964 (modify-phases %standard-phases
9965 (add-before 'check 'set-cachedir
9966 ;; Tests require write access to $HOME by default
9967 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
9968 (replace 'check
9969 (lambda _
9970 (let ((cwd (getcwd)))
9971 (setenv "PYTHONPATH"
9972 (string-append
9973 cwd "/build/"
9974 (find (cut string-prefix? "lib" <>)
9975 (scandir (string-append cwd "/build")))
9976 ":"
9977 (getenv "PYTHONPATH")))
9978 (invoke "pytest" "-v")))))))
9979 (native-inputs
9980 `(("python-hypothesis" ,python-hypothesis)
9981 ("python-pytest-cov" ,python-pytest-cov)
9982 ("python-pytest-mock" ,python-pytest-mock)
9983 ("python-pytest" ,python-pytest)))
9984 (propagated-inputs ; TODO: Add python-fastnumbers.
9985 `(("python-pyicu" ,python-pyicu)))
9986 (home-page "https://github.com/SethMMorton/natsort")
9987 (synopsis "Natural sorting for python and shell")
9988 (description
9989 "Natsort lets you apply natural sorting on lists instead of
9990 lexicographical. If you use the built-in @code{sorted} method in python
9991 on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
9992 returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
9993 function @code{natsorted} that identifies numbers and sorts them separately
9994 from strings. It can also sort version numbers, real numbers, mixed types
9995 and more, and comes with a shell command @command{natsort} that exposes this
9996 functionality in the command line.")
9997 (license license:expat)
9998 (properties `((python2-variant . ,(delay python2-natsort))))))
9999
10000 (define-public python2-natsort
10001 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
10002 (package (inherit base)
10003 (native-inputs
10004 `(("python2-pathlib" ,python2-pathlib)
10005 ,@(package-native-inputs base))))))
10006
10007 (define-public python-glances
10008 (package
10009 (name "python-glances")
10010 (version "3.0.2")
10011 (source
10012 (origin
10013 (method url-fetch)
10014 (uri (pypi-uri "Glances" version))
10015 (sha256
10016 (base32
10017 "09fxysfp1n16csqvzvawy74qm6a94nvwjf3vcf5gkqp4i6k4vjjy"))))
10018 (build-system python-build-system)
10019 (propagated-inputs
10020 `(("python-psutil" ,python-psutil)))
10021 (home-page
10022 "https://github.com/nicolargo/glances")
10023 (synopsis
10024 "A cross-platform curses-based monitoring tool")
10025 (description
10026 "Glances is a curses-based monitoring tool for a wide variety of platforms.
10027 Glances uses the PsUtil library to get information from your system. It monitors
10028 CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
10029 (license license:lgpl3+)))
10030
10031 (define-public python2-glances
10032 (package-with-python2 python-glances))
10033
10034 (define-public python-graphql-core
10035 (package
10036 (name "python-graphql-core")
10037 (version "0.5.3")
10038 (source
10039 (origin
10040 (method url-fetch)
10041 (uri (pypi-uri "graphql-core" version))
10042 (sha256
10043 (base32
10044 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
10045 (build-system python-build-system)
10046 (arguments
10047 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
10048 #:phases
10049 (modify-phases %standard-phases
10050 (add-after 'unpack 'patch-hardcoded-version
10051 (lambda _ (substitute*
10052 "setup.py"
10053 (("'gevent==1.1rc1'") "'gevent'"))
10054 #t)))))
10055 (native-inputs
10056 `(("python-gevent" ,python-gevent)
10057 ("python-mock" ,python-mock)
10058 ("python-pytest-mock" ,python-pytest-mock)))
10059 (propagated-inputs
10060 `(("python-promise" ,python-promise)
10061 ("python-six" ,python-six)))
10062 (home-page "https://github.com/graphql-python/graphql-core")
10063 (synopsis "GraphQL implementation for Python")
10064 (description
10065 "GraphQL implementation for Python. GraphQL is a data query language and
10066 runtime designed and used to request and deliver data to mobile and web apps.
10067 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
10068 to Python.")
10069 (license license:expat)))
10070
10071 (define-public python2-graphql-core
10072 (package-with-python2 python-graphql-core))
10073
10074 (define-public python-graphql-relay
10075 (package
10076 (name "python-graphql-relay")
10077 (version "0.4.5")
10078 (source
10079 (origin
10080 (method url-fetch)
10081 (uri (pypi-uri "graphql-relay" version))
10082 (sha256
10083 (base32
10084 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
10085 (build-system python-build-system)
10086 (arguments
10087 '(#:tests? #f)) ; The tests are not distributed
10088 (propagated-inputs
10089 `(("python-graphql-core" ,python-graphql-core)
10090 ("python-promise" ,python-promise)
10091 ("python-six" ,python-six)))
10092 (home-page "https://github.com/graphql-python/graphql-relay-py")
10093 (synopsis "Relay implementation for Python")
10094 (description
10095 "This is a library to allow the easy creation of Relay-compliant servers
10096 using the GraphQL Python reference implementation of a GraphQL server. It
10097 should be noted that the code is a exact port of the original
10098 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
10099 from Facebook.")
10100 (license license:expat)))
10101
10102 (define-public python2-graphql-relay
10103 (package-with-python2 python-graphql-relay))
10104
10105 (define-public python-graphene
10106 (package
10107 (name "python-graphene")
10108 (version "0.10.2")
10109 (source
10110 (origin
10111 (method url-fetch)
10112 (uri (pypi-uri "graphene" version))
10113 (sha256
10114 (base32
10115 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
10116 (build-system python-build-system)
10117 (propagated-inputs
10118 `(("python-graphql-core" ,python-graphql-core)
10119 ("python-graphql-relay" ,python-graphql-relay)
10120 ("python-iso8601" ,python-iso8601)
10121 ("python-promise" ,python-promise)
10122 ("python-six" ,python-six)))
10123 (arguments
10124 `(#:tests? #f)) ; no tests/ in the PyPI tarball
10125 (home-page "http://graphene-python.org/")
10126 (synopsis "GraphQL Framework for Python")
10127 (description
10128 "Graphene is a Python library for building GraphQL schemas/types.
10129 A GraphQL schema describes your data model, and provides a GraphQL server
10130 with an associated set of resolve methods that know how to fetch data.")
10131 (properties `((python2-variant . ,(delay python2-graphene))))
10132 (license license:expat)))
10133
10134 (define-public python2-graphene
10135 (let ((base (package-with-python2
10136 (strip-python2-variant python-graphene))))
10137 (package (inherit base)
10138 (native-inputs
10139 `(("python2-sqlalchemy" ,python2-sqlalchemy)
10140 ,@(package-native-inputs base))))))
10141
10142 (define-public python-nautilus
10143 (package
10144 (name "python-nautilus")
10145 (version "0.4.9")
10146 (source
10147 (origin
10148 (method url-fetch)
10149 (uri (pypi-uri "nautilus" version))
10150 (sha256
10151 (base32
10152 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
10153 (build-system python-build-system)
10154 (arguments `(#:tests? #f)) ; fails to import test modules
10155 (propagated-inputs
10156 `(("python-bcrypt" ,python-bcrypt)
10157 ("python-click" ,python-click)
10158 ("python-consul" ,python-consul)
10159 ("python-graphene" ,python-graphene)
10160 ("python-jinja2" ,python-jinja2)
10161 ("python-peewee" ,python-peewee)
10162 ("python-pika" ,python-pika)
10163 ("python-tornado" ,python-tornado)
10164 ("python-wtforms" ,python-wtforms)))
10165 (native-inputs
10166 `(("python-nose2" ,python-nose2)))
10167 (home-page "https://github.com/AlecAivazis/nautilus")
10168 (synopsis "Library for creating microservice applications")
10169 (description
10170 "Nautilus is a framework for flux based microservices that looks to
10171 provide extendible implementations of common aspects of a cloud so that you can
10172 focus on building massively scalable web applications.")
10173 (license license:expat)))
10174
10175 (define-public python-snowballstemmer
10176 (package
10177 (name "python-snowballstemmer")
10178 (version "1.2.1")
10179 (source (origin
10180 (method url-fetch)
10181 (uri (pypi-uri "snowballstemmer" version))
10182 (sha256
10183 (base32
10184 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
10185 (build-system python-build-system)
10186 (arguments
10187 `(;; No tests exist
10188 #:tests? #f))
10189 (home-page "https://github.com/shibukawa/snowball_py")
10190 (synopsis "Snowball stemming library collection for Python")
10191 (description "This package provides 16 word stemmer algorithms generated
10192 from Snowball algorithms. It includes the 15 original ones plus the Poerter
10193 English stemmer.")
10194 (license license:bsd-3)))
10195
10196 (define-public python2-snowballstemmer
10197 (package-with-python2 python-snowballstemmer))
10198
10199 (define-public python-sphinx-cloud-sptheme
10200 (package
10201 (name "python-sphinx-cloud-sptheme")
10202 (version "1.8.0")
10203 (source (origin
10204 (method url-fetch)
10205 (uri (pypi-uri "cloud_sptheme" version))
10206 (sha256
10207 (base32
10208 "1dniqb6a39yh786f86c4jn666rwnyi1jvzn4616zhcchb7sfdshd"))))
10209 (build-system python-build-system)
10210 ;; FIXME: The 'pypi' release archive does not contain tests.
10211 (arguments '(#:tests? #f))
10212 (native-inputs
10213 `(("python-sphinx" ,python-sphinx)))
10214 (home-page "https://bitbucket.org/ecollins/cloud_sptheme")
10215 (synopsis "'Cloud' theme for Sphinx documenter")
10216 (description "This package contains the \"Cloud\" theme for Sphinx and some
10217 related extensions.")
10218 (license license:bsd-3)))
10219
10220 (define-public python2-sphinx-cloud-sptheme
10221 (package-with-python2 python-sphinx-cloud-sptheme))
10222
10223 (define-public python-sphinx-alabaster-theme
10224 (package
10225 (name "python-sphinx-alabaster-theme")
10226 (version "0.7.12")
10227 (source (origin
10228 (method url-fetch)
10229 (uri (pypi-uri "alabaster" version))
10230 (sha256
10231 (base32
10232 "00nwwjj2d2ym4s2kk217x7jkx1hnczc3fvm8yxbqmsp6b0nxfqd6"))))
10233 (build-system python-build-system)
10234 (propagated-inputs
10235 `(("python-pygments" ,python-pygments)))
10236 (home-page "https://alabaster.readthedocs.io/")
10237 (synopsis "Configurable sidebar-enabled Sphinx theme")
10238 (description "Alabaster is a visually (c)lean, responsive, configurable
10239 theme for the Sphinx documentation system. It's the default theme of Sphinx.")
10240 (license license:bsd-3)))
10241
10242 (define-public python2-sphinx-alabaster-theme
10243 (package-with-python2 python-sphinx-alabaster-theme))
10244
10245 (define-public python-setproctitle
10246 (package
10247 (name "python-setproctitle")
10248 (version "1.1.10")
10249 (source
10250 (origin
10251 (method url-fetch)
10252 (uri (pypi-uri "setproctitle" version))
10253 (sha256
10254 (base32
10255 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
10256 (build-system python-build-system)
10257 (arguments
10258 '(#:phases
10259 (modify-phases %standard-phases
10260 (add-before 'check 'patch-Makefile
10261 ;; Stricly this is only required for the python2 variant.
10262 ;; But adding a phase in an inherited package seems to be
10263 ;; cumbersum. So we patch even for python3.
10264 (lambda _
10265 (let ((nose (assoc-ref %build-inputs "python2-nose")))
10266 (when nose
10267 (substitute* "Makefile"
10268 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
10269 (string-append nose "/bin/nosetests "))))
10270 #t)))
10271 (replace 'check
10272 (lambda _
10273 (setenv "PYTHON" (or (which "python3") (which "python")))
10274 (setenv "PYCONFIG" (or (which "python3-config")
10275 (which "python-config")))
10276 (setenv "CC" "gcc")
10277 ;; No need to extend PYTHONPATH to find the built package, since
10278 ;; the Makefile will build anyway
10279 (invoke "make" "check"))))))
10280 (native-inputs
10281 `(("procps" ,procps))) ; required for tests
10282 (home-page
10283 "https://github.com/dvarrazzo/py-setproctitle")
10284 (synopsis
10285 "Setproctitle implementation for Python to customize the process title")
10286 (description "The library allows a process to change its title (as displayed
10287 by system tools such as ps and top).
10288
10289 Changing the title is mostly useful in multi-process systems, for
10290 example when a master process is forked: changing the children's title
10291 allows to identify the task each process is busy with. The technique
10292 is used by PostgreSQL and the OpenSSH Server for example.")
10293 (license license:bsd-3)
10294 (properties `((python2-variant . ,(delay python2-setproctitle))))))
10295
10296 (define-public python2-setproctitle
10297 (let ((base (package-with-python2
10298 (strip-python2-variant python-setproctitle))))
10299 (package
10300 (inherit base)
10301 (native-inputs `(("python2-nose" ,python2-nose)
10302 ,@(package-native-inputs base))))))
10303
10304 (define-public python-validictory
10305 (package
10306 (name "python-validictory")
10307 (version "1.0.1")
10308 (source
10309 (origin
10310 (method url-fetch)
10311 (uri (pypi-uri "validictory" version))
10312 (sha256
10313 (base32
10314 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
10315 (build-system python-build-system)
10316 (arguments
10317 '(#:phases
10318 (modify-phases %standard-phases
10319 (add-after 'unpack 'bootstrap
10320 ;; Move the tests out of the package directory to avoid
10321 ;; packaging them.
10322 (lambda* _
10323 (rename-file "validictory/tests" "tests")
10324 (delete-file "tests/__init__.py")))
10325 (replace 'check
10326 (lambda _
10327 ;; Extend PYTHONPATH so the built package will be found.
10328 (setenv "PYTHONPATH"
10329 (string-append (getcwd) "/build/lib:"
10330 (getenv "PYTHONPATH")))
10331 (invoke "py.test" "-vv" ))))))
10332 (native-inputs
10333 `(("python-pytest" ,python-pytest)))
10334 (home-page
10335 "https://github.com/jamesturk/validictory")
10336 (synopsis "General purpose Python data validator")
10337 (description "It allows validation of arbitrary Python data structures.
10338
10339 The schema format is based on the JSON Schema
10340 proposal (http://json-schema.org), so combined with json the library is also
10341 useful as a validator for JSON data.")
10342 (license license:expat)))
10343
10344 (define-public python2-validictory
10345 (package-with-python2 python-validictory))
10346
10347 (define-public python-pyelftools
10348 (package
10349 (name "python-pyelftools")
10350 (version "0.25")
10351 (source
10352 (origin
10353 (method url-fetch)
10354 (uri (pypi-uri "pyelftools" version))
10355 (sha256
10356 (base32
10357 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
10358 (build-system python-build-system)
10359 (arguments
10360 `(#:phases
10361 (modify-phases %standard-phases
10362 (add-before 'check 'set-pythonpath
10363 (lambda _
10364 (setenv "PYTHONPATH"
10365 (string-append
10366 (getcwd) "/test/"
10367 ":" (getenv "PYTHONPATH")))
10368 #t)))))
10369 (home-page
10370 "https://github.com/eliben/pyelftools")
10371 (synopsis
10372 "Analyze binary and library file information")
10373 (description "This Python library provides interfaces for parsing and
10374 analyzing two binary and library file formats; the Executable and Linking
10375 Format (ELF), and debugging information in the Debugging With Attributed
10376 Record Format (DWARF).")
10377 (license license:public-domain)))
10378
10379 (define-public python-pyev
10380 (package
10381 (name "python-pyev")
10382 (version "0.9.0")
10383 (source
10384 (origin
10385 (method url-fetch)
10386 (uri (pypi-uri "pyev" version))
10387 (sha256
10388 (base32
10389 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
10390 (build-system python-build-system)
10391 (arguments
10392 `(#:tests? #f ; no test suite
10393 #:phases
10394 (modify-phases %standard-phases
10395 (add-after 'unpack 'patch
10396 (lambda* (#:key inputs #:allow-other-keys)
10397 (let ((libev (string-append (assoc-ref inputs "libev")
10398 "/lib/libev.so.4")))
10399 (substitute* "setup.py"
10400 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
10401 (string-append "libev_dll_name = \"" libev "\"")))))))))
10402 (inputs
10403 `(("libev" ,libev)))
10404 (home-page "http://pythonhosted.org/pyev/")
10405 (synopsis "Python libev interface")
10406 (description "Pyev provides a Python interface to libev.")
10407 (license license:gpl3)))
10408
10409 (define-public python2-pyev
10410 (package-with-python2 python-pyev))
10411
10412 (define-public python-imagesize
10413 (package
10414 (name "python-imagesize")
10415 (version "1.1.0")
10416 (source
10417 (origin
10418 (method url-fetch)
10419 (uri (pypi-uri "imagesize" version))
10420 (sha256
10421 (base32
10422 "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk"))))
10423 (build-system python-build-system)
10424 (home-page "https://github.com/shibukawa/imagesize_py")
10425 (synopsis "Gets image size of files in various formats in Python")
10426 (description
10427 "This package allows determination of image size from
10428 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
10429 (license license:expat)))
10430
10431 (define-public python2-imagesize
10432 (package-with-python2 python-imagesize))
10433
10434 (define-public python-termstyle
10435 (package
10436 (name "python-termstyle")
10437 (version "0.1.11")
10438 (source
10439 (origin
10440 (method url-fetch)
10441 (uri (pypi-uri "termstyle" version))
10442 (sha256
10443 (base32
10444 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
10445 (build-system python-build-system)
10446 (arguments
10447 '(#:phases
10448 (modify-phases %standard-phases
10449 (replace 'check
10450 (lambda _
10451 (invoke "python" "test3.py"))))))
10452 (home-page "https://github.com/gfxmonk/termstyle")
10453 (synopsis "Console text coloring for Python")
10454 (description "This package provides console text coloring for Python.")
10455 (license license:bsd-3)))
10456
10457 (define-public python-argcomplete
10458 (package
10459 (name "python-argcomplete")
10460 (version "1.7.0")
10461 (source
10462 (origin
10463 (method url-fetch)
10464 (uri (pypi-uri "argcomplete" version))
10465 (sha256
10466 (base32
10467 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
10468 (build-system python-build-system)
10469 (native-inputs
10470 `(("python-pexpect" ,python-pexpect)
10471 ("tcsh" ,tcsh)
10472 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
10473 (home-page "https://github.com/kislyuk/argcomplete")
10474 (synopsis "Shell tab completion for Python argparse")
10475 (description "argcomplete provides extensible command line tab completion
10476 of arguments and options for Python scripts using @code{argparse}. It's
10477 particularly useful for programs with many options or sub-parsers that can
10478 dynamically suggest completions; for example, when browsing resources over the
10479 network.")
10480 (license license:asl2.0)))
10481
10482 (define-public python2-argcomplete
10483 (package-with-python2 python-argcomplete))
10484
10485 (define-public python-xopen
10486 (package
10487 (name "python-xopen")
10488 (version "0.3.3")
10489 (source
10490 (origin
10491 (method url-fetch)
10492 (uri (pypi-uri "xopen" version))
10493 (sha256
10494 (base32
10495 "1a0wbil552wsmklwd89ssmgz3pjd86qa9i7jh8wqb9wslc8a2qjr"))
10496 (file-name (string-append name "-" version ".tar.gz"))))
10497 (build-system python-build-system)
10498 (home-page "https://github.com/marcelm/xopen/")
10499 (synopsis "Open compressed files transparently")
10500 (description "This module provides an @code{xopen} function that works like
10501 Python's built-in @code{open} function, but can also deal with compressed files.
10502 Supported compression formats are gzip, bzip2 and, xz, and are automatically
10503 recognized by their file extensions. The focus is on being as efficient as
10504 possible on all supported Python versions.")
10505 (license license:expat)))
10506
10507 (define-public python2-xopen
10508 (let ((base (package-with-python2
10509 (strip-python2-variant python-xopen))))
10510 (package
10511 (inherit base)
10512 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
10513 ,@(package-propagated-inputs base))))))
10514
10515 (define-public python-cheetah
10516 (package
10517 (name "python-cheetah")
10518 (version "3.1.0")
10519 (source
10520 (origin
10521 (method url-fetch)
10522 (uri (pypi-uri "Cheetah3" version))
10523 (sha256
10524 (base32
10525 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
10526 (build-system python-build-system)
10527 (arguments
10528 `(#:modules ((guix build utils)
10529 (guix build python-build-system)
10530 (ice-9 ftw)
10531 (srfi srfi-1)
10532 (srfi srfi-26))
10533 #:phases (modify-phases %standard-phases
10534 (add-after 'unpack 'use-absolute-python
10535 (lambda _
10536 (substitute* "Cheetah/CheetahWrapper.py"
10537 (("#!/usr/bin/env python")
10538 (string-append "#!" (which "python"))))
10539 #t))
10540 (replace 'check
10541 (lambda _
10542 (let ((cwd (getcwd)))
10543 (setenv "PYTHONPATH"
10544 (string-append
10545 cwd "/build/"
10546 (find (cut string-prefix? "lib" <>)
10547 (scandir (string-append cwd "/build")))
10548 ":" (getenv "PYTHONPATH")))
10549 (setenv "PATH"
10550 (string-append (getenv "PATH")
10551 ":" cwd "/bin"))
10552 (setenv "TMPDIR" "/tmp")
10553
10554 (substitute* "Cheetah/Tests/Test.py"
10555 (("unittest.TextTestRunner\\(\\)")
10556 "unittest.TextTestRunner(verbosity=2)"))
10557
10558 (invoke "python" "Cheetah/Tests/Test.py")))))))
10559 (propagated-inputs
10560 `(("python-markdown" ,python-markdown))) ;optional
10561 (home-page "http://cheetahtemplate.org/")
10562 (synopsis "Template engine")
10563 (description "Cheetah is a text-based template engine and Python code
10564 generator.
10565
10566 Cheetah can be used as a standalone templating utility or referenced as
10567 a library from other Python applications. It has many potential uses,
10568 but web developers looking for a viable alternative to ASP, JSP, PHP and
10569 PSP are expected to be its principle user group.
10570
10571 Features:
10572 @enumerate
10573 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
10574 text-based format.
10575 @item Cleanly separates content, graphic design, and program code.
10576 @item Blends the power and flexibility of Python with a simple template language
10577 that non-programmers can understand.
10578 @item Gives template writers full access to any Python data structure, module,
10579 function, object, or method in their templates.
10580 @item Makes code reuse easy by providing an object-orientated interface to
10581 templates that is accessible from Python code or other Cheetah templates.
10582 One template can subclass another and selectively reimplement sections of it.
10583 @item Provides a simple, yet powerful, caching mechanism that can dramatically
10584 improve the performance of a dynamic website.
10585 @item Compiles templates into optimized, yet readable, Python code.
10586 @end enumerate")
10587 (license (license:x11-style "file://LICENSE"))))
10588
10589 (define-public python2-cheetah
10590 (package-with-python2 python-cheetah))
10591
10592 (define-public python-dulwich
10593 (package
10594 (name "python-dulwich")
10595 (version "0.18.6")
10596 (source
10597 (origin
10598 (method url-fetch)
10599 (uri (list (string-append "https://www.dulwich.io/releases/"
10600 "dulwich-" version ".tar.gz")
10601 (pypi-uri "dulwich" version)))
10602 (sha256
10603 (base32
10604 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
10605 (build-system python-build-system)
10606 (arguments
10607 `(#:phases
10608 (modify-phases %standard-phases
10609 (add-before 'check 'fix-tests
10610 (lambda* (#:key inputs #:allow-other-keys)
10611 ;; The tests use Popen with a custom environment which doesn't
10612 ;; include PATH.
10613 (substitute* "dulwich/tests/compat/utils.py"
10614 (("'git'") (string-append "'"
10615 (which "git")
10616 "'")))
10617 (substitute* '("dulwich/tests/test_repository.py"
10618 "dulwich/tests/test_hooks.py")
10619 (("#!/bin/sh") (string-append "#!" (which "sh"))))
10620 (setenv "TEST_RUNNER" "unittest")
10621 (setenv "PYTHONHASHSEED" "random")
10622 #t)))))
10623 (propagated-inputs
10624 `(("python-fastimport" ,python-fastimport)))
10625 (native-inputs
10626 `(("python-mock" ,python-mock)
10627 ("python-geventhttpclient" ,python-geventhttpclient)
10628 ("git" ,git)))
10629 (home-page "https://www.dulwich.io/")
10630 (synopsis "Git implementation in Python")
10631 (description "Dulwich is an implementation of the Git file formats and
10632 protocols written in pure Python.")
10633 ;; Can be used with either license.
10634 (license (list license:asl2.0 license:gpl2+))))
10635
10636 (define-public python2-dulwich
10637 (package-with-python2 python-dulwich))
10638
10639 (define-public python-pbkdf2
10640 (package
10641 (name "python-pbkdf2")
10642 (version "1.3")
10643 (source
10644 (origin
10645 (method url-fetch)
10646 (uri (pypi-uri "pbkdf2" version))
10647 (sha256
10648 (base32
10649 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
10650 (build-system python-build-system)
10651 (arguments
10652 '(#:phases
10653 (modify-phases %standard-phases
10654 (replace 'check
10655 (lambda _
10656 (setenv "PYTHONPATH"
10657 (string-append (getcwd) "/build/lib:"
10658 (getenv "PYTHONPATH")))
10659 (invoke "python" "test/test_pbkdf2.py"))))))
10660 (propagated-inputs
10661 `(("python-pycrypto" ,python-pycrypto))) ; optional
10662 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
10663 (synopsis "Password-based key derivation")
10664 (description "This module implements the password-based key derivation
10665 function, PBKDF2, specified in RSA PKCS#5 v2.0.
10666
10667 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
10668 is part of the RSA Public Key Cryptography Standards series. The provided
10669 implementation takes a password or a passphrase and a salt value (and
10670 optionally a iteration count, a digest module, and a MAC module) and provides
10671 a file-like object from which an arbitrarly-sized key can be read.")
10672 (license license:expat)))
10673
10674 (define-public python2-pbkdf2
10675 (package-with-python2 python-pbkdf2))
10676
10677 (define-public python-qrcode
10678 (package
10679 (name "python-qrcode")
10680 (version "6.0")
10681 (source
10682 (origin
10683 (method url-fetch)
10684 (uri (pypi-uri "qrcode" version))
10685 (sha256
10686 (base32
10687 "1gz1g2n9kqwqkak78aavr354z1v3yyiksk7q6xp5hi1zr6s0syq3"))))
10688 (build-system python-build-system)
10689 (arguments
10690 ;; FIXME: Tests require packaging 'pymaging'.
10691 '(#:tests? #f))
10692 (propagated-inputs
10693 `(("python-lxml" ,python-lxml) ; for SVG output
10694 ("python-pillow" ,python-pillow) ; for PNG output
10695 ("python-six" ,python-six)))
10696 (inputs
10697 `(;; The setup.cfg file needs to be used, and support for this requires
10698 ;; at least version 30.3.0 of setuptools
10699 ("python-setuptools" ,python-setuptools)))
10700 (home-page "https://github.com/lincolnloop/python-qrcode")
10701 (synopsis "QR Code image generator")
10702 (description "This package provides a pure Python QR Code generator
10703 module. It uses the Python Imaging Library (PIL) to allow for the generation
10704 of QR Codes.
10705
10706 In addition this package provides a command line tool to generate QR codes and
10707 either write these QR codes to a file or do the output as ascii art at the
10708 console.")
10709 (license license:bsd-3)))
10710
10711 (define-public python2-qrcode
10712 (package-with-python2 python-qrcode))
10713
10714 (define-public python-rst2ansi
10715 (package
10716 (name "python-rst2ansi")
10717 (version "0.1.5")
10718 (source
10719 (origin
10720 (method url-fetch)
10721 (uri (pypi-uri "rst2ansi" version))
10722 (sha256
10723 (base32
10724 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
10725 (build-system python-build-system)
10726 (propagated-inputs
10727 `(("python-docutils" ,python-docutils)))
10728 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
10729 (synopsis "Convert RST to ANSI-decorated console output")
10730 (description
10731 "Python module dedicated to rendering RST (reStructuredText) documents
10732 to ansi-escaped strings suitable for display in a terminal.")
10733 (license license:expat)))
10734
10735 (define-public python-ansi2html
10736 (package
10737 (name "python-ansi2html")
10738 (version "1.2.0")
10739 (source
10740 (origin
10741 (method url-fetch)
10742 (uri (pypi-uri "ansi2html" version))
10743 (sha256
10744 (base32
10745 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
10746 (build-system python-build-system)
10747 (native-inputs
10748 `(("python-mock" ,python-mock)
10749 ("python-nose" ,python-nose)))
10750 (propagated-inputs
10751 `(("python-six" ,python-six)))
10752 (home-page "https://github.com/ralphbean/ansi2html")
10753 (synopsis "Convert ANSI-decorated console output to HTML")
10754 (description
10755 "@command{ansi2html} is a Python library and command line utility for
10756 convering text with ANSI color codes to HTML or LaTeX.")
10757 (license license:gpl3+)))
10758
10759 (define-public python2-ansi2html
10760 (package-with-python2 python-ansi2html))
10761
10762 (define-public python-ddt
10763 (package
10764 (name "python-ddt")
10765 (version "1.1.3")
10766 (source
10767 (origin
10768 (method url-fetch)
10769 (uri (pypi-uri "ddt" version))
10770 (sha256
10771 (base32
10772 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
10773 (build-system python-build-system)
10774 (native-inputs
10775 `(("python-mock" ,python-mock)
10776 ("python-nose" ,python-nose)))
10777 (propagated-inputs
10778 `(("python-six" ,python-six)
10779 ("python-pyyaml" ,python-pyyaml)))
10780 (home-page "https://github.com/txels/ddt")
10781 (synopsis "Data-Driven Tests")
10782 (description
10783 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
10784 running it with different test data, and make it appear as multiple test
10785 cases.")
10786 (license license:expat)))
10787
10788 (define-public python2-ddt
10789 (package-with-python2 python-ddt))
10790
10791 (define-public python-pycountry
10792 (package
10793 (name "python-pycountry")
10794 (version "18.5.26")
10795 (source
10796 (origin
10797 (method url-fetch)
10798 (uri (pypi-uri "pycountry" version))
10799 (sha256
10800 (base32
10801 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
10802 (build-system python-build-system)
10803 (home-page "https://bitbucket.org/flyingcircus/pycountry")
10804 (synopsis "ISO databases for languages, countries, currencies, etc.")
10805 (description
10806 "@code{pycountry} provides the ISO databases for the standards:
10807 @enumerate
10808 @item 639-3 (Languages)
10809 @item 3166 (Countries)
10810 @item 3166-3 (Deleted Countries)
10811 @item 3166-2 (Subdivisions of countries)
10812 @item 4217 (Currencies)
10813 @item 15924 (Scripts)
10814 @end enumerate
10815 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
10816 through a Python API.")
10817 (license license:lgpl2.1+)))
10818
10819 (define-public python2-pycountry
10820 (package-with-python2 python-pycountry))
10821
10822 (define-public python-pycosat
10823 (package
10824 (name "python-pycosat")
10825 (version "0.6.1")
10826 (source
10827 (origin
10828 (method url-fetch)
10829 (uri (pypi-uri "pycosat" version))
10830 (sha256
10831 (base32
10832 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
10833 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
10834 (build-system python-build-system)
10835 (home-page "https://github.com/ContinuumIO/pycosat")
10836 (synopsis "Bindings to picosat (a SAT solver)")
10837 (description
10838 "This package provides efficient Python bindings to @code{picosat} on
10839 the C level. When importing pycosat, the @code{picosat} solver becomes part
10840 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
10841 Problem} (SAT) solver.")
10842 (license license:expat)))
10843
10844 (define-public python2-pycosat
10845 (package-with-python2 python-pycosat))
10846
10847 (define-public python2-ruamel.ordereddict
10848 (package
10849 (name "python2-ruamel.ordereddict")
10850 (version "0.4.9")
10851 (source
10852 (origin
10853 (method url-fetch)
10854 (uri (pypi-uri "ruamel.ordereddict" version))
10855 (sha256
10856 (base32
10857 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
10858 (build-system python-build-system)
10859 (arguments
10860 `(#:python ,python-2
10861 #:phases
10862 (modify-phases %standard-phases
10863 (delete 'check)
10864 (add-after 'install 'check
10865 (lambda* (#:key inputs outputs #:allow-other-keys)
10866 (add-installed-pythonpath inputs outputs)
10867 (invoke "python" "test/testordereddict.py"))))))
10868 (home-page "https://bitbucket.org/ruamel/ordereddict")
10869 (synopsis "Version of dict that keeps keys in insertion order")
10870 (description
10871 "This is an implementation of an ordered dictionary with @dfn{Key
10872 Insertion Order} (KIO: updates of values do not affect the position of the
10873 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
10874 removed and put at the back). The standard library module @code{OrderedDict},
10875 implemented later, implements a subset of @code{ordereddict} functionality.
10876 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
10877 Order} (KSO, no sorting function can be specified, but a transform can be
10878 specified to apply on the key before comparison (e.g. @code{string.lower})).")
10879 (license license:expat)))
10880
10881 (define-public python-pypeg2
10882 (package
10883 (name "python-pypeg2")
10884 (version "2.15.2")
10885 (source
10886 (origin
10887 (method url-fetch)
10888 (uri (pypi-uri "pyPEG2" version))
10889 (sha256
10890 (base32
10891 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
10892 (build-system python-build-system)
10893 (propagated-inputs `(("python-lxml" ,python-lxml)))
10894 (arguments
10895 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
10896 '(#:tests? #f))
10897 (home-page "https://fdik.org/pyPEG/")
10898 (synopsis "Parsering Expression Grammars in Python")
10899 (description "PyPEG is an intrinsic parser interpreter framework for
10900 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
10901 parse many formal languages.")
10902 (license license:gpl2)))
10903
10904 (define-public python-incremental
10905 (package
10906 (name "python-incremental")
10907 (version "17.5.0")
10908 (source
10909 (origin
10910 (method url-fetch)
10911 (uri (pypi-uri "incremental" version))
10912 (sha256
10913 (base32
10914 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
10915 (build-system python-build-system)
10916 (home-page "https://github.com/hawkowl/incremental")
10917 (synopsis "Library for versioning Python projects")
10918 (description "Incremental is a small library that versions your Python
10919 projects.")
10920 (license license:expat)))
10921
10922 (define-public python2-incremental
10923 (package-with-python2 python-incremental))
10924
10925 (define-public python-invoke
10926 (package
10927 (name "python-invoke")
10928 (home-page "http://www.pyinvoke.org/")
10929 (version "1.1.0")
10930 (source (origin
10931 (method url-fetch)
10932 (uri (pypi-uri "invoke" version))
10933 (sha256
10934 (base32
10935 "0aiy1xvk1f91246zxd1zqrm679vdvd10h843a2na41cqr3cflpi6"))))
10936 (build-system python-build-system)
10937 (arguments
10938 ;; XXX: Requires many dependencies that are not yet in Guix.
10939 `(#:tests? #f))
10940 (synopsis "Pythonic task execution")
10941 (description
10942 "Invoke is a Python task execution tool and library, drawing inspiration
10943 from various sources to arrive at a powerful and clean feature set. It is
10944 evolved from the Fabric project, but focuses on local and abstract concerns
10945 instead of servers and network commands.")
10946 (license license:bsd-3)))
10947
10948 (define-public python2-invoke
10949 (package-with-python2 python-invoke))
10950
10951 (define-public python-automat
10952 (package
10953 (name "python-automat")
10954 (version "0.6.0")
10955 (source (origin
10956 (method url-fetch)
10957 (uri (pypi-uri "Automat" version))
10958 (sha256
10959 (base32
10960 "1a7nsrljysfmdqmpn2apfa1gg6rfah4y9sizvns8gb08rx7d07rw"))))
10961 (build-system python-build-system)
10962 ;; We disable the tests because they require python-twisted, while
10963 ;; python-twisted depends on python-automat. Twisted is optional, but the
10964 ;; tests fail if it is not available. Also see
10965 ;; <https://github.com/glyph/automat/issues/71>.
10966 (arguments '(#:tests? #f))
10967 (native-inputs
10968 `(("python-m2r" ,python-m2r)
10969 ("python-setuptools-scm" ,python-setuptools-scm)
10970 ("python-graphviz" ,python-graphviz)))
10971 (propagated-inputs
10972 `(("python-six" ,python-six)
10973 ("python-attrs" ,python-attrs)))
10974 (home-page "https://github.com/glyph/Automat")
10975 (synopsis "Self-service finite-state machines")
10976 (description "Automat is a library for concise, idiomatic Python
10977 expression of finite-state automata (particularly deterministic finite-state
10978 transducers).")
10979 (license license:expat)))
10980
10981 (define-public python2-automat
10982 (package-with-python2 python-automat))
10983
10984 (define-public python-m2r
10985 (package
10986 (name "python-m2r")
10987 (version "0.1.12")
10988 (source (origin
10989 (method url-fetch)
10990 (uri (pypi-uri "m2r" version))
10991 (sha256
10992 (base32
10993 "1axrwnf425sz4qz3c0qc7yhhki4myzb8rki7pczcsgzznzmqdyxd"))))
10994 (build-system python-build-system)
10995 (propagated-inputs
10996 `(("python-docutils" ,python-docutils)
10997 ("python-mistune" ,python-mistune)))
10998 (native-inputs
10999 `(("python-pygments" ,python-pygments)
11000 ("python-mock" ,python-mock)))
11001 (home-page "https://github.com/miyakogi/m2r")
11002 (synopsis "Markdown to reStructuredText converter")
11003 (description "M2R converts a markdown file including reST markups to valid
11004 reST format.")
11005 (license license:expat)))
11006
11007 (define-public python2-m2r
11008 (package-with-python2 python-m2r))
11009
11010 (define-public python-constantly
11011 (package
11012 (name "python-constantly")
11013 (version "15.1.0")
11014 (source (origin
11015 (method url-fetch)
11016 (uri (pypi-uri "constantly" version))
11017 (sha256
11018 (base32
11019 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
11020 (build-system python-build-system)
11021 (home-page "https://github.com/twisted/constantly")
11022 (synopsis "Symbolic constants in Python")
11023 (description "Constantly is a Python library that provides symbolic
11024 constant support. It includes collections and constants with text, numeric,
11025 and bit flag values.")
11026 (license license:expat)))
11027
11028 (define-public python2-constantly
11029 (package-with-python2 python-constantly))
11030
11031 (define-public python-attrs
11032 (package
11033 (name "python-attrs")
11034 (version "18.2.0")
11035 (source (origin
11036 (method url-fetch)
11037 (uri (pypi-uri "attrs" version))
11038 (sha256
11039 (base32
11040 "0s9ydh058wmmf5v391pym877x4ahxg45dw6a0w4c7s5wgpigdjqh"))))
11041 (build-system python-build-system)
11042 (arguments
11043 `(#:modules ((guix build utils)
11044 (guix build python-build-system)
11045 (ice-9 ftw)
11046 (srfi srfi-1)
11047 (srfi srfi-26))
11048 #:phases (modify-phases %standard-phases
11049 (replace 'check
11050 (lambda _
11051 (let ((cwd (getcwd)))
11052 (setenv "PYTHONPATH"
11053 (string-append
11054 cwd "/build/"
11055 (find (cut string-prefix? "lib" <>)
11056 (scandir (string-append cwd "/build")))
11057 ":"
11058 (getenv "PYTHONPATH")))
11059 (invoke "python" "-m" "pytest")))))))
11060 (native-inputs
11061 `(("python-coverage" ,python-coverage)
11062 ("python-hypothesis" ,python-hypothesis)
11063 ("python-pympler" ,python-pympler)
11064 ("python-pytest" ,python-pytest)
11065 ("python-six" ,python-six)
11066 ("python-sphinx" ,python-sphinx)
11067 ("python-zope-interface" ,python-zope-interface)))
11068 (home-page "https://github.com/python-attrs/attrs/")
11069 (synopsis "Attributes without boilerplate")
11070 (description "@code{attrs} is a Python package with class decorators that
11071 ease the chores of implementing the most common attribute-related object
11072 protocols.")
11073 (license license:expat)))
11074
11075 (define-public python2-attrs
11076 (package-with-python2 python-attrs))
11077
11078 (define-public python-attrs-bootstrap
11079 (package
11080 (inherit python-attrs)
11081 (name "python-attrs-bootstrap")
11082 ;; Keep this on a fixed version so python-attrs can be updated without
11083 ;; triggering a mass-rebuild. FIXME: Update this in the next rebuild cycle.
11084 (version "17.4.0")
11085 (source (origin
11086 (method url-fetch)
11087 (uri (pypi-uri "attrs" version))
11088 (sha256
11089 (base32
11090 "1jafnn1kzd6qhxgprhx6y6ik1r5m2rilx25syzcmq03azp660y8w"))))
11091 (native-inputs `())
11092 (arguments `(#:tests? #f))))
11093
11094 (define-public python2-attrs-bootstrap
11095 (package-with-python2 python-attrs-bootstrap))
11096
11097 (define-public python2-cliapp
11098 (package
11099 (name "python2-cliapp")
11100 (version "1.20170823")
11101 (source
11102 (origin
11103 (method url-fetch)
11104 (uri (string-append
11105 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
11106 version ".tar.gz"))
11107 (sha256
11108 (base32
11109 "1i9gik0xrj6jmi95s5w988jl1y265baz5xm5pbqdyvsh8h9ln6yq"))))
11110 (build-system python-build-system)
11111 (arguments
11112 `(#:python ,python-2
11113 #:phases
11114 (modify-phases %standard-phases
11115 ;; check phase needs to be run before the build phase. If not,
11116 ;; coverage-test-runner looks for tests for the built source files,
11117 ;; and fails.
11118 (delete 'check)
11119 (add-before 'build 'check
11120 (lambda _
11121 ;; Disable python3 tests
11122 (substitute* "check"
11123 (("python3") "# python3"))
11124 (invoke "./check"))))))
11125 (native-inputs
11126 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
11127 ("python2-pep8" ,python2-pep8)))
11128 (propagated-inputs
11129 `(("python2-pyaml" ,python2-pyaml)))
11130 (home-page "https://liw.fi/cliapp/")
11131 (synopsis "Python framework for command line programs")
11132 (description "@code{python2-cliapp} is a python framework for
11133 command line programs. It contains the typical stuff such programs
11134 need to do, such as parsing the command line for options, and
11135 iterating over input files.")
11136 (license license:gpl2+)))
11137
11138 (define-public python2-ttystatus
11139 (package
11140 (name "python2-ttystatus")
11141 (version "0.35")
11142 (source
11143 (origin
11144 (method url-fetch)
11145 (uri (string-append
11146 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
11147 version ".tar.gz"))
11148 (sha256
11149 (base32
11150 "0vivqbw7ddhsq1zj3g9cvvv4f0phl0pis2smsnwcr2szz2fk3hl6"))))
11151 (build-system python-build-system)
11152 (native-inputs
11153 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
11154 ("python2-pep8" ,python2-pep8)))
11155 (arguments
11156 `(#:python ,python-2
11157 #:phases
11158 (modify-phases %standard-phases
11159 ;; check phase needs to be run before the build phase. If not,
11160 ;; coverage-test-runner looks for tests for the built source files,
11161 ;; and fails.
11162 (delete 'check)
11163 (add-before 'build 'check
11164 (lambda _ (invoke "make" "check"))))))
11165 (home-page "https://liw.fi/ttystatus/")
11166 (synopsis "Python library for showing progress reporting and
11167 status updates on terminals")
11168 (description "@code{python2-ttystatus} is a python library for
11169 showing progress reporting and status updates on terminals, for
11170 command line programs. Output is automatically adapted to the width
11171 of the terminal: truncated if it does not fit, and resized if the
11172 terminal size changes.")
11173 (license license:gpl3+)))
11174
11175 (define-public python2-tracing
11176 (package
11177 (name "python2-tracing")
11178 (version "0.10")
11179 (source
11180 (origin
11181 (method url-fetch)
11182 (uri (string-append
11183 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
11184 version ".tar.gz"))
11185 (sha256
11186 (base32
11187 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
11188 (build-system python-build-system)
11189 (arguments
11190 `(#:python ,python-2))
11191 (home-page "https://liw.fi/tracing/")
11192 (synopsis "Python debug logging helper")
11193 (description "@code{python2-tracing} is a python library for
11194 logging debug messages. It provides a way to turn debugging messages
11195 on and off, based on the filename they occur in. It is much faster
11196 than using @code{logging.Filter} to accomplish the same thing, which
11197 matters when code is run in production mode. The actual logging still
11198 happens using the @code{logging} library.")
11199 (license license:gpl3+)))
11200
11201 (define-public python2-larch
11202 (package
11203 (name "python2-larch")
11204 (version "1.20151025")
11205 (source
11206 (origin
11207 (method url-fetch)
11208 (uri (string-append
11209 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
11210 version ".tar.gz"))
11211 (patches (search-patches
11212 "python2-larch-coverage-4.0a6-compatibility.patch"))
11213 (sha256
11214 (base32
11215 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
11216 (build-system python-build-system)
11217 (arguments
11218 `(#:python ,python-2
11219 #:phases
11220 (modify-phases %standard-phases
11221 ;; check phase needs to be run before the build phase. If not,
11222 ;; coverage-test-runner looks for tests for the built source files,
11223 ;; and fails.
11224 (delete 'check)
11225 (add-before 'build 'check
11226 (lambda _ (invoke "make" "check"))))))
11227 (native-inputs
11228 `(("cmdtest" ,cmdtest)
11229 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
11230 (propagated-inputs
11231 `(("python2-tracing" ,python2-tracing)))
11232 (home-page "https://liw.fi/larch/")
11233 (synopsis "Python copy-on-write B-tree library")
11234 (description "@code{python2-larch} is an implementation of
11235 particular kind of B-tree, based on research by Ohad Rodeh. See
11236 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
11237 on the data structure.
11238
11239 The distinctive feature of this B-tree is that a node is never
11240 (conceptually) modified. Instead, all updates are done by
11241 copy-on-write. This makes it easy to clone a tree, and modify only the
11242 clone, while other processes access the original tree.")
11243 (license license:gpl3+)))
11244
11245 (define-public python-astroid
11246 (package
11247 (name "python-astroid")
11248 (version "2.1.0")
11249 (source
11250 (origin
11251 (method url-fetch)
11252 (uri (pypi-uri "astroid" version))
11253 (sha256
11254 (base32
11255 "08hz675knh4294bancdapql392fmbjyimhbyrmfkz1ka7l035c1m"))))
11256 (build-system python-build-system)
11257 (propagated-inputs
11258 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
11259 ("python-six" ,python-six)
11260 ("python-wrapt" ,python-wrapt)))
11261 (native-inputs
11262 `(("python-dateutil" ,python-dateutil)
11263 ("python-nose" ,python-nose)
11264 ("python-pytest" ,python-pytest)
11265 ("python-pytest-runner" ,python-pytest-runner)))
11266 (arguments
11267 `(#:phases
11268 (modify-phases %standard-phases
11269 (add-after 'unpack 'remove-spurious-test
11270 (lambda _
11271 ;; This can be removed after upgrading from python-3.7
11272 ;; https://github.com/PyCQA/astroid/issues/593
11273 ;; https://bugs.python.org/issue34056
11274 (delete-file "astroid/tests/unittest_modutils.py")
11275 #t))
11276 (replace 'check
11277 (lambda _
11278 (invoke "pytest" "astroid"))))))
11279 (home-page "https://github.com/PyCQA/astroid")
11280 (synopsis "Common base representation of python source code for pylint and
11281 other projects")
11282 (description "@code{python-astroid} provides a common base representation
11283 of python source code for projects such as pychecker, pyreverse, pylint, etc.
11284
11285 It provides a compatible representation which comes from the _ast module. It
11286 rebuilds the tree generated by the builtin _ast module by recursively walking
11287 down the AST and building an extended ast. The new node classes have
11288 additional methods and attributes for different usages. They include some
11289 support for static inference and local name scopes. Furthermore, astroid
11290 builds partial trees by inspecting living objects.")
11291 (license license:lgpl2.1+)
11292 (properties `((python2-variant . ,(delay python2-astroid))))))
11293
11294 (define-public python2-astroid
11295 (let ((base (package-with-python2
11296 (strip-python2-variant python-astroid))))
11297 (package (inherit base)
11298 ;; Version 2.x removes python2 support.
11299 (version "1.6.5")
11300 (source
11301 (origin
11302 (method url-fetch)
11303 (uri (pypi-uri "astroid" version))
11304 (sha256
11305 (base32
11306 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
11307 (arguments
11308 (substitute-keyword-arguments (package-arguments base)
11309 ((#:phases phases)
11310 `(modify-phases ,phases
11311 (add-after 'unpack 'remove-spurious-test
11312 (lambda _
11313 ;; https://github.com/PyCQA/astroid/issues/276
11314 (delete-file "astroid/tests/unittest_brain.py")
11315 #t))
11316 (replace 'check
11317 (lambda _
11318 (invoke"python" "-m" "unittest" "discover"
11319 "-p" "unittest*.py")))))))
11320 (native-inputs `())
11321 (propagated-inputs
11322 `(("python2-backports-functools-lru-cache"
11323 ,python2-backports-functools-lru-cache)
11324 ("python2-enum34" ,python2-enum34)
11325 ("python2-singledispatch" ,python2-singledispatch)
11326 ,@(package-propagated-inputs base))))))
11327
11328 (define-public python-isort
11329 (package
11330 (name "python-isort")
11331 (version "4.3.4")
11332 (source
11333 (origin
11334 (method git-fetch)
11335 (uri (git-reference
11336 ;; Tests pass only from the Github sources
11337 (url "https://github.com/timothycrosley/isort")
11338 (commit version)))
11339 (file-name (git-file-name name version))
11340 (sha256
11341 (base32
11342 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
11343 (build-system python-build-system)
11344 (native-inputs
11345 `(("python-mock" ,python-mock)
11346 ("python-pytest" ,python-pytest)))
11347 (home-page "https://github.com/timothycrosley/isort")
11348 (synopsis "Python utility/library to sort python imports")
11349 (description "@code{python-isort} is a python utility/library to sort
11350 imports alphabetically, and automatically separated into sections. It
11351 provides a command line utility, a python library and plugins for various
11352 editors.")
11353 (license license:expat)
11354 (properties `((python2-variant . ,(delay python2-isort))))))
11355
11356 (define-public python2-isort
11357 (let ((base (package-with-python2
11358 (strip-python2-variant python-isort))))
11359 (package (inherit base)
11360 (native-inputs
11361 `(("python2-futures" ,python2-futures)
11362 ,@(package-native-inputs base))))))
11363
11364 (define-public python2-backports-functools-lru-cache
11365 (package
11366 (name "python2-backports-functools-lru-cache")
11367 (version "1.5")
11368 (source
11369 (origin
11370 (method url-fetch)
11371 ;; only the pypi tarballs contain the necessary metadata
11372 (uri (pypi-uri "backports.functools_lru_cache" version))
11373 (sha256
11374 (base32
11375 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
11376 (build-system python-build-system)
11377 (native-inputs
11378 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
11379 (arguments
11380 `(#:python ,python-2))
11381 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
11382 (synopsis "Backport of functools.lru_cache from Python 3.3")
11383 (description "@code{python2-backports-functools-lru-cache} is a backport
11384 of @code{functools.lru_cache} from python 3.3.")
11385 (license license:expat)))
11386
11387 (define-public python-configparser
11388 (package
11389 (name "python-configparser")
11390 (version "3.5.0")
11391 (source
11392 (origin
11393 (method url-fetch)
11394 (uri (string-append
11395 "https://bitbucket.org/ambv/configparser/get/"
11396 version ".tar.bz2"))
11397 (file-name (string-append name "-" version ".tar.gz"))
11398 (sha256
11399 (base32
11400 "0waq40as14abwzbb321hfz4vr1fi363nscy32ga14qvfygrg96wa"))))
11401 (build-system python-build-system)
11402 (home-page "http://docs.python.org/py3k/library/configparser.html")
11403 (synopsis "Backport of configparser from python 3.5")
11404 (description "@code{python-configparser} is a backport of
11405 @code{configparser} from Python 3.5 so that it can be used directly
11406 in other versions.")
11407 (license license:expat)))
11408
11409 (define-public python2-configparser
11410 (package-with-python2 python-configparser))
11411
11412 (define-public python-mando
11413 (package
11414 (name "python-mando")
11415 (version "0.6.4")
11416 (source (origin
11417 (method url-fetch)
11418 (uri (pypi-uri "mando" version))
11419 (sha256
11420 (base32
11421 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
11422 (build-system python-build-system)
11423 (propagated-inputs
11424 `(("python-rst2ansi" ,python-rst2ansi)
11425 ("python-six" ,python-six)))
11426 (native-inputs
11427 `(("python-pytest" ,python-pytest)))
11428 (home-page "https://mando.readthedocs.org/")
11429 (synopsis
11430 "Wrapper around argparse, allowing creation of complete CLI applications")
11431 (description
11432 "This package is a wrapper around argparse, allowing you to write complete CLI
11433 applications in seconds while maintaining all the flexibility.")
11434 (license license:expat)))
11435
11436 (define-public python2-mando
11437 (package-with-python2 python-mando))
11438
11439 (define-public python-fudge
11440 (package
11441 (name "python-fudge")
11442 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
11443 ;; package, which is currently the only use of this package.
11444 (version "0.9.6")
11445 (source
11446 (origin
11447 (method url-fetch)
11448 (uri (pypi-uri "fudge" version))
11449 (sha256
11450 (base32
11451 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
11452 (build-system python-build-system)
11453 (arguments
11454 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
11455 (home-page "https://github.com/fudge-py/fudge")
11456 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
11457 (description
11458 "Fudge is a Python module for using fake objects (mocks and stubs) to
11459 test real ones.
11460
11461 In readable Python code, you declare the methods available on your fake object
11462 and how they should be called. Then you inject that into your application and
11463 start testing. This declarative approach means you don’t have to record and
11464 playback actions and you don’t have to inspect your fakes after running code.
11465 If the fake object was used incorrectly then you’ll see an informative
11466 exception message with a traceback that points to the culprit.")
11467 (license license:expat)))
11468
11469 (define-public python2-fudge
11470 (package-with-python2 python-fudge))
11471
11472 (define-public python-mwclient
11473 (package
11474 (name "python-mwclient")
11475 (version "0.8.4")
11476 (source
11477 (origin
11478 (method url-fetch)
11479 ;; The PyPI version wouldn't contain tests.
11480 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
11481 "v" version ".tar.gz"))
11482 (file-name (string-append name "-" version ".tar.gz"))
11483 (sha256
11484 (base32
11485 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
11486 (build-system python-build-system)
11487 (propagated-inputs
11488 `(("python-requests" ,python-requests)
11489 ("python-requests-oauthlib"
11490 ,python-requests-oauthlib)
11491 ("python-six" ,python-six)))
11492 (native-inputs
11493 `(("python-mock" ,python-mock)
11494 ("python-pytest" ,python-pytest)
11495 ("python-pytest-pep8" ,python-pytest-pep8)
11496 ("python-pytest-cache" ,python-pytest-cache)
11497 ("python-pytest-cov" ,python-pytest-cov)
11498 ("python-responses" ,python-responses)))
11499 (home-page "https://github.com/btongminh/mwclient")
11500 (synopsis "MediaWiki API client")
11501 (description "This package provides a MediaWiki API client.")
11502 (license license:expat)))
11503
11504 (define-public python2-mwclient
11505 (package-with-python2 python-mwclient))
11506
11507 (define-public python-utils
11508 (package
11509 (name "python-utils")
11510 (version "2.1.0")
11511 (source (origin
11512 (method url-fetch)
11513 (uri (pypi-uri "python-utils" version))
11514 (sha256
11515 (base32
11516 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
11517 (build-system python-build-system)
11518 (native-inputs
11519 `(("pytest-runner" ,python-pytest-runner)
11520 ("pytest" ,python-pytest)
11521 ("six" ,python-six)))
11522 (home-page "https://github.com/WoLpH/python-utils")
11523 (synopsis "Convenient utilities not included with the standard Python install")
11524 (description
11525 "Python Utils is a collection of small Python functions and classes which
11526 make common patterns shorter and easier.")
11527 (license license:bsd-2)))
11528
11529 (define-public python2-utils
11530 (package-with-python2 python-utils))
11531
11532 (define-public python-sphinx-me
11533 (package
11534 (name "python-sphinx-me")
11535 (version "0.3")
11536 (source
11537 (origin
11538 (method url-fetch)
11539 (uri (pypi-uri "sphinx-me" version))
11540 (sha256
11541 (base32
11542 "06jzgp213zihnvpcy2y5jy3ykid3apc2ncp2pg6a2g05lhiziglq"))))
11543 (build-system python-build-system)
11544 (home-page "https://github.com/stephenmcd/sphinx-me")
11545 (synopsis "Create a Sphinx documentation shell")
11546 (description
11547 "Create a Sphinx documentation shell for your project and include the
11548 README file as the documentation index. It handles extracting the required
11549 meta data such as the project name, author and version from your project for
11550 use in your Sphinx docs.")
11551 (license license:bsd-2)))
11552
11553 (define-public python2-sphinx-me
11554 (package-with-python2 python-sphinx-me))
11555
11556 (define-public python-diff-match-patch
11557 (package
11558 (name "python-diff-match-patch")
11559 (version "20121119")
11560 (source
11561 (origin
11562 (method url-fetch)
11563 (uri (pypi-uri "diff-match-patch" version))
11564 (sha256
11565 (base32
11566 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
11567 (build-system python-build-system)
11568 (home-page "https://code.google.com/p/google-diff-match-patch")
11569 (synopsis "Synchronize plain text")
11570 (description "Diff Match and Patch libraries offer robust algorithms to
11571 perform the operations required for synchronizing plain text.")
11572 (license license:asl2.0)))
11573
11574 (define-public python2-diff-match-patch
11575 (package-with-python2 python-diff-match-patch))
11576
11577 (define-public python-dirsync
11578 (package
11579 (name "python-dirsync")
11580 (version "2.2.3")
11581 (source
11582 (origin
11583 (method url-fetch)
11584 (uri (pypi-uri "dirsync" version))
11585 (sha256
11586 (base32
11587 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
11588 (build-system python-build-system)
11589 (propagated-inputs
11590 `(("six" ,python-six)))
11591 (home-page "https://bitbucket.org/tkhyn/dirsync")
11592 (synopsis "Advanced directory tree synchronisation tool")
11593 (description "Advanced directory tree synchronisation tool.")
11594 (license license:expat)))
11595
11596 (define-public python2-dirsync
11597 (package-with-python2 python-dirsync))
11598
11599 (define-public python-levenshtein
11600 (package
11601 (name "python-levenshtein")
11602 (version "0.12.0")
11603 (source
11604 (origin
11605 (method url-fetch)
11606 (uri (pypi-uri "python-Levenshtein" version))
11607 (sha256
11608 (base32
11609 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
11610 (build-system python-build-system)
11611 (home-page "https://github.com/ztane/python-Levenshtein")
11612 (synopsis "Fast computation of Levenshtein distance and string similarity")
11613 (description
11614 "The Levenshtein Python C extension module contains functions for fast computation of
11615 @enumerate
11616 @item Levenshtein (edit) distance, and edit operations
11617 @item string similarity
11618 @item approximate median strings, and generally string averaging
11619 @item string sequence and set similarity
11620 @end enumerate
11621 It supports both normal and Unicode strings.")
11622 (license license:gpl2+)))
11623
11624 (define-public python2-levenshtein
11625 (package-with-python2 python-levenshtein))
11626
11627 (define-public python-scandir
11628 (package
11629 (name "python-scandir")
11630 (version "1.9.0")
11631 (source
11632 (origin
11633 (method url-fetch)
11634 (uri (pypi-uri "scandir" version))
11635 (sha256
11636 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
11637 (build-system python-build-system)
11638 (arguments
11639 `(#:phases (modify-phases %standard-phases
11640 (replace 'check
11641 (lambda _
11642 (invoke "python" "test/run_tests.py"))))))
11643 (home-page "https://github.com/benhoyt/scandir")
11644 (synopsis "Directory iteration function")
11645 (description
11646 "Directory iteration function like os.listdir(), except that instead of
11647 returning a list of bare filenames, it yields DirEntry objects that include
11648 file type and stat information along with the name. Using scandir() increases
11649 the speed of os.walk() by 2-20 times (depending on the platform and file
11650 system) by avoiding unnecessary calls to os.stat() in most cases.
11651
11652 This package is part of the Python standard library since version 3.5.")
11653 (license license:bsd-3)))
11654
11655 (define-public python2-scandir
11656 (package-with-python2 python-scandir))
11657
11658 (define-public python2-stemming
11659 (package
11660 (name "python2-stemming")
11661 (version "1.0.1")
11662 (source
11663 (origin
11664 (method url-fetch)
11665 (uri (pypi-uri "stemming" version))
11666 (sha256
11667 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
11668 (build-system python-build-system)
11669 (arguments
11670 `(#:python ,python-2))
11671 (home-page "https://bitbucket.org/mchaput/stemming/overview")
11672 (synopsis "Python implementations of various stemming algorithms")
11673 (description
11674 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
11675 stemming algorithms for English. These implementations are straightforward and
11676 efficient, unlike some Python versions of the same algorithms available on the
11677 Web. This package is an extraction of the stemming code included in the Whoosh
11678 search engine.")
11679 (license license:public-domain)))
11680
11681 (define-public python-factory-boy
11682 (package
11683 (name "python-factory-boy")
11684 (version "2.8.1")
11685 (source
11686 (origin
11687 (method url-fetch)
11688 (uri (pypi-uri "factory_boy" version))
11689 (sha256
11690 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
11691 (build-system python-build-system)
11692 (arguments
11693 ;; Tests are not included in the tarball.
11694 `(#:tests? #f))
11695 (propagated-inputs
11696 `(("faker" ,python-faker)))
11697 (home-page "https://github.com/benhoyt/scandir")
11698 (synopsis "Versatile test fixtures replacement")
11699 (description
11700 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
11701
11702 As a fixtures replacement tool, it aims to replace static, hard to maintain
11703 fixtures with easy-to-use factories for complex object.
11704
11705 Instead of building an exhaustive test setup with every possible combination
11706 of corner cases, factory_boy allows you to use objects customized for the
11707 current test, while only declaring the test-specific fields")
11708 (license license:expat)))
11709
11710 (define-public python2-factory-boy
11711 (package-with-python2 python-factory-boy))
11712
11713 (define-public python-translate-toolkit
11714 (package
11715 (name "python-translate-toolkit")
11716 (version "2.1.0")
11717 (source
11718 (origin
11719 (method url-fetch)
11720 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
11721 (sha256
11722 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
11723 (build-system python-build-system)
11724 (native-inputs
11725 `(("python-pytest" ,python-pytest)
11726 ("python-sphinx" ,python-sphinx)))
11727 (propagated-inputs
11728 `(("python-babel" ,python-babel)
11729 ("python-beautifulsoup4" ,python-beautifulsoup4)
11730 ("python-chardet" ,python-chardet)
11731 ("python-diff-match-patch" ,python-diff-match-patch)
11732 ("python-levenshtein" ,python-levenshtein)
11733 ("python-lxml" ,python-lxml)
11734 ("python-six" ,python-six)
11735 ("python-vobject" ,python-vobject)
11736 ("python-pyyaml" ,python-pyyaml)))
11737 (arguments
11738 ;; TODO: tests are not run, because they end with
11739 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
11740 ;; 'parse_funcs'
11741 ;; during test setup.
11742 `(#:tests? #f))
11743 (home-page "http://toolkit.translatehouse.org")
11744 (synopsis "Tools and API for translation and localization engineering")
11745 (description
11746 "Tools and API for translation and localization engineering. It contains
11747 several utilities, as well as an API for building localization tools.")
11748 (license license:gpl2+)))
11749
11750 (define-public python2-translate-toolkit
11751 (package-with-python2 python-translate-toolkit))
11752
11753 (define-public python-packaging
11754 (package
11755 (name "python-packaging")
11756 (version "18.0")
11757 (source
11758 (origin
11759 (method url-fetch)
11760 (uri (pypi-uri "packaging" version))
11761 (sha256
11762 (base32
11763 "01wq9c53ix5rz6qg2c98gy8n4ff768rmanifm8m5jpjiaizj51h8"))))
11764 (build-system python-build-system)
11765 (arguments
11766 `(#:phases (modify-phases %standard-phases
11767 (replace 'check
11768 (lambda _ (invoke "py.test" "-vv"))))))
11769 (native-inputs
11770 `(("python-pretend" ,python-pretend)
11771 ("python-pytest" ,python-pytest)))
11772 (propagated-inputs
11773 `(("python-pyparsing" ,python-pyparsing)
11774 ("python-six" ,python-six)))
11775 (home-page "https://github.com/pypa/packaging")
11776 (synopsis "Core utilities for Python packages")
11777 (description "Packaging is a Python module for dealing with Python packages.
11778 It offers an interface for working with package versions, names, and dependency
11779 information.")
11780 ;; From 'LICENSE': This software is made available under the terms of
11781 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
11782 ;; Contributions to this software is made under the terms of *both* these
11783 ;; licenses.
11784 (license (list license:asl2.0 license:bsd-2))))
11785
11786 (define-public python2-packaging
11787 (package-with-python2 python-packaging))
11788
11789 (define-public python-relatorio
11790 (package
11791 (name "python-relatorio")
11792 (version "0.8.0")
11793 (source
11794 (origin
11795 (method url-fetch)
11796 (uri (pypi-uri "relatorio" version))
11797 (sha256
11798 (base32
11799 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
11800 (build-system python-build-system)
11801 (propagated-inputs
11802 `(("python-lxml" ,python-lxml)
11803 ("python-genshi" ,python-genshi)))
11804 (native-inputs
11805 `(("python-magic" ,python-magic)))
11806 (home-page "https://relatorio.tryton.org/")
11807 (synopsis "Templating library able to output ODT and PDF files")
11808 (description "Relatorio is a templating library which provides a way to
11809 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
11810 for more filetypes can be easily added by creating plugins for them.")
11811 (license license:gpl3+)))
11812
11813 (define-public python2-relatorio
11814 (package-with-python2 python-relatorio))
11815
11816 (define-public python-radon
11817 (package
11818 (name "python-radon")
11819 (version "2.2.0")
11820 (source
11821 (origin
11822 (method url-fetch)
11823 (uri (pypi-uri "radon" version))
11824 (sha256
11825 (base32
11826 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
11827 (build-system python-build-system)
11828 (arguments
11829 `(#:phases (modify-phases %standard-phases
11830 (replace 'check
11831 (lambda _
11832 (invoke "python" "radon/tests/run.py"))))))
11833 (propagated-inputs
11834 `(("python-colorama" ,python-colorama)
11835 ("python-flake8-polyfill" ,python-flake8-polyfill)
11836 ("python-mando" ,python-mando)))
11837 (native-inputs
11838 `(("python-pytest" ,python-pytest)
11839 ("python-pytest-mock" ,python-pytest-mock)))
11840 (home-page "https://radon.readthedocs.org/")
11841 (synopsis "Code Metrics in Python")
11842 (description "Radon is a Python tool which computes various code metrics.
11843 Supported metrics are:
11844 @itemize @bullet
11845 @item raw metrics: SLOC, comment lines, blank lines, &c.
11846 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
11847 @item Halstead metrics (all of them)
11848 @item the Maintainability Index (a Visual Studio metric)
11849 @end itemize")
11850 (license license:expat)))
11851
11852 (define-public python2-radon
11853 (package-with-python2 python-radon))
11854
11855 (define-public python-sure
11856 (package
11857 (name "python-sure")
11858 (version "1.4.11")
11859 (source
11860 (origin
11861 (method url-fetch)
11862 (uri (pypi-uri "sure" version))
11863 (sha256
11864 (base32
11865 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
11866 (build-system python-build-system)
11867 (propagated-inputs
11868 `(("python-mock" ,python-mock)
11869 ("python-six" ,python-six)))
11870 (native-inputs
11871 `(("python-nose" ,python-nose)))
11872 (home-page "https://github.com/gabrielfalcao/sure")
11873 (synopsis "Automated testing library in python for python")
11874 (description
11875 "Sure is a python library that leverages a DSL for writing assertions.
11876 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
11877 (license license:gpl3+)))
11878
11879 (define-public python2-sure
11880 (package-with-python2 python-sure))
11881
11882 (define-public python2-couleur
11883 ;; This package does not seem to support python3 at all, hence,
11884 ;; only the python2 variant definition is provided.
11885 (package
11886 (name "python2-couleur")
11887 (version "0.6.2")
11888 (source
11889 (origin
11890 (method url-fetch)
11891 (uri (pypi-uri "couleur" version))
11892 (sha256
11893 (base32
11894 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
11895 (build-system python-build-system)
11896 (arguments
11897 `(#:python ,python-2))
11898 (home-page "https://github.com/gabrielfalcao/couleur")
11899 (synopsis
11900 "ANSI terminal tool for python, colored shell and other handy fancy features")
11901 (description
11902 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
11903 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
11904 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
11905 ;; https://github.com/gabrielfalcao/couleur/issues/11
11906 (license license:lgpl3+)))
11907
11908 (define-public python-misaka
11909 (package
11910 (name "python-misaka")
11911 (version "2.1.0")
11912 (source
11913 (origin
11914 (method url-fetch)
11915 (uri (pypi-uri "misaka" version))
11916 (sha256
11917 (base32
11918 "1yqrq3a5rracirmvk52n28nn6ckdaz897gnigv89a9gmyn87sqw7"))))
11919 (build-system python-build-system)
11920 (arguments
11921 `(;; Line 37 of setup.py calls self.run_command('develop')
11922 ;; in the 'check' phase. This command seems to be trying
11923 ;; to write to
11924 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
11925 ;; for which it does not have the permission to write.
11926 #:tests? #f))
11927 (propagated-inputs
11928 `(("python-cffi" ,python-cffi)))
11929 (home-page "https://github.com/FSX/misaka")
11930 (synopsis "Python binding for Hoedown")
11931 (description
11932 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
11933 library written in C. It features a fast HTML renderer and functionality to make custom
11934 renderers (e.g. man pages or LaTeX).")
11935 (license license:expat)))
11936
11937 (define-public python2-misaka
11938 (package-with-python2 python-misaka))
11939
11940 (define-public python2-steadymark
11941 ;; This is forced into being a python2 only variant
11942 ;; due to its dependence on couleur that has no support
11943 ;; for python3
11944 (package
11945 (name "python2-steadymark")
11946 (version "0.7.3")
11947 (source
11948 (origin
11949 (method url-fetch)
11950 (uri (pypi-uri "steadymark" version))
11951 (sha256
11952 (base32
11953 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
11954 (build-system python-build-system)
11955 (native-inputs
11956 `(("python-couleur" ,python2-couleur)
11957 ("python-sure" ,python2-sure)
11958 ("python-misaka" ,python2-misaka)))
11959 (arguments
11960 `(#:python ,python-2
11961 #:phases
11962 (modify-phases %standard-phases
11963 (add-before 'build 'patch-setup-py
11964 (lambda _
11965 ;; Update requirements from dependency==version
11966 ;; to dependency>=version
11967 (substitute* "setup.py"
11968 (("==") ">="))
11969 #t)))))
11970 (home-page "https://github.com/gabrielfalcao/steadymark")
11971 (synopsis "Markdown-based test runner for python")
11972 (description
11973 "@code{Steadymark} allows documentation to be written in github-flavoured
11974 markdown. The documentation may contain snippets of code surrounded by python
11975 code blocks and @code{Steadymark} will find these snippets and run them, making
11976 sure that there are no old malfunctional examples in the documentation examples.")
11977 (license license:expat)))
11978
11979 (define-public python-jsonpointer
11980 (package
11981 (name "python-jsonpointer")
11982 (version "1.10")
11983 (source
11984 (origin
11985 (method url-fetch)
11986 (uri (pypi-uri "jsonpointer" version))
11987 (sha256
11988 (base32
11989 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
11990 (build-system python-build-system)
11991 (home-page "https://github.com/stefankoegl/python-json-pointer")
11992 (synopsis "Identify specific nodes in a JSON document")
11993 (description "@code{jsonpointer} allows you to access specific nodes
11994 by path in a JSON document (see RFC 6901).")
11995 (license license:bsd-3)))
11996
11997 (define-public python2-jsonpointer
11998 (package-with-python2 python-jsonpointer))
11999
12000 (define-public python-jsonpatch
12001 (package
12002 (name "python-jsonpatch")
12003 (version "1.16")
12004 (source
12005 (origin
12006 (method url-fetch)
12007 ;; pypi version lacks tests.js
12008 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12009 "archive/v" version ".tar.gz"))
12010 (file-name (string-append name "-" version ".tar.gz"))
12011 (sha256
12012 (base32
12013 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
12014 (build-system python-build-system)
12015 (native-inputs
12016 `(("python-jsonpointer" ,python-jsonpointer)))
12017 (home-page "https://github.com/stefankoegl/python-json-patch")
12018 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
12019 (description "@code{jsonpatch} is a library and program that allows
12020 applying JSON Patches according to RFC 6902.")
12021 (license license:bsd-3)))
12022
12023 (define-public python2-jsonpatch
12024 (package-with-python2 python-jsonpatch))
12025
12026 (define-public python-jsonpatch-0.4
12027 (package (inherit python-jsonpatch)
12028 (name "python-jsonpatch")
12029 (version "0.4")
12030 (source
12031 (origin
12032 (method url-fetch)
12033 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12034 "archive/v" version ".tar.gz"))
12035 (file-name (string-append name "-" version ".tar.gz"))
12036 (sha256
12037 (base32
12038 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
12039
12040 (define-public python2-jsonpatch-0.4
12041 (package-with-python2 python-jsonpatch-0.4))
12042
12043 (define-public python-rfc3986
12044 (package
12045 (name "python-rfc3986")
12046 (version "1.1.0")
12047 (source (origin
12048 (method url-fetch)
12049 (uri (pypi-uri "rfc3986" version))
12050 (sha256
12051 (base32
12052 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
12053 (build-system python-build-system)
12054 (arguments
12055 `(#:modules ((guix build utils)
12056 (guix build python-build-system)
12057 (ice-9 ftw)
12058 (srfi srfi-1)
12059 (srfi srfi-26))
12060 #:phases
12061 (modify-phases %standard-phases
12062 (replace 'check
12063 (lambda _
12064 (let ((cwd (getcwd)))
12065 (setenv "PYTHONPATH"
12066 (string-append cwd "/build/"
12067 (find (cut string-prefix? "lib" <>)
12068 (scandir (string-append cwd "/build")))
12069 ":"
12070 (getenv "PYTHONPATH")))
12071 (invoke "pytest" "-v")))))))
12072 (native-inputs
12073 `(("python-pytest" ,python-pytest)))
12074 (home-page "https://rfc3986.readthedocs.io/")
12075 (synopsis "Parse and validate URI references")
12076 (description
12077 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
12078 validation and authority parsing. This module also supports RFC@tie{}6874
12079 which adds support for zone identifiers to IPv6 addresses.")
12080 (license license:asl2.0)))
12081
12082 (define-public python2-rfc3986
12083 (package-with-python2 python-rfc3986))
12084
12085 (define-public python-rfc3987
12086 (package
12087 (name "python-rfc3987")
12088 (version "1.3.7")
12089 (source
12090 (origin
12091 (method url-fetch)
12092 (uri (pypi-uri "rfc3987" version))
12093 (sha256
12094 (base32
12095 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
12096 (build-system python-build-system)
12097 (home-page "https://pypi.python.org/pypi/rfc3987")
12098 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
12099 (description "@code{rfc3987} provides routines for parsing and
12100 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
12101 (license license:gpl3+)))
12102
12103 (define-public python2-rfc3987
12104 (package-with-python2 python-rfc3987))
12105
12106 (define-public python-validate-email
12107 (package
12108 (name "python-validate-email")
12109 (version "1.3")
12110 (source
12111 (origin
12112 (method url-fetch)
12113 (uri (pypi-uri "validate_email" version))
12114 (sha256
12115 (base32
12116 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
12117 (build-system python-build-system)
12118 (home-page "https://github.com/syrusakbary/validate_email")
12119 (synopsis "Verifies if an email address is valid and really exists")
12120 (description "@code{validate_email} can be used to verify if an email
12121 address is valid and really exists.")
12122 (license license:lgpl3+)))
12123
12124 (define-public python2-validate-email
12125 (package-with-python2 python-validate-email))
12126
12127 (define-public python-flex
12128 (package
12129 (name "python-flex")
12130 (version "6.10.0")
12131 (source
12132 (origin
12133 (method url-fetch)
12134 (uri (pypi-uri "flex" version))
12135 (sha256
12136 (base32
12137 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
12138 (build-system python-build-system)
12139 (propagated-inputs
12140 `(("python-click" ,python-click)
12141 ("python-iso8601" ,python-iso8601)
12142 ("python-jsonpointer" ,python-jsonpointer)
12143 ("python-pyyaml" ,python-pyyaml)
12144 ("python-requests" ,python-requests)
12145 ("python-rfc3987" ,python-rfc3987)
12146 ("python-six" ,python-six)
12147 ("python-validate-email" ,python-validate-email)))
12148 (home-page "https://github.com/pipermerriam/flex")
12149 (synopsis "Validates Swagger schemata")
12150 (description "@code{flex} can be used to validate Swagger schemata.")
12151 (license license:bsd-3)))
12152
12153 (define-public python2-flex
12154 (package-with-python2 python-flex))
12155
12156 (define-public python-marshmallow
12157 (package
12158 (name "python-marshmallow")
12159 (version "3.0.0b14")
12160 (source
12161 (origin
12162 (method url-fetch)
12163 (uri (pypi-uri "marshmallow" version))
12164 (sha256
12165 (base32
12166 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
12167 (build-system python-build-system)
12168 (propagated-inputs
12169 `(("python-dateutil" ,python-dateutil)
12170 ("python-simplejson" ,python-simplejson)))
12171 (native-inputs
12172 `(("python-pytest" ,python-pytest)
12173 ("python-pytz" ,python-pytz)))
12174 (home-page "https://github.com/marshmallow-code/marshmallow")
12175 (synopsis "Convert complex datatypes to and from native
12176 Python datatypes.")
12177 (description "@code{marshmallow} provides a library for converting
12178 complex datatypes to and from native Python datatypes.")
12179 (license license:expat)))
12180
12181 (define-public python2-marshmallow
12182 (package-with-python2 python-marshmallow))
12183
12184 (define-public python-apispec
12185 (package
12186 (name "python-apispec")
12187 (version "0.25.3")
12188 (source
12189 (origin
12190 (method url-fetch)
12191 (uri (pypi-uri "apispec" version))
12192 (sha256
12193 (base32
12194 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
12195 (build-system python-build-system)
12196 (propagated-inputs
12197 `(("python-pyyaml" ,python-pyyaml)))
12198 (native-inputs
12199 `(("python-pytest" ,python-pytest)
12200 ("python-flask" ,python-flask)
12201 ("python-marshmallow" ,python-marshmallow)
12202 ("python-tornado" ,python-tornado)
12203 ("python-bottle" ,python-bottle)
12204 ("python-mock" ,python-mock)))
12205 (home-page "https://github.com/marshmallow-code/apispec")
12206 (synopsis "Swagger 2.0 API specification generator")
12207 (description "@code{python-apispec} is a pluggable API specification
12208 generator. Currently supports the OpenAPI specification (f.k.a.
12209 Swagger 2.0).")
12210 (license license:expat)))
12211
12212 (define-public python2-apispec
12213 (package-with-python2 python-apispec))
12214
12215 (define-public python-flasgger
12216 (package
12217 (name "python-flasgger")
12218 (version "0.6.3")
12219 (source
12220 (origin
12221 (method url-fetch)
12222 (uri (string-append "https://github.com/rochacbruno/flasgger/archive/"
12223 version ".tar.gz"))
12224 (file-name (string-append name "-" version ".tar.gz"))
12225 (sha256
12226 (base32
12227 "1gqzlm0rb55fdpsy5ipkganlx9cnpi454fqyycr03jm22zql14ay"))))
12228 (build-system python-build-system)
12229 (arguments
12230 `(#:phases
12231 (modify-phases %standard-phases
12232 (replace 'check
12233 (lambda* (#:key inputs outputs #:allow-other-keys)
12234 (substitute* "Makefile"
12235 (("flake8 flasgger --ignore=F403")
12236 "flake8 flasgger --ignore=E731,F403"))
12237 (setenv "PYTHONPATH" (string-append (getcwd)
12238 ":"
12239 (getenv "PYTHONPATH")))
12240 (invoke "py.test"))))))
12241 (propagated-inputs
12242 `(("python-flask" ,python-flask)
12243 ("python-pyyaml" ,python-pyyaml)
12244 ("python-jsonschema" ,python-jsonschema)
12245 ("python-mistune" ,python-mistune)
12246 ("python-six" ,python-six)))
12247 (native-inputs
12248 `(("python-decorator" ,python-decorator)
12249 ("python-flake8" ,python-flake8)
12250 ("python-flask-restful" ,python-flask-restful)
12251 ("python-flex" ,python-flex)
12252 ("python-pytest" ,python-pytest)
12253 ("python-pytest-cov" ,python-pytest-cov)
12254 ("python-marshmallow" ,python-marshmallow)
12255 ("python-apispec" ,python-apispec)))
12256 (home-page "https://github.com/rochacbruno/flasgger/")
12257 (synopsis "Extract Swagger specs from your Flask project")
12258 (description "@code{python-flasgger} allows extracting Swagger specs
12259 from your Flask project. It is a fork of Flask-Swagger.")
12260 (license license:expat)))
12261
12262 (define-public python2-flasgger
12263 (package-with-python2 python-flasgger))
12264
12265 (define-public python-swagger-spec-validator
12266 (package
12267 (name "python-swagger-spec-validator")
12268 (version "2.1.0")
12269 (source
12270 (origin
12271 (method url-fetch)
12272 (uri (pypi-uri "swagger-spec-validator" version))
12273 (sha256
12274 (base32
12275 "13hkpn2lycwr0468yqhjb3kwszqf7hjwlq61w7vdxq1caz31k4nw"))))
12276 (build-system python-build-system)
12277 (propagated-inputs
12278 `(("python-jsonschema" ,python-jsonschema)
12279 ("python-six" ,python-six)))
12280 (home-page
12281 "https://github.com/Yelp/swagger_spec_validator")
12282 (synopsis "Validation of Swagger specifications")
12283 (description "@code{swagger_spec_validator} provides a library for
12284 validating Swagger API specifications.")
12285 (license license:asl2.0)))
12286
12287 (define-public python2-swagger-spec-validator
12288 (package-with-python2 python-swagger-spec-validator))
12289
12290 (define-public python-apache-libcloud
12291 (package
12292 (name "python-apache-libcloud")
12293 (version "2.4.0")
12294 (source
12295 (origin
12296 (method url-fetch)
12297 (uri (pypi-uri "apache-libcloud" version))
12298 (sha256
12299 (base32
12300 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
12301 (build-system python-build-system)
12302 (arguments
12303 `(#:phases
12304 (modify-phases %standard-phases
12305 (add-after 'unpack 'patch-ssh
12306 (lambda* (#:key inputs #:allow-other-keys)
12307 (substitute* "libcloud/compute/ssh.py"
12308 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
12309 "/bin/ssh" "'")))
12310 #t))
12311 (add-after 'unpack 'patch-tests
12312 (lambda _
12313 (substitute* "./libcloud/test/test_file_fixtures.py"
12314 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
12315 (("def _ascii") "def _raw_data(self, method, url, body, headers):
12316 return (httplib.OK,
12317 \"1234abcd\",
12318 {\"test\": \"value\"},
12319 httplib.responses[httplib.OK])
12320 def _ascii"))
12321 (substitute* "libcloud/test/compute/test_ssh_client.py"
12322 (("class ShellOutSSHClientTests")
12323 "@unittest.skip(\"Guix container doesn't have ssh service\")
12324 class ShellOutSSHClientTests")
12325 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
12326 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
12327 (("'.xF0', '.x90', '.x8D', '.x88'")
12328 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
12329 #t))
12330 (add-before 'check 'copy-secret
12331 (lambda _
12332 (copy-file "libcloud/test/secrets.py-dist"
12333 "libcloud/test/secrets.py")
12334 #t)))))
12335 (inputs
12336 `(("openssh" ,openssh)))
12337 (propagated-inputs
12338 `(("python-paramiko" ,python-paramiko)
12339 ("python-requests" ,python-requests)))
12340 (native-inputs
12341 `(("python-lockfile" ,python-lockfile)
12342 ("python-mock" ,python-mock)
12343 ("python-pytest" ,python-pytest)
12344 ("python-pytest-runner" ,python-pytest-runner)
12345 ("python-requests-mock" ,python-requests-mock)))
12346 (home-page "https://libcloud.apache.org/")
12347 (synopsis "Unified Cloud API")
12348 (description "@code{libcloud} is a Python library for interacting with
12349 many of the popular cloud service providers using a unified API.")
12350 (license license:asl2.0)))
12351
12352 (define-public python2-apache-libcloud
12353 (package-with-python2 python-apache-libcloud))
12354
12355 (define-public python-smmap2
12356 (package
12357 (name "python-smmap2")
12358 (version "2.0.3")
12359 (source
12360 (origin
12361 (method url-fetch)
12362 (uri (pypi-uri "smmap2" version))
12363 (sha256
12364 (base32
12365 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
12366 (build-system python-build-system)
12367 (native-inputs
12368 `(("python-nosexcover" ,python-nosexcover)))
12369 (home-page "https://github.com/Byron/smmap")
12370 (synopsis "Python sliding window memory map manager")
12371 (description "@code{smmap2} is a pure Python implementation of a sliding
12372 window memory map manager.")
12373 (license license:bsd-3)))
12374
12375 (define-public python2-smmap2
12376 (package-with-python2 python-smmap2))
12377
12378 (define-public python-regex
12379 (package
12380 (name "python-regex")
12381 (version "2017.06.07")
12382 (source (origin
12383 (method url-fetch)
12384 (uri (pypi-uri "regex" version))
12385 (sha256
12386 (base32
12387 "06r6b7yigikbj3a72whl85r2b64pj1r0ypmw9yalmkm0wnxq8mz4"))))
12388 (build-system python-build-system)
12389 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
12390 (synopsis "Alternative regular expression module")
12391 (description "This regular expression implementation is backwards-
12392 compatible with the standard @code{re} module, but offers additional
12393 functionality like full case-folding for case-insensitive matches in Unicode.")
12394 (license license:psfl)))
12395
12396 (define-public python2-regex
12397 (package-with-python2 python-regex))
12398
12399 (define-public python2-pyopengl
12400 (package
12401 (name "python2-pyopengl")
12402 (version "3.1.0")
12403 (source
12404 (origin
12405 (method url-fetch)
12406 (uri (pypi-uri "PyOpenGL" version))
12407 (sha256
12408 (base32
12409 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
12410 (arguments
12411 `(#:python ,python-2))
12412 (build-system python-build-system)
12413 (home-page "http://pyopengl.sourceforge.net")
12414 (synopsis "Standard OpenGL bindings for Python")
12415 (description
12416 "PyOpenGL is the most common cross platform Python binding to OpenGL and
12417 related APIs. The binding is created using the standard @code{ctypes}
12418 library.")
12419 (license license:bsd-3)))
12420
12421 (define-public python2-pyopengl-accelerate
12422 (package
12423 (inherit python2-pyopengl)
12424 (name "python2-pyopengl-accelerate")
12425 (version "3.1.0")
12426 (source
12427 (origin
12428 (method url-fetch)
12429 (uri (pypi-uri "PyOpenGL-accelerate" version))
12430 (sha256
12431 (base32
12432 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
12433 (synopsis "Acceleration code for PyOpenGL")
12434 (description
12435 "This is the Cython-coded accelerator module for PyOpenGL.")))
12436
12437 (define-public python-rencode
12438 (package
12439 (name "python-rencode")
12440 (version "1.0.5")
12441 (source
12442 (origin
12443 (method url-fetch)
12444 (uri (pypi-uri "rencode" version))
12445 (sha256
12446 (base32
12447 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
12448 (build-system python-build-system)
12449 (arguments
12450 `(#:phases
12451 (modify-phases %standard-phases
12452 (add-before 'check 'delete-bogus-test
12453 ;; This test requires /home/aresch/Downloads, which is not provided by
12454 ;; the build environment.
12455 (lambda _
12456 (delete-file "rencode/t.py")
12457 #t)))))
12458 (native-inputs `(("pkg-config" ,pkg-config)
12459 ("python-cython" ,python-cython)))
12460 (home-page "https://github.com/aresch/rencode")
12461 (synopsis "Serialization of heterogeneous data structures")
12462 (description
12463 "The @code{rencode} module is a data structure serialization library,
12464 similar to @code{bencode} from the BitTorrent project. For complex,
12465 heterogeneous data structures with many small elements, r-encoding stake up
12466 significantly less space than b-encodings. This version of rencode is a
12467 complete rewrite in Cython to attempt to increase the performance over the
12468 pure Python module.")
12469 (license license:bsd-3)))
12470
12471 (define-public python2-rencode
12472 (package-with-python2 python-rencode))
12473
12474 (define-public python-xenon
12475 (package
12476 (name "python-xenon")
12477 (version "0.5.4")
12478 (source
12479 (origin
12480 (method url-fetch)
12481 (uri (pypi-uri "xenon" version))
12482 (sha256
12483 (base32
12484 "029cbhysg2vr5n4jz8gpg2793f8wkwnqpr1qgv6c1dn685vy31mc"))))
12485 (build-system python-build-system)
12486 (native-inputs
12487 `(("python-pyyaml" ,python-pyyaml)
12488 ("python-radon" ,python-radon)
12489 ("python-requests" ,python-requests)
12490 ("python-flake8" ,python-flake8)
12491 ("python-tox" ,python-tox)))
12492 (arguments
12493 `(#:phases
12494 (modify-phases %standard-phases
12495 (add-before 'build 'patch-test-requirements
12496 (lambda _
12497 ;; Remove httpretty dependency for tests.
12498 (substitute* "setup.py"
12499 (("httpretty") ""))
12500 #t)))))
12501 (home-page "https://xenon.readthedocs.org/")
12502 (synopsis "Monitor code metrics for Python on your CI server")
12503 (description
12504 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
12505 Ideally, @code{xenon} is run every time code is committed. Through command
12506 line options, various thresholds can be set for the complexity of code. It
12507 will fail (i.e. it will exit with a non-zero exit code) when any of these
12508 requirements is not met.")
12509 (license license:expat)))
12510
12511 (define-public python2-xenon
12512 (package-with-python2 python-xenon))
12513
12514 (define-public python-pysocks
12515 (package
12516 (name "python-pysocks")
12517 (version "1.6.8")
12518 (source
12519 (origin
12520 (method url-fetch)
12521 (uri (pypi-uri "PySocks" version))
12522 (sha256
12523 (base32
12524 "0wn6xafwy9c1gamwljw3fyvih5w19qy9xp39zmv8c90ai5ajrr9z"))))
12525 (build-system python-build-system)
12526 (arguments `(#:tests? #f))
12527 (home-page "https://github.com/Anorov/PySocks")
12528 (synopsis "SOCKS client module")
12529 (description "@code{pysocks} is an updated and semi-actively maintained
12530 version of @code{SocksiPy} with bug fixes and extra features.")
12531 (license license:bsd-3)))
12532
12533 (define-public python2-pysocks
12534 (package-with-python2 python-pysocks))
12535
12536 (define-public python-pydiff
12537 (package
12538 (name "python-pydiff")
12539 (version "0.2")
12540 (source
12541 (origin
12542 (method url-fetch)
12543 (uri (pypi-uri "pydiff" version))
12544 (sha256
12545 (base32
12546 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
12547 (build-system python-build-system)
12548 (home-page "https://github.com/myint/pydiff")
12549 (synopsis "Library to diff two Python files at the bytecode level")
12550 (description
12551 "@code{pydiff} makes it easy to look for actual code changes while
12552 ignoring formatting changes.")
12553 (license license:expat)))
12554
12555 (define-public python2-pydiff
12556 (package-with-python2 python-pydiff))
12557
12558 (define-public python-tqdm
12559 (package
12560 (name "python-tqdm")
12561 (version "4.19.6")
12562 (source
12563 (origin
12564 (method url-fetch)
12565 (uri (pypi-uri "tqdm" version))
12566 (sha256
12567 (base32
12568 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
12569 (build-system python-build-system)
12570 (native-inputs
12571 `(("python-flake8" ,python-flake8)
12572 ("python-nose" ,python-nose)
12573 ("python-coverage" ,python-coverage)))
12574 (home-page "https://github.com/tqdm/tqdm")
12575 (synopsis "Fast, extensible progress meter")
12576 (description
12577 "Make loops show a progress bar on the console by just wrapping any
12578 iterable with @code{|tqdm(iterable)|}. Offers many options to define
12579 design and layout.")
12580 (license (list license:mpl2.0 license:expat))))
12581
12582 (define-public python2-tqdm
12583 (package-with-python2 python-tqdm))
12584
12585 (define-public python-pkginfo
12586 (package
12587 (name "python-pkginfo")
12588 (version "1.4.2")
12589 (source
12590 (origin
12591 (method url-fetch)
12592 (uri (pypi-uri "pkginfo" version))
12593 (sha256
12594 (base32
12595 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
12596 (build-system python-build-system)
12597 (arguments
12598 ;; The tests are broken upstream.
12599 '(#:tests? #f))
12600 (home-page
12601 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
12602 (synopsis
12603 "Query metadatdata from sdists, bdists, and installed packages")
12604 (description
12605 "API to query the distutils metadata written in @file{PKG-INFO} inside a
12606 source distriubtion (an sdist) or a binary distribution (e.g., created by
12607 running bdist_egg). It can also query the EGG-INFO directory of an installed
12608 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
12609 created by running @code{python setup.py develop}).")
12610 (license license:expat)))
12611
12612 (define-public python2-pkginfo
12613 (package-with-python2 python-pkginfo))
12614
12615 (define-public python-twine
12616 (package
12617 (name "python-twine")
12618 (version "1.9.1")
12619 (source
12620 (origin
12621 (method url-fetch)
12622 (uri (pypi-uri "twine" version))
12623 (sha256
12624 (base32
12625 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
12626 (build-system python-build-system)
12627 (propagated-inputs
12628 `(("python-tqdm" ,python-tqdm)
12629 ("python-pkginfo" ,python-pkginfo)
12630 ("python-requests" ,python-requests)
12631 ("python-requests-toolbelt" ,python-requests-toolbelt)))
12632 (home-page "https://github.com/pypa/twine")
12633 (synopsis "Collection of utilities for interacting with PyPI")
12634 (description
12635 "@code{twine} currently supports registering projects and uploading
12636 distributions. It authenticates the user over HTTPS, allows them to pre-sign
12637 their files and supports any packaging format (including wheels).")
12638 (license license:asl2.0)))
12639
12640 (define-public python2-twine
12641 (package-with-python2 python-twine))
12642
12643 (define-public python-linecache2
12644 (package
12645 (name "python-linecache2")
12646 (version "1.0.0")
12647 (source
12648 (origin
12649 (method url-fetch)
12650 (uri (pypi-uri "linecache2" version))
12651 (sha256
12652 (base32
12653 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
12654 (build-system python-build-system)
12655 (arguments
12656 `(;; The tests depend on unittest2, and our version is a bit too old.
12657 #:tests? #f))
12658 (native-inputs
12659 `(("python-pbr" ,python-pbr-minimal)))
12660 (home-page
12661 "https://github.com/testing-cabal/linecache2")
12662 (synopsis "Backports of the linecache module")
12663 (description
12664 "The linecache module allows one to get any line from any file, while
12665 attempting to optimize internally, using a cache, the common case where many
12666 lines are read from a single file.")
12667 (license license:psfl)))
12668
12669 (define-public python2-linecache2
12670 (package-with-python2 python-linecache2))
12671
12672 (define-public python-traceback2
12673 (package
12674 (name "python-traceback2")
12675 (version "1.4.0")
12676 (source
12677 (origin
12678 (method url-fetch)
12679 (uri (pypi-uri "traceback2" version))
12680 (sha256
12681 (base32
12682 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
12683 (build-system python-build-system)
12684 (arguments
12685 `(;; python-traceback2 and python-unittest2 depend on one another.
12686 #:tests? #f))
12687 (native-inputs
12688 `(("python-pbr" ,python-pbr-minimal)))
12689 (propagated-inputs
12690 `(("python-linecache2" ,python-linecache2)))
12691 (home-page
12692 "https://github.com/testing-cabal/traceback2")
12693 (synopsis "Backports of the traceback module")
12694 (description
12695 "This module provides a standard interface to extract, format and print
12696 stack traces of Python programs. It exactly mimics the behavior of the Python
12697 interpreter when it prints a stack trace.")
12698 (license license:psfl)))
12699
12700 (define-public python2-traceback2
12701 (package-with-python2 python-traceback2))
12702
12703 (define-public python-ratelimiter
12704 (package
12705 (name "python-ratelimiter")
12706 (version "1.2.0")
12707 (source
12708 (origin
12709 (method url-fetch)
12710 (uri (pypi-uri "ratelimiter" version))
12711 (sha256
12712 (base32
12713 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
12714 (build-system python-build-system)
12715 (arguments
12716 '(#:tests? #f)) ; There are no tests in the pypi archive.
12717 (home-page "https://github.com/RazerM/ratelimiter")
12718 (synopsis "Simple rate limiting object")
12719 (description
12720 "The @code{ratelimiter} module ensures that an operation will not be
12721 executed more than a given number of times during a given period.")
12722 (license license:asl2.0)))
12723
12724 (define-public python2-ratelimiter
12725 (package-with-python2 python-ratelimiter))
12726
12727 (define-public python-dukpy
12728 (package
12729 (name "python-dukpy")
12730 (version "0.3")
12731 (source
12732 (origin
12733 (method url-fetch)
12734 (uri (string-append "https://github.com/kovidgoyal/dukpy/archive/v"
12735 version ".tar.gz"))
12736 (file-name (string-append name "-" version ".tar.gz"))
12737 (sha256
12738 (base32
12739 "0pj39rfwlzivqm5hkrsza7gssg6ggpxlq5ivc8f3h7x5pfgc6y6c"))))
12740 (build-system python-build-system)
12741 (home-page "https://github.com/kovidgoyal/dukpy")
12742 (synopsis "Run JavaScript in python")
12743 (description
12744 "dukpy is a JavaScript runtime environment for Python using the duktape
12745 embeddable JavaScript engine.")
12746 ;; Dukpy is licensed under MIT like the embedded duktape library,
12747 ;; with 'errors.c' as GPL3.
12748 (license (list license:expat license:gpl3))))
12749
12750 (define-public python2-dukpy
12751 (package-with-python2 python-dukpy))
12752
12753 (define-public python-jsonrpclib-pelix
12754 (package
12755 (name "python-jsonrpclib-pelix")
12756 (version "0.3.2")
12757 (source
12758 (origin
12759 (method url-fetch)
12760 (uri (pypi-uri "jsonrpclib-pelix" version))
12761 (sha256
12762 (base32
12763 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
12764 (build-system python-build-system)
12765 (arguments
12766 `(#:tests? #f)) ; no tests in PyPI tarball
12767 (home-page "https://github.com/tcalmant/jsonrpclib/")
12768 (synopsis "JSON-RPC 2.0 client library for Python")
12769 (description
12770 "This library implements the JSON-RPC v2.0
12771 specification (backwards-compatible) as a client library for Python. This
12772 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
12773 services.")
12774 (license license:asl2.0)))
12775
12776 (define-public python2-jsonrpclib-pelix
12777 (package-with-python2 python-jsonrpclib-pelix))
12778
12779 (define-public python-setuptools-scm-git-archive
12780 (package
12781 (name "python-setuptools-scm-git-archive")
12782 (version "1.0")
12783 (source
12784 (origin
12785 (method url-fetch)
12786 (uri (pypi-uri "setuptools_scm_git_archive" version))
12787 (sha256
12788 (base32
12789 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
12790 (build-system python-build-system)
12791 (native-inputs
12792 `(("python-pytest" ,python-pytest)))
12793 (propagated-inputs
12794 `(("python-setuptools-scm" ,python-setuptools-scm)))
12795 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
12796 (synopsis "Setuptools_scm plugin for git archives")
12797 (description
12798 "The setuptools_scm_git_archive package is a plugin to
12799 setuptools_scm, which supports obtaining versions from git archives that
12800 belong to tagged versions.")
12801 (license license:expat)))
12802
12803 (define-public python2-setuptools-scm-git-archive
12804 (package-with-python2 python-setuptools-scm-git-archive))
12805
12806 (define-public python-pyclipper
12807 (package
12808 (name "python-pyclipper")
12809 (version "1.1.0.post1")
12810 (source
12811 (origin
12812 (method url-fetch)
12813 (uri (pypi-uri "pyclipper" version ".zip"))
12814 (sha256
12815 (base32
12816 "0ldbkbnx94an4zzrwb1sxmg6k0jgk4cwmvcdyy8y5k1zslc612wa"))
12817 (modules '((guix build utils)))
12818 (snippet
12819 '(begin
12820 ;; This file is generated by Cython.
12821 (delete-file "pyclipper/pyclipper.cpp") #t))))
12822 (build-system python-build-system)
12823 (arguments
12824 `(#:phases
12825 (modify-phases %standard-phases
12826 (add-before 'build 'cythonize-sources
12827 (lambda _
12828 (with-directory-excursion "pyclipper"
12829 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
12830 (propagated-inputs
12831 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
12832 (native-inputs
12833 `(("python-cython" ,python-cython)
12834 ("python-pytest" ,python-pytest)
12835 ("python-pytest-runner" ,python-pytest-runner)
12836 ("python-unittest2" ,python-unittest2)
12837 ("unzip" ,unzip)))
12838 (home-page "https://github.com/greginvm/pyclipper")
12839 (synopsis "Wrapper for Angus Johnson's Clipper library")
12840 (description
12841 "Pyclipper is a Cython wrapper for the C++ translation of the
12842 Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
12843 (license license:expat)))
12844
12845 (define-public python2-pyclipper
12846 (package-with-python2 python-pyclipper))
12847
12848 (define-public python2-booleanoperations
12849 (package
12850 (name "python2-booleanoperations")
12851 (version "0.7.1")
12852 (source
12853 (origin
12854 (method url-fetch)
12855 (uri (pypi-uri "booleanOperations" version ".zip"))
12856 (sha256
12857 (base32
12858 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
12859 (build-system python-build-system)
12860 (arguments
12861 `(#:python ,python-2))
12862 (native-inputs
12863 `(("unzip" ,unzip)
12864 ("python2-pytest" ,python2-pytest)
12865 ("python2-pytest-runner" ,python2-pytest-runner)))
12866 (propagated-inputs
12867 `(("python-fonttools" ,python2-fonttools)
12868 ("python-pyclipper" ,python2-pyclipper)
12869 ("python-ufolib" ,python2-ufolib)))
12870 (home-page "https://github.com/typemytype/booleanOperations")
12871 (synopsis "Boolean operations on paths")
12872 (description
12873 "BooleanOperations provides a Python library that enables
12874 boolean operations on paths.")
12875 (license license:expat)))
12876
12877 (define-public python-tempdir
12878 (package
12879 (name "python-tempdir")
12880 (version "0.7.1")
12881 (source
12882 (origin
12883 (method url-fetch)
12884 (uri (pypi-uri "tempdir" version))
12885 (sha256
12886 (base32
12887 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
12888 (build-system python-build-system)
12889 (home-page "https://pypi.org/project/tempdir/")
12890 (arguments
12891 ;; the package has no tests
12892 '(#:tests? #f))
12893 (synopsis "Python library for managing temporary directories")
12894 (description
12895 "This library manages temporary directories that are automatically
12896 deleted with all their contents when they are no longer needed. It is
12897 particularly convenient for use in tests.")
12898 (license license:expat)))
12899
12900 (define-public python2-tempdir
12901 (package-with-python2 python-tempdir))
12902
12903 (define-public python-activepapers
12904 (package
12905 (name "python-activepapers")
12906 (version "0.2.2")
12907 (source
12908 (origin
12909 (method url-fetch)
12910 (uri (pypi-uri "ActivePapers.Py" version))
12911 (sha256
12912 (base32
12913 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
12914 (build-system python-build-system)
12915 (arguments
12916 `(#:modules ((ice-9 ftw)
12917 (srfi srfi-1)
12918 (guix build utils)
12919 (guix build python-build-system))
12920
12921 #:phases
12922 (modify-phases %standard-phases
12923 (add-after 'unpack 'delete-python2-code
12924 (lambda _
12925 (for-each delete-file
12926 '("lib/activepapers/builtins2.py"
12927 "lib/activepapers/standardlib2.py"
12928 "lib/activepapers/utility2.py"))))
12929 (replace 'check
12930 (lambda _
12931 ;; Deactivate the test cases that download files
12932 (setenv "NO_NETWORK_ACCESS" "1")
12933 ;; For some strange reason, some tests fail if nosetests runs all
12934 ;; test modules in a single execution. They pass if each test
12935 ;; module is run individually.
12936 (for-each (lambda (filename)
12937 (invoke "nosetests"
12938 (string-append "tests/" filename)))
12939 (scandir "tests"
12940 (lambda (filename)
12941 (string-suffix? ".py" filename)))))))))
12942 (native-inputs
12943 `(("python-tempdir" ,python-tempdir)
12944 ("python-nose" ,python-nose)))
12945 (propagated-inputs
12946 `(("python-h5py" ,python-h5py)))
12947 (home-page "http://www.activepapers.org/")
12948 (synopsis "Executable papers for scientific computing")
12949 (description
12950 "ActivePapers is a tool for working with executable papers, which
12951 combine data, code, and documentation in single-file packages,
12952 suitable for publication as supplementary material or on repositories
12953 such as figshare or Zenodo.")
12954 (properties `((python2-variant . ,(delay python2-activepapers))))
12955 (license license:bsd-3)))
12956
12957 (define-public python2-activepapers
12958 (let ((base (package-with-python2
12959 (strip-python2-variant python-activepapers))))
12960 (package
12961 (inherit base)
12962 (arguments
12963 (substitute-keyword-arguments (package-arguments base)
12964 ((#:phases phases)
12965 `(modify-phases ,phases
12966 (delete 'delete-python2-code)
12967 (add-after 'unpack 'delete-python3-code
12968 (lambda _
12969 (for-each delete-file
12970 '("lib/activepapers/builtins3.py"
12971 "lib/activepapers/standardlib3.py"
12972 "lib/activepapers/utility3.py")))))))))))
12973
12974 (define-public python-semver
12975 (package
12976 (name "python-semver")
12977 (version "2.7.9")
12978 (source
12979 (origin
12980 (method url-fetch)
12981 (uri (pypi-uri "semver" version))
12982 (sha256
12983 (base32
12984 "0hhgqppchv59rqj0yzi1prdg2nfsywqmjsqy2rycyxm0hvxmbyqz"))))
12985 (build-system python-build-system)
12986 (arguments
12987 `(#:phases
12988 (modify-phases %standard-phases
12989 (add-after 'unpack 'patch-test-requirements
12990 (lambda _
12991 (substitute* "setup.py"
12992 ;; Our Python is new enough.
12993 (("'virtualenv<14\\.0\\.0'") "'virtualenv'"))
12994 #t)))))
12995 (native-inputs
12996 `(("python-tox" ,python-tox)
12997 ("python-virtualenv" ,python-virtualenv)))
12998 (home-page "https://github.com/k-bx/python-semver")
12999 (synopsis "Python helper for Semantic Versioning")
13000 (description "This package provides a Python library for
13001 @url{Semantic Versioning, http://semver.org/}.")
13002 (license license:bsd-3)))
13003
13004 (define-public python2-semver
13005 (package-with-python2 python-semver))
13006
13007 (define-public python-pyro4
13008 (package
13009 (name "python-pyro4")
13010 (version "4.74")
13011 (source
13012 (origin
13013 (method url-fetch)
13014 (uri (pypi-uri "Pyro4" version))
13015 (sha256
13016 (base32
13017 "0pzp7c6q3vvkxq0wy9lr6wd5wky40sajz69g697i5rb2q497pvc9"))))
13018 (build-system python-build-system)
13019 (propagated-inputs
13020 `(("python-serpent" ,python-serpent)))
13021 (home-page "https://pyro4.readthedocs.io")
13022 (synopsis "Distributed object middleware for Python")
13023 (description
13024 "Pyro enables you to build applications in which objects can talk to each
13025 other over the network. You can just use normal Python method calls to call
13026 objects on other machines, also known as remote procedure calls (RPC).")
13027 (license license:expat)))
13028
13029 (define-public python2-pyro
13030 (package
13031 (name "python2-pyro")
13032 (version "3.16")
13033 (source
13034 (origin
13035 (method url-fetch)
13036 (uri (pypi-uri "Pyro" version))
13037 (file-name (string-append "Pyro-" version ".tar.gz"))
13038 (sha256
13039 (base32
13040 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
13041 (build-system python-build-system)
13042 (arguments
13043 ;; Pyro is not compatible with Python 3
13044 `(#:python ,python-2
13045 ;; Pyro has no test cases for automatic execution
13046 #:tests? #f))
13047 (home-page "http://pythonhosted.org/Pyro/")
13048 (synopsis "Distributed object manager for Python")
13049 (description "Pyro is a Distributed Object Technology system
13050 written in Python that is designed to be easy to use. It resembles
13051 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
13052 which is a system and language independent Distributed Object Technology
13053 and has much more to offer than Pyro or RMI. Pyro 3.x is no
13054 longer maintained. New projects should use Pyro4 instead, which
13055 is the new Pyro version that is actively developed.")
13056 (license license:expat)))
13057
13058 (define-public python2-scientific
13059 (package
13060 (name "python2-scientific")
13061 (version "2.9.4")
13062 (source
13063 (origin
13064 (method url-fetch)
13065 (uri (string-append "https://bitbucket.org/khinsen/"
13066 "scientificpython/downloads/ScientificPython-"
13067 version ".tar.gz"))
13068 (file-name (string-append "ScientificPython-" version ".tar.gz"))
13069 (sha256
13070 (base32
13071 "0fc69zhlsn9d2jvbzyjl9ah53vj598h84nkq230c83ahfvgzx5y3"))))
13072 (build-system python-build-system)
13073 (inputs
13074 `(("netcdf" ,netcdf)))
13075 (propagated-inputs
13076 `(("python-numpy" ,python2-numpy-1.8)
13077 ("python-pyro" ,python2-pyro)))
13078 (arguments
13079 ;; ScientificPython is not compatible with Python 3
13080 `(#:python ,python-2
13081 #:tests? #f ; No test suite
13082 #:phases
13083 (modify-phases %standard-phases
13084 (replace 'build
13085 (lambda* (#:key inputs #:allow-other-keys)
13086 (invoke "python" "setup.py" "build"
13087 (string-append "--netcdf_prefix="
13088 (assoc-ref inputs "netcdf"))))))))
13089 (home-page "https://bitbucket.org/khinsen/scientificpython")
13090 (synopsis "Python modules for scientific computing")
13091 (description "ScientificPython is a collection of Python modules that are
13092 useful for scientific computing. Most modules are rather general (Geometry,
13093 physical units, automatic derivatives, ...) whereas others are more
13094 domain-specific (e.g. netCDF and PDB support). The library is currently
13095 not actively maintained and works only with Python 2 and NumPy < 1.9.")
13096 (license license:cecill-c)))
13097
13098 (define-public python2-mmtk
13099 (package
13100 (name "python2-mmtk")
13101 (version "2.7.11")
13102 (source
13103 (origin
13104 (method url-fetch)
13105 (uri (string-append "https://bitbucket.org/khinsen/"
13106 "mmtk/downloads/MMTK-" version ".tar.gz"))
13107 (file-name (string-append "MMTK-" version ".tar.gz"))
13108 (sha256
13109 (base32
13110 "1d0nnjx4lwsvh8f99vv1r6gi50d93yba0adkz8b4zgv4za4c5862"))))
13111 (build-system python-build-system)
13112 (native-inputs
13113 `(("netcdf" ,netcdf)))
13114 (propagated-inputs
13115 `(("python-scientific" ,python2-scientific)
13116 ("python-tkinter" ,python-2 "tk")))
13117 (arguments
13118 `(#:python ,python-2
13119 #:tests? #f
13120 #:phases
13121 (modify-phases %standard-phases
13122 (add-before 'build 'includes-from-scientific
13123 (lambda* (#:key inputs #:allow-other-keys)
13124 (mkdir-p "Include/Scientific")
13125 (copy-recursively
13126 (string-append
13127 (assoc-ref inputs "python-scientific")
13128 "/include/python2.7/Scientific")
13129 "Include/Scientific"))))))
13130 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
13131 (synopsis "Python library for molecular simulation")
13132 (description "MMTK is a library for molecular simulations with an emphasis
13133 on biomolecules. It provides widely used methods such as Molecular Dynamics
13134 and normal mode analysis, but also basic routines for implementing new methods
13135 for simulation and analysis. The library is currently not actively maintained
13136 and works only with Python 2 and NumPy < 1.9.")
13137 (license license:cecill-c)))
13138
13139 (define-public python-phonenumbers
13140 (package
13141 (name "python-phonenumbers")
13142 (version "8.9.1")
13143 (source
13144 (origin
13145 (method url-fetch)
13146 (uri (pypi-uri "phonenumbers" version))
13147 (sha256
13148 (base32
13149 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
13150 (build-system python-build-system)
13151 (home-page
13152 "https://github.com/daviddrysdale/python-phonenumbers")
13153 (synopsis
13154 "Python library for dealing with international phone numbers")
13155 (description
13156 "This package provides a Python port of Google's libphonenumber library.")
13157 (license license:asl2.0)))
13158
13159 (define-public python2-phonenumbers
13160 (package-with-python2 python-phonenumbers))
13161
13162 (define-public python-send2trash
13163 (package
13164 (name "python-send2trash")
13165 (version "1.5.0")
13166 (source
13167 (origin (method git-fetch)
13168 ;; Source tarball on PyPI doesn't include tests.
13169 (uri (git-reference
13170 (url "https://github.com/hsoft/send2trash.git")
13171 (commit version)))
13172 (file-name (git-file-name name version))
13173 (sha256
13174 (base32
13175 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
13176 (build-system python-build-system)
13177 (arguments
13178 '(#:phases
13179 (modify-phases %standard-phases
13180 (add-before 'check 'pre-check
13181 (lambda _
13182 (mkdir-p "/tmp/foo")
13183 (setenv "HOME" "/tmp/foo")
13184 #t)))))
13185 (home-page "https://github.com/hsoft/send2trash")
13186 (synopsis "Send files to the user's @file{~/Trash} directory")
13187 (description "This package provides a Python library to send files to the
13188 user's @file{~/Trash} directory.")
13189 (license license:bsd-3)))
13190
13191 (define-public python2-send2trash
13192 (package
13193 (inherit (package-with-python2 python-send2trash))
13194 (arguments
13195 (substitute-keyword-arguments (package-arguments python-send2trash)
13196 ((#:phases phases)
13197 `(modify-phases ,phases
13198 (add-before 'check 'setenv
13199 (lambda _
13200 (setenv "PYTHONPATH"
13201 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
13202 #t))))))
13203 (properties `((python2-variant . ,(delay python-send2trash))))))
13204
13205 (define-public python-yapf
13206 (package
13207 (name "python-yapf")
13208 (version "0.24.0")
13209 (source
13210 (origin
13211 (method url-fetch)
13212 (uri (pypi-uri "yapf" version))
13213 (sha256
13214 (base32
13215 "0anwby0ydmyzcsgjc5dn1ryddwvii4dq61vck447q0n96npnzfyf"))))
13216 (build-system python-build-system)
13217 (home-page "https://github.com/google/yapf")
13218 (synopsis "Formatter for Python code")
13219 (description "YAPF is a formatter for Python code. It's based off of
13220 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
13221 takes the code and reformats it to the best formatting that conforms to the
13222 style guide, even if the original code didn't violate the style guide.")
13223 (license license:asl2.0)))
13224
13225 (define-public python2-yapf
13226 (package-with-python2 python-yapf))
13227
13228 (define-public python-gyp
13229 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
13230 (revision "0"))
13231 (package
13232 (name "python-gyp")
13233 ;; Google does not release versions,
13234 ;; based on second most recent commit date.
13235 (version (git-version "0.0.0" revision commit))
13236 (source
13237 (origin
13238 ;; Google does not release tarballs,
13239 ;; git checkout is needed.
13240 (method git-fetch)
13241 (uri (git-reference
13242 (url "https://chromium.googlesource.com/external/gyp")
13243 (commit commit)))
13244 (file-name (git-file-name name version))
13245 (sha256
13246 (base32
13247 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
13248 (build-system python-build-system)
13249 (home-page "https://gyp.gsrc.io/")
13250 (synopsis "GYP is a Meta-Build system")
13251 (description
13252 "GYP builds build systems for large, cross platform applications.
13253 It can be used to generate XCode projects, Visual Studio projects, Ninja build
13254 files, and Makefiles.")
13255 (license license:bsd-3))))
13256
13257 (define-public python2-gyp
13258 (package-with-python2 python-gyp))
13259
13260 (define-public python-whatever
13261 (package
13262 (name "python-whatever")
13263 (version "0.5")
13264 (source
13265 (origin
13266 (method url-fetch)
13267 (uri (string-append "https://github.com/Suor/whatever/archive/" version
13268 ".tar.gz"))
13269 (sha256
13270 (base32
13271 "1iqvnaf0zpc6b4rvbqq4xy45mszcscyzpzknv8wg6j84pbp22sap"))
13272 (file-name (string-append name "-" version ".tar.gz"))))
13273 (build-system python-build-system)
13274 (arguments
13275 `(#:phases
13276 (modify-phases %standard-phases
13277 (replace 'check
13278 (lambda _
13279 (invoke "py.test"))))))
13280 (native-inputs
13281 `(("python-pytest" ,python-pytest)))
13282 (home-page "http://github.com/Suor/whatever")
13283 (synopsis "Make anonymous functions by partial application of operators")
13284 (description "@code{whatever} provides an easy way to make anonymous
13285 functions by partial application of operators.")
13286 (license license:bsd-3)))
13287
13288 (define-public python2-whatever
13289 (package-with-python2 python-whatever))
13290
13291 (define-public python-funcy
13292 (package
13293 (name "python-funcy")
13294 (version "1.10")
13295 (source
13296 (origin
13297 (method url-fetch)
13298 (uri (string-append "https://github.com/Suor/funcy/archive/" version
13299 ".tar.gz"))
13300 (sha256
13301 (base32
13302 "1fanxivsip29vgarw6dn39xym3q4pbxcpa11plpp548lvxajpahz"))
13303 (file-name (string-append name "-" version ".tar.gz"))))
13304 (build-system python-build-system)
13305 (arguments
13306 `(#:phases
13307 (modify-phases %standard-phases
13308 (replace 'check
13309 (lambda _
13310 (invoke "py.test"))))))
13311 (native-inputs
13312 `(("python-pytest" ,python-pytest)
13313 ("python-whatever" ,python-whatever)))
13314 (home-page "http://github.com/Suor/funcy")
13315 (synopsis "Functional tools")
13316 (description "@code{funcy} is a library that provides functional tools.
13317 Examples are:
13318 @enumerate
13319 @item merge - Merges collections of the same type
13320 @item walk - Type-preserving map
13321 @item select - Selects a part of a collection
13322 @item take - Takes the first n items of a collection
13323 @item first - Takes the first item of a collection
13324 @item remove - Predicated-removes items of a collection
13325 @item concat - Concatenates two collections
13326 @item flatten - Flattens a collection with subcollections
13327 @item distinct - Returns only distinct items
13328 @item split - Predicated-splits a collection
13329 @item split_at - Splits a collection at a given item
13330 @item group_by - Groups items by group
13331 @item pairwise - Pairs off adjacent items
13332 @item partial - Partially-applies a function
13333 @item curry - Curries a function
13334 @item compose - Composes functions
13335 @item complement - Complements a predicate
13336 @item all_fn - \"all\" with predicate
13337 @end enumerate")
13338 (license license:bsd-3)))
13339
13340 (define-public python2-funcy
13341 (package-with-python2 python-funcy))
13342
13343 (define-public python-isoweek
13344 (package
13345 (name "python-isoweek")
13346 (version "1.3.3")
13347 (source
13348 (origin
13349 (method url-fetch)
13350 (uri (pypi-uri "isoweek" version))
13351 (sha256
13352 (base32
13353 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
13354 (build-system python-build-system)
13355 (home-page "https://github.com/gisle/isoweek")
13356 (synopsis "Objects representing a week")
13357 (description "The @code{isoweek} module provide the class Week that
13358 implements the week definition of ISO 8601. This standard also defines
13359 a notation for identifying weeks; yyyyWww (where the W is a literal).
13360 Week instances stringify to this form.")
13361 (license license:bsd-3)))
13362
13363 (define-public python2-isoweek
13364 (package-with-python2 python-isoweek))
13365
13366 (define-public python-tokenize-rt
13367 (package
13368 (name "python-tokenize-rt")
13369 (version "2.0.1")
13370 (source
13371 (origin
13372 (method url-fetch)
13373 (uri (pypi-uri "tokenize-rt" version))
13374 (sha256
13375 (base32
13376 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
13377 (build-system python-build-system)
13378 (home-page "https://github.com/asottile/tokenize-rt")
13379 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
13380 (description
13381 "This Python library is a wrapper around @code{tokenize} from the Python
13382 standard library. It provides two additional tokens @code{ESCAPED_NL} and
13383 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
13384 and @code{tokens_to_src} to roundtrip.")
13385 (license license:expat)))
13386
13387 (define-public python-future-fstrings
13388 (package
13389 (name "python-future-fstrings")
13390 (version "0.4.1")
13391 (source
13392 (origin
13393 (method url-fetch)
13394 (uri (pypi-uri "future_fstrings" version))
13395 (sha256
13396 (base32
13397 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
13398 (build-system python-build-system)
13399 (propagated-inputs
13400 `(("python-tokenize-rt" ,python-tokenize-rt)))
13401 (home-page "https://github.com/asottile/future-fstrings")
13402 (synopsis "Backport of fstrings to Python < 3.6")
13403 (description
13404 "This package provides a UTF-8 compatible encoding
13405 @code{future_fstrings}, which performs source manipulation. It decodes the
13406 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
13407 @code{f} strings.")
13408 (license license:expat)))
13409
13410 (define-public python-typing
13411 (package
13412 (name "python-typing")
13413 (version "3.6.6")
13414 (source
13415 (origin
13416 (method url-fetch)
13417 (uri (pypi-uri "typing" version))
13418 (sha256
13419 (base32
13420 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
13421 (build-system python-build-system)
13422 (home-page "https://docs.python.org/3/library/typing.html")
13423 (synopsis "Type hints for Python")
13424 (description "This is a backport of the standard library @code{typing}
13425 module to Python versions older than 3.5. Typing defines a standard notation
13426 for Python function and variable type annotations. The notation can be used
13427 for documenting code in a concise, standard format, and it has been designed
13428 to also be used by static and runtime type checkers, static analyzers, IDEs
13429 and other tools.")
13430 (license license:psfl)))
13431
13432 (define-public python2-typing
13433 (package-with-python2 python-typing))
13434
13435 (define-public bpython
13436 (package
13437 (name "bpython")
13438 (version "0.17.1")
13439 (source
13440 (origin
13441 (method url-fetch)
13442 (uri (pypi-uri "bpython" version))
13443 (sha256
13444 (base32
13445 "0bxhxi5zxdkrf8b4gwn0d363kdz3qnypjwhm1aydki53ph8ca1w9"))))
13446 (build-system python-build-system)
13447 (arguments
13448 `(#:phases
13449 (modify-phases %standard-phases
13450 (add-after 'unpack 'remove-failing-test
13451 (lambda _
13452 ;; Remove failing test. FIXME: make it pass
13453 (delete-file "bpython/test/test_args.py")
13454 #t))
13455 (add-after 'wrap 'add-aliases
13456 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
13457 (lambda* (#:key outputs #:allow-other-keys)
13458 (let ((out (assoc-ref outputs "out")))
13459 (for-each
13460 (lambda (old new)
13461 (symlink old (string-append out "/bin/" new)))
13462 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
13463 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
13464 #t)))))
13465 (propagated-inputs
13466 `(("python-pygments" ,python-pygments)
13467 ("python-requests" ,python-requests)
13468 ("python-babel" ,python-babel) ; optional, for internationalization
13469 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
13470 ("python-greenlet" ,python-greenlet)
13471 ("python-urwid" ,python-urwid) ; for bpython-urwid only
13472 ("python-six" ,python-six)))
13473 (native-inputs
13474 `(("python-sphinx" ,python-sphinx)
13475 ("python-mock" ,python-mock)))
13476 (home-page "https://bpython-interpreter.org/")
13477 (synopsis "Fancy interface to the Python interpreter")
13478 (description "Bpython is a fancy interface to the Python
13479 interpreter. bpython's main features are
13480
13481 @enumerate
13482 @item in-line syntax highlighting,
13483 @item readline-like autocomplete with suggestions displayed as you type,
13484 @item expected parameter list for any Python function,
13485 @item \"rewind\" function to pop the last line of code from memory and
13486 re-evaluate,
13487 @item send the code you've entered off to a pastebin,
13488 @item save the code you've entered to a file, and
13489 @item auto-indentation.
13490 @end enumerate")
13491 (license license:expat)))
13492
13493 (define-public bpython2
13494 (let ((base (package-with-python2
13495 (strip-python2-variant bpython))))
13496 (package (inherit base)
13497 (name "bpython2")
13498 (arguments
13499 `(#:python ,python-2
13500 #:phases
13501 (modify-phases %standard-phases
13502 (add-after 'unpack 'remove-failing-test
13503 (lambda _
13504 ;; Remove failing test. FIXME: make it pass
13505 (delete-file "bpython/test/test_args.py")
13506 ;; Disable failing test-cases (renaming inhibits they are
13507 ;; discovered)
13508 (substitute* "bpython/test/test_curtsies_repl.py"
13509 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
13510 (string-append a "xxx_off_" b))
13511 (("^(\\s*def )(test_complex\\W)" _ a b)
13512 (string-append a "xxx_off_" b)))
13513 #t))
13514 (add-before 'build 'rename-scripts
13515 ;; rename the scripts to bypthon2, bpdb2, etc.
13516 (lambda _
13517 (substitute* "setup.py"
13518 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
13519 (string-append name "2" rest "\n"))
13520 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
13521 (string-append name "2" (or sub "") rest "\n")))
13522 #t))))))))
13523
13524 (define-public python-pyinotify
13525 (package
13526 (name "python-pyinotify")
13527 (version "0.9.6")
13528 (source (origin
13529 (method url-fetch)
13530 (uri (pypi-uri "pyinotify" version))
13531 (sha256
13532 (base32
13533 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
13534 (build-system python-build-system)
13535 (arguments `(#:tests? #f)) ;no tests
13536 (home-page "https://github.com/seb-m/pyinotify")
13537 (synopsis "Python library for monitoring inotify events")
13538 (description
13539 "@code{pyinotify} provides a Python interface for monitoring
13540 file system events on Linux.")
13541 (license license:expat)))
13542
13543 (define-public python2-pyinotify
13544 (package-with-python2 python-pyinotify))
13545
13546 ;; Ada parser uses this version.
13547 (define-public python2-quex-0.67.3
13548 (package
13549 (name "python2-quex")
13550 (version "0.67.3")
13551 (source
13552 (origin
13553 (method url-fetch)
13554 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
13555 (version-major+minor version)
13556 "/quex-" version ".zip"))
13557 (sha256
13558 (base32
13559 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
13560 (build-system python-build-system)
13561 (native-inputs
13562 `(("unzip" ,unzip)))
13563 (arguments
13564 `(#:python ,python-2
13565 #:tests? #f
13566 #:phases
13567 (modify-phases %standard-phases
13568 (delete 'configure)
13569 (delete 'build)
13570 (replace 'install
13571 (lambda* (#:key outputs #:allow-other-keys)
13572 (let* ((out (assoc-ref outputs "out"))
13573 (share/quex (string-append out "/share/quex"))
13574 (bin (string-append out "/bin")))
13575 (copy-recursively "." share/quex)
13576 (mkdir-p bin)
13577 (symlink (string-append share/quex "/quex-exe.py")
13578 (string-append bin "/quex"))
13579 #t))))))
13580 (native-search-paths
13581 (list (search-path-specification
13582 (variable "QUEX_PATH")
13583 (files '("share/quex")))))
13584 (home-page "http://quex.sourceforge.net/")
13585 (synopsis "Lexical analyzer generator in Python")
13586 (description "@code{quex} is a lexical analyzer generator in Python.")
13587 (license license:lgpl2.1+))) ; Non-military
13588
13589 (define-public python2-quex
13590 (package (inherit python2-quex-0.67.3)
13591 (name "python2-quex")
13592 (version "0.68.1")
13593 (source
13594 (origin
13595 (method url-fetch)
13596 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
13597 (sha256
13598 (base32
13599 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
13600 (file-name (string-append name "-" version ".tar.gz"))))))
13601
13602 (define-public python-more-itertools
13603 (package
13604 (name "python-more-itertools")
13605 (version "4.3.0")
13606 (source
13607 (origin
13608 (method url-fetch)
13609 (uri (pypi-uri "more-itertools" version))
13610 (sha256
13611 (base32
13612 "17h3na0rdh8xq30w4b9pizgkdxmm51896bxw600x84jflg9vaxn4"))))
13613 (build-system python-build-system)
13614 (arguments
13615 `(,@(if (any (cute string-prefix? <> (or (%current-system)
13616 (%current-target-system)))
13617 '("armhf" "i686"))
13618 '(#:phases
13619 (modify-phases %standard-phases
13620 ;; This is required for 32-bit hardware.
13621 ;; TODO: Try to remove this when upgrading.
13622 (add-after 'unpack 'patch-test
13623 (lambda _
13624 (substitute* "more_itertools/tests/test_more.py"
13625 (("10 \\*\\* 10") "9 ** 9"))
13626 #t))))
13627 '())))
13628 (propagated-inputs
13629 `(("python-six" ,python-six-bootstrap)))
13630 (home-page "https://github.com/erikrose/more-itertools")
13631 (synopsis "More routines for operating on iterables, beyond itertools")
13632 (description "Python's built-in @code{itertools} module implements a
13633 number of iterator building blocks inspired by constructs from APL, Haskell,
13634 and SML. @code{more-itertools} includes additional building blocks for
13635 working with iterables.")
13636 (license license:expat)))
13637
13638 (define-public python2-more-itertools
13639 (package-with-python2 python-more-itertools))
13640
13641 (define-public python-latexcodec
13642 (package
13643 (name "python-latexcodec")
13644 (version "1.0.5")
13645 (source
13646 (origin
13647 (method url-fetch)
13648 (uri (pypi-uri "latexcodec" version))
13649 (sha256
13650 (base32
13651 "0zdd1gf24i83ykadx0y30n3001j43scqr2saql3vckk5c39dj1wn"))))
13652 (build-system python-build-system)
13653 (inputs
13654 `(("python-six" ,python-six)))
13655 (home-page "https://readthedocs.org/projects/latexcodec/")
13656 (synopsis "Work with LaTeX code in Python")
13657 (description "Lexer and codec to work with LaTeX code in Python.")
13658 (license license:expat)))
13659
13660 (define-public python-pybtex
13661 (package
13662 (name "python-pybtex")
13663 (version "0.21")
13664 (source
13665 (origin
13666 (method url-fetch)
13667 (uri (pypi-uri "pybtex" version))
13668 (sha256
13669 (base32
13670 "00300j8dn5pxq4ndxmfmbmycg2znawkqs49val2x6jlmfiy6r2mg"))))
13671 (build-system python-build-system)
13672 (native-inputs
13673 `(("python-nose" ,python-nose)))
13674 (inputs
13675 `(("python-latexcodec" ,python-latexcodec)
13676 ("python-pyyaml" ,python-pyyaml)
13677 ("python-six" ,python-six)))
13678 (arguments
13679 `(#:test-target "nosetests"))
13680 (home-page "https://pybtex.org/")
13681 (synopsis "BibTeX-compatible bibliography processor")
13682 (description "Pybtex is a BibTeX-compatible bibliography processor written
13683 in Python. You can simply type pybtex instead of bibtex.")
13684 (license license:expat)))
13685
13686 (define-public python-onetimepass
13687 (package
13688 (name "python-onetimepass")
13689 (version "1.0.1")
13690 (source
13691 (origin
13692 (method url-fetch)
13693 (uri (pypi-uri "onetimepass" version))
13694 (sha256
13695 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
13696 (build-system python-build-system)
13697 (propagated-inputs `(("python-six" ,python-six)))
13698 (home-page "https://github.com/tadeck/onetimepass/")
13699 (synopsis "One-time password library")
13700 (description "Python one-time password library for HMAC-based (HOTP) and
13701 time-based (TOTP) passwords.")
13702 (license license:expat)))
13703
13704 (define-public python-parso
13705 (package
13706 (name "python-parso")
13707 (version "0.3.1")
13708 (source
13709 (origin
13710 (method url-fetch)
13711 (uri (pypi-uri "parso" version))
13712 (sha256
13713 (base32
13714 "18p89iwcm8mnf380f92g9w0bhx5km8wxp392vvjcq4y1ld1llw1m"))))
13715 (native-inputs
13716 `(("python-pytest" ,python-pytest)))
13717 (build-system python-build-system)
13718 (home-page "https://github.com/davidhalter/parso")
13719 (synopsis "Python Parser")
13720 (description "Parso is a Python parser that supports error recovery and
13721 round-trip parsing for different Python versions (in multiple Python versions).
13722 Parso is also able to list multiple syntax errors in your Python file.")
13723 (license license:expat)))
13724
13725 (define-public python2-parso
13726 (package-with-python2 python-parso))
13727
13728 (define-public python-async-generator
13729 (package
13730 (name "python-async-generator")
13731 (version "1.9")
13732 (source
13733 (origin
13734 (method url-fetch)
13735 (uri (pypi-uri "async_generator" version))
13736 (sha256
13737 (base32
13738 "0wc3hidz1q85cja93k5pzybn0fprfnqyrv4qlkdqdzklc5f4dmdp"))))
13739 (build-system python-build-system)
13740 (native-inputs
13741 `(("python-pytest" ,python-pytest)))
13742 (home-page "https://github.com/python-trio/async_generator")
13743 (synopsis "Async generators and context managers for Python 3.5+")
13744 (description "@code{async_generator} back-ports Python 3.6's native async
13745 generators and Python 3.7's context managers into Python 3.5.")
13746 ;; Dual licensed.
13747 (license (list license:expat license:asl2.0))))
13748
13749 (define-public python-async-timeout
13750 (package
13751 (name "python-async-timeout")
13752 (version "3.0.1")
13753 (source
13754 (origin
13755 (method url-fetch)
13756 (uri (pypi-uri "async-timeout" version))
13757 (sha256
13758 (base32
13759 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
13760 (build-system python-build-system)
13761 (home-page "https://github.com/aio-libs/async_timeout/")
13762 (synopsis "Timeout context manager for asyncio programs")
13763 (description "@code{async-timeout} provides a timeout timeout context
13764 manager compatible with @code{asyncio}.")
13765 (license license:asl2.0)))
13766
13767 (define-public python-glob2
13768 (package
13769 (name "python-glob2")
13770 (version "0.6")
13771 (source (origin
13772 (method url-fetch)
13773 (uri (string-append
13774 "https://github.com/miracle2k/python-glob2/archive/"
13775 version
13776 ".tar.gz"))
13777 (sha256
13778 (base32
13779 "0ja168f0dz4kbz4m06dm0rd3acaypk6hjx2km541pw22y9s40mag"))
13780 (file-name (string-append name "-" version ".tar.gz"))))
13781 (build-system python-build-system)
13782 (home-page "https://github.com/miracle2k/python-glob2/")
13783 (synopsis "Extended Version of the python buildin glob module")
13784 (description "This is an extended version of the Python
13785 @url{http://docs.python.org/library/glob.html, built-in glob module} which
13786 adds:
13787
13788 @itemize
13789 @item The ability to capture the text matched by glob patterns, and return
13790 those matches alongside the file names.
13791 @item A recursive @code{**} globbing syntax, akin for example to the
13792 @code{globstar} option of Bash.
13793 @item The ability to replace the file system functions used, in order to glob
13794 on virtual file systems.
13795 @item Compatible with Python 2 and Python 3 (tested with 3.3).
13796 @end itemize
13797
13798 Glob2 currently based on the glob code from Python 3.3.1.")
13799 (license license:bsd-2)))
13800
13801 (define-public python2-glob2
13802 (package-with-python2 python-glob2))
13803
13804 (define-public python-gipc
13805 (package
13806 (name "python-gipc")
13807 (version "0.6.0")
13808 (source
13809 (origin
13810 (method url-fetch)
13811 (uri (pypi-uri "gipc" version ".zip"))
13812 (sha256
13813 (base32
13814 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
13815 (build-system python-build-system)
13816 (native-inputs
13817 `(("unzip" ,unzip)))
13818 (propagated-inputs
13819 `(("python-gevent" ,python-gevent)))
13820 (home-page "http://gehrcke.de/gipc")
13821 (synopsis "Child process management in the context of gevent")
13822 (description "Usage of Python's multiprocessing package in a
13823 gevent-powered application may raise problems. With @code{gipc},
13824 process-based child processes can safely be created anywhere within a
13825 gevent-powered application.")
13826 (license license:expat)))
13827
13828 (define-public python2-gipc
13829 (package-with-python2 python-gipc))
13830
13831 (define-public python-fusepy
13832 (package
13833 (name "python-fusepy")
13834 (version "2.0.4")
13835 (source
13836 (origin
13837 (method url-fetch)
13838 (uri (pypi-uri "fusepy" version))
13839 (sha256
13840 (base32
13841 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
13842 (build-system python-build-system)
13843 (arguments
13844 `(#:phases
13845 (modify-phases %standard-phases
13846 (add-before 'build 'set-library-file-name
13847 (lambda* (#:key inputs #:allow-other-keys)
13848 (let ((fuse (assoc-ref inputs "fuse")))
13849 (substitute* "fuse.py"
13850 (("find_library\\('fuse'\\)")
13851 (string-append "'" fuse "/lib/libfuse.so'")))
13852 #t))))))
13853 (propagated-inputs
13854 `(("fuse" ,fuse)))
13855 (home-page "https://github.com/fusepy/fusepy")
13856 (synopsis "Simple ctypes bindings for FUSE")
13857 (description "Python module that provides a simple interface to FUSE and
13858 MacFUSE. The binding is created using the standard @code{ctypes} library.")
13859 (license license:isc)))
13860
13861 (define-public python2-fusepy
13862 (package-with-python2 python-fusepy))
13863
13864 (define-public python2-gdrivefs
13865 (package
13866 (name "python2-gdrivefs")
13867 (version "0.14.9")
13868 (source
13869 (origin
13870 (method url-fetch)
13871 (uri (pypi-uri "gdrivefs" version))
13872 (sha256
13873 (base32
13874 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
13875 (build-system python-build-system)
13876 (arguments
13877 `(#:python ,python-2
13878 #:phases
13879 (modify-phases %standard-phases
13880 (add-before 'build 'patch-setup-py
13881 (lambda _
13882 ;; Update requirements from dependency==version
13883 ;; to dependency>=version
13884 (substitute* "gdrivefs/resources/requirements.txt"
13885 (("==") ">="))
13886 #t)))))
13887 (native-inputs
13888 `(("python2-gipc" ,python2-gipc)
13889 ("python2-gevent" ,python2-gevent)
13890 ("python2-greenlet" ,python2-greenlet)
13891 ("python2-httplib2" ,python2-httplib2)
13892 ("python2-uritemplate" ,python2-uritemplate)
13893 ("python2-oauth2client" ,python2-oauth2client)
13894 ("python2-six" ,python2-six)))
13895 (propagated-inputs
13896 `(("python2-dateutil" ,python2-dateutil)
13897 ("python2-fusepy" ,python2-fusepy)
13898 ("python2-google-api-client" ,python2-google-api-client)))
13899 (home-page "https://github.com/dsoprea/GDriveFS")
13900 (synopsis "Mount Google Drive as a local file system")
13901 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
13902 under Python 2.7.")
13903 (license license:gpl2)))
13904
13905 (define-public pybind11
13906 (package
13907 (name "pybind11")
13908 (version "2.2.4")
13909 (source (origin
13910 (method git-fetch)
13911 (uri (git-reference
13912 (url "https://github.com/pybind/pybind11.git")
13913 (commit (string-append "v" version))))
13914 (sha256
13915 (base32
13916 "0pa79ymcasv8br5ifbx7878id5py2jpjac3i20cqxr6gs9l6ivlv"))
13917 (file-name (git-file-name name version))))
13918 (build-system cmake-build-system)
13919 (native-inputs
13920 `(("python" ,python)
13921 ("python-pytest" ,python-pytest)))
13922 (arguments
13923 `(#:test-target "check"))
13924 (home-page "https://github.com/pybind/pybind11/")
13925 (synopsis "Seamless operability between C++11 and Python")
13926 (description "pybind11 is a lightweight header-only library that exposes
13927 C++ types in Python and vice versa, mainly to create Python bindings of
13928 existing C++ code. Its goals and syntax are similar to the excellent
13929 Boost.Python library by David Abrahams: to minimize boilerplate code in
13930 traditional extension modules by inferring type information using compile-time
13931 introspection.")
13932 (license license:expat)))
13933
13934 (define-public python-fasteners
13935 (package
13936 (name "python-fasteners")
13937 (version "0.14.1")
13938 (source
13939 (origin
13940 (method url-fetch)
13941 (uri (pypi-uri "fasteners" version))
13942 (sha256
13943 (base32
13944 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
13945 (build-system python-build-system)
13946 (propagated-inputs
13947 `(("python-monotonic" ,python-monotonic)
13948 ("python-six" ,python-six)
13949 ("python-testtools" ,python-testtools)))
13950 (home-page "https://github.com/harlowja/fasteners")
13951 (synopsis "Python package that provides useful locks")
13952 (description
13953 "This package provides a Python program that provides following locks:
13954
13955 @itemize
13956 @item Locking decorator
13957 @item Reader-writer locks
13958 @item Inter-process locks
13959 @item Generic helpers
13960 @end itemize\n")
13961 (properties `((python2-variant . ,(delay python2-fasteners))))
13962 (license license:asl2.0)))
13963
13964 (define-public python2-fasteners
13965 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
13966 (package
13967 (inherit base)
13968 (propagated-inputs
13969 `(("python2-futures" ,python2-futures)
13970 ,@(package-propagated-inputs base))))))
13971
13972 (define-public python-requests-file
13973 (package
13974 (name "python-requests-file")
13975 (version "1.4.3")
13976 (source
13977 (origin
13978 (method url-fetch)
13979 (uri (pypi-uri "requests-file" version))
13980 (sha256
13981 (base32
13982 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
13983 (build-system python-build-system)
13984 (propagated-inputs
13985 `(("python-requests" ,python-requests)
13986 ("python-six" ,python-six)))
13987 (home-page
13988 "https://github.com/dashea/requests-file")
13989 (synopsis "File transport adapter for Requests")
13990 (description
13991 "Requests-File is a transport adapter for use with the Requests Python
13992 library to allow local filesystem access via file:// URLs.")
13993 (license license:asl2.0)))
13994
13995 (define-public python2-requests-file
13996 (package-with-python2 python-requests-file))
13997
13998 (define-public python-tldextract
13999 (package
14000 (name "python-tldextract")
14001 (version "2.2.0")
14002 (source
14003 (origin
14004 (method url-fetch)
14005 (uri (pypi-uri "tldextract" version))
14006 (sha256
14007 (base32
14008 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
14009 (build-system python-build-system)
14010 (native-inputs
14011 `(("python-pytest" ,python-pytest)
14012 ("python-responses" ,python-responses)))
14013 (propagated-inputs
14014 `(("python-idna" ,python-idna)
14015 ("python-requests" ,python-requests)
14016 ("python-requests-file" ,python-requests-file)))
14017 (home-page
14018 "https://github.com/john-kurkowski/tldextract")
14019 (synopsis
14020 "Separate the TLD from the registered domain and subdomains of a URL")
14021 (description
14022 "TLDExtract accurately separates the TLD from the registered domain and
14023 subdomains of a URL, using the Public Suffix List. By default, this includes
14024 the public ICANN TLDs and their exceptions. It can optionally support the
14025 Public Suffix List's private domains as well.")
14026 (license license:bsd-3)))
14027
14028 (define-public python2-tldextract
14029 (package-with-python2 python-tldextract))
14030
14031 (define-public python-pynamecheap
14032 (package
14033 (name "python-pynamecheap")
14034 (version "0.0.3")
14035 (source
14036 (origin
14037 (method url-fetch)
14038 (uri (pypi-uri "PyNamecheap" version))
14039 (sha256
14040 (base32
14041 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
14042 (build-system python-build-system)
14043 (propagated-inputs
14044 `(("python-requests" ,python-requests)))
14045 (home-page
14046 "https://github.com/Bemmu/PyNamecheap")
14047 (synopsis
14048 "Namecheap API client in Python")
14049 (description
14050 "PyNamecheap is a Namecheap API client in Python.")
14051 (license license:expat)))
14052
14053 (define-public python2-pynamecheap
14054 (package-with-python2 python-pynamecheap))
14055
14056 (define-public python-dns-lexicon
14057 (package
14058 (name "python-dns-lexicon")
14059 (version "2.4.0")
14060 (source
14061 (origin
14062 (method url-fetch)
14063 (uri (pypi-uri "dns-lexicon" version))
14064 (sha256
14065 (base32
14066 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
14067 (build-system python-build-system)
14068 (arguments
14069 `(#:tests? #f)) ;requires internet access
14070 (propagated-inputs
14071 `(("python-future" ,python-future)
14072 ("python-pynamecheap" ,python-pynamecheap)
14073 ("python-requests" ,python-requests)
14074 ("python-tldextract" ,python-tldextract)
14075 ("python-urllib3" ,python-urllib3)))
14076 (home-page "https://github.com/AnalogJ/lexicon")
14077 (synopsis
14078 "Manipulate DNS records on various DNS providers")
14079 (description
14080 "Lexicon provides a way to manipulate DNS records on multiple DNS
14081 providers in a standardized way. It has a CLI but it can also be used as a
14082 Python library. It was designed to be used in automation, specifically with
14083 Let's Encrypt.")
14084 (license license:expat)))
14085
14086 (define-public python2-dns-lexicon
14087 (package-with-python2 python-dns-lexicon))
14088
14089 (define-public python-commandlines
14090 (package
14091 (name "python-commandlines")
14092 (version "0.4.1")
14093 (source
14094 (origin
14095 (method url-fetch)
14096 (uri (pypi-uri "commandlines" version))
14097 (sha256
14098 (base32
14099 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
14100 (build-system python-build-system)
14101 (home-page "https://github.com/chrissimpkins/commandlines")
14102 (synopsis "Command line argument to object parsing library")
14103 (description
14104 "@code{Commandlines} is a Python library for command line application
14105 development that supports command line argument parsing, command string
14106 validation testing and application logic.")
14107 (license license:expat)))
14108
14109 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
14110 ;; python-numba. They have a very unflexible relationship.
14111 (define-public python-numba
14112 (package
14113 (name "python-numba")
14114 (version "0.39.0")
14115 (source
14116 (origin
14117 (method url-fetch)
14118 (uri (pypi-uri "numba" version))
14119 (sha256
14120 (base32
14121 "1bibvkwga1v8293i9ivl469d8bzgabn3vgr2ig7c1i68v8frsx07"))))
14122 (build-system python-build-system)
14123 (arguments
14124 `(#:modules ((guix build utils)
14125 (guix build python-build-system)
14126 (ice-9 ftw)
14127 (srfi srfi-1)
14128 (srfi srfi-26))
14129 #:phases
14130 (modify-phases %standard-phases
14131 (add-after 'unpack 'disable-proprietary-features
14132 (lambda _
14133 (setenv "NUMBA_DISABLE_HSA" "1")
14134 (setenv "NUMBA_DISABLE_CUDA" "1")
14135 #t))
14136 (add-after 'unpack 'remove-failing-tests
14137 (lambda _
14138 ;; FIXME: these tests fail for unknown reasons:
14139 ;; test_non_writable_pycache, test_non_creatable_pycache, and
14140 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
14141 (substitute* "numba/tests/test_dispatcher.py"
14142 (("def test(_non_writable_pycache)" _ m)
14143 (string-append "def guix_skip" m))
14144 (("def test(_non_creatable_pycache)" _ m)
14145 (string-append "def guix_skip" m))
14146 (("def test(_frozen)" _ m)
14147 (string-append "def guix_skip" m)))
14148
14149 ;; These tests fail because we don't run the tests from the build
14150 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
14151 ;; They ar in numba.tests.test_pycc.TestDistutilsSupport.
14152 (substitute* "numba/tests/test_pycc.py"
14153 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
14154 (string-append "def guix_skip" m)))
14155 #t))
14156 (replace 'check
14157 (lambda _
14158 (let ((cwd (getcwd)))
14159 (setenv "PYTHONPATH"
14160 (string-append cwd "/build/"
14161 (find (cut string-prefix? "lib" <>)
14162 (scandir (string-append cwd "/build")))
14163 ":"
14164 (getenv "PYTHONPATH")))
14165 ;; Something is wrong with the PYTHONPATH when running the
14166 ;; tests from the build directory, as it complains about not being
14167 ;; able to import certain modules.
14168 (with-directory-excursion "/tmp"
14169 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
14170 #t)))))
14171 (propagated-inputs
14172 `(("python-llvmlite" ,python-llvmlite)
14173 ("python-numpy" ,python-numpy)
14174 ("python-singledispatch" ,python-singledispatch)))
14175 ;; Needed for tests.
14176 (inputs
14177 `(("python-jinja2" ,python-jinja2)
14178 ("python-pygments" ,python-pygments)))
14179 (home-page "https://numba.pydata.org")
14180 (synopsis "Compile Python code using LLVM")
14181 (description "Numba gives you the power to speed up your applications with
14182 high performance functions written directly in Python. With a few
14183 annotations, array-oriented and math-heavy Python code can be just-in-time
14184 compiled to native machine instructions, similar in performance to C, C++ and
14185 Fortran, without having to switch languages or Python interpreters.
14186
14187 Numba works by generating optimized machine code using the LLVM compiler
14188 infrastructure at import time, runtime, or statically (using the included pycc
14189 tool).")
14190 (license license:bsd-3)))
14191
14192 (define-public python-anndata
14193 (package
14194 (name "python-anndata")
14195 (version "0.6.9")
14196 (source
14197 (origin
14198 (method url-fetch)
14199 (uri (pypi-uri "anndata" version))
14200 (sha256
14201 (base32
14202 "1fh461xyyc7pcrjfgd013bdc2alf53r46ss3gfw3431mbb1gappi"))))
14203 (build-system python-build-system)
14204 (propagated-inputs
14205 `(("python-h5py" ,python-h5py)
14206 ("python-natsort" ,python-natsort)
14207 ("python-pandas" ,python-pandas)
14208 ("python-scipy" ,python-scipy)))
14209 (home-page "https://github.com/theislab/anndata")
14210 (synopsis "Annotated data for data analysis pipelines")
14211 (description "Anndata is a package for simple (functional) high-level APIs
14212 for data analysis pipelines. In this context, it provides an efficient,
14213 scalable way of keeping track of data together with learned annotations and
14214 reduces the code overhead typically encountered when using a mostly
14215 object-oriented library such as @code{scikit-learn}.")
14216 (license license:bsd-3)))
14217
14218 (define-public python-dill
14219 (package
14220 (name "python-dill")
14221 (version "0.2.8.2")
14222 (source
14223 (origin
14224 (method url-fetch)
14225 (uri (pypi-uri "dill" version))
14226 (sha256
14227 (base32
14228 "1cymzn9fxwdy33h21zkk4gqgzvd25110hh3zdqnvnwa3p52c4kb2"))))
14229 (build-system python-build-system)
14230 ;; FIXME: The check phase fails with "don't know how to make test".
14231 (arguments '(#:tests? #f))
14232 (home-page "https://pypi.org/project/dill")
14233 (synopsis "Serialize all of Python")
14234 (description "Dill extends Python's @code{pickle} module for serializing
14235 and de-serializing Python objects to the majority of the built-in Python
14236 types. Dill provides the user the same interface as the @code{pickle} module,
14237 and also includes some additional features. In addition to pickling Python
14238 objects, @code{dill} provides the ability to save the state of an interpreter
14239 session in a single command. Hence, it would be feasable to save a
14240 interpreter session, close the interpreter, ship the pickled file to another
14241 computer, open a new interpreter, unpickle the session and thus continue from
14242 the saved state of the original interpreter session.")
14243 (license license:bsd-3)))
14244
14245 (define-public python-multiprocess
14246 (package
14247 (name "python-multiprocess")
14248 (version "0.70.6.1")
14249 (source
14250 (origin
14251 (method url-fetch)
14252 (uri (pypi-uri "multiprocess" version))
14253 (sha256
14254 (base32
14255 "1ip5caz67b3q0553mr8gm8xwsb8x500jn8ml0gihgyfy52m2ypcq"))))
14256 (build-system python-build-system)
14257 (propagated-inputs
14258 `(("python-dill" ,python-dill)))
14259 (home-page "https://pypi.org/project/multiprocess")
14260 (synopsis "Multiprocessing and multithreading in Python")
14261 (description
14262 "This package is a fork of the multiprocessing Python package, a package
14263 which supports the spawning of processes using the API of the standard
14264 library's @code{threading} module.")
14265 (license license:bsd-3)))
14266
14267 (define-public python-toolz
14268 (package
14269 (name "python-toolz")
14270 (version "0.9.0")
14271 (source
14272 (origin
14273 (method url-fetch)
14274 (uri (pypi-uri "toolz" version))
14275 (sha256
14276 (base32
14277 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
14278 (build-system python-build-system)
14279 ;; FIXME: tests cannot be computed: "Can't perform this operation for
14280 ;; unregistered loader type"
14281 (arguments '(#:tests? #f))
14282 (home-page "https://github.com/pytoolz/toolz/")
14283 (synopsis "List processing tools and functional utilities")
14284 (description
14285 "This package provides a set of utility functions for iterators,
14286 functions, and dictionaries.")
14287 (license license:bsd-3)))
14288
14289 (define-public python2-toolz
14290 (package-with-python2 python-toolz))
14291
14292 (define-public python-cytoolz
14293 (package
14294 (name "python-cytoolz")
14295 (version "0.9.0.1")
14296 (source
14297 (origin
14298 (method url-fetch)
14299 (uri (pypi-uri "cytoolz" version))
14300 (sha256
14301 (base32
14302 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
14303 (build-system python-build-system)
14304 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
14305 ;; 'exceptions'"
14306 (arguments '(#:tests? #f))
14307 (propagated-inputs
14308 `(("python-toolz" ,python-toolz)))
14309 (native-inputs
14310 `(("python-cython" ,python-cython)))
14311 (home-page "https://github.com/pytoolz/cytoolz")
14312 (synopsis "High performance functional utilities")
14313 (description
14314 "The cytoolz package implements the same API as provided by toolz. The
14315 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
14316 that is accessible to other projects developed in Cython.")
14317 (license license:bsd-3)))
14318
14319 (define-public python-sortedcontainers
14320 (package
14321 (name "python-sortedcontainers")
14322 (version "2.0.4")
14323 (source
14324 (origin
14325 (method url-fetch)
14326 (uri (pypi-uri "sortedcontainers" version))
14327 (sha256
14328 (base32
14329 "10hrk2k0hbf9x78vd3f0lj277m1yzfhzzxr0hja718liwb398wk0"))))
14330 (build-system python-build-system)
14331 (native-inputs
14332 `(("python-tox" ,python-tox)))
14333 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
14334 (synopsis "Sorted List, Sorted Dict, Sorted Set")
14335 (description
14336 "This package provides a sorted collections library, written in
14337 pure-Python.")
14338 (license license:asl2.0)))
14339
14340 (define-public python-cloudpickle
14341 (package
14342 (name "python-cloudpickle")
14343 (version "0.6.1")
14344 (source
14345 (origin
14346 (method url-fetch)
14347 (uri (pypi-uri "cloudpickle" version))
14348 (sha256
14349 (base32
14350 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
14351 (build-system python-build-system)
14352 ;; FIXME: there are 5 errors in 122 tests:
14353 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
14354 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
14355 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
14356 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
14357 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
14358 ;; TypeError: cannot serialize '_io.BufferedRandom' object
14359 (arguments '(#:tests? #f))
14360 (native-inputs
14361 `(("python-pytest" ,python-pytest)
14362 ("python-mock" ,python-mock)
14363 ("python-tornado" ,python-tornado)))
14364 (home-page "https://github.com/cloudpipe/cloudpickle")
14365 (synopsis "Extended pickling support for Python objects")
14366 (description
14367 "Cloudpickle makes it possible to serialize Python constructs not
14368 supported by the default pickle module from the Python standard library. It
14369 is especially useful for cluster computing where Python expressions are
14370 shipped over the network to execute on remote hosts, possibly close to the
14371 data.")
14372 (license license:bsd-3)))
14373
14374 (define-public python2-cloudpickle
14375 (package-with-python2 python-cloudpickle))
14376
14377 (define-public python-locket
14378 (package
14379 (name "python-locket")
14380 (version "0.2.0")
14381 (source
14382 (origin
14383 (method url-fetch)
14384 (uri (pypi-uri "locket" version))
14385 (sha256
14386 (base32
14387 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
14388 (build-system python-build-system)
14389 (home-page "https://github.com/mwilliamson/locket.py")
14390 (synopsis "File-based locks for Python")
14391 (description
14392 "Locket implements a lock that can be used by multiple processes provided
14393 they use the same path.")
14394 (license license:bsd-2)))
14395
14396 (define-public python2-locket
14397 (package-with-python2 python-locket))
14398
14399 (define-public python-blosc
14400 (package
14401 (name "python-blosc")
14402 (version "1.5.1")
14403 (source
14404 (origin
14405 (method url-fetch)
14406 (uri (pypi-uri "blosc" version))
14407 (sha256
14408 (base32
14409 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
14410 (build-system python-build-system)
14411 ;; FIXME: all tests pass, but then this error is printed:
14412 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
14413 (arguments '(#:tests? #f))
14414 (propagated-inputs
14415 `(("python-numpy" ,python-numpy)))
14416 (home-page "https://github.com/blosc/python-blosc")
14417 (synopsis "Python wrapper for the Blosc data compressor library")
14418 (description "Blosc is a high performance compressor optimized for binary
14419 data. It has been designed to transmit data to the processor cache faster
14420 than the traditional, non-compressed, direct memory fetch approach via a
14421 @code{memcpy()} system call.
14422
14423 Blosc works well for compressing numerical arrays that contains data with
14424 relatively low entropy, like sparse data, time series, grids with
14425 regular-spaced values, etc.
14426
14427 This Python package wraps the Blosc library.")
14428 (license license:bsd-3)))
14429
14430 (define-public python2-blosc
14431 (package-with-python2 python-blosc))
14432
14433 (define-public python-partd
14434 (package
14435 (name "python-partd")
14436 (version "0.3.9")
14437 (source
14438 (origin
14439 (method url-fetch)
14440 (uri (pypi-uri "partd" version))
14441 (sha256
14442 (base32
14443 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
14444 (build-system python-build-system)
14445 (propagated-inputs
14446 `(("python-blosc" ,python-blosc)
14447 ("python-locket" ,python-locket)
14448 ("python-numpy" ,python-numpy)
14449 ("python-pandas" ,python-pandas)
14450 ("python-pyzmq" ,python-pyzmq)
14451 ("python-toolz" ,python-toolz)))
14452 (home-page "https://github.com/dask/partd/")
14453 (synopsis "Appendable key-value storage")
14454 (description "Partd stores key-value pairs. Values are raw bytes. We
14455 append on old values. Partd excels at shuffling operations.")
14456 (license license:bsd-3)))
14457
14458 (define-public python2-partd
14459 (package-with-python2 python-partd))
14460
14461 (define-public python-dask
14462 (package
14463 (name "python-dask")
14464 (version "1.0.0")
14465 (source
14466 (origin
14467 (method url-fetch)
14468 (uri (pypi-uri "dask" version))
14469 (sha256
14470 (base32
14471 "1xwz8h020ipwav2p5gcq9pskya1cvzd6hjyvd06dvr3w5lxlmym1"))))
14472 (build-system python-build-system)
14473 ;; A single test out of 5000+ fails. This test is marked as xfail when
14474 ;; pytest-xdist is used.
14475 (arguments
14476 `(#:phases
14477 (modify-phases %standard-phases
14478 (add-after 'unpack 'disable-broken-test
14479 (lambda _
14480 (substitute* "dask/tests/test_threaded.py"
14481 (("def test_interrupt\\(\\)" m)
14482 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
14483 m)))
14484 (when (which "python2")
14485 ;; This test fails with recent Pandas:
14486 ;; <https://github.com/dask/dask/issues/3794>.
14487 (substitute* "dask/dataframe/tests/test_dataframe.py"
14488 (("def test_info\\(\\)" m)
14489 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
14490 m))))
14491 #t))
14492 (replace 'check
14493 (lambda _ (invoke "pytest" "-vv"))))))
14494 (propagated-inputs
14495 `(("python-cloudpickle" ,python-cloudpickle)
14496 ("python-numpy" ,python-numpy)
14497 ("python-pandas" ,python-pandas)
14498 ("python-partd" ,python-partd)
14499 ("python-toolz" ,python-toolz)
14500 ("python-pyyaml" ,python-pyyaml)))
14501 (native-inputs
14502 `(("python-pytest" ,python-pytest)
14503 ("python-pytest-runner" ,python-pytest-runner)))
14504 (home-page "https://github.com/dask/dask/")
14505 (synopsis "Parallel computing with task scheduling")
14506 (description
14507 "Dask is a flexible parallel computing library for analytics. It
14508 consists of two components: dynamic task scheduling optimized for computation,
14509 and large data collections like parallel arrays, dataframes, and lists that
14510 extend common interfaces like NumPy, Pandas, or Python iterators to
14511 larger-than-memory or distributed environments. These parallel collections
14512 run on top of the dynamic task schedulers. ")
14513 (license license:bsd-3)))
14514
14515 (define-public python2-dask
14516 (package-with-python2 python-dask))
14517
14518 (define-public python-ilinkedlist
14519 (package
14520 (name "python-ilinkedlist")
14521 (version "0.4.0")
14522 (source
14523 (origin
14524 (method url-fetch)
14525 (uri (pypi-uri "ilinkedlist" version))
14526 (sha256
14527 (base32
14528 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
14529 (build-system python-build-system)
14530 (native-inputs `(("python-pytest" ,python-pytest)))
14531 (inputs `(("python" ,python)))
14532 (home-page "https://github.com/luther9/ilinkedlist-py")
14533 (synopsis "Immutable linked list library")
14534 (description
14535 "This is a implementation of immutable linked lists for Python. It
14536 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
14537 Since a linked list is treated as immutable, it is hashable, and its length
14538 can be retrieved in constant time. Some of the terminology is inspired by
14539 LISP. It is possible to create an improper list by creating a @code{Pair}
14540 with a non-list @code{cdr}.")
14541 (license license:gpl3+)))
14542
14543 (define-public python-readlike
14544 (package
14545 (name "python-readlike")
14546 (version "0.1.3")
14547 (source
14548 (origin
14549 (method url-fetch)
14550 (uri (pypi-uri "readlike" version))
14551 (sha256
14552 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
14553 (build-system python-build-system)
14554 (home-page "https://github.com/jangler/readlike")
14555 (synopsis "GNU Readline-like line editing module")
14556 (description
14557 "This Python module provides line editing functions similar to the default
14558 Emacs-style ones of GNU Readline. Unlike the Python standard library's
14559 @code{readline} package, this one allows access to those capabilties in settings
14560 outside of a standard command-line interface. It is especially well-suited to
14561 interfacing with Urwid, due to a shared syntax for describing key inputs.
14562
14563 Currently, all stateless Readline commands are implemented. Yanking and history
14564 are not supported.")
14565 (license license:expat)))
14566
14567 (define-public python2-readlike
14568 (package-with-python2 python-readlike))
14569
14570 (define-public python-reparser
14571 (package
14572 (name "python-reparser")
14573 (version "1.4.3")
14574 (source
14575 (origin
14576 (method url-fetch)
14577 (uri (pypi-uri "ReParser" version))
14578 (sha256
14579 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
14580 (build-system python-build-system)
14581 (home-page "https://github.com/xmikos/reparser")
14582 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
14583 (description
14584 "This Python library provides a simple lexer/parser for inline markup based
14585 on regular expressions.")
14586 (license license:expat)))
14587
14588 (define-public python2-reparser
14589 (let ((reparser (package-with-python2
14590 (strip-python2-variant python-reparser))))
14591 (package (inherit reparser)
14592 (propagated-inputs
14593 `(("python2-enum34" ,python2-enum34)
14594 ,@(package-propagated-inputs reparser))))))
14595
14596 (define-public python-precis-i18n
14597 (package
14598 (name "python-precis-i18n")
14599 (version "1.0.0")
14600 (source
14601 (origin
14602 (method url-fetch)
14603 (uri (pypi-uri "precis_i18n" version))
14604 (sha256
14605 (base32
14606 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
14607 (build-system python-build-system)
14608 (home-page "https://github.com/byllyfish/precis_i18n")
14609 (synopsis "Implementation of the PRECIS framework")
14610 (description
14611 "This module implements the PRECIS Framework as described in RFC 8264,
14612 RFC 8265 and RFC 8266.")
14613 (license license:expat)))
14614
14615 (define-public python-absl-py
14616 (package
14617 (name "python-absl-py")
14618 (version "0.6.1")
14619 (source
14620 (origin
14621 (method url-fetch)
14622 (uri (pypi-uri "absl-py" version))
14623 (sha256
14624 (base32
14625 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
14626 (build-system python-build-system)
14627 (propagated-inputs
14628 `(("python-six" ,python-six)))
14629 (home-page "https://github.com/abseil/abseil-py")
14630 (synopsis "Abseil Python common libraries")
14631 (description
14632 "This package provides the Abseil Python Common Libraries, a collection
14633 of Python libraries for building Python applications.")
14634 (license license:asl2.0)))
14635
14636 (define-public python-astor
14637 (package
14638 (name "python-astor")
14639 (version "0.7.1")
14640 (source
14641 (origin
14642 (method url-fetch)
14643 (uri (pypi-uri "astor" version))
14644 (sha256
14645 (base32
14646 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
14647 (build-system python-build-system)
14648 ;; FIXME: There are two errors and two test failures.
14649 (arguments `(#:tests? #f))
14650 (home-page "https://github.com/berkerpeksag/astor")
14651 (synopsis "Read and write Python ASTs")
14652 (description "Astor is designed to allow easy manipulation of Python
14653 source via the Abstract Syntax Tree.")
14654 (license license:bsd-3)))
14655
14656 (define-public python2-astor
14657 (package-with-python2 python-astor))
14658
14659 (define-public python-grpcio
14660 (package
14661 (name "python-grpcio")
14662 (version "1.17.1")
14663 (source
14664 (origin
14665 (method url-fetch)
14666 (uri (pypi-uri "grpcio" version))
14667 (sha256
14668 (base32
14669 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
14670 (build-system python-build-system)
14671 (propagated-inputs
14672 `(("python-six" ,python-six)))
14673 (home-page "https://grpc.io")
14674 (synopsis "HTTP/2-based RPC framework")
14675 (description "This package provides a Python library for communicating
14676 with the HTTP/2-based RPC framework gRPC.")
14677 (license license:asl2.0)))
14678
14679 (define-public python-astunparse
14680 (package
14681 (name "python-astunparse")
14682 (version "1.6.1")
14683 (source
14684 (origin
14685 (method url-fetch)
14686 (uri (pypi-uri "astunparse" version))
14687 (sha256
14688 (base32
14689 "1jhidwyrqn17avqh9xnnm3wd7q7aahaq009cba67g86y6gxicyyj"))))
14690 (build-system python-build-system)
14691 (arguments '(#:tests? #f)) ; there are none
14692 (propagated-inputs
14693 `(("python-six" ,python-six)
14694 ("python-wheel" ,python-wheel)))
14695 (home-page "https://github.com/simonpercivall/astunparse")
14696 (synopsis "AST unparser for Python")
14697 (description "This package provides an AST unparser for Python. It is a
14698 factored out version of @code{unparse} found in the Python source
14699 distribution.")
14700 (license license:bsd-3)))
14701
14702 (define-public python-gast
14703 (package
14704 (name "python-gast")
14705 (version "0.2.0")
14706 (source
14707 (origin
14708 (method url-fetch)
14709 (uri (pypi-uri "gast" version))
14710 (sha256
14711 (base32
14712 "0c296xm1vz9x4w4inmdl0k8mnc0i9arw94si2i7pglpc461r0s3h"))))
14713 (build-system python-build-system)
14714 (propagated-inputs
14715 `(("python-astunparse" ,python-astunparse)))
14716 (home-page "https://pypi.org/project/gast/")
14717 (synopsis "Generic Python AST that abstracts the underlying Python version")
14718 (description
14719 "GAST provides a compatibility layer between the AST of various Python
14720 versions, as produced by @code{ast.parse} from the standard @code{ast}
14721 module.")
14722 (license license:bsd-3)))
14723
14724 (define-public python-wikidata
14725 (package
14726 (name "python-wikidata")
14727 (version "0.6.1")
14728 (source
14729 (origin
14730 (method url-fetch)
14731 (uri (pypi-uri "Wikidata" version))
14732 (sha256
14733 (base32
14734 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
14735 (build-system python-build-system)
14736 (propagated-inputs
14737 `(("python-babel" ,python-babel)))
14738 (home-page "https://github.com/dahlia/wikidata")
14739 (synopsis "Wikidata client library")
14740 (description
14741 "This package provides a Python interface to
14742 @url{https://www.wikidata.org/, Wikidata}.")
14743 (properties '((upstream-name . "Wikidata")))
14744 (license license:gpl3+)))
14745
14746 (define-public python-doctest-ignore-unicode
14747 (package
14748 (name "python-doctest-ignore-unicode")
14749 (version "0.1.2")
14750 (source
14751 (origin
14752 (method url-fetch)
14753 (uri (pypi-uri "doctest-ignore-unicode" version))
14754 (sha256
14755 (base32
14756 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
14757 (build-system python-build-system)
14758 (native-inputs
14759 `(("python-nose" ,python-nose)))
14760 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
14761 (synopsis "Ignore Unicode literal prefixes in doctests")
14762 (description
14763 "This package adds support for a flag to ignore Unicode literal prefixes
14764 in doctests.")
14765 (license license:asl2.0)))
14766
14767 (define-public python-attr
14768 (package
14769 (name "python-attr")
14770 (version "0.3.1")
14771 (source
14772 (origin
14773 (method url-fetch)
14774 (uri (pypi-uri "attr" version))
14775 (sha256
14776 (base32
14777 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
14778 (build-system python-build-system)
14779 (home-page "https://github.com/denis-ryzhkov/attr")
14780 (synopsis "Decorator for attributes of target function or class")
14781 (description "Simple decorator to set attributes of target function or
14782 class in a @acronym{DRY, Don't Repeat Yourself} way.")
14783 (license license:expat)))