gnu: rust: Update to 1.35.0.
[jackhill/guix/guix.git] / gnu / packages / python-xyz.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
3 ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
4 ;;; Copyright © 2013, 2014, 2015, 2016, 2019 Andreas Enge <andreas@enge.fr>
5 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
6 ;;; Copyright © 2014, 2017 Eric Bavier <bavier@member.fsf.org>
7 ;;; Copyright © 2014, 2015 Federico Beffa <beffa@fbengineering.ch>
8 ;;; Copyright © 2015 Omar Radwan <toxemicsquire4@gmail.com>
9 ;;; Copyright © 2015 Pierre-Antoine Rault <par@rigelk.eu>
10 ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
11 ;;; Copyright © 2015, 2016 Christopher Allan Webber <cwebber@dustycloud.org>
12 ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
13 ;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
14 ;;; Copyright © 2015, 2016, 2017, 2019 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 ng0 <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, 2019 Marius Bakke <mbakke@fastmail.com>
30 ;;; Copyright © 2016, 2017 Stefan Reichör <stefan@xsteve.at>
31 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
32 ;;; Copyright © 2016, 2017 Alex Vong <alexvong1995@gmail.com>
33 ;;; Copyright © 2016, 2017, 2018 Arun Isaac <arunisaac@systemreboot.net>
34 ;;; Copyright © 2016, 2017, 2018 Julien Lepiller <julien@lepiller.eu>
35 ;;; Copyright © 2016, 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
36 ;;; Copyright © 2016, 2017 Thomas Danckaert <post@thomasdanckaert.be>
37 ;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
38 ;;; Copyright © 2017 Frederick M. Muriithi <fredmanglis@gmail.com>
39 ;;; Copyright © 2017, 2018 Adriano Peluso <catonano@gmail.com>
40 ;;; Copyright © 2017 Ben Sturmfels <ben@sturm.com.au>
41 ;;; Copyright © 2017, 2018 Mathieu Othacehe <m.othacehe@gmail.com>
42 ;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.org>
43 ;;; Copyright © 2017 Roel Janssen <roel@gnu.org>
44 ;;; Copyright © 2017, 2018 Kei Kebreau <kkebreau@posteo.net>
45 ;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
46 ;;; Copyright © 2017 Muriithi Frederick Muriuki <fredmanglis@gmail.com>
47 ;;; Copyright © 2017, 2019 Brendan Tildesley <mail@brendan.scot>
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, 2019 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, 2019 Maxim Cournoyer <maxim.cournoyer@gmail.com>
58 ;;; Copyright © 2018 Luther Thompson <lutheroto@gmail.com>
59 ;;; Copyright © 2018 Vagrant Cascadian <vagrant@debian.org>
60 ;;; Copyright © 2019 Brett Gilio <brettg@posteo.net>
61 ;;; Copyright © 2019 Sam <smbaines8@gmail.com>
62 ;;; Copyright © 2019 Jack Hill <jackhill@jackhill.us>
63 ;;;
64 ;;; This file is part of GNU Guix.
65 ;;;
66 ;;; GNU Guix is free software; you can redistribute it and/or modify it
67 ;;; under the terms of the GNU General Public License as published by
68 ;;; the Free Software Foundation; either version 3 of the License, or (at
69 ;;; your option) any later version.
70 ;;;
71 ;;; GNU Guix is distributed in the hope that it will be useful, but
72 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
73 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
74 ;;; GNU General Public License for more details.
75 ;;;
76 ;;; You should have received a copy of the GNU General Public License
77 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
78
79 (define-module (gnu packages python-xyz)
80 #:use-module ((guix licenses) #:prefix license:)
81 #:use-module (gnu packages)
82 #:use-module (gnu packages algebra)
83 #:use-module (gnu packages adns)
84 #:use-module (gnu packages attr)
85 #:use-module (gnu packages backup)
86 #:use-module (gnu packages bash)
87 #:use-module (gnu packages check)
88 #:use-module (gnu packages compression)
89 #:use-module (gnu packages crypto)
90 #:use-module (gnu packages databases)
91 #:use-module (gnu packages file)
92 #:use-module (gnu packages fontutils)
93 #:use-module (gnu packages gcc)
94 #:use-module (gnu packages geo)
95 #:use-module (gnu packages ghostscript)
96 #:use-module (gnu packages gl)
97 #:use-module (gnu packages glib)
98 #:use-module (gnu packages graphviz)
99 #:use-module (gnu packages graphics)
100 #:use-module (gnu packages gstreamer)
101 #:use-module (gnu packages gtk)
102 #:use-module (gnu packages icu4c)
103 #:use-module (gnu packages image)
104 #:use-module (gnu packages imagemagick)
105 #:use-module (gnu packages libevent)
106 #:use-module (gnu packages libffi)
107 #:use-module (gnu packages linux)
108 #:use-module (gnu packages llvm)
109 #:use-module (gnu packages man)
110 #:use-module (gnu packages maths)
111 #:use-module (gnu packages monitoring)
112 #:use-module (gnu packages multiprecision)
113 #:use-module (gnu packages networking)
114 #:use-module (gnu packages ncurses)
115 #:use-module (gnu packages openstack)
116 #:use-module (gnu packages pcre)
117 #:use-module (gnu packages perl)
118 #:use-module (gnu packages pkg-config)
119 #:use-module (gnu packages python)
120 #:use-module (gnu packages python-check)
121 #:use-module (gnu packages python-crypto)
122 #:use-module (gnu packages python-web)
123 #:use-module (gnu packages qt)
124 #:use-module (gnu packages readline)
125 #:use-module (gnu packages sdl)
126 #:use-module (gnu packages search)
127 #:use-module (gnu packages shells)
128 #:use-module (gnu packages sphinx)
129 #:use-module (gnu packages ssh)
130 #:use-module (gnu packages terminals)
131 #:use-module (gnu packages tex)
132 #:use-module (gnu packages texinfo)
133 #:use-module (gnu packages time)
134 #:use-module (gnu packages tls)
135 #:use-module (gnu packages version-control)
136 #:use-module (gnu packages video)
137 #:use-module (gnu packages web)
138 #:use-module (gnu packages base)
139 #:use-module (gnu packages xml)
140 #:use-module (gnu packages xorg)
141 #:use-module (gnu packages xdisorg)
142 #:use-module (gnu packages tcl)
143 #:use-module (gnu packages bdw-gc)
144 #:use-module (gnu packages serialization)
145 #:use-module (guix packages)
146 #:use-module (guix download)
147 #:use-module (guix git-download)
148 #:use-module (guix hg-download)
149 #:use-module (guix utils)
150 #:use-module (guix build-system gnu)
151 #:use-module (guix build-system cmake)
152 #:use-module (guix build-system python)
153 #:use-module (guix build-system trivial)
154 #:use-module (srfi srfi-1)
155 #:use-module (srfi srfi-26))
156
157 (define-public python-psutil
158 (package
159 (name "python-psutil")
160 (version "5.6.2")
161 (source
162 (origin
163 (method url-fetch)
164 (uri (pypi-uri "psutil" version))
165 (sha256
166 (base32
167 "1v95vb5385qscfdvphv8l2w22bmir3d7yhpi02n58v3mlqy1r3l2"))))
168 (build-system python-build-system)
169 (arguments
170 ;; FIXME: some tests does not return and times out.
171 '(#:tests? #f))
172 (home-page "https://www.github.com/giampaolo/psutil")
173 (synopsis "Library for retrieving information on running processes")
174 (description
175 "psutil (Python system and process utilities) is a library for retrieving
176 information on running processes and system utilization (CPU, memory, disks,
177 network) in Python. It is useful mainly for system monitoring, profiling and
178 limiting process resources and management of running processes. It implements
179 many functionalities offered by command line tools such as: ps, top, lsof,
180 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
181 pidof, tty, taskset, pmap.")
182 (properties `((python2-variant . ,(delay python2-psutil))))
183 (license license:bsd-3)))
184
185 (define-public python2-psutil
186 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
187 (package
188 (inherit base)
189 (propagated-inputs
190 `(("python2-enum34" ,python2-enum34) ;optional
191 ,@(package-propagated-inputs base))))))
192
193 (define-public python-shapely
194 (package
195 (name "python-shapely")
196 (version "1.6.4.post2")
197 (source
198 (origin
199 (method url-fetch)
200 (uri (pypi-uri "Shapely" version))
201 (sha256
202 (base32
203 "03r42fmd9alp6r3q95ad6rldq2f7n1wimrw53zy5kpn33yv7pf64"))))
204 (build-system python-build-system)
205 (native-inputs
206 `(("python-cython" ,python-cython)
207 ("python-matplotlib" ,python-matplotlib)
208 ("python-pytest" ,python-pytest)
209 ("python-pytest-cov" ,python-pytest-cov)))
210 (inputs
211 `(("geos" ,geos)))
212 (propagated-inputs
213 `(("python-numpy" ,python-numpy)))
214 (arguments
215 `(#:phases
216 (modify-phases %standard-phases
217 (add-after 'unpack 'patch-geos-path
218 (lambda* (#:key inputs #:allow-other-keys)
219 (let ((geos (assoc-ref inputs "geos"))
220 (glibc (assoc-ref inputs ,(if (%current-target-system)
221 "cross-libc" "libc"))))
222 (substitute* "shapely/geos.py"
223 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
224 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
225 geos "/lib/libgeos_c.so'])"))
226 (("free = load_dll\\('c'\\)\\.free")
227 (string-append "free = load_dll('c', fallbacks=['"
228 glibc "/lib/libc.so.6']).free"))))
229 #t)))))
230 (home-page "https://github.com/Toblerity/Shapely")
231 (synopsis "Library for the manipulation and analysis of geometric objects")
232 (description "Shapely is a Python package for manipulation and analysis of
233 planar geometric objects. It is based on the @code{GEOS} library.")
234 (license license:bsd-3)))
235
236 (define-public python-shortuuid
237 (package
238 (name "python-shortuuid")
239 (version "0.5.0")
240 (source
241 (origin
242 (method url-fetch)
243 (uri (pypi-uri "shortuuid" version))
244 (sha256
245 (base32
246 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
247 (build-system python-build-system)
248 (native-inputs
249 `(("python-pep8" ,python-pep8)))
250 (home-page "https://github.com/skorokithakis/shortuuid")
251 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
252 (description
253 "@code{shortuuid} is a Python library for generating concise, unambiguous
254 and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
255 module and then similar looking characters are removed.")
256 (license license:bsd-3)))
257
258 (define-public python-logwrap
259 (package
260 (name "python-logwrap")
261 (version "3.2.1")
262 (source
263 (origin
264 (method url-fetch)
265 (uri (pypi-uri "logwrap" version ".zip"))
266 (sha256
267 (base32
268 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
269 (build-system python-build-system)
270 (propagated-inputs
271 `(("python-six" ,python-six)
272 ("python-typing" ,python-typing)))
273 (native-inputs
274 `(("unzip" ,unzip)
275 ("python-cython" ,python-cython)
276 ("python-pytest" ,python-pytest)
277 ("python-pytest-cov" ,python-pytest-cov)
278 ("python-pytest-runner" ,python-pytest-runner)))
279 (home-page "https://github.com/penguinolog/logwrap")
280 (synopsis "Decorator for logging function arguments")
281 (description "This package provides a decorator to log function arguments
282 and function call return values in a human-readable way.")
283 (license license:asl2.0)))
284
285 (define-public python2-shapely
286 (package-with-python2 python-shapely))
287
288 (define-public python-clyent
289 (package
290 (name "python-clyent")
291 (version "1.2.1")
292 (source
293 (origin
294 (method url-fetch)
295 (uri (pypi-uri "clyent" version))
296 (sha256
297 (base32
298 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
299 (build-system python-build-system)
300 (native-inputs
301 `(("python-mock" ,python-mock)))
302 (home-page "https://github.com/binstar/clyent")
303 (synopsis "Command line client library")
304 (description "Clyent is a Python command line utiliy library. It is used
305 by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
306 (license license:bsd-3)))
307
308 (define-public python2-clyent
309 (package-with-python2 python-clyent))
310
311 (define-public python-babel
312 (package
313 (name "python-babel")
314 (version "2.6.0")
315 (source
316 (origin
317 (method url-fetch)
318 (uri (pypi-uri "Babel" version))
319 (sha256
320 (base32
321 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))
322 (build-system python-build-system)
323 (native-inputs
324 `(("python-freezegun" ,python-freezegun)
325 ("python-pytest" ,python-pytest)))
326 (propagated-inputs
327 `(("python-pytz" ,python-pytz)))
328 (arguments
329 `(#:phases (modify-phases %standard-phases
330 (replace 'check
331 (lambda _ (invoke "pytest" "-vv"))))))
332 (home-page "http://babel.pocoo.org/")
333 (synopsis
334 "Tools for internationalizing Python applications")
335 (description
336 "Babel is composed of two major parts:
337 - tools to build and work with gettext message catalogs
338 - a Python interface to the CLDR (Common Locale Data Repository), providing
339 access to various locale display names, localized number and date formatting,
340 etc. ")
341 (license license:bsd-3)))
342
343 (define-public python2-babel
344 (package-with-python2 python-babel))
345
346 (define-public python2-backport-ssl-match-hostname
347 (package
348 (name "python2-backport-ssl-match-hostname")
349 (version "3.5.0.1")
350 (source
351 (origin
352 (method url-fetch)
353 (uri (pypi-uri "backports.ssl_match_hostname" version))
354 (sha256
355 (base32
356 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
357 (build-system python-build-system)
358 (arguments
359 `(#:python ,python-2
360 #:tests? #f)) ; no test target
361 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
362 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
363 (description
364 "This backport brings the ssl.match_hostname() function to users of
365 earlier versions of Python. The function checks the hostname in the
366 certificate returned by the server to which a connection has been established,
367 and verifies that it matches the intended target hostname.")
368 (license license:psfl)))
369
370 (define-public python-hdf4
371 (package
372 (name "python-hdf4")
373 (version "0.9")
374 (source
375 (origin
376 (method url-fetch)
377 (uri (pypi-uri name version))
378 (sha256
379 (base32
380 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
381 (build-system python-build-system)
382 (native-inputs `(("nose" ,python-nose)))
383 (propagated-inputs `(("numpy" ,python-numpy)))
384 (inputs
385 `(("hdf4" ,hdf4)
386 ("libjpeg" ,libjpeg)
387 ("zlib" ,zlib)))
388 (arguments
389 `(#:phases
390 (modify-phases %standard-phases
391 (replace 'check
392 (lambda _
393 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
394 ;; on to import numpy. Somehow this works on their CI system.
395 ;; Let's just manage PYTHONPATH here instead.
396 (substitute* "runexamples.sh"
397 (("export PYTHONPATH=.*") ""))
398 (setenv "PYTHONPATH"
399 (string-append (getcwd) ":"
400 (getenv "PYTHONPATH")))
401 (invoke "./runexamples.sh")
402 (invoke "nosetests" "-v"))))))
403 (home-page "https://github.com/fhs/python-hdf4")
404 (synopsis "Python interface to the NCSA HDF4 library")
405 (description
406 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
407 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
408 NetCDF files can also be read and modified. Python-HDF4 is a fork of
409 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
410 (license license:expat)))
411
412 (define-public python2-hdf4
413 (package-with-python2 python-hdf4))
414
415 (define-public python-h5py
416 (package
417 (name "python-h5py")
418 (version "2.8.0")
419 (source
420 (origin
421 (method url-fetch)
422 (uri (pypi-uri "h5py" version))
423 (sha256
424 (base32
425 "0mdr6wrq02ac93m1aqx9kad0ppfzmm4imlxqgyy1x4l7hmdcc9p6"))))
426 (build-system python-build-system)
427 (arguments
428 `(#:tests? #f ; no test target
429 #:phases
430 (modify-phases %standard-phases
431 (add-after 'unpack 'fix-hdf5-paths
432 (lambda* (#:key inputs #:allow-other-keys)
433 (let ((prefix (assoc-ref inputs "hdf5")))
434 (substitute* "setup_build.py"
435 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
436 (string-append "['" prefix "/lib" "']"))
437 (("'/opt/local/include', '/usr/local/include'")
438 (string-append "'" prefix "/include" "'")))
439 (substitute* "setup_configure.py"
440 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
441 (string-append "['" prefix "/lib" "']")))
442 #t))))))
443 (propagated-inputs
444 `(("python-six" ,python-six)
445 ("python-numpy" ,python-numpy)))
446 (inputs
447 `(("hdf5" ,hdf5)))
448 (native-inputs
449 `(("python-cython" ,python-cython)
450 ("python-pkgconfig" ,python-pkgconfig)))
451 (home-page "http://www.h5py.org/")
452 (synopsis "Read and write HDF5 files from Python")
453 (description
454 "The h5py package provides both a high- and low-level interface to the
455 HDF5 library from Python. The low-level interface is intended to be a
456 complete wrapping of the HDF5 API, while the high-level component supports
457 access to HDF5 files, datasets and groups using established Python and NumPy
458 concepts.")
459 (license license:bsd-3)))
460
461 (define-public python2-h5py
462 (package-with-python2 python-h5py))
463
464 (define-public python-sh
465 (package
466 (name "python-sh")
467 (version "1.12.14")
468 (source
469 (origin
470 (method url-fetch)
471 (uri (pypi-uri "sh" version))
472 (sha256
473 (base32
474 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
475 (build-system python-build-system)
476 (arguments
477 '(#:phases
478 (modify-phases %standard-phases
479 (replace 'check
480 (lambda _
481 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
482 (setenv "HOME" "/tmp")
483 (invoke "python" "sh.py" "test"))))))
484 (native-inputs
485 `(("python-coverage" ,python-coverage)))
486 (home-page "https://github.com/amoffat/sh")
487 (synopsis "Python subprocess replacement")
488 (description "This package provides a replacement for Python's
489 @code{subprocess} feature.")
490 (license license:expat)))
491
492 (define-public python2-sh
493 (package-with-python2 python-sh))
494
495 (define-public python-cftime
496 (package
497 (name "python-cftime")
498 (version "1.0.3.4")
499 (source
500 (origin
501 (method url-fetch)
502 (uri (pypi-uri "cftime" version))
503 (sha256
504 (base32
505 "0362dhxbzk593walyjz30dll6y2y79wialik647cbwdsf3ad0x6x"))))
506 (build-system python-build-system)
507 (propagated-inputs
508 `(("python-numpy" ,python-numpy)))
509 (native-inputs
510 `(("python-coveralls" ,python-coveralls)
511 ("python-cython" ,python-cython)
512 ("python-pytest-cov" ,python-pytest-cov)))
513 (home-page "https://github.com/Unidata/cftime")
514 (synopsis "Library for time handling")
515 (description
516 "This package provides time-handling functionality that used to be part
517 of the netcdf4 package before.")
518 ;; This package claims to include code under the GPLv3 but is released
519 ;; under ISC.
520 (license (list license:isc license:gpl3+))))
521
522 (define-public python-netcdf4
523 (package
524 (name "python-netcdf4")
525 (version "1.4.2")
526 (source
527 (origin
528 (method url-fetch)
529 (uri (pypi-uri "netCDF4" version))
530 (sha256
531 (base32
532 "0c0sklgrmv15ygliin8qq0hp7vanmbi74m6zpi0r1ksr0hssyd5r"))))
533 (build-system python-build-system)
534 (arguments
535 '(#:phases
536 (modify-phases %standard-phases
537 (add-after 'unpack 'configure-locations
538 (lambda* (#:key inputs #:allow-other-keys)
539 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
540 #t)))))
541 (native-inputs
542 `(("python-cython" ,python-cython)))
543 (propagated-inputs
544 `(("python-numpy" ,python-numpy)
545 ("python-cftime" ,python-cftime)))
546 (inputs
547 `(("netcdf" ,netcdf)
548 ("hdf4" ,hdf4)
549 ("hdf5" ,hdf5)))
550 (home-page "https://github.com/Unidata/netcdf4-python")
551 (synopsis "Python/numpy interface to the netCDF library")
552 (description "Netcdf4-python is a Python interface to the netCDF C
553 library. netCDF version 4 has many features not found in earlier
554 versions of the library and is implemented on top of HDF5. This module
555 can read and write files in both the new netCDF 4 and the old netCDF 3
556 format, and can create files that are readable by HDF5 clients. The
557 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
558 to users of that module.")
559 ;; The software is mainly ISC, but includes some files covered
560 ;; by the Expat license.
561 (license (list license:isc license:expat))))
562
563 (define-public python2-netcdf4
564 (package-with-python2 python-netcdf4))
565
566 (define-public python-lockfile
567 (package
568 (name "python-lockfile")
569 (version "0.12.2")
570 (source
571 (origin
572 (method url-fetch)
573 (uri (pypi-uri "lockfile" version))
574 (sha256
575 (base32
576 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
577 (build-system python-build-system)
578 (arguments '(#:test-target "check"))
579 (native-inputs
580 `(("python-pbr" ,python-pbr)))
581 (home-page "https://launchpad.net/pylockfile")
582 (synopsis "Platform-independent file locking module")
583 (description
584 "The lockfile package exports a LockFile class which provides a simple
585 API for locking files.")
586 (license license:expat)))
587
588 (define-public python2-lockfile
589 (package-with-python2 python-lockfile))
590
591 (define-public python-semantic-version
592 (package
593 (name "python-semantic-version")
594 (version "2.6.0")
595 (source
596 (origin
597 (method url-fetch)
598 (uri (pypi-uri "semantic_version" version))
599 (sha256
600 (base32
601 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
602 (build-system python-build-system)
603 (arguments
604 `(#:tests? #f)) ; PyPI tarball lacks tests
605 (home-page "https://github.com/rbarrois/python-semanticversion")
606 (synopsis "Semantic versioning module for Python")
607 (description
608 "The @code{semantic_version} class is a small library for handling
609 @uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
610
611 It can compare versions, generate a new version that represents a bump in one of
612 the version levels, and check whether any given string is a proper semantic
613 version identifier.")
614 (license license:bsd-3)))
615
616 (define-public python2-semantic-version
617 (package-with-python2 python-semantic-version))
618
619 (define-public python-serpent
620 (package
621 (name "python-serpent")
622 (version "1.28")
623 (source
624 (origin
625 (method url-fetch)
626 (uri (pypi-uri "serpent" version))
627 (sha256
628 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
629 (build-system python-build-system)
630 (native-inputs
631 `(("python-attrs" ,python-attrs)
632 ("python-pytz" ,python-pytz)))
633 (home-page "https://github.com/irmen/Serpent")
634 (synopsis "Serializer for literal Python expressions")
635 (description
636 "Serpent provides @code{ast.literal_eval()}-compatible object tree
637 serialization. It serializes an object tree into bytes (an utf-8 encoded
638 string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
639 to rebuild the original object tree.
640
641 Because only safe literals are encoded, it is safe to send serpent data to
642 other machines, such as over the network.")
643 (license license:expat)))
644
645 (define-public python-setuptools
646 (package
647 (name "python-setuptools")
648 (version "40.0.0")
649 (source
650 (origin
651 (method url-fetch)
652 (uri (pypi-uri "setuptools" version ".zip"))
653 (sha256
654 (base32
655 "0pq116lr14gnc62v76nk0npkm6krb2mpp7p9ab369zgv4n7dnah1"))
656 (modules '((guix build utils)))
657 (snippet
658 '(begin
659 ;; Remove included binaries which are used to build self-extracting
660 ;; installers for Windows.
661 ;; TODO: Find some way to build them ourself so we can include them.
662 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
663 #t))))
664 (build-system python-build-system)
665 ;; FIXME: Tests require pytest, which itself relies on setuptools.
666 ;; One could bootstrap with an internal untested setuptools.
667 (arguments
668 `(#:tests? #f))
669 (home-page "https://pypi.python.org/pypi/setuptools")
670 (synopsis
671 "Library designed to facilitate packaging Python projects")
672 (description
673 "Setuptools is a fully-featured, stable library designed to facilitate
674 packaging Python projects, where packaging includes:
675 Python package and module definitions,
676 distribution package metadata,
677 test hooks,
678 project installation,
679 platform-specific details,
680 Python 3 support.")
681 ;; TODO: setuptools now bundles the following libraries:
682 ;; packaging, pyparsing, six and appdirs. How to unbundle?
683 (license (list license:psfl ; setuptools itself
684 license:expat ; six, appdirs, pyparsing
685 license:asl2.0 ; packaging is dual ASL2/BSD-2
686 license:bsd-2))))
687
688 (define-public python2-setuptools
689 (package-with-python2 python-setuptools))
690
691 (define-public python-uniseg
692 (package
693 (name "python-uniseg")
694 (version "0.7.1")
695 (source
696 (origin
697 (method url-fetch)
698 (uri (pypi-uri "uniseg" version ".zip"))
699 (sha256
700 (base32
701 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
702 (build-system python-build-system)
703 (arguments
704 '(#:tests? #f)) ; The test suite requires network access.
705 (native-inputs
706 `(("unzip" ,unzip)))
707 (home-page
708 "https://bitbucket.org/emptypage/uniseg-python")
709 (synopsis
710 "Python library to determine Unicode text segmentations")
711 (description
712 "Uniseg is a Python package used to determine Unicode text segmentations.
713 Supported segmentations include:
714 @enumerate
715 @item @dfn{Code point} (any value in the Unicode codespace)
716 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
717 multiple Unicode code points, e.g. \"G\" + acute-accent)
718 @item Word break
719 @item Sentence break
720 @item Line break
721 @end enumerate")
722 (license license:expat)))
723
724 (define-public python2-uniseg
725 (package-with-python2 python-uniseg))
726
727 (define-public python-humanfriendly
728 (package
729 (name "python-humanfriendly")
730 (version "4.4.1")
731 (source
732 (origin
733 (method url-fetch)
734 (uri (pypi-uri "humanfriendly" version))
735 (sha256
736 (base32
737 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
738 (build-system python-build-system)
739 (arguments
740 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
741 #:tests? #f))
742 (propagated-inputs
743 `(("python-monotonic" ,python-monotonic)))
744 (home-page "https://humanfriendly.readthedocs.io")
745 (synopsis "Human-friendly input and output in Python")
746 (description
747 "The functions and classes in @code{humanfriendly} can be used to make
748 text interfaces more user-friendly. It includes tools to parse and format
749 numbers, file sizes, and timespans, timers for long-running operations, menus
750 to allow the user to choose from a list of options, and terminal interaction
751 helpers.")
752 (license license:expat)))
753
754 (define-public python2-humanfriendly
755 (package-with-python2 python-humanfriendly))
756
757 (define-public python-capturer
758 (package
759 (name "python-capturer")
760 (version "2.4")
761 (source
762 (origin
763 (method url-fetch)
764 (uri (pypi-uri "capturer" version))
765 (sha256
766 (base32
767 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
768 (build-system python-build-system)
769 (arguments
770 `(#:tests? #f))
771 (propagated-inputs
772 `(("python-humanfriendly" ,python-humanfriendly)))
773 (home-page "https://capturer.readthedocs.io")
774 (synopsis "Capture stdout and stderr streams of the current process")
775 (description
776 "The capturer package makes it easy to capture the stdout and stderr
777 streams of the current process and subprocesses. Output can be relayed
778 to the terminal in real time but is also available to the Python program
779 for additional processing.")
780 (license license:expat)))
781
782 (define-public python2-capturer
783 (package-with-python2 python-capturer))
784
785 (define-public python-case
786 (package
787 (name "python-case")
788 (version "1.5.3")
789 (source
790 (origin
791 (method url-fetch)
792 (uri (pypi-uri "case" version))
793 (sha256
794 (base32
795 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
796 (build-system python-build-system)
797 (propagated-inputs
798 `(("python-mock" ,python-mock)
799 ("python-nose" ,python-nose)
800 ("python-six" ,python-six)
801 ("python-unittest2" ,python-unittest2)))
802 (native-inputs
803 `(("python-coverage" ,python-coverage)))
804 (home-page "https://github.com/celery/case")
805 (synopsis "Unittest utilities and convenience methods")
806 (description
807 "The @code{case} package provides utilities on top of unittest, including
808 some helpful Python 2 compatibility convenience methods.")
809 (license license:bsd-3)))
810
811 (define-public python-verboselogs
812 (package
813 (name "python-verboselogs")
814 (version "1.7")
815 (source
816 (origin
817 (method url-fetch)
818 (uri (pypi-uri "verboselogs" version))
819 (sha256
820 (base32
821 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
822 (build-system python-build-system)
823 (native-inputs
824 `(("python-mock" ,python-mock)
825 ("python-astroid" ,python-astroid)
826 ("python-pylint" ,python-pylint)))
827 (home-page "https://verboselogs.readthedocs.io")
828 (synopsis "Verbose logging level for Python's logging module")
829 (description
830 "The @code{verboselogs} package extends Python's @code{logging} module to
831 add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
832 (license license:expat)))
833
834 (define-public python2-verboselogs
835 (package-with-python2 python-verboselogs))
836
837 (define-public python-coloredlogs
838 (package
839 (name "python-coloredlogs")
840 (version "7.3")
841 (source
842 (origin
843 (method url-fetch)
844 (uri (pypi-uri "coloredlogs" version))
845 (sha256
846 (base32
847 "1blcann6dyg5dhps9pg12rn0q0rjrlajpmmil0gy0j4cbvnl2il9"))))
848 (build-system python-build-system)
849 (arguments
850 `(;Tests require some updated modules
851 #:tests? #f))
852 (propagated-inputs
853 `(("python-capturer" ,python-capturer)))
854 (home-page "https://coloredlogs.readthedocs.io")
855 (synopsis "Colored stream handler for Python's logging module")
856 (description
857 "The @code{coloredlogs} package enables colored terminal output for
858 Python's logging module. The @code{ColoredFormatter} class inherits from
859 @code{logging.Formatter} and uses ANSI escape sequences to render your logging
860 messages in color.")
861 (license license:expat)))
862
863 (define-public python2-coloredlogs
864 (package-with-python2 python-coloredlogs))
865
866 (define-public python-et-xmlfile
867 (package
868 (name "python-et-xmlfile")
869 (version "1.0.1")
870 (source
871 (origin
872 (method url-fetch)
873 (uri (pypi-uri "et_xmlfile" version))
874 (sha256
875 (base32
876 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
877 (build-system python-build-system)
878 (arguments
879 `(#:phases (modify-phases %standard-phases
880 (replace 'check
881 (lambda _
882 (invoke "pytest"))))))
883 (native-inputs
884 `(("python-pytest" ,python-pytest)
885 ("python-lxml" ,python-lxml))) ;used for the tests
886 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
887 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
888 (description "This Python library is based upon the @code{xmlfile} module
889 from @code{lxml}. It aims to provide a low memory, compatible implementation
890 of @code{xmlfile}.")
891 (license license:expat)))
892
893 (define-public python2-et-xmlfile
894 (package-with-python2 python-et-xmlfile))
895
896 (define-public python-openpyxl
897 (package
898 (name "python-openpyxl")
899 (version "2.6.2")
900 (source
901 (origin
902 ;; We use the upstream repository, as the tests are not included in the
903 ;; PyPI releases.
904 (method hg-fetch)
905 (uri (hg-reference
906 (url "https://bitbucket.org/openpyxl/openpyxl")
907 (changeset version)))
908 (file-name (string-append name "-" version "-checkout"))
909 (sha256
910 (base32 "1qhij6kcvdxqjy4g6193nsv4q7fy8n4fwyd3c2z047idlm6s3j4w"))))
911 (build-system python-build-system)
912 (arguments
913 `(#:phases (modify-phases %standard-phases
914 (replace 'check
915 (lambda _
916 (invoke "pytest"))))))
917 (native-inputs
918 ;; For the test suite.
919 `(("python-lxml" ,python-lxml)
920 ("python-pillow" ,python-pillow)
921 ("python-pytest" ,python-pytest)))
922 (propagated-inputs
923 `(("python-et-xmlfile" ,python-et-xmlfile)
924 ("python-jdcal" ,python-jdcal)))
925 (home-page "https://openpyxl.readthedocs.io")
926 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
927 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
928 XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
929 standard.")
930 (license license:expat)))
931
932 (define-public python-eventlet
933 (package
934 (name "python-eventlet")
935 (version "0.20.1")
936 (source
937 (origin
938 (method url-fetch)
939 (uri (pypi-uri "eventlet" version))
940 (sha256
941 (base32
942 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
943 (build-system python-build-system)
944 (propagated-inputs
945 `(("python-greenlet" ,python-greenlet)))
946 (arguments
947 ;; TODO: Requires unpackaged 'enum-compat'.
948 '(#:tests? #f))
949 (home-page "http://eventlet.net")
950 (synopsis "Concurrent networking library for Python")
951 (description
952 "Eventlet is a concurrent networking library for Python that
953 allows you to change how you run your code, not how you write it.
954 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
955 Coroutines ensure that the developer uses a blocking style of programming
956 that is similar to threading, but provide the benefits of non-blocking I/O.
957 The event dispatch is implicit, which means you can easily use @code{Eventlet}
958 from the Python interpreter, or as a small part of a larger application.")
959 (license license:expat)))
960
961 (define-public python2-eventlet
962 (let ((base (package-with-python2
963 (strip-python2-variant python-eventlet))))
964 (package (inherit base)
965 (propagated-inputs
966 `(("python2-enum34" ,python2-enum34)
967 ,@(package-propagated-inputs base))))))
968
969 (define-public python-six
970 (package
971 (name "python-six")
972 (version "1.11.0")
973 (source
974 (origin
975 (method url-fetch)
976 (uri (pypi-uri "six" version))
977 (sha256
978 (base32
979 "1scqzwc51c875z23phj48gircqjgnn3af8zy2izjwmnlxrxsgs3h"))))
980 (build-system python-build-system)
981 (arguments
982 `(#:phases
983 (modify-phases %standard-phases
984 (replace 'check
985 (lambda _
986 (invoke "py.test" "-v"))))))
987 (native-inputs
988 `(("python-py" ,python-py)
989 ("python-pytest" ,python-pytest-bootstrap)))
990 (home-page "https://pypi.python.org/pypi/six/")
991 (synopsis "Python 2 and 3 compatibility utilities")
992 (description
993 "Six is a Python 2 and 3 compatibility library. It provides utility
994 functions for smoothing over the differences between the Python versions with
995 the goal of writing Python code that is compatible on both Python versions.
996 Six supports every Python version since 2.5. It is contained in only one
997 Python file, so it can be easily copied into your project.")
998 (license license:x11)))
999
1000 (define-public python2-six
1001 (package-with-python2 python-six))
1002
1003 (define-public python-six-bootstrap
1004 (package
1005 (inherit python-six)
1006 (name "python-six-bootstrap")
1007 (native-inputs `())
1008 (arguments `(#:tests? #f))))
1009
1010 (define-public python2-six-bootstrap
1011 (package-with-python2 python-six-bootstrap))
1012
1013 (define-public python-schedule
1014 (package
1015 (name "python-schedule")
1016 (version "0.4.3")
1017 (source
1018 (origin
1019 (method url-fetch)
1020 (uri (pypi-uri "schedule" version))
1021 (sha256
1022 (base32
1023 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1024 (build-system python-build-system)
1025 (native-inputs
1026 `(("python-pytest" ,python-pytest)
1027 ("python-mock" ,python-mock)))
1028 (home-page "https://github.com/dbader/schedule")
1029 (synopsis "Schedule periodic function calls in Python")
1030 (description
1031 "Schedule is an in-process scheduler for periodic jobs that uses the
1032 builder pattern for configuration. Schedule lets you run Python functions (or
1033 any other callable) periodically at pre-determined intervals using a simple,
1034 human-friendly syntax.")
1035 (license license:expat)))
1036
1037 (define-public python2-schedule
1038 (package-with-python2 python-schedule))
1039
1040 (define-public python-pandas
1041 (package
1042 (name "python-pandas")
1043 (version "0.24.2")
1044 (source
1045 (origin
1046 (method url-fetch)
1047 (uri (pypi-uri "pandas" version))
1048 (sha256
1049 (base32 "18imlm8xbhcbwy4wa957a1fkamrcb0z988z006jpfda3ki09z4ag"))))
1050 (build-system python-build-system)
1051 (arguments
1052 `(#:modules ((guix build utils)
1053 (guix build python-build-system)
1054 (ice-9 ftw)
1055 (srfi srfi-26))
1056 #:phases (modify-phases %standard-phases
1057 (add-after 'unpack 'patch-which
1058 (lambda* (#:key inputs #:allow-other-keys)
1059 (let ((which (assoc-ref inputs "which")))
1060 (substitute* "pandas/io/clipboard/__init__.py"
1061 (("^CHECK_CMD = .*")
1062 (string-append "CHECK_CMD = \"" which "\"\n"))))
1063 #t))
1064 (replace 'check
1065 (lambda _
1066 (let ((build-directory
1067 (string-append
1068 (getcwd) "/build/"
1069 (car (scandir "build"
1070 (cut string-prefix? "lib." <>))))))
1071 ;; Disable the "strict data files" option which causes
1072 ;; the build to error out if required data files are
1073 ;; not available (as is the case with PyPI archives).
1074 (substitute* "setup.cfg"
1075 (("addopts = --strict-data-files") "addopts = "))
1076 (with-directory-excursion build-directory
1077 ;; Delete tests that require "moto" which is not yet
1078 ;; in Guix.
1079 (for-each delete-file
1080 '("pandas/tests/io/conftest.py"
1081 "pandas/tests/io/json/test_compression.py"
1082 "pandas/tests/io/parser/test_network.py"
1083 "pandas/tests/io/test_parquet.py"))
1084 (invoke "pytest" "-vv" "pandas" "--skip-slow"
1085 "--skip-network" "-k"
1086 ;; XXX: Due to the deleted tests above.
1087 "not test_read_s3_jsonl"))))))))
1088 (propagated-inputs
1089 `(("python-numpy" ,python-numpy)
1090 ("python-openpyxl" ,python-openpyxl)
1091 ("python-pytz" ,python-pytz)
1092 ("python-dateutil" ,python-dateutil)
1093 ("python-xlrd" ,python-xlrd)))
1094 (inputs
1095 `(("which" ,which)))
1096 (native-inputs
1097 `(("python-cython" ,python-cython)
1098 ("python-beautifulsoup4" ,python-beautifulsoup4)
1099 ("python-lxml" ,python-lxml)
1100 ("python-html5lib" ,python-html5lib)
1101 ("python-nose" ,python-nose)
1102 ("python-pytest" ,python-pytest)
1103 ("python-pytest-mock" ,python-pytest-mock)))
1104 (home-page "https://pandas.pydata.org")
1105 (synopsis "Data structures for data analysis, time series, and statistics")
1106 (description
1107 "Pandas is a Python package providing fast, flexible, and expressive data
1108 structures designed to make working with structured (tabular,
1109 multidimensional, potentially heterogeneous) and time series data both easy
1110 and intuitive. It aims to be the fundamental high-level building block for
1111 doing practical, real world data analysis in Python.")
1112 (license license:bsd-3)))
1113
1114 (define-public python2-pandas
1115 (package-with-python2 python-pandas))
1116
1117 (define-public python2-mechanize
1118 (package
1119 (name "python2-mechanize")
1120 (version "0.2.5")
1121 (source
1122 (origin
1123 (method url-fetch)
1124 (uri (pypi-uri "mechanize" version))
1125 (sha256
1126 (base32
1127 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1128 (build-system python-build-system)
1129 (arguments
1130 `(#:python ,python-2 ; apparently incompatible with Python 3
1131 #:tests? #f))
1132 ;; test fails with message
1133 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1134 ;; (python-3.3.2) or
1135 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1136 ;; (python-2.7.5).
1137 ;; The source code is from March 2011 and probably not up-to-date
1138 ;; with respect to python unit tests.
1139 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1140 (synopsis
1141 "Stateful programmatic web browsing in Python")
1142 (description
1143 "Mechanize implements stateful programmatic web browsing in Python,
1144 after Andy Lester’s Perl module WWW::Mechanize.")
1145 (license (license:non-copyleft
1146 "file://COPYING"
1147 "See COPYING in the distribution."))))
1148
1149
1150 (define-public python-simplejson
1151 (package
1152 (name "python-simplejson")
1153 (version "3.14.0")
1154 (source
1155 (origin
1156 (method url-fetch)
1157 (uri (pypi-uri "simplejson" version))
1158 (sha256
1159 (base32
1160 "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy"))))
1161 (build-system python-build-system)
1162 (home-page "http://simplejson.readthedocs.org/en/latest/")
1163 (synopsis
1164 "Json library for Python")
1165 (description
1166 "JSON (JavaScript Object Notation) is a subset of JavaScript
1167 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1168 format.
1169
1170 Simplejson exposes an API familiar to users of the standard library marshal
1171 and pickle modules. It is the externally maintained version of the json
1172 library contained in Python 2.6, but maintains compatibility with Python 2.5
1173 and (currently) has significant performance advantages, even without using
1174 the optional C extension for speedups. Simplejson is also supported on
1175 Python 3.3+.")
1176 (license license:x11)))
1177
1178 (define-public python2-simplejson
1179 (package-with-python2 python-simplejson))
1180
1181
1182 (define-public python-pyicu
1183 (package
1184 (name "python-pyicu")
1185 (version "2.2")
1186 (source
1187 (origin
1188 (method url-fetch)
1189 (uri (pypi-uri "PyICU" version))
1190 (sha256
1191 (base32
1192 "0wq9y5fi1ighgf5aws9nr87vi1w44p7q1k83rx2y3qj5d2xyhspa"))))
1193 (build-system python-build-system)
1194 (inputs
1195 `(("icu4c" ,icu4c)))
1196 (native-inputs
1197 `(("python-pytest" ,python-pytest)
1198 ("python-six" ,python-six)))
1199 (home-page "https://github.com/ovalhub/pyicu")
1200 (synopsis "Python extension wrapping the ICU C++ API")
1201 (description
1202 "PyICU is a python extension wrapping the ICU C++ API.")
1203 (properties `((python2-variant . ,(delay python2-pyicu))))
1204 (license license:x11)))
1205
1206 (define-public python2-pyicu
1207 (let ((base (package-with-python2
1208 (strip-python2-variant python-pyicu))))
1209 (package
1210 (inherit base)
1211 (arguments
1212 `(,@(package-arguments base)
1213 #:phases
1214 (modify-phases %standard-phases
1215 (add-before 'check 'delete-failing-test
1216 (λ _
1217 ;; XXX: This fails due to Unicode issues unique to Python 2,
1218 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1219 (delete-file "test/test_Script.py")
1220 #t))))))))
1221
1222 (define-public python2-dogtail
1223 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1224 ;; spaces in indentation" with Python 3.
1225 (package
1226 (name "python2-dogtail")
1227 (version "0.9.9")
1228 (source (origin
1229 (method url-fetch)
1230 (uri (pypi-uri "dogtail" version))
1231 (sha256
1232 (base32
1233 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1234 (build-system python-build-system)
1235 (arguments `(#:python ,python-2
1236 #:tests? #f)) ; invalid command "test"
1237 ;; Currently no offical homepage.
1238 (home-page "https://pypi.python.org/pypi/dogtail/")
1239 (synopsis "GUI test tool and automation framework written in Python")
1240 (description
1241 "Dogtail is a GUI test tool and automation framework written in Python.
1242 It uses Accessibility (a11y) technologies to communicate with desktop
1243 applications. dogtail scripts are written in Python and executed like any
1244 other Python program.")
1245 (license license:gpl2+)))
1246
1247 (define-public python-empy
1248 (package
1249 (name "python-empy")
1250 (version "3.3.3")
1251 (source (origin
1252 (method url-fetch)
1253 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1254 version ".tar.gz"))
1255 (sha256
1256 (base32
1257 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
1258 (build-system python-build-system)
1259 (arguments
1260 `(#:tests? #f)) ; python2 only
1261 (home-page "http://www.alcyone.com/software/empy/")
1262 (synopsis "Templating system for Python")
1263 (description
1264 "EmPy is a system for embedding Python expressions and statements in
1265 template text; it takes an EmPy source file, processes it, and produces
1266 output. This is accomplished via expansions, which are special signals to the
1267 EmPy system and are set off by a special prefix (by default the at sign, @@).
1268 EmPy can expand arbitrary Python expressions and statements in this way, as
1269 well as a variety of special forms. Textual data not explicitly delimited in
1270 this way is sent unaffected to the output, allowing Python to be used in
1271 effect as a markup language. Also supported are callbacks via hooks,
1272 recording and playback via diversions, and dynamic, chainable filters. The
1273 system is highly configurable via command line options and embedded
1274 commands.")
1275 (license license:lgpl2.1+)))
1276
1277 (define-public python2-empy
1278 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
1279 (package
1280 (inherit base)
1281 (arguments `(,@(package-arguments base)
1282 #:tests? #t)))))
1283
1284 (define-public python2-element-tree
1285 (package
1286 (name "python2-element-tree")
1287 (version "1.2.6")
1288 (source (origin
1289 (method url-fetch)
1290 (uri (string-append
1291 "http://effbot.org/media/downloads/elementtree-"
1292 version "-20050316.tar.gz"))
1293 (sha256
1294 (base32
1295 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1296 (build-system python-build-system)
1297 (arguments
1298 `(#:python ,python-2 ; seems to be part of Python 3
1299 #:tests? #f)) ; no 'test' sub-command
1300 (synopsis "Toolkit for XML processing in Python")
1301 (description
1302 "ElementTree is a Python library supporting lightweight XML processing.")
1303 (home-page "http://effbot.org/zone/element-index.htm")
1304 (license (license:x11-style
1305 "http://docs.python.org/2/license.html"
1306 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1307
1308 (define-public python2-pybugz
1309 (package
1310 (name "python2-pybugz")
1311 (version "0.6.11")
1312 (source (origin
1313 (method url-fetch)
1314 (uri (string-append
1315 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1316 version ".tar.gz"))
1317 (sha256
1318 (base32
1319 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1320 (patches (search-patches "pybugz-stty.patch"
1321 "pybugz-encode-error.patch"))))
1322 (build-system python-build-system)
1323 (arguments
1324 `(#:python ,python-2 ; SyntaxError with Python 3
1325 #:tests? #f)) ; no 'test' sub-command
1326 (propagated-inputs
1327 `(("element-tree" ,python2-element-tree)))
1328 (synopsis "Python and command-line interface to Bugzilla")
1329 (description
1330 "PyBugz is a Python library and command-line tool to query the Bugzilla
1331 bug tracking system. It is meant as an aid to speed up interaction with the
1332 bug tracker.")
1333 (home-page "http://www.liquidx.net/pybugz/")
1334 (license license:gpl2)))
1335
1336 (define-public python2-enum
1337 (package
1338 (name "python2-enum")
1339 (version "0.4.6")
1340 (source (origin
1341 (method url-fetch)
1342 (uri (pypi-uri "enum" version))
1343 (sha256
1344 (base32
1345 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1346 (build-system python-build-system)
1347 (arguments
1348 `(#:python ,python-2))
1349 (home-page "http://pypi.python.org/pypi/enum/")
1350 (synopsis "Robust enumerated type support in Python")
1351 (description
1352 "This provides a module for robust enumerations in Python. It has
1353 been superseded by the Python standard library and is provided only for
1354 compatibility.")
1355 ;; Choice of either license.
1356 (license (list license:gpl3+ license:psfl))))
1357
1358 (define-public python-enum34
1359 (package
1360 (name "python-enum34")
1361 (version "1.1.6")
1362 (source
1363 (origin
1364 (method url-fetch)
1365 (uri (pypi-uri "enum34" version))
1366 (sha256
1367 (base32
1368 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1369 (build-system python-build-system)
1370 (home-page "https://pypi.python.org/pypi/enum34")
1371 (synopsis "Backported Python 3.4 Enum")
1372 (description
1373 "Enum34 is the new Python stdlib enum module available in Python 3.4
1374 backported for previous versions of Python from 2.4 to 3.3.")
1375 (license license:bsd-3)))
1376
1377 (define-public python2-enum34
1378 (package-with-python2 python-enum34))
1379
1380 (define-public python-parse-type
1381 (package
1382 (name "python-parse-type")
1383 (version "0.4.2")
1384 (source
1385 (origin
1386 (method url-fetch)
1387 (uri (pypi-uri "parse_type" version))
1388 (sha256
1389 (base32
1390 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1391 (build-system python-build-system)
1392 (propagated-inputs
1393 `(("python-six" ,python-six)
1394 ("python-parse" ,python-parse)))
1395 (native-inputs
1396 `(("python-pytest" ,python-pytest)
1397 ("python-pytest-runner" ,python-pytest-runner)))
1398 (home-page "https://github.com/jenisys/parse_type")
1399 (synopsis "Extended parse module")
1400 (description
1401 "Parse_type extends the python parse module.")
1402 (properties
1403 `((python2-variant . ,(delay python2-parse-type))))
1404 (license license:bsd-3)))
1405
1406 (define-public python2-parse-type
1407 (let ((base (package-with-python2
1408 (strip-python2-variant python-parse-type))))
1409 (package (inherit base)
1410 (propagated-inputs
1411 `(("python2-enum34" ,python2-enum34)
1412 ,@(package-propagated-inputs base))))))
1413
1414 (define-public python-parse
1415 (package
1416 (name "python-parse")
1417 (version "1.8.4")
1418 (source
1419 (origin
1420 (method url-fetch)
1421 (uri (pypi-uri "parse" version))
1422 (sha256
1423 (base32
1424 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
1425 (build-system python-build-system)
1426 (arguments
1427 `(#:phases
1428 (modify-phases %standard-phases
1429 (replace 'check
1430 (lambda _ (invoke "python" "test_parse.py"))))))
1431 (home-page "https://github.com/r1chardj0n3s/parse")
1432 (synopsis "Parse strings")
1433 (description
1434 "Parse strings using a specification based on the Python @code{format()}
1435 syntax.")
1436 (license license:x11)))
1437
1438 (define-public python-polib
1439 (package
1440 (name "python-polib")
1441 (version "1.0.8")
1442 (source (origin
1443 (method url-fetch)
1444 (uri (pypi-uri "polib" version))
1445 (sha256
1446 (base32
1447 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1448 (build-system python-build-system)
1449 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1450 (synopsis "Manipulate, create and modify gettext files")
1451 (description "Polib can manipulate any gettext format (po, pot and mo)
1452 files. It can be used to create po files from scratch or to modify
1453 existing ones.")
1454 (license license:expat)))
1455
1456 (define-public python2-polib
1457 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1458 (package
1459 (inherit base)
1460 (arguments `(,@(package-arguments base)
1461 ;; Tests don't work with python2.
1462 #:tests? #f)))))
1463
1464 (define-public scons
1465 (package
1466 (name "scons")
1467 (version "3.0.4")
1468 (source (origin
1469 (method git-fetch)
1470 (uri (git-reference
1471 (url "https://github.com/SCons/scons.git")
1472 (commit version)))
1473 (file-name (git-file-name name version))
1474 (sha256
1475 (base32
1476 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
1477 (build-system python-build-system)
1478 (arguments
1479 `(#:use-setuptools? #f ; still relies on distutils
1480 #:tests? #f ; no 'python setup.py test' command
1481 #:phases
1482 (modify-phases %standard-phases
1483 (add-before 'build 'bootstrap
1484 (lambda _
1485 (substitute* "src/engine/SCons/compat/__init__.py"
1486 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
1487 "sys.modules[new] = __import__(old)"))
1488 (substitute* "src/engine/SCons/Platform/__init__.py"
1489 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
1490 "mod = __import__(full_name)"))
1491 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
1492 (chdir "build/scons")
1493 #t)))))
1494 (home-page "http://scons.org/")
1495 (synopsis "Software construction tool written in Python")
1496 (description
1497 "SCons is a software construction tool. Think of SCons as an improved,
1498 cross-platform substitute for the classic Make utility with integrated
1499 functionality similar to autoconf/automake and compiler caches such as ccache.
1500 In short, SCons is an easier, more reliable and faster way to build
1501 software.")
1502 (license license:x11)))
1503
1504 (define-public scons-python2
1505 (package
1506 (inherit (package-with-python2 scons))
1507 (name "scons-python2")))
1508
1509 (define-public python-extras
1510 (package
1511 (name "python-extras")
1512 (version "1.0.0")
1513 (source
1514 (origin
1515 (method url-fetch)
1516 (uri (pypi-uri "extras" version))
1517 (sha256
1518 (base32
1519 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1520 (build-system python-build-system)
1521 (arguments
1522 ;; FIXME: Circular dependency on testtools.
1523 '(#:tests? #f))
1524 (home-page "https://github.com/testing-cabal/extras")
1525 (synopsis "Useful extensions to the Python standard library")
1526 (description
1527 "Extras is a set of extensions to the Python standard library.")
1528 (license license:expat)))
1529
1530 (define-public python2-extras
1531 (package-with-python2 python-extras))
1532
1533 (define-public python-mimeparse
1534 (package
1535 (name "python-mimeparse")
1536 (version "1.6.0")
1537 (source
1538 (origin
1539 (method url-fetch)
1540 (uri (pypi-uri "python-mimeparse" version))
1541 (sha256
1542 (base32
1543 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
1544 (build-system python-build-system)
1545 (arguments
1546 '(#:phases
1547 (modify-phases %standard-phases
1548 (replace 'check
1549 (lambda _
1550 (invoke "./mimeparse_test.py"))))))
1551 (home-page
1552 "https://github.com/dbtsai/python-mimeparse")
1553 (synopsis "Python library for parsing MIME types")
1554 (description
1555 "Mimeparse provides basic functions for parsing MIME type names and
1556 matching them against a list of media-ranges.")
1557 (license license:expat)))
1558
1559 (define-public python2-mimeparse
1560 (package-with-python2 python-mimeparse))
1561
1562 (define-public python-miniboa
1563 (package
1564 (name "python-miniboa")
1565 (version "1.0.7")
1566 (source
1567 (origin
1568 (method url-fetch)
1569 (uri (pypi-uri "miniboa" version))
1570 (sha256
1571 (base32
1572 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
1573 (build-system python-build-system)
1574 (home-page "https://github.com/shmup/miniboa")
1575 (synopsis "Simple, single-threaded Telnet server")
1576 (description
1577 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
1578 server.")
1579 (license license:asl2.0)))
1580
1581 (define-public python2-miniboa
1582 (package-with-python2 python-miniboa))
1583
1584 (define-public python-pafy
1585 (package
1586 (name "python-pafy")
1587 (version "0.5.3.1")
1588 (source
1589 (origin
1590 (method url-fetch)
1591 (uri (pypi-uri "pafy" version))
1592 (sha256
1593 (base32
1594 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1595 (build-system python-build-system)
1596 (arguments
1597 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1598 (propagated-inputs
1599 ;; Youtube-dl is a python package which is imported in the file
1600 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1601 `(("youtube-dl" ,youtube-dl)))
1602 (home-page "https://np1.github.io/pafy/")
1603 (synopsis "Retrieve YouTube content and metadata")
1604 (description
1605 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1606 (license license:lgpl3+)))
1607
1608 (define-public python2-funcsigs
1609 (package
1610 (name "python2-funcsigs")
1611 (version "1.0.2")
1612 (source (origin
1613 (method url-fetch)
1614 (uri (pypi-uri "funcsigs" version))
1615 (sha256
1616 (base32
1617 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1618 (build-system python-build-system)
1619 (arguments
1620 `(#:python ,python-2))
1621 (native-inputs
1622 `(("python2-unittest2" ,python2-unittest2)))
1623 (home-page "http://funcsigs.readthedocs.org")
1624 (synopsis "Python function signatures from PEP362")
1625 (description
1626 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1627 (license license:asl2.0)))
1628
1629 (define-public python2-funcsigs-bootstrap
1630 (package
1631 (inherit python2-funcsigs)
1632 (name "python2-funcsigs-bootstrap")
1633 (native-inputs `())
1634 (arguments
1635 `(#:tests? #f
1636 ,@(package-arguments python2-funcsigs)))))
1637
1638 (define-public python-py
1639 (package
1640 (name "python-py")
1641 (version "1.5.4")
1642 (source
1643 (origin
1644 (method url-fetch)
1645 (uri (pypi-uri "py" version))
1646 (sha256
1647 (base32
1648 "1xxvwfn82457djf55f5n2c94699rfqnk43br8fif2r2q8gvrmm9z"))))
1649 (build-system python-build-system)
1650 (arguments
1651 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1652 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1653 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1654 ;; Is this module globally installed?"
1655 '(#:tests? #f))
1656 (native-inputs
1657 `(("python-setuptools-scm" ,python-setuptools-scm)))
1658 (home-page "https://github.com/pytest-dev/py")
1659 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1660 (description
1661 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1662 code introspection, and logging.")
1663 (license license:expat)))
1664
1665 (define-public python2-py
1666 (package-with-python2 python-py))
1667
1668 ;; Recent versions of python-fixtures and python-testrepository need
1669 ;; python-pbr for packaging, which itself needs these two packages for
1670 ;; testing.
1671 ;; To fix this circular dependency, we use a build of python-pbr, based on the
1672 ;; same source, just without any test dependencies and with tests disabled.
1673 ;; python-pbr-minmal is then used to package python-fixtures and
1674 ;; python-testrepository.
1675 ;; Strictly speaking we currently could remove the test-requirements from the
1676 ;; normal python-pbr package (and save this package) since test are disabled
1677 ;; there anyway. But this may change in future.
1678 (define-public python-pbr-minimal
1679 (package
1680 (name "python-pbr-minimal")
1681 (version "3.0.1")
1682 (source
1683 (origin
1684 (method url-fetch)
1685 (uri (pypi-uri "pbr" version))
1686 (sha256
1687 (base32
1688 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
1689 (build-system python-build-system)
1690 (arguments
1691 `(#:tests? #f))
1692 (home-page "http://docs.openstack.org/developer/pbr/")
1693 (synopsis "Minimal build of python-pbr used for bootstrapping")
1694 (description
1695 "Used only for bootstrapping python2-pbr, you should not need this.")
1696 (license license:asl2.0)))
1697
1698 (define-public python2-pbr-minimal
1699 (package-with-python2 python-pbr-minimal))
1700
1701 (define-public python-pbr
1702 (package
1703 (inherit python-pbr-minimal)
1704 (name "python-pbr")
1705 (arguments
1706 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1707 (propagated-inputs
1708 `(("git" ,git))) ;; pbr actually uses the "git" binary.
1709 (native-inputs
1710 `(("python-fixtures" ,python-fixtures-bootstrap)
1711 ;; discover, coverage, hacking, subunit
1712 ("python-mock" ,python-mock)
1713 ("python-six" ,python-six)
1714 ("python-sphinx" ,python-sphinx)
1715 ("python-testrepository" ,python-testrepository-bootstrap)
1716 ("python-testresources" ,python-testresources-bootstrap)
1717 ("python-testscenarios" ,python-testscenarios-bootstrap)
1718 ("python-testtools" ,python-testtools-bootstrap)
1719 ("python-virtualenv" ,python-virtualenv)))
1720 (synopsis "Enhance the default behavior of Python’s setuptools")
1721 (description
1722 "Python Build Reasonableness (PBR) is a library that injects some useful
1723 and sensible default behaviors into your setuptools run. It will set
1724 versions, process requirements files and generate AUTHORS and ChangeLog file
1725 from git information.
1726 ")))
1727
1728 (define-public python2-pbr
1729 (package-with-python2 python-pbr))
1730
1731 (define-public python-pyrsistent
1732 (package
1733 (name "python-pyrsistent")
1734 (version "0.14.11")
1735 (home-page "https://github.com/tobgu/pyrsistent")
1736 (source (origin
1737 (method url-fetch)
1738 (uri (pypi-uri "pyrsistent" version))
1739 (sha256
1740 (base32
1741 "1qkh74bm296mp5g3r11lgsksr6bh4w1bf8pji4nmxdlfj542ga1w"))))
1742 (build-system python-build-system)
1743 (native-inputs
1744 `(("python-hypothesis" ,python-hypothesis)
1745 ("python-pytest" ,python-pytest)
1746 ("python-pytest-runner" ,python-pytest-runner)))
1747 (propagated-inputs
1748 `(("python-six" ,python-six)))
1749 (synopsis "Persistent data structures for Python")
1750 (description
1751 "Pyrsistent is a number of persistent collections (by some referred to as
1752 functional data structures). Persistent in the sense that they are immutable.
1753
1754 All methods on a data structure that would normally mutate it instead return a
1755 new copy of the structure containing the requested updates. The original
1756 structure is left untouched.")
1757 (license license:expat)))
1758
1759 (define-public python2-pyrsistent
1760 (package-with-python2 python-pyrsistent))
1761
1762 (define-public python-exif-read
1763 (package
1764 (name "python-exif-read")
1765 (version "2.1.2")
1766 (source (origin
1767 (method url-fetch)
1768 (uri (pypi-uri "ExifRead" version))
1769 (sha256
1770 (base32
1771 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
1772 (build-system python-build-system)
1773 (arguments `(#:tests? #f)) ; no tests
1774 (home-page "https://github.com/ianare/exif-py")
1775 (synopsis "Python library to extract EXIF data from image files")
1776 (description
1777 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1778 files.")
1779 (license license:bsd-3)))
1780
1781 (define-public python2-exif-read
1782 (package-with-python2 python-exif-read))
1783
1784 (define-public python-pyld
1785 (package
1786 (name "python-pyld")
1787 (version "1.0.3")
1788 (source (origin
1789 (method url-fetch)
1790 (uri (pypi-uri "PyLD" version))
1791 (sha256
1792 (base32
1793 "12i2g6xdj30k7xxcibg3sc5y76snwq8l6n8fy9lyi577kgy0h2pm"))))
1794 (build-system python-build-system)
1795 (home-page "https://github.com/digitalbazaar/pyld")
1796 (synopsis "Python implementation of the JSON-LD specification")
1797 (description
1798 "PyLD is an implementation of the JSON-LD specification.")
1799 (license license:bsd-3)))
1800
1801 (define-public python2-pyld
1802 (package-with-python2 python-pyld))
1803
1804 (define-public python-click
1805 (package
1806 (name "python-click")
1807 (version "7.0")
1808 (source
1809 (origin
1810 (method url-fetch)
1811 (uri (pypi-uri "click" version))
1812 (sha256
1813 (base32
1814 "1mzjixd4vjbjvzb6vylki9w1556a9qmdh35kzmq6cign46av952v"))))
1815 (build-system python-build-system)
1816 (arguments
1817 `(#:phases
1818 (modify-phases %standard-phases
1819 (add-after 'unpack 'fix-paths
1820 (lambda* (#:key inputs #:allow-other-keys)
1821 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
1822 "cross-libc" "libc"))))
1823 (substitute* "click/_unicodefun.py"
1824 (("'locale'")
1825 (string-append "'" glibc "/bin/locale'"))))
1826 #t))
1827 (replace 'check
1828 (lambda _
1829 (invoke "python" "-m" "pytest"))))))
1830 (native-inputs
1831 `(("python-pytest" ,python-pytest)))
1832 (home-page "https://palletsprojects.com/p/click/")
1833 (synopsis "Command line library for Python")
1834 (description
1835 "Click is a Python package for creating command line interfaces in a
1836 composable way with as little code as necessary. Its name stands for
1837 \"Command Line Interface Creation Kit\". It's highly configurable but comes
1838 with sensible defaults out of the box.")
1839 (license license:bsd-3)))
1840
1841 (define-public python2-click
1842 (package-with-python2 python-click))
1843
1844 (define-public python-wheel
1845 (package
1846 (name "python-wheel")
1847 (version "0.32.3")
1848 (source
1849 (origin
1850 (method url-fetch)
1851 (uri (pypi-uri "wheel" version))
1852 (sha256
1853 (base32
1854 "1dhxl1bf18bx9szmqcnxbg6204hp3im8089q3hkwh5jfa6zh75q2"))))
1855 (build-system python-build-system)
1856 (native-inputs
1857 `(("python-jsonschema" ,python-jsonschema)
1858 ("python-pytest-cov" ,python-pytest-cov)))
1859 (home-page "https://bitbucket.org/pypa/wheel/")
1860 (synopsis "Format for built Python packages")
1861 (description
1862 "A wheel is a ZIP-format archive with a specially formatted filename and
1863 the @code{.whl} extension. It is designed to contain all the files for a PEP
1864 376 compatible install in a way that is very close to the on-disk format. Many
1865 packages will be properly installed with only the @code{Unpack} step and the
1866 unpacked archive preserves enough information to @code{Spread} (copy data and
1867 scripts to their final locations) at any later time. Wheel files can be
1868 installed with a newer @code{pip} or with wheel's own command line utility.")
1869 (license license:expat)
1870 (properties `((python2-variant . ,(delay python2-wheel))))))
1871
1872 (define-public python2-wheel
1873 (let ((wheel (package-with-python2
1874 (strip-python2-variant python-wheel))))
1875 (package (inherit wheel)
1876 (native-inputs `(("python2-functools32" ,python2-functools32)
1877 ,@(package-native-inputs wheel))))))
1878
1879 (define-public python-vcversioner
1880 (package
1881 (name "python-vcversioner")
1882 (version "2.16.0.0")
1883 (source
1884 (origin
1885 (method url-fetch)
1886 (uri (pypi-uri "vcversioner" version))
1887 (sha256
1888 (base32
1889 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
1890 (build-system python-build-system)
1891 (synopsis "Python library for version number discovery")
1892 (description "Vcversioner is a Python library that inspects tagging
1893 information in a variety of version control systems in order to discover
1894 version numbers.")
1895 (home-page "https://github.com/habnabit/vcversioner")
1896 (license license:isc)))
1897
1898 (define-public python2-vcversioner
1899 (package-with-python2 python-vcversioner))
1900
1901 (define-public python-jdcal
1902 (package
1903 (name "python-jdcal")
1904 (version "1.4")
1905 (source
1906 (origin
1907 (method url-fetch)
1908 (uri (pypi-uri "jdcal" version))
1909 (sha256
1910 (base32
1911 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
1912 (build-system python-build-system)
1913 (arguments
1914 `(#:phases (modify-phases %standard-phases
1915 (replace 'check
1916 (lambda _
1917 (invoke "pytest"))))))
1918 (native-inputs
1919 `(("python-pytest" ,python-pytest)))
1920 (home-page "https://github.com/phn/jdcal")
1921 (synopsis "Functions to convert between Julian dates Gregorian dates")
1922 (description "This Python library provides functions for converting
1923 between Julian dates and Gregorian dates.")
1924 (license license:bsd-2)))
1925
1926 (define-public python2-jdcal
1927 (package-with-python2 python-jdcal))
1928
1929 (define-public python-jsonschema
1930 (package
1931 (name "python-jsonschema")
1932 (version "3.0.1")
1933 (source (origin
1934 (method url-fetch)
1935 (uri (pypi-uri "jsonschema" version))
1936 (sha256
1937 (base32
1938 "03g20i1xfg4qdlk4475pl4pp7y0h37g1fbgs5qhy678q9xb822hc"))))
1939 (build-system python-build-system)
1940 (arguments
1941 '(#:phases
1942 (modify-phases %standard-phases
1943 (replace 'check
1944 (lambda _
1945 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
1946 (invoke "trial" "jsonschema"))))))
1947 (native-inputs
1948 `(("python-setuptools_scm" ,python-setuptools-scm)
1949 ("python-twisted" ,python-twisted)))
1950 (propagated-inputs
1951 `(("python-attrs" ,python-attrs)
1952 ("python-pyrsistent" ,python-pyrsistent)
1953 ("python-six" ,python-six)))
1954 (home-page "https://github.com/Julian/jsonschema")
1955 (synopsis "Implementation of JSON Schema for Python")
1956 (description
1957 "Jsonschema is an implementation of JSON Schema for Python.")
1958 (license license:expat)
1959 (properties `((python2-variant . ,(delay python2-jsonschema))))))
1960
1961 (define-public python2-jsonschema
1962 (let ((jsonschema (package-with-python2
1963 (strip-python2-variant python-jsonschema))))
1964 (package (inherit jsonschema)
1965 (propagated-inputs
1966 `(("python2-functools32" ,python2-functools32)
1967 ,@(package-propagated-inputs jsonschema))))))
1968
1969 ;; This old version is still required by docker-compose as of 1.24.0.
1970 (define-public python-jsonschema-2.6
1971 (package
1972 (name "python-jsonschema")
1973 (version "2.6.0")
1974 (source (origin
1975 (method url-fetch)
1976 (uri (pypi-uri "jsonschema" version))
1977 (sha256
1978 (base32
1979 "00kf3zmpp9ya4sydffpifn0j0mzm342a2vzh82p6r0vh10cg7xbg"))))
1980 (build-system python-build-system)
1981 (arguments
1982 '(#:phases
1983 (modify-phases %standard-phases
1984 (replace 'check (lambda _ (invoke "nosetests"))))))
1985 (native-inputs
1986 `(("python-nose" ,python-nose)
1987 ("python-vcversioner" ,python-vcversioner)))
1988 (home-page "https://github.com/Julian/jsonschema")
1989 (synopsis "Implementation of JSON Schema for Python")
1990 (description
1991 "Jsonschema is an implementation of JSON Schema for Python.")
1992 (license license:expat)
1993 (properties `((python2-variant . ,(delay python2-jsonschema))))))
1994
1995 (define-public python-schema
1996 (package
1997 (name "python-schema")
1998 (version "0.6.6")
1999 (source
2000 (origin
2001 (method url-fetch)
2002 (uri (pypi-uri "schema" version))
2003 (sha256
2004 (base32
2005 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2006 (build-system python-build-system)
2007 (native-inputs
2008 `(("python-pytest" ,python-pytest)))
2009 (home-page "https://github.com/keleshev/schema")
2010 (synopsis "Simple data validation library")
2011 (description
2012 "@code{python-schema} is a library for validating Python data
2013 structures, such as those obtained from config-files, forms, external
2014 services or command-line parsing, converted from JSON/YAML (or
2015 something else) to Python data-types.")
2016 (license license:psfl)))
2017
2018 (define-public python2-schema
2019 (package-with-python2 python-schema))
2020
2021 (define-public python-schema-0.5
2022 (package (inherit python-schema)
2023 (version "0.5.0")
2024 (source
2025 (origin
2026 (method url-fetch)
2027 (uri (pypi-uri "schema" version))
2028 (sha256
2029 (base32
2030 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2031
2032 (define-public python2-schema-0.5
2033 (package-with-python2 python-schema-0.5))
2034
2035 (define-public python-kitchen
2036 (package
2037 (name "python-kitchen")
2038 (version "1.2.5")
2039 (source
2040 (origin
2041 (method url-fetch)
2042 (uri (pypi-uri "kitchen" version))
2043 (sha256
2044 (base32
2045 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2046 (build-system python-build-system)
2047 (propagated-inputs
2048 `(("python-chardet" ,python-chardet)))
2049 (home-page "https://github.com/fedora-infra/kitchen")
2050 (synopsis "Python API for snippets")
2051 (description "@code{kitchen} module provides a python API for all sorts of
2052 little useful snippets of code that everybody ends up writing for their projects
2053 but never seem big enough to build an independent release. Use kitchen and stop
2054 cutting and pasting that code over and over.")
2055 (license (list license:lgpl2.1+
2056 ;; subprocess.py, test_subprocess.py,
2057 ;; kitchen/pycompat25/defaultdict.py:
2058 license:psfl))))
2059
2060 (define-public python2-kitchen
2061 (package-with-python2 python-kitchen))
2062
2063 (define-public python-unidecode
2064 (package
2065 (name "python-unidecode")
2066 (version "1.0.23")
2067 (source (origin
2068 (method url-fetch)
2069 (uri (pypi-uri "Unidecode" version))
2070 (sha256
2071 (base32
2072 "1ysjbr3nqfqj97h8zyj3v9pya413vkv7a1mzml80w37xx15kb1cb"))))
2073 (build-system python-build-system)
2074 (home-page "https://pypi.python.org/pypi/Unidecode")
2075 (synopsis "ASCII transliterations of Unicode text")
2076 (description
2077 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2078 useful when integrating with legacy code that doesn't support Unicode, or for
2079 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2080 machine identifiers from human-readable Unicode strings that should still be
2081 somewhat intelligible.")
2082 (license license:gpl2+)))
2083
2084 (define-public python2-unidecode
2085 (package-with-python2 python-unidecode))
2086
2087 (define-public python-pyjwt
2088 (package
2089 (name "python-pyjwt")
2090 (version "1.5.3")
2091 (source
2092 (origin
2093 (method url-fetch)
2094 (uri (pypi-uri "PyJWT" version))
2095 (sha256
2096 (base32
2097 "1rxsg14i33vm2i6lz0my628108c81k43v10n4h3p0gx62xdyf2sh"))
2098 (modules '((guix build utils)))
2099 (snippet
2100 '(begin
2101 (for-each delete-file-recursively
2102 (find-files "." "\\.pyc$"))
2103 #t))))
2104 (build-system python-build-system)
2105 (native-inputs
2106 `(("python-pytest" ,python-pytest)
2107 ("python-pytest-cov" ,python-pytest-cov)
2108 ("python-pytest-runner" ,python-pytest-runner)))
2109 (home-page "https://github.com/progrium/pyjwt")
2110 (synopsis "JSON Web Token implementation in Python")
2111 (description
2112 "PyJWT is a JSON Web Token implementation written in Python.")
2113 (license license:expat)))
2114
2115 (define-public python2-pyjwt
2116 (package-with-python2 python-pyjwt))
2117
2118 (define-public python-pykka
2119 (package
2120 (name "python-pykka")
2121 (version "1.2.1")
2122 (source
2123 (origin
2124 (method url-fetch)
2125 (uri (pypi-uri "Pykka" version))
2126 (sha256
2127 (base32
2128 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2129 (build-system python-build-system)
2130 (native-inputs
2131 `(("python-mock" ,python-mock)
2132 ("python-nose" ,python-nose)
2133 ("python-gevent" ,python-gevent)
2134 ("python-eventlet" ,python-eventlet)))
2135 (home-page "https://www.pykka.org/")
2136 (synopsis "Pykka is a Python implementation of the actor model")
2137 (description
2138 "Pykka is a Python implementation of the actor model.
2139 The actor model introduces some simple rules to control the sharing
2140 of state and cooperation between execution units, which makes it
2141 easier to build concurrent applications.")
2142 (license license:asl2.0)))
2143
2144 (define-public python2-pykka
2145 (package-with-python2 python-pykka))
2146
2147 (define-public python-pymsgbox
2148 (package
2149 (name "python-pymsgbox")
2150 (version "1.0.6")
2151 (source
2152 (origin
2153 (method git-fetch)
2154 (uri (git-reference
2155 ;; LICENSE.txt is not present on pypi
2156 (url "https://github.com/asweigart/PyMsgBox")
2157 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
2158 (file-name (git-file-name name version))
2159 (sha256
2160 (base32
2161 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
2162 (arguments
2163 ;; Circular dependency to run tests:
2164 ;; Tests need pyautogui, which depends on pymsgbox.
2165 '(#:tests? #f))
2166 (build-system python-build-system)
2167 (home-page "https://github.com/asweigart/PyMsgBox")
2168 (synopsis "Python module for JavaScript-like message boxes")
2169 (description
2170 "PyMsgBox is a simple, cross-platform, pure Python module for
2171 JavaScript-like message boxes. Types of dialog boxes include:
2172 @enumerate
2173 @item alert
2174 @item confirm
2175 @item prompt
2176 @item password
2177 @end enumerate
2178 ")
2179 (license license:bsd-3)))
2180
2181 (define-public python-pympler
2182 (package
2183 (name "python-pympler")
2184 (home-page "https://pythonhosted.org/Pympler/")
2185 (version "0.5")
2186 (source (origin
2187 (method url-fetch)
2188 (uri (pypi-uri "Pympler" version))
2189 (sha256
2190 (base32
2191 "03qwsbilqgvnbl3a1jmpgixbr2kq6m3fvdlzyr3wdp01bwlc85kx"))))
2192 (build-system python-build-system)
2193 (arguments
2194 `(#:phases (modify-phases %standard-phases
2195 (delete 'check)
2196 (add-after 'install 'check
2197 (lambda* (#:key inputs outputs #:allow-other-keys)
2198 (add-installed-pythonpath inputs outputs)
2199 (invoke "python" "setup.py" "test"))))))
2200 (synopsis "Measure, monitor and analyze memory behavior")
2201 (description
2202 "Pympler is a development tool to measure, monitor and analyze
2203 the memory behavior of Python objects in a running Python application.
2204
2205 By pympling a Python application, detailed insight in the size and the
2206 lifetime of Python objects can be obtained. Undesirable or unexpected
2207 runtime behavior like memory bloat and other @samp{pymples} can easily
2208 be identified.
2209
2210 A web profiling frontend exposes process statistics, garbage
2211 visualisation and class tracker statistics.")
2212 (license license:asl2.0)))
2213
2214 (define-public python2-pympler
2215 (package-with-python2 python-pympler))
2216
2217 (define-public python-itsdangerous
2218 (package
2219 (name "python-itsdangerous")
2220 (version "1.1.0")
2221 (source
2222 (origin
2223 (method url-fetch)
2224 (uri (pypi-uri "itsdangerous" version))
2225 (sha256
2226 (base32
2227 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
2228 (build-system python-build-system)
2229 (home-page "https://palletsprojects.com/p/itsdangerous/")
2230 (synopsis "Python library for passing data to/from untrusted environments")
2231 (description
2232 "Itsdangerous provides various helpers to pass trusted data to untrusted
2233 environments and back.")
2234 (license license:bsd-3)))
2235
2236 (define-public python2-itsdangerous
2237 (package-with-python2 python-itsdangerous))
2238
2239 (define-public python-pyyaml
2240 (package
2241 (name "python-pyyaml")
2242 (version "3.13")
2243 (source
2244 (origin
2245 (method url-fetch)
2246 (uri (pypi-uri "PyYAML" version))
2247 (sha256
2248 (base32
2249 "1gx603g484z46cb74j9rzr6sjlh2vndxayicvlyhxdz98lhhkwry"))))
2250 (build-system python-build-system)
2251 (inputs
2252 `(("libyaml" ,libyaml)))
2253 (home-page "http://pyyaml.org/wiki/PyYAML")
2254 (synopsis "YAML parser and emitter for Python")
2255 (description
2256 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2257 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2258 API, and sensible error messages. PyYAML supports standard YAML tags and
2259 provides Python-specific tags that allow to represent an arbitrary Python
2260 object.")
2261 (license license:expat)))
2262
2263 (define-public python2-pyyaml
2264 (package-with-python2 python-pyyaml))
2265
2266 (define-public python-vine
2267 (package
2268 (name "python-vine")
2269 (version "1.1.4")
2270 (source
2271 (origin
2272 (method url-fetch)
2273 (uri (pypi-uri "vine" version))
2274 (sha256
2275 (base32
2276 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
2277 (build-system python-build-system)
2278 (native-inputs
2279 `(("python-pytest" ,python-pytest)
2280 ("python-case" ,python-case)))
2281 (home-page "https://github.com/celery/vine")
2282 (synopsis "Promises for Python")
2283 (description
2284 "@code{vine} provides a special implementation of promises in that it can
2285 be used both for \"promise of a value\" and lazy evaluation. The biggest
2286 upside for this is that everything in a promise can also be a promise,
2287 e.g. filters, callbacks and errbacks can all be promises.")
2288 (license license:bsd-3)))
2289
2290 (define-public python-virtualenv
2291 (package
2292 (name "python-virtualenv")
2293 (version "16.1.0")
2294 (source
2295 (origin
2296 (method url-fetch)
2297 (uri (pypi-uri "virtualenv" version))
2298 (sha256
2299 (base32
2300 "0242cg3hdq3qdvx5flyrki8lpwlgwf5k45c21ks5049fv7ygm6gq"))))
2301 (build-system python-build-system)
2302 (arguments
2303 `(#:phases
2304 (modify-phases %standard-phases
2305 (add-before 'check 'disable-failing-test
2306 (lambda _
2307 ;; Disable failing test. See upstream bug report
2308 ;; https://github.com/pypa/virtualenv/issues/957
2309 (substitute* "tests/test_virtualenv.py"
2310 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2311 #t)))))
2312 (native-inputs
2313 `(("python-mock" ,python-mock)
2314 ("python-pytest" ,python-pytest)))
2315 (home-page "https://virtualenv.pypa.io/")
2316 (synopsis "Virtual Python environment builder")
2317 (description
2318 "Virtualenv is a tool to create isolated Python environments.")
2319 (license license:expat)))
2320
2321 (define-public python2-virtualenv
2322 (package-with-python2 python-virtualenv))
2323
2324 (define-public python-markupsafe
2325 (package
2326 (name "python-markupsafe")
2327 (version "1.0")
2328 (source
2329 (origin
2330 (method url-fetch)
2331 (uri (pypi-uri "MarkupSafe" version))
2332 (sha256
2333 (base32
2334 "0rdn1s8x9ni7ss8rfiacj7x1085lx8mh2zdwqslnw8xc3l4nkgm6"))))
2335 (build-system python-build-system)
2336 (home-page "https://github.com/mitsuhiko/markupsafe")
2337 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2338 (description
2339 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2340 for Python.")
2341 (license license:bsd-3)))
2342
2343 (define-public python2-markupsafe
2344 (package-with-python2 python-markupsafe))
2345
2346 (define-public python-jinja2
2347 (package
2348 (name "python-jinja2")
2349 (version "2.10.1")
2350 (source
2351 (origin
2352 (method url-fetch)
2353 (uri (pypi-uri "Jinja2" version))
2354 (sha256
2355 (base32
2356 "04shqrs56aj04ipyqykj512rw2l0zfammvj9krawzxz7xc14yp06"))))
2357 (build-system python-build-system)
2358 (propagated-inputs
2359 `(("python-markupsafe" ,python-markupsafe)))
2360 (home-page "http://jinja.pocoo.org/")
2361 (synopsis "Python template engine")
2362 (description
2363 "Jinja2 is a small but fast and easy to use stand-alone template engine
2364 written in pure Python.")
2365 (license license:bsd-3)))
2366
2367 (define-public python2-jinja2
2368 (package-with-python2 python-jinja2))
2369
2370 (define-public python-pystache
2371 (package
2372 (name "python-pystache")
2373 (version "0.5.4")
2374 (source (origin
2375 (method url-fetch)
2376 (uri (pypi-uri "pystache" version))
2377 (sha256
2378 (base32
2379 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2380 (build-system python-build-system)
2381 (arguments
2382 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2383 (home-page "http://defunkt.io/pystache/")
2384 (synopsis "Python logic-less template engine")
2385 (description
2386 "Pystache is a Python implementation of the framework agnostic,
2387 logic-free templating system Mustache.")
2388 (license license:expat)
2389 (properties `((python2-variant . ,(delay python2-pystache))))))
2390
2391 (define-public python2-pystache
2392 (package (inherit (package-with-python2
2393 (strip-python2-variant python-pystache)))
2394 (arguments
2395 `(#:python ,python-2
2396 #:phases
2397 (modify-phases %standard-phases
2398 (replace 'check
2399 (lambda _
2400 (invoke "python" "test_pystache.py"))))))))
2401
2402 (define-public python-joblib
2403 (package
2404 (name "python-joblib")
2405 (version "0.13.0")
2406 (source (origin
2407 (method url-fetch)
2408 (uri (pypi-uri "joblib" version))
2409 (sha256
2410 (base32
2411 "0612nazad8dxmn3xghfrmjax6456l4xy6hn9cngs7vydi14ds7v5"))))
2412 (build-system python-build-system)
2413 (arguments
2414 `(#:phases
2415 (modify-phases %standard-phases
2416 (replace 'check
2417 (lambda _ (invoke "pytest" "-v" "joblib"))))))
2418 (native-inputs
2419 `(("python-pytest" ,python-pytest)))
2420 (home-page "https://joblib.readthedocs.io/")
2421 (synopsis "Using Python functions as pipeline jobs")
2422 (description
2423 "Joblib is a set of tools to provide lightweight pipelining in Python.
2424 In particular, joblib offers: transparent disk-caching of the output values
2425 and lazy re-evaluation (memoize pattern), easy simple parallel computing
2426 logging and tracing of the execution.")
2427 (license license:bsd-3)))
2428
2429 (define-public python2-joblib
2430 (package-with-python2 python-joblib))
2431
2432 (define-public python-daemon
2433 (package
2434 (name "python-daemon")
2435 (version "2.2.3")
2436 (source
2437 (origin
2438 (method url-fetch)
2439 (uri (pypi-uri "python-daemon" version))
2440 (sha256
2441 (base32
2442 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
2443 (build-system python-build-system)
2444 (arguments
2445 `(#:phases
2446 (modify-phases %standard-phases
2447 (add-before 'check 'disable-tests
2448 (lambda _
2449 ;; FIXME: Determine why test fails
2450 (substitute* "test/test_daemon.py"
2451 (("test_detaches_process_context")
2452 "skip_test_detaches_process_context"))
2453 #t)))))
2454 (propagated-inputs
2455 `(("python-lockfile" ,python-lockfile)))
2456 (native-inputs
2457 `(("python-unittest2" ,python-unittest2)
2458 ("python-testtools" ,python-testtools)
2459 ("python-testscenarios" ,python-testscenarios)
2460 ("python-mock" ,python-mock)
2461 ("python-docutils" ,python-docutils)))
2462 (home-page "https://pagure.io/python-daemon/")
2463 (synopsis "Python library for making a Unix daemon process")
2464 (description "Python-daemon is a library that assists a Python program to
2465 turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
2466
2467 This library provides a @code{DaemonContext} class that manages the following
2468 important tasks for becoming a daemon process:
2469 @enumerate
2470 @item Detach the process into its own process group.
2471 @item Set process environment appropriate for running inside a chroot.
2472 @item Renounce suid and sgid privileges.
2473 @item Close all open file descriptors.
2474 @item Change the working directory, uid, gid, and umask.
2475 @item Set appropriate signal handlers.
2476 @item Open new file descriptors for stdin, stdout, and stderr.
2477 @item Manage a specified PID lock file.
2478 @item Register cleanup functions for at-exit processing.
2479 @end enumerate")
2480 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
2481 (license (list license:asl2.0 license:gpl3+))))
2482
2483 (define-public python-docutils
2484 (package
2485 (name "python-docutils")
2486 (version "0.14")
2487 (source
2488 (origin
2489 (method url-fetch)
2490 (uri (pypi-uri "docutils" version))
2491 (sha256
2492 (base32
2493 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
2494 (build-system python-build-system)
2495 (arguments
2496 '(#:tests? #f)) ; no setup.py test command
2497 (home-page "http://docutils.sourceforge.net/")
2498 (synopsis "Python Documentation Utilities")
2499 (description
2500 "Docutils is a modular system for processing documentation into useful
2501 formats, such as HTML, XML, and LaTeX. For input Docutils supports
2502 reStructuredText.")
2503 ;; Most of the source code is public domain, but some source files are
2504 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2505 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2506
2507 (define-public python2-docutils
2508 (package-with-python2 python-docutils))
2509
2510 (define-public python-pygments
2511 (package
2512 (name "python-pygments")
2513 (version "2.4.0")
2514 (source
2515 (origin
2516 (method url-fetch)
2517 (uri (pypi-uri "Pygments" version))
2518 (sha256
2519 (base32
2520 "1xb5n3hvhk63kxypc03k7kfry20pny6gygi4bsl9kw1rnzzsdjri"))))
2521 (build-system python-build-system)
2522 (arguments
2523 ;; FIXME: Tests require sphinx, which depends on this.
2524 '(#:tests? #f))
2525 (home-page "http://pygments.org/")
2526 (synopsis "Syntax highlighting")
2527 (description
2528 "Pygments is a syntax highlighting package written in Python.")
2529 (license license:bsd-2)))
2530
2531 (define-public python2-pygments
2532 (package-with-python2 python-pygments))
2533
2534 (define-public python-bumpversion
2535 (package
2536 (name "python-bumpversion")
2537 (version "0.5.3")
2538 (source
2539 (origin
2540 (method url-fetch)
2541 (uri (pypi-uri "bumpversion" version))
2542 (sha256
2543 (base32
2544 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
2545 (build-system python-build-system)
2546 (home-page "https://github.com/peritus/bumpversion")
2547 (synopsis "Tool to bump software version")
2548 (description "This tool provides a command-line interface (CLI) to bump a
2549 software version simply.")
2550 (license license:expat)))
2551
2552 (define-public python-deprecated
2553 (package
2554 (name "python-deprecated")
2555 (version "1.2.5")
2556 (source
2557 (origin
2558 (method git-fetch)
2559 (uri (git-reference
2560 (url "https://github.com/tantale/deprecated.git")
2561 (commit (string-append "v" version))))
2562 (file-name (git-file-name name version))
2563 (sha256
2564 (base32
2565 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
2566 (build-system python-build-system)
2567 (arguments
2568 `(#:phases (modify-phases %standard-phases
2569 (replace 'check
2570 (lambda _
2571 (invoke "pytest"))))))
2572 (propagated-inputs
2573 `(("python-wrapt" ,python-wrapt)))
2574 (native-inputs
2575 `(("python-bumpversion" ,python-bumpversion)
2576 ("python-pytest" ,python-pytest)
2577 ("python-pytest-cov" ,python-pytest-cov)
2578 ("python-sphinx" ,python-sphinx)
2579 ("python-tox" ,python-tox)))
2580 (home-page "https://github.com/tantale/deprecated")
2581 (synopsis "Python decorator to deprecate classes, functions or methods")
2582 (description "The @code{deprecated} decorator provides a convenient way to deprecate
2583 to deprecate classes, functions or methods.")
2584 (license license:expat)))
2585
2586 (define-public python-pygithub
2587 (package
2588 (name "python-pygithub")
2589 (version "1.43.7")
2590 (source
2591 ;; We fetch from the Git repo because there are no tests in the PyPI
2592 ;; archive.
2593 (origin
2594 (method git-fetch)
2595 (uri (git-reference
2596 (url "https://github.com/PyGithub/PyGithub.git")
2597 (commit (string-append "v" version))))
2598 (file-name (git-file-name name version))
2599 (sha256
2600 (base32
2601 "0ww92zz0ja9w6rw83vphmn8rwmcn6abg16j4q7zxjc0rrg2cfj9i"))))
2602 (build-system python-build-system)
2603 (arguments
2604 `(#:phases (modify-phases %standard-phases
2605 ;; Some tests rely on the network.
2606 (add-after 'unpack 'disable-failing-tests
2607 (lambda _
2608 (substitute* "tests/Issue142.py"
2609 (("testDecodeJson") "disabled_testDecodeJson"))
2610 #t))
2611 (add-before 'check 'prepare-for-tests
2612 (lambda _
2613 (for-each (lambda (f)
2614 (chmod f #o666))
2615 (find-files "./tests"))
2616 (system* "python" "-m" "lib2to3" "-w" "-n" "tests")
2617 (setenv "PYTHONPATH"
2618 (string-append "./tests:" (getenv "PYTHONPATH")))
2619 #t)))))
2620 (propagated-inputs
2621 `(("python-deprecated" ,python-deprecated)
2622 ("python-pyjwt" ,python-pyjwt)
2623 ("python-requests" ,python-requests)))
2624 (native-inputs `(("python-httpretty" ,python-httpretty)))
2625 (home-page "https://pygithub.readthedocs.io/en/latest/")
2626 (synopsis "Python library for the GitHub API")
2627 (description "This library allows managing GitHub resources such as
2628 repositories, user profiles, and organizations in your Python applications,
2629 using version 3 of the GitHub application programming interface (API).")
2630 (license license:lgpl3+)))
2631
2632 (define-public python-rellu
2633 (package
2634 (name "python-rellu")
2635 (version "0.7")
2636 (source
2637 (origin
2638 (method url-fetch)
2639 (uri (pypi-uri "rellu" version))
2640 (sha256
2641 (base32
2642 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
2643 (build-system python-build-system)
2644 (propagated-inputs
2645 `(("python-invoke" ,python-invoke)
2646 ("python-pygithub" ,python-pygithub)))
2647 (home-page "https://github.com/robotframework/rellu")
2648 (synopsis "Utilities to create PyPI releases")
2649 (description "This collection of utilities contains tooling and templates
2650 to assist in creating releases on GitHub and publishing them on PyPI. It is
2651 designed to be used by Robot Framework and tools and libraries in its
2652 ecosystem, but can naturally be used also by other projects.")
2653 (license license:asl2.0)))
2654
2655 (define-public python-robotframework
2656 (package
2657 (name "python-robotframework")
2658 (version "3.1.1")
2659 ;; There are no tests in the PyPI archive.
2660 (source
2661 (origin
2662 (method git-fetch)
2663 (uri (git-reference
2664 (url "https://github.com/robotframework/robotframework.git")
2665 (commit (string-append "v" version))))
2666 (file-name (git-file-name name version))
2667 (sha256
2668 (base32
2669 "1aaiamc9l35m5sf7xl2qc5q9308v7sz3p1qgzcslsjxzddphyn4v"))
2670 (patches (search-patches
2671 "python-robotframework-honor-source-date-epoch.patch"))))
2672 (build-system python-build-system)
2673 (arguments
2674 `(#:phases (modify-phases %standard-phases
2675 (add-before 'build 'build-and-install-doc
2676 (lambda* (#:key outputs #:allow-other-keys)
2677 (let* ((doc-output (assoc-ref outputs "doc"))
2678 (doc (string-append doc-output "/share/"
2679 ,name "-" ,version "/")))
2680 (invoke "invoke" "library-docs" "all")
2681 (mkdir-p doc)
2682 (copy-recursively "doc/libraries"
2683 (string-append doc "/libraries"))
2684 #t)))
2685 (replace 'check
2686 (lambda _
2687 (invoke "python" "utest/run.py"))))))
2688 (native-inputs
2689 `(("python-invoke" ,python-invoke)
2690 ("python-rellu" ,python-rellu)
2691 ("python:tk" ,python "tk"))) ;used when building the HTML doc
2692 (outputs '("out" "doc"))
2693 (home-page "https://robotframework.org")
2694 (synopsis "Generic automation framework")
2695 (description "Robot Framework is a generic automation framework for
2696 acceptance testing, acceptance test driven development (ATDD), and robotic
2697 process automation (RPA).")
2698 (license license:asl2.0)))
2699
2700 (define-public python-robotframework-lint
2701 ;; There is no properly tagged release; the commit below seems to correspond
2702 ;; to the 0.9 stable release available from PyPI. The tests are not
2703 ;; included in the PyPI archive, so we fetch the sources from the upstream
2704 ;; Git repo.
2705 (let ((commit "e851879bab1f63e4e53b34a4dc8a67ed95102830")
2706 (revision "1"))
2707 (package
2708 (name "python-robotframework-lint")
2709 (version (git-version "0.9.0" revision commit))
2710 (source
2711 (origin
2712 (method git-fetch)
2713 (uri (git-reference
2714 (url "https://github.com/boakley/robotframework-lint.git")
2715 (commit commit)))
2716 (file-name (git-file-name name version))
2717 (sha256
2718 (base32
2719 "1p6fknqg5sb9qz5857ji4a877657vgfjm5v3zn45994parx6ml1m"))))
2720 (build-system python-build-system)
2721 (arguments
2722 `(#:phases
2723 (modify-phases %standard-phases
2724 (replace 'check
2725 (lambda _
2726 (invoke "python" "-m" "robot" "-A"
2727 "tests/conf/default.args" "tests"))))))
2728 (propagated-inputs
2729 `(("python-robotframework" ,python-robotframework)))
2730 (home-page "https://github.com/boakley/robotframework-lint/")
2731 (synopsis "Static analysis tool (linter) for Robot Framework")
2732 (description "This package provides the @code{rflint} command-line
2733 utility, a static analysis tool (linter) for Robot Framework source files.")
2734 (license license:asl2.0))))
2735
2736 (define-public python-robotframework-sshlibrary
2737 (package
2738 (name "python-robotframework-sshlibrary")
2739 (version "3.3.0")
2740 ;; There are no tests in the PyPI archive.
2741 (source
2742 (origin
2743 (method git-fetch)
2744 (uri (git-reference
2745 (url "https://github.com/robotframework/SSHLibrary.git")
2746 (commit (string-append "v" version))))
2747 (file-name (git-file-name name version))
2748 (sha256
2749 (base32
2750 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
2751 (build-system python-build-system)
2752 (arguments
2753 `(#:phases
2754 (modify-phases %standard-phases
2755 (add-before 'build 'build-and-install-doc
2756 (lambda* (#:key outputs #:allow-other-keys)
2757 (let* ((doc-output (assoc-ref outputs "doc"))
2758 (doc (string-append doc-output "/share/"
2759 ,name "-" ,version "/")))
2760 (invoke "chmod" "-R" "+w" "docs")
2761 (invoke "invoke" "kw-docs" "project-docs")
2762 (mkdir-p doc)
2763 (for-each delete-file (find-files "docs" "\\.rst"))
2764 (copy-recursively "docs" doc)
2765 #t)))
2766 (replace 'check
2767 (lambda _
2768 ;; Some tests require an SSH server; we remove them.
2769 (delete-file "utest/test_client_api.py")
2770 (delete-file "utest/test_scp.py")
2771 (invoke "python" "utest/run.py"))))))
2772 (propagated-inputs
2773 `(("python-robotframework" ,python-robotframework)
2774 ("python-paramiko" ,python-paramiko)
2775 ("python-scp" ,python-scp)))
2776 (native-inputs
2777 `(("openssh" ,openssh)
2778 ("which" ,which)
2779 ;; To generate the documentation
2780 ("python-docutils" ,python-docutils)
2781 ("python-invoke" ,python-invoke)
2782 ("python-pygments" ,python-pygments)
2783 ("python-rellu" ,python-rellu)))
2784 (outputs '("out" "doc"))
2785 (home-page "https://github.com/robotframework/SSHLibrary")
2786 (synopsis "Robot Framework library for SSH and SFTP")
2787 (description "SSHLibrary is a Robot Framework library providing support
2788 for SSH and SFTP. It has the following main usages:
2789 @itemize @bullet
2790 @item Executing commands on the remote machine, either blocking or non-blocking.
2791 @item Writing and reading in an interactive shell.
2792 @item Transferring files and directories over SFTP.
2793 @item Ensuring that files and directories exist on the remote machine.
2794 @end itemize")
2795 (license license:asl2.0)))
2796
2797 (define-public python-scp
2798 (package
2799 (name "python-scp")
2800 (version "0.13.2")
2801 (source
2802 (origin
2803 (method url-fetch)
2804 (uri (pypi-uri "scp" version))
2805 (sha256
2806 (base32
2807 "1crlpw9lnn58fs1c1rmh7s7s9y5gkgpgjsqlvg9qa51kq1knx7gg"))))
2808 (build-system python-build-system)
2809 (arguments
2810 '(#:tests? #f)) ;tests require an SSH server
2811 (propagated-inputs
2812 `(("python-paramiko" ,python-paramiko)))
2813 (home-page "https://github.com/jbardin/scp.py")
2814 (synopsis "SCP protocol module for Python and Paramiko")
2815 (description "The scp module extends the Paramiko library to send and
2816 receive files via the SCP1 protocol, as implemented by the OpenSSH
2817 @command{scp} program.")
2818 (license license:gpl2+)))
2819
2820 (define-public python-rst.linker
2821 (package
2822 (name "python-rst.linker")
2823 (version "1.10")
2824 (source
2825 (origin
2826 (method url-fetch)
2827 (uri (pypi-uri "rst.linker" version))
2828 (sha256
2829 (base32
2830 "0iqaacp7pj1s8avs4kc0qg0r7dscywaq37y6l9j14glqdikk0wdj"))))
2831 (build-system python-build-system)
2832 (propagated-inputs
2833 `(("python-dateutil" ,python-dateutil)
2834 ("python-six" ,python-six)))
2835 (native-inputs
2836 `(("python-setuptools-scm" ,python-setuptools-scm)))
2837 ;; Test would require path.py, which would introduce a cyclic dependence.
2838 (arguments `(#:tests? #f))
2839 ;; Note: As of version 1.7 the documentation is not worth building.
2840 (home-page "https://github.com/jaraco/rst.linker")
2841 (synopsis "Sphinx plugin to add links and timestamps")
2842 (description "rst.linker allows to automatically replace text by a
2843 reStructuredText external reference or timestamps. It's primary purpose is to
2844 augment the changelog, but it can be used for other documents, too.")
2845 (license license:expat)))
2846
2847 (define-public python2-rst.linker
2848 (package-with-python2 python-rst.linker))
2849
2850 (define-public python-feedgenerator
2851 (package
2852 (name "python-feedgenerator")
2853 (version "1.9")
2854 (source
2855 (origin
2856 (method url-fetch)
2857 (uri (pypi-uri "feedgenerator" version))
2858 (sha256
2859 (base32
2860 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
2861 (modules '((guix build utils)))
2862 (snippet
2863 '(begin
2864 ;; Remove pre-compiled .pyc files from source.
2865 (for-each delete-file-recursively
2866 (find-files "." "__pycache__" #:directories? #t))
2867 (for-each delete-file (find-files "." "\\.pyc$"))
2868 #t))))
2869 (build-system python-build-system)
2870 (propagated-inputs
2871 `(("python-pytz" ,python-pytz)
2872 ("python-six" ,python-six)))
2873 (home-page "https://github.com/getpelican/feedgenerator")
2874 (synopsis
2875 "Standalone version of Django's Atom/RSS feed generator")
2876 (description
2877 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2878 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
2879 (license license:bsd-3)))
2880
2881 (define-public python2-feedgenerator
2882 (package-with-python2 python-feedgenerator))
2883
2884 (define-public python-toml
2885 (package
2886 (name "python-toml")
2887 (version "0.9.4")
2888 (source
2889 (origin
2890 (method url-fetch)
2891 (uri (pypi-uri "toml" version))
2892 (sha256
2893 (base32
2894 "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf"))))
2895 (build-system python-build-system)
2896 (arguments
2897 `(#:tests? #f)) ;no tests suite in release
2898 (home-page "https://github.com/uiri/toml")
2899 (synopsis "Library for TOML")
2900 (description
2901 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
2902 Language (TOML) configuration files.")
2903 (license license:expat)))
2904
2905 (define-public python-jsonrpc-server
2906 (package
2907 (name "python-jsonrpc-server")
2908 (version "0.1.2")
2909 (source
2910 (origin
2911 (method url-fetch)
2912 (uri (pypi-uri "python-jsonrpc-server" version))
2913 (sha256
2914 (base32
2915 "0m4ykpcdy52x37n1ikysp07j7p8ialcdvvvsrjp3545sn7iiid09"))))
2916 (build-system python-build-system)
2917 (propagated-inputs
2918 `(("python-future" ,python-future)
2919 ("python-mock" ,python-mock)
2920 ("python-pytest" ,python-pytest)))
2921 (home-page
2922 "https://github.com/palantir/python-jsonrpc-server")
2923 (synopsis "JSON RPC 2.0 server library")
2924 (description
2925 "This package provides a JSON RPC 2.0 server library for Python.")
2926 (license license:expat)))
2927
2928 (define-public python-pydocstyle
2929 (package
2930 (name "python-pydocstyle")
2931 (version "3.0.0")
2932 (source
2933 (origin
2934 (method url-fetch)
2935 (uri (pypi-uri "pydocstyle" version))
2936 (sha256
2937 (base32
2938 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
2939 (build-system python-build-system)
2940 (propagated-inputs
2941 `(("python-six" ,python-six)
2942 ("python-snowballstemmer" ,python-snowballstemmer)))
2943 (home-page
2944 "https://github.com/PyCQA/pydocstyle/")
2945 (synopsis "Python docstring style checker")
2946 (description
2947 "This package provides a style checker for the Python Language
2948 Server (PLS).")
2949 (license license:expat)))
2950
2951 (define-public python-language-server
2952 (package
2953 (name "python-language-server")
2954 (version "0.26.1")
2955 (source
2956 (origin
2957 (method url-fetch)
2958 (uri (pypi-uri "python-language-server" version))
2959 (sha256
2960 (base32
2961 "1vs9ckfmm534n1hq3m871916wsjvi5h4gyj6wlzg13ck6506lx0s"))))
2962 (build-system python-build-system)
2963 (propagated-inputs
2964 `(("python-pluggy" ,python-pluggy)
2965 ("python-jsonrpc-server" ,python-jsonrpc-server)
2966 ("python-jedi" ,python-jedi)
2967 ("python-yapf" ,python-yapf)
2968 ("python-pyflakes" ,python-pyflakes)
2969 ("python-pydocstyle" ,python-pydocstyle)
2970 ("python-pycodestyle" ,python-pycodestyle)
2971 ("python-mccabe" ,python-mccabe)
2972 ("python-rope" ,python-rope)
2973 ("python-autopep8" ,python-autopep8)
2974 ("python-pylint" ,python-pylint)))
2975 (home-page "https://github.com/palantir/python-language-server")
2976 (synopsis "Python implementation of the Language Server Protocol")
2977 (description
2978 "The Python Language Server (pyls) is an implementation of the Python 3
2979 language specification for the Language Server Protocol (LSP). This tool is
2980 used in text editing environments to provide a complete and integrated
2981 feature-set for programming Python effectively.")
2982 (license license:expat)))
2983
2984 (define-public python-black
2985 (package
2986 (name "python-black")
2987 (version "18.6b4")
2988 (source
2989 (origin
2990 (method url-fetch)
2991 (uri (pypi-uri "black" version))
2992 (sha256
2993 (base32
2994 "0i4sfqgz6w15vd50kbhi7g7rifgqlf8yfr8y78rypd56q64qn592"))))
2995 (build-system python-build-system)
2996 (arguments
2997 `(#:phases
2998 (modify-phases %standard-phases
2999 (add-after 'patch-source-shebangs 'patch-extra-shebangs
3000 (lambda _
3001 (let ((python3 (which "python3")))
3002 (substitute* '("tests/data/fmtonoff.py"
3003 "tests/data/string_prefixes.py"
3004 "tests/data/function.py")
3005 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
3006 (string-append "#!" python3 (if (string? minor-version)
3007 minor-version
3008 ""))))))))))
3009 (propagated-inputs
3010 `(("python-click" ,python-click)
3011 ("python-attrs" ,python-attrs)
3012 ("python-appdirs" ,python-appdirs)
3013 ("python-toml" ,python-toml)))
3014 (home-page "https://github.com/ambv/black")
3015 (synopsis "The uncompromising code formatter")
3016 (description "Black is the uncompromising Python code formatter.")
3017 (license license:expat)))
3018
3019 (define-public python-blinker
3020 (package
3021 (name "python-blinker")
3022 (version "1.4")
3023 (source
3024 (origin
3025 (method url-fetch)
3026 (uri (pypi-uri "blinker" version))
3027 (sha256
3028 (base32
3029 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
3030 (build-system python-build-system)
3031 (home-page "http://pythonhosted.org/blinker/")
3032 (synopsis "Fast, simple object-to-object and broadcast signaling")
3033 (description
3034 "Blinker provides a fast dispatching system that allows any number of
3035 interested parties to subscribe to events, or \"signals\".")
3036 (license license:expat)))
3037
3038 (define-public python2-blinker
3039 (package-with-python2 python-blinker))
3040
3041 (define-public pelican
3042 (package
3043 (name "pelican")
3044 (version "4.0.1")
3045 (source
3046 (origin
3047 (method url-fetch)
3048 (uri (pypi-uri "pelican" version))
3049 (sha256
3050 (base32
3051 "05yda7n6r0ll18fpdjzkzyr0ls8hbb86fnjyb33k9jvv5avah2lr"))))
3052 (build-system python-build-system)
3053 (propagated-inputs
3054 `(("python-feedgenerator" ,python-feedgenerator)
3055 ("python-jinja2" ,python-jinja2)
3056 ("python-pygments" ,python-pygments)
3057 ("python-docutils" ,python-docutils)
3058 ("python-pytz" ,python-pytz)
3059 ("python-blinker" ,python-blinker)
3060 ("python-unidecode" ,python-unidecode)
3061 ("python-six" ,python-six)
3062 ("python-dateutil" ,python-dateutil)
3063 ("python-markdown" ,python-markdown)))
3064 (home-page "https://getpelican.com/")
3065 (arguments
3066 `(;; XXX Requires a lot more packages to do unit tests :P
3067 #:tests? #f
3068 #:phases (modify-phases %standard-phases
3069 (add-before
3070 'install 'adjust-requires
3071 ;; Since feedgenerator is installed from git, it doesn't
3072 ;; conform to the version requirements.
3073 ;;
3074 ;; We *do have* "feedgenerator >= 1.6", but strip off the
3075 ;; version requirement so setuptools doesn't get confused.
3076 (lambda _
3077 (substitute* "setup.py"
3078 (("['\"]feedgenerator.*?['\"]")
3079 "'feedgenerator'")))))))
3080 (synopsis "Python-based static site publishing system")
3081 (description
3082 "Pelican is a tool to generate a static blog from reStructuredText,
3083 Markdown input files, and more. Pelican uses Jinja2 for templating
3084 and is very extensible.")
3085 (license license:agpl3+)))
3086
3087 (define-public mallard-ducktype
3088 (package
3089 (name "mallard-ducktype")
3090 (version "1.0.1")
3091 (source
3092 (origin
3093 (method git-fetch)
3094 ;; git-reference because a proper source tarball is not available
3095 ;; https://lists.gnu.org/archive/html/guix-devel/2019-05/msg00209.html
3096 (uri (git-reference
3097 (url "https://github.com/projectmallard/mallard-ducktype.git")
3098 (commit version)))
3099 (file-name (git-file-name name version))
3100 (sha256
3101 (base32
3102 "0crland0kmpsyjfmnflcw7gaqy5b87b6ah17cmr9d5z1kyazf54n"))))
3103 (build-system python-build-system)
3104 (home-page "http://projectmallard.org")
3105 (synopsis "Convert Ducktype to Mallard documentation markup")
3106 (description
3107 "Ducktype is a lightweight syntax that can represent all the semantics
3108 of the Mallard XML documentation system. Ducktype files can be converted to
3109 Mallard using the @command{ducktype} tool. The yelp-tools package
3110 provides additional functionality on the produced Mallard documents.")
3111 (license license:expat)))
3112
3113 (define-public python-scikit-image
3114 (package
3115 (name "python-scikit-image")
3116 (version "0.14.2")
3117 (source
3118 (origin
3119 (method url-fetch)
3120 (uri (pypi-uri "scikit-image" version))
3121 (sha256
3122 (base32 "07qchljkyxvg5nrm12fvszi7pmjk4m01qp0w0z8syxzxxs20pz8s"))))
3123 (build-system python-build-system)
3124 (arguments
3125 ;; TODO: Some tests require running X11 server. Disable them?
3126 '(#:tests? #f))
3127 ;; See DEPENDS.txt for the list of build and run time requiremnts
3128 (propagated-inputs
3129 `(("python-cloudpickle" ,python-cloudpickle)
3130 ("python-dask" ,python-dask)
3131 ("python-matplotlib" ,python-matplotlib)
3132 ("python-networkx" ,python-networkx)
3133 ("python-numpy" ,python-numpy)
3134 ("python-pillow" ,python-pillow)
3135 ("python-pywavelets" ,python-pywavelets)
3136 ("python-scipy" ,python-scipy)
3137 ("python-six" ,python-six)))
3138 (native-inputs
3139 `(("python-cython" ,python-cython)))
3140 (home-page "http://scikit-image.org/")
3141 (synopsis "Image processing in Python")
3142 (description
3143 "Scikit-image is a collection of algorithms for image processing.")
3144 (license license:bsd-3)))
3145
3146 (define-public python2-scikit-image
3147 (package-with-python2 python-scikit-image))
3148
3149 (define-public python-cython
3150 (package
3151 (name "python-cython")
3152 (version "0.29.7")
3153 (source
3154 (origin
3155 (method url-fetch)
3156 (uri (pypi-uri "Cython" version))
3157 (sha256
3158 (base32
3159 "1s61hq2ikawxp6qvmkbfvvaxy9rqj67cddzwgcfc3dwi44b83l2m"))))
3160 (build-system python-build-system)
3161 ;; we need the full python package and not just the python-wrapper
3162 ;; because we need libpython3.3m.so
3163 (inputs
3164 `(("python" ,python)))
3165 (arguments
3166 `(#:phases
3167 (modify-phases %standard-phases
3168 (add-before 'check 'set-HOME
3169 ;; some tests require access to "$HOME/.cython"
3170 (lambda _ (setenv "HOME" "/tmp") #t))
3171
3172 ;; FIXME: These tests started failing on armhf after the 0.28 update
3173 ;; (commit c69d11c5930), both with an error such as this:
3174 ;; compiling (cpp) and running dictcomp ...
3175 ;; === C/C++ compiler error output: ===
3176 ;; ‘
3177 ;; dictcomp.cpp:5221: confused by earlier errors, bailing out
3178 ;; See <https://hydra.gnu.org/build/2948724> for logs.
3179 ,@(if (target-arm32?)
3180 `((add-before 'check 'disable-failing-tests
3181 (lambda _
3182 (let ((disabled-tests (open-file "tests/bugs.txt" "a")))
3183 (for-each (lambda (test)
3184 (format disabled-tests "~a\n" test))
3185 '("memslice" "dictcomp"))
3186 (close-port disabled-tests)))))
3187 '())
3188
3189 (replace 'check
3190 (lambda _
3191 (invoke "python" "runtests.py" "-vv"))))))
3192 (home-page "https://cython.org/")
3193 (synopsis "C extensions for Python")
3194 (description "Cython is an optimising static compiler for both the Python
3195 programming language and the extended Cython programming language. It makes
3196 writing C extensions for Python as easy as Python itself.")
3197 (license license:asl2.0)
3198 (properties `((python2-variant . ,(delay python2-cython))))))
3199
3200 (define-public python2-cython
3201 (package (inherit (package-with-python2
3202 (strip-python2-variant python-cython)))
3203 (name "python2-cython")
3204 (inputs
3205 `(("python-2" ,python-2))))) ; this is not automatically changed
3206
3207 ;; The RPython toolchain currently does not support Python 3.
3208 (define-public python2-rpython
3209 (package
3210 (name "python2-rpython")
3211 (version "0.2.1")
3212 (source
3213 (origin
3214 (method url-fetch)
3215 (uri (pypi-uri "rpython" version))
3216 (sha256
3217 (base32
3218 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
3219 (build-system python-build-system)
3220 (arguments `(#:python ,python-2))
3221 (native-inputs
3222 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3223 (home-page "https://rpython.readthedocs.org")
3224 (synopsis "Framework for implementing interpreters and virtual machines")
3225 (description "RPython is a translation and support framework for
3226 producing implementations of dynamic languages, emphasizing a clean separation
3227 between language specification and implementation aspects.")
3228 (license license:expat)))
3229
3230 ;; NOTE: when upgrading numpy please make sure that python-pandas and
3231 ;; python-scipy still build, as these three packages are often used together.
3232 (define-public python-numpy
3233 (package
3234 (name "python-numpy")
3235 (version "1.15.4")
3236 (source
3237 (origin
3238 (method url-fetch)
3239 (uri (string-append
3240 "https://github.com/numpy/numpy/releases/download/v"
3241 version "/numpy-" version ".tar.gz"))
3242 (sha256
3243 (base32
3244 "102vcl2qq4pjbm7a3d67vkkvn4466ngia1d8wi5avqwqh8j0jvkn"))))
3245 (build-system python-build-system)
3246 (inputs
3247 `(("openblas" ,openblas)
3248 ("lapack" ,lapack)))
3249 (native-inputs
3250 `(("python-cython" ,python-cython)
3251 ("python-pytest" ,python-pytest)
3252 ("gfortran" ,gfortran)))
3253 (arguments
3254 `(#:phases
3255 (modify-phases %standard-phases
3256 (add-before 'build 'configure-blas-lapack
3257 (lambda* (#:key inputs #:allow-other-keys)
3258 (call-with-output-file "site.cfg"
3259 (lambda (port)
3260 (format port
3261 "[openblas]
3262 libraries = openblas
3263 library_dirs = ~a/lib
3264 include_dirs = ~a/include
3265
3266 # backslash-n to make emacs happy
3267 \n[lapack]
3268 lapack_libs = lapack
3269 library_dirs = ~a/lib
3270 include_dirs = ~a/include
3271 "
3272 (assoc-ref inputs "openblas")
3273 (assoc-ref inputs "openblas")
3274 (assoc-ref inputs "lapack")
3275 (assoc-ref inputs "lapack"))))
3276 #t))
3277 (add-before 'build 'fix-executable-paths
3278 (lambda* (#:key inputs #:allow-other-keys)
3279 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
3280 ;; instead of /bin/sh.
3281 (substitute* "numpy/distutils/exec_command.py"
3282 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
3283 (string-append match-start (assoc-ref inputs "bash") match-end)))
3284 ;; Use "gcc" executable, not "cc".
3285 (substitute* "numpy/distutils/system_info.py"
3286 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3287 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3288 #t))
3289 ;; Tests can only be run after the library has been installed and not
3290 ;; within the source directory.
3291 (delete 'check)
3292 (add-after 'install 'check
3293 (lambda* (#:key outputs inputs #:allow-other-keys)
3294 ;; Make installed package available for running the tests
3295 (add-installed-pythonpath inputs outputs)
3296 ;; Make sure "f2py" etc is found.
3297 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
3298 ":" (getenv "PATH")))
3299 (with-directory-excursion "/tmp"
3300 (invoke "python" "-c"
3301 "import numpy; numpy.test(verbose=2)")))))))
3302 (home-page "http://www.numpy.org/")
3303 (synopsis "Fundamental package for scientific computing with Python")
3304 (description "NumPy is the fundamental package for scientific computing
3305 with Python. It contains among other things: a powerful N-dimensional array
3306 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3307 and Fortran code, useful linear algebra, Fourier transform, and random number
3308 capabilities.")
3309 (license license:bsd-3)))
3310
3311 (define-public python2-numpy
3312 (package-with-python2 python-numpy))
3313
3314 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
3315 ;; interest only for legacy code going back to NumPy's predecessor
3316 ;; Numeric.
3317 (define-public python2-numpy-1.8
3318 (package (inherit python2-numpy)
3319 (version "1.8.2")
3320 (source
3321 (origin
3322 (method url-fetch)
3323 (uri (string-append
3324 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
3325 (file-name (string-append "python2-numpy-" version ".tar.gz"))
3326 (sha256
3327 (base32
3328 "0sc20gz1b17xnyrkp5frca3ql5qfalpv916hfg2kqxpwr6jg0f1g"))))
3329 (arguments
3330 (substitute-keyword-arguments (package-arguments python2-numpy)
3331 ((#:phases phases)
3332 `(modify-phases ,phases
3333 (replace 'configure-blas-lapack
3334 (lambda* (#:key inputs #:allow-other-keys)
3335 (call-with-output-file "site.cfg"
3336 (lambda (port)
3337 (format port
3338 "[openblas]
3339 libraries = openblas,lapack
3340 library_dirs = ~a/lib:~a/lib
3341 include_dirs = ~a/include:~a/include
3342 "
3343 (assoc-ref inputs "openblas")
3344 (assoc-ref inputs "lapack")
3345 (assoc-ref inputs "openblas")
3346 (assoc-ref inputs "lapack"))))
3347 #t))))))
3348 (native-inputs
3349 `(("python2-nose" ,python2-nose)))
3350 (description "NumPy is the fundamental package for scientific computing
3351 with Python. It contains among other things: a powerful N-dimensional array
3352 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3353 and Fortran code, useful linear algebra, Fourier transform, and random number
3354 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
3355 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
3356 Numeric.")
3357 (license license:bsd-3)))
3358
3359 (define-public python-munch
3360 (package
3361 (name "python-munch")
3362 (version "2.0.4")
3363 (source
3364 (origin
3365 (method url-fetch)
3366 (uri (pypi-uri "munch" version))
3367 (sha256
3368 (base32
3369 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3370 (build-system python-build-system)
3371 (home-page "https://github.com/Infinidat/munch")
3372 (synopsis "Dot-accessible dictionary")
3373 (description "Munch is a dot-accessible dictionary similar to JavaScript
3374 objects.")
3375 (license license:expat)))
3376
3377 (define-public python2-munch
3378 (package-with-python2 python-munch))
3379
3380 (define-public python-colormath
3381 (package
3382 (name "python-colormath")
3383 (version "3.0.0")
3384 (source
3385 (origin
3386 (method url-fetch)
3387 (uri (pypi-uri "colormath" version))
3388 (sha256
3389 (base32
3390 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
3391 (build-system python-build-system)
3392 (propagated-inputs
3393 `(("python-networkx" ,python-networkx)
3394 ("python-numpy" ,python-numpy)))
3395 (home-page "https://github.com/gtaylor/python-colormath")
3396 (synopsis "Color math and conversion library")
3397 (description
3398 "This is a Python library for color math and conversions.")
3399 (license license:bsd-3)))
3400
3401 (define-public python2-colormath
3402 (package-with-python2 python-colormath))
3403
3404 (define-public python-spectra
3405 (package
3406 (name "python-spectra")
3407 (version "0.0.11")
3408 (source
3409 (origin
3410 (method url-fetch)
3411 (uri (pypi-uri "spectra" version))
3412 (sha256
3413 (base32
3414 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
3415 (build-system python-build-system)
3416 (arguments
3417 `(#:phases
3418 (modify-phases %standard-phases
3419 (replace 'check
3420 (lambda _ (invoke "nosetests" "-v"))))))
3421 (propagated-inputs
3422 `(("python-colormath" ,python-colormath)))
3423 (native-inputs
3424 `(("python-nose" ,python-nose)))
3425 (home-page "https://github.com/jsvine/spectra")
3426 (synopsis "Color scales and color conversion")
3427 (description
3428 "This package provides a Python library intended to make color math,
3429 color scales, and color space conversion easy. It has support for:
3430
3431 @enumerate
3432 @item Color scales
3433 @item Color ranges
3434 @item Color blending
3435 @item Brightening/darkening colors
3436 @item Saturating/desaturating colors
3437 @item Conversion to/from multiple color spaces.
3438 @end enumerate\n")
3439 (license license:expat)))
3440
3441 (define-public python2-spectra
3442 (package-with-python2 python-spectra))
3443
3444 (define-public python-numpy-documentation
3445 (package
3446 (name "python-numpy-documentation")
3447 (version (package-version python-numpy))
3448 (source (package-source python-numpy))
3449 (build-system python-build-system)
3450 (native-inputs
3451 `(("python-matplotlib" ,python-matplotlib)
3452 ("python-numpy" ,python-numpy)
3453 ("pkg-config" ,pkg-config)
3454 ("python-sphinx" ,python-sphinx)
3455 ("python-numpydoc" ,python-numpydoc)
3456 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
3457 texlive-fonts-cm-super
3458 texlive-fonts-ec
3459 texlive-generic-ifxetex
3460 texlive-generic-pdftex
3461 texlive-latex-amsfonts
3462 texlive-latex-capt-of
3463 texlive-latex-cmap
3464 texlive-latex-environ
3465 texlive-latex-eqparbox
3466 texlive-latex-etoolbox
3467 texlive-latex-expdlist
3468 texlive-latex-fancyhdr
3469 texlive-latex-fancyvrb
3470 texlive-latex-fncychap
3471 texlive-latex-float
3472 texlive-latex-framed
3473 texlive-latex-geometry
3474 texlive-latex-graphics
3475 texlive-latex-hyperref
3476 texlive-latex-mdwtools
3477 texlive-latex-multirow
3478 texlive-latex-needspace
3479 texlive-latex-oberdiek
3480 texlive-latex-parskip
3481 texlive-latex-preview
3482 texlive-latex-tabulary
3483 texlive-latex-threeparttable
3484 texlive-latex-titlesec
3485 texlive-latex-trimspaces
3486 texlive-latex-ucs
3487 texlive-latex-upquote
3488 texlive-latex-url
3489 texlive-latex-varwidth
3490 texlive-latex-wrapfig)))
3491 ("texinfo" ,texinfo)
3492 ("perl" ,perl)
3493 ("scipy-sphinx-theme"
3494 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3495 (method git-fetch)
3496 (uri (git-reference
3497 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3498 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3499 (sha256
3500 (base32
3501 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3502 ,@(package-native-inputs python-numpy)))
3503 (arguments
3504 `(#:tests? #f ; we're only generating the documentation
3505 #:phases
3506 (modify-phases %standard-phases
3507 (delete 'build)
3508 (replace 'install
3509 (lambda* (#:key inputs outputs #:allow-other-keys)
3510 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3511 (doc (string-append
3512 data "/doc/" ,name "-"
3513 ,(package-version python-numpy)))
3514 (info-reader (string-append data "/info"))
3515 (html (string-append doc "/html"))
3516 (scipy-sphinx-theme "scipy-sphinx-theme")
3517 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3518 (pyver ,(string-append "PYVER=")))
3519
3520 ;; FIXME: this is needed to for texlive-union to generate
3521 ;; fonts, which are not found.
3522 (setenv "HOME" "/tmp")
3523
3524 (with-directory-excursion "doc"
3525 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3526 (mkdir-p html)
3527 (invoke "make" "html" pyver)
3528 (invoke "make" "latex" "PAPER=a4" pyver)
3529 (invoke "make" "-C" "build/latex"
3530 "all-pdf" "PAPER=a4" pyver)
3531 ;; FIXME: Generation of the info file fails.
3532 ;; (invoke "make" "info" pyver)
3533 ;; (mkdir-p info)
3534 ;; (copy-file "build/texinfo/numpy.info"
3535 ;; (string-append info "/numpy.info"))
3536 (for-each (lambda (file)
3537 (copy-file (string-append "build/latex" file)
3538 (string-append doc file)))
3539 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3540 (with-directory-excursion "build/html"
3541 (for-each (lambda (file)
3542 (let* ((dir (dirname file))
3543 (tgt-dir (string-append html "/" dir)))
3544 (unless (equal? "." dir)
3545 (mkdir-p tgt-dir))
3546 (install-file file html)))
3547 (find-files "." ".*")))))
3548 #t)))))
3549 (home-page (package-home-page python-numpy))
3550 (synopsis "Documentation for the python-numpy package")
3551 (description (package-description python-numpy))
3552 (license (package-license python-numpy))))
3553
3554 (define-public python2-numpy-documentation
3555 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3556 (package
3557 (inherit numpy-documentation)
3558 (native-inputs `(("python2-functools32" ,python2-functools32)
3559 ,@(package-native-inputs numpy-documentation))))))
3560
3561 (define-public python-pygit2
3562 (package
3563 (name "python-pygit2")
3564 (version "0.28.0")
3565 (source
3566 (origin
3567 (method url-fetch)
3568 (uri (pypi-uri "pygit2" version))
3569 (sha256
3570 (base32 "0lngsaz029d4fjcwhl17pr59nh9gwl6hwfin36nph60fgsmfdg3d"))))
3571 (build-system python-build-system)
3572 (arguments
3573 '(#:tests? #f)) ; tests don't run correctly in our environment
3574 (propagated-inputs
3575 `(("python-six" ,python-six)
3576 ("python-cffi" ,python-cffi)
3577 ("libgit2" ,libgit2)
3578 ("python-tox" ,python-tox)))
3579 (native-inputs
3580 `(("python-pytest" ,python-pytest)))
3581 (home-page "https://github.com/libgit2/pygit2")
3582 (synopsis "Python bindings for libgit2")
3583 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3584 library, libgit2 implements Git plumbing.")
3585 ;; GPL2.0 only, with linking exception.
3586 (license license:gpl2)))
3587
3588 (define-public python2-pygit2
3589 (package-with-python2 python-pygit2))
3590
3591 (define-public python-pyparsing
3592 (package
3593 (name "python-pyparsing")
3594 (version "2.3.1")
3595 (source
3596 (origin
3597 (method url-fetch)
3598 (uri (pypi-uri "pyparsing" version))
3599 (sha256
3600 (base32 "0yk6xl885b91dmlhlsap7x78hk2rdr879fln9anbq6k4ca42djb6"))))
3601 (build-system python-build-system)
3602 (outputs '("out" "doc"))
3603 (arguments
3604 `(#:tests? #f ; no test target
3605 #:phases
3606 (modify-phases %standard-phases
3607 (add-after 'install 'install-doc
3608 (lambda* (#:key outputs #:allow-other-keys)
3609 (let* ((doc (string-append (assoc-ref outputs "doc")
3610 "/share/doc/" ,name "-" ,version))
3611 (html-doc (string-append doc "/html"))
3612 (examples (string-append doc "/examples")))
3613 (mkdir-p html-doc)
3614 (mkdir-p examples)
3615 (for-each
3616 (lambda (dir tgt)
3617 (map (lambda (file)
3618 (install-file file tgt))
3619 (find-files dir ".*")))
3620 (list "docs" "htmldoc" "examples")
3621 (list doc html-doc examples))
3622 #t))))))
3623 (home-page "https://github.com/pyparsing/pyparsing")
3624 (synopsis "Python parsing class library")
3625 (description
3626 "The pyparsing module is an alternative approach to creating and
3627 executing simple grammars, vs. the traditional lex/yacc approach, or the use
3628 of regular expressions. The pyparsing module provides a library of classes
3629 that client code uses to construct the grammar directly in Python code.")
3630 (license license:expat)))
3631
3632 (define-public python2-pyparsing
3633 (package-with-python2 python-pyparsing))
3634
3635 (define-public python-numpydoc
3636 (package
3637 (name "python-numpydoc")
3638 (version "0.8.0")
3639 (source
3640 (origin
3641 (method url-fetch)
3642 (uri (pypi-uri "numpydoc" version))
3643 (sha256
3644 (base32
3645 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
3646 (build-system python-build-system)
3647 (propagated-inputs
3648 `(("python-sphinx" ,python-sphinx)))
3649 (native-inputs
3650 `(("python-nose" ,python-nose)))
3651 (home-page "https://pypi.python.org/pypi/numpydoc")
3652 (synopsis
3653 "Numpy's Sphinx extensions")
3654 (description
3655 "Sphinx extension to support docstrings in Numpy format.")
3656 (license license:bsd-2)))
3657
3658 (define-public python2-numpydoc
3659 (package-with-python2 python-numpydoc))
3660
3661 (define-public python-numexpr
3662 (package
3663 (name "python-numexpr")
3664 (version "2.6.5")
3665 (source
3666 (origin
3667 (method url-fetch)
3668 (uri (pypi-uri "numexpr" version))
3669 (sha256
3670 (base32
3671 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3672 (build-system python-build-system)
3673 (arguments `(#:tests? #f)) ; no tests included
3674 (propagated-inputs
3675 `(("python-numpy" ,python-numpy)))
3676 (home-page "https://github.com/pydata/numexpr")
3677 (synopsis "Fast numerical expression evaluator for NumPy")
3678 (description
3679 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3680 expressions that operate on arrays are accelerated and use less memory than
3681 doing the same calculation in Python. In addition, its multi-threaded
3682 capabilities can make use of all your cores, which may accelerate
3683 computations, most specially if they are not memory-bounded (e.g. those using
3684 transcendental functions).")
3685 (license license:expat)))
3686
3687 (define-public python2-numexpr
3688 (package-with-python2 python-numexpr))
3689
3690 (define-public python-cycler
3691 (package
3692 (name "python-cycler")
3693 (version "0.10.0")
3694 (source (origin
3695 (method url-fetch)
3696 (uri (pypi-uri "cycler" version))
3697 (sha256
3698 (base32
3699 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3700 (build-system python-build-system)
3701 (arguments
3702 ;; XXX: The current version requires 'coveralls' which we don't have.
3703 ;; Enable this for the next release which uses 'python-pytest'.
3704 '(#:tests? #f))
3705 (propagated-inputs
3706 `(("python-six" ,python-six)))
3707 (home-page "http://matplotlib.org/cycler/")
3708 (synopsis "Composable keyword argument iterator")
3709 (description
3710 "When using @code{matplotlib} and plotting more than one line, it is
3711 common to want to be able to want to be able to cycle over one or more artist
3712 styles; but the plotting logic can quickly become involved.
3713 To address this and enable easy cycling over arbitrary @code{kwargs}, the
3714 @code{Cycler} class was developed.")
3715 (license license:bsd-3)))
3716
3717 (define-public python2-cycler
3718 (package-with-python2 python-cycler))
3719
3720 (define-public python-colorspacious
3721 (package
3722 (name "python-colorspacious")
3723 (version "1.1.0")
3724 (source
3725 (origin
3726 (method git-fetch)
3727 (uri (git-reference
3728 (url "https://github.com/njsmith/colorspacious.git")
3729 (commit (string-append "v" version))))
3730 (file-name (git-file-name name version))
3731 (sha256
3732 (base32 "0g0lxqiscy5g5rq9421vv7abg0c90jzy0zmas2z3hya6k2dr5aid"))))
3733 (build-system python-build-system)
3734 (propagated-inputs
3735 `(("python-numpy" ,python-numpy)))
3736 (native-inputs
3737 `(("python-nose" ,python-nose)))
3738 (arguments
3739 `(#:phases
3740 (modify-phases %standard-phases
3741 (replace 'check
3742 (lambda _
3743 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
3744 (home-page "https://github.com/njsmith/colorspacious")
3745 (synopsis "Python library for colorspace conversions")
3746 (description "@code{colorspacious} is a Python library that lets you
3747 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3748 (license license:expat)))
3749
3750 (define-public python2-colorspacious
3751 (package-with-python2 python-colorspacious))
3752
3753 (define-public python-matplotlib
3754 (package
3755 (name "python-matplotlib")
3756 (version "2.2.3")
3757 (source
3758 (origin
3759 (method url-fetch)
3760 (uri (pypi-uri "matplotlib" version))
3761 (sha256
3762 (base32
3763 "1rcc7x9ig3hpchkc4cwdvym3y451w74275fxr455zkfagrsvymbk"))))
3764 (build-system python-build-system)
3765 (propagated-inputs ; the following packages are all needed at run time
3766 `(("python-cycler" ,python-cycler)
3767 ("python-kiwisolver" ,python-kiwisolver)
3768 ("python-pyparsing" ,python-pyparsing)
3769 ("python-pygobject" ,python-pygobject)
3770 ("gobject-introspection" ,gobject-introspection)
3771 ("python-tkinter" ,python "tk")
3772 ("python-dateutil" ,python-dateutil)
3773 ("python-numpy" ,python-numpy)
3774 ("python-pillow" ,python-pillow)
3775 ("python-pytz" ,python-pytz)
3776 ("python-six" ,python-six)
3777 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3778 ;; from 'gtk+') provides the required 'typelib' files used by
3779 ;; 'gobject-introspection'. The location of these files is set with the
3780 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3781 ;; is done automatically by a 'native-search-path' procedure. However,
3782 ;; at run-time the user must set this variable as follows:
3783 ;;
3784 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
3785 ("gtk+" ,gtk+)
3786 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3787 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3788 ;; object. For this reason we need to import both libraries.
3789 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3790 ("python-pycairo" ,python-pycairo)
3791 ;; XXX: qtwebkit cannot be built reliably.
3792 ("python-pyqt" ,python-pyqt-without-qtwebkit)
3793 ("python-cairocffi" ,python-cairocffi)))
3794 (inputs
3795 `(("libpng" ,libpng)
3796 ("imagemagick" ,imagemagick)
3797 ("freetype" ,freetype)
3798 ("cairo" ,cairo)
3799 ("glib" ,glib)
3800 ;; FIXME: Add backends when available.
3801 ;("python-wxpython" ,python-wxpython)
3802 ("tcl" ,tcl)
3803 ("tk" ,tk)))
3804 (native-inputs
3805 `(("pkg-config" ,pkg-config)
3806 ("python-nose" ,python-nose)
3807 ("python-mock" ,python-mock)))
3808 (arguments
3809 `(#:phases
3810 (modify-phases %standard-phases
3811 (add-before 'build 'configure-environment
3812 (lambda* (#:key outputs inputs #:allow-other-keys)
3813 (let ((cairo (assoc-ref inputs "cairo"))
3814 (gtk+ (assoc-ref inputs "gtk+")))
3815 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3816 ;; has not effect.
3817 (setenv "LD_LIBRARY_PATH"
3818 (string-append cairo "/lib:" gtk+ "/lib"))
3819 (setenv "HOME" (getcwd))
3820 (call-with-output-file "setup.cfg"
3821 (lambda (port)
3822 (format port "[directories]~%
3823 basedirlist = ~a,~a~%
3824 [rc_options]~%
3825 backend = TkAgg~%"
3826 (assoc-ref inputs "tcl")
3827 (assoc-ref inputs "tk")))))
3828 #t)))))
3829 (home-page "http://matplotlib.org")
3830 (synopsis "2D plotting library for Python")
3831 (description
3832 "Matplotlib is a Python 2D plotting library which produces publication
3833 quality figures in a variety of hardcopy formats and interactive environments
3834 across platforms. Matplotlib can be used in Python scripts, the python and
3835 ipython shell, web application servers, and six graphical user interface
3836 toolkits.")
3837 (license license:psfl)
3838 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3839
3840 (define-public python2-matplotlib
3841 (let ((matplotlib (package-with-python2
3842 (strip-python2-variant python-matplotlib))))
3843 (package (inherit matplotlib)
3844 ;; Make sure to use special packages for Python 2 instead
3845 ;; of those automatically rewritten by package-with-python2.
3846 (propagated-inputs
3847 `(("python2-pycairo" ,python2-pycairo)
3848 ("python2-backports-functools-lru-cache"
3849 ,python2-backports-functools-lru-cache)
3850 ("python2-functools32" ,python2-functools32)
3851 ("python2-pygobject-2" ,python2-pygobject-2)
3852 ("python2-subprocess32" ,python2-subprocess32)
3853 ("python2-tkinter" ,python-2 "tk")
3854 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3855 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
3856
3857 (define-public python-matplotlib-documentation
3858 (package
3859 (name "python-matplotlib-documentation")
3860 (version (package-version python-matplotlib))
3861 (source (package-source python-matplotlib))
3862 (build-system python-build-system)
3863 (native-inputs
3864 `(("python-matplotlib" ,python-matplotlib)
3865 ("python-colorspacious" ,python-colorspacious)
3866 ("python-sphinx" ,python-sphinx)
3867 ("python-sphinx-gallery" ,python-sphinx-gallery)
3868 ("python-numpydoc" ,python-numpydoc)
3869 ("python-ipython" ,python-ipython)
3870 ("python-ipykernel" ,python-ipykernel)
3871 ("python-mock" ,python-mock)
3872 ("graphviz" ,graphviz)
3873 ("texlive" ,(texlive-union (list texlive-latex-amsfonts
3874 texlive-latex-amsmath
3875 texlive-latex-enumitem
3876 texlive-latex-expdlist
3877 texlive-latex-geometry
3878 texlive-latex-preview
3879 texlive-latex-type1cm
3880 texlive-latex-ucs
3881
3882 texlive-generic-pdftex
3883
3884 texlive-fonts-amsfonts
3885 texlive-fonts-ec
3886 texlive-fonts-adobe-times
3887 texlive-fonts-txfonts)))
3888 ("texinfo" ,texinfo)
3889 ,@(package-native-inputs python-matplotlib)))
3890 (arguments
3891 `(#:tests? #f ; we're only generating documentation
3892 #:phases
3893 (modify-phases %standard-phases
3894 (replace 'build
3895 (lambda _
3896 (chdir "doc")
3897 (setenv "PYTHONPATH"
3898 (string-append (getenv "PYTHONPATH")
3899 ":" (getcwd) "/../examples/units"))
3900 (substitute* "conf.py"
3901 ;; Don't use git.
3902 (("^SHA = check_output.*")
3903 (string-append "SHA = \"" ,version "\"\n"))
3904 ;; Don't fetch intersphinx files from the Internet
3905 (("^explicit_order_folders" m)
3906 (string-append "intersphinx_mapping = {}\n" m))
3907 (("'sphinx.ext.intersphinx',") "")
3908 ;; Disable URL embedding which requires internet access.
3909 (("'https://docs.scipy.org/doc/numpy'") "None")
3910 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
3911 (invoke "make"
3912 "SPHINXBUILD=sphinx-build"
3913 "SPHINXOPTS=" ; don't abort on warnings
3914 "html" "texinfo")))
3915 (replace 'install
3916 (lambda* (#:key inputs outputs #:allow-other-keys)
3917 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3918 (doc (string-append data "/doc/python-matplotlib-" ,version))
3919 (info (string-append data "/info"))
3920 (html (string-append doc "/html")))
3921 (mkdir-p html)
3922 (mkdir-p info)
3923 (copy-recursively "build/html" html)
3924 (symlink (string-append html "/_images")
3925 (string-append info "/matplotlib-figures"))
3926 (with-directory-excursion "build/texinfo"
3927 (substitute* "matplotlib.texi"
3928 (("@image\\{([^,]*)" all file)
3929 (string-append "@image{matplotlib-figures/" file)))
3930 (symlink (string-append html "/_images")
3931 "./matplotlib-figures")
3932 (invoke "makeinfo" "--no-split"
3933 "-o" "matplotlib.info" "matplotlib.texi"))
3934 (install-file "build/texinfo/matplotlib.info" info))
3935 #t)))))
3936 (home-page (package-home-page python-matplotlib))
3937 (synopsis "Documentation for the python-matplotlib package")
3938 (description (package-description python-matplotlib))
3939 (license (package-license python-matplotlib))))
3940
3941 (define-public python2-matplotlib-documentation
3942 (package-with-python2 python-matplotlib-documentation))
3943
3944 (define-public python2-pysnptools
3945 (package
3946 (name "python2-pysnptools")
3947 (version "0.3.13")
3948 (source
3949 (origin
3950 (method url-fetch)
3951 (uri (pypi-uri "pysnptools" version))
3952 (sha256
3953 (base32
3954 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
3955 (build-system python-build-system)
3956 (arguments
3957 `(#:python ,python-2 ; only Python 2.7 is supported
3958 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
3959 (propagated-inputs
3960 `(("python2-numpy" ,python2-numpy)
3961 ("python2-scipy" ,python2-scipy)
3962 ("python2-pandas" ,python2-pandas)))
3963 (native-inputs
3964 `(("python2-cython" ,python2-cython)))
3965 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
3966 (synopsis "Library for reading and manipulating genetic data")
3967 (description
3968 "PySnpTools is a library for reading and manipulating genetic data. It
3969 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
3970 those files. It can also efficiently manipulate ranges of integers using set
3971 operators such as union, intersection, and difference.")
3972 (license license:asl2.0)))
3973
3974 (define-public python-scipy
3975 (package
3976 (name "python-scipy")
3977 (version "1.2.2")
3978 (source
3979 (origin
3980 (method url-fetch)
3981 (uri (pypi-uri "scipy" version))
3982 (sha256
3983 (base32
3984 "1cgvgin8fvckv96hjh3ikmwkra5rif51bdb75ifzf7xbil5iwcx4"))))
3985 (build-system python-build-system)
3986 (propagated-inputs
3987 `(("python-numpy" ,python-numpy)
3988 ("python-matplotlib" ,python-matplotlib)
3989 ("python-pyparsing" ,python-pyparsing)))
3990 (inputs
3991 `(("lapack" ,lapack)
3992 ("openblas" ,openblas)))
3993 (native-inputs
3994 `(("python-cython" ,python-cython)
3995 ("python-pytest" ,python-pytest)
3996 ("python-sphinx" ,python-sphinx)
3997 ("python-numpydoc" ,python-numpydoc)
3998 ("gfortran" ,gfortran)
3999 ("perl" ,perl)
4000 ("which" ,which)))
4001 (outputs '("out" "doc"))
4002 (arguments
4003 `(#:phases
4004 (modify-phases %standard-phases
4005 (add-after 'unpack 'disable-broken-tests
4006 (lambda _
4007 (substitute* "scipy/sparse/linalg/dsolve/tests/test_linsolve.py"
4008 (("^( +)def test_threads_parallel\\(self\\):" m indent)
4009 (string-append indent
4010 "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
4011 m)))
4012 (substitute* "scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py"
4013 (("^def test_parallel_threads\\(\\):" m)
4014 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
4015 m)))
4016 #t))
4017 (add-before 'build 'configure-openblas
4018 (lambda* (#:key inputs #:allow-other-keys)
4019 (call-with-output-file "site.cfg"
4020 (lambda (port)
4021 (format port
4022 "[blas]
4023 libraries = openblas
4024 library_dirs = ~a/lib
4025 include_dirs = ~a/include
4026
4027 # backslash-n to make emacs happy
4028 \n[atlas]
4029 library_dirs = ~a/lib
4030 atlas_libs = openblas
4031 "
4032 (assoc-ref inputs "openblas")
4033 (assoc-ref inputs "openblas")
4034 (assoc-ref inputs "openblas"))))
4035 #t))
4036 (add-after 'install 'install-doc
4037 (lambda* (#:key inputs outputs #:allow-other-keys)
4038 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4039 (doc (string-append data "/doc/" ,name "-" ,version))
4040 (html (string-append doc "/html"))
4041 (pyver ,(string-append "PYVER=" (version-major+minor
4042 (package-version python))))
4043 ;; By default it tries to run sphinx-build through the Python
4044 ;; interpreter which won't work with our shell wrapper.
4045 (sphinxbuild "SPHINXBUILD=LANG=C sphinx-build"))
4046 ;; Make installed package available for building the
4047 ;; documentation
4048 (add-installed-pythonpath inputs outputs)
4049 (with-directory-excursion "doc"
4050 ;; Fix generation of images for mathematical expressions.
4051 (substitute* (find-files "source" "conf\\.py")
4052 (("pngmath_use_preview = True")
4053 "pngmath_use_preview = False"))
4054 (mkdir-p html)
4055 (invoke "make" "html" pyver sphinxbuild)
4056 (with-directory-excursion "build/html"
4057 (for-each (lambda (file)
4058 (let* ((dir (dirname file))
4059 (tgt-dir (string-append html "/" dir)))
4060 (install-file file html)))
4061 (find-files "." ".*")))))
4062 #t))
4063 ;; Tests can only be run after the library has been installed and not
4064 ;; within the source directory.
4065 (delete 'check)
4066 (add-after 'install 'check
4067 (lambda* (#:key inputs outputs #:allow-other-keys)
4068 (add-installed-pythonpath inputs outputs)
4069 (with-directory-excursion "/tmp"
4070 (invoke "python" "-c"
4071 "import scipy; scipy.test(verbose=2)")))))))
4072 (home-page "https://www.scipy.org/")
4073 (synopsis "The Scipy library provides efficient numerical routines")
4074 (description "The SciPy library is one of the core packages that make up
4075 the SciPy stack. It provides many user-friendly and efficient numerical
4076 routines such as routines for numerical integration and optimization.")
4077 (properties `((python2-variant . ,(delay python2-scipy))))
4078 (license license:bsd-3)))
4079
4080 (define-public python2-scipy
4081 (package-with-python2
4082 (strip-python2-variant python-scipy)))
4083
4084 (define-public python-socksipy-branch
4085 (package
4086 (name "python-socksipy-branch")
4087 (version "1.01")
4088 (source
4089 (origin
4090 (method url-fetch)
4091 (uri (pypi-uri "SocksiPy-branch" version))
4092 (sha256
4093 (base32
4094 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4095 (build-system python-build-system)
4096 (arguments
4097 `(#:tests? #f)) ; There are no tests
4098 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4099 (synopsis "Python SOCKS module")
4100 (description
4101 "SocksiPy - A Python SOCKS client module. It provides a
4102 socket-like interface that supports connections to any TCP
4103 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4104 The original version was developed by Dan Haim, this is a
4105 branch created by Mario Vilas to address some open issues,
4106 as the original project seems to have been abandoned circa 2007.")
4107 (license license:bsd-3)))
4108
4109 (define-public python2-socksipy-branch
4110 (package-with-python2 python-socksipy-branch))
4111
4112 (define-public python-pycodestyle
4113 (package
4114 (name "python-pycodestyle")
4115 (version "2.4.0")
4116 (source
4117 (origin
4118 (method url-fetch)
4119 (uri (pypi-uri "pycodestyle" version))
4120 (sha256
4121 (base32
4122 "0fhy4vnlgpjq4qd1wdnl6pvdw7rah0ypmn8c9mkhz8clsndskz6b"))))
4123 (build-system python-build-system)
4124 (home-page "https://pycodestyle.readthedocs.io/")
4125 (synopsis "Python style guide checker")
4126 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4127 Python code against some of the style conventions in
4128 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4129 (license license:expat)))
4130
4131 (define-public python2-pycodestyle
4132 (package-with-python2 python-pycodestyle))
4133
4134 (define-public python-multidict
4135 (package
4136 (name "python-multidict")
4137 (version "4.2.0")
4138 (source
4139 (origin
4140 (method url-fetch)
4141 (uri (pypi-uri "multidict" version))
4142 (sha256
4143 (base32
4144 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
4145 (build-system python-build-system)
4146 (native-inputs
4147 `(("python-pytest" ,python-pytest)
4148 ("python-pytest-runner" ,python-pytest-runner)))
4149 (home-page "https://github.com/aio-libs/multidict/")
4150 (synopsis "Multidict implementation")
4151 (description "Multidict is dict-like collection of key-value pairs
4152 where key might be occurred more than once in the container.")
4153 (license license:asl2.0)))
4154
4155 (define-public python-orderedmultidict
4156 (package
4157 (name "python-orderedmultidict")
4158 (version "0.7.11")
4159 (source
4160 (origin
4161 (method url-fetch)
4162 (uri (pypi-uri "orderedmultidict" version))
4163 (sha256
4164 (base32
4165 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4166 (build-system python-build-system)
4167 (arguments
4168 `(#:phases
4169 (modify-phases %standard-phases
4170 (add-after 'unpack 'fix-tests
4171 (lambda _
4172 ;; The package uses nosetest for running the tests.
4173 ;; Adding this initfile allows to run the test suite
4174 ;; without requiring nosetest.
4175 (with-output-to-file "tests/__init__.py" newline)
4176 #t)))))
4177 (propagated-inputs
4178 `(("python-six" ,python-six)))
4179 (native-inputs
4180 `(("python-pycodestyle" ,python-pycodestyle)))
4181 (home-page "https://github.com/gruns/orderedmultidict")
4182 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4183 (description "This package contains a library for ordered multivalue
4184 dictionaries. A multivalue dictionary is a dictionary that can store
4185 multiple values for the same key. An ordered multivalue dictionary is a
4186 multivalue dictionary that retains the order of insertions and deletions.")
4187 (license license:unlicense)))
4188
4189 (define-public python2-orderedmultidict
4190 (package-with-python2 python-orderedmultidict))
4191
4192 (define-public python-autopep8
4193 (package
4194 (name "python-autopep8")
4195 (version "1.3.5")
4196 (source
4197 (origin
4198 (method url-fetch)
4199 (uri (pypi-uri "autopep8" version))
4200 (sha256
4201 (base32
4202 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
4203 (build-system python-build-system)
4204 (propagated-inputs
4205 `(("python-pycodestyle" ,python-pycodestyle)))
4206 (home-page "https://github.com/hhatto/autopep8")
4207 (synopsis "Format Python code according to the PEP 8 style guide")
4208 (description
4209 "@code{autopep8} automatically formats Python code to conform to
4210 the PEP 8 style guide. It uses the pycodestyle utility to determine
4211 what parts of the code needs to be formatted. @code{autopep8} is
4212 capable of fixing most of the formatting issues that can be reported
4213 by pycodestyle.")
4214 (license (license:non-copyleft
4215 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4216
4217 (define-public python2-autopep8
4218 (package-with-python2 python-autopep8))
4219
4220 (define-public python-distutils-extra
4221 (package
4222 (name "python-distutils-extra")
4223 (version "2.38")
4224 (source
4225 (origin
4226 (method url-fetch)
4227 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4228 version "/+download/python-distutils-extra-"
4229 version ".tar.gz"))
4230 (sha256
4231 (base32
4232 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4233 (build-system python-build-system)
4234 (home-page "https://launchpad.net/python-distutils-extra/")
4235 (synopsis "Enhancements to Python's distutils")
4236 (description
4237 "The python-distutils-extra module enables you to easily integrate
4238 gettext support, themed icons, and scrollkeeper-based documentation into
4239 Python's distutils.")
4240 (license license:gpl2)))
4241
4242 (define-public python2-distutils-extra
4243 (package-with-python2 python-distutils-extra))
4244
4245 (define-public python2-elib.intl
4246 (package
4247 (name "python2-elib.intl")
4248 (version "0.0.3")
4249 (source
4250 (origin
4251 ;; This project doesn't tag releases or publish tarballs, so we take
4252 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4253 (method git-fetch)
4254 (uri (git-reference
4255 (url "https://github.com/dieterv/elib.intl.git")
4256 (commit "d09997cfef")))
4257 (file-name (string-append name "-" version "-checkout"))
4258 (sha256
4259 (base32
4260 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4261 (build-system python-build-system)
4262 (arguments
4263 ;; incompatible with Python 3 (exception syntax)
4264 `(#:python ,python-2
4265 #:tests? #f))
4266 (home-page "https://github.com/dieterv/elib.intl")
4267 (synopsis "Enhanced internationalization for Python")
4268 (description
4269 "The elib.intl module provides enhanced internationalization (I18N)
4270 services for your Python modules and applications.")
4271 (license license:lgpl3+)))
4272
4273 (define-public python-olefile
4274 (package
4275 (name "python-olefile")
4276 (version "0.45.1")
4277 (source
4278 (origin
4279 (method url-fetch)
4280 (uri (string-append "https://github.com/decalage2/olefile/archive/v"
4281 version ".tar.gz"))
4282 (file-name (string-append name "-" version ".tar.gz"))
4283 (sha256
4284 (base32
4285 "18ai19zwagm6nli14k8bii31ipbab2rp7plrvsm6gmfql551a8ai"))))
4286 (build-system python-build-system)
4287 (home-page
4288 "https://www.decalage.info/python/olefileio")
4289 (synopsis "Read and write Microsoft OLE2 files.")
4290 (description
4291 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
4292 Storage or Compound Document, Microsoft Office). It is an improved version of
4293 the OleFileIO module from PIL, the Python Image Library.")
4294 (license license:bsd-3)))
4295
4296 (define-public python2-olefile
4297 (package-with-python2 python-olefile))
4298
4299 (define-public python-pillow
4300 (package
4301 (name "python-pillow")
4302 (version "5.4.1")
4303 (source
4304 (origin
4305 (method url-fetch)
4306 (uri (pypi-uri "Pillow" version))
4307 (sha256
4308 (base32
4309 "17waygkhhzjd75kajlfw9v57mbb41lcpg6cvkdijqd7smm76ccsj"))))
4310 (build-system python-build-system)
4311 (native-inputs
4312 `(("python-pytest" ,python-pytest)))
4313 (inputs
4314 `(("freetype" ,freetype)
4315 ("lcms" ,lcms)
4316 ("zlib" ,zlib)
4317 ("libjpeg" ,libjpeg)
4318 ("openjpeg" ,openjpeg)
4319 ("libtiff" ,libtiff)
4320 ("libwebp" ,libwebp)))
4321 (propagated-inputs
4322 `(("python-olefile" ,python-olefile)))
4323 (arguments
4324 `(#:phases
4325 (modify-phases %standard-phases
4326 (add-after 'unpack 'patch-ldconfig
4327 (lambda _
4328 (substitute* "setup.py"
4329 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
4330 (delete 'check) ; We must run checks after python-pillow is installed.
4331 (add-after 'install 'check-installed
4332 (lambda* (#:key outputs inputs #:allow-other-keys)
4333 (begin
4334 (setenv "HOME" (getcwd))
4335 ;; Make installed package available for running the tests.
4336 (add-installed-pythonpath inputs outputs)
4337 (invoke "python" "selftest.py" "--installed")
4338 (invoke "python" "-m" "pytest" "-vv")))))))
4339 (home-page "https://python-pillow.org")
4340 (synopsis "Fork of the Python Imaging Library")
4341 (description
4342 "The Python Imaging Library adds image processing capabilities to your
4343 Python interpreter. This library provides extensive file format support, an
4344 efficient internal representation, and fairly powerful image processing
4345 capabilities. The core image library is designed for fast access to data
4346 stored in a few basic pixel formats. It should provide a solid foundation for
4347 a general image processing tool.")
4348 (license (license:x11-style
4349 "http://www.pythonware.com/products/pil/license.htm"
4350 "The PIL Software License"))))
4351
4352 (define-public python2-pillow
4353 (package-with-python2 python-pillow))
4354
4355 (define-public python-pycparser
4356 (package
4357 (name "python-pycparser")
4358 (version "2.18")
4359 (source
4360 (origin
4361 (method url-fetch)
4362 (uri (pypi-uri "pycparser" version))
4363 (sha256
4364 (base32
4365 "09mjyw82ibqzl449g7swy8bfxnfpmas0815d2rkdjlcqw81wma4r"))))
4366 (outputs '("out" "doc"))
4367 (build-system python-build-system)
4368 (native-inputs
4369 `(("pkg-config" ,pkg-config)))
4370 (arguments
4371 `(#:phases
4372 (modify-phases %standard-phases
4373 (replace 'check
4374 (lambda _
4375 (with-directory-excursion "tests"
4376 (invoke "python" "all_tests.py"))
4377 #t))
4378 (add-after 'install 'install-doc
4379 (lambda* (#:key outputs #:allow-other-keys)
4380 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4381 (doc (string-append data "/doc/" ,name "-" ,version))
4382 (examples (string-append doc "/examples")))
4383 (mkdir-p examples)
4384 (for-each (lambda (file)
4385 (copy-file (string-append "." file)
4386 (string-append doc file)))
4387 '("/README.rst" "/CHANGES" "/LICENSE"))
4388 (copy-recursively "examples" examples)))))))
4389 (home-page "https://github.com/eliben/pycparser")
4390 (synopsis "C parser in Python")
4391 (description
4392 "Pycparser is a complete parser of the C language, written in pure Python
4393 using the PLY parsing library. It parses C code into an AST and can serve as
4394 a front-end for C compilers or analysis tools.")
4395 (license license:bsd-3)))
4396
4397 (define-public python2-pycparser
4398 (package-with-python2 python-pycparser))
4399
4400 (define-public python-pywavelets
4401 (package
4402 (name "python-pywavelets")
4403 (version "1.0.1")
4404 (home-page "https://github.com/PyWavelets/pywt")
4405 (source (origin
4406 (method url-fetch)
4407 (uri (pypi-uri "PyWavelets" version))
4408 (sha256
4409 (base32
4410 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
4411 (build-system python-build-system)
4412 (arguments
4413 '(#:modules ((ice-9 ftw)
4414 (srfi srfi-1)
4415 (srfi srfi-26)
4416 (guix build utils)
4417 (guix build python-build-system))
4418 #:phases (modify-phases %standard-phases
4419 (replace 'check
4420 (lambda _
4421 (let ((cwd (getcwd))
4422 (libdir (find (cut string-prefix? "lib." <>)
4423 (scandir "build"))))
4424 (with-directory-excursion (string-append cwd "/build/" libdir)
4425 (invoke "nosetests" "-v" "."))))))))
4426 (native-inputs
4427 `(("python-matplotlib" ,python-matplotlib) ;for tests
4428 ("python-nose" ,python-nose)))
4429 (propagated-inputs
4430 `(("python-numpy" ,python-numpy)))
4431 (synopsis "Wavelet transforms in Python")
4432 (description
4433 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
4434 mathematical basis functions that are localized in both time and frequency.
4435 Wavelet transforms are time-frequency transforms employing wavelets. They are
4436 similar to Fourier transforms, the difference being that Fourier transforms are
4437 localized only in frequency instead of in time and frequency.")
4438 (license license:expat)))
4439
4440 (define-public python2-pywavelets
4441 (package-with-python2 python-pywavelets))
4442
4443 (define-public python-xcffib
4444 (package
4445 (name "python-xcffib")
4446 (version "0.6.0")
4447 (source
4448 (origin
4449 (method url-fetch)
4450 (uri (pypi-uri "xcffib" version))
4451 (sha256
4452 (base32
4453 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
4454 (build-system python-build-system)
4455 (inputs
4456 `(("libxcb" ,libxcb)))
4457 (propagated-inputs
4458 `(("python-cffi" ,python-cffi) ; used at run time
4459 ("python-six" ,python-six)))
4460 (arguments
4461 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4462 #:tests? #f
4463 #:phases
4464 (modify-phases %standard-phases
4465 (add-after 'unpack 'fix-libxcb-path
4466 (lambda* (#:key inputs #:allow-other-keys)
4467 (let ((libxcb (assoc-ref inputs "libxcb")))
4468 (substitute* '("xcffib/__init__.py")
4469 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4470 #t)))
4471 (add-after 'install 'install-doc
4472 (lambda* (#:key outputs #:allow-other-keys)
4473 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4474 "/doc/" ,name "-" ,version)))
4475 (mkdir-p doc)
4476 (copy-file "README.md"
4477 (string-append doc "/README.md"))
4478 #t))))))
4479 (home-page "https://github.com/tych0/xcffib")
4480 (synopsis "XCB Python bindings")
4481 (description
4482 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4483 support for Python 3 and PyPy. It is based on cffi.")
4484 (license license:expat)))
4485
4486 (define-public python2-xcffib
4487 (package-with-python2 python-xcffib))
4488
4489 (define-public python-cairocffi
4490 (package
4491 (name "python-cairocffi")
4492 (version "0.9.0")
4493 (source
4494 (origin
4495 (method url-fetch)
4496 (uri (pypi-uri "cairocffi" version))
4497 (sha256
4498 (base32
4499 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
4500 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
4501 (build-system python-build-system)
4502 (outputs '("out" "doc"))
4503 (inputs
4504 `(("glib" ,glib)
4505 ("gtk+" ,gtk+)
4506 ("gdk-pixbuf" ,gdk-pixbuf)
4507 ("cairo" ,cairo)
4508 ("pango" ,pango)))
4509 (native-inputs
4510 `(("pkg-config" ,pkg-config)
4511 ("python-pytest" ,python-pytest)
4512 ("python-pytest-cov" ,python-pytest-cov)
4513 ("python-pytest-runner" ,python-pytest-runner)
4514 ("python-sphinx" ,python-sphinx)
4515 ("python-docutils" ,python-docutils)))
4516 (propagated-inputs
4517 `(("python-xcffib" ,python-xcffib))) ; used at run time
4518 (arguments
4519 `(#:phases
4520 (modify-phases %standard-phases
4521 (add-after 'unpack 'patch-paths
4522 (lambda* (#:key inputs outputs #:allow-other-keys)
4523 (substitute* (find-files "." "\\.py$")
4524 (("dlopen\\(ffi, 'cairo'")
4525 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
4526 "/lib/libcairo.so.2'"))
4527 (("dlopen\\(ffi, 'gdk-3'")
4528 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
4529 "/lib/libgtk-3.so.0'"))
4530 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
4531 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
4532 "/lib/libgdk_pixbuf-2.0.so.0'"))
4533 (("dlopen\\(ffi, 'glib-2.0'")
4534 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4535 "/lib/libglib-2.0.so.0'"))
4536 (("dlopen\\(ffi, 'gobject-2.0'")
4537 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4538 "/lib/libgobject-2.0.so.0'"))
4539 (("dlopen\\(ffi, 'pangocairo-1.0'")
4540 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4541 "/lib/libpangocairo-1.0.so.0'"))
4542 (("dlopen\\(ffi, 'pango-1.0'")
4543 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4544 "/lib/libpango-1.0.so.0'")))
4545 #t))
4546 (add-after 'install 'install-doc
4547 (lambda* (#:key inputs outputs #:allow-other-keys)
4548 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4549 (doc (string-append data "/doc/" ,name "-" ,version))
4550 (html (string-append doc "/html")))
4551 (setenv "LD_LIBRARY_PATH"
4552 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4553 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4554 (setenv "LANG" "en_US.UTF-8")
4555 (mkdir-p html)
4556 (for-each (lambda (file)
4557 (copy-file (string-append "." file)
4558 (string-append doc file)))
4559 '("/README.rst" "/CHANGES" "/LICENSE"))
4560 (system* "python" "setup.py" "build_sphinx")
4561 (copy-recursively "docs/_build/html" html)
4562 #t))))))
4563 (home-page "https://github.com/Kozea/cairocffi")
4564 (synopsis "Python bindings and object-oriented API for Cairo")
4565 (description
4566 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4567 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4568 graphics library with support for multiple backends including image buffers,
4569 PNG, PostScript, PDF, and SVG file output.")
4570 (license license:bsd-3)))
4571
4572 (define-public python2-cairocffi
4573 (package-with-python2 python-cairocffi))
4574
4575 (define-public python-decorator
4576 (package
4577 (name "python-decorator")
4578 (version "4.3.0")
4579 (source
4580 (origin
4581 (method url-fetch)
4582 (uri (pypi-uri "decorator" version))
4583 (sha256
4584 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
4585 (build-system python-build-system)
4586 (home-page "https://pypi.python.org/pypi/decorator/")
4587 (synopsis "Python module to simplify usage of decorators")
4588 (description
4589 "The aim of the decorator module is to simplify the usage of decorators
4590 for the average programmer, and to popularize decorators usage giving examples
4591 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4592 etc. The core of this module is a decorator factory.")
4593 (license license:expat)))
4594
4595 (define-public python2-decorator
4596 (package-with-python2 python-decorator))
4597
4598 (define-public python-drmaa
4599 (package
4600 (name "python-drmaa")
4601 (version "0.7.7")
4602 (source
4603 (origin
4604 (method url-fetch)
4605 (uri (pypi-uri "drmaa" version))
4606 (sha256
4607 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4608 (build-system python-build-system)
4609 ;; The test suite requires libdrmaa which is provided by the cluster
4610 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4611 ;; should be set to the path of the libdrmaa library.
4612 (arguments '(#:tests? #f))
4613 (native-inputs
4614 `(("python-nose" ,python-nose)))
4615 (home-page "https://pypi.python.org/pypi/drmaa")
4616 (synopsis "Python bindings for the DRMAA library")
4617 (description
4618 "A Python package for Distributed Resource Management (DRM) job
4619 submission and control. This package is an implementation of the DRMAA 1.0
4620 Python language binding specification.")
4621 (license license:bsd-3)))
4622
4623 (define-public python2-drmaa
4624 (package-with-python2 python-drmaa))
4625
4626 (define-public python-grako
4627 (package
4628 (name "python-grako")
4629 (version "3.99.9")
4630 (source
4631 (origin
4632 (method url-fetch)
4633 (uri
4634 (pypi-uri "grako" version ".zip"))
4635 (sha256
4636 (base32
4637 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4638 (build-system python-build-system)
4639 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4640 (native-inputs
4641 `(("unzip" ,unzip)
4642 ("python-pytest" ,python-pytest)
4643 ("python-pytest-runner" ,python-pytest-runner)))
4644 (home-page "https://bitbucket.org/neogeny/grako")
4645 (synopsis "EBNF parser generator")
4646 (description
4647 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4648 memoizing PEG/Packrat parser in Python.")
4649 (license license:bsd-3)))
4650
4651 (define-public python2-grako
4652 (package-with-python2 python-grako))
4653
4654 (define-public python-gridmap
4655 (package
4656 (name "python-gridmap")
4657 (version "0.13.0")
4658 (source
4659 (origin
4660 (method git-fetch)
4661 (uri (git-reference
4662 (url "https://github.com/pygridtools/gridmap.git")
4663 (commit (string-append "v" version))))
4664 (file-name (git-file-name name version))
4665 (sha256
4666 (base32 "1478lbwsr1w24cii2x01m2910fvh8r43ghnb78nc972a96hqiknm"))))
4667 (build-system python-build-system)
4668 (arguments
4669 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4670 (propagated-inputs
4671 `(("python-psutil" ,python-psutil)
4672 ("python-drmaa" ,python-drmaa)
4673 ("python-pyzmq" ,python-pyzmq)))
4674 (home-page "https://github.com/pygridtools/gridmap")
4675 (synopsis "Create jobs on a cluster directly from Python")
4676 (description
4677 "Gridmap is a Python package to allow you to easily create jobs on the
4678 cluster directly from Python. You can directly map Python functions onto the
4679 cluster without needing to write any wrapper code yourself.")
4680 (license license:gpl3+)))
4681
4682 (define-public python2-gridmap
4683 (package-with-python2 python-gridmap))
4684
4685 (define-public python-honcho
4686 (package
4687 (name "python-honcho")
4688 (version "1.0.1")
4689 (source
4690 (origin
4691 (method git-fetch)
4692 (uri (git-reference
4693 (url "https://github.com/nickstenning/honcho.git")
4694 (commit (string-append "v" version))))
4695 (file-name (git-file-name name version))
4696 (sha256
4697 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
4698 (build-system python-build-system)
4699 (native-inputs
4700 `(("python-pytest" ,python-pytest)
4701 ("python-mock" ,python-mock)
4702 ("python-tox" ,python-tox)
4703 ("which" ,which))) ;for tests
4704 (propagated-inputs
4705 `(("python-jinja2" ,python-jinja2)))
4706 (arguments
4707 `(#:phases
4708 (modify-phases %standard-phases
4709 (delete 'check)
4710 (add-after 'install 'check
4711 (lambda* (#:key outputs inputs #:allow-other-keys)
4712 ;; fix honcho path in testsuite
4713 (substitute* "tests/conftest.py"
4714 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
4715 "/bin/honcho" "'")))
4716 ;; It's easier to run tests after install.
4717 ;; Make installed package available for running the tests
4718 (add-installed-pythonpath inputs outputs)
4719 (invoke "py.test" "-v"))))))
4720 (home-page "https://github.com/nickstenning/honcho")
4721 (synopsis "Manage Procfile-based applications")
4722 (description
4723 "A Procfile is a file which describes how to run an application
4724 consisting of several processes. honcho starts all listed processes.
4725 The output of all running processes is collected by honcho and
4726 displayed.")
4727 (license license:expat)))
4728
4729 (define-public python2-honcho
4730 (package-with-python2 python-honcho))
4731
4732 (define-public python-pexpect
4733 (package
4734 (name "python-pexpect")
4735 (version "4.6.0")
4736 (source
4737 (origin
4738 (method url-fetch)
4739 (uri (pypi-uri "pexpect" version))
4740 (sha256
4741 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
4742 (build-system python-build-system)
4743 (arguments
4744 `(#:phases
4745 (modify-phases %standard-phases
4746 (add-before 'check 'prepare-tests
4747 (lambda _
4748 (substitute* (find-files "tests")
4749 (("/bin/ls") (which "ls"))
4750 (("/bin/echo") (which "echo"))
4751 (("/bin/which") (which "which"))
4752 ;; Many tests try to use the /bin directory which
4753 ;; is not present in the build environment.
4754 ;; Use one that's non-empty and unlikely to change.
4755 (("/bin'") "/dev'"))
4756 ;; XXX: Socket connection test gets "Connection reset by peer".
4757 ;; Why does it not work? Delete for now.
4758 (delete-file "tests/test_socket.py")
4759 #t))
4760 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
4761 (native-inputs
4762 `(("python-nose" ,python-nose)
4763 ("python-pytest" ,python-pytest)
4764 ("man-db" ,man-db)
4765 ("which" ,which)
4766 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
4767 (propagated-inputs
4768 `(("python-ptyprocess" ,python-ptyprocess)))
4769 (home-page "http://pexpect.readthedocs.org/")
4770 (synopsis "Controlling interactive console applications")
4771 (description
4772 "Pexpect is a pure Python module for spawning child applications;
4773 controlling them; and responding to expected patterns in their output.
4774 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4775 child application and control it as if a human were typing commands.")
4776 (license license:isc)))
4777
4778 (define-public python2-pexpect
4779 (package-with-python2 python-pexpect))
4780
4781 (define-public python-setuptools-scm
4782 (package
4783 (name "python-setuptools-scm")
4784 (version "3.1.0")
4785 (source (origin
4786 (method url-fetch)
4787 (uri (pypi-uri "setuptools_scm" version))
4788 (sha256
4789 (base32
4790 "0h4bglwfz8b9prqljv8z3w9rgydfyxzaj05bm1y6zs5m6shz548i"))))
4791 (build-system python-build-system)
4792 (home-page "https://github.com/pypa/setuptools_scm/")
4793 (synopsis "Manage Python package versions in SCM metadata")
4794 (description
4795 "Setuptools_scm handles managing your Python package versions in
4796 @dfn{software configuration management} (SCM) metadata instead of declaring
4797 them as the version argument or in a SCM managed file.")
4798 (license license:expat)))
4799
4800 (define-public python2-setuptools-scm
4801 (package-with-python2 python-setuptools-scm))
4802
4803 (define-public python-pathpy
4804 (package
4805 (name "python-pathpy")
4806 (version "11.0.1")
4807 (source
4808 (origin
4809 (method url-fetch)
4810 (uri (pypi-uri "path.py" version))
4811 (sha256
4812 (base32 "07x15v8c7ry9bvycw294c9yq6ky9v2b0dalvgi6rn38ilh69vsz7"))))
4813 ;; (outputs '("out" "doc"))
4814 (build-system python-build-system)
4815 (propagated-inputs
4816 `(("python-appdirs" ,python-appdirs)))
4817 (native-inputs
4818 `(("python-setuptools-scm" ,python-setuptools-scm)
4819 ("python-sphinx" ,python-sphinx)
4820 ("python-rst.linker" ,python-rst.linker)
4821 ("python-pytest" ,python-pytest)
4822 ("python-pytest-runner" ,python-pytest-runner)))
4823 (arguments
4824 ;; FIXME: Documentation and tests require "jaraco.packaging".
4825 `(#:tests? #f))
4826 ;; #:phases
4827 ;; (modify-phases %standard-phases
4828 ;; (add-after 'build 'build-doc
4829 ;; (lambda _
4830 ;; (setenv "LANG" "en_US.UTF-8")
4831 ;; (zero? (system* "python" "setup.py" "build_sphinx"))))
4832 ;; (add-after 'install 'install-doc
4833 ;; (lambda* (#:key outputs #:allow-other-keys)
4834 ;; (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4835 ;; (doc (string-append data "/doc/" ,name "-" ,version))
4836 ;; (html (string-append doc "/html")))
4837 ;; (mkdir-p html)
4838 ;; (for-each (lambda (file)
4839 ;; (copy-file file (string-append doc "/" file)))
4840 ;; '("README.rst" "CHANGES.rst"))
4841 ;; (copy-recursively "build/sphinx/html" html)))))))
4842 (home-page "https://github.com/jaraco/path.py")
4843 (synopsis "Python module wrapper for built-in os.path")
4844 (description
4845 "@code{path.py} implements path objects as first-class entities, allowing
4846 common operations on files to be invoked on those path objects directly.")
4847 (license license:expat)))
4848
4849 (define-public python2-pathpy
4850 (package-with-python2 python-pathpy))
4851
4852 (define-public python-simplegeneric
4853 (package
4854 (name "python-simplegeneric")
4855 (version "0.8.1")
4856 (source
4857 (origin
4858 (method url-fetch)
4859 (uri (pypi-uri "simplegeneric" version ".zip"))
4860 (sha256
4861 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
4862 (build-system python-build-system)
4863 (native-inputs
4864 `(("unzip" ,unzip)))
4865 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
4866 (synopsis "Python module for simple generic functions")
4867 (description
4868 "The simplegeneric module lets you define simple single-dispatch generic
4869 functions, akin to Python’s built-in generic functions like @code{len()},
4870 @code{iter()} and so on. However, instead of using specially-named methods,
4871 these generic functions use simple lookup tables, akin to those used by
4872 e.g. @code{pickle.dump()} and other generic functions found in the Python
4873 standard library.")
4874 (license license:zpl2.1)))
4875
4876 (define-public python2-simplegeneric
4877 (package-with-python2 python-simplegeneric))
4878
4879 (define-public python-ipython-genutils
4880 ;; TODO: This package is retired, check if can be removed, see description.
4881 (package
4882 (name "python-ipython-genutils")
4883 (version "0.1.0")
4884 (source
4885 (origin
4886 (method url-fetch)
4887 (uri (pypi-uri "ipython_genutils" version))
4888 (sha256
4889 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
4890 (build-system python-build-system)
4891 (arguments `(#:tests? #f)) ; no tests
4892 (home-page "https://ipython.org")
4893 (synopsis "Vestigial utilities from IPython")
4894 (description
4895 "This package provides retired utilities from IPython. No packages
4896 outside IPython/Jupyter should depend on it.
4897
4898 This package shouldn't exist. It contains some common utilities shared by
4899 Jupyter and IPython projects during The Big Split. As soon as possible, those
4900 packages will remove their dependency on this, and this package will go
4901 away.")
4902 (license license:bsd-3)))
4903
4904 (define-public python2-ipython-genutils
4905 (package-with-python2 python-ipython-genutils))
4906
4907 (define-public python-traitlets
4908 (package
4909 (name "python-traitlets")
4910 (version "4.3.2")
4911 (source
4912 (origin
4913 (method url-fetch)
4914 (uri (pypi-uri "traitlets" version))
4915 (sha256
4916 (base32
4917 "0dbq7sx26xqz5ixs711k5nc88p8a0nqyz6162pwks5dpcz9d4jww"))))
4918 (build-system python-build-system)
4919 (arguments
4920 `(#:phases
4921 (modify-phases %standard-phases
4922 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
4923 (propagated-inputs
4924 `(("python-ipython-genutils" ,python-ipython-genutils)
4925 ("python-decorator" ,python-decorator))) ;not needed for >4.3.2
4926 (native-inputs
4927 `(("python-pytest" ,python-pytest)))
4928 (properties `((python2-variant . ,(delay python2-traitlets))))
4929 (home-page "https://ipython.org")
4930 (synopsis "Configuration system for Python applications")
4931 (description
4932 "Traitlets is a framework that lets Python classes have attributes with
4933 type checking, dynamically calculated default values, and ‘on change’
4934 callbacks. The package also includes a mechanism to use traitlets for
4935 configuration, loading values from files or from command line arguments. This
4936 is a distinct layer on top of traitlets, so you can use traitlets in your code
4937 without using the configuration machinery.")
4938 (license license:bsd-3)))
4939
4940 (define-public python2-traitlets
4941 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
4942 (package
4943 (inherit traitlets)
4944 (propagated-inputs
4945 `(("python2-enum34" ,python2-enum34)
4946 ,@(package-propagated-inputs traitlets))))))
4947
4948 (define-public python-jupyter-core
4949 (package
4950 (name "python-jupyter-core")
4951 (version "4.4.0")
4952 (source
4953 (origin
4954 (method url-fetch)
4955 (uri (string-append (pypi-uri "jupyter_core" version)))
4956 (sha256
4957 (base32
4958 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
4959 (build-system python-build-system)
4960 ;; FIXME: not sure how to run the tests
4961 (arguments `(#:tests? #f))
4962 (propagated-inputs
4963 `(("python-traitlets" ,python-traitlets)))
4964 (home-page "http://jupyter.org/")
4965 (synopsis "Jupyter base package")
4966 (description
4967 "Jupyter core is the base package on which Jupyter projects rely.")
4968 (license license:bsd-3)))
4969
4970 (define-public python2-jupyter-core
4971 (package-with-python2 python-jupyter-core))
4972
4973 (define-public python-jupyter-client
4974 (package
4975 (name "python-jupyter-client")
4976 (version "5.2.4")
4977 (source
4978 (origin
4979 (method url-fetch)
4980 (uri (pypi-uri "jupyter_client" version))
4981 (sha256
4982 (base32
4983 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
4984 (build-system python-build-system)
4985 ;; Tests fail because of missing native python kernel which I assume is
4986 ;; provided by the ipython package, which we cannot use because it would
4987 ;; cause a dependency cycle.
4988 (arguments `(#:tests? #f))
4989 (propagated-inputs
4990 `(("python-pyzmq" ,python-pyzmq)
4991 ("python-traitlets" ,python-traitlets)
4992 ("python-jupyter-core" ,python-jupyter-core)))
4993 (home-page "http://jupyter.org/")
4994 (synopsis "Jupyter protocol implementation and client libraries")
4995 (description
4996 "The @code{jupyter_client} package contains the reference implementation
4997 of the Jupyter protocol. It also provides client and kernel management APIs
4998 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
4999 installing @code{kernelspec}s for use with Jupyter frontends.")
5000 (license license:bsd-3)))
5001
5002 (define-public python2-jupyter-client
5003 (package-with-python2 python-jupyter-client))
5004
5005 (define-public python-ipykernel
5006 (package
5007 (name "python-ipykernel")
5008 (version "5.1.0")
5009 (source
5010 (origin
5011 (method url-fetch)
5012 (uri (pypi-uri "ipykernel" version))
5013 (sha256
5014 (base32 "0br95qhrd5k65g10djngiy27hs0642301hlf2q142i8djabvzh0g"))))
5015 (build-system python-build-system)
5016 (arguments
5017 `(#:phases
5018 (modify-phases %standard-phases
5019 (replace 'check
5020 (lambda _
5021 (setenv "HOME" "/tmp")
5022 (invoke "pytest" "-v")
5023 #t)))))
5024 (propagated-inputs
5025 `(("python-ipython" ,python-ipython)
5026 ;; imported at runtime during connect
5027 ("python-jupyter-client" ,python-jupyter-client)))
5028 (native-inputs
5029 `(("python-pytest" ,python-pytest)
5030 ("python-nose" ,python-nose)))
5031 (home-page "https://ipython.org")
5032 (synopsis "IPython Kernel for Jupyter")
5033 (description
5034 "This package provides the IPython kernel for Jupyter.")
5035 (license license:bsd-3)))
5036
5037 (define-public python2-ipykernel
5038 (package-with-python2 python-ipykernel))
5039
5040 (define-public python-pari-jupyter
5041 (package
5042 (name "python-pari-jupyter")
5043 (version "1.3.2")
5044 (source
5045 (origin
5046 (method url-fetch)
5047 (uri (pypi-uri "pari_jupyter" version))
5048 (sha256
5049 (base32
5050 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
5051 (build-system python-build-system)
5052 (propagated-inputs
5053 `(("python-ipykernel" ,python-ipykernel)))
5054 (inputs
5055 `(("pari-gp" ,pari-gp)
5056 ("readline" ,readline)))
5057 (arguments
5058 `(#:tests? #f)) ; no test suite
5059 (home-page
5060 "https://github.com/jdemeyer/pari_jupyter")
5061 (synopsis "A Jupyter kernel for PARI/GP")
5062 (description "The package provides a PARI/GP kernel for Jupyter.")
5063 (license license:gpl3+)))
5064
5065 ;; This is the latest release of the LTS version of ipython with support for
5066 ;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
5067 ;; dropped support for Python 2.7. We may want to rename this package.
5068 (define-public python-ipython
5069 (package
5070 (name "python-ipython")
5071 (version "5.8.0")
5072 (source
5073 (origin
5074 (method url-fetch)
5075 (uri (pypi-uri "ipython" version ".tar.gz"))
5076 (sha256
5077 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
5078 (build-system python-build-system)
5079 (outputs '("out" "doc"))
5080 (propagated-inputs
5081 `(("python-pyzmq" ,python-pyzmq)
5082 ("python-prompt-toolkit" ,python-prompt-toolkit-1)
5083 ("python-terminado" ,python-terminado)
5084 ("python-matplotlib" ,python-matplotlib)
5085 ("python-numpy" ,python-numpy)
5086 ("python-numpydoc" ,python-numpydoc)
5087 ("python-jinja2" ,python-jinja2)
5088 ("python-mistune" ,python-mistune)
5089 ("python-pexpect" ,python-pexpect)
5090 ("python-pickleshare" ,python-pickleshare)
5091 ("python-simplegeneric" ,python-simplegeneric)
5092 ("python-jsonschema" ,python-jsonschema)
5093 ("python-traitlets" ,python-traitlets)
5094 ("python-nbformat" ,python-nbformat)
5095 ("python-pygments" ,python-pygments)))
5096 (inputs
5097 `(("readline" ,readline)
5098 ("which" ,which)))
5099 (native-inputs
5100 `(("graphviz" ,graphviz)
5101 ("pkg-config" ,pkg-config)
5102 ("python-requests" ,python-requests) ;; for tests
5103 ("python-testpath" ,python-testpath)
5104 ("python-nose" ,python-nose)
5105 ("python-sphinx" ,python-sphinx)
5106 ("python-shpinx-rtd-theme" ,python-sphinx-rtd-theme)
5107 ;; FIXME: It's possible that a smaller union would work just as well.
5108 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
5109 texlive-fonts-ec
5110 texlive-generic-ifxetex
5111 texlive-generic-pdftex
5112 texlive-latex-amsfonts
5113 texlive-latex-capt-of
5114 texlive-latex-cmap
5115 texlive-latex-environ
5116 texlive-latex-eqparbox
5117 texlive-latex-etoolbox
5118 texlive-latex-expdlist
5119 texlive-latex-fancyhdr
5120 texlive-latex-fancyvrb
5121 texlive-latex-fncychap
5122 texlive-latex-float
5123 texlive-latex-framed
5124 texlive-latex-geometry
5125 texlive-latex-graphics
5126 texlive-latex-hyperref
5127 texlive-latex-mdwtools
5128 texlive-latex-multirow
5129 texlive-latex-oberdiek
5130 texlive-latex-parskip
5131 texlive-latex-preview
5132 texlive-latex-tabulary
5133 texlive-latex-threeparttable
5134 texlive-latex-titlesec
5135 texlive-latex-trimspaces
5136 texlive-latex-ucs
5137 texlive-latex-upquote
5138 texlive-latex-url
5139 texlive-latex-varwidth
5140 texlive-latex-wrapfig)))
5141 ("texinfo" ,texinfo)))
5142 (arguments
5143 `(#:phases
5144 (modify-phases %standard-phases
5145 (add-after 'install 'install-doc
5146 (lambda* (#:key inputs outputs #:allow-other-keys)
5147 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5148 (doc (string-append data "/doc/" ,name "-" ,version))
5149 (html (string-append doc "/html"))
5150 (man1 (string-append data "/man/man1"))
5151 (info (string-append data "/info"))
5152 (examples (string-append doc "/examples"))
5153 (python-arg (string-append "PYTHON=" (which "python"))))
5154 (setenv "LANG" "en_US.utf8")
5155 ;; Make installed package available for running the tests
5156 (add-installed-pythonpath inputs outputs)
5157 (with-directory-excursion "docs"
5158 ;; FIXME: pdf fails to build
5159 ;;(system* "make" "pdf" "PAPER=a4")
5160 (system* "make" python-arg "html")
5161 (system* "make" python-arg "info"))
5162 (copy-recursively "docs/man" man1)
5163 (copy-recursively "examples" examples)
5164 (copy-recursively "docs/build/html" html)
5165 ;; (copy-file "docs/build/latex/ipython.pdf"
5166 ;; (string-append doc "/ipython.pdf"))
5167 (mkdir-p info)
5168 (copy-file "docs/build/texinfo/ipython.info"
5169 (string-append info "/ipython.info"))
5170 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
5171 #t))
5172 ;; Tests can only be run after the library has been installed and not
5173 ;; within the source directory.
5174 (delete 'check)
5175 (add-after 'install 'check
5176 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5177 (if tests?
5178 (begin
5179 ;; Make installed package available for running the tests
5180 (add-installed-pythonpath inputs outputs)
5181 (setenv "HOME" "/tmp/") ;; required by a test
5182 ;; We only test the core because one of the other tests
5183 ;; tries to import ipykernel.
5184 (invoke "python" "IPython/testing/iptest.py"
5185 "-v" "IPython/core/tests"))
5186 #t)))
5187 (add-before 'check 'fix-tests
5188 (lambda* (#:key inputs #:allow-other-keys)
5189 (substitute* "./IPython/utils/_process_posix.py"
5190 (("/usr/bin/env', 'which") (which "which")))
5191 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5192 (("#!/usr/bin/env python")
5193 (string-append "#!" (which "python"))))
5194 ;; Disable 1 failing test
5195 (substitute* "./IPython/core/tests/test_magic.py"
5196 (("def test_dirops\\(\\):" all)
5197 (string-append "@dec.skipif(True)\n" all)))
5198 ;; This test introduces a circular dependency on ipykernel
5199 ;; (which depends on ipython).
5200 (delete-file "IPython/core/tests/test_display.py")
5201 ;; These tests throw errors for unknown reasons.
5202 (delete-file "IPython/extensions/tests/test_storemagic.py")
5203 (delete-file "IPython/core/tests/test_displayhook.py")
5204 (delete-file "IPython/core/tests/test_interactiveshell.py")
5205 (delete-file "IPython/core/tests/test_pylabtools.py")
5206 (delete-file "IPython/core/tests/test_paths.py")
5207 #t)))))
5208 (home-page "https://ipython.org")
5209 (synopsis "IPython is a tool for interactive computing in Python")
5210 (description
5211 "IPython provides a rich architecture for interactive computing with:
5212 Powerful interactive shells, a browser-based notebook, support for interactive
5213 data visualization, embeddable interpreters and tools for parallel
5214 computing.")
5215 (license license:bsd-3)
5216 (properties `((python2-variant . ,(delay python2-ipython))))))
5217
5218 (define-public python2-ipython
5219 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
5220 (package
5221 (inherit ipython)
5222 ;; FIXME: add pyreadline once available.
5223 (propagated-inputs
5224 `(("python2-backports-shutil-get-terminal-size"
5225 ,python2-backports-shutil-get-terminal-size)
5226 ("python2-pathlib2" ,python2-pathlib2)
5227 ,@(package-propagated-inputs ipython)))
5228 (native-inputs
5229 `(("python2-mock" ,python2-mock)
5230 ,@(package-native-inputs ipython))))))
5231
5232 (define-public python-urwid
5233 (package
5234 (name "python-urwid")
5235 (version "2.0.1")
5236 (source
5237 (origin
5238 (method url-fetch)
5239 (uri (pypi-uri "urwid" version))
5240 (sha256
5241 (base32
5242 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
5243 (build-system python-build-system)
5244 (home-page "http://urwid.org")
5245 (synopsis "Console user interface library for Python")
5246 (description
5247 "Urwid is a curses-based UI/widget library for Python. It includes many
5248 features useful for text console applications.")
5249 (license license:lgpl2.1+)))
5250
5251 (define-public python2-urwid
5252 (package-with-python2 python-urwid))
5253
5254 (define-public python-urwidtrees
5255 (package
5256 (name "python-urwidtrees")
5257 (version "1.0.2")
5258 (source
5259 (origin
5260 (method url-fetch)
5261 ;; package author intends on distributing via github rather than pypi:
5262 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5263 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5264 version ".tar.gz"))
5265 (file-name (string-append name "-" version ".tar.gz"))
5266 (sha256
5267 (base32
5268 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
5269 (build-system python-build-system)
5270 (arguments
5271 '(#:tests? #f)) ; no tests
5272 (propagated-inputs `(("python-urwid" ,python-urwid)))
5273 (home-page "https://github.com/pazz/urwidtrees")
5274 (synopsis "Tree widgets for urwid")
5275 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5276 toolkit. Use it to build trees of widgets.")
5277 (license license:gpl3+)))
5278
5279 (define-public python2-urwidtrees
5280 (package-with-python2 python-urwidtrees))
5281
5282 (define-public python-ua-parser
5283 (package
5284 (name "python-ua-parser")
5285 (version "0.8.0")
5286 (source
5287 (origin
5288 (method url-fetch)
5289 (uri (pypi-uri "ua-parser" version))
5290 (sha256
5291 (base32
5292 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
5293 (build-system python-build-system)
5294 (arguments
5295 `(#:tests? #f)) ;no test suite in release
5296 (native-inputs
5297 `(("python-pyyaml" ,python-pyyaml)))
5298 (home-page "https://github.com/ua-parser/uap-python")
5299 (synopsis "User agent parser")
5300 (description
5301 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
5302 (license license:asl2.0)))
5303
5304 (define-public python2-ua-parser
5305 (package-with-python2 python-ua-parser))
5306
5307 (define-public python-user-agents
5308 (package
5309 (name "python-user-agents")
5310 (version "1.1.0")
5311 (source
5312 (origin
5313 (method url-fetch)
5314 (uri (pypi-uri "user-agents" version))
5315 (sha256
5316 (base32
5317 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
5318 (build-system python-build-system)
5319 (arguments
5320 `(#:tests? #f)) ;missing devices.json test file in release
5321 (propagated-inputs
5322 `(("python-ua-parser" ,python-ua-parser)))
5323 (home-page "https://github.com/selwin/python-user-agents")
5324 (synopsis "User Agent strings parsing library")
5325 (description
5326 "A library to identify devices (phones, tablets) and their capabilities by
5327 parsing (browser/HTTP) user agent strings.")
5328 (license license:expat)))
5329
5330 (define-public python2-user-agents
5331 (package-with-python2 python-user-agents))
5332
5333 (define-public python-dbus
5334 (package
5335 (name "python-dbus")
5336 (version "1.2.8")
5337 (source
5338 (origin
5339 (method url-fetch)
5340 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
5341 "dbus-python-" version ".tar.gz"))
5342 (sha256
5343 (base32
5344 "0vvvjmiwnc9cjlks3gcdk43ap7llhlpz7cm1wbw0nc2yfsxjpwdb"))))
5345 (build-system gnu-build-system)
5346 (arguments
5347 '(#:phases
5348 (modify-phases %standard-phases
5349 (add-before
5350 'check 'pre-check
5351 (lambda _
5352 ;; XXX: For the missing '/etc/machine-id'.
5353 (substitute* "test/run-test.sh"
5354 (("DBUS_FATAL_WARNINGS=1")
5355 "DBUS_FATAL_WARNINGS=0"))
5356 #t)))))
5357 (native-inputs
5358 `(("pkg-config" ,pkg-config)))
5359 (inputs
5360 `(("python" ,python-wrapper)
5361 ("dbus-glib" ,dbus-glib)))
5362 (synopsis "Python bindings for D-bus")
5363 (description "python-dbus provides bindings for libdbus, the reference
5364 implementation of D-Bus.")
5365 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
5366 (license license:expat)))
5367
5368 (define-public python2-dbus
5369 (package (inherit python-dbus)
5370 (name "python2-dbus")
5371 (inputs `(("python" ,python-2)
5372 ,@(alist-delete "python"
5373 (package-inputs python-dbus)
5374 equal?)))
5375 ;; FIXME: on Python 2, the test_utf8 fails with:
5376 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5377 (arguments `(#:tests? #f))))
5378
5379 (define-public python-lxml
5380 (package
5381 (name "python-lxml")
5382 (version "4.2.5")
5383 (source
5384 (origin
5385 (method url-fetch)
5386 (uri (pypi-uri "lxml" version))
5387 (sha256
5388 (base32
5389 "0zw0y9hs0nflxhl9cs6ipwwh53szi3w2x06wl0k9cylyqac0cwin"))))
5390 (build-system python-build-system)
5391 (inputs
5392 `(("libxml2" ,libxml2)
5393 ("libxslt" ,libxslt)))
5394 (home-page "http://lxml.de/")
5395 (synopsis
5396 "Python XML processing library")
5397 (description
5398 "The lxml XML toolkit is a Pythonic binding for the C libraries
5399 libxml2 and libxslt.")
5400 (license license:bsd-3))) ; and a few more, see LICENSES.txt
5401
5402 (define-public python2-lxml
5403 (package-with-python2 python-lxml))
5404
5405 ;; beautifulsoup4 has a totally different namespace than 3.x,
5406 ;; and pypi seems to put it under its own name, so I guess we should too
5407 (define-public python-beautifulsoup4
5408 (package
5409 (name "python-beautifulsoup4")
5410 (version "4.7.1")
5411 (source
5412 (origin
5413 (method url-fetch)
5414 (uri (pypi-uri "beautifulsoup4" version))
5415 (sha256
5416 (base32
5417 "0j2kycz2dxgx68xzjm7rxg5xn6v61gq5ifvxyg99slmqkybnal4l"))))
5418 (build-system python-build-system)
5419 (arguments
5420 `(#:phases
5421 (modify-phases %standard-phases
5422 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5423 ;; must use this conversion script when building with Python 3. The
5424 ;; conversion script also runs the tests.
5425 ;; For more information, see the file 'convert-py3k' in the source
5426 ;; distribution.
5427 (replace 'check
5428 (lambda _ (invoke "./convert-py3k"))))))
5429 (propagated-inputs
5430 `(("python-soupsieve" ,python-soupsieve)))
5431 (home-page
5432 "https://www.crummy.com/software/BeautifulSoup/bs4/")
5433 (synopsis
5434 "Python screen-scraping library")
5435 (description
5436 "Beautiful Soup is a Python library designed for rapidly setting up
5437 screen-scraping projects. It offers Pythonic idioms for navigating,
5438 searching, and modifying a parse tree, providing a toolkit for
5439 dissecting a document and extracting what you need. It automatically
5440 converts incoming documents to Unicode and outgoing documents to UTF-8.")
5441 (license license:expat)
5442 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5443
5444 (define-public python2-beautifulsoup4
5445 (package
5446 (inherit (package-with-python2
5447 (strip-python2-variant python-beautifulsoup4)))
5448 (arguments `(#:python ,python-2))))
5449
5450 (define-public python-soupsieve
5451 (package
5452 (name "python-soupsieve")
5453 (version "1.9.1")
5454 (source
5455 (origin
5456 (method url-fetch)
5457 (uri (pypi-uri "soupsieve" version))
5458 (sha256
5459 (base32
5460 "1jnzkiwmjl6yvqckc9mf689g87b6yz07sv868hap2aa5arggy3mj"))))
5461 (build-system python-build-system)
5462 (arguments `(#:tests? #f))
5463 ;;XXX: 2 tests fail currently despite claming they were to be
5464 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
5465 ;;don't want to create a circular dependency.
5466 (home-page "https://github.com/facelessuser/soupsieve")
5467 (synopsis "CSS selector library")
5468 (description
5469 "Soup Sieve is a CSS selector library designed to be used with Beautiful
5470 Soup 4. It aims to provide selecting, matching, and filtering using modern
5471 CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
5472 specifications up through the latest CSS level 4 drafts and beyond (though
5473 some are not yet implemented).")
5474 (properties `((python2-variant . ,(delay python2-soupsieve))))
5475 (license license:expat)))
5476
5477 (define-public python2-soupsieve
5478 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
5479 (package
5480 (inherit base)
5481 (propagated-inputs
5482 `(("python2-backports-functools-lru-cache"
5483 ,python2-backports-functools-lru-cache)
5484 ,@(package-propagated-inputs base))))))
5485
5486 (define-public python-netifaces
5487 (package
5488 (name "python-netifaces")
5489 (version "0.10.7")
5490 (source
5491 (origin
5492 (method url-fetch)
5493 (uri (pypi-uri "netifaces" version))
5494 (sha256
5495 (base32
5496 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
5497 (build-system python-build-system)
5498 (home-page "https://github.com/al45tair/netifaces")
5499 (synopsis
5500 "Python module for portable network interface information")
5501 (description
5502 "Netifaces is a Python module providing information on network
5503 interfaces in an easy and portable manner.")
5504 (license license:expat)))
5505
5506 (define-public python2-netifaces
5507 (package-with-python2 python-netifaces))
5508
5509 (define-public python-networkx
5510 (package
5511 (name "python-networkx")
5512 (version "2.2")
5513 (source
5514 (origin
5515 (method url-fetch)
5516 (uri (pypi-uri "networkx" version ".zip"))
5517 (sha256
5518 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
5519 (build-system python-build-system)
5520 ;; python-decorator is needed at runtime.
5521 (propagated-inputs
5522 `(("python-decorator" ,python-decorator)))
5523 (native-inputs
5524 `(("python-nose" ,python-nose)
5525 ("unzip" ,unzip)))
5526 (home-page "https://networkx.github.io/")
5527 (synopsis "Python module for creating and manipulating graphs and networks")
5528 (description
5529 "NetworkX is a Python package for the creation, manipulation, and study
5530 of the structure, dynamics, and functions of complex networks.")
5531 (license license:bsd-3)))
5532
5533 (define-public python2-networkx
5534 (package-with-python2 python-networkx))
5535
5536 (define-public python-datrie
5537 (package
5538 (name "python-datrie")
5539 (version "0.7.1")
5540 (source
5541 (origin
5542 (method url-fetch)
5543 (uri (pypi-uri "datrie" version))
5544 (sha256
5545 (base32
5546 "08r0if7dry2q7p34gf7ffyrlnf4bdvnprxgydlfxgfnvq8f3f4bs"))))
5547 (build-system python-build-system)
5548 (arguments
5549 `(#:phases (modify-phases %standard-phases
5550 (add-before 'build 'cythonize
5551 (lambda _
5552 ;; Regenerate Cython classes to solve ABI issues with Python
5553 ;; 3.7.0. See <https://github.com/pytries/datrie/issues/52>.
5554 (invoke "cython" "src/datrie.pyx" "src/cdatrie.pxd"
5555 "src/stdio_ext.pxd" "-a"))))))
5556 (native-inputs
5557 `(("python-cython" ,python-cython)
5558 ("python-hypothesis" ,python-hypothesis)
5559 ("python-pytest" ,python-pytest)
5560 ("python-pytest-runner" ,python-pytest-runner)))
5561 (home-page "https://github.com/kmike/datrie")
5562 (synopsis "Fast, efficiently stored trie for Python")
5563 (description
5564 "This package provides a fast, efficiently stored trie implementation for
5565 Python.")
5566 (license license:lgpl2.1+)))
5567
5568 (define-public snakemake
5569 (package
5570 (name "snakemake")
5571 (version "5.2.4")
5572 (source
5573 (origin
5574 (method url-fetch)
5575 (uri (pypi-uri "snakemake" version))
5576 (sha256
5577 (base32 "0gj0xxgiq3mp9qyyrbfzldiaq1giliqw0in64nqiz7vx49myqj7z"))))
5578 (build-system python-build-system)
5579 (arguments
5580 ;; TODO: Package missing test dependencies.
5581 '(#:tests? #f
5582 #:phases
5583 (modify-phases %standard-phases
5584 ;; For cluster execution Snakemake will call Python. Since there is
5585 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
5586 ;; this by calling the snakemake wrapper instead.
5587 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
5588 (lambda* (#:key outputs #:allow-other-keys)
5589 (substitute* "snakemake/executors.py"
5590 (("\\{sys.executable\\} -m snakemake")
5591 (string-append (assoc-ref outputs "out")
5592 "/bin/snakemake")))
5593 #t)))))
5594 (propagated-inputs
5595 `(("python-gitpython" ,python-gitpython)
5596 ("python-wrapt" ,python-wrapt)
5597 ("python-requests" ,python-requests)
5598 ("python-appdirs" ,python-appdirs)
5599 ("python-configargparse" ,python-configargparse)
5600 ("python-datrie" ,python-datrie)
5601 ("python-docutils" ,python-docutils)
5602 ("python-jinja2" ,python-jinja2)
5603 ("python-jsonschema" ,python-jsonschema)
5604 ("python-networkx" ,python-networkx)
5605 ("python-pyyaml" ,python-pyyaml)
5606 ("python-ratelimiter" ,python-ratelimiter)))
5607 (home-page "https://snakemake.readthedocs.io")
5608 (synopsis "Python-based execution environment for make-like workflows")
5609 (description
5610 "Snakemake aims to reduce the complexity of creating workflows by
5611 providing a clean and modern domain specific specification language (DSL) in
5612 Python style, together with a fast and comfortable execution environment.")
5613 (license license:expat)))
5614
5615 ;; This is currently needed for the pigx-* packages.
5616 (define-public snakemake-4
5617 (package (inherit snakemake)
5618 (version "4.4.0")
5619 (source
5620 (origin
5621 (method url-fetch)
5622 (uri (pypi-uri "snakemake" version))
5623 (sha256
5624 (base32 "0g0paia4z7w3srnqdmavq3hrb2x7qnpf81jx50njl0p7y4y0j8jv"))))
5625 (propagated-inputs
5626 `(("python-wrapt" ,python-wrapt)
5627 ("python-requests" ,python-requests)
5628 ("python-appdirs" ,python-appdirs)
5629 ("python-configargparse" ,python-configargparse)
5630 ("python-pyyaml" ,python-pyyaml)
5631 ("python-ratelimiter" ,python-ratelimiter)))))
5632
5633 (define-public python-pyqrcode
5634 (package
5635 (name "python-pyqrcode")
5636 (version "1.2.1")
5637 (source
5638 (origin
5639 (method url-fetch)
5640 (uri (pypi-uri "PyQRCode" version))
5641 (sha256
5642 (base32
5643 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
5644 (build-system python-build-system)
5645 (home-page
5646 "https://github.com/mnooner256/pyqrcode")
5647 (synopsis "QR code generator")
5648 (description
5649 "Pyqrcode is a QR code generator written purely in Python with
5650 SVG, EPS, PNG and terminal output.")
5651 (license license:bsd-3)))
5652
5653 (define-public python-seaborn
5654 (package
5655 (name "python-seaborn")
5656 (version "0.9.0")
5657 (source
5658 (origin
5659 (method url-fetch)
5660 (uri (pypi-uri "seaborn" version))
5661 (sha256
5662 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))))
5663 (build-system python-build-system)
5664 (arguments
5665 `(#:phases
5666 (modify-phases %standard-phases
5667 (add-before 'check 'start-xserver
5668 (lambda* (#:key inputs #:allow-other-keys)
5669 (let ((xorg-server (assoc-ref inputs "xorg-server")))
5670 ;; There must be a running X server and make check doesn't
5671 ;; start one. Therefore we must do it.
5672 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
5673 (setenv "DISPLAY" ":1")
5674 #t)))
5675 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
5676 (propagated-inputs
5677 `(("python-pandas" ,python-pandas)
5678 ("python-matplotlib" ,python-matplotlib)
5679 ("python-numpy" ,python-numpy)
5680 ("python-scipy" ,python-scipy)))
5681 (native-inputs
5682 `(("python-pytest" ,python-pytest)
5683 ("xorg-server" ,xorg-server)))
5684 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5685 (synopsis "Statistical data visualization")
5686 (description
5687 "Seaborn is a library for making attractive and informative statistical
5688 graphics in Python. It is built on top of matplotlib and tightly integrated
5689 with the PyData stack, including support for numpy and pandas data structures
5690 and statistical routines from scipy and statsmodels.")
5691 (license license:bsd-3)))
5692
5693 (define-public python2-seaborn
5694 (package-with-python2 python-seaborn))
5695
5696 (define-public python-mpmath
5697 (package
5698 (name "python-mpmath")
5699 (version "0.19")
5700 (source (origin
5701 (method url-fetch)
5702 (uri (string-append "http://mpmath.org/files/mpmath-"
5703 version ".tar.gz"))
5704 (sha256
5705 (base32
5706 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
5707 (build-system python-build-system)
5708 (arguments
5709 '(#:phases
5710 (modify-phases %standard-phases
5711 (replace 'check
5712 (lambda _
5713 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
5714 (home-page "http://mpmath.org")
5715 (synopsis "Arbitrary-precision floating-point arithmetic in python")
5716 (description
5717 "@code{mpmath} can be used as an arbitrary-precision substitute for
5718 Python's float/complex types and math/cmath modules, but also does much
5719 more advanced mathematics.")
5720 (license license:bsd-3)))
5721
5722 (define-public python2-mpmath
5723 (package-with-python2 python-mpmath))
5724
5725 (define-public python-bigfloat
5726 (package
5727 (name "python-bigfloat")
5728 (version "0.3.0")
5729 (source
5730 (origin
5731 (method url-fetch)
5732 (uri (pypi-uri "bigfloat" version))
5733 (sha256
5734 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
5735 (build-system python-build-system)
5736 (inputs
5737 `(("mpfr" ,mpfr)))
5738 (home-page "https://github.com/mdickinson/bigfloat")
5739 (synopsis "Arbitrary precision floating-point arithmetic for Python")
5740 (description
5741 "This package provides a Python interface to the MPFR library for
5742 multiprecision arithmetic.")
5743 (license license:lgpl3+)))
5744
5745 (define-public python2-bigfloat
5746 (package-with-python2 python-bigfloat))
5747
5748 (define-public python-sympy
5749 (package
5750 (name "python-sympy")
5751 (version "1.1.1")
5752 (source
5753 (origin
5754 (method url-fetch)
5755 (uri (string-append
5756 "https://github.com/sympy/sympy/releases/download/sympy-"
5757 version "/sympy-" version ".tar.gz"))
5758 (sha256
5759 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
5760 (build-system python-build-system)
5761 (arguments
5762 `(#:phases
5763 (modify-phases %standard-phases
5764 ;; Run the core tests after installation. By default it would run
5765 ;; *all* tests, which take a very long time to complete and are known
5766 ;; to be flaky.
5767 (delete 'check)
5768 (add-after 'install 'check
5769 (lambda* (#:key outputs #:allow-other-keys)
5770 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
5771 #t)))))
5772 (propagated-inputs
5773 `(("python-mpmath" ,python-mpmath)))
5774 (home-page "http://www.sympy.org/")
5775 (synopsis "Python library for symbolic mathematics")
5776 (description
5777 "SymPy is a Python library for symbolic mathematics. It aims to become a
5778 full-featured computer algebra system (CAS) while keeping the code as simple
5779 as possible in order to be comprehensible and easily extensible.")
5780 (license license:bsd-3)))
5781
5782 (define-public python2-sympy
5783 (package
5784 (inherit (package-with-python2 python-sympy))
5785 (arguments
5786 `(#:phases
5787 (modify-phases %standard-phases
5788 ;; Run the core tests after installation. By default it would run
5789 ;; *all* tests, which take a very long time to complete and are known
5790 ;; to be flaky.
5791 (delete 'check)
5792 (add-after 'install 'check
5793 (lambda* (#:key outputs #:allow-other-keys)
5794 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
5795 #t)))))))
5796
5797 (define-public python-q
5798 (package
5799 (name "python-q")
5800 (version "2.6")
5801 (source
5802 (origin
5803 (method url-fetch)
5804 (uri (pypi-uri "q" version))
5805 (sha256
5806 (base32
5807 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
5808 (build-system python-build-system)
5809 (home-page "https://github.com/zestyping/q")
5810 (synopsis "Quick-and-dirty debugging output for tired programmers")
5811 (description
5812 "q is a Python module for \"print\" style of debugging Python code. It
5813 provides convenient short API for print out of values, tracebacks, and
5814 falling into the Python interpreter.")
5815 (license license:asl2.0)))
5816
5817 (define-public python2-q
5818 (package-with-python2 python-q))
5819
5820 (define-public python2-xlib
5821 (package
5822 (name "python2-xlib")
5823 (version "0.14")
5824 (source (origin
5825 (method url-fetch)
5826 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
5827 "/" version "/"
5828 "python-xlib-" version ".tar.gz"))
5829 (sha256
5830 (base32
5831 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
5832 (build-system python-build-system)
5833 (arguments
5834 `(#:python ,python-2 ;Python 2 only
5835 #:tests? #f)) ;no tests
5836 (home-page "http://python-xlib.sourceforge.net/")
5837 (synopsis "Python X11 client library")
5838 (description
5839 "The Python X Library is intended to be a fully functional X client
5840 library for Python programs. It is useful to implement low-level X clients.
5841 It is written entirely in Python.")
5842 (license license:gpl2+)))
5843
5844 (define-public python-singledispatch
5845 (package
5846 (name "python-singledispatch")
5847 (version "3.4.0.3")
5848 (source
5849 (origin
5850 (method url-fetch)
5851 (uri (pypi-uri "singledispatch" version))
5852 (sha256
5853 (base32
5854 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
5855 (build-system python-build-system)
5856 (native-inputs
5857 `(("python-six" ,python-six))) ; required for conversion, not at run-time
5858 (home-page
5859 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
5860 (synopsis "Backport of singledispatch feature from Python 3.4")
5861 (description
5862 "This library brings functools.singledispatch from Python 3.4 to Python
5863 2.6-3.3.")
5864 (license license:expat)))
5865
5866 (define-public python2-singledispatch
5867 (package-with-python2 python-singledispatch))
5868
5869 ;; the python- version can be removed with python-3.5
5870 (define-public python-backports-abc
5871 (package
5872 (name "python-backports-abc")
5873 (version "0.5")
5874 (source
5875 (origin
5876 (method url-fetch)
5877 (uri (pypi-uri "backports_abc" version))
5878 (sha256
5879 (base32
5880 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
5881 (build-system python-build-system)
5882 (home-page "https://github.com/cython/backports_abc")
5883 (synopsis "Backport of additions to the 'collections.abc' module")
5884 (description
5885 "Python-backports-abc provides a backport of additions to the
5886 @code{collections.abc} module in Python-3.5.")
5887 (license license:psfl)))
5888
5889 (define-public python2-backports-abc
5890 (package-with-python2 python-backports-abc))
5891
5892 (define-public python-backports-csv
5893 (package
5894 (name "python-backports-csv")
5895 (version "1.0.5")
5896 (source
5897 (origin
5898 (method url-fetch)
5899 (uri (pypi-uri "backports.csv" version))
5900 (sha256
5901 (base32
5902 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
5903 (build-system python-build-system)
5904 (home-page "https://github.com/ryanhiebert/backports.csv")
5905 (synopsis "Backport of Python 3's csv module for Python 2")
5906 (description
5907 "Provides a backport of Python 3's @code{csv} module for parsing
5908 comma separated values. The API of the @code{csv} module in Python 2
5909 is drastically different from the @code{csv} module in Python 3.
5910 This is due, for the most part, to the difference between str in
5911 Python 2 and Python 3.")
5912 (license license:psfl)))
5913
5914 (define-public python2-backports-csv
5915 (package-with-python2 python-backports-csv))
5916
5917 (define-public python2-backports-shutil-get-terminal-size
5918 (package
5919 (name "python2-backports-shutil-get-terminal-size")
5920 (version "1.0.0")
5921 (source
5922 (origin
5923 (method url-fetch)
5924 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
5925 (sha256
5926 (base32
5927 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
5928 (build-system python-build-system)
5929 (arguments
5930 `(#:python ,python-2
5931 #:phases
5932 (modify-phases %standard-phases
5933 (replace 'check
5934 (lambda _
5935 (invoke "py.test" "-v"))))))
5936 (native-inputs
5937 `(("python2-pytest" ,python2-pytest)))
5938 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
5939 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
5940 (description
5941 "This package provides a backport of the @code{get_terminal_size
5942 function} from Python 3.3's @code{shutil}.
5943 Unlike the original version it is written in pure Python rather than C,
5944 so it might be a tiny bit slower.")
5945 (license license:expat)))
5946
5947 (define-public python-waf
5948 (package
5949 (name "python-waf")
5950 (version "2.0.11")
5951 (source (origin
5952 (method url-fetch)
5953 (uri (string-append "https://waf.io/"
5954 "waf-" version ".tar.bz2"))
5955 (sha256
5956 (base32
5957 "13zrniwkmfqgsgzi9v5m1367fppp9yzrz6z2ny6hy8dmpb8mj4z4"))))
5958 (build-system python-build-system)
5959 (arguments
5960 '(#:phases
5961 (modify-phases %standard-phases
5962 (replace 'build
5963 (lambda _
5964 (invoke "python" "waf-light" "configure" "build")))
5965 (replace 'check
5966 (lambda _
5967 (invoke "python" "waf" "--version")))
5968 (replace 'install
5969 (lambda* (#:key outputs #:allow-other-keys)
5970 (let ((out (assoc-ref outputs "out")))
5971 (install-file "waf" (string-append out "/bin")))
5972 #t))
5973 ;; waf breaks when it is wrapped.
5974 (delete 'wrap))))
5975 (home-page "https://waf.io/")
5976 (synopsis "Python-based build system")
5977 (description
5978 "Waf is a Python-based framework for configuring, compiling and installing
5979 applications.")
5980 (license license:bsd-3)))
5981
5982 (define-public python2-waf
5983 (package-with-python2 python-waf))
5984
5985 (define-public python-pyzmq
5986 (package
5987 (name "python-pyzmq")
5988 (version "17.1.2")
5989 (source
5990 (origin
5991 (method url-fetch)
5992 (uri (pypi-uri "pyzmq" version))
5993 (sha256
5994 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
5995 (build-system python-build-system)
5996 (arguments
5997 `(#:configure-flags
5998 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
5999 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6000 ;; --inplace' for 'python setup.py test' to work.
6001 #:tests? #f))
6002 (inputs
6003 `(("zeromq" ,zeromq)))
6004 (native-inputs
6005 `(("pkg-config" ,pkg-config)
6006 ("python-nose" ,python-nose)))
6007 (home-page "https://github.com/zeromq/pyzmq")
6008 (synopsis "Python bindings for 0MQ")
6009 (description
6010 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
6011 (license license:bsd-4)))
6012
6013 (define-public python2-pyzmq
6014 (package-with-python2 python-pyzmq))
6015
6016 (define-public python-pep8
6017 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
6018 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
6019 ;; some dependents' test suites, and nothing more.
6020 (package
6021 (name "python-pep8")
6022 (version "1.7.0")
6023 (source
6024 (origin
6025 (method url-fetch)
6026 (uri (pypi-uri "pep8" version))
6027 (sha256
6028 (base32
6029 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
6030 (build-system python-build-system)
6031 (home-page "https://pep8.readthedocs.org/")
6032 (synopsis "Python style guide checker")
6033 (description
6034 "This tools checks Python code against some of the style conventions in
6035 PEP 8.")
6036 (license license:expat)))
6037
6038 (define-public python2-pep8
6039 (package-with-python2 python-pep8))
6040
6041 (define-public python-pyflakes
6042 (package
6043 (name "python-pyflakes")
6044 (version "2.0.0")
6045 (source
6046 (origin
6047 (method url-fetch)
6048 (uri (pypi-uri "pyflakes" version))
6049 (sha256
6050 (base32
6051 "0jba28czyvimdc72llms3f17swp3i8jdcabf5w0j00adfbn64xls"))))
6052 (build-system python-build-system)
6053 (home-page
6054 "https://github.com/pyflakes/pyflakes")
6055 (synopsis "Passive checker of Python programs")
6056 (description
6057 "Pyflakes statically checks Python source code for common errors.")
6058 (license license:expat)))
6059
6060 (define-public python2-pyflakes
6061 (package-with-python2 python-pyflakes))
6062
6063 (define-public python-mccabe
6064 (package
6065 (name "python-mccabe")
6066 (version "0.6.1")
6067 (source
6068 (origin
6069 (method url-fetch)
6070 (uri (pypi-uri "mccabe" version))
6071 (sha256
6072 (base32
6073 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
6074 (build-system python-build-system)
6075 (native-inputs
6076 `(("python-pytest" ,python-pytest-bootstrap)
6077 ("python-pytest-runner" ,python-pytest-runner)))
6078 (home-page "https://github.com/flintwork/mccabe")
6079 (synopsis "McCabe checker, plugin for flake8")
6080 (description
6081 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6082 complexity of Python source code.")
6083 (license license:expat)))
6084
6085 (define-public python2-mccabe
6086 (package-with-python2 python-mccabe))
6087
6088 (define-public python-mccabe-0.2.1
6089 (package (inherit python-mccabe)
6090 (version "0.2.1")
6091 (source
6092 (origin
6093 (method url-fetch)
6094 (uri (pypi-uri "mccabe" version))
6095 (sha256
6096 (base32
6097 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
6098
6099 (define-public python2-mccabe-0.2.1
6100 (package-with-python2 python-mccabe-0.2.1))
6101
6102 ;; Flake8 2.4.1 requires an older version of pep8.
6103 ;; This should be removed ASAP.
6104 (define-public python-pep8-1.5.7
6105 (package (inherit python-pep8)
6106 (version "1.5.7")
6107 (source
6108 (origin
6109 (method url-fetch)
6110 (uri (pypi-uri "pep8" version))
6111 (sha256
6112 (base32
6113 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
6114 (arguments
6115 ;; XXX Tests not compatible with Python 3.5.
6116 '(#:tests? #f))))
6117
6118 (define-public python2-pep8-1.5.7
6119 (package-with-python2 python-pep8-1.5.7))
6120
6121 ;; Flake8 2.4.1 requires an older version of pyflakes.
6122 ;; This should be removed ASAP.
6123 (define-public python-pyflakes-0.8.1
6124 (package (inherit python-pyflakes)
6125 (version "0.8.1")
6126 (source
6127 (origin
6128 (method url-fetch)
6129 (uri (pypi-uri "pyflakes" version))
6130 (sha256
6131 (base32
6132 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
6133 (arguments
6134 ;; XXX Tests not compatible with Python 3.5.
6135 '(#:tests? #f))))
6136
6137 (define-public python2-pyflakes-0.8.1
6138 (package-with-python2 python-pyflakes-0.8.1))
6139
6140 ;; This package is used by hypothesis which has thousands of dependent packages.
6141 ;; FIXME: Consolidate this with "python-flake8" below in the next rebuild cycle.
6142 (define-public python-flake8-3.5
6143 (package
6144 (name "python-flake8")
6145 (version "3.5.0")
6146 (source
6147 (origin
6148 (method url-fetch)
6149 (uri (pypi-uri "flake8" version))
6150 (sha256
6151 (base32
6152 "184b33grvvjmiwlv9kyd7yng9qv5ld24154j70z332xxg9gjclvj"))))
6153 (build-system python-build-system)
6154 (arguments
6155 `(#:phases
6156 (modify-phases %standard-phases
6157 ;; Two errors don't seem to have assigned codes.
6158 (add-after 'unpack 'delete-broken-test
6159 (lambda _ (delete-file "tests/unit/test_pyflakes_codes.py") #t))
6160 (add-after 'unpack 'fix-problem-with-pycodestyle
6161 (lambda _
6162 ;; See https://gitlab.com/pycqa/flake8/merge_requests/230
6163 ;; This should no longer be needed with the next release.
6164 (substitute* "setup.py"
6165 (("PEP8_PLUGIN\\('break_around_binary_operator'\\),")
6166 "PEP8_PLUGIN('break_after_binary_operator'),\
6167 PEP8_PLUGIN('break_before_binary_operator'),"))
6168 #t))
6169 (delete 'check)
6170 (add-after 'install 'check
6171 (lambda* (#:key inputs outputs #:allow-other-keys)
6172 (add-installed-pythonpath inputs outputs)
6173 (invoke "pytest" "-v")
6174 #t)))))
6175 (propagated-inputs
6176 `(("python-pycodestyle" ,python-pycodestyle)
6177 ("python-pyflakes" ,python-pyflakes)
6178 ("python-mccabe" ,python-mccabe)))
6179 (native-inputs
6180 `(("python-mock" ,python-mock)
6181 ("python-pytest" ,python-pytest-bootstrap)
6182 ("python-pytest-runner" ,python-pytest-runner)))
6183 (home-page "https://gitlab.com/pycqa/flake8")
6184 (synopsis
6185 "The modular source code checker: pep8, pyflakes and co")
6186 (description
6187 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
6188 (properties `((python2-variant . ,(delay python2-flake8-3.5))))
6189 (license license:expat)))
6190
6191 (define-public python2-flake8-3.5
6192 (let ((base (package-with-python2 (strip-python2-variant python-flake8-3.5))))
6193 (package (inherit base)
6194 (propagated-inputs
6195 `(("python2-configparser" ,python2-configparser)
6196 ("python2-enum34" ,python2-enum34)
6197 ,@(package-propagated-inputs base))))))
6198
6199 ;; Version 3.5.0 has compatibility issues with Pyflakes 2.0, so we need
6200 ;; this newer version. Keep it as a separate variable for now to avoid
6201 ;; rebuilding "python-hypothesis"; this should be removed in the next
6202 ;; rebuild cycle.
6203 (define-public python-flake8
6204 (package
6205 (inherit python-flake8-3.5)
6206 (version "3.6.0")
6207 (source (origin
6208 (method url-fetch)
6209 (uri (pypi-uri "flake8" version))
6210 (sha256
6211 (base32
6212 "0w0nprx22rbvrrkbfx9v5jc5gskbm08g219l7r8wai8zfswgadba"))))
6213 (arguments
6214 (substitute-keyword-arguments (package-arguments python-flake8-3.5)
6215 ((#:phases phases)
6216 `(modify-phases ,phases
6217 (delete 'delete-broken-test)
6218 (delete 'fix-problem-with-pycodestyle)))))
6219 (properties `((python2-variant . ,(delay python2-flake8))))))
6220
6221 (define-public python2-flake8
6222 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
6223 (package (inherit base)
6224 (propagated-inputs
6225 (package-propagated-inputs python2-flake8-3.5)))))
6226
6227 ;; python-hacking requires flake8 <2.6.0.
6228 (define-public python-flake8-2.5
6229 (package
6230 (inherit python-flake8)
6231 (version "2.5.5")
6232 (source (origin
6233 (method url-fetch)
6234 (uri (pypi-uri "flake8" version))
6235 (sha256
6236 (base32
6237 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
6238 (propagated-inputs
6239 `(("python-pep8" ,python-pep8)
6240 ,@(package-propagated-inputs python-flake8)))
6241 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
6242
6243 (define-public python2-flake8-2.5
6244 (package
6245 (inherit python2-flake8)
6246 (version (package-version python-flake8-2.5))
6247 (source (origin
6248 (inherit (package-source python-flake8-2.5))))
6249 (propagated-inputs
6250 `(("python2-pep8" ,python2-pep8)
6251 ,@(package-propagated-inputs python2-flake8)))))
6252
6253 (define-public python-flake8-polyfill
6254 (package
6255 (name "python-flake8-polyfill")
6256 (version "1.0.2")
6257 (source
6258 (origin
6259 (method url-fetch)
6260 (uri (pypi-uri "flake8-polyfill" version))
6261 (sha256
6262 (base32
6263 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
6264 (build-system python-build-system)
6265 (arguments
6266 '(#:phases
6267 (modify-phases %standard-phases
6268 (replace 'check
6269 (lambda _
6270 (setenv "PYTHONPATH"
6271 (string-append (getcwd) "/build/lib:"
6272 (getenv "PYTHONPATH")))
6273 (invoke "py.test" "-v"))))))
6274 (native-inputs
6275 `(("python-flake8" ,python-flake8)
6276 ("python-mock" ,python-mock)
6277 ("python-pep8" ,python-pep8)
6278 ("python-pycodestyle" ,python-pycodestyle)
6279 ("python-pytest" ,python-pytest)))
6280 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6281 (synopsis "Polyfill package for Flake8 plugins")
6282 (description
6283 "This package that provides some compatibility helpers for Flake8
6284 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6285 (license license:expat)))
6286
6287 (define-public python2-flake8-polyfill
6288 (package-with-python2 python-flake8-polyfill))
6289
6290 (define-public python-mistune
6291 (package
6292 (name "python-mistune")
6293 (version "0.8.4")
6294 (source
6295 (origin
6296 (method url-fetch)
6297 (uri (pypi-uri "mistune" version))
6298 (sha256
6299 (base32
6300 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
6301 (build-system python-build-system)
6302 (native-inputs
6303 `(("python-nose" ,python-nose)
6304 ("python-cython" ,python-cython)))
6305 (home-page "https://github.com/lepture/mistune")
6306 (synopsis "Markdown parser in pure Python")
6307 (description "This package provides a fast markdown parser in pure
6308 Python.")
6309 (license license:bsd-3)))
6310
6311 (define-public python2-mistune
6312 (package-with-python2 python-mistune))
6313
6314 (define-public python-markdown
6315 (package
6316 (name "python-markdown")
6317 (version "3.1.1")
6318 (source
6319 (origin
6320 (method url-fetch)
6321 (uri (pypi-uri "Markdown" version))
6322 (sha256
6323 (base32
6324 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f"))))
6325 (build-system python-build-system)
6326 (native-inputs
6327 `(("python-nose" ,python-nose)
6328 ("python-pyyaml" ,python-pyyaml)))
6329 (home-page "https://python-markdown.github.io/")
6330 (synopsis "Python implementation of Markdown")
6331 (description
6332 "This package provides a Python implementation of John Gruber's
6333 Markdown. The library features international input, various Markdown
6334 extensions, and several HTML output formats. A command line wrapper
6335 markdown_py is also provided to convert Markdown files to HTML.")
6336 (license license:bsd-3)))
6337
6338 (define-public python2-markdown
6339 (package-with-python2 python-markdown))
6340
6341 (define-public python-ptyprocess
6342 (package
6343 (name "python-ptyprocess")
6344 (version "0.5.2")
6345 (source
6346 (origin
6347 (method url-fetch)
6348 (uri (pypi-uri "ptyprocess" version))
6349 (sha256
6350 (base32
6351 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
6352 (build-system python-build-system)
6353 (native-inputs
6354 `(("python-nose" ,python-nose)))
6355 (arguments
6356 `(#:phases
6357 (modify-phases %standard-phases
6358 (replace 'check
6359 (lambda _ (invoke "nosetests"))))))
6360 (home-page "https://github.com/pexpect/ptyprocess")
6361 (synopsis "Run a subprocess in a pseudo terminal")
6362 (description
6363 "This package provides a Python library used to launch a subprocess in a
6364 pseudo terminal (pty), and interact with both the process and its pty.")
6365 (license license:isc)))
6366
6367 (define-public python2-ptyprocess
6368 (package-with-python2 python-ptyprocess))
6369
6370 (define-public python-cram
6371 (package
6372 (name "python-cram")
6373 (version "0.7")
6374 (home-page "https://bitheap.org/cram/")
6375 (source (origin
6376 (method url-fetch)
6377 (uri (list (string-append home-page "cram-"
6378 version ".tar.gz")
6379 (pypi-uri "cram" version)))
6380 (sha256
6381 (base32
6382 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6383 (arguments
6384 '(#:phases
6385 (modify-phases %standard-phases
6386 (add-after 'unpack 'patch-source
6387 (lambda _
6388 (substitute* (find-files "cram" ".*\\.py$")
6389 ;; Replace default shell path.
6390 (("/bin/sh") (which "sh")))
6391 (substitute* (find-files "tests" ".*\\.t$")
6392 (("md5") "md5sum")
6393 (("/bin/bash") (which "bash"))
6394 (("/bin/sh") (which "sh")))
6395 (substitute* "cram/_test.py"
6396 ;; This hack works around a bug triggered by substituting
6397 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6398 ;; "cram -h", which breaks the output at 80 characters. This
6399 ;; causes the line showing the default shell to break into two
6400 ;; lines, but the test expects a single line...
6401 (("env\\['COLUMNS'\\] = '80'")
6402 "env['COLUMNS'] = '160'"))
6403 #t))
6404 (delete 'check)
6405 (add-after 'install 'check
6406 ;; The test phase uses the built library and executable.
6407 ;; It's easier to run it after install since the build
6408 ;; directory contains version-specific PATH.
6409 (lambda* (#:key inputs outputs #:allow-other-keys)
6410 (add-installed-pythonpath inputs outputs)
6411 (setenv "PATH" (string-append (getenv "PATH") ":"
6412 (assoc-ref outputs "out") "/bin"))
6413 (invoke "make" "test"))))))
6414 (build-system python-build-system)
6415 (native-inputs
6416 `(("python-coverage" ,python-coverage)
6417 ("which" ,which)))
6418 (synopsis "Simple testing framework for command line applications")
6419 (description
6420 "Cram is a functional testing framework for command line applications.
6421 Cram tests look like snippets of interactive shell sessions. Cram runs each
6422 command and compares the command output in the test with the command’s actual
6423 output.")
6424 (license license:gpl2+)))
6425
6426 (define-public python2-cram
6427 (package-with-python2 python-cram))
6428
6429 (define-public python-straight-plugin
6430 (package
6431 (name "python-straight-plugin")
6432 (version "1.4.1")
6433 (source
6434 (origin
6435 (method url-fetch)
6436 (uri (pypi-uri "straight.plugin" version))
6437 (sha256
6438 (base32
6439 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6440 (build-system python-build-system)
6441 (home-page "https://github.com/ironfroggy/straight.plugin")
6442 (synopsis "Simple namespaced plugin facility")
6443 (description "Straight Plugin provides a type of plugin you can create from
6444 almost any existing Python modules, and an easy way for outside developers to
6445 add functionality and customization to your projects with their own plugins.")
6446 (license license:expat)))
6447
6448 (define-public python2-straight-plugin
6449 (package-with-python2 python-straight-plugin))
6450
6451 (define-public python-fonttools
6452 (package
6453 (name "python-fonttools")
6454 (version "3.28.0")
6455 (source (origin
6456 (method url-fetch)
6457 (uri (pypi-uri "fonttools" version ".zip"))
6458 (sha256
6459 (base32
6460 "0vsvjhidpb5kywpjgz1j3fywzkddxkb0afqai18qa3h6lqjyxwpb"))))
6461 (build-system python-build-system)
6462 (native-inputs
6463 `(("unzip" ,unzip)
6464 ("python-pytest" ,python-pytest)
6465 ("python-pytest-runner" ,python-pytest-runner)))
6466 (home-page "https://github.com/behdad/fonttools")
6467 (synopsis "Tools to manipulate font files")
6468 (description
6469 "FontTools/TTX is a library to manipulate font files from Python. It
6470 supports reading and writing of TrueType/OpenType fonts, reading and writing
6471 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6472 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6473 from an XML-based format.")
6474 (license license:expat)))
6475
6476 (define-public python2-fonttools
6477 (package-with-python2 python-fonttools))
6478
6479 (define-public python-ly
6480 (package
6481 (name "python-ly")
6482 (version "0.9.5")
6483 (source
6484 (origin
6485 (method url-fetch)
6486 (uri (pypi-uri name version))
6487 (sha256
6488 (base32
6489 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
6490 (build-system python-build-system)
6491 (arguments
6492 ;; FIXME: Some tests need network access.
6493 '(#:tests? #f))
6494 (synopsis "Tool and library for manipulating LilyPond files")
6495 (description "This package provides a Python library to parse, manipulate
6496 or create documents in LilyPond format. A command line program ly is also
6497 provided that can be used to do various manipulations with LilyPond files.")
6498 (home-page "https://pypi.python.org/pypi/python-ly")
6499 (license license:gpl2+)))
6500
6501 (define-public python-appdirs
6502 (package
6503 (name "python-appdirs")
6504 (version "1.4.3")
6505 (source
6506 (origin
6507 (method url-fetch)
6508 (uri (pypi-uri "appdirs" version))
6509 (sha256
6510 (base32
6511 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
6512 (build-system python-build-system)
6513 (home-page "https://github.com/ActiveState/appdirs")
6514 (synopsis
6515 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6516 (description
6517 "This module provides a portable way of finding out where user data
6518 should be stored on various operating systems.")
6519 (license license:expat)))
6520
6521 (define-public python2-appdirs
6522 (package-with-python2 python-appdirs))
6523
6524 (define-public python-llfuse
6525 (package
6526 (name "python-llfuse")
6527 (version "1.3.5")
6528 (source (origin
6529 (method url-fetch)
6530 (uri (pypi-uri "llfuse" version ".tar.bz2"))
6531 (sha256
6532 (base32
6533 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
6534 (build-system python-build-system)
6535 (inputs
6536 `(("fuse" ,fuse)
6537 ("attr" ,attr)))
6538 (native-inputs
6539 `(("pkg-config" ,pkg-config)))
6540 (synopsis "Python bindings for FUSE")
6541 (description
6542 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6543 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
6544 (license license:lgpl2.0+)
6545 (properties `((python2-variant . ,(delay python2-llfuse))))))
6546
6547 (define-public python2-llfuse
6548 (package (inherit (package-with-python2
6549 (strip-python2-variant python-llfuse)))
6550 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6551
6552 ;; For attic-0.16
6553 (define-public python-llfuse-0.41
6554 (package (inherit python-llfuse)
6555 (version "0.41.1")
6556 (source (origin
6557 (method url-fetch)
6558 (uri (string-append
6559 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6560 "llfuse-" version ".tar.bz2"))
6561 (sha256
6562 (base32
6563 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
6564 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6565 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
6566 (license (list license:expat license:lgpl2.0+))))
6567
6568 (define-public python-msgpack
6569 (package
6570 (name "python-msgpack")
6571 (version "0.5.6")
6572 (source (origin
6573 (method url-fetch)
6574 (uri (pypi-uri "msgpack" version))
6575 (sha256
6576 (base32
6577 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
6578 (build-system python-build-system)
6579 (arguments
6580 `(#:modules ((guix build utils)
6581 (guix build python-build-system)
6582 (ice-9 ftw)
6583 (srfi srfi-1)
6584 (srfi srfi-26))
6585 #:phases
6586 (modify-phases %standard-phases
6587 (replace 'check
6588 (lambda _
6589 (let ((cwd (getcwd)))
6590 (setenv "PYTHONPATH"
6591 (string-append cwd "/build/"
6592 (find (cut string-prefix? "lib" <>)
6593 (scandir (string-append cwd "/build")))
6594 ":"
6595 (getenv "PYTHONPATH")))
6596 (invoke "pytest" "-v" "test")))))))
6597 (native-inputs
6598 `(("python-pytest" ,python-pytest)))
6599 (synopsis "MessagePack (de)serializer")
6600 (description "MessagePack is a fast, compact binary serialization format,
6601 suitable for similar data to JSON. This package provides CPython bindings for
6602 reading and writing MessagePack data.")
6603 (home-page "https://pypi.python.org/pypi/msgpack/")
6604 (license license:asl2.0)))
6605
6606 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
6607 ;; release 0.5. Some packages like borg still call it by the old name for now.
6608 ;; <https://bugs.gnu.org/30662>
6609 (define-public python-msgpack-transitional
6610 (package
6611 (inherit python-msgpack)
6612 (name "python-msgpack-transitional")
6613 (arguments
6614 (substitute-keyword-arguments (package-arguments python-msgpack)
6615 ((#:phases phases)
6616 `(modify-phases ,phases
6617 (add-after 'unpack 'configure-transitional
6618 (lambda _
6619 ;; Keep using the old name.
6620 (substitute* "setup.py"
6621 (("TRANSITIONAL = False")
6622 "TRANSITIONAL = 1"))
6623 #t))))))))
6624
6625 (define-public python2-msgpack
6626 (package-with-python2 python-msgpack))
6627
6628 (define-public python-netaddr
6629 (package
6630 (name "python-netaddr")
6631 (version "0.7.19")
6632 (source
6633 (origin
6634 (method url-fetch)
6635 (uri (pypi-uri "netaddr" version))
6636 (sha256
6637 (base32
6638 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
6639 (build-system python-build-system)
6640 (arguments `(#:tests? #f)) ;; No tests.
6641 (home-page "https://github.com/drkjam/netaddr/")
6642 (synopsis "Pythonic manipulation of network addresses")
6643 (description
6644 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6645 and MAC network addresses.")
6646 (license license:bsd-3)))
6647
6648 (define-public python2-netaddr
6649 (package-with-python2 python-netaddr))
6650
6651 (define-public python-wrapt
6652 (package
6653 (name "python-wrapt")
6654 (version "1.11.1")
6655 (source
6656 (origin
6657 (method url-fetch)
6658 (uri (pypi-uri "wrapt" version))
6659 (sha256
6660 (base32
6661 "0cqmysny1pz01jw26q48q5zasvns6507rwhgm6wcw743f0r01sja"))))
6662 (build-system python-build-system)
6663 (arguments
6664 ;; Tests are not included in the tarball, they are only available in the
6665 ;; git repository.
6666 `(#:tests? #f))
6667 (home-page "https://github.com/GrahamDumpleton/wrapt")
6668 (synopsis "Module for decorators, wrappers and monkey patching")
6669 (description
6670 "The aim of the wrapt module is to provide a transparent object proxy for
6671 Python, which can be used as the basis for the construction of function
6672 wrappers and decorator functions.")
6673 (license license:bsd-2)))
6674
6675 (define-public python2-wrapt
6676 (package-with-python2 python-wrapt))
6677
6678 (define-public python-xlrd
6679 (package
6680 (name "python-xlrd")
6681 (version "1.0.0")
6682 (source (origin
6683 (method url-fetch)
6684 (uri (pypi-uri "xlrd" version))
6685 (sha256
6686 (base32
6687 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
6688 (build-system python-build-system)
6689 (arguments
6690 `(#:phases
6691 (modify-phases %standard-phases
6692 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
6693 ;; run tests instead for now.
6694 (replace 'check (lambda _ (invoke "nosetests"))))))
6695 (native-inputs `(("python-nose" ,python-nose)))
6696 (home-page "http://www.python-excel.org/")
6697 (synopsis "Library for extracting data from Excel files")
6698 (description "This package provides a library to extract data from
6699 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
6700 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
6701 Unicode-aware. It is not intended as an end-user tool.")
6702 (license license:bsd-3)))
6703
6704 (define-public python2-xlrd
6705 (package-with-python2 python-xlrd))
6706
6707 (define-public python-prettytable
6708 (package
6709 (name "python-prettytable")
6710 (version "0.7.2")
6711 (source
6712 (origin
6713 (method url-fetch)
6714 (uri (pypi-uri "prettytable" version ".tar.bz2"))
6715 (sha256
6716 (base32
6717 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
6718 (build-system python-build-system)
6719 (home-page "http://code.google.com/p/prettytable/")
6720 (synopsis "Display tabular data in an ASCII table format")
6721 (description
6722 "A library designed to represent tabular data in visually appealing ASCII
6723 tables. PrettyTable allows for selection of which columns are to be printed,
6724 independent alignment of columns (left or right justified or centred) and
6725 printing of sub-tables by specifying a row range.")
6726 (license license:bsd-3)))
6727
6728 (define-public python2-prettytable
6729 (package-with-python2 python-prettytable))
6730
6731 (define-public python-tables
6732 (package
6733 (name "python-tables")
6734 (version "3.4.4")
6735 (source
6736 (origin
6737 (method url-fetch)
6738 (uri (pypi-uri "tables" version))
6739 (sha256
6740 (base32
6741 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
6742 (modules '((guix build utils)))
6743 (snippet
6744 '(begin
6745 ;; Remove pre-compiled .pyc files from source.
6746 (for-each delete-file-recursively
6747 (find-files "." "__pycache__" #:directories? #t))
6748 (for-each delete-file (find-files "." "\\.pyc$"))
6749 #t))))
6750 (build-system python-build-system)
6751 (arguments
6752 `(;; FIXME: python-build-system does not pass configure-flags to "build"
6753 ;; or "check", so we must override the build and check phases.
6754 #:phases
6755 (modify-phases %standard-phases
6756 (add-after 'unpack 'use-gcc
6757 (lambda _
6758 (substitute* "setup.py"
6759 (("compiler = new_compiler\\(\\)" line)
6760 (string-append line
6761 "\ncompiler.set_executables(compiler='gcc',"
6762 "compiler_so='gcc',"
6763 "linker_exe='gcc',"
6764 "linker_so='gcc -shared')")))
6765 #t))
6766 (replace 'build
6767 (lambda* (#:key inputs #:allow-other-keys)
6768 (invoke "python" "setup.py" "build"
6769 (string-append "--hdf5="
6770 (assoc-ref inputs "hdf5")))))
6771 (replace 'check
6772 (lambda* (#:key inputs #:allow-other-keys)
6773 (invoke "python" "setup.py" "check"
6774 (string-append "--hdf5="
6775 (assoc-ref inputs "hdf5"))))))))
6776 (propagated-inputs
6777 `(("python-numexpr" ,python-numexpr)
6778 ("python-numpy" ,python-numpy)))
6779 (native-inputs
6780 `(("python-cython" ,python-cython)
6781 ("pkg-config" ,pkg-config)))
6782 (inputs
6783 `(("hdf5" ,hdf5)
6784 ("bzip2" ,bzip2)
6785 ("zlib" ,zlib)))
6786 (home-page "http://www.pytables.org/")
6787 (synopsis "Hierarchical datasets for Python")
6788 (description "PyTables is a package for managing hierarchical datasets and
6789 designed to efficiently cope with extremely large amounts of data.")
6790 (license license:bsd-3)))
6791
6792 (define-public python2-tables
6793 (package-with-python2 python-tables))
6794
6795 (define-public python-pyasn1
6796 (package
6797 (name "python-pyasn1")
6798 (version "0.4.3")
6799 (source
6800 (origin
6801 (method url-fetch)
6802 (uri (pypi-uri "pyasn1" version))
6803 (sha256
6804 (base32
6805 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
6806 (build-system python-build-system)
6807 (home-page "http://pyasn1.sourceforge.net/")
6808 (synopsis "ASN.1 types and codecs")
6809 (description
6810 "This is an implementation of ASN.1 types and codecs in Python. It is
6811 suitable for a wide range of protocols based on the ASN.1 specification.")
6812 (license license:bsd-2)))
6813
6814 (define-public python2-pyasn1
6815 (package-with-python2 python-pyasn1))
6816
6817 (define-public python-pyasn1-modules
6818 (package
6819 (name "python-pyasn1-modules")
6820 (version "0.2.2")
6821 (source
6822 (origin
6823 (method url-fetch)
6824 (uri (pypi-uri "pyasn1-modules" version))
6825 (sha256
6826 (base32
6827 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
6828 (build-system python-build-system)
6829 (propagated-inputs
6830 `(("python-pyasn1" ,python-pyasn1)))
6831 (home-page "https://sourceforge.net/projects/pyasn1/")
6832 (synopsis "ASN.1 codec implementations")
6833 (description
6834 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
6835 implementations of ASN.1-based codecs and protocols.")
6836 (license license:bsd-3)))
6837
6838 (define-public python2-pyasn1-modules
6839 (package-with-python2 python-pyasn1-modules))
6840
6841 (define-public python-ipaddress
6842 (package
6843 (name "python-ipaddress")
6844 (version "1.0.22")
6845 (source (origin
6846 (method url-fetch)
6847 (uri (pypi-uri "ipaddress" version))
6848 (sha256
6849 (base32
6850 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
6851 (build-system python-build-system)
6852 (home-page "https://github.com/phihag/ipaddress")
6853 (synopsis "IP address manipulation library")
6854 (description
6855 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
6856 in Python. This library is used to create, poke at, and manipulate IPv4 and
6857 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
6858 module to older versions of Python.")
6859 (license license:psfl)))
6860
6861 (define-public python2-ipaddress
6862 (package-with-python2 python-ipaddress))
6863
6864 (define-public python2-ipaddr
6865 (package
6866 (name "python2-ipaddr")
6867 (version "2.1.11")
6868 (source
6869 (origin
6870 (method url-fetch)
6871 (uri (pypi-uri "ipaddr" version))
6872 (sha256
6873 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
6874 (build-system python-build-system)
6875 (arguments
6876 `(#:python ,python-2 ;version 2 only
6877 #:phases
6878 (modify-phases %standard-phases
6879 (replace 'check
6880 (lambda _ (invoke "python" "ipaddr_test.py"))))))
6881 (home-page "https://github.com/google/ipaddr-py")
6882 (synopsis "IP address manipulation library")
6883 (description
6884 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
6885 IPv6 addresses and networks.
6886
6887 For new implementations you may prefer to use the standard module
6888 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
6889 versions of Python.")
6890 (license license:asl2.0)))
6891
6892 (define-public python-idna
6893 (package
6894 (name "python-idna")
6895 (version "2.8")
6896 (source
6897 (origin
6898 (method url-fetch)
6899 (uri (pypi-uri "idna" version))
6900 (sha256
6901 (base32
6902 "01rlkigdxg17sf9yar1jl8n18ls59367wqh59hnawlyg53vb6my3"))))
6903 (build-system python-build-system)
6904 (home-page "https://github.com/kjd/idna")
6905 (synopsis "Internationalized domain names in applications")
6906 (description
6907 "This is a library to support the Internationalised Domain Names in
6908 Applications (IDNA) protocol as specified in RFC 5891. This version of the
6909 protocol is often referred to as “IDNA2008” and can produce different results
6910 from the earlier standard from 2003. The library is also intended to act as a
6911 suitable drop-in replacement for the “encodings.idna” module that comes with
6912 the Python standard library but currently only supports the older 2003
6913 specification.")
6914 (license license:bsd-4)))
6915
6916 (define-public python2-idna
6917 (package-with-python2 python-idna))
6918
6919 (define-public python-idna-ssl
6920 (package
6921 (name "python-idna-ssl")
6922 (version "1.0.1")
6923 (source
6924 (origin
6925 (method url-fetch)
6926 (uri (pypi-uri "idna-ssl" version))
6927 (sha256
6928 (base32
6929 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
6930 (build-system python-build-system)
6931 (arguments
6932 `(#:tests? #f)) ;circular dependency with python-aiohttp
6933 (home-page "https://github.com/aio-libs/idna-ssl")
6934 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
6935 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
6936 domains support.")
6937 (license license:expat)))
6938
6939 (define-public python-pretend
6940 (package
6941 (name "python-pretend")
6942 (version "1.0.9")
6943 (source
6944 (origin
6945 (method url-fetch)
6946 (uri (pypi-uri "pretend" version))
6947 (sha256
6948 (base32
6949 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
6950 (build-system python-build-system)
6951 (home-page "https://github.com/alex/pretend")
6952 (synopsis "Library for stubbing in Python")
6953 (description
6954 "Pretend is a library to make stubbing with Python easier. Stubbing is a
6955 technique for writing tests. You may hear the term mixed up with mocks,
6956 fakes, or doubles. Basically, a stub is an object that returns pre-canned
6957 responses, rather than doing any computation.")
6958 (license license:bsd-3)))
6959
6960 (define-public python2-pretend
6961 (package-with-python2 python-pretend))
6962
6963 (define-public python-pip
6964 (package
6965 (name "python-pip")
6966 (version "18.1")
6967 (source
6968 (origin
6969 (method url-fetch)
6970 (uri (pypi-uri "pip" version))
6971 (sha256
6972 (base32
6973 "188fclay154s520n43s7cxxlhdaiysvxf19zk8vr1xbyjyyr58n0"))))
6974 (build-system python-build-system)
6975 (arguments
6976 '(#:tests? #f)) ; there are no tests in the pypi archive.
6977 (home-page "https://pip.pypa.io/")
6978 (synopsis "Package manager for Python software")
6979 (description
6980 "Pip is a package manager for Python software, that finds packages on the
6981 Python Package Index (PyPI).")
6982 (license license:expat)))
6983
6984 (define-public python2-pip
6985 (package-with-python2 python-pip))
6986
6987 (define-public python-tlsh
6988 (package
6989 (name "python-tlsh")
6990 (version "3.4.5")
6991 (home-page "https://github.com/trendmicro/tlsh")
6992 (source
6993 (origin
6994 (method git-fetch)
6995 (uri (git-reference
6996 (url "https://github.com/trendmicro/tlsh.git")
6997 (commit (string-append "v" version))))
6998 (file-name (git-file-name name version))
6999 (sha256
7000 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
7001 (build-system cmake-build-system)
7002 (arguments
7003 '(#:out-of-source? #f
7004 #:phases (modify-phases %standard-phases
7005 (replace
7006 'install
7007 (lambda* (#:key outputs #:allow-other-keys)
7008 ;; Build and install the Python bindings. The underlying
7009 ;; C++ library is apparently not meant to be installed.
7010 (let ((out (assoc-ref outputs "out")))
7011 (with-directory-excursion "py_ext"
7012 (and (system* "python" "setup.py" "build")
7013 (system* "python" "setup.py" "install"
7014 (string-append "--prefix=" out))))))))))
7015 (inputs `(("python" ,python-wrapper))) ;for the bindings
7016 (synopsis "Fuzzy matching library for Python")
7017 (description
7018 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7019 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7020 value which can be used for similarity comparisons. Similar objects have
7021 similar hash values, which allows for the detection of similar objects by
7022 comparing their hash values. The byte stream should have a sufficient amount
7023 of complexity; for example, a byte stream of identical bytes will not generate
7024 a hash value.")
7025 (license license:asl2.0)))
7026
7027 (define-public python2-tlsh
7028 (package
7029 (inherit python-tlsh)
7030 (name "python2-tlsh")
7031 (inputs `(("python" ,python-2)))))
7032
7033 (define-public python-termcolor
7034 (package
7035 (name "python-termcolor")
7036 (version "1.1.0")
7037 (source
7038 (origin
7039 (method url-fetch)
7040 (uri (pypi-uri "termcolor" version))
7041 (sha256
7042 (base32
7043 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7044 (build-system python-build-system)
7045 (arguments
7046 ;; There are no tests.
7047 `(#:tests? #f))
7048 (home-page "https://pypi.python.org/pypi/termcolor")
7049 (synopsis "ANSII Color formatting for terminal output")
7050 (description
7051 "This package provides ANSII Color formatting for output in terminals.")
7052 (license license:expat)))
7053
7054 (define-public python2-termcolor
7055 (package-with-python2 python-termcolor))
7056
7057 (define-public python-libarchive-c
7058 (package
7059 (name "python-libarchive-c")
7060 (version "2.8")
7061 (source (origin
7062 (method url-fetch)
7063 (uri (pypi-uri "libarchive-c" version))
7064 (sha256
7065 (base32
7066 "0qg0v1s9c1xdk9philhnv8k6c6nicvnvfwlc0j9srg90jmdlvm06"))))
7067 (build-system python-build-system)
7068 (arguments
7069 '(#:phases (modify-phases %standard-phases
7070 (add-before
7071 'build 'reference-libarchive
7072 (lambda* (#:key inputs #:allow-other-keys)
7073 ;; Retain the absolute file name of libarchive.so.
7074 (let ((libarchive (assoc-ref inputs "libarchive")))
7075 (substitute* "libarchive/ffi.py"
7076 (("find_library\\('archive'\\)")
7077 (string-append "'" libarchive
7078 "/lib/libarchive.so'"))))))
7079 (replace 'check
7080 (lambda _ (invoke "pytest" "-vv"))))))
7081 (native-inputs
7082 `(("python-mock" ,python-mock)
7083 ("python-pytest" ,python-pytest)))
7084 (inputs
7085 `(("libarchive" ,libarchive)))
7086 (home-page "https://github.com/Changaco/python-libarchive-c")
7087 (synopsis "Python interface to libarchive")
7088 (description
7089 "This package provides Python bindings to libarchive, a C library to
7090 access possibly compressed archives in many different formats. It uses
7091 Python's @code{ctypes} foreign function interface (FFI).")
7092 (license license:lgpl2.0+)))
7093
7094 (define-public python2-libarchive-c
7095 (package-with-python2 python-libarchive-c))
7096
7097 (define-public python-file
7098 (package
7099 (inherit file)
7100 (name "python-file")
7101 (build-system python-build-system)
7102 (arguments
7103 '(#:tests? #f ;no tests
7104 #:configure-flags '("--single-version-externally-managed" "--root=/")
7105 #:phases (modify-phases %standard-phases
7106 (add-before 'build 'change-directory
7107 (lambda _
7108 (chdir "python")
7109 #t))
7110 (add-before 'build 'set-library-file-name
7111 (lambda* (#:key inputs #:allow-other-keys)
7112 (let ((file (assoc-ref inputs "file")))
7113 (substitute* "magic.py"
7114 (("find_library\\('magic'\\)")
7115 (string-append "'" file "/lib/libmagic.so'")))
7116 #t))))))
7117 (inputs `(("file" ,file)))
7118 (native-inputs (if (%current-target-system)
7119 `(("self" ,this-package))
7120 '()))
7121 (synopsis "Python bindings to the libmagic file type guesser. Note that
7122 this module and the python-magic module both provide a \"magic.py\" file;
7123 these two modules, which are different and were developed separately, both
7124 serve the same purpose: provide Python bindings for libmagic.")))
7125
7126 (define-public python2-file
7127 (package-with-python2 python-file))
7128
7129 (define-public python-debian
7130 (package
7131 (name "python-debian")
7132 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
7133 (version "0.1.28")
7134 (source
7135 (origin
7136 (method url-fetch)
7137 (uri (pypi-uri name version))
7138 (sha256
7139 (base32
7140 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
7141 (build-system python-build-system)
7142 (propagated-inputs
7143 `(("python-six" ,python-six)))
7144 (synopsis "Debian package related modules")
7145 (description
7146 ;; XXX: Use @enumerate instead of @itemize to work around
7147 ;; <http://bugs.gnu.org/21772>.
7148 "This package provides Python modules that abstract many formats of
7149 Debian-related files, such as:
7150
7151 @enumerate
7152 @item Debtags information;
7153 @item @file{debian/changelog} files;
7154 @item packages files, pdiffs;
7155 @item control files of single or multiple RFC822-style paragraphs---e.g.
7156 @file{debian/control}, @file{.changes}, @file{.dsc};
7157 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7158 contained files and meta-information.
7159 @end enumerate\n")
7160
7161 ;; Modules are either GPLv2+ or GPLv3+.
7162 (license license:gpl3+)))
7163
7164 (define-public python2-debian
7165 (package-with-python2 python-debian))
7166
7167 (define-public python-nbformat
7168 (package
7169 (name "python-nbformat")
7170 (version "4.4.0")
7171 (source
7172 (origin
7173 (method url-fetch)
7174 (uri (pypi-uri "nbformat" version))
7175 (sha256
7176 (base32
7177 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
7178 (build-system python-build-system)
7179 (arguments `(#:tests? #f)) ; no test target
7180 (propagated-inputs
7181 `(("python-ipython-genutils" ,python-ipython-genutils)
7182 ("python-jsonschema" ,python-jsonschema)
7183 ("python-jupyter-core" ,python-jupyter-core)
7184 ("python-traitlets" ,python-traitlets)))
7185 (home-page "http://jupyter.org")
7186 (synopsis "Jupyter Notebook format")
7187 (description "This package provides the reference implementation of the
7188 Jupyter Notebook format and Python APIs for working with notebooks.")
7189 (license license:bsd-3)))
7190
7191 (define-public python2-nbformat
7192 (package-with-python2 python-nbformat))
7193
7194 (define-public python-bleach
7195 (package
7196 (name "python-bleach")
7197 (version "1.4.3")
7198 (source
7199 (origin
7200 (method url-fetch)
7201 (uri (pypi-uri "bleach" version))
7202 (sha256
7203 (base32
7204 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
7205 (build-system python-build-system)
7206 (propagated-inputs
7207 `(("python-html5lib" ,python-html5lib-0.9)
7208 ("python-six" ,python-six)))
7209 (native-inputs
7210 `(("python-nose" ,python-nose)))
7211 (home-page "https://github.com/jsocol/bleach")
7212 (synopsis "Whitelist-based HTML-sanitizing tool")
7213 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7214 (license license:asl2.0)))
7215
7216 (define-public python2-bleach
7217 (package-with-python2 python-bleach))
7218
7219 (define-public python-entrypoints
7220 (package
7221 (name "python-entrypoints")
7222 (version "0.3")
7223 (source
7224 (origin
7225 (method url-fetch)
7226 (uri (pypi-uri "entrypoints" version))
7227 (sha256
7228 (base32
7229 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
7230 (build-system python-build-system)
7231 ;; The package does not come with a setup.py file, so we have to generate
7232 ;; one ourselves.
7233 (arguments
7234 `(#:tests? #f
7235 #:phases
7236 (modify-phases %standard-phases
7237 (add-after 'unpack 'create-setup.py
7238 (lambda _
7239 (call-with-output-file "setup.py"
7240 (lambda (port)
7241 (format port "\
7242 from setuptools import setup
7243 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7244 " ,version))))))))
7245 (home-page "https://github.com/takluyver/entrypoints")
7246 (synopsis "Discover and load entry points from installed Python packages")
7247 (description "Entry points are a way for Python packages to advertise
7248 objects with some common interface. The most common examples are
7249 @code{console_scripts} entry points, which define shell commands by
7250 identifying a Python function to run. The @code{entrypoints} module contains
7251 functions to find and load entry points.")
7252 (license license:expat)))
7253
7254 (define-public python2-entrypoints
7255 (package-with-python2 python-entrypoints))
7256
7257 (define-public python-nbconvert
7258 (package
7259 (name "python-nbconvert")
7260 (version "5.0.0b1")
7261 (source
7262 (origin
7263 (method url-fetch)
7264 (uri (pypi-uri "nbconvert" version))
7265 (sha256
7266 (base32
7267 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7268 (build-system python-build-system)
7269 (arguments
7270 `(;; The "bdist_egg" target is disabled by default, causing the installation
7271 ;; to fail.
7272 #:configure-flags (list "bdist_egg")
7273 ;; FIXME: 5 failures, 40 errors.
7274 #:tests? #f))
7275 ;; #:phases
7276 ;; (modify-phases %standard-phases
7277 ;; (replace 'check
7278 ;; (lambda _
7279 ;; (zero? (system* "py.test" "-v")))))
7280 (native-inputs
7281 `(("python-pytest" ,python-pytest)))
7282 (propagated-inputs
7283 `(("python-bleach" ,python-bleach)
7284 ("python-entrypoints" ,python-entrypoints)
7285 ("python-jinja2" ,python-jinja2)
7286 ("python-jupyter-core" ,python-jupyter-core)
7287 ("python-mistune" ,python-mistune)
7288 ("python-nbformat" ,python-nbformat)
7289 ("python-pygments" ,python-pygments)
7290 ("python-traitlets" ,python-traitlets)))
7291 (home-page "http://jupyter.org")
7292 (synopsis "Converting Jupyter Notebooks")
7293 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7294 notebooks to various other formats via Jinja templates. It allows you to
7295 convert an @code{.ipynb} notebook file into various static formats including:
7296
7297 @enumerate
7298 @item HTML
7299 @item LaTeX
7300 @item PDF
7301 @item Reveal JS
7302 @item Markdown (md)
7303 @item ReStructured Text (rst)
7304 @item executable script
7305 @end enumerate\n")
7306 (license license:bsd-3)))
7307
7308 (define-public python2-nbconvert
7309 (package-with-python2 python-nbconvert))
7310
7311 (define-public python-notebook
7312 (package
7313 (name "python-notebook")
7314 (version "5.7.4")
7315 (source (origin
7316 (method url-fetch)
7317 (uri (pypi-uri "notebook" version))
7318 (sha256
7319 (base32
7320 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
7321 (build-system python-build-system)
7322 (arguments
7323 `(#:phases
7324 (modify-phases %standard-phases
7325 (replace 'check
7326 (lambda _
7327 ;; These tests require a browser
7328 (delete-file-recursively "notebook/tests/selenium")
7329 ;; Some tests need HOME
7330 (setenv "HOME" "/tmp")
7331 ;; This file contains "warningfilters", which are not supported
7332 ;; by this version of nose.
7333 (delete-file "setup.cfg")
7334 (with-directory-excursion "/tmp"
7335 (invoke "nosetests" "-v"))
7336 #t)))))
7337 (propagated-inputs
7338 `(("python-jupyter-core" ,python-jupyter-core)
7339 ("python-nbformat" ,python-nbformat)
7340 ("python-nbconvert" ,python-nbconvert)
7341 ("python-prometheus-client" ,python-prometheus-client)
7342 ("python-send2trash" ,python-send2trash)
7343 ("python-terminado" ,python-terminado)))
7344 (native-inputs
7345 `(("python-nose" ,python-nose)
7346 ("python-sphinx" ,python-sphinx)
7347 ("python-requests" ,python-requests)))
7348 (home-page "http://jupyter.org/")
7349 (synopsis "Web-based notebook environment for interactive computing")
7350 (description
7351 "The Jupyter HTML notebook is a web-based notebook environment for
7352 interactive computing.")
7353 (properties `((python2-variant . ,(delay python2-notebook))))
7354 (license license:bsd-3)))
7355
7356 (define-public python2-notebook
7357 (let ((base (package-with-python2
7358 (strip-python2-variant python-notebook))))
7359 (package (inherit base)
7360 (native-inputs
7361 `(("python2-mock" ,python2-mock)
7362 ,@(package-native-inputs base)))
7363 (arguments
7364 (substitute-keyword-arguments (package-arguments base)
7365 ((#:phases phases)
7366 `(modify-phases ,phases
7367 (add-before 'check 'disable-test-case
7368 ;; The test requires network access to localhost. Curiously it
7369 ;; fails with Python 2 only. Simply make the test-case return
7370 ;; immediately.
7371 (lambda _
7372 (substitute*
7373 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7374 (("formats = self.nbconvert_api") "return #")))))))))))
7375
7376 (define-public python-widgetsnbextension
7377 (package
7378 (name "python-widgetsnbextension")
7379 (version "3.4.2")
7380 (source
7381 (origin
7382 (method url-fetch)
7383 (uri (pypi-uri "widgetsnbextension" version))
7384 (sha256
7385 (base32
7386 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
7387 (build-system python-build-system)
7388 (propagated-inputs
7389 `(("python-ipykernel" ,python-ipykernel)
7390 ("python-notebook" ,python-notebook)))
7391 (native-inputs
7392 `(("python-certifi" ,python-certifi)
7393 ("python-nose" ,python-nose)))
7394 (home-page "https://ipython.org")
7395 (synopsis "IPython HTML widgets for Jupyter")
7396 (description "This package provides interactive HTML widgets for Jupyter
7397 notebooks.")
7398 (license license:bsd-3)))
7399
7400 (define-public python2-widgetsnbextension
7401 (package-with-python2 python-widgetsnbextension))
7402
7403 (define-public python-ipywidgets
7404 (package
7405 (name "python-ipywidgets")
7406 (version "5.2.2")
7407 (source
7408 (origin
7409 (method url-fetch)
7410 (uri (pypi-uri "ipywidgets" version))
7411 (sha256
7412 (base32
7413 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7414 (build-system python-build-system)
7415 (propagated-inputs
7416 `(("python-ipython" ,python-ipython)
7417 ("python-traitlets" ,python-traitlets)
7418 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7419 (native-inputs
7420 `(("python-nose" ,python-nose)
7421 ("python-pytest" ,python-pytest)))
7422 (home-page "https://ipython.org")
7423 (synopsis "IPython HTML widgets for Jupyter")
7424 (description "Ipywidgets are interactive HTML widgets for Jupyter
7425 notebooks and the IPython kernel. Notebooks come alive when interactive
7426 widgets are used. Users gain control of their data and can visualize changes
7427 in the data.")
7428 (license license:bsd-3)))
7429
7430 (define-public python2-ipywidgets
7431 (package-with-python2 python-ipywidgets))
7432
7433 (define-public python-jupyter-console
7434 (package
7435 (name "python-jupyter-console")
7436 (version "5.2.0")
7437 (source
7438 (origin
7439 (method url-fetch)
7440 (uri (pypi-uri "jupyter_console" version))
7441 (sha256
7442 (base32
7443 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
7444 (build-system python-build-system)
7445 ;; Tests only run in an TTY.
7446 (arguments `(#:tests? #f))
7447 (propagated-inputs
7448 `(("python-ipykernel" ,python-ipykernel)
7449 ("python-jupyter-client" ,python-jupyter-client)
7450 ("python-prompt-toolkit" ,python-prompt-toolkit-1)
7451 ("python-pygments" ,python-pygments)))
7452 (native-inputs
7453 `(("python-nose" ,python-nose)))
7454 (home-page "https://jupyter.org")
7455 (synopsis "Jupyter terminal console")
7456 (description "This package provides a terminal-based console frontend for
7457 Jupyter kernels. It also allows for console-based interaction with non-Python
7458 Jupyter kernels such as IJulia and IRKernel.")
7459 (license license:bsd-3)))
7460
7461 (define-public python2-jupyter-console
7462 (package-with-python2 python-jupyter-console))
7463
7464 ;; The python-ipython and python-jupyter-console require each other. To get
7465 ;; the functionality in both packages working, strip down the
7466 ;; python-jupyter-console package when using it as an input to python-ipython.
7467 (define python-jupyter-console-minimal
7468 (package
7469 (inherit python-jupyter-console)
7470 (name "python-jupyter-console-minimal")
7471 (arguments
7472 (substitute-keyword-arguments
7473 (package-arguments python-jupyter-console)
7474 ((#:phases phases)
7475 `(modify-phases ,phases
7476 (add-after 'install 'delete-bin
7477 (lambda* (#:key outputs #:allow-other-keys)
7478 ;; Delete the bin files, to avoid conflicts in profiles
7479 ;; where python-ipython and python-jupyter-console are
7480 ;; both present.
7481 (delete-file-recursively
7482 (string-append
7483 (assoc-ref outputs "out") "/bin"))))))))
7484 ;; Remove the python-ipython propagated input, to avoid the cycle
7485 (propagated-inputs
7486 (alist-delete
7487 "python-ipython"
7488 (package-propagated-inputs python-jupyter-console)))))
7489
7490 (define-public python-qtconsole
7491 (package
7492 (name "python-qtconsole")
7493 (version "4.4.3")
7494 (source
7495 (origin
7496 (method url-fetch)
7497 (uri (pypi-uri "qtconsole" version))
7498 (sha256
7499 (base32
7500 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
7501 (build-system python-build-system)
7502 (arguments
7503 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
7504 ;; but we only have the LTS version 5.x. This means that there might be
7505 ;; runtime errors, but since this is a dependency of the Jupyter package,
7506 ;; and Jupyter can be used without the qtconsole we can overlook this for
7507 ;; now.
7508 `(#:tests? #f
7509 #:phases
7510 (modify-phases %standard-phases
7511 (add-before 'check 'pre-check
7512 (lambda _
7513 (setenv "QT_QPA_PLATFORM" "offscreen")
7514 #t)))))
7515 (propagated-inputs
7516 `(("python-ipykernel" ,python-ipykernel)
7517 ("python-ipython" ,python-ipython)))
7518 (native-inputs
7519 `(("python-pytest" ,python-pytest)))
7520 (home-page "http://jupyter.org")
7521 (synopsis "Jupyter Qt console")
7522 (description "This package provides a Qt-based console for Jupyter with
7523 support for rich media output.")
7524 (license license:bsd-3)))
7525
7526 (define-public jupyter
7527 (package
7528 (name "jupyter")
7529 (version "1.0.0")
7530 (source
7531 (origin
7532 (method url-fetch)
7533 (uri (pypi-uri "jupyter" version))
7534 (sha256
7535 (base32
7536 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
7537 (build-system python-build-system)
7538 (arguments '(#:tests? #f)) ; there are none.
7539 (propagated-inputs
7540 `(("python-ipykernel" ,python-ipykernel)
7541 ("python-ipywidgets" ,python-ipywidgets)
7542 ("python-jupyter-console" ,python-jupyter-console)
7543 ("python-nbconvert" ,python-nbconvert)
7544 ("python-notebook" ,python-notebook)
7545 ("python-qtconsole" ,python-qtconsole)))
7546 (native-search-paths
7547 (list (search-path-specification
7548 (variable "JUPYTER_PATH")
7549 (files '("share/jupyter")))))
7550 (home-page "https://jupyter.org")
7551 (synopsis "Web application for interactive documents")
7552 (description
7553 "The Jupyter Notebook is a web application that allows you to create and
7554 share documents that contain live code, equations, visualizations and
7555 explanatory text. Uses include: data cleaning and transformation, numerical
7556 simulation, statistical modeling, machine learning and much more.")
7557 (license license:bsd-3)))
7558
7559 (define-public python-chardet
7560 (package
7561 (name "python-chardet")
7562 (version "3.0.4")
7563 (source
7564 (origin
7565 (method url-fetch)
7566 (uri (pypi-uri "chardet" version))
7567 (sha256
7568 (base32
7569 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
7570 (native-inputs
7571 `(("python-hypothesis" ,python-hypothesis)
7572 ("python-pytest" ,python-pytest)
7573 ("python-pytest-runner" ,python-pytest-runner)))
7574 (build-system python-build-system)
7575 (home-page "https://github.com/chardet/chardet")
7576 (synopsis "Universal encoding detector for Python 2 and 3")
7577 (description
7578 "This package provides @code{chardet}, a Python module that can
7579 automatically detect a wide range of file encodings.")
7580 (license license:lgpl2.1+)))
7581
7582 (define-public python2-chardet
7583 (package-with-python2 python-chardet))
7584
7585 (define-public python-docopt
7586 (package
7587 (name "python-docopt")
7588 (version "0.6.2")
7589 (source
7590 (origin
7591 (method url-fetch)
7592 ;; The release on PyPI does not include tests.
7593 (uri (string-append
7594 "https://github.com/docopt/docopt/archive/"
7595 version ".tar.gz"))
7596 (file-name (string-append name "-" version ".tar.gz"))
7597 (sha256
7598 (base32
7599 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
7600 (build-system python-build-system)
7601 (native-inputs
7602 `(("python-pytest" ,python-pytest)))
7603 (arguments
7604 `(#:phases
7605 (modify-phases %standard-phases
7606 (replace 'check
7607 (lambda _ (invoke "py.test"))))))
7608 (home-page "http://docopt.org")
7609 (synopsis "Command-line interface description language for Python")
7610 (description "This library allows the user to define a command-line
7611 interface from a program's help message rather than specifying it
7612 programmatically with command-line parsers like @code{getopt} and
7613 @code{argparse}.")
7614 (license license:expat)))
7615
7616 (define-public python2-docopt
7617 (package-with-python2 python-docopt))
7618
7619 (define-public python-pythondialog
7620 (package
7621 (name "python-pythondialog")
7622 (version "3.4.0")
7623 (source
7624 (origin
7625 (method url-fetch)
7626 (uri (pypi-uri "pythondialog" version))
7627 (sha256
7628 (base32
7629 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
7630 (build-system python-build-system)
7631 (arguments
7632 `(#:phases
7633 (modify-phases %standard-phases
7634 (add-after 'unpack 'patch-path
7635 (lambda* (#:key inputs #:allow-other-keys)
7636 (let* ((dialog (assoc-ref inputs "dialog")))
7637 ;; Since this library really wants to grovel the search path, we
7638 ;; must hardcode dialog's store path into it.
7639 (substitute* "dialog.py"
7640 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
7641 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
7642 #t))))
7643 #:tests? #f)) ; no test suite
7644 (propagated-inputs
7645 `(("dialog" ,dialog)))
7646 (home-page "http://pythondialog.sourceforge.net/")
7647 (synopsis "Python interface to the UNIX dialog utility")
7648 (description "A Python wrapper for the dialog utility. Its purpose is to
7649 provide an easy to use, pythonic and comprehensive Python interface to dialog.
7650 This allows one to make simple text-mode user interfaces on Unix-like systems")
7651 (license license:lgpl2.1)
7652 (properties `((python2-variant . ,(delay python2-pythondialog))))))
7653
7654 (define-public python2-pythondialog
7655 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
7656 (package
7657 (inherit base)
7658 (version (package-version python-pythondialog))
7659 (source (origin
7660 (method url-fetch)
7661 (uri (pypi-uri "python2-pythondialog" version))
7662 (sha256
7663 (base32
7664 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
7665
7666 (define-public python-configobj
7667 (package
7668 (name "python-configobj")
7669 (version "5.0.6")
7670 (source (origin
7671 (method url-fetch)
7672 (uri (pypi-uri "configobj" version))
7673 (sha256
7674 (base32
7675 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
7676 ;; Patch setup.py so it looks for python-setuptools, which is
7677 ;; required to parse the keyword 'install_requires' in setup.py.
7678 (patches (search-patches "python-configobj-setuptools.patch"))))
7679 (build-system python-build-system)
7680 (propagated-inputs
7681 `(("python-six" ,python-six)))
7682 (synopsis "Config file reading, writing and validation")
7683 (description "ConfigObj is a simple but powerful config file reader and
7684 writer: an ini file round tripper. Its main feature is that it is very easy to
7685 use, with a straightforward programmer’s interface and a simple syntax for
7686 config files.")
7687 (home-page "https://github.com/DiffSK/configobj")
7688 (license license:bsd-3)))
7689
7690 (define-public python2-configobj
7691 (package-with-python2 python-configobj))
7692
7693 (define-public python-configargparse
7694 (package
7695 (name "python-configargparse")
7696 (version "0.14.0")
7697 (source (origin
7698 (method url-fetch)
7699 (uri (pypi-uri "ConfigArgParse" version))
7700 (sha256
7701 (base32
7702 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
7703 (build-system python-build-system)
7704 (native-inputs
7705 `(("python-pyyaml" ,python-pyyaml)))
7706 (arguments
7707 `(#:phases
7708 (modify-phases %standard-phases
7709 (replace 'check
7710 (lambda _
7711 ;; Bypass setuptools-shim because one test relies on "setup.py"
7712 ;; being the first argument passed to the python call.
7713 ;;
7714 ;; NOTE: Many tests do not run because they rely on Python's
7715 ;; built-in test.test_argparse, but we remove the unit tests from
7716 ;; our Python installation.
7717 (invoke "python" "setup.py" "test"))))))
7718 (synopsis "Replacement for argparse")
7719 (description "A drop-in replacement for argparse that allows options to also
7720 be set via config files and/or environment variables.")
7721 (home-page "https://github.com/bw2/ConfigArgParse")
7722 (license license:expat)))
7723
7724 (define-public python2-configargparse
7725 (package-with-python2 python-configargparse))
7726
7727 (define-public python-argparse-manpage
7728 (package
7729 (name "python-argparse-manpage")
7730 (version "1.1")
7731 (source
7732 (origin
7733 (method url-fetch)
7734 (uri (pypi-uri "argparse-manpage" version))
7735 (sha256
7736 (base32
7737 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
7738 (build-system python-build-system)
7739 (home-page "https://github.com/praiskup/argparse-manpage")
7740 (synopsis "Build manual page from Python's ArgumentParser object")
7741 (description
7742 "This package provides tools to build manual pages from Python's
7743 @code{ArgumentParser} object.")
7744 (license license:asl2.0)))
7745
7746 (define-public python2-contextlib2
7747 (package
7748 (name "python2-contextlib2")
7749 (version "0.5.5")
7750 (source
7751 (origin
7752 (method url-fetch)
7753 (uri (pypi-uri "contextlib2" version))
7754 (sha256
7755 (base32
7756 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
7757 (build-system python-build-system)
7758 (arguments
7759 `(#:python ,python-2
7760 #:phases
7761 (modify-phases %standard-phases
7762 (replace 'check
7763 (lambda _ (invoke "python" "test_contextlib2.py" "-v"))))))
7764 (native-inputs
7765 `(("python2-unittest2" ,python2-unittest2)))
7766 (home-page "http://contextlib2.readthedocs.org/")
7767 (synopsis "Tools for decorators and context managers")
7768 (description "This module is primarily a backport of the Python
7769 3.2 contextlib to earlier Python versions. Like contextlib, it
7770 provides utilities for common tasks involving decorators and context
7771 managers. It also contains additional features that are not part of
7772 the standard library.")
7773 (license license:psfl)))
7774
7775 (define-public python-texttable
7776 (package
7777 (name "python-texttable")
7778 (version "0.8.7")
7779 (source
7780 (origin
7781 (method url-fetch)
7782 (uri (pypi-uri "texttable" version))
7783 (sha256
7784 (base32
7785 "1liiiydgkg37i46a418aw19fyf6z3ds51wdwwpyjbs12x0phhf4a"))))
7786 (build-system python-build-system)
7787 (arguments '(#:tests? #f)) ; no tests
7788 (home-page "https://github.com/foutaise/texttable/")
7789 (synopsis "Python module for creating simple ASCII tables")
7790 (description "Texttable is a Python module for creating simple ASCII
7791 tables.")
7792 (license license:lgpl2.1+)))
7793
7794 (define-public python2-texttable
7795 (package-with-python2 python-texttable))
7796
7797 (define-public python-atomicwrites
7798 (package
7799 (name "python-atomicwrites")
7800 (version "1.1.5")
7801 (source (origin
7802 (method url-fetch)
7803 (uri (pypi-uri "atomicwrites" version))
7804 (sha256
7805 (base32
7806 "11bm90fwm2avvf4f3ib8g925w7jr4m11vcsinn1bi6ns4bm32214"))))
7807 (build-system python-build-system)
7808 (synopsis "Atomic file writes in Python")
7809 (description "Library for atomic file writes using platform dependent tools
7810 for atomic file system operations.")
7811 (home-page "https://github.com/untitaker/python-atomicwrites")
7812 (license license:expat)))
7813
7814 (define-public python2-atomicwrites
7815 (package-with-python2 python-atomicwrites))
7816
7817 (define-public python-click-threading
7818 (package
7819 (name "python-click-threading")
7820 (version "0.4.4")
7821 (source (origin
7822 (method url-fetch)
7823 (uri (pypi-uri "click-threading" version))
7824 (sha256
7825 (base32
7826 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
7827 (build-system python-build-system)
7828 (propagated-inputs
7829 `(("python-click" ,python-click)))
7830 (synopsis "Utilities for multithreading in Click")
7831 (description "This package provides utilities for multithreading in Click
7832 applications.")
7833 (home-page "https://github.com/click-contrib/click-threading")
7834 (license license:expat)))
7835
7836 (define-public python-click-log
7837 (package
7838 (name "python-click-log")
7839 (version "0.3.2")
7840 (source (origin
7841 (method url-fetch)
7842 (uri (pypi-uri "click-log" version))
7843 (sha256
7844 (base32
7845 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
7846 (build-system python-build-system)
7847 (propagated-inputs
7848 `(("python-click" ,python-click)))
7849 (synopsis "Logging for click applications")
7850 (description "This package provides a Python library for logging Click
7851 applications.")
7852 (home-page "https://github.com/click-contrib/click-log")
7853 (license license:expat)))
7854
7855 (define-public python-apipkg
7856 (package
7857 (name "python-apipkg")
7858 (version "1.4")
7859 (source (origin
7860 (method url-fetch)
7861 (uri (pypi-uri "apipkg" version))
7862 (sha256
7863 (base32
7864 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
7865 (build-system python-build-system)
7866 (native-inputs
7867 `(("python-pytest" ,python-pytest)))
7868 (synopsis "Namespace control and lazy-import mechanism")
7869 (description "With apipkg you can control the exported namespace of a Python
7870 package and greatly reduce the number of imports for your users. It is a small
7871 pure Python module that works on virtually all Python versions.")
7872 (home-page "https://github.com/pytest-dev/apipkg")
7873 (license license:expat)))
7874
7875 (define-public python2-apipkg
7876 (package-with-python2 python-apipkg))
7877
7878 (define-public python-execnet
7879 (package
7880 (name "python-execnet")
7881 (version "1.4.1")
7882 (source (origin
7883 (method url-fetch)
7884 (uri (pypi-uri "execnet" version))
7885 (sha256
7886 (base32
7887 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
7888 (build-system python-build-system)
7889 (arguments
7890 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
7891 ;; The two test failures are caused by the lack of an `ssh` executable.
7892 ;; The test suite can be run with pytest after the 'install' phase.
7893 #:tests? #f))
7894 (native-inputs
7895 `(("python-pytest" ,python-pytest)
7896 ("python-setuptools-scm" ,python-setuptools-scm)))
7897 (propagated-inputs
7898 `(("python-apipkg" ,python-apipkg)))
7899 (synopsis "Rapid multi-Python deployment")
7900 (description "Execnet provides a share-nothing model with
7901 channel-send/receive communication for distributing execution across many
7902 Python interpreters across version, platform and network barriers. It has a
7903 minimal and fast API targeting the following uses:
7904 @enumerate
7905 @item distribute tasks to (many) local or remote CPUs
7906 @item write and deploy hybrid multi-process applications
7907 @item write scripts to administer multiple environments
7908 @end enumerate")
7909 (home-page "http://codespeak.net/execnet/")
7910 (license license:expat)))
7911
7912 (define-public python2-execnet
7913 (package-with-python2 python-execnet))
7914
7915 (define-public python-icalendar
7916 (package
7917 (name "python-icalendar")
7918 (version "4.0.3")
7919 (source (origin
7920 (method url-fetch)
7921 (uri (pypi-uri "icalendar" version))
7922 (sha256
7923 (base32
7924 "0mk3dk1dxkcm46jy48v27j2w2349iv4sbimqj1yb5js43mx49hh7"))))
7925 (build-system python-build-system)
7926 (propagated-inputs
7927 `(("python-dateutil" ,python-dateutil)
7928 ("python-pytz" ,python-pytz)))
7929 (synopsis "Python library for parsing iCalendar files")
7930 (description "The icalendar package is a parser/generator of iCalendar
7931 files for use with Python.")
7932 (home-page "https://github.com/collective/icalendar")
7933 (license license:bsd-2)))
7934
7935 (define-public python-args
7936 (package
7937 (name "python-args")
7938 (version "0.1.0")
7939 (source (origin
7940 (method url-fetch)
7941 (uri (pypi-uri "args" version))
7942 (sha256
7943 (base32
7944 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
7945 (build-system python-build-system)
7946 (home-page "https://github.com/kennethreitz/args")
7947 (synopsis "Command-line argument parser")
7948 (description
7949 "This library provides a Python module to parse command-line arguments.")
7950 (license license:bsd-3)))
7951
7952 (define-public python2-args
7953 (package-with-python2 python-args))
7954
7955 (define-public python-clint
7956 (package
7957 (name "python-clint")
7958 (version "0.5.1")
7959 (source (origin
7960 (method url-fetch)
7961 (uri (pypi-uri "clint" version))
7962 (sha256
7963 (base32
7964 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
7965 (build-system python-build-system)
7966 (arguments
7967 '(#:phases
7968 (modify-phases %standard-phases
7969 (replace 'check
7970 (lambda _ (invoke "py.test" "-v"))))))
7971 (native-inputs
7972 `(("python-pytest" ,python-pytest)))
7973 (propagated-inputs
7974 `(("python-args" ,python-args)))
7975 (home-page "https://github.com/kennethreitz/clint")
7976 (synopsis "Command-line interface tools")
7977 (description
7978 "Clint is a Python module filled with a set of tools for developing
7979 command-line applications, including tools for colored and indented
7980 output, progress bar display, and pipes.")
7981 (license license:isc)))
7982
7983 (define-public python2-clint
7984 (package-with-python2 python-clint))
7985
7986 (define-public python-rply
7987 (package
7988 (name "python-rply")
7989 (version "0.7.5")
7990 (source (origin
7991 (method url-fetch)
7992 (uri (pypi-uri "rply" version))
7993 (sha256
7994 (base32
7995 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
7996 (build-system python-build-system)
7997 (propagated-inputs
7998 `(("python-appdirs" ,python-appdirs)))
7999 (home-page "https://github.com/alex/rply")
8000 (synopsis "Parser generator for Python")
8001 (description
8002 "This package provides a pure Python based parser generator, that also
8003 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8004 with a new public API, and RPython support.")
8005 (license license:bsd-3)))
8006
8007 (define-public python2-rply
8008 (package-with-python2 python-rply))
8009
8010 (define-public python-hy
8011 (package
8012 (name "python-hy")
8013 (version "0.13.0")
8014 (source (origin
8015 (method url-fetch)
8016 (uri (pypi-uri "hy" version))
8017 (sha256
8018 (base32
8019 "19sfymaksx9jhksfnb15ahid46mzrhdfzz6yy2craz2qnzvpmky8"))))
8020 (build-system python-build-system)
8021 (arguments
8022 '(#:phases
8023 (modify-phases %standard-phases
8024 (replace 'check
8025 (lambda _
8026 ;; Tests require write access to HOME.
8027 (setenv "HOME" "/tmp")
8028 (invoke "nosetests"))))))
8029 (native-inputs
8030 `(("python-coverage" ,python-coverage)
8031 ("python-nose" ,python-nose)))
8032 (propagated-inputs
8033 `(("python-astor" ,python-astor)
8034 ("python-clint" ,python-clint)
8035 ("python-rply" ,python-rply)))
8036 (home-page "http://hylang.org/")
8037 (synopsis "Lisp frontend to Python")
8038 (description
8039 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8040 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8041 Python at your fingertips, in Lisp form.")
8042 (license license:expat)))
8043
8044 (define-public python2-hy
8045 (package-with-python2 python-hy))
8046
8047 (define-public python2-functools32
8048 (package
8049 (name "python2-functools32")
8050 (version "3.2.3-2")
8051 (source
8052 (origin
8053 (method url-fetch)
8054 (uri (pypi-uri "functools32" version))
8055 (sha256
8056 (base32
8057 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8058 (build-system python-build-system)
8059 (arguments
8060 `(#:python ,python-2
8061 #:tests? #f)) ; no test target
8062 (home-page "https://github.com/MiCHiLU/python-functools32")
8063 (synopsis
8064 "Backport of the functools module from Python 3.2.3")
8065 (description
8066 "This package is a backport of the @code{functools} module from Python
8067 3.2.3 for use with older versions of Python and PyPy.")
8068 (license license:expat)))
8069
8070 (define-public python2-subprocess32
8071 (package
8072 (name "python2-subprocess32")
8073 (version "3.2.7")
8074 (source (origin
8075 (method url-fetch)
8076 (uri (pypi-uri "subprocess32" version))
8077 (sha256
8078 (base32
8079 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
8080 (patches
8081 (search-patches "python2-subprocess32-disable-input-test.patch"))))
8082 (build-system python-build-system)
8083 (arguments
8084 `(#:python ,python-2
8085 ;; The test suite fails with Python > 2.7.13:
8086 ;; import test.support
8087 ;; ImportError: No module named support
8088 #:tests? #f
8089 #:phases
8090 (modify-phases %standard-phases
8091 (add-after 'unpack 'patch-/bin/sh
8092 (lambda _
8093 (substitute* '("subprocess32.py"
8094 "test_subprocess32.py")
8095 (("/bin/sh") (which "sh")))
8096 #t)))))
8097 (home-page "https://github.com/google/python-subprocess32")
8098 (synopsis "Backport of the subprocess module from Python 3.2")
8099 (description
8100 "This is a backport of the @code{subprocess} standard library module
8101 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
8102 new features. On POSIX systems it is guaranteed to be reliable when used
8103 in threaded applications. It includes timeout support from Python 3.3 but
8104 otherwise matches 3.2’s API.")
8105 (license license:psfl)))
8106
8107 (define-public python2-futures
8108 (package
8109 (name "python2-futures")
8110 (version "3.2.0")
8111 (source
8112 (origin
8113 (method url-fetch)
8114 (uri (pypi-uri "futures" version))
8115 (sha256
8116 (base32
8117 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
8118 (build-system python-build-system)
8119 (arguments `(#:python ,python-2
8120 ;; FIXME: Python 2.7.14 moved the test.support library,
8121 ;; but our package has not yet been adjusted. Enable
8122 ;; tests when the python2 package has been fixed.
8123 #:tests? #f))
8124 (home-page "https://github.com/agronholm/pythonfutures")
8125 (synopsis
8126 "Backport of the concurrent.futures package from Python 3.2")
8127 (description
8128 "The concurrent.futures module provides a high-level interface for
8129 asynchronously executing callables. This package backports the
8130 concurrent.futures package from Python 3.2")
8131 (license license:bsd-3)))
8132
8133 (define-public python-promise
8134 (package
8135 (name "python-promise")
8136 (version "0.4.2")
8137 (source
8138 (origin
8139 (method url-fetch)
8140 (uri (pypi-uri "promise" version))
8141 (sha256
8142 (base32
8143 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8144 (build-system python-build-system)
8145 ;; Tests wants python-futures, which is a python2 only program, and
8146 ;; can't be found by python-promise at test time.
8147 (arguments `(#:tests? #f))
8148 (home-page "https://github.com/syrusakbary/promise")
8149 (synopsis "Promises/A+ implementation for Python")
8150 (description
8151 "Promises/A+ implementation for Python")
8152 (properties `((python2-variant . ,(delay python2-promise))))
8153 (license license:expat)))
8154
8155 (define-public python2-promise
8156 (let ((promise (package-with-python2
8157 (strip-python2-variant python-promise))))
8158 (package (inherit promise)
8159 (arguments (substitute-keyword-arguments (package-arguments promise)
8160 ((#:tests? _) #t)))
8161 (native-inputs
8162 `(("python2-futures" ,python2-futures)
8163 ("python2-pytest" ,python2-pytest)
8164 ,@(package-native-inputs promise))))))
8165
8166 (define-public python-colorama
8167 (package
8168 (name "python-colorama")
8169 (version "0.3.9")
8170 (source
8171 (origin
8172 (method url-fetch)
8173 (uri (pypi-uri "colorama" version))
8174 (sha256
8175 (base32
8176 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
8177 (build-system python-build-system)
8178 (synopsis "Colored terminal text rendering for Python")
8179 (description "Colorama is a Python library for rendering colored terminal
8180 text.")
8181 (home-page "https://pypi.python.org/pypi/colorama")
8182 (license license:bsd-3)))
8183
8184 (define-public python2-colorama
8185 (package-with-python2 python-colorama))
8186
8187 (define-public python-rsa
8188 (package
8189 (name "python-rsa")
8190 (version "3.4.2")
8191 (source
8192 (origin
8193 (method url-fetch)
8194 (uri (pypi-uri "rsa" version))
8195 (sha256
8196 (base32
8197 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
8198 (build-system python-build-system)
8199 (propagated-inputs
8200 `(("python-pyasn1" ,python-pyasn1)))
8201 (synopsis "Pure-Python RSA implementation")
8202 (description "Python-RSA is a pure-Python RSA implementation. It supports
8203 encryption and decryption, signing and verifying signatures, and key
8204 generation according to PKCS#1 version 1.5. It can be used as a Python
8205 library as well as on the command line.")
8206 (home-page "https://stuvel.eu/rsa")
8207 (license license:asl2.0)))
8208
8209 (define-public python2-rsa
8210 (package-with-python2 python-rsa))
8211
8212 (define-public python-pluggy
8213 (package
8214 (name "python-pluggy")
8215 (version "0.7.1")
8216 (source
8217 (origin
8218 (method url-fetch)
8219 (uri (pypi-uri "pluggy" version))
8220 (sha256
8221 (base32
8222 "1qbn70mksmr03hac6jgp6fiqc4l7859z8dchx2x950vhlij87swm"))))
8223 (build-system python-build-system)
8224 (native-inputs
8225 `(("python-setuptools-scm" ,python-setuptools-scm)))
8226 (synopsis "Plugin and hook calling mechanism for Python")
8227 (description "Pluggy is an extraction of the plugin manager as used by
8228 Pytest but stripped of Pytest specific details.")
8229 (home-page "https://pypi.python.org/pypi/pluggy")
8230 (license license:expat)))
8231
8232 (define-public python2-pluggy
8233 (package-with-python2 python-pluggy))
8234
8235 (define-public python-tox
8236 (package
8237 (name "python-tox")
8238 (version "2.8.1")
8239 (source
8240 (origin
8241 (method url-fetch)
8242 (uri (pypi-uri "tox" version))
8243 (sha256
8244 (base32
8245 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
8246 (build-system python-build-system)
8247 (arguments
8248 ;; FIXME: Tests require pytest-timeout, which itself requires
8249 ;; pytest>=2.8.0 for installation.
8250 '(#:tests? #f))
8251 (propagated-inputs
8252 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
8253 ("python-py" ,python-py)
8254 ("python-virtualenv" ,python-virtualenv)))
8255 (native-inputs
8256 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
8257 ("python-pytest" ,python-pytest) ; >= 2.3.5
8258 ("python-setuptools-scm" ,python-setuptools-scm)))
8259 (home-page "http://tox.testrun.org/")
8260 (synopsis "Virtualenv-based automation of test activities")
8261 (description "Tox is a generic virtualenv management and test command line
8262 tool. It can be used to check that a package installs correctly with
8263 different Python versions and interpreters, or run tests in each type of
8264 supported environment, or act as a frontend to continuous integration
8265 servers.")
8266 (license license:expat)))
8267
8268 (define-public python2-tox
8269 (package-with-python2 python-tox))
8270
8271 (define-public python-jmespath
8272 (package
8273 (name "python-jmespath")
8274 (version "0.9.3")
8275 (source
8276 (origin
8277 (method url-fetch)
8278 (uri (pypi-uri "jmespath" version))
8279 (sha256
8280 (base32
8281 "0r7wc7fsxmlwzxx9j1j7rms06c6xs6d4sysirdhz1jk2mb4x90ba"))))
8282 (build-system python-build-system)
8283 (native-inputs
8284 `(("python-nose" ,python-nose)))
8285 (synopsis "JSON Matching Expressions")
8286 (description "JMESPath (pronounced “james path”) is a Python library that
8287 allows one to declaratively specify how to extract elements from a JSON
8288 document.")
8289 (home-page "https://github.com/jmespath/jmespath.py")
8290 (license license:expat)))
8291
8292 (define-public python2-jmespath
8293 (package-with-python2 python-jmespath))
8294
8295 (define-public python-botocore
8296 (package
8297 (name "python-botocore")
8298 (version "1.8.43")
8299 (source
8300 (origin
8301 (method url-fetch)
8302 (uri (pypi-uri "botocore" version))
8303 (sha256
8304 (base32
8305 "12cqpbnz3vfv41mp9admvciw7bc7hz57sjpqs2bxaw9wnfmbw5lg"))))
8306 (build-system python-build-system)
8307 (arguments
8308 ;; FIXME: Many tests are failing.
8309 '(#:tests? #f))
8310 (propagated-inputs
8311 `(("python-dateutil" ,python-dateutil)
8312 ("python-docutils" ,python-docutils)
8313 ("python-jmespath" ,python-jmespath)))
8314 (native-inputs
8315 `(("python-mock" ,python-mock)
8316 ("python-nose" ,python-nose)
8317 ("behave" ,behave)
8318 ("python-tox" ,python-tox)
8319 ("python-wheel" ,python-wheel)))
8320 (home-page "https://github.com/boto/botocore")
8321 (synopsis "Low-level interface to AWS")
8322 (description "Botocore is a Python library that provides a low-level
8323 interface to the Amazon Web Services (AWS) API.")
8324 (license license:asl2.0)))
8325
8326 (define-public python2-botocore
8327 (package-with-python2 python-botocore))
8328
8329 (define-public python-xdo
8330 (package
8331 (name "python-xdo")
8332 (version "0.3")
8333 (source (origin
8334 (method url-fetch)
8335 (uri (string-append
8336 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8337 "python-xdo_" version ".orig.tar.gz"))
8338 (sha256
8339 (base32
8340 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
8341 (build-system python-build-system)
8342 (arguments
8343 '(#:phases
8344 (modify-phases %standard-phases
8345 (add-before 'install 'patch-libxdo-path
8346 ;; Hardcode the path of dynamically loaded libxdo library.
8347 (lambda* (#:key inputs #:allow-other-keys)
8348 (let ((libxdo (string-append
8349 (assoc-ref inputs "xdotool")
8350 "/lib/libxdo.so")))
8351 (substitute* "xdo/_xdo.py"
8352 (("find_library\\(\"xdo\"\\)")
8353 (simple-format #f "\"~a\"" libxdo)))
8354 #t))))
8355 #:tests? #f)) ; no tests provided
8356 (propagated-inputs
8357 `(("python-six" ,python-six)))
8358 (inputs
8359 `(("xdotool" ,xdotool)
8360 ("libX11" ,libx11)))
8361 (home-page "https://tracker.debian.org/pkg/python-xdo")
8362 (synopsis "Python library for simulating X11 keyboard/mouse input")
8363 (description "Provides bindings to libxdo for manipulating X11 via simulated
8364 input. (Note that this is mostly a legacy library; you may wish to look at
8365 python-xdo for newer bindings.)")
8366 (license license:bsd-3)))
8367
8368 (define-public python2-xdo
8369 (package-with-python2 python-xdo))
8370
8371 (define-public python-mako
8372 (package
8373 (name "python-mako")
8374 (version "1.0.10")
8375 (source
8376 (origin
8377 (method url-fetch)
8378 (uri (pypi-uri "Mako" version))
8379 (sha256
8380 (base32
8381 "0r9rysn19fmrxnzfcn7sg20kjhcrx9qri0my9n5vdzp1g2g92rbi"))))
8382 (build-system python-build-system)
8383 (propagated-inputs
8384 `(("python-markupsafe" ,python-markupsafe)))
8385 (native-inputs
8386 `(("python-mock" ,python-mock)
8387 ("python-nose" ,python-nose)
8388 ("python-pytest" ,python-pytest)))
8389 (home-page "https://www.makotemplates.org/")
8390 (synopsis "Templating language for Python")
8391 (description "Mako is a templating language for Python that compiles
8392 templates into Python modules.")
8393 (license license:expat)))
8394
8395 (define-public python2-mako
8396 (package-with-python2 python-mako))
8397
8398 (define-public python-waitress
8399 (package
8400 (name "python-waitress")
8401 (version "1.1.0")
8402 (source
8403 (origin
8404 (method url-fetch)
8405 (uri (pypi-uri "waitress" version))
8406 (patches (search-patches "python-waitress-fix-tests.patch"))
8407 (sha256
8408 (base32
8409 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
8410 (build-system python-build-system)
8411 (home-page "https://github.com/Pylons/waitress")
8412 (synopsis "Waitress WSGI server")
8413 (description "Waitress is meant to be a production-quality pure-Python WSGI
8414 server with very acceptable performance.")
8415 (license license:zpl2.1)))
8416
8417 (define-public python2-waitress
8418 (package-with-python2 python-waitress))
8419
8420 (define-public python-pyquery
8421 (package
8422 (name "python-pyquery")
8423 (version "1.2.17")
8424 (source
8425 (origin
8426 (method url-fetch)
8427 (uri (pypi-uri "pyquery" version))
8428 (sha256
8429 (base32
8430 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
8431 (build-system python-build-system)
8432 (native-inputs
8433 `(("python-webob" ,python-webob)
8434 ("python-webtest" ,python-webtest)))
8435 (propagated-inputs
8436 `(("python-lxml" ,python-lxml)
8437 ("python-cssselect" ,python-cssselect)))
8438 (home-page "https://github.com/gawel/pyquery")
8439 (synopsis "Make jQuery-like queries on xml documents")
8440 (description "pyquery allows you to make jQuery queries on xml documents.
8441 The API is as much as possible the similar to jQuery. pyquery uses lxml for
8442 fast xml and html manipulation.")
8443 (license license:bsd-3)))
8444
8445 (define-public python-anyjson
8446 (package
8447 (name "python-anyjson")
8448 (version "0.3.3")
8449 (source
8450 (origin
8451 (method url-fetch)
8452 (uri (pypi-uri "anyjson" version))
8453 (sha256
8454 (base32
8455 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
8456 (build-system python-build-system)
8457 (arguments
8458 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
8459 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
8460 ;; whatever) so this transformation needs to be done before the tests
8461 ;; can be run. Maybe we could add a build step to transform beforehand
8462 ;; but it could be annoying/difficult.
8463 ;; We can enable tests for the Python 2 version, though, and do below.
8464 #:tests? #f))
8465 (home-page "https://bitbucket.org/runeh/anyjson/")
8466 (synopsis
8467 "Wraps best available JSON implementation in a common interface")
8468 (description
8469 "Anyjson loads whichever is the fastest JSON module installed
8470 and provides a uniform API regardless of which JSON implementation is used.")
8471 (license license:bsd-3)
8472 (properties `((python2-variant . ,(delay python2-anyjson))))))
8473
8474 (define-public python2-anyjson
8475 (let ((anyjson (package-with-python2
8476 (strip-python2-variant python-anyjson))))
8477 (package
8478 (inherit anyjson)
8479 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
8480 #:tests? #t
8481 ,@(package-arguments anyjson)))
8482 (native-inputs `(("python2-nose" ,python2-nose))))))
8483
8484 (define-public python-amqp
8485 (package
8486 (name "python-amqp")
8487 (version "2.3.2")
8488 (source
8489 (origin
8490 (method url-fetch)
8491 (uri (pypi-uri "amqp" version))
8492 (sha256
8493 (base32
8494 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
8495 (build-system python-build-system)
8496 (native-inputs
8497 `(("python-case" ,python-case)
8498 ("python-pytest-sugar" ,python-pytest-sugar)
8499 ("python-mock" ,python-mock)))
8500 (propagated-inputs
8501 `(("python-vine" ,python-vine)))
8502 (home-page "https://github.com/celery/py-amqp")
8503 (synopsis
8504 "Low-level AMQP client for Python (fork of amqplib)")
8505 (description
8506 "This is a fork of amqplib which was originally written by Barry Pederson.
8507 It is maintained by the Celery project, and used by kombu as a pure python
8508 alternative when librabbitmq is not available.")
8509 (license license:lgpl2.1+)
8510 (properties `((python2-variant . ,(delay python2-amqp))))))
8511
8512 (define-public python2-amqp
8513 (let ((amqp (package-with-python2
8514 (strip-python2-variant python-amqp))))
8515 (package
8516 (inherit amqp)
8517 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
8518 ;; unmaintained. Weirdly, does not do this on the python 3
8519 ;; version?
8520 #:tests? #f
8521 ,@(package-arguments amqp))))))
8522
8523 (define-public python-txamqp
8524 (package
8525 (name "python-txamqp")
8526 (version "0.8.2")
8527 (source
8528 (origin
8529 (method url-fetch)
8530 (uri (pypi-uri "txAMQP" version))
8531 (sha256
8532 (base32
8533 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
8534 (build-system python-build-system)
8535 (propagated-inputs
8536 `(("python-six" ,python-six)
8537 ("python-twisted" ,python-twisted)))
8538 (home-page "https://github.com/txamqp/txamqp")
8539 (synopsis "Communicate with AMQP peers and brokers using Twisted")
8540 (description
8541 "This package provides a Python library for communicating with AMQP peers
8542 and brokers using the asynchronous networking framework Twisted. It contains
8543 all the necessary code to connect, send and receive messages to/from an
8544 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
8545 also includes support for using Thrift RPC over AMQP in Twisted
8546 applications.")
8547 (license license:asl2.0)))
8548
8549 (define-public python2-txamqp
8550 (package-with-python2 python-txamqp))
8551
8552 (define-public python-kombu
8553 (package
8554 (name "python-kombu")
8555 (version "4.2.2")
8556 (source
8557 (origin
8558 (method url-fetch)
8559 (uri (pypi-uri "kombu" version))
8560 (sha256
8561 (base32
8562 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
8563 (build-system python-build-system)
8564 (native-inputs
8565 `(("python-mock" ,python-mock)
8566 ("python-case" ,python-case)
8567 ("python-pyro4" ,python-pyro4)
8568 ("python-pytest-sugar" ,python-pytest-sugar)
8569 ("python-pytz" ,python-pytz)))
8570 (propagated-inputs
8571 `(("python-anyjson" ,python-anyjson)
8572 ("python-amqp" ,python-amqp)
8573 ("python-redis" ,python-redis)))
8574 (home-page "https://kombu.readthedocs.io")
8575 (synopsis "Message passing library for Python")
8576 (description "The aim of Kombu is to make messaging in Python as easy as
8577 possible by providing an idiomatic high-level interface for the AMQ protocol,
8578 and also provide proven and tested solutions to common messaging problems.
8579 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
8580 message orientation, queuing, routing, reliability and security, for which the
8581 RabbitMQ messaging server is the most popular implementation.")
8582 (license license:bsd-3)
8583 (properties `((python2-variant . ,(delay python2-kombu))))))
8584
8585 (define-public python2-kombu
8586 (let ((kombu (package-with-python2
8587 (strip-python2-variant python-kombu))))
8588 (package
8589 (inherit kombu)
8590 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
8591 ;; It works fine on the python3 variant.
8592 #:tests? #f
8593 ,@(package-arguments kombu)))
8594 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8595 ,@(package-native-inputs kombu))))))
8596
8597 (define-public python-billiard
8598 (package
8599 (name "python-billiard")
8600 (version "3.5.0.5")
8601 (source
8602 (origin
8603 (method url-fetch)
8604 (uri (pypi-uri "billiard" version))
8605 (sha256
8606 (base32
8607 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
8608 (build-system python-build-system)
8609 (native-inputs
8610 `(("python-case" ,python-case)
8611 ("python-pytest" ,python-pytest)))
8612 (home-page "https://github.com/celery/billiard")
8613 (synopsis
8614 "Python multiprocessing fork with improvements and bugfixes")
8615 (description
8616 "Billiard is a fork of the Python 2.7 multiprocessing package. The
8617 multiprocessing package itself is a renamed and updated version of R Oudkerk's
8618 pyprocessing package. This standalone variant is intended to be compatible with
8619 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
8620 (license license:bsd-3)
8621 (properties `((python2-variant . ,(delay python2-billiard))))))
8622
8623 (define-public python2-billiard
8624 (let ((billiard (package-with-python2
8625 (strip-python2-variant python-billiard))))
8626 (package
8627 (inherit billiard)
8628 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8629 ("python2-mock" ,python2-mock)
8630 ,@(package-native-inputs billiard))))))
8631
8632 (define-public python-celery
8633 (package
8634 (name "python-celery")
8635 (version "4.2.1")
8636 (source
8637 (origin
8638 (method url-fetch)
8639 (uri (pypi-uri "celery" version))
8640 (sha256
8641 (base32
8642 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
8643 (build-system python-build-system)
8644 (arguments
8645 '(;; TODO The tests fail with Python 3.7
8646 ;; https://github.com/celery/celery/issues/4849
8647 #:tests? #f
8648 #:phases
8649 (modify-phases %standard-phases
8650 (add-after 'unpack 'patch-requirements
8651 (lambda _
8652 (substitute* "requirements/test.txt"
8653 (("pytest>=3\\.0,<3\\.3")
8654 "pytest>=3.0"))
8655 #t)))))
8656 (native-inputs
8657 `(("python-case" ,python-case)
8658 ("python-pytest" ,python-pytest)))
8659 (propagated-inputs
8660 `(("python-pytz" ,python-pytz)
8661 ("python-billiard" ,python-billiard)
8662 ("python-kombu" ,python-kombu)))
8663 (home-page "https://celeryproject.org")
8664 (synopsis "Distributed Task Queue")
8665 (description "Celery is an asynchronous task queue/job queue based on
8666 distributed message passing. It is focused on real-time operation, but
8667 supports scheduling as well. The execution units, called tasks, are executed
8668 concurrently on a single or more worker servers using multiprocessing,
8669 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
8670 synchronously (wait until ready).")
8671 (license license:bsd-3)
8672 (properties `((python2-variant . ,(delay python2-celery))))))
8673
8674 (define-public python2-celery
8675 (let ((celery (package-with-python2
8676 (strip-python2-variant python-celery))))
8677 (package
8678 (inherit celery)
8679 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8680 ("python2-mock" ,python2-mock)
8681 ,@(package-native-inputs celery))))))
8682
8683 (define-public python-translitcodec
8684 (package
8685 (name "python-translitcodec")
8686 (version "0.4.0")
8687 (source
8688 (origin
8689 (method url-fetch)
8690 (uri (pypi-uri "translitcodec" version))
8691 (sha256
8692 (base32
8693 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
8694 (build-system python-build-system)
8695 (arguments
8696 `(#:tests? #f)) ; no tests provided
8697 (home-page
8698 "https://github.com/claudep/translitcodec")
8699 (synopsis
8700 "Unicode to 8-bit charset transliteration codec")
8701 (description
8702 "This package contains codecs for transliterating ISO 10646 texts into
8703 best-effort representations using smaller coded character sets (ASCII,
8704 ISO 8859, etc.).")
8705 (license license:expat)))
8706
8707 (define-public python2-translitcodec
8708 (package-with-python2 python-translitcodec))
8709
8710 (define-public python-editor
8711 (package
8712 (name "python-editor")
8713 (version "0.5")
8714 (source
8715 (origin
8716 (method url-fetch)
8717 (uri (pypi-uri "python-editor" version))
8718 (sha256
8719 (base32
8720 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
8721 (build-system python-build-system)
8722 (home-page
8723 "https://github.com/fmoo/python-editor")
8724 (synopsis
8725 "Programmatically open an editor, capture the result")
8726 (description
8727 "python-editor is a library that provides the editor module for
8728 programmatically interfacing with your system's $EDITOR.")
8729 (license license:asl2.0)))
8730
8731 (define-public python2-editor
8732 (package-with-python2 python-editor))
8733
8734 (define-public python-vobject
8735 (package
8736 (name "python-vobject")
8737 (version "0.9.5")
8738 (source (origin
8739 (method url-fetch)
8740 (uri (pypi-uri "vobject" version))
8741 (sha256
8742 (base32
8743 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
8744 (build-system python-build-system)
8745 (arguments
8746 '(;; The test suite relies on some non-portable Windows interfaces.
8747 #:tests? #f))
8748 (propagated-inputs
8749 `(("python-dateutil" ,python-dateutil)
8750 ("python-pyicu" ,python-pyicu)))
8751 (synopsis "Parse and generate vCard and vCalendar files")
8752 (description "Vobject is intended to be a full featured Python package for
8753 parsing and generating vCard and vCalendar files. Currently, iCalendar files
8754 are supported and well tested. vCard 3.0 files are supported, and all data
8755 should be imported, but only a few components are understood in a sophisticated
8756 way.")
8757 (home-page "http://eventable.github.io/vobject/")
8758 (license license:asl2.0)))
8759
8760 (define-public python2-vobject
8761 (package-with-python2 python-vobject))
8762
8763 (define-public python-munkres
8764 (package
8765 (name "python-munkres")
8766 (version "1.0.8")
8767 (source (origin
8768 (method url-fetch)
8769 (uri (pypi-uri "munkres" version))
8770 (sha256
8771 (base32
8772 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
8773 (build-system python-build-system)
8774 (arguments
8775 '(#:tests? #f)) ; no test suite
8776 (home-page "http://software.clapper.org/munkres/")
8777 (synopsis "Implementation of the Munkres algorithm")
8778 (description "The Munkres module provides an implementation of the Munkres
8779 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
8780 useful for solving the Assignment Problem.")
8781 (license license:bsd-3)))
8782
8783 (define-public python2-munkres
8784 (package-with-python2 python-munkres))
8785
8786 (define-public python-whoosh
8787 (package
8788 (name "python-whoosh")
8789 (version "2.7.4")
8790 (source
8791 (origin
8792 (method url-fetch)
8793 (uri (pypi-uri "Whoosh" version))
8794 (sha256
8795 (base32
8796 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
8797 (build-system python-build-system)
8798 (native-inputs
8799 `(("python-pytest" ,python-pytest)))
8800 (home-page "https://bitbucket.org/mchaput/whoosh")
8801 (synopsis "Full text indexing, search, and spell checking library")
8802 (description
8803 "Whoosh is a fast, pure-Python full text indexing, search, and spell
8804 checking library.")
8805 (license license:bsd-2)))
8806
8807 (define-public python2-whoosh
8808 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
8809 (package (inherit whoosh)
8810 (propagated-inputs
8811 `(("python2-backport-ssl-match-hostname"
8812 ,python2-backport-ssl-match-hostname)
8813 ,@(package-propagated-inputs whoosh))))))
8814
8815 (define-public python-pathlib
8816 (package
8817 (name "python-pathlib")
8818 (version "1.0.1")
8819 (source (origin
8820 (method url-fetch)
8821 (uri (pypi-uri "pathlib" version))
8822 (sha256
8823 (base32
8824 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
8825 (build-system python-build-system)
8826 ;; The tests depend on the internal "test" module, which does not provide
8827 ;; a stable interface.
8828 (arguments `(#:tests? #f))
8829 (home-page "https://pathlib.readthedocs.org/")
8830 (synopsis "Object-oriented file system paths")
8831 (description "Pathlib offers a set of classes to handle file system paths.
8832 It offers the following advantages over using string objects:
8833
8834 @enumerate
8835 @item No more cumbersome use of os and os.path functions. Everything can
8836 be done easily through operators, attribute accesses, and method calls.
8837 @item Embodies the semantics of different path types. For example,
8838 comparing Windows paths ignores casing.
8839 @item Well-defined semantics, eliminating any inconsistencies or
8840 ambiguities (forward vs. backward slashes, etc.).
8841 @end enumerate
8842
8843 Note: In Python 3.4, pathlib is now part of the standard library. For other
8844 Python versions please consider python-pathlib2 instead, which tracks the
8845 standard library module. This module (python-pathlib) isn't maintained
8846 anymore.")
8847 (license license:expat)))
8848
8849 (define-public python2-pathlib
8850 (package-with-python2 python-pathlib))
8851
8852 (define-public python2-pathlib2
8853 (package
8854 (name "python2-pathlib2")
8855 (version "2.3.2")
8856 (source (origin
8857 (method url-fetch)
8858 (uri (pypi-uri "pathlib2" version))
8859 (sha256
8860 (base32
8861 "10yb0iv5x2hs631rcppkhbddx799d3h8pcwmkbh2a66ns3w71ccf"))))
8862 (build-system python-build-system)
8863 ;; We only need the the Python 2 variant, since for Python 3 our minimum
8864 ;; version is 3.4 which already includes this package as part of the
8865 ;; standard library.
8866 (arguments
8867 `(#:python ,python-2))
8868 (propagated-inputs
8869 `(("python2-scandir" ,python2-scandir)
8870 ("python2-six" ,python2-six)))
8871 (home-page "https://pypi.python.org/pypi/pathlib2/")
8872 (synopsis "Object-oriented file system paths - backport of standard
8873 pathlib module")
8874 (description "The goal of pathlib2 is to provide a backport of standard
8875 pathlib module which tracks the standard library module, so all the newest
8876 features of the standard pathlib can be used also on older Python versions.
8877
8878 Pathlib offers a set of classes to handle file system paths. It offers the
8879 following advantages over using string objects:
8880
8881 @enumerate
8882 @item No more cumbersome use of os and os.path functions. Everything can
8883 be done easily through operators, attribute accesses, and method calls.
8884 @item Embodies the semantics of different path types. For example,
8885 comparing Windows paths ignores casing.
8886 @item Well-defined semantics, eliminating any inconsistencies or
8887 ambiguities (forward vs. backward slashes, etc.).
8888 @end enumerate")
8889 (license license:expat)))
8890
8891 (define-public python2-pathlib2-bootstrap
8892 (hidden-package
8893 (package
8894 (inherit python2-pathlib2)
8895 (name "python2-pathlib2-bootstrap")
8896 (propagated-inputs
8897 `(("python2-scandir" ,python2-scandir)
8898 ("python2-six" ,python2-six-bootstrap))))))
8899
8900 (define-public python-jellyfish
8901 (package
8902 (name "python-jellyfish")
8903 (version "0.5.6")
8904 (source (origin
8905 (method url-fetch)
8906 (uri (pypi-uri "jellyfish" version))
8907 (sha256
8908 (base32
8909 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
8910 (build-system python-build-system)
8911 (native-inputs
8912 `(("python-pytest" ,python-pytest)))
8913 (home-page "https://github.com/jamesturk/jellyfish")
8914 (synopsis "Approximate and phonetic matching of strings")
8915 (description "Jellyfish uses a variety of string comparison and phonetic
8916 encoding algorithms to do fuzzy string matching.")
8917 (license license:bsd-2)
8918 (properties `((python2-variant . ,(delay python2-jellyfish))))))
8919
8920 (define-public python2-jellyfish
8921 (let ((jellyfish (package-with-python2
8922 (strip-python2-variant python-jellyfish))))
8923 (package (inherit jellyfish)
8924 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
8925 ,@(package-native-inputs jellyfish))))))
8926
8927 (define-public python2-unicodecsv
8928 (package
8929 (name "python2-unicodecsv")
8930 (version "0.14.1")
8931 (source (origin
8932 (method url-fetch)
8933 ;; The test suite is not included in the PyPi release.
8934 ;; https://github.com/jdunck/python-unicodecsv/issues/19
8935 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
8936 "archive/" version ".tar.gz"))
8937 (file-name (string-append name "-" version ".tar.gz"))
8938 (sha256
8939 (base32
8940 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
8941 (build-system python-build-system)
8942 (arguments
8943 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
8944 #:python ,python-2))
8945 (native-inputs
8946 `(("python2-unittest2" ,python2-unittest2)))
8947 (home-page "https://github.com/jdunck/python-unicodecsv")
8948 (synopsis "Unicode CSV module for Python 2")
8949 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
8950 module, adding support for Unicode strings.")
8951 (license license:bsd-2)))
8952
8953 (define-public python-rarfile
8954 (package
8955 (name "python-rarfile")
8956 (version "2.8")
8957 (source (origin
8958 (method url-fetch)
8959 (uri (pypi-uri "rarfile" version))
8960 (sha256
8961 (base32
8962 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
8963 (build-system python-build-system)
8964 (arguments
8965 '(#:phases
8966 (modify-phases %standard-phases
8967 (replace 'check
8968 ;; Many tests fail, but the installation proceeds.
8969 (lambda _ (invoke "make" "-C" "test" "test"))))))
8970 (native-inputs
8971 `(("which" ,which))) ; required for tests
8972 (propagated-inputs
8973 `(("libarchive" ,libarchive)))
8974 (home-page "https://github.com/markokr/rarfile")
8975 (synopsis "RAR archive reader for Python")
8976 (description "This is Python module for RAR archive reading. The interface
8977 is made as zipfile like as possible.")
8978 (license license:isc)))
8979
8980 (define-public python2-rarfile
8981 (package-with-python2 python-rarfile))
8982
8983 (define-public python-magic
8984 (package
8985 (name "python-magic")
8986 (version "0.4.15")
8987 (source
8988 (origin
8989 (method url-fetch)
8990 (uri (pypi-uri "python-magic" version))
8991 (sha256
8992 (base32
8993 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
8994 (file-name (string-append name "-" version "-checkout"))))
8995 (build-system python-build-system)
8996 (arguments
8997 ;; The tests are unreliable, so don't run them. The tests fail
8998 ;; under Python3 because they were written for Python2 and
8999 ;; contain import statements that do not work in Python3. One of
9000 ;; the tests fails under Python2 because its assertions are
9001 ;; overly stringent; it relies on comparing output strings which
9002 ;; are brittle and can change depending on the version of
9003 ;; libmagic being used and the system on which the test is
9004 ;; running. In my case, under GuixSD 0.10.0, only one test
9005 ;; failed, and it seems to have failed only because the version
9006 ;; of libmagic that is packaged in Guix outputs a slightly
9007 ;; different (but not wrong) string than the one that the test
9008 ;; expected.
9009 '(#:tests? #f
9010 #:phases (modify-phases %standard-phases
9011 ;; Replace a specific method call with a hard-coded
9012 ;; path to the necessary libmagic.so file in the
9013 ;; store. If we don't do this, then the method call
9014 ;; will fail to find the libmagic.so file, which in
9015 ;; turn will cause any application using
9016 ;; python-magic to fail.
9017 (add-before 'build 'hard-code-path-to-libmagic
9018 (lambda* (#:key inputs #:allow-other-keys)
9019 (let ((file (assoc-ref inputs "file")))
9020 (substitute* "magic.py"
9021 (("ctypes.util.find_library\\('magic'\\)")
9022 (string-append "'" file "/lib/libmagic.so'")))
9023 #t)))
9024 (add-before 'install 'disable-egg-compression
9025 (lambda _
9026 (let ((port (open-file "setup.cfg" "a")))
9027 (display "\n[easy_install]\nzip_ok = 0\n"
9028 port)
9029 (close-port port)
9030 #t))))))
9031 (inputs
9032 ;; python-magic needs to be able to find libmagic.so.
9033 `(("file" ,file)))
9034 (home-page
9035 "https://github.com/ahupp/python-magic")
9036 (synopsis
9037 "File type identification using libmagic")
9038 (description
9039 "This module uses ctypes to access the libmagic file type
9040 identification library. It makes use of the local magic database and
9041 supports both textual and MIME-type output. Note that this module and
9042 the python-file module both provide a \"magic.py\" file; these two
9043 modules, which are different and were developed separately, both serve
9044 the same purpose: to provide Python bindings for libmagic.")
9045 (license license:expat)))
9046
9047 (define-public python2-magic
9048 (package-with-python2 python-magic))
9049
9050 (define-public python2-s3cmd
9051 (package
9052 (name "python2-s3cmd")
9053 (version "1.6.1")
9054 (source
9055 (origin
9056 (method url-fetch)
9057 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
9058 "s3cmd-" version ".tar.gz"))
9059 (sha256
9060 (base32
9061 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9062 (build-system python-build-system)
9063 (arguments
9064 ;; s3cmd is written for python2 only and contains no tests.
9065 `(#:python ,python-2
9066 #:tests? #f))
9067 (propagated-inputs
9068 `(("python2-dateutil" ,python2-dateutil)
9069 ;; The python-file package also provides a magic.py module.
9070 ;; This is an unfortunate state of affairs; however, s3cmd
9071 ;; fails to install if it cannot find specifically the
9072 ;; python-magic package. Thus we include it, instead of using
9073 ;; python-file. Ironically, s3cmd sometimes works better
9074 ;; without libmagic bindings at all:
9075 ;; https://github.com/s3tools/s3cmd/issues/198
9076 ("python2-magic" ,python2-magic)))
9077 (home-page "http://s3tools.org/s3cmd")
9078 (synopsis "Command line tool for S3-compatible storage services")
9079 (description
9080 "S3cmd is a command line tool for uploading, retrieving and managing data
9081 in storage services that are compatible with the Amazon Simple Storage
9082 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9083 GnuPG encryption, and more. It also supports management of Amazon's
9084 CloudFront content delivery network.")
9085 (license license:gpl2+)))
9086
9087 (define-public python-pkgconfig
9088 (package
9089 (name "python-pkgconfig")
9090 (version "1.3.1")
9091 (source
9092 (origin
9093 (method url-fetch)
9094 (uri (pypi-uri "pkgconfig" version))
9095 (sha256
9096 (base32
9097 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
9098 (build-system python-build-system)
9099 (native-inputs
9100 `(("python-nose" ,python-nose)))
9101 (inputs
9102 `(("pkg-config" ,pkg-config)))
9103 (arguments
9104 `(#:phases
9105 (modify-phases %standard-phases
9106 (add-before 'build 'patch
9107 ;; Hard-code the path to pkg-config.
9108 (lambda _
9109 (substitute* "pkgconfig/pkgconfig.py"
9110 (("cmd = 'pkg-config")
9111 (string-append "cmd = '" (which "pkg-config"))))
9112 #t))
9113 (replace 'check
9114 (lambda _
9115 (invoke "nosetests" "test.py"))))))
9116 (home-page "https://github.com/matze/pkgconfig")
9117 (synopsis "Python interface for pkg-config")
9118 (description "This module provides a Python interface to pkg-config. It
9119 can be used to find all pkg-config packages, check if a package exists,
9120 check if a package meets certain version requirements, query CFLAGS and
9121 LDFLAGS and parse the output to build extensions with setup.py.")
9122 (license license:expat)))
9123
9124 (define-public python2-pkgconfig
9125 (package-with-python2 python-pkgconfig))
9126
9127 (define-public python-bz2file
9128 (package
9129 (name "python-bz2file")
9130 (version "0.98")
9131 (source
9132 (origin
9133 (method url-fetch)
9134 (uri (pypi-uri "bz2file" version))
9135 (sha256
9136 (base32
9137 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9138 (build-system python-build-system)
9139 (arguments
9140 `(#:tests? #f)) ; Tests use deprecated python modules.
9141 (home-page "https://github.com/nvawda/bz2file")
9142 (synopsis "Read and write bzip2-compressed files")
9143 (description
9144 "Bz2file is a Python library for reading and writing bzip2-compressed
9145 files. It contains a drop-in replacement for the I/O interface in the
9146 standard library's @code{bz2} module, including features from the latest
9147 development version of CPython that are not available in older releases.")
9148 (license license:asl2.0)))
9149
9150 (define-public python2-bz2file
9151 (package-with-python2 python-bz2file))
9152
9153 (define-public python-future
9154 (package
9155 (name "python-future")
9156 (version "0.17.1")
9157 (source
9158 (origin
9159 (method url-fetch)
9160 (uri (pypi-uri "future" version))
9161 (sha256
9162 (base32
9163 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
9164 (build-system python-build-system)
9165 ;; Many tests connect to the network or are otherwise flawed.
9166 ;; https://github.com/PythonCharmers/python-future/issues/210
9167 (arguments
9168 `(#:tests? #f))
9169 (home-page "http://python-future.org")
9170 (synopsis "Single-source support for Python 3 and 2")
9171 (description
9172 "@code{python-future} is the missing compatibility layer between Python 2 and
9173 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9174 to support both Python 2 and Python 3 with minimal overhead.")
9175 (license license:expat)))
9176
9177 (define-public python2-future
9178 (package-with-python2 python-future))
9179
9180 (define-public python-cysignals
9181 (package
9182 (name "python-cysignals")
9183 (version "1.9.0")
9184 (source
9185 (origin
9186 (method url-fetch)
9187 (uri (pypi-uri "cysignals" version))
9188 (sha256
9189 (base32
9190 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
9191 (build-system python-build-system)
9192 (native-inputs
9193 `(("python-cython" ,python-cython)
9194 ("python-sphinx" ,python-sphinx)))
9195 (inputs
9196 `(("pari-gp" ,pari-gp)))
9197 (arguments
9198 `(#:modules ((guix build python-build-system)
9199 ((guix build gnu-build-system) #:prefix gnu:)
9200 (guix build utils))
9201 ;; FIXME: Tests are executed after installation and currently fail
9202 ;; when not installing into standard locations; the author is working
9203 ;; on a fix.
9204 #:tests? #f
9205 #:phases
9206 (modify-phases %standard-phases
9207 (add-before
9208 'build 'configure
9209 (assoc-ref gnu:%standard-phases 'configure)))))
9210 (home-page
9211 "https://github.com/sagemath/cysignals")
9212 (synopsis
9213 "Handling of interrupts and signals for Cython")
9214 (description
9215 "The cysignals package provides mechanisms to handle interrupts (and
9216 other signals and errors) in Cython code, using two related approaches,
9217 for mixed Cython/Python code or external C libraries and pure Cython code,
9218 respectively.")
9219 (license license:lgpl3+)))
9220
9221 (define-public python2-cysignals
9222 (package-with-python2 python-cysignals))
9223
9224 (define-public python2-shedskin
9225 (package
9226 (name "python2-shedskin")
9227 (version "0.9.4")
9228 (source
9229 (origin
9230 (method url-fetch)
9231 (uri (string-append "https://github.com/shedskin/shedskin/"
9232 "releases/download/v" version
9233 "/shedskin-" version ".tgz"))
9234 (sha256
9235 (base32
9236 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9237 (build-system python-build-system)
9238 (arguments
9239 `(#:python ,python-2
9240 #:phases (modify-phases %standard-phases
9241 (add-after 'unpack 'fix-resulting-include-libs
9242 (lambda* (#:key inputs #:allow-other-keys)
9243 (let ((libgc (assoc-ref inputs "libgc"))
9244 (pcre (assoc-ref inputs "pcre")))
9245 (substitute* "shedskin/makefile.py"
9246 (("variable == 'CCFLAGS':[ ]*")
9247 (string-append "variable == 'CCFLAGS':\n"
9248 " line += ' -I " pcre "/include"
9249 " -I " libgc "/include'"))
9250 (("variable == 'LFLAGS':[ ]*")
9251 (string-append "variable == 'LFLAGS':\n"
9252 " line += ' -L" pcre "/lib"
9253 " -L " libgc "/lib'")))
9254 #t))))))
9255 (inputs `(("pcre" ,pcre)
9256 ("libgc" ,libgc)))
9257 (home-page "https://shedskin.github.io/")
9258 (synopsis "Experimental Python-2 to C++ Compiler")
9259 (description (string-append "This is an experimental compiler for a subset of
9260 Python. It generates C++ code and a Makefile."))
9261 (license (list license:gpl3 license:bsd-3 license:expat))))
9262
9263 (define-public python2-rope
9264 (package
9265 (name "python2-rope")
9266 (version "0.11.0")
9267 (source
9268 (origin
9269 (method url-fetch)
9270 (uri (pypi-uri "rope" version))
9271 (sha256
9272 (base32
9273 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
9274 (arguments
9275 ;; Rope has only partial python3 support, see `python-rope'
9276 `(#:python ,python-2))
9277 (build-system python-build-system)
9278 (native-inputs
9279 `(("python2-unittest2" ,python2-unittest2)))
9280 (home-page "https://github.com/python-rope/rope")
9281 (synopsis "Refactoring library for Python")
9282 (description "Rope is a refactoring library for Python. It facilitates
9283 the renaming, moving and extracting of attributes, functions, modules, fields
9284 and parameters in Python 2 source code. These refactorings can also be applied
9285 to occurrences in strings and comments.")
9286 (license license:gpl2)))
9287
9288 (define-public python-rope
9289 (package
9290 (inherit python2-rope)
9291 (name "python-rope")
9292 (arguments `(#:python ,python-wrapper
9293 ;; XXX: Only partial python3 support, results in some failing
9294 ;; tests: <https://github.com/python-rope/rope/issues/247>.
9295 #:tests? #f))
9296 (properties `((python2-variant . ,(delay python2-rope))))))
9297
9298 (define-public python-py3status
9299 (package
9300 (name "python-py3status")
9301 (version "3.16")
9302 (source
9303 (origin
9304 (method url-fetch)
9305 (uri (pypi-uri "py3status" version))
9306 (sha256
9307 (base32
9308 "1xrfph277bgjln3jbpzpgkhxad04fjvj7s3xfil42q1sxi4s3q3g"))))
9309 (build-system python-build-system)
9310 (inputs
9311 `(("file" ,file)))
9312 (arguments
9313 '(#:phases
9314 (modify-phases %standard-phases
9315 ;; 'file' is used for detection of configuration file encoding
9316 ;; let's make link the dependency to particular input
9317 (add-before 'build 'patch-file-path
9318 (lambda* (#:key inputs #:allow-other-keys)
9319 (let ((file-path (assoc-ref inputs "file")))
9320 (substitute* "py3status/parse_config.py"
9321 (("\\['file', '-b'")
9322 (string-append "['" file-path "/bin/file', '-b'")))
9323 #t))))
9324 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
9325 (home-page "https://github.com/ultrabug/py3status")
9326 (synopsis "Extensible i3status wrapper written in Python")
9327 (description "py3status is an i3status wrapper which extends i3status
9328 functionality in a modular way, allowing you to extend your panel with your
9329 own code, responding to click events and updating clock every second.")
9330 (license license:bsd-3)))
9331
9332 (define-public python-tblib
9333 (package
9334 (name "python-tblib")
9335 (version "1.3.2")
9336 (source (origin
9337 (method url-fetch)
9338 (uri (pypi-uri "tblib" version))
9339 (sha256 (base32
9340 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
9341 (build-system python-build-system)
9342 (arguments
9343 `(#:phases
9344 (modify-phases %standard-phases
9345 (add-before 'check 'adjust-tests
9346 (lambda _
9347 (when (which "python3")
9348 ;; Adjust the example output to match that of Python 3.7:
9349 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
9350 (substitute* "README.rst"
9351 (("Exception\\('fail',") "Exception('fail'"))
9352 #t)))
9353 (replace 'check
9354 (lambda _
9355 ;; Upstream runs tests after installation and the package itself
9356 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
9357 ;; found.
9358 (setenv "PYTHONPATH"
9359 (string-append (getcwd) "/build/lib:"
9360 (getenv "PYTHONPATH")))
9361 (invoke "py.test" "-vv" "tests" "README.rst"))))))
9362 (native-inputs
9363 `(("python-pytest" ,python-pytest)
9364 ("python-six" ,python-six)))
9365 (home-page "https://github.com/ionelmc/python-tblib")
9366 (synopsis "Traceback serialization library")
9367 (description
9368 "Traceback serialization allows you to:
9369
9370 @enumerate
9371 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
9372 different processes. This allows better error handling when running code over
9373 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
9374
9375 @item Parse traceback strings and raise with the parsed tracebacks.
9376 @end enumerate\n")
9377 (license license:bsd-3)))
9378
9379 (define-public python2-tblib
9380 (package-with-python2 python-tblib))
9381
9382 (define-public python-greenlet
9383 (package
9384 (name "python-greenlet")
9385 (version "0.4.15")
9386 (source (origin
9387 (method url-fetch)
9388 (uri (pypi-uri "greenlet" version))
9389 (sha256
9390 (base32
9391 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
9392 (build-system python-build-system)
9393 (home-page "https://greenlet.readthedocs.io/")
9394 (synopsis "Lightweight in-process concurrent programming")
9395 (description
9396 "Greenlet package is a spin-off of Stackless, a version of CPython
9397 that supports micro-threads called \"tasklets\". Tasklets run
9398 pseudo-concurrently (typically in a single or a few OS-level threads) and
9399 are synchronized with data exchanges on \"channels\".")
9400 (license (list license:psfl license:expat))))
9401
9402 (define-public python2-greenlet
9403 (package-with-python2 python-greenlet))
9404
9405 (define-public python-objgraph
9406 (package
9407 (name "python-objgraph")
9408 (version "3.4.0")
9409 (source
9410 (origin
9411 (method url-fetch)
9412 (uri (pypi-uri "objgraph" version))
9413 (sha256
9414 (base32
9415 "184m09am5gpbqfaiy7l0hwh476mczbrly1dffs0rw2p1d1i2q32a"))))
9416 (build-system python-build-system)
9417 (propagated-inputs
9418 `(("python-graphviz" ,python-graphviz)))
9419 (native-inputs
9420 `(("python-mock" ,python-mock)
9421 ("graphviz" ,graphviz)))
9422 (home-page "https://mg.pov.lt/objgraph/")
9423 (synopsis "Draw Python object reference graphs with graphviz")
9424 (description
9425 "This package provides tools to draw Python object reference graphs with
9426 graphviz.")
9427 (license license:expat)))
9428
9429 (define-public python-gevent
9430 (package
9431 (name "python-gevent")
9432 (version "1.3.7")
9433 (source (origin
9434 (method url-fetch)
9435 (uri (pypi-uri "gevent" version))
9436 (sha256
9437 (base32
9438 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
9439 (modules '((guix build utils)))
9440 (snippet
9441 '(begin
9442 ;; unbunding libev and c-ares
9443 (delete-file-recursively "deps")
9444 #t))))
9445 (build-system python-build-system)
9446 (arguments
9447 `(#:modules ((ice-9 ftw)
9448 (ice-9 match)
9449 (srfi srfi-26)
9450 (guix build utils)
9451 (guix build python-build-system))
9452 #:phases (modify-phases %standard-phases
9453 (add-after 'unpack 'unpack-libev
9454 (lambda* (#:key inputs #:allow-other-keys)
9455 (mkdir-p "deps/libev")
9456 ;; FIXME: gevent requires building libev, even though
9457 ;; it only links against the proper one.
9458 (invoke "tar" "-xf" (assoc-ref inputs "libev-source")
9459 "--strip-components=1" "-C" "deps/libev")))
9460 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
9461 (lambda _
9462 (substitute* "src/gevent/subprocess.py"
9463 (("/bin/sh") (which "sh")))
9464 (for-each (lambda (file)
9465 (substitute* file
9466 (("/bin/sh") (which "sh"))
9467 (("/bin/true") (which "true"))))
9468 (find-files "src/greentest" "\\.py$"))
9469 #t))
9470 (add-before 'build 'do-not-use-bundled-sources
9471 (lambda* (#:key inputs #:allow-other-keys)
9472 (setenv "CONFIG_SHELL" (which "bash"))
9473 (setenv "LIBEV_EMBED" "false")
9474 (setenv "CARES_EMBED" "false")
9475 (setenv "EMBED" "false")
9476
9477 (let ((greenlet (string-append
9478 (assoc-ref inputs "python-greenlet")
9479 "/include")))
9480 (match (scandir greenlet
9481 (lambda (item)
9482 (string-prefix? "python" item)))
9483 ((python)
9484 (setenv "CPATH"
9485 (string-append greenlet "/" python)))))
9486 #t))
9487 (add-before 'check 'skip-timer-test
9488 (lambda _
9489 ;; XXX: Skip 'TestTimerResolution', which appears to be
9490 ;; unreliable.
9491 (substitute* "src/greentest/test__core_timer.py"
9492 (("not greentest.RUNNING_ON_CI") "False"))
9493 #t))
9494 (replace 'check
9495 (lambda _
9496 ;; Make sure the build directory is on PYTHONPATH.
9497 (setenv "PYTHONPATH"
9498 (string-append
9499 (getenv "PYTHONPATH") ":"
9500 (getcwd) "/build/"
9501 (car (scandir "build" (cut string-prefix? "lib." <>)))))
9502 (with-directory-excursion "src/greentest"
9503 ;; XXX: Many tests require network access. Instead we only
9504 ;; run known-good tests. Unfortunately we cannot use
9505 ;; recursion here since this directory also contains
9506 ;; Python-version-specific subfolders.
9507 (apply invoke "python" "testrunner.py" "--config"
9508 "known_failures.py"
9509 (scandir "." (cut regexp-exec
9510 (make-regexp "test_+(subprocess|core)")
9511 <>)))))))))
9512 (propagated-inputs
9513 `(("python-greenlet" ,python-greenlet)
9514 ("python-objgraph" ,python-objgraph)))
9515 (native-inputs
9516 `(("libev-source" ,(package-source libev))
9517 ("python-six" ,python-six)))
9518 (inputs
9519 `(("c-ares" ,c-ares)
9520 ("libev" ,libev)))
9521 (home-page "http://www.gevent.org/")
9522 (synopsis "Coroutine-based network library")
9523 (description
9524 "gevent is a coroutine-based Python networking library that uses greenlet
9525 to provide a high-level synchronous API on top of the libev event loop.")
9526 (license license:expat)
9527 (properties `((python2-variant . ,(delay python2-gevent))))))
9528
9529 (define-public python2-gevent
9530 (let ((base (package-with-python2
9531 (strip-python2-variant python-gevent))))
9532 (package
9533 (inherit base)
9534 (native-inputs `(,@(package-native-inputs python-gevent)
9535 ("python-mock" ,python2-mock))))))
9536
9537 (define-public python-fastimport
9538 (package
9539 (name "python-fastimport")
9540 (version "0.9.6")
9541 (source
9542 (origin
9543 (method url-fetch)
9544 (uri (pypi-uri "fastimport" version))
9545 (sha256
9546 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
9547 (build-system python-build-system)
9548 (home-page "https://github.com/jelmer/python-fastimport")
9549 (synopsis "VCS fastimport parser and generator in Python")
9550 (description "This package provides a parser for and generator of the Git
9551 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
9552 format.")
9553 (license license:gpl2+)))
9554
9555 (define-public python2-fastimport
9556 (package-with-python2 python-fastimport))
9557
9558 (define-public python-twisted
9559 (package
9560 (name "python-twisted")
9561 (version "19.2.0")
9562 (source (origin
9563 (method url-fetch)
9564 (uri (pypi-uri "Twisted" version ".tar.bz2"))
9565 (sha256
9566 (base32
9567 "1gmb8d57s13d8znvqnxi47vqzqz141z443dbxg9wjkp8ia9f220p"))))
9568 (build-system python-build-system)
9569 (arguments
9570 '(#:tests? #f)) ; FIXME: Some tests are failing.
9571 (propagated-inputs
9572 `(("python-zope-interface" ,python-zope-interface)
9573 ("python-pyhamcrest" ,python-pyhamcrest)
9574 ("python-incremental" ,python-incremental)
9575 ("python-hyperlink" ,python-hyperlink)
9576 ("python-constantly" ,python-constantly)
9577 ("python-automat" ,python-automat)))
9578 (home-page "https://twistedmatrix.com/")
9579 (synopsis "Asynchronous networking framework written in Python")
9580 (description
9581 "Twisted is an extensible framework for Python programming, with special
9582 focus on event-based network programming and multiprotocol integration.")
9583 (license license:expat)))
9584
9585 (define-public python2-twisted
9586 (package-with-python2 python-twisted))
9587
9588 (define-public python-pika
9589 (package
9590 (name "python-pika")
9591 (version "0.12.0")
9592 (source
9593 (origin
9594 (method url-fetch)
9595 (uri (pypi-uri "pika" version))
9596 (sha256
9597 (base32
9598 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
9599 (build-system python-build-system)
9600 (native-inputs
9601 `(("python-pyev" ,python-pyev)
9602 ("python-tornado" ,python-tornado)
9603 ("python-twisted" ,python-twisted)))
9604 (home-page "https://pika.readthedocs.org")
9605 (synopsis "Pure Python AMQP Client Library")
9606 (description
9607 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
9608 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
9609 network support library.")
9610 (license license:bsd-3)))
9611
9612 (define-public python2-pika
9613 (package-with-python2 python-pika))
9614
9615 (define-public python-ply
9616 (package
9617 (name "python-ply")
9618 (version "3.10")
9619 (source
9620 (origin
9621 (method url-fetch)
9622 (uri (pypi-uri "ply" version))
9623 (sha256
9624 (base32
9625 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
9626 (build-system python-build-system)
9627 (home-page "http://www.dabeaz.com/ply/")
9628 (synopsis "Python Lex & Yacc")
9629 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
9630 It uses LR parsing and does extensive error checking.")
9631 (license license:bsd-3)))
9632
9633 (define-public python2-ply
9634 (package-with-python2 python-ply))
9635
9636 (define-public python-tabulate
9637 (package
9638 (name "python-tabulate")
9639 (version "0.7.7")
9640 (source (origin
9641 (method url-fetch)
9642 (uri (pypi-uri "tabulate" version))
9643 (sha256
9644 (base32
9645 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
9646 (build-system python-build-system)
9647 (arguments
9648 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
9649 ;; and the latest release is not tagged in the upstream repository.
9650 '(#:tests? #f))
9651 (home-page "https://bitbucket.org/astanin/python-tabulate")
9652 (synopsis "Pretty-print tabular data")
9653 (description
9654 "Tabulate is a library and command-line utility to pretty-print tabular
9655 data in Python.")
9656 (license license:expat)))
9657
9658 (define-public python2-tabulate
9659 (package-with-python2 python-tabulate))
9660
9661 (define-public python-kazoo
9662 (package
9663 (name "python-kazoo")
9664 (version "2.4.0")
9665 (source
9666 (origin
9667 (method url-fetch)
9668 (uri (pypi-uri "kazoo" version))
9669 (sha256
9670 (base32
9671 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
9672 (build-system python-build-system)
9673 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
9674 (propagated-inputs
9675 `(("python-six" ,python-six)))
9676 (home-page "https://kazoo.readthedocs.org")
9677 (synopsis "High-level Zookeeper client library")
9678 (description
9679 "Kazoo is a Python client library for the Apache Zookeeper distributed
9680 application service. It is designed to be easy to use and to avoid common
9681 programming errors.")
9682 (license license:asl2.0)))
9683
9684 (define-public python2-kazoo
9685 (package-with-python2 python-kazoo))
9686
9687 (define-public python-pykafka
9688 (package
9689 (name "python-pykafka")
9690 (version "2.4.0")
9691 (source (origin
9692 (method url-fetch)
9693 (uri (pypi-uri "pykafka" version))
9694 (sha256
9695 (base32
9696 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
9697 (build-system python-build-system)
9698 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
9699 (propagated-inputs
9700 `(("python-gevent" ,python-gevent)
9701 ("python-kazoo" ,python-kazoo)
9702 ("python-tabulate" ,python-tabulate)))
9703 (inputs
9704 `(("librdkafka" ,librdkafka)))
9705 (home-page "https://pykafka.readthedocs.io/")
9706 (synopsis "Apache Kafka client for Python")
9707 (description
9708 "PyKafka is a client for the Apache Kafka distributed messaging system.
9709 It includes Python implementations of Kafka producers and consumers, which
9710 are optionally backed by a C extension built on librdkafka.")
9711 (license license:asl2.0)))
9712
9713 (define-public python2-pykafka
9714 (package-with-python2 python-pykafka))
9715
9716 (define-public python-wcwidth
9717 (package
9718 (name "python-wcwidth")
9719 (version "0.1.7")
9720 (source
9721 (origin
9722 (method url-fetch)
9723 (uri (pypi-uri "wcwidth" version))
9724 (sha256
9725 (base32
9726 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
9727 (build-system python-build-system)
9728 (home-page "https://github.com/jquast/wcwidth")
9729 (synopsis "Measure number of terminal column cells of wide-character codes")
9730 (description "Wcwidth measures the number of terminal column cells of
9731 wide-character codes. It is useful for those implementing a terminal emulator,
9732 or programs that carefully produce output to be interpreted by one. It is a
9733 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
9734 specified in POSIX.1-2001 and POSIX.1-2008.")
9735 (license license:expat)))
9736
9737 (define-public python2-wcwidth
9738 (package-with-python2 python-wcwidth))
9739
9740 (define-public python2-jsonrpclib
9741 (package
9742 (name "python2-jsonrpclib")
9743 (version "0.1.7")
9744 (source (origin
9745 (method url-fetch)
9746 (uri (pypi-uri "jsonrpclib" version))
9747 (sha256
9748 (base32
9749 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
9750 (build-system python-build-system)
9751 (arguments
9752 `(#:tests? #f
9753 #:python ,python-2))
9754 (home-page "https://github.com/joshmarshall/jsonrpclib/")
9755 (synopsis "Implementation of JSON-RPC specification for Python")
9756 (description
9757 "This library is an implementation of the JSON-RPC specification.
9758 It supports both the original 1.0 specification, as well as the
9759 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
9760 etc.")
9761 (license license:asl2.0)))
9762
9763 (define-public python-chai
9764 (package
9765 (name "python-chai")
9766 (version "1.1.2")
9767 (source (origin
9768 (method url-fetch)
9769 (uri (pypi-uri "chai" version))
9770 (sha256
9771 (base32
9772 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
9773 (build-system python-build-system)
9774 (home-page "https://github.com/agoragames/chai")
9775 (synopsis "Mocking framework for Python")
9776 (description
9777 "Chai provides an api for mocking, stubbing and spying your python
9778 objects, patterned after the Mocha library for Ruby.")
9779 (license license:bsd-3)))
9780
9781 (define-public python2-chai
9782 (package-with-python2 python-chai))
9783
9784 (define-public python-inflection
9785 (package
9786 (name "python-inflection")
9787 (version "0.3.1")
9788 (source
9789 (origin (method url-fetch)
9790 (uri (pypi-uri "inflection" version))
9791 (sha256
9792 (base32
9793 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
9794 (build-system python-build-system)
9795 (native-inputs
9796 `(("python-pytest" ,python-pytest)))
9797 (home-page "https://github.com/jpvanhal/inflection")
9798 (synopsis "Python string transformation library")
9799 (description
9800 "Inflection is a string transformation library. It singularizes
9801 and pluralizes English words, and transforms strings from CamelCase to
9802 underscored string.")
9803 (license license:expat)))
9804
9805 (define-public python2-inflection
9806 (package-with-python2 python-inflection))
9807
9808 (define-public python-pylev
9809 (package
9810 (name "python-pylev")
9811 (version "1.3.0")
9812 (source (origin
9813 (method url-fetch)
9814 (uri (pypi-uri "pylev" version))
9815 (sha256
9816 (base32
9817 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
9818 (build-system python-build-system)
9819 (home-page "https://github.com/toastdriven/pylev")
9820 (synopsis "Levenshtein distance implementation in Python")
9821 (description "Pure Python Levenshtein implementation, based off the
9822 Wikipedia code samples at
9823 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
9824 (license license:bsd-3)))
9825
9826 (define-public python2-pylev
9827 (package-with-python2 python-pylev))
9828
9829 (define-public python-cleo
9830 (package
9831 (name "python-cleo")
9832 (version "0.6.1")
9833 (source (origin
9834 (method url-fetch)
9835 (uri (pypi-uri "cleo" version))
9836 (sha256
9837 (base32
9838 "0q1cf0szr0d54am4pypzwdnm74zpladdsinad94c2fz5i06fdpf7"))))
9839 (build-system python-build-system)
9840 (native-inputs
9841 `(;; For testing
9842 ("python-mock" ,python-mock)
9843 ("python-pytest-mock" ,python-pytest-mock)
9844 ("python-pytest" ,python-pytest)))
9845 (propagated-inputs
9846 `(("python-backpack" ,python-backpack)
9847 ("python-pastel" ,python-pastel)
9848 ("python-pylev" ,python-pylev)))
9849 (home-page "https://github.com/sdispater/cleo")
9850 (synopsis "Command-line arguments library for Python")
9851 (description
9852 "Cleo allows you to create command-line commands with signature in
9853 docstring and colored output.")
9854 (license license:expat)))
9855
9856 (define-public python2-cleo
9857 (package-with-python2 python-cleo))
9858
9859 (define-public python-lazy-object-proxy
9860 (package
9861 (name "python-lazy-object-proxy")
9862 (version "1.3.1")
9863 (source (origin
9864 (method url-fetch)
9865 (uri (pypi-uri "lazy-object-proxy" version))
9866 (sha256
9867 (base32
9868 "0yha7q9bhw857fwaby785d63mffhngl9npwzlk9i0pwlkwvbx4gb"))))
9869 (build-system python-build-system)
9870 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
9871 (synopsis "Lazy object proxy for python")
9872 (description
9873 "Lazy object proxy is an object that wraps a callable but defers the call
9874 until the object is actually required, and caches the result of said call.")
9875 (license license:bsd-2)))
9876
9877 (define-public python2-lazy-object-proxy
9878 (package-with-python2 python-lazy-object-proxy))
9879
9880 (define-public python-dnspython
9881 (package
9882 (name "python-dnspython")
9883 (version "1.15.0")
9884 (source (origin
9885 (method url-fetch)
9886 (uri (string-append "http://www.dnspython.org/kits/"
9887 version "/dnspython-" version ".tar.gz"))
9888 (sha256
9889 (base32
9890 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
9891 (build-system python-build-system)
9892 (arguments '(#:tests? #f)) ; XXX: requires internet access
9893 (home-page "http://www.dnspython.org")
9894 (synopsis "DNS toolkit for Python")
9895 (description
9896 "dnspython is a DNS toolkit for Python. It supports almost all record
9897 types. It can be used for queries, zone transfers, and dynamic updates.
9898 It supports TSIG authenticated messages and EDNS0.")
9899 (license license:expat)))
9900
9901 (define-public python2-dnspython
9902 (package-with-python2 python-dnspython))
9903
9904 (define-public python-email-validator
9905 (package
9906 (name "python-email-validator")
9907 (version "1.0.2")
9908 (source
9909 (origin (method url-fetch)
9910 (uri (pypi-uri "email_validator" version))
9911 (sha256
9912 (base32
9913 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
9914 (build-system python-build-system)
9915 (arguments
9916 '(#:phases
9917 (modify-phases %standard-phases
9918 (add-before 'build 'use-dnspython
9919 (lambda _
9920 (substitute* "setup.py"
9921 (("dnspython3") "dnspython"))
9922 #t)))))
9923 (propagated-inputs
9924 `(("python-dnspython" ,python-dnspython)
9925 ("python-idna" ,python-idna)))
9926 (home-page "https://github.com/JoshData/python-email-validator")
9927 (synopsis "Email address validation library for Python")
9928 (description
9929 "This library validates email address syntax and deliverability.")
9930 (license license:cc0)))
9931
9932 (define-public python2-email-validator
9933 (package-with-python2 python-email-validator))
9934
9935 (define-public python-ukpostcodeparser
9936 (package
9937 (name "python-ukpostcodeparser")
9938 (version "1.0.3")
9939 (source (origin
9940 (method url-fetch)
9941 (uri (pypi-uri "UkPostcodeParser" version))
9942 (sha256
9943 (base32
9944 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
9945 (build-system python-build-system)
9946 (home-page "https://github.com/hamstah/ukpostcodeparser")
9947 (synopsis "UK Postcode parser for Python")
9948 (description
9949 "This library provides the @code{parse_uk_postcode} function for
9950 parsing UK postcodes.")
9951 (license license:expat)))
9952
9953 (define-public python2-ukpostcodeparser
9954 (package-with-python2 python-ukpostcodeparser))
9955
9956 (define-public python-faker
9957 (package
9958 (name "python-faker")
9959 (version "0.7.9")
9960 (source (origin
9961 (method url-fetch)
9962 (uri (pypi-uri "Faker" version))
9963 (sha256
9964 (base32
9965 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
9966 (patches
9967 (search-patches "python-faker-fix-build-32bit.patch"))
9968 (modules '((guix build utils)))
9969 (snippet
9970 '(begin
9971 (for-each delete-file (find-files "." "\\.pyc$"))
9972 #t))))
9973 (build-system python-build-system)
9974 (arguments
9975 '(#:phases
9976 (modify-phases %standard-phases
9977 (replace 'check
9978 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
9979 (native-inputs
9980 `(;; For testing
9981 ("python-email-validator" ,python-email-validator)
9982 ("python-mock" ,python-mock)
9983 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
9984 (propagated-inputs
9985 `(("python-dateutil" ,python-dateutil)
9986 ("python-six" ,python-six)))
9987 (home-page "https://github.com/joke2k/faker")
9988 (synopsis "Python package that generates fake data")
9989 (description
9990 "Faker is a Python package that generates fake data such as names,
9991 addresses, and phone numbers.")
9992 (license license:expat)
9993 (properties `((python2-variant . ,(delay python2-faker))))))
9994
9995 (define-public python2-faker
9996 (let ((base (package-with-python2 (strip-python2-variant
9997 python-faker))))
9998 (package
9999 (inherit base)
10000 (propagated-inputs
10001 `(("python2-ipaddress" ,python2-ipaddress)
10002 ,@(package-propagated-inputs base))))))
10003
10004 (define-public python-pyaml
10005 (package
10006 (name "python-pyaml")
10007 (version "18.11.0")
10008 (source (origin
10009 (method url-fetch)
10010 (uri (pypi-uri "pyaml" version))
10011 (sha256
10012 (base32
10013 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
10014 (build-system python-build-system)
10015 (native-inputs
10016 `(("python-unidecode" ,python-unidecode)))
10017 (propagated-inputs
10018 `(("python-pyyaml" ,python-pyyaml)))
10019 (home-page "https://github.com/mk-fg/pretty-yaml")
10020 (synopsis "YAML pretty-print library for Python")
10021 (description
10022 "pyaml is a PyYAML based python module to produce pretty and readable
10023 YAML-serialized data.")
10024 (license license:wtfpl2)))
10025
10026 (define-public python2-pyaml
10027 (package-with-python2 python-pyaml))
10028
10029 (define-public python-backpack
10030 (package
10031 (name "python-backpack")
10032 (version "0.1")
10033 (source
10034 (origin
10035 (method url-fetch)
10036 (uri (pypi-uri "backpack" version))
10037 (sha256
10038 (base32
10039 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
10040 (build-system python-build-system)
10041 (native-inputs
10042 `(("python-pytest" ,python-pytest)
10043 ("python-nose" ,python-nose)))
10044 (propagated-inputs
10045 `(("python-simplejson" ,python-simplejson)))
10046 (home-page "https://github.com/sdispater/backpack")
10047 (synopsis "Utilities for working with Python collections")
10048 (description "Backpack provides some useful utilities for working with
10049 collections of data.")
10050 (license license:expat)))
10051
10052 (define-public python2-backpack
10053 (package-with-python2 python-backpack))
10054
10055 (define-public python-prompt-toolkit
10056 (package
10057 (name "python-prompt-toolkit")
10058 (version "2.0.7")
10059 (source
10060 (origin
10061 (method url-fetch)
10062 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10063 (sha256
10064 (base32
10065 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
10066 (build-system python-build-system)
10067 (arguments
10068 `(#:phases
10069 (modify-phases %standard-phases
10070 (delete 'check)
10071 (add-after 'install 'post-install-check
10072 (lambda* (#:key inputs outputs #:allow-other-keys)
10073 ;; HOME is needed for the test
10074 ;; "test_pathcompleter_can_expanduser".
10075 (setenv "HOME" "/tmp")
10076 (add-installed-pythonpath inputs outputs)
10077 (invoke "py.test"))))))
10078 (propagated-inputs
10079 `(("python-wcwidth" ,python-wcwidth)
10080 ("python-six" ,python-six)
10081 ("python-pygments" ,python-pygments)))
10082 (native-inputs
10083 `(("python-pytest" ,python-pytest)))
10084 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10085 (synopsis "Library for building command line interfaces in Python")
10086 (description
10087 "Prompt-Toolkit is a library for building interactive command line
10088 interfaces in Python. It's like GNU Readline but it also features syntax
10089 highlighting while typing, out-of-the-box multi-line input editing, advanced
10090 code completion, incremental search, support for Chinese double-width
10091 characters, mouse support, and auto suggestions.")
10092 (license license:bsd-3)))
10093
10094 (define-public python2-prompt-toolkit
10095 (package-with-python2 python-prompt-toolkit))
10096
10097 (define-public python-prompt-toolkit-1
10098 (package (inherit python-prompt-toolkit)
10099 (version "1.0.15")
10100 (source
10101 (origin
10102 (method url-fetch)
10103 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10104 (sha256
10105 (base32
10106 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
10107
10108 (define-public python2-prompt-toolkit-1
10109 (package-with-python2 python-prompt-toolkit-1))
10110
10111 (define-public python-jedi
10112 (package
10113 (name "python-jedi")
10114 (version "0.13.3")
10115 (source
10116 (origin
10117 (method url-fetch)
10118 (uri (pypi-uri "jedi" version))
10119 (sha256
10120 (base32
10121 "0nsrjlb57njqppxmi8wjsb1dkad7qa7svx67jbkhixq66lz61c1b"))))
10122 (build-system python-build-system)
10123 (arguments
10124 `( ;; Many tests are failing with Python 3.7.x as of version 0.13.3 (see:
10125 ;; https://github.com/davidhalter/jedi/issues/1263)
10126 #:tests? #f
10127 #:phases
10128 (modify-phases %standard-phases
10129 (replace 'check
10130 (lambda* (#:key tests? #:allow-other-keys)
10131 (when tests?
10132 (invoke "py.test" "-vv")))))))
10133 (native-inputs
10134 `(("python-pytest" ,python-pytest)
10135 ("python-docopt" ,python-docopt)))
10136 (propagated-inputs
10137 `(("python-parso" ,python-parso)))
10138 (home-page "https://github.com/davidhalter/jedi")
10139 (synopsis "Autocompletion and static analysis library for Python")
10140 (description
10141 "Jedi is a static analysis tool for Python that can be used in Integrated
10142 Development Environments (@dfn{IDE}s) and text editors. It understands Python
10143 on a deeper level than many other static analysis frameworks for Python.
10144
10145 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
10146 well.")
10147 (license license:expat)))
10148
10149 (define-public python2-jedi
10150 (let ((base (package-with-python2 (strip-python2-variant python-jedi))))
10151 (package
10152 (inherit base)
10153 (arguments (substitute-keyword-arguments (package-arguments base)
10154 ((#:tests? _) #t))))))
10155
10156 (define-public ptpython
10157 (package
10158 (name "ptpython")
10159 (version "0.34")
10160 (source (origin
10161 (method url-fetch)
10162 (uri (pypi-uri "ptpython" version))
10163 (sha256
10164 (base32
10165 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
10166 (build-system python-build-system)
10167 (arguments
10168 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
10169 (propagated-inputs
10170 `(("python-docopt" ,python-docopt)
10171 ("python-jedi" ,python-jedi)
10172 ("python-prompt-toolkit" ,python-prompt-toolkit)
10173 ("python-pygments" ,python-pygments)))
10174 (home-page "https://github.com/jonathanslenders/ptpython")
10175 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
10176 (description
10177 "ptpython is a Python read-eval-print loop with IDE-like features.
10178 It supports syntax highlighting, multiline editing, autocompletion, mouse,
10179 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
10180 etc.")
10181 (license license:bsd-3)
10182 (properties `((python2-variant . ,(delay ptpython-2))))))
10183
10184 (define-public ptpython-2
10185 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
10186 (package
10187 (inherit base)
10188 (name "ptpython2"))))
10189
10190 (define-public python-stem
10191 (package
10192 (name "python-stem")
10193 (version "1.7.0")
10194 (source
10195 (origin
10196 (method url-fetch)
10197 (uri (pypi-uri "stem" version))
10198 (sha256
10199 (base32
10200 "1awiglfiajnx2hva9aqpj3fmdvdb4qg7cwnlfyih827m68y3cq8v"))))
10201 (build-system python-build-system)
10202 (arguments
10203 `(#:phases
10204 (modify-phases %standard-phases
10205 (replace 'check
10206 (lambda _
10207 (invoke "./run_tests.py" "--unit")
10208 #t)))))
10209 (native-inputs
10210 `(("python-mock" ,python-mock)
10211 ("python-pycodestyle" ,python-pycodestyle)
10212 ("python-pyflakes" ,python-pyflakes)))
10213 (home-page "https://stem.torproject.org/")
10214 (synopsis
10215 "Python controller library that allows applications to interact with Tor")
10216 (description
10217 "Stem is a Python controller library for Tor. With it you can use Tor's
10218 control protocol to script against the Tor process and read descriptor data
10219 relays publish about themselves.")
10220 (license license:lgpl3)))
10221
10222 (define-public python2-stem
10223 (package-with-python2 python-stem))
10224
10225 (define-public python-pyserial
10226 (package
10227 (name "python-pyserial")
10228 (version "3.1.1")
10229 (source
10230 (origin
10231 (method url-fetch)
10232 (uri (pypi-uri "pyserial" version))
10233 (sha256
10234 (base32
10235 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
10236 (build-system python-build-system)
10237 (arguments
10238 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
10239 ;; #:phases
10240 ;; (modify-phases %standard-phases
10241 ;; (replace 'check
10242 ;; (lambda _
10243 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
10244 (home-page
10245 "https://github.com/pyserial/pyserial")
10246 (synopsis "Python Serial Port Bindings")
10247 (description "@code{pyserial} provide serial port bindings for Python. It
10248 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
10249 and/or Xon/Xoff. The port is accessed in RAW mode.")
10250 (license license:bsd-3)))
10251
10252 (define-public python2-pyserial
10253 (package-with-python2 python-pyserial))
10254
10255 (define-public python-kivy
10256 (package
10257 (name "python-kivy")
10258 (version "1.10.1")
10259 (source
10260 (origin
10261 (method url-fetch)
10262 (uri (pypi-uri "Kivy" version))
10263 (file-name (string-append name "-" version ".tar.gz"))
10264 (sha256
10265 (base32
10266 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
10267 (build-system python-build-system)
10268 (arguments
10269 `(#:tests? #f ; Tests require many optional packages
10270 #:phases
10271 (modify-phases %standard-phases
10272 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
10273 (lambda* (#:key inputs #:allow-other-keys)
10274 (setenv "KIVY_SDL2_PATH"
10275 (string-append (assoc-ref inputs "sdl-union")
10276 "/include/SDL2"))
10277 #t)))))
10278 (native-inputs
10279 `(("git" ,git)
10280 ("pkg-config" ,pkg-config)
10281 ("python-cython" ,python-cython)))
10282 (inputs
10283 `(("gstreamer" ,gstreamer)
10284 ("mesa" ,mesa)
10285 ("sdl-union"
10286 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
10287 (home-page "http://kivy.org")
10288 (synopsis
10289 "Multitouch application framework")
10290 (description
10291 "A software library for rapid development of
10292 hardware-accelerated multitouch applications.")
10293 (license license:expat)))
10294
10295 (define-public python2-kivy
10296 (package-with-python2 python-kivy))
10297
10298 (define-public python-kivy-next
10299 (deprecated-package "python-kivy-next" python-kivy))
10300
10301 (define-public python2-kivy-next
10302 (deprecated-package "python2-kivy-next" python2-kivy))
10303
10304 (define-public python-binaryornot
10305 (package
10306 (name "python-binaryornot")
10307 (version "0.4.4")
10308 (source (origin
10309 (method url-fetch)
10310 (uri (pypi-uri "binaryornot" version))
10311 (sha256
10312 (base32
10313 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
10314 (build-system python-build-system)
10315 (propagated-inputs
10316 `(("python-chardet" ,python-chardet)
10317 ("python-hypothesis" ,python-hypothesis)))
10318 (home-page "https://github.com/audreyr/binaryornot")
10319 (synopsis "Package to check if a file is binary or text")
10320 (description "Ultra-lightweight pure Python package to check if a file is
10321 binary or text.")
10322 (license license:bsd-3)
10323 (properties `((python2-variant . ,(delay python2-binaryornot))))))
10324
10325 (define-public python2-binaryornot
10326 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
10327 (package (inherit base)
10328 (propagated-inputs
10329 `(("python2-enum34" ,python2-enum34)
10330 ,@(package-propagated-inputs base))))))
10331
10332 (define-public python-nltk
10333 (package
10334 (name "python-nltk")
10335 (version "3.2.1")
10336 (source (origin
10337 (method url-fetch)
10338 (uri (pypi-uri "nltk" version))
10339 (sha256
10340 (base32
10341 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
10342 (build-system python-build-system)
10343 (arguments
10344 '(;; The tests require some extra resources to be downloaded.
10345 ;; TODO Try packaging these resources.
10346 #:tests? #f))
10347 (home-page "http://nltk.org/")
10348 (synopsis "Natural Language Toolkit")
10349 (description "It provides interfaces to over 50 corpora and lexical
10350 resources such as WordNet, along with a suite of text processing libraries
10351 for classification, tokenization, stemming, tagging, parsing, and semantic
10352 reasoning, wrappers for natural language processing libraries.")
10353 (license license:asl2.0)))
10354
10355 (define-public python2-nltk
10356 (package-with-python2 python-nltk))
10357
10358 (define-public python-pymongo
10359 (package
10360 (name "python-pymongo")
10361 (version "3.7.2")
10362 (source (origin
10363 (method url-fetch)
10364 (uri (pypi-uri "pymongo" version))
10365 (sha256
10366 (base32
10367 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
10368 (build-system python-build-system)
10369 (propagated-inputs
10370 `(("python-certifi" ,python-certifi)))
10371 (home-page "https://github.com/mongodb/mongo-python-driver")
10372 (synopsis "Python driver for MongoDB")
10373 (description "Python driver for MongoDB.")
10374 (license license:asl2.0)))
10375
10376 (define-public python2-pymongo
10377 (package-with-python2 python-pymongo))
10378
10379 (define-public python-consul
10380 (package
10381 (name "python-consul")
10382 (version "0.6.1")
10383 (source
10384 (origin
10385 (method url-fetch)
10386 (uri (pypi-uri "python-consul" version))
10387 (sha256
10388 (base32
10389 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
10390 (build-system python-build-system)
10391 (arguments
10392 '(#:tests? #f)) ; The tests are not distributed
10393 (propagated-inputs
10394 `(("python-requests" ,python-requests)
10395 ("python-six" ,python-six)))
10396 (home-page "https://github.com/cablehead/python-consul")
10397 (synopsis "Python client for Consul")
10398 (description
10399 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
10400 discovery, monitoring and configuration.")
10401 (license license:expat)))
10402
10403 (define-public python2-consul
10404 (package-with-python2 python-consul))
10405
10406 (define-public python-schematics
10407 (package
10408 (name "python-schematics")
10409 (version "1.1.1")
10410 (source
10411 (origin
10412 (method git-fetch)
10413 (uri (git-reference
10414 (url "https://github.com/schematics/schematics.git")
10415 (commit (string-append "v" version))))
10416 (file-name (git-file-name name version))
10417 (sha256
10418 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
10419 (build-system python-build-system)
10420 (propagated-inputs
10421 `(("python-six" ,python-six)))
10422 (arguments
10423 ;; The tests require a bunch of not very nice packages with fixed
10424 ;; version requirements (e.g. python-coveralls).
10425 `(#:tests? #f))
10426 (home-page "https://github.com/schematics/schematics")
10427 (synopsis "Python Data Structures for Humans")
10428 (description "Python Data Structures for Humans.")
10429 (license license:bsd-3)))
10430
10431 (define-public python2-schematics
10432 (package-with-python2 python-schematics))
10433
10434 (define-public python-odfpy
10435 (package
10436 (name "python-odfpy")
10437 (version "1.3.3")
10438 (source (origin
10439 (method url-fetch)
10440 (uri (pypi-uri "odfpy" version))
10441 (sha256
10442 (base32
10443 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
10444 (arguments
10445 `(#:modules ((srfi srfi-1)
10446 (guix build python-build-system)
10447 (guix build utils))
10448 #:phases
10449 (modify-phases %standard-phases
10450 (replace 'check
10451 ;; The test runner invokes python2 and python3 for test*.py.
10452 ;; To avoid having both in inputs, we replicate it here.
10453 (lambda _
10454 (for-each (lambda (test-file) (invoke "python" test-file))
10455 (find-files "tests" "^test.*\\.py$"))
10456 #t)))))
10457 (build-system python-build-system)
10458 (home-page "https://github.com/eea/odfpy")
10459 (synopsis "Python API and tools to manipulate OpenDocument files")
10460 (description "Collection of libraries and utility programs written in
10461 Python to manipulate OpenDocument 1.2 files.")
10462 (license
10463 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
10464 ;; number of files with other licenses.
10465 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
10466
10467 (define-public python2-odfpy
10468 (package-with-python2 python-odfpy))
10469
10470 (define-public python-natsort
10471 (package
10472 (name "python-natsort")
10473 (version "5.4.1")
10474 (source (origin
10475 (method url-fetch)
10476 (uri (pypi-uri "natsort" version))
10477 (sha256
10478 (base32
10479 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
10480 (build-system python-build-system)
10481 (arguments
10482 `(#:modules ((guix build utils)
10483 (guix build python-build-system)
10484 (srfi srfi-1)
10485 (srfi srfi-26)
10486 (ice-9 ftw))
10487 #:phases
10488 (modify-phases %standard-phases
10489 (add-before 'check 'set-cachedir
10490 ;; Tests require write access to $HOME by default
10491 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
10492 (replace 'check
10493 (lambda _
10494 (let ((cwd (getcwd)))
10495 (setenv "PYTHONPATH"
10496 (string-append
10497 cwd "/build/"
10498 (find (cut string-prefix? "lib" <>)
10499 (scandir (string-append cwd "/build")))
10500 ":"
10501 (getenv "PYTHONPATH")))
10502 (invoke "pytest" "-v")))))))
10503 (native-inputs
10504 `(("python-hypothesis" ,python-hypothesis)
10505 ("python-pytest-cov" ,python-pytest-cov)
10506 ("python-pytest-mock" ,python-pytest-mock)
10507 ("python-pytest" ,python-pytest)))
10508 (propagated-inputs ; TODO: Add python-fastnumbers.
10509 `(("python-pyicu" ,python-pyicu)))
10510 (home-page "https://github.com/SethMMorton/natsort")
10511 (synopsis "Natural sorting for python and shell")
10512 (description
10513 "Natsort lets you apply natural sorting on lists instead of
10514 lexicographical. If you use the built-in @code{sorted} method in python
10515 on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
10516 @code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
10517 @code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
10518 identifies numbers and sorts them separately from strings. It can also sort
10519 version numbers, real numbers, mixed types and more, and comes with a shell
10520 command @command{natsort} that exposes this functionality in the command line.")
10521 (license license:expat)
10522 (properties `((python2-variant . ,(delay python2-natsort))))))
10523
10524 (define-public python2-natsort
10525 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
10526 (package (inherit base)
10527 (native-inputs
10528 `(("python2-pathlib" ,python2-pathlib)
10529 ,@(package-native-inputs base))))))
10530
10531 (define-public python-glances
10532 (package
10533 (name "python-glances")
10534 (version "3.0.2")
10535 (source
10536 (origin
10537 (method url-fetch)
10538 (uri (pypi-uri "Glances" version))
10539 (sha256
10540 (base32
10541 "09fxysfp1n16csqvzvawy74qm6a94nvwjf3vcf5gkqp4i6k4vjjy"))))
10542 (build-system python-build-system)
10543 (propagated-inputs
10544 `(("python-psutil" ,python-psutil)))
10545 (home-page
10546 "https://github.com/nicolargo/glances")
10547 (synopsis
10548 "A cross-platform curses-based monitoring tool")
10549 (description
10550 "Glances is a curses-based monitoring tool for a wide variety of platforms.
10551 Glances uses the PsUtil library to get information from your system. It monitors
10552 CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
10553 (license license:lgpl3+)))
10554
10555 (define-public python2-glances
10556 (package-with-python2 python-glances))
10557
10558 (define-public python-graphql-core
10559 (package
10560 (name "python-graphql-core")
10561 (version "0.5.3")
10562 (source
10563 (origin
10564 (method url-fetch)
10565 (uri (pypi-uri "graphql-core" version))
10566 (sha256
10567 (base32
10568 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
10569 (build-system python-build-system)
10570 (arguments
10571 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
10572 #:phases
10573 (modify-phases %standard-phases
10574 (add-after 'unpack 'patch-hardcoded-version
10575 (lambda _ (substitute*
10576 "setup.py"
10577 (("'gevent==1.1rc1'") "'gevent'"))
10578 #t)))))
10579 (native-inputs
10580 `(("python-gevent" ,python-gevent)
10581 ("python-mock" ,python-mock)
10582 ("python-pytest-mock" ,python-pytest-mock)))
10583 (propagated-inputs
10584 `(("python-promise" ,python-promise)
10585 ("python-six" ,python-six)))
10586 (home-page "https://github.com/graphql-python/graphql-core")
10587 (synopsis "GraphQL implementation for Python")
10588 (description
10589 "GraphQL implementation for Python. GraphQL is a data query language and
10590 runtime designed and used to request and deliver data to mobile and web apps.
10591 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
10592 to Python.")
10593 (license license:expat)))
10594
10595 (define-public python2-graphql-core
10596 (package-with-python2 python-graphql-core))
10597
10598 (define-public python-graphql-relay
10599 (package
10600 (name "python-graphql-relay")
10601 (version "0.4.5")
10602 (source
10603 (origin
10604 (method url-fetch)
10605 (uri (pypi-uri "graphql-relay" version))
10606 (sha256
10607 (base32
10608 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
10609 (build-system python-build-system)
10610 (arguments
10611 '(#:tests? #f)) ; The tests are not distributed
10612 (propagated-inputs
10613 `(("python-graphql-core" ,python-graphql-core)
10614 ("python-promise" ,python-promise)
10615 ("python-six" ,python-six)))
10616 (home-page "https://github.com/graphql-python/graphql-relay-py")
10617 (synopsis "Relay implementation for Python")
10618 (description
10619 "This is a library to allow the easy creation of Relay-compliant servers
10620 using the GraphQL Python reference implementation of a GraphQL server. It
10621 should be noted that the code is a exact port of the original
10622 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
10623 from Facebook.")
10624 (license license:expat)))
10625
10626 (define-public python2-graphql-relay
10627 (package-with-python2 python-graphql-relay))
10628
10629 (define-public python-graphene
10630 (package
10631 (name "python-graphene")
10632 (version "0.10.2")
10633 (source
10634 (origin
10635 (method url-fetch)
10636 (uri (pypi-uri "graphene" version))
10637 (sha256
10638 (base32
10639 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
10640 (build-system python-build-system)
10641 (propagated-inputs
10642 `(("python-graphql-core" ,python-graphql-core)
10643 ("python-graphql-relay" ,python-graphql-relay)
10644 ("python-iso8601" ,python-iso8601)
10645 ("python-promise" ,python-promise)
10646 ("python-six" ,python-six)))
10647 (arguments
10648 `(#:tests? #f)) ; no tests/ in the PyPI tarball
10649 (home-page "http://graphene-python.org/")
10650 (synopsis "GraphQL Framework for Python")
10651 (description
10652 "Graphene is a Python library for building GraphQL schemas/types.
10653 A GraphQL schema describes your data model, and provides a GraphQL server
10654 with an associated set of resolve methods that know how to fetch data.")
10655 (properties `((python2-variant . ,(delay python2-graphene))))
10656 (license license:expat)))
10657
10658 (define-public python2-graphene
10659 (let ((base (package-with-python2
10660 (strip-python2-variant python-graphene))))
10661 (package (inherit base)
10662 (native-inputs
10663 `(("python2-sqlalchemy" ,python2-sqlalchemy)
10664 ,@(package-native-inputs base))))))
10665
10666 (define-public python-nautilus
10667 (package
10668 (name "python-nautilus")
10669 (version "0.4.9")
10670 (source
10671 (origin
10672 (method url-fetch)
10673 (uri (pypi-uri "nautilus" version))
10674 (sha256
10675 (base32
10676 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
10677 (build-system python-build-system)
10678 (arguments `(#:tests? #f)) ; fails to import test modules
10679 (propagated-inputs
10680 `(("python-bcrypt" ,python-bcrypt)
10681 ("python-click" ,python-click)
10682 ("python-consul" ,python-consul)
10683 ("python-graphene" ,python-graphene)
10684 ("python-jinja2" ,python-jinja2)
10685 ("python-peewee" ,python-peewee)
10686 ("python-pika" ,python-pika)
10687 ("python-tornado" ,python-tornado)
10688 ("python-wtforms" ,python-wtforms)))
10689 (native-inputs
10690 `(("python-nose2" ,python-nose2)))
10691 (home-page "https://github.com/AlecAivazis/nautilus")
10692 (synopsis "Library for creating microservice applications")
10693 (description
10694 "Nautilus is a framework for flux based microservices that looks to
10695 provide extendible implementations of common aspects of a cloud so that you can
10696 focus on building massively scalable web applications.")
10697 (license license:expat)))
10698
10699 (define-public python-snowballstemmer
10700 (package
10701 (name "python-snowballstemmer")
10702 (version "1.2.1")
10703 (source (origin
10704 (method url-fetch)
10705 (uri (pypi-uri "snowballstemmer" version))
10706 (sha256
10707 (base32
10708 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
10709 (build-system python-build-system)
10710 (arguments
10711 `(;; No tests exist
10712 #:tests? #f))
10713 (home-page "https://github.com/shibukawa/snowball_py")
10714 (synopsis "Snowball stemming library collection for Python")
10715 (description "This package provides 16 word stemmer algorithms generated
10716 from Snowball algorithms. It includes the 15 original ones plus the Poerter
10717 English stemmer.")
10718 (license license:bsd-3)))
10719
10720 (define-public python2-snowballstemmer
10721 (package-with-python2 python-snowballstemmer))
10722
10723 (define-public python-setproctitle
10724 (package
10725 (name "python-setproctitle")
10726 (version "1.1.10")
10727 (source
10728 (origin
10729 (method url-fetch)
10730 (uri (pypi-uri "setproctitle" version))
10731 (sha256
10732 (base32
10733 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
10734 (build-system python-build-system)
10735 (arguments
10736 '(#:phases
10737 (modify-phases %standard-phases
10738 (add-before 'check 'patch-Makefile
10739 ;; Stricly this is only required for the python2 variant.
10740 ;; But adding a phase in an inherited package seems to be
10741 ;; cumbersum. So we patch even for python3.
10742 (lambda _
10743 (let ((nose (assoc-ref %build-inputs "python2-nose")))
10744 (when nose
10745 (substitute* "Makefile"
10746 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
10747 (string-append nose "/bin/nosetests "))))
10748 #t)))
10749 (replace 'check
10750 (lambda _
10751 (setenv "PYTHON" (or (which "python3") (which "python")))
10752 (setenv "PYCONFIG" (or (which "python3-config")
10753 (which "python-config")))
10754 (setenv "CC" "gcc")
10755 ;; No need to extend PYTHONPATH to find the built package, since
10756 ;; the Makefile will build anyway
10757 (invoke "make" "check"))))))
10758 (native-inputs
10759 `(("procps" ,procps))) ; required for tests
10760 (home-page
10761 "https://github.com/dvarrazzo/py-setproctitle")
10762 (synopsis
10763 "Setproctitle implementation for Python to customize the process title")
10764 (description "The library allows a process to change its title (as displayed
10765 by system tools such as ps and top).
10766
10767 Changing the title is mostly useful in multi-process systems, for
10768 example when a master process is forked: changing the children's title
10769 allows to identify the task each process is busy with. The technique
10770 is used by PostgreSQL and the OpenSSH Server for example.")
10771 (license license:bsd-3)
10772 (properties `((python2-variant . ,(delay python2-setproctitle))))))
10773
10774 (define-public python2-setproctitle
10775 (let ((base (package-with-python2
10776 (strip-python2-variant python-setproctitle))))
10777 (package
10778 (inherit base)
10779 (native-inputs `(("python2-nose" ,python2-nose)
10780 ,@(package-native-inputs base))))))
10781
10782 (define-public python-validictory
10783 (package
10784 (name "python-validictory")
10785 (version "1.0.1")
10786 (source
10787 (origin
10788 (method url-fetch)
10789 (uri (pypi-uri "validictory" version))
10790 (sha256
10791 (base32
10792 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
10793 (build-system python-build-system)
10794 (arguments
10795 '(#:phases
10796 (modify-phases %standard-phases
10797 (add-after 'unpack 'bootstrap
10798 ;; Move the tests out of the package directory to avoid
10799 ;; packaging them.
10800 (lambda* _
10801 (rename-file "validictory/tests" "tests")
10802 (delete-file "tests/__init__.py")))
10803 (replace 'check
10804 (lambda _
10805 ;; Extend PYTHONPATH so the built package will be found.
10806 (setenv "PYTHONPATH"
10807 (string-append (getcwd) "/build/lib:"
10808 (getenv "PYTHONPATH")))
10809 (invoke "py.test" "-vv" ))))))
10810 (native-inputs
10811 `(("python-pytest" ,python-pytest)))
10812 (home-page
10813 "https://github.com/jamesturk/validictory")
10814 (synopsis "General purpose Python data validator")
10815 (description "It allows validation of arbitrary Python data structures.
10816
10817 The schema format is based on the JSON Schema
10818 proposal (http://json-schema.org), so combined with json the library is also
10819 useful as a validator for JSON data.")
10820 (license license:expat)))
10821
10822 (define-public python2-validictory
10823 (package-with-python2 python-validictory))
10824
10825 (define-public python-pyelftools
10826 (package
10827 (name "python-pyelftools")
10828 (version "0.25")
10829 (source
10830 (origin
10831 (method url-fetch)
10832 (uri (pypi-uri "pyelftools" version))
10833 (sha256
10834 (base32
10835 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
10836 (build-system python-build-system)
10837 (arguments
10838 `(#:phases
10839 (modify-phases %standard-phases
10840 (add-before 'check 'set-pythonpath
10841 (lambda _
10842 (setenv "PYTHONPATH"
10843 (string-append
10844 (getcwd) "/test/"
10845 ":" (getenv "PYTHONPATH")))
10846 #t)))))
10847 (home-page
10848 "https://github.com/eliben/pyelftools")
10849 (synopsis
10850 "Analyze binary and library file information")
10851 (description "This Python library provides interfaces for parsing and
10852 analyzing two binary and library file formats; the Executable and Linking
10853 Format (ELF), and debugging information in the Debugging With Attributed
10854 Record Format (DWARF).")
10855 (license license:public-domain)))
10856
10857 (define-public python-pyev
10858 (package
10859 (name "python-pyev")
10860 (version "0.9.0")
10861 (source
10862 (origin
10863 (method url-fetch)
10864 (uri (pypi-uri "pyev" version))
10865 (sha256
10866 (base32
10867 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
10868 (build-system python-build-system)
10869 (arguments
10870 `(#:tests? #f ; no test suite
10871 #:phases
10872 (modify-phases %standard-phases
10873 (add-after 'unpack 'patch
10874 (lambda* (#:key inputs #:allow-other-keys)
10875 (let ((libev (string-append (assoc-ref inputs "libev")
10876 "/lib/libev.so.4")))
10877 (substitute* "setup.py"
10878 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
10879 (string-append "libev_dll_name = \"" libev "\"")))))))))
10880 (inputs
10881 `(("libev" ,libev)))
10882 (home-page "http://pythonhosted.org/pyev/")
10883 (synopsis "Python libev interface")
10884 (description "Pyev provides a Python interface to libev.")
10885 (license license:gpl3)))
10886
10887 (define-public python2-pyev
10888 (package-with-python2 python-pyev))
10889
10890 (define-public python-imagesize
10891 (package
10892 (name "python-imagesize")
10893 (version "1.1.0")
10894 (source
10895 (origin
10896 (method url-fetch)
10897 (uri (pypi-uri "imagesize" version))
10898 (sha256
10899 (base32
10900 "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk"))))
10901 (build-system python-build-system)
10902 (home-page "https://github.com/shibukawa/imagesize_py")
10903 (synopsis "Gets image size of files in various formats in Python")
10904 (description
10905 "This package allows determination of image size from
10906 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
10907 (license license:expat)))
10908
10909 (define-public python2-imagesize
10910 (package-with-python2 python-imagesize))
10911
10912 (define-public python-termstyle
10913 (package
10914 (name "python-termstyle")
10915 (version "0.1.11")
10916 (source
10917 (origin
10918 (method url-fetch)
10919 (uri (pypi-uri "termstyle" version))
10920 (sha256
10921 (base32
10922 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
10923 (build-system python-build-system)
10924 (arguments
10925 '(#:phases
10926 (modify-phases %standard-phases
10927 (replace 'check
10928 (lambda _
10929 (invoke "python" "test3.py"))))))
10930 (home-page "https://github.com/gfxmonk/termstyle")
10931 (synopsis "Console text coloring for Python")
10932 (description "This package provides console text coloring for Python.")
10933 (license license:bsd-3)))
10934
10935 (define-public python-argcomplete
10936 (package
10937 (name "python-argcomplete")
10938 (version "1.7.0")
10939 (source
10940 (origin
10941 (method url-fetch)
10942 (uri (pypi-uri "argcomplete" version))
10943 (sha256
10944 (base32
10945 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
10946 (build-system python-build-system)
10947 (native-inputs
10948 `(("python-pexpect" ,python-pexpect)
10949 ("tcsh" ,tcsh)
10950 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
10951 (home-page "https://github.com/kislyuk/argcomplete")
10952 (synopsis "Shell tab completion for Python argparse")
10953 (description "argcomplete provides extensible command line tab completion
10954 of arguments and options for Python scripts using @code{argparse}. It's
10955 particularly useful for programs with many options or sub-parsers that can
10956 dynamically suggest completions; for example, when browsing resources over the
10957 network.")
10958 (license license:asl2.0)))
10959
10960 (define-public python2-argcomplete
10961 (package-with-python2 python-argcomplete))
10962
10963 (define-public python-xopen
10964 (package
10965 (name "python-xopen")
10966 (version "0.5.0")
10967 (source
10968 (origin
10969 (method url-fetch)
10970 (uri (pypi-uri "xopen" version))
10971 (sha256
10972 (base32
10973 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
10974 (build-system python-build-system)
10975 (propagated-inputs
10976 `(("python-setuptools-scm" ,python-setuptools-scm)))
10977 (home-page "https://github.com/marcelm/xopen/")
10978 (synopsis "Open compressed files transparently")
10979 (description "This module provides an @code{xopen} function that works like
10980 Python's built-in @code{open} function, but can also deal with compressed files.
10981 Supported compression formats are gzip, bzip2 and, xz, and are automatically
10982 recognized by their file extensions. The focus is on being as efficient as
10983 possible on all supported Python versions.")
10984 (license license:expat)))
10985
10986 (define-public python2-xopen
10987 (let ((base (package-with-python2
10988 (strip-python2-variant python-xopen))))
10989 (package
10990 (inherit base)
10991 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
10992 ,@(package-propagated-inputs base))))))
10993
10994 (define-public python-cheetah
10995 (package
10996 (name "python-cheetah")
10997 (version "3.1.0")
10998 (source
10999 (origin
11000 (method url-fetch)
11001 (uri (pypi-uri "Cheetah3" version))
11002 (sha256
11003 (base32
11004 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
11005 (build-system python-build-system)
11006 (arguments
11007 `(#:modules ((guix build utils)
11008 (guix build python-build-system)
11009 (ice-9 ftw)
11010 (srfi srfi-1)
11011 (srfi srfi-26))
11012 #:phases (modify-phases %standard-phases
11013 (add-after 'unpack 'use-absolute-python
11014 (lambda _
11015 (substitute* "Cheetah/CheetahWrapper.py"
11016 (("#!/usr/bin/env python")
11017 (string-append "#!" (which "python"))))
11018 #t))
11019 (replace 'check
11020 (lambda _
11021 (let ((cwd (getcwd)))
11022 (setenv "PYTHONPATH"
11023 (string-append
11024 cwd "/build/"
11025 (find (cut string-prefix? "lib" <>)
11026 (scandir (string-append cwd "/build")))
11027 ":" (getenv "PYTHONPATH")))
11028 (setenv "PATH"
11029 (string-append (getenv "PATH")
11030 ":" cwd "/bin"))
11031 (setenv "TMPDIR" "/tmp")
11032
11033 (substitute* "Cheetah/Tests/Test.py"
11034 (("unittest.TextTestRunner\\(\\)")
11035 "unittest.TextTestRunner(verbosity=2)"))
11036
11037 (invoke "python" "Cheetah/Tests/Test.py")))))))
11038 (propagated-inputs
11039 `(("python-markdown" ,python-markdown))) ;optional
11040 (home-page "http://cheetahtemplate.org/")
11041 (synopsis "Template engine")
11042 (description "Cheetah is a text-based template engine and Python code
11043 generator.
11044
11045 Cheetah can be used as a standalone templating utility or referenced as
11046 a library from other Python applications. It has many potential uses,
11047 but web developers looking for a viable alternative to ASP, JSP, PHP and
11048 PSP are expected to be its principle user group.
11049
11050 Features:
11051 @enumerate
11052 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
11053 text-based format.
11054 @item Cleanly separates content, graphic design, and program code.
11055 @item Blends the power and flexibility of Python with a simple template language
11056 that non-programmers can understand.
11057 @item Gives template writers full access to any Python data structure, module,
11058 function, object, or method in their templates.
11059 @item Makes code reuse easy by providing an object-orientated interface to
11060 templates that is accessible from Python code or other Cheetah templates.
11061 One template can subclass another and selectively reimplement sections of it.
11062 @item Provides a simple, yet powerful, caching mechanism that can dramatically
11063 improve the performance of a dynamic website.
11064 @item Compiles templates into optimized, yet readable, Python code.
11065 @end enumerate")
11066 (license (license:x11-style "file://LICENSE"))))
11067
11068 (define-public python2-cheetah
11069 (package-with-python2 python-cheetah))
11070
11071 (define-public python-dulwich
11072 (package
11073 (name "python-dulwich")
11074 (version "0.18.6")
11075 (source
11076 (origin
11077 (method url-fetch)
11078 (uri (list (string-append "https://www.dulwich.io/releases/"
11079 "dulwich-" version ".tar.gz")
11080 (pypi-uri "dulwich" version)))
11081 (sha256
11082 (base32
11083 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
11084 (build-system python-build-system)
11085 (arguments
11086 `(#:phases
11087 (modify-phases %standard-phases
11088 (add-before 'check 'fix-tests
11089 (lambda* (#:key inputs #:allow-other-keys)
11090 ;; The tests use Popen with a custom environment which doesn't
11091 ;; include PATH.
11092 (substitute* "dulwich/tests/compat/utils.py"
11093 (("'git'") (string-append "'"
11094 (which "git")
11095 "'")))
11096 (substitute* '("dulwich/tests/test_repository.py"
11097 "dulwich/tests/test_hooks.py")
11098 (("#!/bin/sh") (string-append "#!" (which "sh"))))
11099 (setenv "TEST_RUNNER" "unittest")
11100 (setenv "PYTHONHASHSEED" "random")
11101 #t)))))
11102 (propagated-inputs
11103 `(("python-fastimport" ,python-fastimport)))
11104 (native-inputs
11105 `(("python-mock" ,python-mock)
11106 ("python-geventhttpclient" ,python-geventhttpclient)
11107 ("git" ,git)))
11108 (home-page "https://www.dulwich.io/")
11109 (synopsis "Git implementation in Python")
11110 (description "Dulwich is an implementation of the Git file formats and
11111 protocols written in pure Python.")
11112 ;; Can be used with either license.
11113 (license (list license:asl2.0 license:gpl2+))))
11114
11115 (define-public python2-dulwich
11116 (package-with-python2 python-dulwich))
11117
11118 (define-public python-pbkdf2
11119 (package
11120 (name "python-pbkdf2")
11121 (version "1.3")
11122 (source
11123 (origin
11124 (method url-fetch)
11125 (uri (pypi-uri "pbkdf2" version))
11126 (sha256
11127 (base32
11128 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
11129 (build-system python-build-system)
11130 (arguments
11131 '(#:phases
11132 (modify-phases %standard-phases
11133 (replace 'check
11134 (lambda _
11135 (setenv "PYTHONPATH"
11136 (string-append (getcwd) "/build/lib:"
11137 (getenv "PYTHONPATH")))
11138 (invoke "python" "test/test_pbkdf2.py"))))))
11139 (propagated-inputs
11140 `(("python-pycrypto" ,python-pycrypto))) ; optional
11141 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
11142 (synopsis "Password-based key derivation")
11143 (description "This module implements the password-based key derivation
11144 function, PBKDF2, specified in RSA PKCS#5 v2.0.
11145
11146 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
11147 is part of the RSA Public Key Cryptography Standards series. The provided
11148 implementation takes a password or a passphrase and a salt value (and
11149 optionally a iteration count, a digest module, and a MAC module) and provides
11150 a file-like object from which an arbitrarly-sized key can be read.")
11151 (license license:expat)))
11152
11153 (define-public python2-pbkdf2
11154 (package-with-python2 python-pbkdf2))
11155
11156 (define-public python-qrcode
11157 (package
11158 (name "python-qrcode")
11159 (version "6.1")
11160 (source
11161 (origin
11162 (method url-fetch)
11163 (uri (pypi-uri "qrcode" version))
11164 (sha256
11165 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
11166 (build-system python-build-system)
11167 (arguments
11168 ;; FIXME: Tests require packaging 'pymaging'.
11169 '(#:tests? #f))
11170 (propagated-inputs
11171 `(("python-lxml" ,python-lxml) ; for SVG output
11172 ("python-pillow" ,python-pillow) ; for PNG output
11173 ("python-six" ,python-six)))
11174 (home-page "https://github.com/lincolnloop/python-qrcode")
11175 (synopsis "QR Code image generator")
11176 (description "This package provides a pure Python QR Code generator
11177 module. It uses the Python Imaging Library (PIL) to allow for the generation
11178 of QR Codes.
11179
11180 In addition this package provides a command line tool to generate QR codes and
11181 either write these QR codes to a file or do the output as ascii art at the
11182 console.")
11183 (license license:bsd-3)))
11184
11185 (define-public python2-qrcode
11186 (package-with-python2 python-qrcode))
11187
11188 (define-public python-rst2ansi
11189 (package
11190 (name "python-rst2ansi")
11191 (version "0.1.5")
11192 (source
11193 (origin
11194 (method url-fetch)
11195 (uri (pypi-uri "rst2ansi" version))
11196 (sha256
11197 (base32
11198 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
11199 (build-system python-build-system)
11200 (propagated-inputs
11201 `(("python-docutils" ,python-docutils)))
11202 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
11203 (synopsis "Convert RST to ANSI-decorated console output")
11204 (description
11205 "Python module dedicated to rendering RST (reStructuredText) documents
11206 to ansi-escaped strings suitable for display in a terminal.")
11207 (license license:expat)))
11208
11209 (define-public python-ansi2html
11210 (package
11211 (name "python-ansi2html")
11212 (version "1.2.0")
11213 (source
11214 (origin
11215 (method url-fetch)
11216 (uri (pypi-uri "ansi2html" version))
11217 (sha256
11218 (base32
11219 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
11220 (build-system python-build-system)
11221 (native-inputs
11222 `(("python-mock" ,python-mock)
11223 ("python-nose" ,python-nose)))
11224 (propagated-inputs
11225 `(("python-six" ,python-six)))
11226 (home-page "https://github.com/ralphbean/ansi2html")
11227 (synopsis "Convert ANSI-decorated console output to HTML")
11228 (description
11229 "@command{ansi2html} is a Python library and command line utility for
11230 convering text with ANSI color codes to HTML or LaTeX.")
11231 (license license:gpl3+)))
11232
11233 (define-public python2-ansi2html
11234 (package-with-python2 python-ansi2html))
11235
11236 (define-public python-ddt
11237 (package
11238 (name "python-ddt")
11239 (version "1.1.3")
11240 (source
11241 (origin
11242 (method url-fetch)
11243 (uri (pypi-uri "ddt" version))
11244 (sha256
11245 (base32
11246 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
11247 (build-system python-build-system)
11248 (native-inputs
11249 `(("python-mock" ,python-mock)
11250 ("python-nose" ,python-nose)))
11251 (propagated-inputs
11252 `(("python-six" ,python-six)
11253 ("python-pyyaml" ,python-pyyaml)))
11254 (home-page "https://github.com/txels/ddt")
11255 (synopsis "Data-Driven Tests")
11256 (description
11257 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
11258 running it with different test data, and make it appear as multiple test
11259 cases.")
11260 (license license:expat)))
11261
11262 (define-public python2-ddt
11263 (package-with-python2 python-ddt))
11264
11265 (define-public python-pycountry
11266 (package
11267 (name "python-pycountry")
11268 (version "18.5.26")
11269 (source
11270 (origin
11271 (method url-fetch)
11272 (uri (pypi-uri "pycountry" version))
11273 (sha256
11274 (base32
11275 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
11276 (build-system python-build-system)
11277 (home-page "https://bitbucket.org/flyingcircus/pycountry")
11278 (synopsis "ISO databases for languages, countries, currencies, etc.")
11279 (description
11280 "@code{pycountry} provides the ISO databases for the standards:
11281 @enumerate
11282 @item 639-3 (Languages)
11283 @item 3166 (Countries)
11284 @item 3166-3 (Deleted Countries)
11285 @item 3166-2 (Subdivisions of countries)
11286 @item 4217 (Currencies)
11287 @item 15924 (Scripts)
11288 @end enumerate
11289 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
11290 through a Python API.")
11291 (license license:lgpl2.1+)))
11292
11293 (define-public python2-pycountry
11294 (package-with-python2 python-pycountry))
11295
11296 (define-public python-pycosat
11297 (package
11298 (name "python-pycosat")
11299 (version "0.6.1")
11300 (source
11301 (origin
11302 (method url-fetch)
11303 (uri (pypi-uri "pycosat" version))
11304 (sha256
11305 (base32
11306 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
11307 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
11308 (build-system python-build-system)
11309 (home-page "https://github.com/ContinuumIO/pycosat")
11310 (synopsis "Bindings to picosat (a SAT solver)")
11311 (description
11312 "This package provides efficient Python bindings to @code{picosat} on
11313 the C level. When importing pycosat, the @code{picosat} solver becomes part
11314 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
11315 Problem} (SAT) solver.")
11316 (license license:expat)))
11317
11318 (define-public python2-pycosat
11319 (package-with-python2 python-pycosat))
11320
11321 (define-public python2-ruamel.ordereddict
11322 (package
11323 (name "python2-ruamel.ordereddict")
11324 (version "0.4.9")
11325 (source
11326 (origin
11327 (method url-fetch)
11328 (uri (pypi-uri "ruamel.ordereddict" version))
11329 (sha256
11330 (base32
11331 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
11332 (build-system python-build-system)
11333 (arguments
11334 `(#:python ,python-2
11335 #:phases
11336 (modify-phases %standard-phases
11337 (delete 'check)
11338 (add-after 'install 'check
11339 (lambda* (#:key inputs outputs #:allow-other-keys)
11340 (add-installed-pythonpath inputs outputs)
11341 (invoke "python" "test/testordereddict.py"))))))
11342 (home-page "https://bitbucket.org/ruamel/ordereddict")
11343 (synopsis "Version of dict that keeps keys in insertion order")
11344 (description
11345 "This is an implementation of an ordered dictionary with @dfn{Key
11346 Insertion Order} (KIO: updates of values do not affect the position of the
11347 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
11348 removed and put at the back). The standard library module @code{OrderedDict},
11349 implemented later, implements a subset of @code{ordereddict} functionality.
11350 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
11351 Order} (KSO, no sorting function can be specified, but a transform can be
11352 specified to apply on the key before comparison (e.g. @code{string.lower})).")
11353 (license license:expat)))
11354
11355 (define-public python-pypeg2
11356 (package
11357 (name "python-pypeg2")
11358 (version "2.15.2")
11359 (source
11360 (origin
11361 (method url-fetch)
11362 (uri (pypi-uri "pyPEG2" version))
11363 (sha256
11364 (base32
11365 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
11366 (build-system python-build-system)
11367 (propagated-inputs `(("python-lxml" ,python-lxml)))
11368 (arguments
11369 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
11370 '(#:tests? #f))
11371 (home-page "https://fdik.org/pyPEG/")
11372 (synopsis "Parsering Expression Grammars in Python")
11373 (description "PyPEG is an intrinsic parser interpreter framework for
11374 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
11375 parse many formal languages.")
11376 (license license:gpl2)))
11377
11378 (define-public python-incremental
11379 (package
11380 (name "python-incremental")
11381 (version "17.5.0")
11382 (source
11383 (origin
11384 (method url-fetch)
11385 (uri (pypi-uri "incremental" version))
11386 (sha256
11387 (base32
11388 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
11389 (build-system python-build-system)
11390 (home-page "https://github.com/hawkowl/incremental")
11391 (synopsis "Library for versioning Python projects")
11392 (description "Incremental is a small library that versions your Python
11393 projects.")
11394 (license license:expat)))
11395
11396 (define-public python2-incremental
11397 (package-with-python2 python-incremental))
11398
11399 (define-public python-invoke
11400 (package
11401 (name "python-invoke")
11402 (home-page "http://www.pyinvoke.org/")
11403 (version "1.1.0")
11404 (source (origin
11405 (method url-fetch)
11406 (uri (pypi-uri "invoke" version))
11407 (sha256
11408 (base32
11409 "0aiy1xvk1f91246zxd1zqrm679vdvd10h843a2na41cqr3cflpi6"))))
11410 (build-system python-build-system)
11411 (arguments
11412 ;; XXX: Requires many dependencies that are not yet in Guix.
11413 `(#:tests? #f))
11414 (synopsis "Pythonic task execution")
11415 (description
11416 "Invoke is a Python task execution tool and library, drawing inspiration
11417 from various sources to arrive at a powerful and clean feature set. It is
11418 evolved from the Fabric project, but focuses on local and abstract concerns
11419 instead of servers and network commands.")
11420 (license license:bsd-3)))
11421
11422 (define-public python2-invoke
11423 (package-with-python2 python-invoke))
11424
11425 (define-public python-automat
11426 (package
11427 (name "python-automat")
11428 (version "0.7.0")
11429 (source (origin
11430 (method url-fetch)
11431 (uri (pypi-uri "Automat" version))
11432 (sha256
11433 (base32
11434 "03ivg70n3b1cbcd2zvjhk8y4kmqxcvhmili39lmgx09dza1qpmyb"))))
11435 (build-system python-build-system)
11436 ;; We disable the tests because they require python-twisted, while
11437 ;; python-twisted depends on python-automat. Twisted is optional, but the
11438 ;; tests fail if it is not available. Also see
11439 ;; <https://github.com/glyph/automat/issues/71>.
11440 (arguments '(#:tests? #f))
11441 (native-inputs
11442 `(("python-m2r" ,python-m2r)
11443 ("python-setuptools-scm" ,python-setuptools-scm)
11444 ("python-graphviz" ,python-graphviz)))
11445 (propagated-inputs
11446 `(("python-six" ,python-six)
11447 ("python-attrs" ,python-attrs)))
11448 (home-page "https://github.com/glyph/Automat")
11449 (synopsis "Self-service finite-state machines")
11450 (description "Automat is a library for concise, idiomatic Python
11451 expression of finite-state automata (particularly deterministic finite-state
11452 transducers).")
11453 (license license:expat)))
11454
11455 (define-public python2-automat
11456 (package-with-python2 python-automat))
11457
11458 (define-public python-m2r
11459 (package
11460 (name "python-m2r")
11461 (version "0.2.1")
11462 (source (origin
11463 (method url-fetch)
11464 (uri (pypi-uri "m2r" version))
11465 (sha256
11466 (base32
11467 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
11468 (build-system python-build-system)
11469 (propagated-inputs
11470 `(("python-docutils" ,python-docutils)
11471 ("python-mistune" ,python-mistune)))
11472 (native-inputs
11473 `(("python-pygments" ,python-pygments)
11474 ("python-mock" ,python-mock)))
11475 (home-page "https://github.com/miyakogi/m2r")
11476 (synopsis "Markdown to reStructuredText converter")
11477 (description "M2R converts a markdown file including reST markups to valid
11478 reST format.")
11479 (license license:expat)))
11480
11481 (define-public python2-m2r
11482 (package-with-python2 python-m2r))
11483
11484 (define-public python-constantly
11485 (package
11486 (name "python-constantly")
11487 (version "15.1.0")
11488 (source (origin
11489 (method url-fetch)
11490 (uri (pypi-uri "constantly" version))
11491 (sha256
11492 (base32
11493 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
11494 (build-system python-build-system)
11495 (home-page "https://github.com/twisted/constantly")
11496 (synopsis "Symbolic constants in Python")
11497 (description "Constantly is a Python library that provides symbolic
11498 constant support. It includes collections and constants with text, numeric,
11499 and bit flag values.")
11500 (license license:expat)))
11501
11502 (define-public python2-constantly
11503 (package-with-python2 python-constantly))
11504
11505 (define-public python-attrs
11506 (package
11507 (name "python-attrs")
11508 (version "19.1.0")
11509 (source (origin
11510 (method url-fetch)
11511 (uri (pypi-uri "attrs" version))
11512 (sha256
11513 (base32
11514 "16g33zr5f449lqc5wgvzpknxryfzrfsxcr6kpgxwn7l5fkv71f7h"))))
11515 (build-system python-build-system)
11516 (arguments
11517 `(#:modules ((guix build utils)
11518 (guix build python-build-system)
11519 (ice-9 ftw)
11520 (srfi srfi-1)
11521 (srfi srfi-26))
11522 #:phases (modify-phases %standard-phases
11523 (replace 'check
11524 (lambda _
11525 (let ((cwd (getcwd)))
11526 (setenv "PYTHONPATH"
11527 (string-append
11528 cwd "/build/"
11529 (find (cut string-prefix? "lib" <>)
11530 (scandir (string-append cwd "/build")))
11531 ":"
11532 (getenv "PYTHONPATH")))
11533 (invoke "python" "-m" "pytest")))))))
11534 (native-inputs
11535 `(("python-coverage" ,python-coverage)
11536 ("python-hypothesis" ,python-hypothesis)
11537 ("python-pympler" ,python-pympler)
11538 ("python-pytest" ,python-pytest)
11539 ("python-six" ,python-six)
11540 ("python-sphinx" ,python-sphinx)
11541 ("python-zope-interface" ,python-zope-interface)))
11542 (home-page "https://github.com/python-attrs/attrs/")
11543 (synopsis "Attributes without boilerplate")
11544 (description "@code{attrs} is a Python package with class decorators that
11545 ease the chores of implementing the most common attribute-related object
11546 protocols.")
11547 (license license:expat)))
11548
11549 (define-public python2-attrs
11550 (package-with-python2 python-attrs))
11551
11552 (define-public python-attrs-bootstrap
11553 (package
11554 (inherit python-attrs)
11555 (name "python-attrs-bootstrap")
11556 ;; Keep this on a fixed version so python-attrs can be updated without
11557 ;; triggering a mass-rebuild. FIXME: Update this in the next rebuild cycle.
11558 (version "17.4.0")
11559 (source (origin
11560 (method url-fetch)
11561 (uri (pypi-uri "attrs" version))
11562 (sha256
11563 (base32
11564 "1jafnn1kzd6qhxgprhx6y6ik1r5m2rilx25syzcmq03azp660y8w"))))
11565 (native-inputs `())
11566 (arguments `(#:tests? #f))))
11567
11568 (define-public python2-attrs-bootstrap
11569 (package-with-python2 python-attrs-bootstrap))
11570
11571 (define-public python2-cliapp
11572 (package
11573 (name "python2-cliapp")
11574 (version "1.20180812.1")
11575 (source
11576 (origin
11577 (method url-fetch)
11578 (uri (string-append
11579 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
11580 version ".tar.gz"))
11581 (sha256
11582 (base32
11583 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
11584 (build-system python-build-system)
11585 (arguments
11586 `(#:python ,python-2
11587 #:phases
11588 (modify-phases %standard-phases
11589 ;; check phase needs to be run before the build phase. If not,
11590 ;; coverage-test-runner looks for tests for the built source files,
11591 ;; and fails.
11592 (delete 'check)
11593 (add-before 'build 'check
11594 (lambda _
11595 ;; Disable python3 tests
11596 (substitute* "check"
11597 (("python3") "# python3"))
11598 (invoke "./check"))))))
11599 (native-inputs
11600 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
11601 ("python2-pep8" ,python2-pep8)))
11602 (propagated-inputs
11603 `(("python2-pyaml" ,python2-pyaml)))
11604 (home-page "https://liw.fi/cliapp/")
11605 (synopsis "Python framework for command line programs")
11606 (description "@code{python2-cliapp} is a python framework for
11607 command line programs. It contains the typical stuff such programs
11608 need to do, such as parsing the command line for options, and
11609 iterating over input files.")
11610 (license license:gpl2+)))
11611
11612 (define-public python2-ttystatus
11613 (package
11614 (name "python2-ttystatus")
11615 (version "0.36")
11616 (source
11617 (origin
11618 (method url-fetch)
11619 (uri (string-append
11620 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
11621 version ".tar.gz"))
11622 (sha256
11623 (base32
11624 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
11625 (build-system python-build-system)
11626 (native-inputs
11627 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
11628 ("python2-pep8" ,python2-pep8)))
11629 (arguments
11630 `(#:python ,python-2
11631 #:phases
11632 (modify-phases %standard-phases
11633 ;; check phase needs to be run before the build phase. If not,
11634 ;; coverage-test-runner looks for tests for the built source files,
11635 ;; and fails.
11636 (delete 'check)
11637 (add-before 'build 'check
11638 (lambda _ (invoke "make" "check"))))))
11639 (home-page "https://liw.fi/ttystatus/")
11640 (synopsis "Python library for showing progress reporting and
11641 status updates on terminals")
11642 (description "@code{python2-ttystatus} is a python library for
11643 showing progress reporting and status updates on terminals, for
11644 command line programs. Output is automatically adapted to the width
11645 of the terminal: truncated if it does not fit, and resized if the
11646 terminal size changes.")
11647 (license license:gpl3+)))
11648
11649 (define-public python2-tracing
11650 (package
11651 (name "python2-tracing")
11652 (version "0.10")
11653 (source
11654 (origin
11655 (method url-fetch)
11656 (uri (string-append
11657 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
11658 version ".tar.gz"))
11659 (sha256
11660 (base32
11661 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
11662 (build-system python-build-system)
11663 (arguments
11664 `(#:python ,python-2))
11665 (home-page "https://liw.fi/tracing/")
11666 (synopsis "Python debug logging helper")
11667 (description "@code{python2-tracing} is a python library for
11668 logging debug messages. It provides a way to turn debugging messages
11669 on and off, based on the filename they occur in. It is much faster
11670 than using @code{logging.Filter} to accomplish the same thing, which
11671 matters when code is run in production mode. The actual logging still
11672 happens using the @code{logging} library.")
11673 (license license:gpl3+)))
11674
11675 (define-public python2-larch
11676 (package
11677 (name "python2-larch")
11678 (version "1.20151025")
11679 (source
11680 (origin
11681 (method url-fetch)
11682 (uri (string-append
11683 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
11684 version ".tar.gz"))
11685 (patches (search-patches
11686 "python2-larch-coverage-4.0a6-compatibility.patch"))
11687 (sha256
11688 (base32
11689 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
11690 (build-system python-build-system)
11691 (arguments
11692 `(#:python ,python-2
11693 #:phases
11694 (modify-phases %standard-phases
11695 ;; check phase needs to be run before the build phase. If not,
11696 ;; coverage-test-runner looks for tests for the built source files,
11697 ;; and fails.
11698 (delete 'check)
11699 (add-before 'build 'check
11700 (lambda _ (invoke "make" "check"))))))
11701 (native-inputs
11702 `(("cmdtest" ,cmdtest)
11703 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
11704 (propagated-inputs
11705 `(("python2-tracing" ,python2-tracing)))
11706 (home-page "https://liw.fi/larch/")
11707 (synopsis "Python copy-on-write B-tree library")
11708 (description "@code{python2-larch} is an implementation of
11709 particular kind of B-tree, based on research by Ohad Rodeh. See
11710 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
11711 on the data structure.
11712
11713 The distinctive feature of this B-tree is that a node is never
11714 (conceptually) modified. Instead, all updates are done by
11715 copy-on-write. This makes it easy to clone a tree, and modify only the
11716 clone, while other processes access the original tree.")
11717 (license license:gpl3+)))
11718
11719 (define-public python-astroid
11720 (package
11721 (name "python-astroid")
11722 (version "2.1.0")
11723 (source
11724 (origin
11725 (method url-fetch)
11726 (uri (pypi-uri "astroid" version))
11727 (sha256
11728 (base32
11729 "08hz675knh4294bancdapql392fmbjyimhbyrmfkz1ka7l035c1m"))))
11730 (build-system python-build-system)
11731 (propagated-inputs
11732 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
11733 ("python-six" ,python-six)
11734 ("python-wrapt" ,python-wrapt)))
11735 (native-inputs
11736 `(("python-dateutil" ,python-dateutil)
11737 ("python-nose" ,python-nose)
11738 ("python-pytest" ,python-pytest)
11739 ("python-pytest-runner" ,python-pytest-runner)))
11740 (arguments
11741 `(#:phases
11742 (modify-phases %standard-phases
11743 (add-after 'unpack 'remove-spurious-test
11744 (lambda _
11745 ;; This can be removed after upgrading from python-3.7
11746 ;; https://github.com/PyCQA/astroid/issues/593
11747 ;; https://bugs.python.org/issue34056
11748 (delete-file "astroid/tests/unittest_modutils.py")
11749 #t))
11750 (replace 'check
11751 (lambda _
11752 (invoke "pytest" "astroid"))))))
11753 (home-page "https://github.com/PyCQA/astroid")
11754 (synopsis "Common base representation of python source code for pylint and
11755 other projects")
11756 (description "@code{python-astroid} provides a common base representation
11757 of python source code for projects such as pychecker, pyreverse, pylint, etc.
11758
11759 It provides a compatible representation which comes from the _ast module. It
11760 rebuilds the tree generated by the builtin _ast module by recursively walking
11761 down the AST and building an extended ast. The new node classes have
11762 additional methods and attributes for different usages. They include some
11763 support for static inference and local name scopes. Furthermore, astroid
11764 builds partial trees by inspecting living objects.")
11765 (license license:lgpl2.1+)
11766 (properties `((python2-variant . ,(delay python2-astroid))))))
11767
11768 (define-public python2-astroid
11769 (let ((base (package-with-python2
11770 (strip-python2-variant python-astroid))))
11771 (package (inherit base)
11772 ;; Version 2.x removes python2 support.
11773 (version "1.6.5")
11774 (source
11775 (origin
11776 (method url-fetch)
11777 (uri (pypi-uri "astroid" version))
11778 (sha256
11779 (base32
11780 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
11781 (arguments
11782 (substitute-keyword-arguments (package-arguments base)
11783 ((#:phases phases)
11784 `(modify-phases ,phases
11785 (add-after 'unpack 'remove-spurious-test
11786 (lambda _
11787 ;; https://github.com/PyCQA/astroid/issues/276
11788 (delete-file "astroid/tests/unittest_brain.py")
11789 #t))
11790 (replace 'check
11791 (lambda _
11792 (invoke"python" "-m" "unittest" "discover"
11793 "-p" "unittest*.py")))))))
11794 (native-inputs `())
11795 (propagated-inputs
11796 `(("python2-backports-functools-lru-cache"
11797 ,python2-backports-functools-lru-cache)
11798 ("python2-enum34" ,python2-enum34)
11799 ("python2-singledispatch" ,python2-singledispatch)
11800 ,@(package-propagated-inputs base))))))
11801
11802 (define-public python-isort
11803 (package
11804 (name "python-isort")
11805 (version "4.3.4")
11806 (source
11807 (origin
11808 (method git-fetch)
11809 (uri (git-reference
11810 ;; Tests pass only from the Github sources
11811 (url "https://github.com/timothycrosley/isort")
11812 (commit version)))
11813 (file-name (git-file-name name version))
11814 (sha256
11815 (base32
11816 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
11817 (build-system python-build-system)
11818 (native-inputs
11819 `(("python-mock" ,python-mock)
11820 ("python-pytest" ,python-pytest)))
11821 (home-page "https://github.com/timothycrosley/isort")
11822 (synopsis "Python utility/library to sort python imports")
11823 (description "@code{python-isort} is a python utility/library to sort
11824 imports alphabetically, and automatically separated into sections. It
11825 provides a command line utility, a python library and plugins for various
11826 editors.")
11827 (license license:expat)
11828 (properties `((python2-variant . ,(delay python2-isort))))))
11829
11830 (define-public python2-isort
11831 (let ((base (package-with-python2
11832 (strip-python2-variant python-isort))))
11833 (package (inherit base)
11834 (native-inputs
11835 `(("python2-futures" ,python2-futures)
11836 ,@(package-native-inputs base))))))
11837
11838 (define-public python2-backports-functools-lru-cache
11839 (package
11840 (name "python2-backports-functools-lru-cache")
11841 (version "1.5")
11842 (source
11843 (origin
11844 (method url-fetch)
11845 ;; only the pypi tarballs contain the necessary metadata
11846 (uri (pypi-uri "backports.functools_lru_cache" version))
11847 (sha256
11848 (base32
11849 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
11850 (build-system python-build-system)
11851 (native-inputs
11852 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
11853 (arguments
11854 `(#:python ,python-2))
11855 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
11856 (synopsis "Backport of functools.lru_cache from Python 3.3")
11857 (description "@code{python2-backports-functools-lru-cache} is a backport
11858 of @code{functools.lru_cache} from python 3.3.")
11859 (license license:expat)))
11860
11861 (define-public python-configparser
11862 (package
11863 (name "python-configparser")
11864 (version "3.5.0")
11865 (source
11866 (origin
11867 (method url-fetch)
11868 (uri (string-append
11869 "https://bitbucket.org/ambv/configparser/get/"
11870 version ".tar.bz2"))
11871 (file-name (string-append name "-" version ".tar.gz"))
11872 (sha256
11873 (base32
11874 "0waq40as14abwzbb321hfz4vr1fi363nscy32ga14qvfygrg96wa"))))
11875 (build-system python-build-system)
11876 (home-page "https://github.com/jaraco/configparser/")
11877 (synopsis "Backport of configparser from python 3.5")
11878 (description "@code{python-configparser} is a backport of
11879 @code{configparser} from Python 3.5 so that it can be used directly
11880 in other versions.")
11881 (license license:expat)))
11882
11883 (define-public python2-configparser
11884 (package-with-python2 python-configparser))
11885
11886 (define-public python-mando
11887 (package
11888 (name "python-mando")
11889 (version "0.6.4")
11890 (source (origin
11891 (method url-fetch)
11892 (uri (pypi-uri "mando" version))
11893 (sha256
11894 (base32
11895 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
11896 (build-system python-build-system)
11897 (propagated-inputs
11898 `(("python-rst2ansi" ,python-rst2ansi)
11899 ("python-six" ,python-six)))
11900 (native-inputs
11901 `(("python-pytest" ,python-pytest)))
11902 (home-page "https://mando.readthedocs.org/")
11903 (synopsis
11904 "Wrapper around argparse, allowing creation of complete CLI applications")
11905 (description
11906 "This package is a wrapper around argparse, allowing you to write complete CLI
11907 applications in seconds while maintaining all the flexibility.")
11908 (license license:expat)))
11909
11910 (define-public python2-mando
11911 (package-with-python2 python-mando))
11912
11913 (define-public python2-argparse
11914 (package
11915 (name "python2-argparse")
11916 (version "1.4.0")
11917 (source
11918 (origin
11919 (method url-fetch)
11920 (uri (pypi-uri "argparse" version))
11921 (sha256
11922 (base32
11923 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
11924 (build-system python-build-system)
11925 (arguments
11926 `(#:python ,python-2))
11927 (home-page "https://github.com/ThomasWaldmann/argparse/")
11928 (synopsis "Python command-line parsing library")
11929 (description
11930 "This package is mostly for people who want to have @code{argparse} on
11931 older Pythons because it was not part of the standard library back then.")
11932 (license license:psfl)))
11933
11934 (define-public python-fudge
11935 (package
11936 (name "python-fudge")
11937 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
11938 ;; package, which is currently the only use of this package.
11939 (version "0.9.6")
11940 (source
11941 (origin
11942 (method url-fetch)
11943 (uri (pypi-uri "fudge" version))
11944 (sha256
11945 (base32
11946 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
11947 (build-system python-build-system)
11948 (arguments
11949 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
11950 (home-page "https://github.com/fudge-py/fudge")
11951 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
11952 (description
11953 "Fudge is a Python module for using fake objects (mocks and stubs) to
11954 test real ones.
11955
11956 In readable Python code, you declare the methods available on your fake object
11957 and how they should be called. Then you inject that into your application and
11958 start testing. This declarative approach means you don’t have to record and
11959 playback actions and you don’t have to inspect your fakes after running code.
11960 If the fake object was used incorrectly then you’ll see an informative
11961 exception message with a traceback that points to the culprit.")
11962 (license license:expat)))
11963
11964 (define-public python2-fudge
11965 (package-with-python2 python-fudge))
11966
11967 (define-public python-mwclient
11968 (package
11969 (name "python-mwclient")
11970 (version "0.8.4")
11971 (source
11972 (origin
11973 (method url-fetch)
11974 ;; The PyPI version wouldn't contain tests.
11975 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
11976 "v" version ".tar.gz"))
11977 (file-name (string-append name "-" version ".tar.gz"))
11978 (sha256
11979 (base32
11980 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
11981 (build-system python-build-system)
11982 (propagated-inputs
11983 `(("python-requests" ,python-requests)
11984 ("python-requests-oauthlib"
11985 ,python-requests-oauthlib)
11986 ("python-six" ,python-six)))
11987 (native-inputs
11988 `(("python-mock" ,python-mock)
11989 ("python-pytest" ,python-pytest)
11990 ("python-pytest-pep8" ,python-pytest-pep8)
11991 ("python-pytest-cache" ,python-pytest-cache)
11992 ("python-pytest-cov" ,python-pytest-cov)
11993 ("python-responses" ,python-responses)))
11994 (home-page "https://github.com/btongminh/mwclient")
11995 (synopsis "MediaWiki API client")
11996 (description "This package provides a MediaWiki API client.")
11997 (license license:expat)))
11998
11999 (define-public python2-mwclient
12000 (package-with-python2 python-mwclient))
12001
12002 (define-public python-utils
12003 (package
12004 (name "python-utils")
12005 (version "2.1.0")
12006 (source (origin
12007 (method url-fetch)
12008 (uri (pypi-uri "python-utils" version))
12009 (sha256
12010 (base32
12011 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
12012 (build-system python-build-system)
12013 (native-inputs
12014 `(("pytest-runner" ,python-pytest-runner)
12015 ("pytest" ,python-pytest)
12016 ("six" ,python-six)))
12017 (home-page "https://github.com/WoLpH/python-utils")
12018 (synopsis "Convenient utilities not included with the standard Python install")
12019 (description
12020 "Python Utils is a collection of small Python functions and classes which
12021 make common patterns shorter and easier.")
12022 (license license:bsd-2)))
12023
12024 (define-public python2-utils
12025 (package-with-python2 python-utils))
12026
12027 (define-public python-diff-match-patch
12028 (package
12029 (name "python-diff-match-patch")
12030 (version "20121119")
12031 (source
12032 (origin
12033 (method url-fetch)
12034 (uri (pypi-uri "diff-match-patch" version))
12035 (sha256
12036 (base32
12037 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
12038 (build-system python-build-system)
12039 (home-page "https://code.google.com/p/google-diff-match-patch")
12040 (synopsis "Synchronize plain text")
12041 (description "Diff Match and Patch libraries offer robust algorithms to
12042 perform the operations required for synchronizing plain text.")
12043 (license license:asl2.0)))
12044
12045 (define-public python2-diff-match-patch
12046 (package-with-python2 python-diff-match-patch))
12047
12048 (define-public python-dirsync
12049 (package
12050 (name "python-dirsync")
12051 (version "2.2.3")
12052 (source
12053 (origin
12054 (method url-fetch)
12055 (uri (pypi-uri "dirsync" version))
12056 (sha256
12057 (base32
12058 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
12059 (build-system python-build-system)
12060 (propagated-inputs
12061 `(("six" ,python-six)))
12062 (home-page "https://bitbucket.org/tkhyn/dirsync")
12063 (synopsis "Advanced directory tree synchronisation tool")
12064 (description "Advanced directory tree synchronisation tool.")
12065 (license license:expat)))
12066
12067 (define-public python2-dirsync
12068 (package-with-python2 python-dirsync))
12069
12070 (define-public python-levenshtein
12071 (package
12072 (name "python-levenshtein")
12073 (version "0.12.0")
12074 (source
12075 (origin
12076 (method url-fetch)
12077 (uri (pypi-uri "python-Levenshtein" version))
12078 (sha256
12079 (base32
12080 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
12081 (build-system python-build-system)
12082 (home-page "https://github.com/ztane/python-Levenshtein")
12083 (synopsis "Fast computation of Levenshtein distance and string similarity")
12084 (description
12085 "The Levenshtein Python C extension module contains functions for fast computation of
12086 @enumerate
12087 @item Levenshtein (edit) distance, and edit operations
12088 @item string similarity
12089 @item approximate median strings, and generally string averaging
12090 @item string sequence and set similarity
12091 @end enumerate
12092 It supports both normal and Unicode strings.")
12093 (license license:gpl2+)))
12094
12095 (define-public python2-levenshtein
12096 (package-with-python2 python-levenshtein))
12097
12098 (define-public python-scandir
12099 (package
12100 (name "python-scandir")
12101 (version "1.9.0")
12102 (source
12103 (origin
12104 (method url-fetch)
12105 (uri (pypi-uri "scandir" version))
12106 (sha256
12107 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
12108 (build-system python-build-system)
12109 (arguments
12110 `(#:phases (modify-phases %standard-phases
12111 (replace 'check
12112 (lambda _
12113 (invoke "python" "test/run_tests.py"))))))
12114 (home-page "https://github.com/benhoyt/scandir")
12115 (synopsis "Directory iteration function")
12116 (description
12117 "Directory iteration function like os.listdir(), except that instead of
12118 returning a list of bare filenames, it yields DirEntry objects that include
12119 file type and stat information along with the name. Using scandir() increases
12120 the speed of os.walk() by 2-20 times (depending on the platform and file
12121 system) by avoiding unnecessary calls to os.stat() in most cases.
12122
12123 This package is part of the Python standard library since version 3.5.")
12124 (license license:bsd-3)))
12125
12126 (define-public python2-scandir
12127 (package-with-python2 python-scandir))
12128
12129 (define-public python2-stemming
12130 (package
12131 (name "python2-stemming")
12132 (version "1.0.1")
12133 (source
12134 (origin
12135 (method url-fetch)
12136 (uri (pypi-uri "stemming" version))
12137 (sha256
12138 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
12139 (build-system python-build-system)
12140 (arguments
12141 `(#:python ,python-2))
12142 (home-page "https://bitbucket.org/mchaput/stemming/overview")
12143 (synopsis "Python implementations of various stemming algorithms")
12144 (description
12145 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
12146 stemming algorithms for English. These implementations are straightforward and
12147 efficient, unlike some Python versions of the same algorithms available on the
12148 Web. This package is an extraction of the stemming code included in the Whoosh
12149 search engine.")
12150 (license license:public-domain)))
12151
12152 (define-public python-factory-boy
12153 (package
12154 (name "python-factory-boy")
12155 (version "2.8.1")
12156 (source
12157 (origin
12158 (method url-fetch)
12159 (uri (pypi-uri "factory_boy" version))
12160 (sha256
12161 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
12162 (build-system python-build-system)
12163 (arguments
12164 ;; Tests are not included in the tarball.
12165 `(#:tests? #f))
12166 (propagated-inputs
12167 `(("faker" ,python-faker)))
12168 (home-page "https://github.com/benhoyt/scandir")
12169 (synopsis "Versatile test fixtures replacement")
12170 (description
12171 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
12172
12173 As a fixtures replacement tool, it aims to replace static, hard to maintain
12174 fixtures with easy-to-use factories for complex object.
12175
12176 Instead of building an exhaustive test setup with every possible combination
12177 of corner cases, factory_boy allows you to use objects customized for the
12178 current test, while only declaring the test-specific fields")
12179 (license license:expat)))
12180
12181 (define-public python2-factory-boy
12182 (package-with-python2 python-factory-boy))
12183
12184 (define-public python-translate-toolkit
12185 (package
12186 (name "python-translate-toolkit")
12187 (version "2.1.0")
12188 (source
12189 (origin
12190 (method url-fetch)
12191 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
12192 (sha256
12193 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
12194 (build-system python-build-system)
12195 (native-inputs
12196 `(("python-pytest" ,python-pytest)
12197 ("python-sphinx" ,python-sphinx)))
12198 (propagated-inputs
12199 `(("python-babel" ,python-babel)
12200 ("python-beautifulsoup4" ,python-beautifulsoup4)
12201 ("python-chardet" ,python-chardet)
12202 ("python-diff-match-patch" ,python-diff-match-patch)
12203 ("python-levenshtein" ,python-levenshtein)
12204 ("python-lxml" ,python-lxml)
12205 ("python-six" ,python-six)
12206 ("python-vobject" ,python-vobject)
12207 ("python-pyyaml" ,python-pyyaml)))
12208 (arguments
12209 ;; TODO: tests are not run, because they end with
12210 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
12211 ;; 'parse_funcs'
12212 ;; during test setup.
12213 `(#:tests? #f))
12214 (home-page "https://toolkit.translatehouse.org")
12215 (synopsis "Tools and API for translation and localization engineering")
12216 (description
12217 "Tools and API for translation and localization engineering. It contains
12218 several utilities, as well as an API for building localization tools.")
12219 (license license:gpl2+)))
12220
12221 (define-public python2-translate-toolkit
12222 (package-with-python2 python-translate-toolkit))
12223
12224 (define-public python-packaging
12225 (package
12226 (name "python-packaging")
12227 (version "19.0")
12228 (source
12229 (origin
12230 (method url-fetch)
12231 (uri (pypi-uri "packaging" version))
12232 (sha256
12233 (base32
12234 "1brjhygq9dz6x1kdljivkjfldi3qf5rbkqgck1bpgv9qpv8ab60c"))))
12235 (build-system python-build-system)
12236 (arguments
12237 `(#:phases (modify-phases %standard-phases
12238 (replace 'check
12239 (lambda _ (invoke "py.test" "-vv"))))))
12240 (native-inputs
12241 `(("python-pretend" ,python-pretend)
12242 ("python-pytest" ,python-pytest)))
12243 (propagated-inputs
12244 `(("python-pyparsing" ,python-pyparsing)
12245 ("python-six" ,python-six)))
12246 (home-page "https://github.com/pypa/packaging")
12247 (synopsis "Core utilities for Python packages")
12248 (description "Packaging is a Python module for dealing with Python packages.
12249 It offers an interface for working with package versions, names, and dependency
12250 information.")
12251 ;; From 'LICENSE': This software is made available under the terms of
12252 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
12253 ;; Contributions to this software is made under the terms of *both* these
12254 ;; licenses.
12255 (license (list license:asl2.0 license:bsd-2))))
12256
12257 (define-public python2-packaging
12258 (package-with-python2 python-packaging))
12259
12260 (define-public python-relatorio
12261 (package
12262 (name "python-relatorio")
12263 (version "0.8.0")
12264 (source
12265 (origin
12266 (method url-fetch)
12267 (uri (pypi-uri "relatorio" version))
12268 (sha256
12269 (base32
12270 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
12271 (build-system python-build-system)
12272 (propagated-inputs
12273 `(("python-lxml" ,python-lxml)
12274 ("python-genshi" ,python-genshi)))
12275 (native-inputs
12276 `(("python-magic" ,python-magic)))
12277 (home-page "https://relatorio.tryton.org/")
12278 (synopsis "Templating library able to output ODT and PDF files")
12279 (description "Relatorio is a templating library which provides a way to
12280 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
12281 for more filetypes can be easily added by creating plugins for them.")
12282 (license license:gpl3+)))
12283
12284 (define-public python2-relatorio
12285 (package-with-python2 python-relatorio))
12286
12287 (define-public python-radon
12288 (package
12289 (name "python-radon")
12290 (version "2.2.0")
12291 (source
12292 (origin
12293 (method url-fetch)
12294 (uri (pypi-uri "radon" version))
12295 (sha256
12296 (base32
12297 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
12298 (build-system python-build-system)
12299 (arguments
12300 `(#:phases (modify-phases %standard-phases
12301 (replace 'check
12302 (lambda _
12303 (invoke "python" "radon/tests/run.py"))))))
12304 (propagated-inputs
12305 `(("python-colorama" ,python-colorama)
12306 ("python-flake8-polyfill" ,python-flake8-polyfill)
12307 ("python-mando" ,python-mando)))
12308 (native-inputs
12309 `(("python-pytest" ,python-pytest)
12310 ("python-pytest-mock" ,python-pytest-mock)))
12311 (home-page "https://radon.readthedocs.org/")
12312 (synopsis "Code Metrics in Python")
12313 (description "Radon is a Python tool which computes various code metrics.
12314 Supported metrics are:
12315 @itemize @bullet
12316 @item raw metrics: SLOC, comment lines, blank lines, &c.
12317 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
12318 @item Halstead metrics (all of them)
12319 @item the Maintainability Index (a Visual Studio metric)
12320 @end itemize")
12321 (license license:expat)))
12322
12323 (define-public python2-radon
12324 (package-with-python2 python-radon))
12325
12326 (define-public python-sure
12327 (package
12328 (name "python-sure")
12329 (version "1.4.11")
12330 (source
12331 (origin
12332 (method url-fetch)
12333 (uri (pypi-uri "sure" version))
12334 (sha256
12335 (base32
12336 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
12337 (build-system python-build-system)
12338 (propagated-inputs
12339 `(("python-mock" ,python-mock)
12340 ("python-six" ,python-six)))
12341 (native-inputs
12342 `(("python-nose" ,python-nose)))
12343 (home-page "https://github.com/gabrielfalcao/sure")
12344 (synopsis "Automated testing library in python for python")
12345 (description
12346 "Sure is a python library that leverages a DSL for writing assertions.
12347 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
12348 (license license:gpl3+)))
12349
12350 (define-public python2-sure
12351 (package-with-python2 python-sure))
12352
12353 (define-public python2-couleur
12354 ;; This package does not seem to support python3 at all, hence,
12355 ;; only the python2 variant definition is provided.
12356 (package
12357 (name "python2-couleur")
12358 (version "0.6.2")
12359 (source
12360 (origin
12361 (method url-fetch)
12362 (uri (pypi-uri "couleur" version))
12363 (sha256
12364 (base32
12365 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
12366 (build-system python-build-system)
12367 (arguments
12368 `(#:python ,python-2))
12369 (home-page "https://github.com/gabrielfalcao/couleur")
12370 (synopsis
12371 "ANSI terminal tool for python, colored shell and other handy fancy features")
12372 (description
12373 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
12374 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
12375 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
12376 ;; https://github.com/gabrielfalcao/couleur/issues/11
12377 (license license:lgpl3+)))
12378
12379 (define-public python-misaka
12380 (package
12381 (name "python-misaka")
12382 (version "2.1.1")
12383 (source
12384 (origin
12385 (method url-fetch)
12386 (uri (pypi-uri "misaka" version))
12387 (sha256
12388 (base32
12389 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
12390 (build-system python-build-system)
12391 (arguments
12392 `(;; Line 37 of setup.py calls self.run_command('develop')
12393 ;; in the 'check' phase. This command seems to be trying
12394 ;; to write to
12395 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
12396 ;; for which it does not have the permission to write.
12397 #:tests? #f))
12398 (propagated-inputs
12399 `(("python-cffi" ,python-cffi)))
12400 (home-page "https://github.com/FSX/misaka")
12401 (synopsis "Python binding for Hoedown")
12402 (description
12403 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
12404 library written in C. It features a fast HTML renderer and functionality to make custom
12405 renderers (e.g. man pages or LaTeX).")
12406 (license license:expat)))
12407
12408 (define-public python2-misaka
12409 (package-with-python2 python-misaka))
12410
12411 (define-public python2-steadymark
12412 ;; This is forced into being a python2 only variant
12413 ;; due to its dependence on couleur that has no support
12414 ;; for python3
12415 (package
12416 (name "python2-steadymark")
12417 (version "0.7.3")
12418 (source
12419 (origin
12420 (method url-fetch)
12421 (uri (pypi-uri "steadymark" version))
12422 (sha256
12423 (base32
12424 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
12425 (build-system python-build-system)
12426 (native-inputs
12427 `(("python-couleur" ,python2-couleur)
12428 ("python-sure" ,python2-sure)
12429 ("python-misaka" ,python2-misaka)))
12430 (arguments
12431 `(#:python ,python-2
12432 #:phases
12433 (modify-phases %standard-phases
12434 (add-before 'build 'patch-setup-py
12435 (lambda _
12436 ;; Update requirements from dependency==version
12437 ;; to dependency>=version
12438 (substitute* "setup.py"
12439 (("==") ">="))
12440 #t)))))
12441 (home-page "https://github.com/gabrielfalcao/steadymark")
12442 (synopsis "Markdown-based test runner for python")
12443 (description
12444 "@code{Steadymark} allows documentation to be written in github-flavoured
12445 markdown. The documentation may contain snippets of code surrounded by python
12446 code blocks and @code{Steadymark} will find these snippets and run them, making
12447 sure that there are no old malfunctional examples in the documentation examples.")
12448 (license license:expat)))
12449
12450 (define-public python-jsonpointer
12451 (package
12452 (name "python-jsonpointer")
12453 (version "1.10")
12454 (source
12455 (origin
12456 (method url-fetch)
12457 (uri (pypi-uri "jsonpointer" version))
12458 (sha256
12459 (base32
12460 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
12461 (build-system python-build-system)
12462 (home-page "https://github.com/stefankoegl/python-json-pointer")
12463 (synopsis "Identify specific nodes in a JSON document")
12464 (description "@code{jsonpointer} allows you to access specific nodes
12465 by path in a JSON document (see RFC 6901).")
12466 (license license:bsd-3)))
12467
12468 (define-public python2-jsonpointer
12469 (package-with-python2 python-jsonpointer))
12470
12471 (define-public python-jsonpatch
12472 (package
12473 (name "python-jsonpatch")
12474 (version "1.16")
12475 (source
12476 (origin
12477 (method url-fetch)
12478 ;; pypi version lacks tests.js
12479 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12480 "archive/v" version ".tar.gz"))
12481 (file-name (string-append name "-" version ".tar.gz"))
12482 (sha256
12483 (base32
12484 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
12485 (build-system python-build-system)
12486 (native-inputs
12487 `(("python-jsonpointer" ,python-jsonpointer)))
12488 (home-page "https://github.com/stefankoegl/python-json-patch")
12489 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
12490 (description "@code{jsonpatch} is a library and program that allows
12491 applying JSON Patches according to RFC 6902.")
12492 (license license:bsd-3)))
12493
12494 (define-public python2-jsonpatch
12495 (package-with-python2 python-jsonpatch))
12496
12497 (define-public python-jsonpatch-0.4
12498 (package (inherit python-jsonpatch)
12499 (name "python-jsonpatch")
12500 (version "0.4")
12501 (source
12502 (origin
12503 (method url-fetch)
12504 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12505 "archive/v" version ".tar.gz"))
12506 (file-name (string-append name "-" version ".tar.gz"))
12507 (sha256
12508 (base32
12509 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
12510
12511 (define-public python2-jsonpatch-0.4
12512 (package-with-python2 python-jsonpatch-0.4))
12513
12514 (define-public python-rfc3986
12515 (package
12516 (name "python-rfc3986")
12517 (version "1.1.0")
12518 (source (origin
12519 (method url-fetch)
12520 (uri (pypi-uri "rfc3986" version))
12521 (sha256
12522 (base32
12523 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
12524 (build-system python-build-system)
12525 (arguments
12526 `(#:modules ((guix build utils)
12527 (guix build python-build-system)
12528 (ice-9 ftw)
12529 (srfi srfi-1)
12530 (srfi srfi-26))
12531 #:phases
12532 (modify-phases %standard-phases
12533 (replace 'check
12534 (lambda _
12535 (let ((cwd (getcwd)))
12536 (setenv "PYTHONPATH"
12537 (string-append cwd "/build/"
12538 (find (cut string-prefix? "lib" <>)
12539 (scandir (string-append cwd "/build")))
12540 ":"
12541 (getenv "PYTHONPATH")))
12542 (invoke "pytest" "-v")))))))
12543 (native-inputs
12544 `(("python-pytest" ,python-pytest)))
12545 (home-page "https://rfc3986.readthedocs.io/")
12546 (synopsis "Parse and validate URI references")
12547 (description
12548 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
12549 validation and authority parsing. This module also supports RFC@tie{}6874
12550 which adds support for zone identifiers to IPv6 addresses.")
12551 (license license:asl2.0)))
12552
12553 (define-public python2-rfc3986
12554 (package-with-python2 python-rfc3986))
12555
12556 (define-public python-rfc3987
12557 (package
12558 (name "python-rfc3987")
12559 (version "1.3.7")
12560 (source
12561 (origin
12562 (method url-fetch)
12563 (uri (pypi-uri "rfc3987" version))
12564 (sha256
12565 (base32
12566 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
12567 (build-system python-build-system)
12568 (home-page "https://pypi.python.org/pypi/rfc3987")
12569 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
12570 (description "@code{rfc3987} provides routines for parsing and
12571 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
12572 (license license:gpl3+)))
12573
12574 (define-public python2-rfc3987
12575 (package-with-python2 python-rfc3987))
12576
12577 (define-public python-validate-email
12578 (package
12579 (name "python-validate-email")
12580 (version "1.3")
12581 (source
12582 (origin
12583 (method url-fetch)
12584 (uri (pypi-uri "validate_email" version))
12585 (sha256
12586 (base32
12587 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
12588 (build-system python-build-system)
12589 (home-page "https://github.com/syrusakbary/validate_email")
12590 (synopsis "Verifies if an email address is valid and really exists")
12591 (description "@code{validate_email} can be used to verify if an email
12592 address is valid and really exists.")
12593 (license license:lgpl3+)))
12594
12595 (define-public python2-validate-email
12596 (package-with-python2 python-validate-email))
12597
12598 (define-public python-flex
12599 (package
12600 (name "python-flex")
12601 (version "6.10.0")
12602 (source
12603 (origin
12604 (method url-fetch)
12605 (uri (pypi-uri "flex" version))
12606 (sha256
12607 (base32
12608 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
12609 (build-system python-build-system)
12610 (propagated-inputs
12611 `(("python-click" ,python-click)
12612 ("python-iso8601" ,python-iso8601)
12613 ("python-jsonpointer" ,python-jsonpointer)
12614 ("python-pyyaml" ,python-pyyaml)
12615 ("python-requests" ,python-requests)
12616 ("python-rfc3987" ,python-rfc3987)
12617 ("python-six" ,python-six)
12618 ("python-validate-email" ,python-validate-email)))
12619 (home-page "https://github.com/pipermerriam/flex")
12620 (synopsis "Validates Swagger schemata")
12621 (description "@code{flex} can be used to validate Swagger schemata.")
12622 (license license:bsd-3)))
12623
12624 (define-public python2-flex
12625 (package-with-python2 python-flex))
12626
12627 (define-public python-marshmallow
12628 (package
12629 (name "python-marshmallow")
12630 (version "3.0.0b14")
12631 (source
12632 (origin
12633 (method url-fetch)
12634 (uri (pypi-uri "marshmallow" version))
12635 (sha256
12636 (base32
12637 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
12638 (build-system python-build-system)
12639 (propagated-inputs
12640 `(("python-dateutil" ,python-dateutil)
12641 ("python-simplejson" ,python-simplejson)))
12642 (native-inputs
12643 `(("python-pytest" ,python-pytest)
12644 ("python-pytz" ,python-pytz)))
12645 (home-page "https://github.com/marshmallow-code/marshmallow")
12646 (synopsis "Convert complex datatypes to and from native
12647 Python datatypes.")
12648 (description "@code{marshmallow} provides a library for converting
12649 complex datatypes to and from native Python datatypes.")
12650 (license license:expat)))
12651
12652 (define-public python2-marshmallow
12653 (package-with-python2 python-marshmallow))
12654
12655 (define-public python-apispec
12656 (package
12657 (name "python-apispec")
12658 (version "0.25.3")
12659 (source
12660 (origin
12661 (method url-fetch)
12662 (uri (pypi-uri "apispec" version))
12663 (sha256
12664 (base32
12665 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
12666 (build-system python-build-system)
12667 (propagated-inputs
12668 `(("python-pyyaml" ,python-pyyaml)))
12669 (native-inputs
12670 `(("python-pytest" ,python-pytest)
12671 ("python-flask" ,python-flask)
12672 ("python-marshmallow" ,python-marshmallow)
12673 ("python-tornado" ,python-tornado)
12674 ("python-bottle" ,python-bottle)
12675 ("python-mock" ,python-mock)))
12676 (home-page "https://github.com/marshmallow-code/apispec")
12677 (synopsis "Swagger 2.0 API specification generator")
12678 (description "@code{python-apispec} is a pluggable API specification
12679 generator. Currently supports the OpenAPI specification (f.k.a.
12680 Swagger 2.0).")
12681 (license license:expat)))
12682
12683 (define-public python2-apispec
12684 (package-with-python2 python-apispec))
12685
12686 (define-public python-flasgger
12687 (package
12688 (name "python-flasgger")
12689 (version "0.6.3")
12690 (source
12691 (origin
12692 (method git-fetch)
12693 (uri (git-reference
12694 (url "https://github.com/rochacbruno/flasgger.git")
12695 (commit version)))
12696 (file-name (git-file-name name version))
12697 (sha256
12698 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
12699 (build-system python-build-system)
12700 (arguments
12701 `(#:phases
12702 (modify-phases %standard-phases
12703 (replace 'check
12704 (lambda* (#:key inputs outputs #:allow-other-keys)
12705 (substitute* "Makefile"
12706 (("flake8 flasgger --ignore=F403")
12707 "flake8 flasgger --ignore=E731,F403"))
12708 (setenv "PYTHONPATH" (string-append (getcwd)
12709 ":"
12710 (getenv "PYTHONPATH")))
12711 (invoke "py.test"))))))
12712 (propagated-inputs
12713 `(("python-flask" ,python-flask)
12714 ("python-pyyaml" ,python-pyyaml)
12715 ("python-jsonschema" ,python-jsonschema)
12716 ("python-mistune" ,python-mistune)
12717 ("python-six" ,python-six)))
12718 (native-inputs
12719 `(("python-decorator" ,python-decorator)
12720 ("python-flake8" ,python-flake8)
12721 ("python-flask-restful" ,python-flask-restful)
12722 ("python-flex" ,python-flex)
12723 ("python-pytest" ,python-pytest)
12724 ("python-pytest-cov" ,python-pytest-cov)
12725 ("python-marshmallow" ,python-marshmallow)
12726 ("python-apispec" ,python-apispec)))
12727 (home-page "https://github.com/rochacbruno/flasgger/")
12728 (synopsis "Extract Swagger specs from your Flask project")
12729 (description "@code{python-flasgger} allows extracting Swagger specs
12730 from your Flask project. It is a fork of Flask-Swagger.")
12731 (license license:expat)))
12732
12733 (define-public python2-flasgger
12734 (package-with-python2 python-flasgger))
12735
12736 (define-public python-swagger-spec-validator
12737 (package
12738 (name "python-swagger-spec-validator")
12739 (version "2.1.0")
12740 (source
12741 (origin
12742 (method url-fetch)
12743 (uri (pypi-uri "swagger-spec-validator" version))
12744 (sha256
12745 (base32
12746 "13hkpn2lycwr0468yqhjb3kwszqf7hjwlq61w7vdxq1caz31k4nw"))))
12747 (build-system python-build-system)
12748 (propagated-inputs
12749 `(("python-jsonschema" ,python-jsonschema)
12750 ("python-six" ,python-six)))
12751 (home-page
12752 "https://github.com/Yelp/swagger_spec_validator")
12753 (synopsis "Validation of Swagger specifications")
12754 (description "@code{swagger_spec_validator} provides a library for
12755 validating Swagger API specifications.")
12756 (license license:asl2.0)))
12757
12758 (define-public python2-swagger-spec-validator
12759 (package-with-python2 python-swagger-spec-validator))
12760
12761 (define-public python-apache-libcloud
12762 (package
12763 (name "python-apache-libcloud")
12764 (version "2.4.0")
12765 (source
12766 (origin
12767 (method url-fetch)
12768 (uri (pypi-uri "apache-libcloud" version))
12769 (sha256
12770 (base32
12771 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
12772 (build-system python-build-system)
12773 (arguments
12774 `(#:phases
12775 (modify-phases %standard-phases
12776 (add-after 'unpack 'patch-ssh
12777 (lambda* (#:key inputs #:allow-other-keys)
12778 (substitute* "libcloud/compute/ssh.py"
12779 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
12780 "/bin/ssh" "'")))
12781 #t))
12782 (add-after 'unpack 'patch-tests
12783 (lambda _
12784 (substitute* "./libcloud/test/test_file_fixtures.py"
12785 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
12786 (("def _ascii") "def _raw_data(self, method, url, body, headers):
12787 return (httplib.OK,
12788 \"1234abcd\",
12789 {\"test\": \"value\"},
12790 httplib.responses[httplib.OK])
12791 def _ascii"))
12792 (substitute* "libcloud/test/compute/test_ssh_client.py"
12793 (("class ShellOutSSHClientTests")
12794 "@unittest.skip(\"Guix container doesn't have ssh service\")
12795 class ShellOutSSHClientTests")
12796 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
12797 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
12798 (("'.xF0', '.x90', '.x8D', '.x88'")
12799 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
12800 #t))
12801 (add-before 'check 'copy-secret
12802 (lambda _
12803 (copy-file "libcloud/test/secrets.py-dist"
12804 "libcloud/test/secrets.py")
12805 #t)))))
12806 (inputs
12807 `(("openssh" ,openssh)))
12808 (propagated-inputs
12809 `(("python-paramiko" ,python-paramiko)
12810 ("python-requests" ,python-requests)))
12811 (native-inputs
12812 `(("python-lockfile" ,python-lockfile)
12813 ("python-mock" ,python-mock)
12814 ("python-pytest" ,python-pytest)
12815 ("python-pytest-runner" ,python-pytest-runner)
12816 ("python-requests-mock" ,python-requests-mock)))
12817 (home-page "https://libcloud.apache.org/")
12818 (synopsis "Unified Cloud API")
12819 (description "@code{libcloud} is a Python library for interacting with
12820 many of the popular cloud service providers using a unified API.")
12821 (license license:asl2.0)))
12822
12823 (define-public python2-apache-libcloud
12824 (package-with-python2 python-apache-libcloud))
12825
12826 (define-public python-smmap2
12827 (package
12828 (name "python-smmap2")
12829 (version "2.0.3")
12830 (source
12831 (origin
12832 (method url-fetch)
12833 (uri (pypi-uri "smmap2" version))
12834 (sha256
12835 (base32
12836 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
12837 (build-system python-build-system)
12838 (native-inputs
12839 `(("python-nosexcover" ,python-nosexcover)))
12840 (home-page "https://github.com/Byron/smmap")
12841 (synopsis "Python sliding window memory map manager")
12842 (description "@code{smmap2} is a pure Python implementation of a sliding
12843 window memory map manager.")
12844 (license license:bsd-3)))
12845
12846 (define-public python2-smmap2
12847 (package-with-python2 python-smmap2))
12848
12849 (define-public python-regex
12850 (package
12851 (name "python-regex")
12852 (version "2019.04.14")
12853 (source (origin
12854 (method url-fetch)
12855 (uri (pypi-uri "regex" version))
12856 (sha256
12857 (base32
12858 "1a6hhfs6l6snr1z654ay6wzbmwdkmv282fzfkd5hk2d1n73y8v6m"))))
12859 ;; TODO: Fix and enable regex_test.py tests that complain about the
12860 ;; test.support module not existing.
12861 (build-system python-build-system)
12862 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
12863 (synopsis "Alternative regular expression module")
12864 (description "This regular expression implementation is backwards-
12865 compatible with the standard @code{re} module, but offers additional
12866 functionality like full case-folding for case-insensitive matches in Unicode.")
12867 (license license:psfl)))
12868
12869 (define-public python2-regex
12870 (package-with-python2 python-regex))
12871
12872 (define-public python2-pyopengl
12873 (package
12874 (name "python2-pyopengl")
12875 (version "3.1.0")
12876 (source
12877 (origin
12878 (method url-fetch)
12879 (uri (pypi-uri "PyOpenGL" version))
12880 (sha256
12881 (base32
12882 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
12883 (arguments
12884 `(#:python ,python-2))
12885 (build-system python-build-system)
12886 (home-page "http://pyopengl.sourceforge.net")
12887 (synopsis "Standard OpenGL bindings for Python")
12888 (description
12889 "PyOpenGL is the most common cross platform Python binding to OpenGL and
12890 related APIs. The binding is created using the standard @code{ctypes}
12891 library.")
12892 (license license:bsd-3)))
12893
12894 (define-public python2-pyopengl-accelerate
12895 (package
12896 (inherit python2-pyopengl)
12897 (name "python2-pyopengl-accelerate")
12898 (version "3.1.0")
12899 (source
12900 (origin
12901 (method url-fetch)
12902 (uri (pypi-uri "PyOpenGL-accelerate" version))
12903 (sha256
12904 (base32
12905 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
12906 (synopsis "Acceleration code for PyOpenGL")
12907 (description
12908 "This is the Cython-coded accelerator module for PyOpenGL.")))
12909
12910 (define-public python-rencode
12911 (package
12912 (name "python-rencode")
12913 (version "1.0.5")
12914 (source
12915 (origin
12916 (method url-fetch)
12917 (uri (pypi-uri "rencode" version))
12918 (sha256
12919 (base32
12920 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
12921 (build-system python-build-system)
12922 (arguments
12923 `(#:phases
12924 (modify-phases %standard-phases
12925 (add-before 'check 'delete-bogus-test
12926 ;; This test requires /home/aresch/Downloads, which is not provided by
12927 ;; the build environment.
12928 (lambda _
12929 (delete-file "rencode/t.py")
12930 #t)))))
12931 (native-inputs `(("pkg-config" ,pkg-config)
12932 ("python-cython" ,python-cython)))
12933 (home-page "https://github.com/aresch/rencode")
12934 (synopsis "Serialization of heterogeneous data structures")
12935 (description
12936 "The @code{rencode} module is a data structure serialization library,
12937 similar to @code{bencode} from the BitTorrent project. For complex,
12938 heterogeneous data structures with many small elements, r-encoding stake up
12939 significantly less space than b-encodings. This version of rencode is a
12940 complete rewrite in Cython to attempt to increase the performance over the
12941 pure Python module.")
12942 (license license:bsd-3)))
12943
12944 (define-public python2-rencode
12945 (package-with-python2 python-rencode))
12946
12947 (define-public python-xenon
12948 (package
12949 (name "python-xenon")
12950 (version "0.5.4")
12951 (source
12952 (origin
12953 (method url-fetch)
12954 (uri (pypi-uri "xenon" version))
12955 (sha256
12956 (base32
12957 "029cbhysg2vr5n4jz8gpg2793f8wkwnqpr1qgv6c1dn685vy31mc"))))
12958 (build-system python-build-system)
12959 (native-inputs
12960 `(("python-pyyaml" ,python-pyyaml)
12961 ("python-radon" ,python-radon)
12962 ("python-requests" ,python-requests)
12963 ("python-flake8" ,python-flake8)
12964 ("python-tox" ,python-tox)))
12965 (arguments
12966 `(#:phases
12967 (modify-phases %standard-phases
12968 (add-before 'build 'patch-test-requirements
12969 (lambda _
12970 ;; Remove httpretty dependency for tests.
12971 (substitute* "setup.py"
12972 (("httpretty") ""))
12973 #t)))))
12974 (home-page "https://xenon.readthedocs.org/")
12975 (synopsis "Monitor code metrics for Python on your CI server")
12976 (description
12977 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
12978 Ideally, @code{xenon} is run every time code is committed. Through command
12979 line options, various thresholds can be set for the complexity of code. It
12980 will fail (i.e. it will exit with a non-zero exit code) when any of these
12981 requirements is not met.")
12982 (license license:expat)))
12983
12984 (define-public python2-xenon
12985 (package-with-python2 python-xenon))
12986
12987 (define-public python-pysocks
12988 (package
12989 (name "python-pysocks")
12990 (version "1.7.0")
12991 (source
12992 (origin
12993 (method url-fetch)
12994 (uri (pypi-uri "PySocks" version))
12995 (sha256
12996 (base32
12997 "0z4p31bpqm893cf87qqgb30k7nwd8kqfjwwjm5cvxb6zbyj1w0yr"))))
12998 (build-system python-build-system)
12999 (arguments `(#:tests? #f))
13000 (home-page "https://github.com/Anorov/PySocks")
13001 (synopsis "SOCKS client module")
13002 (description "@code{pysocks} is an updated and semi-actively maintained
13003 version of @code{SocksiPy} with bug fixes and extra features.")
13004 (license license:bsd-3)))
13005
13006 (define-public python2-pysocks
13007 (package-with-python2 python-pysocks))
13008
13009 (define-public python-pydiff
13010 (package
13011 (name "python-pydiff")
13012 (version "0.2")
13013 (source
13014 (origin
13015 (method url-fetch)
13016 (uri (pypi-uri "pydiff" version))
13017 (sha256
13018 (base32
13019 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
13020 (build-system python-build-system)
13021 (home-page "https://github.com/myint/pydiff")
13022 (synopsis "Library to diff two Python files at the bytecode level")
13023 (description
13024 "@code{pydiff} makes it easy to look for actual code changes while
13025 ignoring formatting changes.")
13026 (license license:expat)))
13027
13028 (define-public python2-pydiff
13029 (package-with-python2 python-pydiff))
13030
13031 (define-public python-tqdm
13032 (package
13033 (name "python-tqdm")
13034 (version "4.19.6")
13035 (source
13036 (origin
13037 (method url-fetch)
13038 (uri (pypi-uri "tqdm" version))
13039 (sha256
13040 (base32
13041 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
13042 (build-system python-build-system)
13043 (native-inputs
13044 `(("python-flake8" ,python-flake8)
13045 ("python-nose" ,python-nose)
13046 ("python-coverage" ,python-coverage)))
13047 (home-page "https://github.com/tqdm/tqdm")
13048 (synopsis "Fast, extensible progress meter")
13049 (description
13050 "Make loops show a progress bar on the console by just wrapping any
13051 iterable with @code{|tqdm(iterable)|}. Offers many options to define
13052 design and layout.")
13053 (license (list license:mpl2.0 license:expat))))
13054
13055 (define-public python2-tqdm
13056 (package-with-python2 python-tqdm))
13057
13058 (define-public python-pkginfo
13059 (package
13060 (name "python-pkginfo")
13061 (version "1.4.2")
13062 (source
13063 (origin
13064 (method url-fetch)
13065 (uri (pypi-uri "pkginfo" version))
13066 (sha256
13067 (base32
13068 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
13069 (build-system python-build-system)
13070 (arguments
13071 ;; The tests are broken upstream.
13072 '(#:tests? #f))
13073 (home-page
13074 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
13075 (synopsis
13076 "Query metadatdata from sdists, bdists, and installed packages")
13077 (description
13078 "API to query the distutils metadata written in @file{PKG-INFO} inside a
13079 source distriubtion (an sdist) or a binary distribution (e.g., created by
13080 running bdist_egg). It can also query the EGG-INFO directory of an installed
13081 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
13082 created by running @code{python setup.py develop}).")
13083 (license license:expat)))
13084
13085 (define-public python2-pkginfo
13086 (package-with-python2 python-pkginfo))
13087
13088 (define-public python-twine
13089 (package
13090 (name "python-twine")
13091 (version "1.9.1")
13092 (source
13093 (origin
13094 (method url-fetch)
13095 (uri (pypi-uri "twine" version))
13096 (sha256
13097 (base32
13098 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
13099 (build-system python-build-system)
13100 (propagated-inputs
13101 `(("python-tqdm" ,python-tqdm)
13102 ("python-pkginfo" ,python-pkginfo)
13103 ("python-requests" ,python-requests)
13104 ("python-requests-toolbelt" ,python-requests-toolbelt)))
13105 (home-page "https://github.com/pypa/twine")
13106 (synopsis "Collection of utilities for interacting with PyPI")
13107 (description
13108 "@code{twine} currently supports registering projects and uploading
13109 distributions. It authenticates the user over HTTPS, allows them to pre-sign
13110 their files and supports any packaging format (including wheels).")
13111 (license license:asl2.0)))
13112
13113 (define-public python2-twine
13114 (package-with-python2 python-twine))
13115
13116 (define-public python-linecache2
13117 (package
13118 (name "python-linecache2")
13119 (version "1.0.0")
13120 (source
13121 (origin
13122 (method url-fetch)
13123 (uri (pypi-uri "linecache2" version))
13124 (sha256
13125 (base32
13126 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
13127 (build-system python-build-system)
13128 (arguments
13129 `(;; The tests depend on unittest2, and our version is a bit too old.
13130 #:tests? #f))
13131 (native-inputs
13132 `(("python-pbr" ,python-pbr-minimal)))
13133 (home-page
13134 "https://github.com/testing-cabal/linecache2")
13135 (synopsis "Backports of the linecache module")
13136 (description
13137 "The linecache module allows one to get any line from any file, while
13138 attempting to optimize internally, using a cache, the common case where many
13139 lines are read from a single file.")
13140 (license license:psfl)))
13141
13142 (define-public python2-linecache2
13143 (package-with-python2 python-linecache2))
13144
13145 (define-public python-traceback2
13146 (package
13147 (name "python-traceback2")
13148 (version "1.4.0")
13149 (source
13150 (origin
13151 (method url-fetch)
13152 (uri (pypi-uri "traceback2" version))
13153 (sha256
13154 (base32
13155 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
13156 (build-system python-build-system)
13157 (arguments
13158 `(;; python-traceback2 and python-unittest2 depend on one another.
13159 #:tests? #f))
13160 (native-inputs
13161 `(("python-pbr" ,python-pbr-minimal)))
13162 (propagated-inputs
13163 `(("python-linecache2" ,python-linecache2)))
13164 (home-page
13165 "https://github.com/testing-cabal/traceback2")
13166 (synopsis "Backports of the traceback module")
13167 (description
13168 "This module provides a standard interface to extract, format and print
13169 stack traces of Python programs. It exactly mimics the behavior of the Python
13170 interpreter when it prints a stack trace.")
13171 (license license:psfl)))
13172
13173 (define-public python2-traceback2
13174 (package-with-python2 python-traceback2))
13175
13176 (define-public python-ratelimiter
13177 (package
13178 (name "python-ratelimiter")
13179 (version "1.2.0")
13180 (source
13181 (origin
13182 (method url-fetch)
13183 (uri (pypi-uri "ratelimiter" version))
13184 (sha256
13185 (base32
13186 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
13187 (build-system python-build-system)
13188 (arguments
13189 '(#:tests? #f)) ; There are no tests in the pypi archive.
13190 (home-page "https://github.com/RazerM/ratelimiter")
13191 (synopsis "Simple rate limiting object")
13192 (description
13193 "The @code{ratelimiter} module ensures that an operation will not be
13194 executed more than a given number of times during a given period.")
13195 (license license:asl2.0)))
13196
13197 (define-public python2-ratelimiter
13198 (package-with-python2 python-ratelimiter))
13199
13200 (define-public python-dukpy
13201 (package
13202 (name "python-dukpy")
13203 (version "0.3")
13204 (source
13205 (origin
13206 (method git-fetch)
13207 (uri (git-reference
13208 (url "https://github.com/kovidgoyal/dukpy.git")
13209 (commit (string-append "v" version))))
13210 (file-name (git-file-name name version))
13211 (sha256
13212 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
13213 (build-system python-build-system)
13214 (home-page "https://github.com/kovidgoyal/dukpy")
13215 (synopsis "Run JavaScript in python")
13216 (description
13217 "dukpy is a JavaScript runtime environment for Python using the duktape
13218 embeddable JavaScript engine.")
13219 ;; Dukpy is licensed under MIT like the embedded duktape library,
13220 ;; with 'errors.c' as GPL3.
13221 (license (list license:expat license:gpl3))))
13222
13223 (define-public python2-dukpy
13224 (package-with-python2 python-dukpy))
13225
13226 (define-public python-jsonrpclib-pelix
13227 (package
13228 (name "python-jsonrpclib-pelix")
13229 (version "0.3.2")
13230 (source
13231 (origin
13232 (method url-fetch)
13233 (uri (pypi-uri "jsonrpclib-pelix" version))
13234 (sha256
13235 (base32
13236 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
13237 (build-system python-build-system)
13238 (arguments
13239 `(#:tests? #f)) ; no tests in PyPI tarball
13240 (home-page "https://github.com/tcalmant/jsonrpclib/")
13241 (synopsis "JSON-RPC 2.0 client library for Python")
13242 (description
13243 "This library implements the JSON-RPC v2.0
13244 specification (backwards-compatible) as a client library for Python. This
13245 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
13246 services.")
13247 (license license:asl2.0)))
13248
13249 (define-public python2-jsonrpclib-pelix
13250 (package-with-python2 python-jsonrpclib-pelix))
13251
13252 (define-public python-setuptools-scm-git-archive
13253 (package
13254 (name "python-setuptools-scm-git-archive")
13255 (version "1.0")
13256 (source
13257 (origin
13258 (method url-fetch)
13259 (uri (pypi-uri "setuptools_scm_git_archive" version))
13260 (sha256
13261 (base32
13262 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
13263 (build-system python-build-system)
13264 (native-inputs
13265 `(("python-pytest" ,python-pytest)))
13266 (propagated-inputs
13267 `(("python-setuptools-scm" ,python-setuptools-scm)))
13268 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
13269 (synopsis "Setuptools_scm plugin for git archives")
13270 (description
13271 "The setuptools_scm_git_archive package is a plugin to
13272 setuptools_scm, which supports obtaining versions from git archives that
13273 belong to tagged versions.")
13274 (license license:expat)))
13275
13276 (define-public python2-setuptools-scm-git-archive
13277 (package-with-python2 python-setuptools-scm-git-archive))
13278
13279 (define-public python-pyclipper
13280 (package
13281 (name "python-pyclipper")
13282 (version "1.1.0.post1")
13283 (source
13284 (origin
13285 (method url-fetch)
13286 (uri (pypi-uri "pyclipper" version ".zip"))
13287 (sha256
13288 (base32
13289 "0ldbkbnx94an4zzrwb1sxmg6k0jgk4cwmvcdyy8y5k1zslc612wa"))
13290 (modules '((guix build utils)))
13291 (snippet
13292 '(begin
13293 ;; This file is generated by Cython.
13294 (delete-file "pyclipper/pyclipper.cpp") #t))))
13295 (build-system python-build-system)
13296 (arguments
13297 `(#:phases
13298 (modify-phases %standard-phases
13299 (add-before 'build 'cythonize-sources
13300 (lambda _
13301 (with-directory-excursion "pyclipper"
13302 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
13303 (propagated-inputs
13304 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
13305 (native-inputs
13306 `(("python-cython" ,python-cython)
13307 ("python-pytest" ,python-pytest)
13308 ("python-pytest-runner" ,python-pytest-runner)
13309 ("python-unittest2" ,python-unittest2)
13310 ("unzip" ,unzip)))
13311 (home-page "https://github.com/greginvm/pyclipper")
13312 (synopsis "Wrapper for Angus Johnson's Clipper library")
13313 (description
13314 "Pyclipper is a Cython wrapper for the C++ translation of the
13315 Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
13316 (license license:expat)))
13317
13318 (define-public python2-pyclipper
13319 (package-with-python2 python-pyclipper))
13320
13321 (define-public python2-booleanoperations
13322 (package
13323 (name "python2-booleanoperations")
13324 (version "0.7.1")
13325 (source
13326 (origin
13327 (method url-fetch)
13328 (uri (pypi-uri "booleanOperations" version ".zip"))
13329 (sha256
13330 (base32
13331 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
13332 (build-system python-build-system)
13333 (arguments
13334 `(#:python ,python-2))
13335 (native-inputs
13336 `(("unzip" ,unzip)
13337 ("python2-pytest" ,python2-pytest)
13338 ("python2-pytest-runner" ,python2-pytest-runner)))
13339 (propagated-inputs
13340 `(("python-fonttools" ,python2-fonttools)
13341 ("python-pyclipper" ,python2-pyclipper)
13342 ("python-ufolib" ,python2-ufolib)))
13343 (home-page "https://github.com/typemytype/booleanOperations")
13344 (synopsis "Boolean operations on paths")
13345 (description
13346 "BooleanOperations provides a Python library that enables
13347 boolean operations on paths.")
13348 (license license:expat)))
13349
13350 (define-public python-tempdir
13351 (package
13352 (name "python-tempdir")
13353 (version "0.7.1")
13354 (source
13355 (origin
13356 (method url-fetch)
13357 (uri (pypi-uri "tempdir" version))
13358 (sha256
13359 (base32
13360 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
13361 (build-system python-build-system)
13362 (home-page "https://pypi.org/project/tempdir/")
13363 (arguments
13364 ;; the package has no tests
13365 '(#:tests? #f))
13366 (synopsis "Python library for managing temporary directories")
13367 (description
13368 "This library manages temporary directories that are automatically
13369 deleted with all their contents when they are no longer needed. It is
13370 particularly convenient for use in tests.")
13371 (license license:expat)))
13372
13373 (define-public python2-tempdir
13374 (package-with-python2 python-tempdir))
13375
13376 (define-public python-activepapers
13377 (package
13378 (name "python-activepapers")
13379 (version "0.2.2")
13380 (source
13381 (origin
13382 (method url-fetch)
13383 (uri (pypi-uri "ActivePapers.Py" version))
13384 (sha256
13385 (base32
13386 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
13387 (build-system python-build-system)
13388 (arguments
13389 `(#:modules ((ice-9 ftw)
13390 (srfi srfi-1)
13391 (guix build utils)
13392 (guix build python-build-system))
13393
13394 #:phases
13395 (modify-phases %standard-phases
13396 (add-after 'unpack 'delete-python2-code
13397 (lambda _
13398 (for-each delete-file
13399 '("lib/activepapers/builtins2.py"
13400 "lib/activepapers/standardlib2.py"
13401 "lib/activepapers/utility2.py"))))
13402 (replace 'check
13403 (lambda _
13404 ;; Deactivate the test cases that download files
13405 (setenv "NO_NETWORK_ACCESS" "1")
13406 ;; For some strange reason, some tests fail if nosetests runs all
13407 ;; test modules in a single execution. They pass if each test
13408 ;; module is run individually.
13409 (for-each (lambda (filename)
13410 (invoke "nosetests"
13411 (string-append "tests/" filename)))
13412 (scandir "tests"
13413 (lambda (filename)
13414 (string-suffix? ".py" filename)))))))))
13415 (native-inputs
13416 `(("python-tempdir" ,python-tempdir)
13417 ("python-nose" ,python-nose)))
13418 (propagated-inputs
13419 `(("python-h5py" ,python-h5py)))
13420 (home-page "http://www.activepapers.org/")
13421 (synopsis "Executable papers for scientific computing")
13422 (description
13423 "ActivePapers is a tool for working with executable papers, which
13424 combine data, code, and documentation in single-file packages,
13425 suitable for publication as supplementary material or on repositories
13426 such as figshare or Zenodo.")
13427 (properties `((python2-variant . ,(delay python2-activepapers))))
13428 (license license:bsd-3)))
13429
13430 (define-public python2-activepapers
13431 (let ((base (package-with-python2
13432 (strip-python2-variant python-activepapers))))
13433 (package
13434 (inherit base)
13435 (arguments
13436 (substitute-keyword-arguments (package-arguments base)
13437 ((#:phases phases)
13438 `(modify-phases ,phases
13439 (delete 'delete-python2-code)
13440 (add-after 'unpack 'delete-python3-code
13441 (lambda _
13442 (for-each delete-file
13443 '("lib/activepapers/builtins3.py"
13444 "lib/activepapers/standardlib3.py"
13445 "lib/activepapers/utility3.py")))))))))))
13446
13447 (define-public python-semver
13448 (package
13449 (name "python-semver")
13450 (version "2.7.9")
13451 (source
13452 (origin
13453 (method url-fetch)
13454 (uri (pypi-uri "semver" version))
13455 (sha256
13456 (base32
13457 "0hhgqppchv59rqj0yzi1prdg2nfsywqmjsqy2rycyxm0hvxmbyqz"))))
13458 (build-system python-build-system)
13459 (arguments
13460 `(#:phases
13461 (modify-phases %standard-phases
13462 (add-after 'unpack 'patch-test-requirements
13463 (lambda _
13464 (substitute* "setup.py"
13465 ;; Our Python is new enough.
13466 (("'virtualenv<14\\.0\\.0'") "'virtualenv'"))
13467 #t)))))
13468 (native-inputs
13469 `(("python-tox" ,python-tox)
13470 ("python-virtualenv" ,python-virtualenv)))
13471 (home-page "https://github.com/k-bx/python-semver")
13472 (synopsis "Python helper for Semantic Versioning")
13473 (description "This package provides a Python library for
13474 @url{Semantic Versioning, http://semver.org/}.")
13475 (license license:bsd-3)))
13476
13477 (define-public python2-semver
13478 (package-with-python2 python-semver))
13479
13480 (define-public python-pyro4
13481 (package
13482 (name "python-pyro4")
13483 (version "4.75")
13484 (source
13485 (origin
13486 (method url-fetch)
13487 (uri (pypi-uri "Pyro4" version))
13488 (sha256
13489 (base32 "1dfpp36imddx19yv0kd28gk1l71ckhpqy6jd590wpm2680jw15rq"))))
13490 (build-system python-build-system)
13491 (propagated-inputs
13492 `(("python-serpent" ,python-serpent)))
13493 (home-page "https://pyro4.readthedocs.io")
13494 (synopsis "Distributed object middleware for Python")
13495 (description
13496 "Pyro enables you to build applications in which objects can talk to each
13497 other over the network. You can just use normal Python method calls to call
13498 objects on other machines, also known as remote procedure calls (RPC).")
13499 (license license:expat)))
13500
13501 (define-public python2-pyro
13502 (package
13503 (name "python2-pyro")
13504 (version "3.16")
13505 (source
13506 (origin
13507 (method url-fetch)
13508 (uri (pypi-uri "Pyro" version))
13509 (file-name (string-append "Pyro-" version ".tar.gz"))
13510 (sha256
13511 (base32
13512 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
13513 (build-system python-build-system)
13514 (arguments
13515 ;; Pyro is not compatible with Python 3
13516 `(#:python ,python-2
13517 ;; Pyro has no test cases for automatic execution
13518 #:tests? #f))
13519 (home-page "http://pythonhosted.org/Pyro/")
13520 (synopsis "Distributed object manager for Python")
13521 (description "Pyro is a Distributed Object Technology system
13522 written in Python that is designed to be easy to use. It resembles
13523 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
13524 which is a system and language independent Distributed Object Technology
13525 and has much more to offer than Pyro or RMI. Pyro 3.x is no
13526 longer maintained. New projects should use Pyro4 instead, which
13527 is the new Pyro version that is actively developed.")
13528 (license license:expat)))
13529
13530 (define-public python2-scientific
13531 (package
13532 (name "python2-scientific")
13533 (version "2.9.4")
13534 (source
13535 (origin
13536 (method url-fetch)
13537 (uri (string-append "https://bitbucket.org/khinsen/"
13538 "scientificpython/downloads/ScientificPython-"
13539 version ".tar.gz"))
13540 (file-name (string-append "ScientificPython-" version ".tar.gz"))
13541 (sha256
13542 (base32
13543 "0fc69zhlsn9d2jvbzyjl9ah53vj598h84nkq230c83ahfvgzx5y3"))))
13544 (build-system python-build-system)
13545 (inputs
13546 `(("netcdf" ,netcdf)))
13547 (propagated-inputs
13548 `(("python-numpy" ,python2-numpy-1.8)
13549 ("python-pyro" ,python2-pyro)))
13550 (arguments
13551 ;; ScientificPython is not compatible with Python 3
13552 `(#:python ,python-2
13553 #:tests? #f ; No test suite
13554 #:phases
13555 (modify-phases %standard-phases
13556 (replace 'build
13557 (lambda* (#:key inputs #:allow-other-keys)
13558 (invoke "python" "setup.py" "build"
13559 (string-append "--netcdf_prefix="
13560 (assoc-ref inputs "netcdf"))))))))
13561 (home-page "https://bitbucket.org/khinsen/scientificpython")
13562 (synopsis "Python modules for scientific computing")
13563 (description "ScientificPython is a collection of Python modules that are
13564 useful for scientific computing. Most modules are rather general (Geometry,
13565 physical units, automatic derivatives, ...) whereas others are more
13566 domain-specific (e.g. netCDF and PDB support). The library is currently
13567 not actively maintained and works only with Python 2 and NumPy < 1.9.")
13568 (license license:cecill-c)))
13569
13570 (define-public python2-mmtk
13571 (package
13572 (name "python2-mmtk")
13573 (version "2.7.11")
13574 (source
13575 (origin
13576 (method url-fetch)
13577 (uri (string-append "https://bitbucket.org/khinsen/"
13578 "mmtk/downloads/MMTK-" version ".tar.gz"))
13579 (file-name (string-append "MMTK-" version ".tar.gz"))
13580 (sha256
13581 (base32
13582 "1d0nnjx4lwsvh8f99vv1r6gi50d93yba0adkz8b4zgv4za4c5862"))))
13583 (build-system python-build-system)
13584 (native-inputs
13585 `(("netcdf" ,netcdf)))
13586 (propagated-inputs
13587 `(("python-scientific" ,python2-scientific)
13588 ("python-tkinter" ,python-2 "tk")))
13589 (arguments
13590 `(#:python ,python-2
13591 #:tests? #f
13592 #:phases
13593 (modify-phases %standard-phases
13594 (add-before 'build 'includes-from-scientific
13595 (lambda* (#:key inputs #:allow-other-keys)
13596 (mkdir-p "Include/Scientific")
13597 (copy-recursively
13598 (string-append
13599 (assoc-ref inputs "python-scientific")
13600 "/include/python2.7/Scientific")
13601 "Include/Scientific"))))))
13602 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
13603 (synopsis "Python library for molecular simulation")
13604 (description "MMTK is a library for molecular simulations with an emphasis
13605 on biomolecules. It provides widely used methods such as Molecular Dynamics
13606 and normal mode analysis, but also basic routines for implementing new methods
13607 for simulation and analysis. The library is currently not actively maintained
13608 and works only with Python 2 and NumPy < 1.9.")
13609 (license license:cecill-c)))
13610
13611 (define-public python-phonenumbers
13612 (package
13613 (name "python-phonenumbers")
13614 (version "8.9.1")
13615 (source
13616 (origin
13617 (method url-fetch)
13618 (uri (pypi-uri "phonenumbers" version))
13619 (sha256
13620 (base32
13621 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
13622 (build-system python-build-system)
13623 (home-page
13624 "https://github.com/daviddrysdale/python-phonenumbers")
13625 (synopsis
13626 "Python library for dealing with international phone numbers")
13627 (description
13628 "This package provides a Python port of Google's libphonenumber library.")
13629 (license license:asl2.0)))
13630
13631 (define-public python2-phonenumbers
13632 (package-with-python2 python-phonenumbers))
13633
13634 (define-public python-send2trash
13635 (package
13636 (name "python-send2trash")
13637 (version "1.5.0")
13638 (source
13639 (origin (method git-fetch)
13640 ;; Source tarball on PyPI doesn't include tests.
13641 (uri (git-reference
13642 (url "https://github.com/hsoft/send2trash.git")
13643 (commit version)))
13644 (file-name (git-file-name name version))
13645 (sha256
13646 (base32
13647 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
13648 (build-system python-build-system)
13649 (arguments
13650 '(#:phases
13651 (modify-phases %standard-phases
13652 (add-before 'check 'pre-check
13653 (lambda _
13654 (mkdir-p "/tmp/foo")
13655 (setenv "HOME" "/tmp/foo")
13656 #t)))))
13657 (home-page "https://github.com/hsoft/send2trash")
13658 (synopsis "Send files to the user's @file{~/Trash} directory")
13659 (description "This package provides a Python library to send files to the
13660 user's @file{~/Trash} directory.")
13661 (properties `((python2-variant . ,(delay python2-send2trash))))
13662 (license license:bsd-3)))
13663
13664 (define-public python2-send2trash
13665 (package
13666 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
13667 (arguments
13668 (substitute-keyword-arguments (package-arguments python-send2trash)
13669 ((#:phases phases)
13670 `(modify-phases ,phases
13671 (add-before 'check 'setenv
13672 (lambda _
13673 (setenv "PYTHONPATH"
13674 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
13675 #t))))))))
13676
13677 (define-public python-yapf
13678 (package
13679 (name "python-yapf")
13680 (version "0.24.0")
13681 (source
13682 (origin
13683 (method url-fetch)
13684 (uri (pypi-uri "yapf" version))
13685 (sha256
13686 (base32
13687 "0anwby0ydmyzcsgjc5dn1ryddwvii4dq61vck447q0n96npnzfyf"))))
13688 (build-system python-build-system)
13689 (home-page "https://github.com/google/yapf")
13690 (synopsis "Formatter for Python code")
13691 (description "YAPF is a formatter for Python code. It's based off of
13692 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
13693 takes the code and reformats it to the best formatting that conforms to the
13694 style guide, even if the original code didn't violate the style guide.")
13695 (license license:asl2.0)))
13696
13697 (define-public python2-yapf
13698 (package-with-python2 python-yapf))
13699
13700 (define-public python-gyp
13701 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
13702 (revision "0"))
13703 (package
13704 (name "python-gyp")
13705 ;; Google does not release versions,
13706 ;; based on second most recent commit date.
13707 (version (git-version "0.0.0" revision commit))
13708 (source
13709 (origin
13710 ;; Google does not release tarballs,
13711 ;; git checkout is needed.
13712 (method git-fetch)
13713 (uri (git-reference
13714 (url "https://chromium.googlesource.com/external/gyp")
13715 (commit commit)))
13716 (file-name (git-file-name name version))
13717 (sha256
13718 (base32
13719 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
13720 (build-system python-build-system)
13721 (home-page "https://gyp.gsrc.io/")
13722 (synopsis "GYP is a Meta-Build system")
13723 (description
13724 "GYP builds build systems for large, cross platform applications.
13725 It can be used to generate XCode projects, Visual Studio projects, Ninja build
13726 files, and Makefiles.")
13727 (license license:bsd-3))))
13728
13729 (define-public python2-gyp
13730 (package-with-python2 python-gyp))
13731
13732 (define-public python-whatever
13733 (package
13734 (name "python-whatever")
13735 (version "0.5")
13736 (source
13737 (origin
13738 (method url-fetch)
13739 (uri (string-append "https://github.com/Suor/whatever/archive/" version
13740 ".tar.gz"))
13741 (sha256
13742 (base32
13743 "1iqvnaf0zpc6b4rvbqq4xy45mszcscyzpzknv8wg6j84pbp22sap"))
13744 (file-name (string-append name "-" version ".tar.gz"))))
13745 (build-system python-build-system)
13746 (arguments
13747 `(#:phases
13748 (modify-phases %standard-phases
13749 (replace 'check
13750 (lambda _
13751 (invoke "py.test"))))))
13752 (native-inputs
13753 `(("python-pytest" ,python-pytest)))
13754 (home-page "http://github.com/Suor/whatever")
13755 (synopsis "Make anonymous functions by partial application of operators")
13756 (description "@code{whatever} provides an easy way to make anonymous
13757 functions by partial application of operators.")
13758 (license license:bsd-3)))
13759
13760 (define-public python2-whatever
13761 (package-with-python2 python-whatever))
13762
13763 (define-public python-funcy
13764 (package
13765 (name "python-funcy")
13766 (version "1.11")
13767 (source
13768 (origin
13769 (method git-fetch)
13770 (uri (git-reference
13771 (url "https://github.com/Suor/funcy.git")
13772 (commit version)))
13773 (sha256
13774 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
13775 (file-name (git-file-name name version))))
13776 (build-system python-build-system)
13777 (arguments
13778 `(#:phases
13779 (modify-phases %standard-phases
13780 (replace 'check
13781 (lambda _
13782 (invoke "py.test"))))))
13783 (native-inputs
13784 `(("python-pytest" ,python-pytest)
13785 ("python-whatever" ,python-whatever)))
13786 (home-page "http://github.com/Suor/funcy")
13787 (synopsis "Functional tools")
13788 (description "@code{funcy} is a library that provides functional tools.
13789 Examples are:
13790 @enumerate
13791 @item merge - Merges collections of the same type
13792 @item walk - Type-preserving map
13793 @item select - Selects a part of a collection
13794 @item take - Takes the first n items of a collection
13795 @item first - Takes the first item of a collection
13796 @item remove - Predicated-removes items of a collection
13797 @item concat - Concatenates two collections
13798 @item flatten - Flattens a collection with subcollections
13799 @item distinct - Returns only distinct items
13800 @item split - Predicated-splits a collection
13801 @item split_at - Splits a collection at a given item
13802 @item group_by - Groups items by group
13803 @item pairwise - Pairs off adjacent items
13804 @item partial - Partially-applies a function
13805 @item curry - Curries a function
13806 @item compose - Composes functions
13807 @item complement - Complements a predicate
13808 @item all_fn - \"all\" with predicate
13809 @end enumerate")
13810 (license license:bsd-3)))
13811
13812 (define-public python2-funcy
13813 (package-with-python2 python-funcy))
13814
13815 (define-public python-isoweek
13816 (package
13817 (name "python-isoweek")
13818 (version "1.3.3")
13819 (source
13820 (origin
13821 (method url-fetch)
13822 (uri (pypi-uri "isoweek" version))
13823 (sha256
13824 (base32
13825 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
13826 (build-system python-build-system)
13827 (home-page "https://github.com/gisle/isoweek")
13828 (synopsis "Objects representing a week")
13829 (description "The @code{isoweek} module provide the class Week that
13830 implements the week definition of ISO 8601. This standard also defines
13831 a notation for identifying weeks; yyyyWww (where the W is a literal).
13832 Week instances stringify to this form.")
13833 (license license:bsd-3)))
13834
13835 (define-public python2-isoweek
13836 (package-with-python2 python-isoweek))
13837
13838 (define-public python-tokenize-rt
13839 (package
13840 (name "python-tokenize-rt")
13841 (version "2.0.1")
13842 (source
13843 (origin
13844 (method url-fetch)
13845 (uri (pypi-uri "tokenize-rt" version))
13846 (sha256
13847 (base32
13848 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
13849 (build-system python-build-system)
13850 (home-page "https://github.com/asottile/tokenize-rt")
13851 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
13852 (description
13853 "This Python library is a wrapper around @code{tokenize} from the Python
13854 standard library. It provides two additional tokens @code{ESCAPED_NL} and
13855 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
13856 and @code{tokens_to_src} to roundtrip.")
13857 (license license:expat)))
13858
13859 (define-public python-future-fstrings
13860 (package
13861 (name "python-future-fstrings")
13862 (version "0.4.1")
13863 (source
13864 (origin
13865 (method url-fetch)
13866 (uri (pypi-uri "future_fstrings" version))
13867 (sha256
13868 (base32
13869 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
13870 (build-system python-build-system)
13871 (propagated-inputs
13872 `(("python-tokenize-rt" ,python-tokenize-rt)))
13873 (home-page "https://github.com/asottile/future-fstrings")
13874 (synopsis "Backport of fstrings to Python < 3.6")
13875 (description
13876 "This package provides a UTF-8 compatible encoding
13877 @code{future_fstrings}, which performs source manipulation. It decodes the
13878 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
13879 @code{f} strings.")
13880 (license license:expat)))
13881
13882 (define-public python-typing
13883 (package
13884 (name "python-typing")
13885 (version "3.6.6")
13886 (source
13887 (origin
13888 (method url-fetch)
13889 (uri (pypi-uri "typing" version))
13890 (sha256
13891 (base32
13892 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
13893 (build-system python-build-system)
13894 (home-page "https://docs.python.org/3/library/typing.html")
13895 (synopsis "Type hints for Python")
13896 (description "This is a backport of the standard library @code{typing}
13897 module to Python versions older than 3.5. Typing defines a standard notation
13898 for Python function and variable type annotations. The notation can be used
13899 for documenting code in a concise, standard format, and it has been designed
13900 to also be used by static and runtime type checkers, static analyzers, IDEs
13901 and other tools.")
13902 (license license:psfl)))
13903
13904 (define-public python2-typing
13905 (package-with-python2 python-typing))
13906
13907 (define-public python-typing-extensions
13908 (package
13909 (name "python-typing-extensions")
13910 (version "3.7.2")
13911 (source
13912 (origin
13913 (method url-fetch)
13914 (uri (pypi-uri "typing_extensions" version))
13915 (sha256
13916 (base32
13917 "0wfsv71pvkyf2na938l579jh0v3kzl6g744ijgnahcwd4d9x0b7v"))))
13918 (build-system python-build-system)
13919 (home-page
13920 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
13921 (synopsis "Experimental type hints for Python")
13922 (description
13923 "The typing_extensions module contains additional @code{typing} hints not
13924 yet present in the of the @code{typing} standard library.
13925 Included are implementations of:
13926 @enumerate
13927 @item ClassVar
13928 @item ContextManager
13929 @item Counter
13930 @item DefaultDict
13931 @item Deque
13932 @item NewType
13933 @item NoReturn
13934 @item overload
13935 @item Protocol
13936 @item runtime
13937 @item Text
13938 @item Type
13939 @item TYPE_CHECKING
13940 @item AsyncGenerator
13941 @end enumerate\n")
13942 (license license:psfl)))
13943
13944 (define-public bpython
13945 (package
13946 (name "bpython")
13947 (version "0.17.1")
13948 (source
13949 (origin
13950 (method url-fetch)
13951 (uri (pypi-uri "bpython" version))
13952 (sha256
13953 (base32
13954 "0bxhxi5zxdkrf8b4gwn0d363kdz3qnypjwhm1aydki53ph8ca1w9"))))
13955 (build-system python-build-system)
13956 (arguments
13957 `(#:phases
13958 (modify-phases %standard-phases
13959 (add-after 'unpack 'remove-failing-test
13960 (lambda _
13961 ;; Remove failing test. FIXME: make it pass
13962 (delete-file "bpython/test/test_args.py")
13963 #t))
13964 (add-after 'wrap 'add-aliases
13965 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
13966 (lambda* (#:key outputs #:allow-other-keys)
13967 (let ((out (assoc-ref outputs "out")))
13968 (for-each
13969 (lambda (old new)
13970 (symlink old (string-append out "/bin/" new)))
13971 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
13972 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
13973 #t)))))
13974 (propagated-inputs
13975 `(("python-pygments" ,python-pygments)
13976 ("python-requests" ,python-requests)
13977 ("python-babel" ,python-babel) ; optional, for internationalization
13978 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
13979 ("python-greenlet" ,python-greenlet)
13980 ("python-urwid" ,python-urwid) ; for bpython-urwid only
13981 ("python-six" ,python-six)))
13982 (native-inputs
13983 `(("python-sphinx" ,python-sphinx)
13984 ("python-mock" ,python-mock)))
13985 (home-page "https://bpython-interpreter.org/")
13986 (synopsis "Fancy interface to the Python interpreter")
13987 (description "Bpython is a fancy interface to the Python
13988 interpreter. bpython's main features are
13989
13990 @enumerate
13991 @item in-line syntax highlighting,
13992 @item readline-like autocomplete with suggestions displayed as you type,
13993 @item expected parameter list for any Python function,
13994 @item \"rewind\" function to pop the last line of code from memory and
13995 re-evaluate,
13996 @item send the code you've entered off to a pastebin,
13997 @item save the code you've entered to a file, and
13998 @item auto-indentation.
13999 @end enumerate")
14000 (license license:expat)))
14001
14002 (define-public bpython2
14003 (let ((base (package-with-python2
14004 (strip-python2-variant bpython))))
14005 (package (inherit base)
14006 (name "bpython2")
14007 (arguments
14008 `(#:python ,python-2
14009 #:phases
14010 (modify-phases %standard-phases
14011 (add-after 'unpack 'remove-failing-test
14012 (lambda _
14013 ;; Remove failing test. FIXME: make it pass
14014 (delete-file "bpython/test/test_args.py")
14015 ;; Disable failing test-cases (renaming inhibits they are
14016 ;; discovered)
14017 (substitute* "bpython/test/test_curtsies_repl.py"
14018 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
14019 (string-append a "xxx_off_" b))
14020 (("^(\\s*def )(test_complex\\W)" _ a b)
14021 (string-append a "xxx_off_" b)))
14022 #t))
14023 (add-before 'build 'rename-scripts
14024 ;; rename the scripts to bypthon2, bpdb2, etc.
14025 (lambda _
14026 (substitute* "setup.py"
14027 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
14028 (string-append name "2" rest "\n"))
14029 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
14030 (string-append name "2" (or sub "") rest "\n")))
14031 #t))))))))
14032
14033 (define-public python-pyinotify
14034 (package
14035 (name "python-pyinotify")
14036 (version "0.9.6")
14037 (source (origin
14038 (method url-fetch)
14039 (uri (pypi-uri "pyinotify" version))
14040 (sha256
14041 (base32
14042 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
14043 (build-system python-build-system)
14044 (arguments `(#:tests? #f)) ;no tests
14045 (home-page "https://github.com/seb-m/pyinotify")
14046 (synopsis "Python library for monitoring inotify events")
14047 (description
14048 "@code{pyinotify} provides a Python interface for monitoring
14049 file system events on Linux.")
14050 (license license:expat)))
14051
14052 (define-public python2-pyinotify
14053 (package-with-python2 python-pyinotify))
14054
14055 ;; Ada parser uses this version.
14056 (define-public python2-quex-0.67.3
14057 (package
14058 (name "python2-quex")
14059 (version "0.67.3")
14060 (source
14061 (origin
14062 (method url-fetch)
14063 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
14064 (version-major+minor version)
14065 "/quex-" version ".zip"))
14066 (sha256
14067 (base32
14068 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
14069 (build-system python-build-system)
14070 (native-inputs
14071 `(("unzip" ,unzip)))
14072 (arguments
14073 `(#:python ,python-2
14074 #:tests? #f
14075 #:phases
14076 (modify-phases %standard-phases
14077 (delete 'configure)
14078 (delete 'build)
14079 (replace 'install
14080 (lambda* (#:key outputs #:allow-other-keys)
14081 (let* ((out (assoc-ref outputs "out"))
14082 (share/quex (string-append out "/share/quex"))
14083 (bin (string-append out "/bin")))
14084 (copy-recursively "." share/quex)
14085 (mkdir-p bin)
14086 (symlink (string-append share/quex "/quex-exe.py")
14087 (string-append bin "/quex"))
14088 #t))))))
14089 (native-search-paths
14090 (list (search-path-specification
14091 (variable "QUEX_PATH")
14092 (files '("share/quex")))))
14093 (home-page "http://quex.sourceforge.net/")
14094 (synopsis "Lexical analyzer generator in Python")
14095 (description "@code{quex} is a lexical analyzer generator in Python.")
14096 (license license:lgpl2.1+))) ; Non-military
14097
14098 (define-public python2-quex
14099 (package (inherit python2-quex-0.67.3)
14100 (name "python2-quex")
14101 (version "0.68.1")
14102 (source
14103 (origin
14104 (method url-fetch)
14105 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
14106 (sha256
14107 (base32
14108 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
14109 (file-name (string-append name "-" version ".tar.gz"))))))
14110
14111 (define-public python-more-itertools
14112 (package
14113 (name "python-more-itertools")
14114 (version "4.3.0")
14115 (source
14116 (origin
14117 (method url-fetch)
14118 (uri (pypi-uri "more-itertools" version))
14119 (sha256
14120 (base32
14121 "17h3na0rdh8xq30w4b9pizgkdxmm51896bxw600x84jflg9vaxn4"))))
14122 (build-system python-build-system)
14123 (arguments
14124 `(,@(if (any (cute string-prefix? <> (or (%current-system)
14125 (%current-target-system)))
14126 '("armhf" "i686"))
14127 '(#:phases
14128 (modify-phases %standard-phases
14129 ;; This is required for 32-bit hardware.
14130 ;; TODO: Try to remove this when upgrading.
14131 (add-after 'unpack 'patch-test
14132 (lambda _
14133 (substitute* "more_itertools/tests/test_more.py"
14134 (("10 \\*\\* 10") "9 ** 9"))
14135 #t))))
14136 '())))
14137 (propagated-inputs
14138 `(("python-six" ,python-six-bootstrap)))
14139 (home-page "https://github.com/erikrose/more-itertools")
14140 (synopsis "More routines for operating on iterables, beyond itertools")
14141 (description "Python's built-in @code{itertools} module implements a
14142 number of iterator building blocks inspired by constructs from APL, Haskell,
14143 and SML. @code{more-itertools} includes additional building blocks for
14144 working with iterables.")
14145 (license license:expat)))
14146
14147 (define-public python2-more-itertools
14148 (package-with-python2 python-more-itertools))
14149
14150 (define-public python-latexcodec
14151 (package
14152 (name "python-latexcodec")
14153 (version "1.0.6")
14154 (source
14155 (origin
14156 (method url-fetch)
14157 (uri (pypi-uri "latexcodec" version))
14158 (sha256
14159 (base32 "0s4wdbg0w2l8pj3i0y4510i0s04p8nhxcsa2z41bjsv0k66npb81"))))
14160 (build-system python-build-system)
14161 (inputs
14162 `(("python-six" ,python-six)))
14163 (home-page "https://readthedocs.org/projects/latexcodec/")
14164 (synopsis "Work with LaTeX code in Python")
14165 (description "Lexer and codec to work with LaTeX code in Python.")
14166 (license license:expat)))
14167
14168 (define-public python-pybtex
14169 (package
14170 (name "python-pybtex")
14171 (version "0.21")
14172 (source
14173 (origin
14174 (method url-fetch)
14175 (uri (pypi-uri "pybtex" version))
14176 (sha256
14177 (base32
14178 "00300j8dn5pxq4ndxmfmbmycg2znawkqs49val2x6jlmfiy6r2mg"))))
14179 (build-system python-build-system)
14180 (native-inputs
14181 `(("python-nose" ,python-nose)))
14182 (inputs
14183 `(("python-latexcodec" ,python-latexcodec)
14184 ("python-pyyaml" ,python-pyyaml)
14185 ("python-six" ,python-six)))
14186 (arguments
14187 `(#:test-target "nosetests"))
14188 (home-page "https://pybtex.org/")
14189 (synopsis "BibTeX-compatible bibliography processor")
14190 (description "Pybtex is a BibTeX-compatible bibliography processor written
14191 in Python. You can simply type pybtex instead of bibtex.")
14192 (license license:expat)))
14193
14194 (define-public python-onetimepass
14195 (package
14196 (name "python-onetimepass")
14197 (version "1.0.1")
14198 (source
14199 (origin
14200 (method url-fetch)
14201 (uri (pypi-uri "onetimepass" version))
14202 (sha256
14203 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
14204 (build-system python-build-system)
14205 (propagated-inputs `(("python-six" ,python-six)))
14206 (home-page "https://github.com/tadeck/onetimepass/")
14207 (synopsis "One-time password library")
14208 (description "Python one-time password library for HMAC-based (HOTP) and
14209 time-based (TOTP) passwords.")
14210 (license license:expat)))
14211
14212 (define-public python-parso
14213 (package
14214 (name "python-parso")
14215 (version "0.3.1")
14216 (source
14217 (origin
14218 (method url-fetch)
14219 (uri (pypi-uri "parso" version))
14220 (sha256
14221 (base32
14222 "18p89iwcm8mnf380f92g9w0bhx5km8wxp392vvjcq4y1ld1llw1m"))))
14223 (native-inputs
14224 `(("python-pytest" ,python-pytest)))
14225 (build-system python-build-system)
14226 (home-page "https://github.com/davidhalter/parso")
14227 (synopsis "Python Parser")
14228 (description "Parso is a Python parser that supports error recovery and
14229 round-trip parsing for different Python versions (in multiple Python versions).
14230 Parso is also able to list multiple syntax errors in your Python file.")
14231 (license license:expat)))
14232
14233 (define-public python2-parso
14234 (package-with-python2 python-parso))
14235
14236 (define-public python-async-generator
14237 (package
14238 (name "python-async-generator")
14239 (version "1.10")
14240 (source
14241 (origin
14242 (method url-fetch)
14243 (uri (pypi-uri "async_generator" version))
14244 (sha256
14245 (base32
14246 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
14247 (build-system python-build-system)
14248 (native-inputs
14249 `(("python-pytest" ,python-pytest)))
14250 (home-page "https://github.com/python-trio/async_generator")
14251 (synopsis "Async generators and context managers for Python 3.5+")
14252 (description "@code{async_generator} back-ports Python 3.6's native async
14253 generators and Python 3.7's context managers into Python 3.5.")
14254 ;; Dual licensed.
14255 (license (list license:expat license:asl2.0))))
14256
14257 (define-public python-async-timeout
14258 (package
14259 (name "python-async-timeout")
14260 (version "3.0.1")
14261 (source
14262 (origin
14263 (method url-fetch)
14264 (uri (pypi-uri "async-timeout" version))
14265 (sha256
14266 (base32
14267 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
14268 (build-system python-build-system)
14269 (home-page "https://github.com/aio-libs/async_timeout/")
14270 (synopsis "Timeout context manager for asyncio programs")
14271 (description "@code{async-timeout} provides a timeout timeout context
14272 manager compatible with @code{asyncio}.")
14273 (license license:asl2.0)))
14274
14275 (define-public python-glob2
14276 (package
14277 (name "python-glob2")
14278 (version "0.6")
14279 (source
14280 (origin
14281 (method git-fetch)
14282 (uri (git-reference
14283 (url "https://github.com/miracle2k/python-glob2.git")
14284 (commit version)))
14285 (file-name (git-file-name name version))
14286 (sha256
14287 (base32 "1lm1xz3k3l0k1c5bcp9hlzmi3gp5j8dl1k3xhpiq5mnm0xq6n163"))))
14288 (build-system python-build-system)
14289 (home-page "https://github.com/miracle2k/python-glob2/")
14290 (synopsis "Extended Version of the python buildin glob module")
14291 (description "This is an extended version of the Python
14292 @url{http://docs.python.org/library/glob.html, built-in glob module} which
14293 adds:
14294
14295 @itemize
14296 @item The ability to capture the text matched by glob patterns, and return
14297 those matches alongside the file names.
14298 @item A recursive @code{**} globbing syntax, akin for example to the
14299 @code{globstar} option of Bash.
14300 @item The ability to replace the file system functions used, in order to glob
14301 on virtual file systems.
14302 @item Compatible with Python 2 and Python 3 (tested with 3.3).
14303 @end itemize
14304
14305 Glob2 currently based on the glob code from Python 3.3.1.")
14306 (license license:bsd-2)))
14307
14308 (define-public python2-glob2
14309 (package-with-python2 python-glob2))
14310
14311 (define-public python-gipc
14312 (package
14313 (name "python-gipc")
14314 (version "0.6.0")
14315 (source
14316 (origin
14317 (method url-fetch)
14318 (uri (pypi-uri "gipc" version ".zip"))
14319 (sha256
14320 (base32
14321 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
14322 (build-system python-build-system)
14323 (native-inputs
14324 `(("unzip" ,unzip)))
14325 (propagated-inputs
14326 `(("python-gevent" ,python-gevent)))
14327 (home-page "http://gehrcke.de/gipc")
14328 (synopsis "Child process management in the context of gevent")
14329 (description "Usage of Python's multiprocessing package in a
14330 gevent-powered application may raise problems. With @code{gipc},
14331 process-based child processes can safely be created anywhere within a
14332 gevent-powered application.")
14333 (license license:expat)))
14334
14335 (define-public python2-gipc
14336 (package-with-python2 python-gipc))
14337
14338 (define-public python-fusepy
14339 (package
14340 (name "python-fusepy")
14341 (version "2.0.4")
14342 (source
14343 (origin
14344 (method url-fetch)
14345 (uri (pypi-uri "fusepy" version))
14346 (sha256
14347 (base32
14348 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
14349 (build-system python-build-system)
14350 (arguments
14351 `(#:phases
14352 (modify-phases %standard-phases
14353 (add-before 'build 'set-library-file-name
14354 (lambda* (#:key inputs #:allow-other-keys)
14355 (let ((fuse (assoc-ref inputs "fuse")))
14356 (substitute* "fuse.py"
14357 (("find_library\\('fuse'\\)")
14358 (string-append "'" fuse "/lib/libfuse.so'")))
14359 #t))))))
14360 (propagated-inputs
14361 `(("fuse" ,fuse)))
14362 (home-page "https://github.com/fusepy/fusepy")
14363 (synopsis "Simple ctypes bindings for FUSE")
14364 (description "Python module that provides a simple interface to FUSE and
14365 MacFUSE. The binding is created using the standard @code{ctypes} library.")
14366 (license license:isc)))
14367
14368 (define-public python2-fusepy
14369 (package-with-python2 python-fusepy))
14370
14371 (define-public python2-gdrivefs
14372 (package
14373 (name "python2-gdrivefs")
14374 (version "0.14.9")
14375 (source
14376 (origin
14377 (method url-fetch)
14378 (uri (pypi-uri "gdrivefs" version))
14379 (sha256
14380 (base32
14381 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
14382 (build-system python-build-system)
14383 (arguments
14384 `(#:python ,python-2
14385 #:phases
14386 (modify-phases %standard-phases
14387 (add-before 'build 'patch-setup-py
14388 (lambda _
14389 ;; Update requirements from dependency==version
14390 ;; to dependency>=version
14391 (substitute* "gdrivefs/resources/requirements.txt"
14392 (("==") ">="))
14393 #t)))))
14394 (native-inputs
14395 `(("python2-gipc" ,python2-gipc)
14396 ("python2-gevent" ,python2-gevent)
14397 ("python2-greenlet" ,python2-greenlet)
14398 ("python2-httplib2" ,python2-httplib2)
14399 ("python2-uritemplate" ,python2-uritemplate)
14400 ("python2-oauth2client" ,python2-oauth2client)
14401 ("python2-six" ,python2-six)))
14402 (propagated-inputs
14403 `(("python2-dateutil" ,python2-dateutil)
14404 ("python2-fusepy" ,python2-fusepy)
14405 ("python2-google-api-client" ,python2-google-api-client)))
14406 (home-page "https://github.com/dsoprea/GDriveFS")
14407 (synopsis "Mount Google Drive as a local file system")
14408 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
14409 under Python 2.7.")
14410 (license license:gpl2)))
14411
14412 (define-public pybind11
14413 (package
14414 (name "pybind11")
14415 (version "2.2.4")
14416 (source (origin
14417 (method git-fetch)
14418 (uri (git-reference
14419 (url "https://github.com/pybind/pybind11.git")
14420 (commit (string-append "v" version))))
14421 (sha256
14422 (base32
14423 "0pa79ymcasv8br5ifbx7878id5py2jpjac3i20cqxr6gs9l6ivlv"))
14424 (file-name (git-file-name name version))))
14425 (build-system cmake-build-system)
14426 (native-inputs
14427 `(("python" ,python)
14428 ("python-pytest" ,python-pytest)))
14429 (arguments
14430 `(#:test-target "check"))
14431 (home-page "https://github.com/pybind/pybind11/")
14432 (synopsis "Seamless operability between C++11 and Python")
14433 (description "pybind11 is a lightweight header-only library that exposes
14434 C++ types in Python and vice versa, mainly to create Python bindings of
14435 existing C++ code. Its goals and syntax are similar to the excellent
14436 Boost.Python library by David Abrahams: to minimize boilerplate code in
14437 traditional extension modules by inferring type information using compile-time
14438 introspection.")
14439 (license license:expat)))
14440
14441 (define-public python-fasteners
14442 (package
14443 (name "python-fasteners")
14444 (version "0.14.1")
14445 (source
14446 (origin
14447 (method url-fetch)
14448 (uri (pypi-uri "fasteners" version))
14449 (sha256
14450 (base32
14451 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
14452 (build-system python-build-system)
14453 (propagated-inputs
14454 `(("python-monotonic" ,python-monotonic)
14455 ("python-six" ,python-six)
14456 ("python-testtools" ,python-testtools)))
14457 (home-page "https://github.com/harlowja/fasteners")
14458 (synopsis "Python package that provides useful locks")
14459 (description
14460 "This package provides a Python program that provides following locks:
14461
14462 @itemize
14463 @item Locking decorator
14464 @item Reader-writer locks
14465 @item Inter-process locks
14466 @item Generic helpers
14467 @end itemize\n")
14468 (properties `((python2-variant . ,(delay python2-fasteners))))
14469 (license license:asl2.0)))
14470
14471 (define-public python2-fasteners
14472 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
14473 (package
14474 (inherit base)
14475 (propagated-inputs
14476 `(("python2-futures" ,python2-futures)
14477 ,@(package-propagated-inputs base))))))
14478
14479 (define-public python-requests-file
14480 (package
14481 (name "python-requests-file")
14482 (version "1.4.3")
14483 (source
14484 (origin
14485 (method url-fetch)
14486 (uri (pypi-uri "requests-file" version))
14487 (sha256
14488 (base32
14489 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
14490 (build-system python-build-system)
14491 (propagated-inputs
14492 `(("python-requests" ,python-requests)
14493 ("python-six" ,python-six)))
14494 (home-page
14495 "https://github.com/dashea/requests-file")
14496 (synopsis "File transport adapter for Requests")
14497 (description
14498 "Requests-File is a transport adapter for use with the Requests Python
14499 library to allow local file system access via @code{file://} URLs.")
14500 (license license:asl2.0)))
14501
14502 (define-public python2-requests-file
14503 (package-with-python2 python-requests-file))
14504
14505 (define-public python-tldextract
14506 (package
14507 (name "python-tldextract")
14508 (version "2.2.0")
14509 (source
14510 (origin
14511 (method url-fetch)
14512 (uri (pypi-uri "tldextract" version))
14513 (sha256
14514 (base32
14515 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
14516 (build-system python-build-system)
14517 (native-inputs
14518 `(("python-pytest" ,python-pytest)
14519 ("python-responses" ,python-responses)))
14520 (propagated-inputs
14521 `(("python-idna" ,python-idna)
14522 ("python-requests" ,python-requests)
14523 ("python-requests-file" ,python-requests-file)))
14524 (home-page
14525 "https://github.com/john-kurkowski/tldextract")
14526 (synopsis
14527 "Separate the TLD from the registered domain and subdomains of a URL")
14528 (description
14529 "TLDExtract accurately separates the TLD from the registered domain and
14530 subdomains of a URL, using the Public Suffix List. By default, this includes
14531 the public ICANN TLDs and their exceptions. It can optionally support the
14532 Public Suffix List's private domains as well.")
14533 (license license:bsd-3)))
14534
14535 (define-public python2-tldextract
14536 (package-with-python2 python-tldextract))
14537
14538 (define-public python-pynamecheap
14539 (package
14540 (name "python-pynamecheap")
14541 (version "0.0.3")
14542 (source
14543 (origin
14544 (method url-fetch)
14545 (uri (pypi-uri "PyNamecheap" version))
14546 (sha256
14547 (base32
14548 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
14549 (build-system python-build-system)
14550 (propagated-inputs
14551 `(("python-requests" ,python-requests)))
14552 (home-page
14553 "https://github.com/Bemmu/PyNamecheap")
14554 (synopsis
14555 "Namecheap API client in Python")
14556 (description
14557 "PyNamecheap is a Namecheap API client in Python.")
14558 (license license:expat)))
14559
14560 (define-public python2-pynamecheap
14561 (package-with-python2 python-pynamecheap))
14562
14563 (define-public python-dns-lexicon
14564 (package
14565 (name "python-dns-lexicon")
14566 (version "2.4.0")
14567 (source
14568 (origin
14569 (method url-fetch)
14570 (uri (pypi-uri "dns-lexicon" version))
14571 (sha256
14572 (base32
14573 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
14574 (build-system python-build-system)
14575 (arguments
14576 `(#:tests? #f)) ;requires internet access
14577 (propagated-inputs
14578 `(("python-future" ,python-future)
14579 ("python-pynamecheap" ,python-pynamecheap)
14580 ("python-requests" ,python-requests)
14581 ("python-tldextract" ,python-tldextract)
14582 ("python-urllib3" ,python-urllib3)))
14583 (home-page "https://github.com/AnalogJ/lexicon")
14584 (synopsis
14585 "Manipulate DNS records on various DNS providers")
14586 (description
14587 "Lexicon provides a way to manipulate DNS records on multiple DNS
14588 providers in a standardized way. It has a CLI but it can also be used as a
14589 Python library. It was designed to be used in automation, specifically with
14590 Let's Encrypt.")
14591 (license license:expat)))
14592
14593 (define-public python2-dns-lexicon
14594 (package-with-python2 python-dns-lexicon))
14595
14596 (define-public python-commandlines
14597 (package
14598 (name "python-commandlines")
14599 (version "0.4.1")
14600 (source
14601 (origin
14602 (method url-fetch)
14603 (uri (pypi-uri "commandlines" version))
14604 (sha256
14605 (base32
14606 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
14607 (build-system python-build-system)
14608 (home-page "https://github.com/chrissimpkins/commandlines")
14609 (synopsis "Command line argument to object parsing library")
14610 (description
14611 "@code{Commandlines} is a Python library for command line application
14612 development that supports command line argument parsing, command string
14613 validation testing and application logic.")
14614 (license license:expat)))
14615
14616 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
14617 ;; python-numba. They have a very unflexible relationship.
14618 (define-public python-numba
14619 (package
14620 (name "python-numba")
14621 (version "0.42.0")
14622 (source
14623 (origin
14624 (method url-fetch)
14625 (uri (pypi-uri "numba" version))
14626 (sha256
14627 (base32
14628 "03rqdfx0512lcri2bcpngx5k3jwfbqnanqj3n19c7d6h6hqxvq9x"))))
14629 (build-system python-build-system)
14630 (arguments
14631 `(#:modules ((guix build utils)
14632 (guix build python-build-system)
14633 (ice-9 ftw)
14634 (srfi srfi-1)
14635 (srfi srfi-26))
14636 #:phases
14637 (modify-phases %standard-phases
14638 (add-after 'unpack 'disable-proprietary-features
14639 (lambda _
14640 (setenv "NUMBA_DISABLE_HSA" "1")
14641 (setenv "NUMBA_DISABLE_CUDA" "1")
14642 #t))
14643 (add-after 'unpack 'remove-failing-tests
14644 (lambda _
14645 ;; FIXME: these tests fail for unknown reasons:
14646 ;; test_non_writable_pycache, test_non_creatable_pycache, and
14647 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
14648 (substitute* "numba/tests/test_dispatcher.py"
14649 (("def test(_non_writable_pycache)" _ m)
14650 (string-append "def guix_skip" m))
14651 (("def test(_non_creatable_pycache)" _ m)
14652 (string-append "def guix_skip" m))
14653 (("def test(_frozen)" _ m)
14654 (string-append "def guix_skip" m)))
14655
14656 ;; These tests fail because we don't run the tests from the build
14657 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
14658 ;; They ar in numba.tests.test_pycc.TestDistutilsSupport.
14659 (substitute* "numba/tests/test_pycc.py"
14660 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
14661 (string-append "def guix_skip" m)))
14662 #t))
14663 (replace 'check
14664 (lambda _
14665 (let ((cwd (getcwd)))
14666 (setenv "PYTHONPATH"
14667 (string-append cwd "/build/"
14668 (find (cut string-prefix? "lib" <>)
14669 (scandir (string-append cwd "/build")))
14670 ":"
14671 (getenv "PYTHONPATH")))
14672 ;; Something is wrong with the PYTHONPATH when running the
14673 ;; tests from the build directory, as it complains about not being
14674 ;; able to import certain modules.
14675 (with-directory-excursion "/tmp"
14676 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
14677 #t)))))
14678 (propagated-inputs
14679 `(("python-llvmlite" ,python-llvmlite)
14680 ("python-numpy" ,python-numpy)
14681 ("python-singledispatch" ,python-singledispatch)))
14682 ;; Needed for tests.
14683 (inputs
14684 `(("python-jinja2" ,python-jinja2)
14685 ("python-pygments" ,python-pygments)))
14686 (home-page "https://numba.pydata.org")
14687 (synopsis "Compile Python code using LLVM")
14688 (description "Numba gives you the power to speed up your applications with
14689 high performance functions written directly in Python. With a few
14690 annotations, array-oriented and math-heavy Python code can be just-in-time
14691 compiled to native machine instructions, similar in performance to C, C++ and
14692 Fortran, without having to switch languages or Python interpreters.
14693
14694 Numba works by generating optimized machine code using the LLVM compiler
14695 infrastructure at import time, runtime, or statically (using the included pycc
14696 tool).")
14697 (license license:bsd-3)))
14698
14699 (define-public python-anndata
14700 (package
14701 (name "python-anndata")
14702 (version "0.6.18")
14703 (source
14704 (origin
14705 (method url-fetch)
14706 (uri (pypi-uri "anndata" version))
14707 (sha256
14708 (base32
14709 "03x83yjaccbqszj7x4fwwmpil0ai59yx64d1zmf2691za3j03w73"))))
14710 (build-system python-build-system)
14711 (propagated-inputs
14712 `(("python-h5py" ,python-h5py)
14713 ("python-natsort" ,python-natsort)
14714 ("python-pandas" ,python-pandas)
14715 ("python-scipy" ,python-scipy)))
14716 (home-page "https://github.com/theislab/anndata")
14717 (synopsis "Annotated data for data analysis pipelines")
14718 (description "Anndata is a package for simple (functional) high-level APIs
14719 for data analysis pipelines. In this context, it provides an efficient,
14720 scalable way of keeping track of data together with learned annotations and
14721 reduces the code overhead typically encountered when using a mostly
14722 object-oriented library such as @code{scikit-learn}.")
14723 (license license:bsd-3)))
14724
14725 (define-public python-dill
14726 (package
14727 (name "python-dill")
14728 (version "0.2.9")
14729 (source
14730 (origin
14731 (method url-fetch)
14732 (uri (pypi-uri "dill" version))
14733 (sha256
14734 (base32 "0vwqyi6hyz2r29zydc78dqymkbc5y7gia16xcdh215cikxph9mpn"))))
14735 (build-system python-build-system)
14736 ;; FIXME: The check phase fails with "don't know how to make test from: …".
14737 (arguments '(#:tests? #f))
14738 (home-page "https://pypi.org/project/dill")
14739 (synopsis "Serialize all of Python")
14740 (description "Dill extends Python's @code{pickle} module for serializing
14741 and de-serializing Python objects to the majority of the built-in Python
14742 types. Dill provides the user the same interface as the @code{pickle} module,
14743 and also includes some additional features. In addition to pickling Python
14744 objects, @code{dill} provides the ability to save the state of an interpreter
14745 session in a single command. Hence, it would be feasible to save a
14746 interpreter session, close the interpreter, ship the pickled file to another
14747 computer, open a new interpreter, unpickle the session and thus continue from
14748 the saved state of the original interpreter session.")
14749 (license license:bsd-3)))
14750
14751 (define-public python-multiprocess
14752 (package
14753 (name "python-multiprocess")
14754 (version "0.70.6.1")
14755 (source
14756 (origin
14757 (method url-fetch)
14758 (uri (pypi-uri "multiprocess" version))
14759 (sha256
14760 (base32
14761 "1ip5caz67b3q0553mr8gm8xwsb8x500jn8ml0gihgyfy52m2ypcq"))))
14762 (build-system python-build-system)
14763 (propagated-inputs
14764 `(("python-dill" ,python-dill)))
14765 (home-page "https://pypi.org/project/multiprocess")
14766 (synopsis "Multiprocessing and multithreading in Python")
14767 (description
14768 "This package is a fork of the multiprocessing Python package, a package
14769 which supports the spawning of processes using the API of the standard
14770 library's @code{threading} module.")
14771 (license license:bsd-3)))
14772
14773 (define-public python-toolz
14774 (package
14775 (name "python-toolz")
14776 (version "0.9.0")
14777 (source
14778 (origin
14779 (method url-fetch)
14780 (uri (pypi-uri "toolz" version))
14781 (sha256
14782 (base32
14783 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
14784 (build-system python-build-system)
14785 ;; FIXME: tests cannot be computed: "Can't perform this operation for
14786 ;; unregistered loader type"
14787 (arguments '(#:tests? #f))
14788 (home-page "https://github.com/pytoolz/toolz/")
14789 (synopsis "List processing tools and functional utilities")
14790 (description
14791 "This package provides a set of utility functions for iterators,
14792 functions, and dictionaries.")
14793 (license license:bsd-3)))
14794
14795 (define-public python2-toolz
14796 (package-with-python2 python-toolz))
14797
14798 (define-public python-cytoolz
14799 (package
14800 (name "python-cytoolz")
14801 (version "0.9.0.1")
14802 (source
14803 (origin
14804 (method url-fetch)
14805 (uri (pypi-uri "cytoolz" version))
14806 (sha256
14807 (base32
14808 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
14809 (build-system python-build-system)
14810 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
14811 ;; 'exceptions'"
14812 (arguments '(#:tests? #f))
14813 (propagated-inputs
14814 `(("python-toolz" ,python-toolz)))
14815 (native-inputs
14816 `(("python-cython" ,python-cython)))
14817 (home-page "https://github.com/pytoolz/cytoolz")
14818 (synopsis "High performance functional utilities")
14819 (description
14820 "The cytoolz package implements the same API as provided by toolz. The
14821 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
14822 that is accessible to other projects developed in Cython.")
14823 (license license:bsd-3)))
14824
14825 (define-public python-sortedcontainers
14826 (package
14827 (name "python-sortedcontainers")
14828 (version "2.0.4")
14829 (source
14830 (origin
14831 (method url-fetch)
14832 (uri (pypi-uri "sortedcontainers" version))
14833 (sha256
14834 (base32
14835 "10hrk2k0hbf9x78vd3f0lj277m1yzfhzzxr0hja718liwb398wk0"))))
14836 (build-system python-build-system)
14837 (native-inputs
14838 `(("python-tox" ,python-tox)))
14839 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
14840 (synopsis "Sorted List, Sorted Dict, Sorted Set")
14841 (description
14842 "This package provides a sorted collections library, written in
14843 pure-Python.")
14844 (license license:asl2.0)))
14845
14846 (define-public python-cloudpickle
14847 (package
14848 (name "python-cloudpickle")
14849 (version "0.6.1")
14850 (source
14851 (origin
14852 (method url-fetch)
14853 (uri (pypi-uri "cloudpickle" version))
14854 (sha256
14855 (base32
14856 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
14857 (build-system python-build-system)
14858 ;; FIXME: there are 5 errors in 122 tests:
14859 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
14860 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
14861 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
14862 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
14863 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
14864 ;; TypeError: cannot serialize '_io.BufferedRandom' object
14865 (arguments '(#:tests? #f))
14866 (native-inputs
14867 `(("python-pytest" ,python-pytest)
14868 ("python-mock" ,python-mock)
14869 ("python-tornado" ,python-tornado)))
14870 (home-page "https://github.com/cloudpipe/cloudpickle")
14871 (synopsis "Extended pickling support for Python objects")
14872 (description
14873 "Cloudpickle makes it possible to serialize Python constructs not
14874 supported by the default pickle module from the Python standard library. It
14875 is especially useful for cluster computing where Python expressions are
14876 shipped over the network to execute on remote hosts, possibly close to the
14877 data.")
14878 (license license:bsd-3)))
14879
14880 (define-public python2-cloudpickle
14881 (package-with-python2 python-cloudpickle))
14882
14883 (define-public python-locket
14884 (package
14885 (name "python-locket")
14886 (version "0.2.0")
14887 (source
14888 (origin
14889 (method url-fetch)
14890 (uri (pypi-uri "locket" version))
14891 (sha256
14892 (base32
14893 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
14894 (build-system python-build-system)
14895 (home-page "https://github.com/mwilliamson/locket.py")
14896 (synopsis "File-based locks for Python")
14897 (description
14898 "Locket implements a lock that can be used by multiple processes provided
14899 they use the same path.")
14900 (license license:bsd-2)))
14901
14902 (define-public python2-locket
14903 (package-with-python2 python-locket))
14904
14905 (define-public python-blosc
14906 (package
14907 (name "python-blosc")
14908 (version "1.5.1")
14909 (source
14910 (origin
14911 (method url-fetch)
14912 (uri (pypi-uri "blosc" version))
14913 (sha256
14914 (base32
14915 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
14916 (build-system python-build-system)
14917 ;; FIXME: all tests pass, but then this error is printed:
14918 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
14919 (arguments '(#:tests? #f))
14920 (propagated-inputs
14921 `(("python-numpy" ,python-numpy)))
14922 (home-page "https://github.com/blosc/python-blosc")
14923 (synopsis "Python wrapper for the Blosc data compressor library")
14924 (description "Blosc is a high performance compressor optimized for binary
14925 data. It has been designed to transmit data to the processor cache faster
14926 than the traditional, non-compressed, direct memory fetch approach via a
14927 @code{memcpy()} system call.
14928
14929 Blosc works well for compressing numerical arrays that contains data with
14930 relatively low entropy, like sparse data, time series, grids with
14931 regular-spaced values, etc.
14932
14933 This Python package wraps the Blosc library.")
14934 (license license:bsd-3)))
14935
14936 (define-public python2-blosc
14937 (package-with-python2 python-blosc))
14938
14939 (define-public python-partd
14940 (package
14941 (name "python-partd")
14942 (version "0.3.9")
14943 (source
14944 (origin
14945 (method url-fetch)
14946 (uri (pypi-uri "partd" version))
14947 (sha256
14948 (base32
14949 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
14950 (build-system python-build-system)
14951 (propagated-inputs
14952 `(("python-blosc" ,python-blosc)
14953 ("python-locket" ,python-locket)
14954 ("python-numpy" ,python-numpy)
14955 ("python-pandas" ,python-pandas)
14956 ("python-pyzmq" ,python-pyzmq)
14957 ("python-toolz" ,python-toolz)))
14958 (home-page "https://github.com/dask/partd/")
14959 (synopsis "Appendable key-value storage")
14960 (description "Partd stores key-value pairs. Values are raw bytes. We
14961 append on old values. Partd excels at shuffling operations.")
14962 (license license:bsd-3)))
14963
14964 (define-public python2-partd
14965 (package-with-python2 python-partd))
14966
14967 (define-public python-dask
14968 (package
14969 (name "python-dask")
14970 (version "1.2.0")
14971 (source
14972 (origin
14973 (method url-fetch)
14974 (uri (pypi-uri "dask" version))
14975 (sha256
14976 (base32
14977 "1y0dqcp72ixwblgway0jpvfirlxfcmwrjiivdq96firj1hw127sd"))))
14978 (build-system python-build-system)
14979 ;; A single test out of 5000+ fails. This test is marked as xfail when
14980 ;; pytest-xdist is used.
14981 (arguments
14982 `(#:phases
14983 (modify-phases %standard-phases
14984 (add-after 'unpack 'disable-broken-test
14985 (lambda _
14986 (substitute* "dask/tests/test_threaded.py"
14987 (("def test_interrupt\\(\\)" m)
14988 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
14989 m)))
14990 (when (which "python2")
14991 ;; This test fails with recent Pandas:
14992 ;; <https://github.com/dask/dask/issues/3794>.
14993 (substitute* "dask/dataframe/tests/test_dataframe.py"
14994 (("def test_info\\(\\)" m)
14995 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
14996 m))))
14997 #t))
14998 (replace 'check
14999 (lambda _ (invoke "pytest" "-vv"))))))
15000 (propagated-inputs
15001 `(("python-cloudpickle" ,python-cloudpickle)
15002 ("python-numpy" ,python-numpy)
15003 ("python-pandas" ,python-pandas)
15004 ("python-partd" ,python-partd)
15005 ("python-toolz" ,python-toolz)
15006 ("python-pyyaml" ,python-pyyaml)))
15007 (native-inputs
15008 `(("python-pytest" ,python-pytest)
15009 ("python-pytest-runner" ,python-pytest-runner)))
15010 (home-page "https://github.com/dask/dask/")
15011 (synopsis "Parallel computing with task scheduling")
15012 (description
15013 "Dask is a flexible parallel computing library for analytics. It
15014 consists of two components: dynamic task scheduling optimized for computation,
15015 and large data collections like parallel arrays, dataframes, and lists that
15016 extend common interfaces like NumPy, Pandas, or Python iterators to
15017 larger-than-memory or distributed environments. These parallel collections
15018 run on top of the dynamic task schedulers. ")
15019 (license license:bsd-3)))
15020
15021 (define-public python2-dask
15022 (package-with-python2 python-dask))
15023
15024 (define-public python-ilinkedlist
15025 (package
15026 (name "python-ilinkedlist")
15027 (version "0.4.0")
15028 (source
15029 (origin
15030 (method url-fetch)
15031 (uri (pypi-uri "ilinkedlist" version))
15032 (sha256
15033 (base32
15034 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
15035 (build-system python-build-system)
15036 (native-inputs `(("python-pytest" ,python-pytest)))
15037 (inputs `(("python" ,python)))
15038 (home-page "https://github.com/luther9/ilinkedlist-py")
15039 (synopsis "Immutable linked list library")
15040 (description
15041 "This is a implementation of immutable linked lists for Python. It
15042 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
15043 Since a linked list is treated as immutable, it is hashable, and its length
15044 can be retrieved in constant time. Some of the terminology is inspired by
15045 LISP. It is possible to create an improper list by creating a @code{Pair}
15046 with a non-list @code{cdr}.")
15047 (license license:gpl3+)))
15048
15049 (define-public python-readlike
15050 (package
15051 (name "python-readlike")
15052 (version "0.1.3")
15053 (source
15054 (origin
15055 (method url-fetch)
15056 (uri (pypi-uri "readlike" version))
15057 (sha256
15058 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
15059 (build-system python-build-system)
15060 (home-page "https://github.com/jangler/readlike")
15061 (synopsis "GNU Readline-like line editing module")
15062 (description
15063 "This Python module provides line editing functions similar to the default
15064 Emacs-style ones of GNU Readline. Unlike the Python standard library's
15065 @code{readline} package, this one allows access to those capabilties in settings
15066 outside of a standard command-line interface. It is especially well-suited to
15067 interfacing with Urwid, due to a shared syntax for describing key inputs.
15068
15069 Currently, all stateless Readline commands are implemented. Yanking and history
15070 are not supported.")
15071 (license license:expat)))
15072
15073 (define-public python2-readlike
15074 (package-with-python2 python-readlike))
15075
15076 (define-public python-reparser
15077 (package
15078 (name "python-reparser")
15079 (version "1.4.3")
15080 (source
15081 (origin
15082 (method url-fetch)
15083 (uri (pypi-uri "ReParser" version))
15084 (sha256
15085 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
15086 (build-system python-build-system)
15087 (home-page "https://github.com/xmikos/reparser")
15088 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
15089 (description
15090 "This Python library provides a simple lexer/parser for inline markup based
15091 on regular expressions.")
15092 (license license:expat)))
15093
15094 (define-public python2-reparser
15095 (let ((reparser (package-with-python2
15096 (strip-python2-variant python-reparser))))
15097 (package (inherit reparser)
15098 (propagated-inputs
15099 `(("python2-enum34" ,python2-enum34)
15100 ,@(package-propagated-inputs reparser))))))
15101
15102 (define-public python-precis-i18n
15103 (package
15104 (name "python-precis-i18n")
15105 (version "1.0.0")
15106 (source
15107 (origin
15108 (method url-fetch)
15109 (uri (pypi-uri "precis_i18n" version))
15110 (sha256
15111 (base32
15112 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
15113 (build-system python-build-system)
15114 (home-page "https://github.com/byllyfish/precis_i18n")
15115 (synopsis "Implementation of the PRECIS framework")
15116 (description
15117 "This module implements the PRECIS Framework as described in RFC 8264,
15118 RFC 8265 and RFC 8266.")
15119 (license license:expat)))
15120
15121 (define-public python-absl-py
15122 (package
15123 (name "python-absl-py")
15124 (version "0.6.1")
15125 (source
15126 (origin
15127 (method url-fetch)
15128 (uri (pypi-uri "absl-py" version))
15129 (sha256
15130 (base32
15131 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
15132 (build-system python-build-system)
15133 (propagated-inputs
15134 `(("python-six" ,python-six)))
15135 (home-page "https://github.com/abseil/abseil-py")
15136 (synopsis "Abseil Python common libraries")
15137 (description
15138 "This package provides the Abseil Python Common Libraries, a collection
15139 of Python libraries for building Python applications.")
15140 (license license:asl2.0)))
15141
15142 (define-public python-astor
15143 (package
15144 (name "python-astor")
15145 (version "0.7.1")
15146 (source
15147 (origin
15148 (method url-fetch)
15149 (uri (pypi-uri "astor" version))
15150 (sha256
15151 (base32
15152 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
15153 (build-system python-build-system)
15154 ;; FIXME: There are two errors and two test failures.
15155 (arguments `(#:tests? #f))
15156 (home-page "https://github.com/berkerpeksag/astor")
15157 (synopsis "Read and write Python ASTs")
15158 (description "Astor is designed to allow easy manipulation of Python
15159 source via the Abstract Syntax Tree.")
15160 (license license:bsd-3)))
15161
15162 (define-public python2-astor
15163 (package-with-python2 python-astor))
15164
15165 (define-public python-grpcio
15166 (package
15167 (name "python-grpcio")
15168 (version "1.17.1")
15169 (source
15170 (origin
15171 (method url-fetch)
15172 (uri (pypi-uri "grpcio" version))
15173 (sha256
15174 (base32
15175 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
15176 (build-system python-build-system)
15177 (propagated-inputs
15178 `(("python-six" ,python-six)))
15179 (home-page "https://grpc.io")
15180 (synopsis "HTTP/2-based RPC framework")
15181 (description "This package provides a Python library for communicating
15182 with the HTTP/2-based RPC framework gRPC.")
15183 (license license:asl2.0)))
15184
15185 (define-public python-astunparse
15186 (package
15187 (name "python-astunparse")
15188 (version "1.6.1")
15189 (source
15190 (origin
15191 (method url-fetch)
15192 (uri (pypi-uri "astunparse" version))
15193 (sha256
15194 (base32
15195 "1jhidwyrqn17avqh9xnnm3wd7q7aahaq009cba67g86y6gxicyyj"))))
15196 (build-system python-build-system)
15197 (arguments '(#:tests? #f)) ; there are none
15198 (propagated-inputs
15199 `(("python-six" ,python-six)
15200 ("python-wheel" ,python-wheel)))
15201 (home-page "https://github.com/simonpercivall/astunparse")
15202 (synopsis "AST unparser for Python")
15203 (description "This package provides an AST unparser for Python. It is a
15204 factored out version of @code{unparse} found in the Python source
15205 distribution.")
15206 (license license:bsd-3)))
15207
15208 (define-public python-gast
15209 (package
15210 (name "python-gast")
15211 (version "0.2.2")
15212 (source
15213 (origin
15214 (method url-fetch)
15215 (uri (pypi-uri "gast" version))
15216 (sha256
15217 (base32 "1w5dzdb3gpcfmd2s0b93d8gff40a1s41rv31458z14inb3s9v4zy"))))
15218 (build-system python-build-system)
15219 (propagated-inputs
15220 `(("python-astunparse" ,python-astunparse)))
15221 (home-page "https://pypi.org/project/gast/")
15222 (synopsis "Generic Python AST that abstracts the underlying Python version")
15223 (description
15224 "GAST provides a compatibility layer between the AST of various Python
15225 versions, as produced by @code{ast.parse} from the standard @code{ast}
15226 module.")
15227 (license license:bsd-3)))
15228
15229 (define-public python-wikidata
15230 (package
15231 (name "python-wikidata")
15232 (version "0.6.1")
15233 (source
15234 (origin
15235 (method url-fetch)
15236 (uri (pypi-uri "Wikidata" version))
15237 (sha256
15238 (base32
15239 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
15240 (build-system python-build-system)
15241 (propagated-inputs
15242 `(("python-babel" ,python-babel)))
15243 (home-page "https://github.com/dahlia/wikidata")
15244 (synopsis "Wikidata client library")
15245 (description
15246 "This package provides a Python interface to
15247 @url{https://www.wikidata.org/, Wikidata}.")
15248 (properties '((upstream-name . "Wikidata")))
15249 (license license:gpl3+)))
15250
15251 (define-public python-doctest-ignore-unicode
15252 (package
15253 (name "python-doctest-ignore-unicode")
15254 (version "0.1.2")
15255 (source
15256 (origin
15257 (method url-fetch)
15258 (uri (pypi-uri "doctest-ignore-unicode" version))
15259 (sha256
15260 (base32
15261 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
15262 (build-system python-build-system)
15263 (native-inputs
15264 `(("python-nose" ,python-nose)))
15265 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
15266 (synopsis "Ignore Unicode literal prefixes in doctests")
15267 (description
15268 "This package adds support for a flag to ignore Unicode literal prefixes
15269 in doctests.")
15270 (license license:asl2.0)))
15271
15272 (define-public python-attr
15273 (package
15274 (name "python-attr")
15275 (version "0.3.1")
15276 (source
15277 (origin
15278 (method url-fetch)
15279 (uri (pypi-uri "attr" version))
15280 (sha256
15281 (base32
15282 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
15283 (build-system python-build-system)
15284 (home-page "https://github.com/denis-ryzhkov/attr")
15285 (synopsis "Decorator for attributes of target function or class")
15286 (description "Simple decorator to set attributes of target function or
15287 class in a @acronym{DRY, Don't Repeat Yourself} way.")
15288 (license license:expat)))
15289
15290 (define-public python-construct
15291 (package
15292 (name "python-construct")
15293 (version "2.9.45")
15294 (source
15295 (origin
15296 (method url-fetch)
15297 (uri (pypi-uri "construct" version))
15298 (sha256
15299 (base32
15300 "130iy05awzigm2xah2yvlmb08mac5bi4gzr5m3g7k1krs3ps0w92"))))
15301 (build-system python-build-system)
15302 (arguments
15303 `(#:tests? #f)) ; No tests exist.
15304 (propagated-inputs
15305 `(("python-extras" ,python-extras)
15306 ("python-arrow" ,python-arrow)
15307 ("python-numpy" ,python-numpy)
15308 ("python-ruamel.yaml" ,python-ruamel.yaml)))
15309 (home-page "http://construct.readthedocs.io")
15310 (synopsis "Declarative and symmetrical parser and builder for binary data")
15311 (description
15312 "This package provides both simple, atomic constructs (such as
15313 integers of various sizes), as well as composite ones which allow you
15314 form hierarchical and sequential structures of increasing complexity.
15315 It features bit and byte granularity, easy debugging and testing, an
15316 easy-to-extend subclass system, and lots of primitive constructs to
15317 make your work easier.")
15318 (license license:expat)))
15319
15320 (define-public python-humanize
15321 (package
15322 (name "python-humanize")
15323 (version "0.5.1")
15324 (source
15325 (origin
15326 (method url-fetch)
15327 (uri (pypi-uri "humanize" version))
15328 (sha256
15329 (base32
15330 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
15331 (arguments
15332 '(#:tests? #f)) ; tests not in pypi archive
15333 (build-system python-build-system)
15334 (home-page "https://github.com/jmoiron/humanize")
15335 (synopsis "Print numerical information in a human-readable form")
15336 (description "This package provides a Python module that displays numbers
15337 and dates in \"human readable\" forms. For example, it would display
15338 \"12345591313\" as \"12.3 billion\".")
15339 (license license:expat)))
15340
15341 (define-public python-txaio
15342 (package
15343 (name "python-txaio")
15344 (version "18.8.1")
15345 (source
15346 (origin
15347 (method url-fetch)
15348 (uri (pypi-uri "txaio" version))
15349 (sha256
15350 (base32
15351 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
15352 (build-system python-build-system)
15353 (propagated-inputs
15354 `(("python-twisted" ,python-twisted)
15355 ("python-six" ,python-six)))
15356 (home-page "https://github.com/crossbario/txaio")
15357 (synopsis "Compatibility layer between Python asyncio and Twisted")
15358 (description "Txaio provides a compatibility layer between the Python
15359 @code{asyncio} module and @code{Twisted}.")
15360 (license license:expat)))
15361
15362 (define-public python-toolshed
15363 (package
15364 (name "python-toolshed")
15365 (version "0.4.6")
15366 (source
15367 (origin
15368 (method url-fetch)
15369 (uri (pypi-uri "toolshed" version))
15370 (sha256
15371 (base32
15372 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
15373 (build-system python-build-system)
15374 (native-inputs
15375 `(("python-nose" ,python-nose)))
15376 (home-page "https://github.com/brentp/toolshed/")
15377 (synopsis "Collection of modules and functions for working with data")
15378 (description "This is a collection of well-tested, simple modules and
15379 functions that aim to reduce boilerplate when working with data.")
15380 (license license:bsd-2)))
15381
15382 (define-public python-annoy
15383 (package
15384 (name "python-annoy")
15385 (version "1.15.1")
15386 (source
15387 (origin
15388 (method url-fetch)
15389 (uri (pypi-uri "annoy" version))
15390 (sha256
15391 (base32
15392 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
15393 (build-system python-build-system)
15394 (native-inputs
15395 `(("python-nose" ,python-nose)))
15396 (home-page "https://github.com/spotify/annoy/")
15397 (synopsis "Approximate nearest neighbors library")
15398 (description
15399 "Annoy is a C++ library with Python bindings to search for points in
15400 space that are close to a given query point. It also creates large read-only
15401 file-based data structures that are @code{mmap}ped into memory so that many
15402 processes may share the same data.")
15403 (license license:asl2.0)))
15404
15405 (define-public python-pylzma
15406 (package
15407 (name "python-pylzma")
15408 (version "0.5.0")
15409 (source
15410 (origin
15411 (method url-fetch)
15412 (uri (pypi-uri "pylzma" version))
15413 (sha256
15414 (base32
15415 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
15416 (build-system python-build-system)
15417 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
15418 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
15419 (description "This package provides Python bindings for the LZMA library
15420 by Igor Pavlov.")
15421 (license license:lgpl2.1+)))
15422
15423 (define-public python2-pylzma
15424 (package-with-python2 python-pylzma))