Merge branch 'master' into staging
[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-2019 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, 2019 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 ;;; Copyright © 2019 Guillaume Le Vaillant <glv@posteo.net>
64 ;;; Copyright © 2019 Alex Griffin <a@ajgrf.com>
65 ;;; Copyright © 2019 Pierre Langlois <pierre.langlois@gmx.com>
66 ;;; Copyright © 2019 Jacob MacDonald <jaccarmac@gmail.com>
67 ;;; Copyright © 2019 Giacomo Leidi <goodoldpaul@autistici.org>
68 ;;; Copyright © 2019 Wiktor Żelazny <wzelazny@vurv.cz>
69 ;;;
70 ;;; This file is part of GNU Guix.
71 ;;;
72 ;;; GNU Guix is free software; you can redistribute it and/or modify it
73 ;;; under the terms of the GNU General Public License as published by
74 ;;; the Free Software Foundation; either version 3 of the License, or (at
75 ;;; your option) any later version.
76 ;;;
77 ;;; GNU Guix is distributed in the hope that it will be useful, but
78 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
79 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
80 ;;; GNU General Public License for more details.
81 ;;;
82 ;;; You should have received a copy of the GNU General Public License
83 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
84
85 (define-module (gnu packages python-xyz)
86 #:use-module ((guix licenses) #:prefix license:)
87 #:use-module (gnu packages)
88 #:use-module (gnu packages algebra)
89 #:use-module (gnu packages adns)
90 #:use-module (gnu packages attr)
91 #:use-module (gnu packages backup)
92 #:use-module (gnu packages bash)
93 #:use-module (gnu packages check)
94 #:use-module (gnu packages compression)
95 #:use-module (gnu packages crypto)
96 #:use-module (gnu packages databases)
97 #:use-module (gnu packages dbm)
98 #:use-module (gnu packages file)
99 #:use-module (gnu packages fontutils)
100 #:use-module (gnu packages gcc)
101 #:use-module (gnu packages geo)
102 #:use-module (gnu packages ghostscript)
103 #:use-module (gnu packages gl)
104 #:use-module (gnu packages glib)
105 #:use-module (gnu packages graphviz)
106 #:use-module (gnu packages graphics)
107 #:use-module (gnu packages gstreamer)
108 #:use-module (gnu packages gtk)
109 #:use-module (gnu packages icu4c)
110 #:use-module (gnu packages image)
111 #:use-module (gnu packages imagemagick)
112 #:use-module (gnu packages libevent)
113 #:use-module (gnu packages libffi)
114 #:use-module (gnu packages linux)
115 #:use-module (gnu packages llvm)
116 #:use-module (gnu packages man)
117 #:use-module (gnu packages maths)
118 #:use-module (gnu packages monitoring)
119 #:use-module (gnu packages multiprecision)
120 #:use-module (gnu packages networking)
121 #:use-module (gnu packages ncurses)
122 #:use-module (gnu packages openstack)
123 #:use-module (gnu packages pcre)
124 #:use-module (gnu packages perl)
125 #:use-module (gnu packages pkg-config)
126 #:use-module (gnu packages python)
127 #:use-module (gnu packages python-check)
128 #:use-module (gnu packages python-compression)
129 #:use-module (gnu packages python-crypto)
130 #:use-module (gnu packages python-web)
131 #:use-module (gnu packages qt)
132 #:use-module (gnu packages readline)
133 #:use-module (gnu packages sdl)
134 #:use-module (gnu packages search)
135 #:use-module (gnu packages shells)
136 #:use-module (gnu packages sphinx)
137 #:use-module (gnu packages ssh)
138 #:use-module (gnu packages terminals)
139 #:use-module (gnu packages tex)
140 #:use-module (gnu packages texinfo)
141 #:use-module (gnu packages time)
142 #:use-module (gnu packages tls)
143 #:use-module (gnu packages version-control)
144 #:use-module (gnu packages video)
145 #:use-module (gnu packages web)
146 #:use-module (gnu packages base)
147 #:use-module (gnu packages xml)
148 #:use-module (gnu packages xorg)
149 #:use-module (gnu packages xdisorg)
150 #:use-module (gnu packages tcl)
151 #:use-module (gnu packages bdw-gc)
152 #:use-module (gnu packages serialization)
153 #:use-module (guix packages)
154 #:use-module (guix download)
155 #:use-module (guix git-download)
156 #:use-module (guix hg-download)
157 #:use-module (guix utils)
158 #:use-module (guix build-system gnu)
159 #:use-module (guix build-system cmake)
160 #:use-module (guix build-system python)
161 #:use-module (guix build-system trivial)
162 #:use-module (srfi srfi-1)
163 #:use-module (srfi srfi-26))
164
165 (define-public python-psutil
166 (package
167 (name "python-psutil")
168 (version "5.6.2")
169 (source
170 (origin
171 (method url-fetch)
172 (uri (pypi-uri "psutil" version))
173 (sha256
174 (base32
175 "1v95vb5385qscfdvphv8l2w22bmir3d7yhpi02n58v3mlqy1r3l2"))))
176 (build-system python-build-system)
177 (arguments
178 ;; FIXME: some tests does not return and times out.
179 '(#:tests? #f))
180 (home-page "https://www.github.com/giampaolo/psutil")
181 (synopsis "Library for retrieving information on running processes")
182 (description
183 "psutil (Python system and process utilities) is a library for retrieving
184 information on running processes and system utilization (CPU, memory, disks,
185 network) in Python. It is useful mainly for system monitoring, profiling and
186 limiting process resources and management of running processes. It implements
187 many functionalities offered by command line tools such as: ps, top, lsof,
188 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
189 pidof, tty, taskset, pmap.")
190 (properties `((python2-variant . ,(delay python2-psutil))))
191 (license license:bsd-3)))
192
193 (define-public python2-psutil
194 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
195 (package
196 (inherit base)
197 (propagated-inputs
198 `(("python2-enum34" ,python2-enum34) ;optional
199 ,@(package-propagated-inputs base))))))
200
201 (define-public python-shapely
202 (package
203 (name "python-shapely")
204 (version "1.6.4.post2")
205 (source
206 (origin
207 (method url-fetch)
208 (uri (pypi-uri "Shapely" version))
209 (sha256
210 (base32
211 "03r42fmd9alp6r3q95ad6rldq2f7n1wimrw53zy5kpn33yv7pf64"))))
212 (build-system python-build-system)
213 (native-inputs
214 `(("python-cython" ,python-cython)
215 ("python-matplotlib" ,python-matplotlib)
216 ("python-pytest" ,python-pytest)
217 ("python-pytest-cov" ,python-pytest-cov)))
218 (inputs
219 `(("geos" ,geos)))
220 (propagated-inputs
221 `(("python-numpy" ,python-numpy)))
222 (arguments
223 `(#:phases
224 (modify-phases %standard-phases
225 (add-after 'unpack 'patch-geos-path
226 (lambda* (#:key inputs #:allow-other-keys)
227 (let ((geos (assoc-ref inputs "geos"))
228 (glibc (assoc-ref inputs ,(if (%current-target-system)
229 "cross-libc" "libc"))))
230 (substitute* "shapely/geos.py"
231 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
232 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
233 geos "/lib/libgeos_c.so'])"))
234 (("free = load_dll\\('c'\\)\\.free")
235 (string-append "free = load_dll('c', fallbacks=['"
236 glibc "/lib/libc.so.6']).free"))))
237 #t)))))
238 (home-page "https://github.com/Toblerity/Shapely")
239 (synopsis "Library for the manipulation and analysis of geometric objects")
240 (description "Shapely is a Python package for manipulation and analysis of
241 planar geometric objects. It is based on the @code{GEOS} library.")
242 (license license:bsd-3)))
243
244 (define-public python-shortuuid
245 (package
246 (name "python-shortuuid")
247 (version "0.5.0")
248 (source
249 (origin
250 (method url-fetch)
251 (uri (pypi-uri "shortuuid" version))
252 (sha256
253 (base32
254 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
255 (build-system python-build-system)
256 (native-inputs
257 `(("python-pep8" ,python-pep8)))
258 (home-page "https://github.com/skorokithakis/shortuuid")
259 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
260 (description
261 "@code{shortuuid} is a Python library for generating concise, unambiguous
262 and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
263 module and then similar looking characters are removed.")
264 (license license:bsd-3)))
265
266 (define-public python-logwrap
267 (package
268 (name "python-logwrap")
269 (version "3.2.1")
270 (source
271 (origin
272 (method url-fetch)
273 (uri (pypi-uri "logwrap" version ".zip"))
274 (sha256
275 (base32
276 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
277 (build-system python-build-system)
278 (propagated-inputs
279 `(("python-six" ,python-six)
280 ("python-typing" ,python-typing)))
281 (native-inputs
282 `(("unzip" ,unzip)
283 ("python-cython" ,python-cython)
284 ("python-pytest" ,python-pytest)
285 ("python-pytest-cov" ,python-pytest-cov)
286 ("python-pytest-runner" ,python-pytest-runner)))
287 (home-page "https://github.com/penguinolog/logwrap")
288 (synopsis "Decorator for logging function arguments")
289 (description "This package provides a decorator to log function arguments
290 and function call return values in a human-readable way.")
291 (license license:asl2.0)))
292
293 (define-public python2-shapely
294 (package-with-python2 python-shapely))
295
296 (define-public python-clyent
297 (package
298 (name "python-clyent")
299 (version "1.2.1")
300 (source
301 (origin
302 (method url-fetch)
303 (uri (pypi-uri "clyent" version))
304 (sha256
305 (base32
306 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
307 (build-system python-build-system)
308 (native-inputs
309 `(("python-mock" ,python-mock)))
310 (home-page "https://github.com/binstar/clyent")
311 (synopsis "Command line client library")
312 (description "Clyent is a Python command line utiliy library. It is used
313 by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
314 (license license:bsd-3)))
315
316 (define-public python2-clyent
317 (package-with-python2 python-clyent))
318
319 (define-public python-babel
320 (package
321 (name "python-babel")
322 (version "2.7.0")
323 (source
324 (origin
325 (method url-fetch)
326 (uri (pypi-uri "Babel" version))
327 (sha256
328 (base32
329 "0a7wawx8vsg7igvz6p3x909fskhg4b2y1910xk4f4c8y22p3aqg8"))))
330 (build-system python-build-system)
331 (native-inputs
332 `(("python-freezegun" ,python-freezegun)
333 ("python-pytest" ,python-pytest)))
334 (propagated-inputs
335 `(("python-pytz" ,python-pytz)))
336 (arguments
337 `(#:phases (modify-phases %standard-phases
338 (replace 'check
339 (lambda _
340 (invoke "pytest" "-vv" "-k"
341 (string-append
342 ;; XXX: These tests fail when using Pytest 4.x and
343 ;; Babel 2.6.0. Try removing this for later versions.
344 "not test_no_inherit_metazone_marker_never_in_output"
345 " and not test_smoke_dates"
346 " and not test_smoke_numbers")))))))
347 (home-page "http://babel.pocoo.org/")
348 (synopsis
349 "Tools for internationalizing Python applications")
350 (description
351 "Babel is composed of two major parts:
352 - tools to build and work with gettext message catalogs
353 - a Python interface to the CLDR (Common Locale Data Repository), providing
354 access to various locale display names, localized number and date formatting,
355 etc. ")
356 (license license:bsd-3)))
357
358 (define-public python2-babel
359 (package-with-python2 python-babel))
360
361 ;; Sphinx < 2.0 requires this version. Remove once no longer needed.
362 (define-public python2-babel-2.6
363 (package
364 (inherit python2-babel)
365 (version "2.6.0")
366 (source (origin
367 (method url-fetch)
368 (uri (pypi-uri "Babel" version))
369 (sha256
370 (base32
371 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))))
372
373 (define-public python2-backport-ssl-match-hostname
374 (package
375 (name "python2-backport-ssl-match-hostname")
376 (version "3.5.0.1")
377 (source
378 (origin
379 (method url-fetch)
380 (uri (pypi-uri "backports.ssl_match_hostname" version))
381 (sha256
382 (base32
383 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
384 (build-system python-build-system)
385 (arguments
386 `(#:python ,python-2
387 #:tests? #f)) ; no test target
388 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
389 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
390 (description
391 "This backport brings the ssl.match_hostname() function to users of
392 earlier versions of Python. The function checks the hostname in the
393 certificate returned by the server to which a connection has been established,
394 and verifies that it matches the intended target hostname.")
395 (license license:psfl)))
396
397 (define-public python-boolean.py
398 (package
399 (name "python-boolean.py")
400 (version "3.6")
401 (source
402 (origin
403 ;; There's no source tarball on PyPI.
404 (method git-fetch)
405 (uri (git-reference
406 (url "https://github.com/bastikr/boolean.py")
407 (commit (string-append "v" version))))
408 (file-name (git-file-name name version))
409 (sha256
410 (base32 "1wc89y73va58cj7dsx6c199zpxsy9q53dsffsdj6zmc90inqz6qs"))))
411 (build-system python-build-system)
412 (home-page "https://github.com/bastikr/boolean.py")
413 (synopsis "Boolean algebra in one Python module")
414 (description
415 "This is a small Python library that implements boolean algebra.
416 It defines two base elements, @code{TRUE} and @code{FALSE}, and a
417 @code{Symbol} class that can take on one of these two values. Calculations
418 are done only in terms of @code{AND}, @code{OR}, and @code{NOT}---other
419 compositions like @code{XOR} and @code{NAND} are emulated on top of them.
420 Expressions are constructed from parsed strings or directly in Python.")
421 (license license:bsd-2)))
422
423 (define-public python-hdf4
424 (package
425 (name "python-hdf4")
426 (version "0.9")
427 (source
428 (origin
429 (method url-fetch)
430 (uri (pypi-uri name version))
431 (sha256
432 (base32
433 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
434 (build-system python-build-system)
435 (native-inputs `(("nose" ,python-nose)))
436 (propagated-inputs `(("numpy" ,python-numpy)))
437 (inputs
438 `(("hdf4" ,hdf4)
439 ("libjpeg" ,libjpeg)
440 ("zlib" ,zlib)))
441 (arguments
442 `(#:phases
443 (modify-phases %standard-phases
444 (replace 'check
445 (lambda _
446 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
447 ;; on to import numpy. Somehow this works on their CI system.
448 ;; Let's just manage PYTHONPATH here instead.
449 (substitute* "runexamples.sh"
450 (("export PYTHONPATH=.*") ""))
451 (setenv "PYTHONPATH"
452 (string-append (getcwd) ":"
453 (getenv "PYTHONPATH")))
454 (invoke "./runexamples.sh")
455 (invoke "nosetests" "-v"))))))
456 (home-page "https://github.com/fhs/python-hdf4")
457 (synopsis "Python interface to the NCSA HDF4 library")
458 (description
459 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
460 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
461 NetCDF files can also be read and modified. Python-HDF4 is a fork of
462 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
463 (license license:expat)))
464
465 (define-public python2-hdf4
466 (package-with-python2 python-hdf4))
467
468 (define-public python-h5py
469 (package
470 (name "python-h5py")
471 (version "2.8.0")
472 (source
473 (origin
474 (method url-fetch)
475 (uri (pypi-uri "h5py" version))
476 (sha256
477 (base32
478 "0mdr6wrq02ac93m1aqx9kad0ppfzmm4imlxqgyy1x4l7hmdcc9p6"))))
479 (build-system python-build-system)
480 (arguments
481 `(#:tests? #f ; no test target
482 #:phases
483 (modify-phases %standard-phases
484 (add-after 'unpack 'fix-hdf5-paths
485 (lambda* (#:key inputs #:allow-other-keys)
486 (let ((prefix (assoc-ref inputs "hdf5")))
487 (substitute* "setup_build.py"
488 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
489 (string-append "['" prefix "/lib" "']"))
490 (("'/opt/local/include', '/usr/local/include'")
491 (string-append "'" prefix "/include" "'")))
492 (substitute* "setup_configure.py"
493 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
494 (string-append "['" prefix "/lib" "']")))
495 #t))))))
496 (propagated-inputs
497 `(("python-six" ,python-six)
498 ("python-numpy" ,python-numpy)))
499 (inputs
500 `(("hdf5" ,hdf5)))
501 (native-inputs
502 `(("python-cython" ,python-cython)
503 ("python-pkgconfig" ,python-pkgconfig)))
504 (home-page "http://www.h5py.org/")
505 (synopsis "Read and write HDF5 files from Python")
506 (description
507 "The h5py package provides both a high- and low-level interface to the
508 HDF5 library from Python. The low-level interface is intended to be a
509 complete wrapping of the HDF5 API, while the high-level component supports
510 access to HDF5 files, datasets and groups using established Python and NumPy
511 concepts.")
512 (license license:bsd-3)))
513
514 (define-public python2-h5py
515 (package-with-python2 python-h5py))
516
517 (define-public python-sh
518 (package
519 (name "python-sh")
520 (version "1.12.14")
521 (source
522 (origin
523 (method url-fetch)
524 (uri (pypi-uri "sh" version))
525 (sha256
526 (base32
527 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
528 (build-system python-build-system)
529 (arguments
530 '(#:phases
531 (modify-phases %standard-phases
532 (replace 'check
533 (lambda _
534 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
535 (setenv "HOME" "/tmp")
536 (invoke "python" "sh.py" "test"))))))
537 (native-inputs
538 `(("python-coverage" ,python-coverage)))
539 (home-page "https://github.com/amoffat/sh")
540 (synopsis "Python subprocess replacement")
541 (description "This package provides a replacement for Python's
542 @code{subprocess} feature.")
543 (license license:expat)))
544
545 (define-public python2-sh
546 (package-with-python2 python-sh))
547
548 (define-public python-cftime
549 (package
550 (name "python-cftime")
551 (version "1.0.3.4")
552 (source
553 (origin
554 (method url-fetch)
555 (uri (pypi-uri "cftime" version))
556 (sha256
557 (base32
558 "0362dhxbzk593walyjz30dll6y2y79wialik647cbwdsf3ad0x6x"))))
559 (build-system python-build-system)
560 (propagated-inputs
561 `(("python-numpy" ,python-numpy)))
562 (native-inputs
563 `(("python-coveralls" ,python-coveralls)
564 ("python-cython" ,python-cython)
565 ("python-pytest-cov" ,python-pytest-cov)))
566 (home-page "https://github.com/Unidata/cftime")
567 (synopsis "Library for time handling")
568 (description
569 "This package provides time-handling functionality that used to be part
570 of the netcdf4 package before.")
571 ;; This package claims to include code under the GPLv3 but is released
572 ;; under ISC.
573 (license (list license:isc license:gpl3+))))
574
575 (define-public python-netcdf4
576 (package
577 (name "python-netcdf4")
578 (version "1.4.2")
579 (source
580 (origin
581 (method url-fetch)
582 (uri (pypi-uri "netCDF4" version))
583 (sha256
584 (base32
585 "0c0sklgrmv15ygliin8qq0hp7vanmbi74m6zpi0r1ksr0hssyd5r"))))
586 (build-system python-build-system)
587 (arguments
588 '(#:phases
589 (modify-phases %standard-phases
590 (add-after 'unpack 'configure-locations
591 (lambda* (#:key inputs #:allow-other-keys)
592 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
593 #t)))))
594 (native-inputs
595 `(("python-cython" ,python-cython)))
596 (propagated-inputs
597 `(("python-numpy" ,python-numpy)
598 ("python-cftime" ,python-cftime)))
599 (inputs
600 `(("netcdf" ,netcdf)
601 ("hdf4" ,hdf4)
602 ("hdf5" ,hdf5)))
603 (home-page "https://github.com/Unidata/netcdf4-python")
604 (synopsis "Python/numpy interface to the netCDF library")
605 (description "Netcdf4-python is a Python interface to the netCDF C
606 library. netCDF version 4 has many features not found in earlier
607 versions of the library and is implemented on top of HDF5. This module
608 can read and write files in both the new netCDF 4 and the old netCDF 3
609 format, and can create files that are readable by HDF5 clients. The
610 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
611 to users of that module.")
612 ;; The software is mainly ISC, but includes some files covered
613 ;; by the Expat license.
614 (license (list license:isc license:expat))))
615
616 (define-public python2-netcdf4
617 (package-with-python2 python-netcdf4))
618
619 (define-public python-license-expression
620 (package
621 (name "python-license-expression")
622 (version "0.999")
623 (source
624 (origin
625 (method url-fetch)
626 (uri (pypi-uri "license-expression" version))
627 (sha256
628 (base32 "08ppb0bxbrsxazy88sgpl9yffvdsabw6dkk1nc332wcz2mphwwyf"))))
629 (build-system python-build-system)
630 (propagated-inputs
631 `(("python-boolean.py" ,python-boolean.py)))
632 (home-page "https://github.com/nexB/license-expression")
633 (synopsis "Apply boolean logic to license expressions")
634 (description
635 "This Python module defines a tiny language to evaluate and compare
636 license expressions using boolean logic. Logical combinations of licenses can
637 be tested for equality, containment, and equivalence. They can be normalised
638 and simplified. It supports SPDX license expressions as well as other naming
639 conventions and aliases in the same expression.")
640 (license license:gpl2+)))
641
642 (define-public python-lockfile
643 (package
644 (name "python-lockfile")
645 (version "0.12.2")
646 (source
647 (origin
648 (method url-fetch)
649 (uri (pypi-uri "lockfile" version))
650 (sha256
651 (base32
652 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
653 (build-system python-build-system)
654 (arguments '(#:test-target "check"))
655 (native-inputs
656 `(("python-pbr" ,python-pbr)))
657 (home-page "https://launchpad.net/pylockfile")
658 (synopsis "Platform-independent file locking module")
659 (description
660 "The lockfile package exports a LockFile class which provides a simple
661 API for locking files.")
662 (license license:expat)))
663
664 (define-public python2-lockfile
665 (package-with-python2 python-lockfile))
666
667 (define-public python-semantic-version
668 (package
669 (name "python-semantic-version")
670 (version "2.6.0")
671 (source
672 (origin
673 (method url-fetch)
674 (uri (pypi-uri "semantic_version" version))
675 (sha256
676 (base32
677 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
678 (build-system python-build-system)
679 (arguments
680 `(#:tests? #f)) ; PyPI tarball lacks tests
681 (home-page "https://github.com/rbarrois/python-semanticversion")
682 (synopsis "Semantic versioning module for Python")
683 (description
684 "The @code{semantic_version} class is a small library for handling
685 @uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
686
687 It can compare versions, generate a new version that represents a bump in one of
688 the version levels, and check whether any given string is a proper semantic
689 version identifier.")
690 (license license:bsd-3)))
691
692 (define-public python2-semantic-version
693 (package-with-python2 python-semantic-version))
694
695 (define-public python-serpent
696 (package
697 (name "python-serpent")
698 (version "1.28")
699 (source
700 (origin
701 (method url-fetch)
702 (uri (pypi-uri "serpent" version))
703 (sha256
704 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
705 (build-system python-build-system)
706 (native-inputs
707 `(("python-attrs" ,python-attrs)
708 ("python-pytz" ,python-pytz)))
709 (home-page "https://github.com/irmen/Serpent")
710 (synopsis "Serializer for literal Python expressions")
711 (description
712 "Serpent provides @code{ast.literal_eval()}-compatible object tree
713 serialization. It serializes an object tree into bytes (an utf-8 encoded
714 string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
715 to rebuild the original object tree.
716
717 Because only safe literals are encoded, it is safe to send serpent data to
718 other machines, such as over the network.")
719 (license license:expat)))
720
721 (define-public python-setuptools
722 (package
723 (name "python-setuptools")
724 (version "41.0.1")
725 (source
726 (origin
727 (method url-fetch)
728 (uri (pypi-uri "setuptools" version ".zip"))
729 (sha256
730 (base32
731 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
732 (modules '((guix build utils)))
733 (snippet
734 '(begin
735 ;; Remove included binaries which are used to build self-extracting
736 ;; installers for Windows.
737 ;; TODO: Find some way to build them ourself so we can include them.
738 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
739 #t))))
740 (build-system python-build-system)
741 ;; FIXME: Tests require pytest, which itself relies on setuptools.
742 ;; One could bootstrap with an internal untested setuptools.
743 (arguments
744 `(#:tests? #f))
745 (home-page "https://pypi.python.org/pypi/setuptools")
746 (synopsis
747 "Library designed to facilitate packaging Python projects")
748 (description
749 "Setuptools is a fully-featured, stable library designed to facilitate
750 packaging Python projects, where packaging includes:
751 Python package and module definitions,
752 distribution package metadata,
753 test hooks,
754 project installation,
755 platform-specific details,
756 Python 3 support.")
757 ;; TODO: setuptools now bundles the following libraries:
758 ;; packaging, pyparsing, six and appdirs. How to unbundle?
759 (license (list license:psfl ; setuptools itself
760 license:expat ; six, appdirs, pyparsing
761 license:asl2.0 ; packaging is dual ASL2/BSD-2
762 license:bsd-2))))
763
764 (define-public python2-setuptools
765 (package-with-python2 python-setuptools))
766
767 ;; The setuptools provided by Python 3.7.4 is too new for Tensorflow.
768 (define-public python-setuptools-for-tensorflow
769 (hidden-package
770 (package
771 (inherit python-setuptools)
772 (version "39.1.0")
773 (source (origin
774 (inherit (package-source python-setuptools))
775 (uri (pypi-uri "setuptools" version ".zip"))
776 (sha256
777 (base32
778 "1mzdhvfhnv4lggxa8rjl0dzqxvfx377gg5sqs57v89wrp09lwj65")))))))
779
780 (define-public python-uniseg
781 (package
782 (name "python-uniseg")
783 (version "0.7.1")
784 (source
785 (origin
786 (method url-fetch)
787 (uri (pypi-uri "uniseg" version ".zip"))
788 (sha256
789 (base32
790 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
791 (build-system python-build-system)
792 (arguments
793 '(#:tests? #f)) ; The test suite requires network access.
794 (native-inputs
795 `(("unzip" ,unzip)))
796 (home-page
797 "https://bitbucket.org/emptypage/uniseg-python")
798 (synopsis
799 "Python library to determine Unicode text segmentations")
800 (description
801 "Uniseg is a Python package used to determine Unicode text segmentations.
802 Supported segmentations include:
803 @enumerate
804 @item @dfn{Code point} (any value in the Unicode codespace)
805 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
806 multiple Unicode code points, e.g. \"G\" + acute-accent)
807 @item Word break
808 @item Sentence break
809 @item Line break
810 @end enumerate")
811 (license license:expat)))
812
813 (define-public python2-uniseg
814 (package-with-python2 python-uniseg))
815
816 (define-public python-humanfriendly
817 (package
818 (name "python-humanfriendly")
819 (version "4.4.1")
820 (source
821 (origin
822 (method url-fetch)
823 (uri (pypi-uri "humanfriendly" version))
824 (sha256
825 (base32
826 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
827 (build-system python-build-system)
828 (arguments
829 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
830 #:tests? #f))
831 (propagated-inputs
832 `(("python-monotonic" ,python-monotonic)))
833 (home-page "https://humanfriendly.readthedocs.io")
834 (synopsis "Human-friendly input and output in Python")
835 (description
836 "The functions and classes in @code{humanfriendly} can be used to make
837 text interfaces more user-friendly. It includes tools to parse and format
838 numbers, file sizes, and timespans, timers for long-running operations, menus
839 to allow the user to choose from a list of options, and terminal interaction
840 helpers.")
841 (license license:expat)))
842
843 (define-public python2-humanfriendly
844 (package-with-python2 python-humanfriendly))
845
846 (define-public python-capturer
847 (package
848 (name "python-capturer")
849 (version "2.4")
850 (source
851 (origin
852 (method url-fetch)
853 (uri (pypi-uri "capturer" version))
854 (sha256
855 (base32
856 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
857 (build-system python-build-system)
858 (arguments
859 `(#:tests? #f))
860 (propagated-inputs
861 `(("python-humanfriendly" ,python-humanfriendly)))
862 (home-page "https://capturer.readthedocs.io")
863 (synopsis "Capture stdout and stderr streams of the current process")
864 (description
865 "The capturer package makes it easy to capture the stdout and stderr
866 streams of the current process and subprocesses. Output can be relayed
867 to the terminal in real time but is also available to the Python program
868 for additional processing.")
869 (license license:expat)))
870
871 (define-public python2-capturer
872 (package-with-python2 python-capturer))
873
874 (define-public python-case
875 (package
876 (name "python-case")
877 (version "1.5.3")
878 (source
879 (origin
880 (method url-fetch)
881 (uri (pypi-uri "case" version))
882 (sha256
883 (base32
884 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
885 (build-system python-build-system)
886 (propagated-inputs
887 `(("python-mock" ,python-mock)
888 ("python-nose" ,python-nose)
889 ("python-six" ,python-six)
890 ("python-unittest2" ,python-unittest2)))
891 (native-inputs
892 `(("python-coverage" ,python-coverage)))
893 (home-page "https://github.com/celery/case")
894 (synopsis "Unittest utilities and convenience methods")
895 (description
896 "The @code{case} package provides utilities on top of unittest, including
897 some helpful Python 2 compatibility convenience methods.")
898 (license license:bsd-3)))
899
900 (define-public python-verboselogs
901 (package
902 (name "python-verboselogs")
903 (version "1.7")
904 (source
905 (origin
906 (method url-fetch)
907 (uri (pypi-uri "verboselogs" version))
908 (sha256
909 (base32
910 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
911 (build-system python-build-system)
912 (native-inputs
913 `(("python-mock" ,python-mock)
914 ("python-astroid" ,python-astroid)
915 ("python-pylint" ,python-pylint)))
916 (home-page "https://verboselogs.readthedocs.io")
917 (synopsis "Verbose logging level for Python's logging module")
918 (description
919 "The @code{verboselogs} package extends Python's @code{logging} module to
920 add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
921 (license license:expat)))
922
923 (define-public python2-verboselogs
924 (package-with-python2 python-verboselogs))
925
926 (define-public python-coloredlogs
927 (package
928 (name "python-coloredlogs")
929 (version "7.3")
930 (source
931 (origin
932 (method url-fetch)
933 (uri (pypi-uri "coloredlogs" version))
934 (sha256
935 (base32
936 "1blcann6dyg5dhps9pg12rn0q0rjrlajpmmil0gy0j4cbvnl2il9"))))
937 (build-system python-build-system)
938 (arguments
939 `(;Tests require some updated modules
940 #:tests? #f))
941 (propagated-inputs
942 `(("python-capturer" ,python-capturer)))
943 (home-page "https://coloredlogs.readthedocs.io")
944 (synopsis "Colored stream handler for Python's logging module")
945 (description
946 "The @code{coloredlogs} package enables colored terminal output for
947 Python's logging module. The @code{ColoredFormatter} class inherits from
948 @code{logging.Formatter} and uses ANSI escape sequences to render your logging
949 messages in color.")
950 (license license:expat)))
951
952 (define-public python2-coloredlogs
953 (package-with-python2 python-coloredlogs))
954
955 (define-public python-editorconfig
956 (package
957 (name "python-editorconfig")
958 (version "0.12.2")
959 (source
960 (origin
961 (method url-fetch)
962 (uri (pypi-uri "EditorConfig" version))
963 (sha256
964 (base32
965 "0v55z351p9qkyp3bbspwywwn28sbcknhirngjbj779n3z52z63hv"))))
966 (build-system python-build-system)
967 (home-page "https://editorconfig.org/")
968 (synopsis "EditorConfig bindings for python")
969 (description "The EditorConfig project consists of a file format for
970 defining coding styles and a collection of text editor plugins that enable
971 editors to read the file format and adhere to defined styles. EditorConfig
972 files are easily readable and they work nicely with version control systems.")
973 ;; "fnmatch.py" and "ini.py" are licensed under psfl, the rest is bsd-2.
974 (license (list license:bsd-2 license:psfl))))
975
976 (define-public python-et-xmlfile
977 (package
978 (name "python-et-xmlfile")
979 (version "1.0.1")
980 (source
981 (origin
982 (method url-fetch)
983 (uri (pypi-uri "et_xmlfile" version))
984 (sha256
985 (base32
986 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
987 (build-system python-build-system)
988 (arguments
989 `(#:phases (modify-phases %standard-phases
990 (replace 'check
991 (lambda _
992 (invoke "pytest"))))))
993 (native-inputs
994 `(("python-pytest" ,python-pytest)
995 ("python-lxml" ,python-lxml))) ;used for the tests
996 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
997 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
998 (description "This Python library is based upon the @code{xmlfile} module
999 from @code{lxml}. It aims to provide a low memory, compatible implementation
1000 of @code{xmlfile}.")
1001 (license license:expat)))
1002
1003 (define-public python2-et-xmlfile
1004 (package-with-python2 python-et-xmlfile))
1005
1006 (define-public python-openpyxl
1007 (package
1008 (name "python-openpyxl")
1009 (version "2.6.2")
1010 (source
1011 (origin
1012 ;; We use the upstream repository, as the tests are not included in the
1013 ;; PyPI releases.
1014 (method hg-fetch)
1015 (uri (hg-reference
1016 (url "https://bitbucket.org/openpyxl/openpyxl")
1017 (changeset version)))
1018 (file-name (string-append name "-" version "-checkout"))
1019 (sha256
1020 (base32 "1qhij6kcvdxqjy4g6193nsv4q7fy8n4fwyd3c2z047idlm6s3j4w"))))
1021 (build-system python-build-system)
1022 (arguments
1023 `(#:phases (modify-phases %standard-phases
1024 (replace 'check
1025 (lambda _
1026 (invoke "pytest"))))))
1027 (native-inputs
1028 ;; For the test suite.
1029 `(("python-lxml" ,python-lxml)
1030 ("python-pillow" ,python-pillow)
1031 ("python-pytest" ,python-pytest)))
1032 (propagated-inputs
1033 `(("python-et-xmlfile" ,python-et-xmlfile)
1034 ("python-jdcal" ,python-jdcal)))
1035 (home-page "https://openpyxl.readthedocs.io")
1036 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
1037 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
1038 XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
1039 standard.")
1040 (license license:expat)))
1041
1042 (define-public python-eventlet
1043 (package
1044 (name "python-eventlet")
1045 (version "0.20.1")
1046 (source
1047 (origin
1048 (method url-fetch)
1049 (uri (pypi-uri "eventlet" version))
1050 (sha256
1051 (base32
1052 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
1053 (build-system python-build-system)
1054 (propagated-inputs
1055 `(("python-greenlet" ,python-greenlet)))
1056 (arguments
1057 ;; TODO: Requires unpackaged 'enum-compat'.
1058 '(#:tests? #f))
1059 (home-page "http://eventlet.net")
1060 (synopsis "Concurrent networking library for Python")
1061 (description
1062 "Eventlet is a concurrent networking library for Python that
1063 allows you to change how you run your code, not how you write it.
1064 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1065 Coroutines ensure that the developer uses a blocking style of programming
1066 that is similar to threading, but provide the benefits of non-blocking I/O.
1067 The event dispatch is implicit, which means you can easily use @code{Eventlet}
1068 from the Python interpreter, or as a small part of a larger application.")
1069 (license license:expat)))
1070
1071 (define-public python2-eventlet
1072 (let ((base (package-with-python2
1073 (strip-python2-variant python-eventlet))))
1074 (package (inherit base)
1075 (propagated-inputs
1076 `(("python2-enum34" ,python2-enum34)
1077 ,@(package-propagated-inputs base))))))
1078
1079 (define-public python-six
1080 (package
1081 (name "python-six")
1082 (version "1.12.0")
1083 (source
1084 (origin
1085 (method url-fetch)
1086 (uri (pypi-uri "six" version))
1087 (sha256
1088 (base32
1089 "0wxs1q74v07ssjywbbm7x6h5v9qx209ld2yfsif4060sxi0h2sni"))))
1090 (build-system python-build-system)
1091 (arguments
1092 `(#:phases
1093 (modify-phases %standard-phases
1094 (replace 'check
1095 (lambda _
1096 (invoke "py.test" "-v"))))))
1097 (native-inputs
1098 `(("python-py" ,python-py)
1099 ("python-pytest" ,python-pytest-bootstrap)))
1100 (home-page "https://pypi.python.org/pypi/six/")
1101 (synopsis "Python 2 and 3 compatibility utilities")
1102 (description
1103 "Six is a Python 2 and 3 compatibility library. It provides utility
1104 functions for smoothing over the differences between the Python versions with
1105 the goal of writing Python code that is compatible on both Python versions.
1106 Six supports every Python version since 2.5. It is contained in only one
1107 Python file, so it can be easily copied into your project.")
1108 (license license:x11)))
1109
1110 (define-public python2-six
1111 (package-with-python2 python-six))
1112
1113 (define-public python-six-bootstrap
1114 (package
1115 (inherit python-six)
1116 (name "python-six-bootstrap")
1117 (native-inputs `())
1118 (arguments `(#:tests? #f))))
1119
1120 (define-public python2-six-bootstrap
1121 (package-with-python2 python-six-bootstrap))
1122
1123 (define-public python-schedule
1124 (package
1125 (name "python-schedule")
1126 (version "0.4.3")
1127 (source
1128 (origin
1129 (method url-fetch)
1130 (uri (pypi-uri "schedule" version))
1131 (sha256
1132 (base32
1133 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1134 (build-system python-build-system)
1135 (native-inputs
1136 `(("python-pytest" ,python-pytest)
1137 ("python-mock" ,python-mock)))
1138 (home-page "https://github.com/dbader/schedule")
1139 (synopsis "Schedule periodic function calls in Python")
1140 (description
1141 "Schedule is an in-process scheduler for periodic jobs that uses the
1142 builder pattern for configuration. Schedule lets you run Python functions (or
1143 any other callable) periodically at pre-determined intervals using a simple,
1144 human-friendly syntax.")
1145 (license license:expat)))
1146
1147 (define-public python2-schedule
1148 (package-with-python2 python-schedule))
1149
1150 (define-public python-pandas
1151 (package
1152 (name "python-pandas")
1153 (version "0.24.2")
1154 (source
1155 (origin
1156 (method url-fetch)
1157 (uri (pypi-uri "pandas" version))
1158 (sha256
1159 (base32 "18imlm8xbhcbwy4wa957a1fkamrcb0z988z006jpfda3ki09z4ag"))))
1160 (build-system python-build-system)
1161 (arguments
1162 `(#:modules ((guix build utils)
1163 (guix build python-build-system)
1164 (ice-9 ftw)
1165 (srfi srfi-26))
1166 #:phases (modify-phases %standard-phases
1167 (add-after 'unpack 'patch-which
1168 (lambda* (#:key inputs #:allow-other-keys)
1169 (let ((which (assoc-ref inputs "which")))
1170 (substitute* "pandas/io/clipboard/__init__.py"
1171 (("^CHECK_CMD = .*")
1172 (string-append "CHECK_CMD = \"" which "\"\n"))))
1173 #t))
1174 (replace 'check
1175 (lambda _
1176 (let ((build-directory
1177 (string-append
1178 (getcwd) "/build/"
1179 (car (scandir "build"
1180 (cut string-prefix? "lib." <>))))))
1181 ;; Disable the "strict data files" option which causes
1182 ;; the build to error out if required data files are
1183 ;; not available (as is the case with PyPI archives).
1184 (substitute* "setup.cfg"
1185 (("addopts = --strict-data-files") "addopts = "))
1186 (with-directory-excursion build-directory
1187 ;; Delete tests that require "moto" which is not yet
1188 ;; in Guix.
1189 (for-each delete-file
1190 '("pandas/tests/io/conftest.py"
1191 "pandas/tests/io/json/test_compression.py"
1192 "pandas/tests/io/parser/test_network.py"
1193 "pandas/tests/io/test_parquet.py"))
1194 (invoke "pytest" "-vv" "pandas" "--skip-slow"
1195 "--skip-network" "-k"
1196 ;; XXX: Due to the deleted tests above.
1197 "not test_read_s3_jsonl"))))))))
1198 (propagated-inputs
1199 `(("python-numpy" ,python-numpy)
1200 ("python-openpyxl" ,python-openpyxl)
1201 ("python-pytz" ,python-pytz)
1202 ("python-dateutil" ,python-dateutil)
1203 ("python-xlrd" ,python-xlrd)))
1204 (inputs
1205 `(("which" ,which)))
1206 (native-inputs
1207 `(("python-cython" ,python-cython)
1208 ("python-beautifulsoup4" ,python-beautifulsoup4)
1209 ("python-lxml" ,python-lxml)
1210 ("python-html5lib" ,python-html5lib)
1211 ("python-nose" ,python-nose)
1212 ("python-pytest" ,python-pytest)
1213 ("python-pytest-mock" ,python-pytest-mock)))
1214 (home-page "https://pandas.pydata.org")
1215 (synopsis "Data structures for data analysis, time series, and statistics")
1216 (description
1217 "Pandas is a Python package providing fast, flexible, and expressive data
1218 structures designed to make working with structured (tabular,
1219 multidimensional, potentially heterogeneous) and time series data both easy
1220 and intuitive. It aims to be the fundamental high-level building block for
1221 doing practical, real world data analysis in Python.")
1222 (license license:bsd-3)))
1223
1224 (define-public python2-pandas
1225 (package-with-python2 python-pandas))
1226
1227 (define-public python2-mechanize
1228 (package
1229 (name "python2-mechanize")
1230 (version "0.2.5")
1231 (source
1232 (origin
1233 (method url-fetch)
1234 (uri (pypi-uri "mechanize" version))
1235 (sha256
1236 (base32
1237 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1238 (build-system python-build-system)
1239 (arguments
1240 `(#:python ,python-2 ; apparently incompatible with Python 3
1241 #:tests? #f))
1242 ;; test fails with message
1243 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1244 ;; (python-3.3.2) or
1245 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1246 ;; (python-2.7.5).
1247 ;; The source code is from March 2011 and probably not up-to-date
1248 ;; with respect to python unit tests.
1249 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1250 (synopsis
1251 "Stateful programmatic web browsing in Python")
1252 (description
1253 "Mechanize implements stateful programmatic web browsing in Python,
1254 after Andy Lester’s Perl module WWW::Mechanize.")
1255 (license (license:non-copyleft
1256 "file://COPYING"
1257 "See COPYING in the distribution."))))
1258
1259
1260 (define-public python-simplejson
1261 (package
1262 (name "python-simplejson")
1263 (version "3.14.0")
1264 (source
1265 (origin
1266 (method url-fetch)
1267 (uri (pypi-uri "simplejson" version))
1268 (sha256
1269 (base32
1270 "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy"))))
1271 (build-system python-build-system)
1272 (home-page "http://simplejson.readthedocs.org/en/latest/")
1273 (synopsis
1274 "Json library for Python")
1275 (description
1276 "JSON (JavaScript Object Notation) is a subset of JavaScript
1277 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1278 format.
1279
1280 Simplejson exposes an API familiar to users of the standard library marshal
1281 and pickle modules. It is the externally maintained version of the json
1282 library contained in Python 2.6, but maintains compatibility with Python 2.5
1283 and (currently) has significant performance advantages, even without using
1284 the optional C extension for speedups. Simplejson is also supported on
1285 Python 3.3+.")
1286 (license license:x11)))
1287
1288 (define-public python2-simplejson
1289 (package-with-python2 python-simplejson))
1290
1291
1292 (define-public python-pyicu
1293 (package
1294 (name "python-pyicu")
1295 (version "2.3.1")
1296 (source
1297 (origin
1298 (method url-fetch)
1299 (uri (pypi-uri "PyICU" version))
1300 (sha256
1301 (base32
1302 "1x4w8m7ifki9z2a187pgjr33z6z0rp2fii9b73djak1vhm9v9cnx"))))
1303 (build-system python-build-system)
1304 (inputs
1305 `(("icu4c" ,icu4c)))
1306 (native-inputs
1307 `(("python-pytest" ,python-pytest)
1308 ("python-six" ,python-six)))
1309 (home-page "https://github.com/ovalhub/pyicu")
1310 (synopsis "Python extension wrapping the ICU C++ API")
1311 (description
1312 "PyICU is a python extension wrapping the ICU C++ API.")
1313 (properties `((python2-variant . ,(delay python2-pyicu))))
1314 (license license:x11)))
1315
1316 (define-public python2-pyicu
1317 (let ((base (package-with-python2
1318 (strip-python2-variant python-pyicu))))
1319 (package
1320 (inherit base)
1321 (arguments
1322 `(,@(package-arguments base)
1323 #:phases
1324 (modify-phases %standard-phases
1325 (add-before 'check 'delete-failing-test
1326 (λ _
1327 ;; XXX: This fails due to Unicode issues unique to Python 2,
1328 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1329 (delete-file "test/test_Script.py")
1330 #t))))))))
1331
1332 (define-public python2-dogtail
1333 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1334 ;; spaces in indentation" with Python 3.
1335 (package
1336 (name "python2-dogtail")
1337 (version "0.9.9")
1338 (source (origin
1339 (method url-fetch)
1340 (uri (pypi-uri "dogtail" version))
1341 (sha256
1342 (base32
1343 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1344 (build-system python-build-system)
1345 (arguments `(#:python ,python-2
1346 #:tests? #f)) ; invalid command "test"
1347 ;; Currently no offical homepage.
1348 (home-page "https://pypi.python.org/pypi/dogtail/")
1349 (synopsis "GUI test tool and automation framework written in Python")
1350 (description
1351 "Dogtail is a GUI test tool and automation framework written in Python.
1352 It uses Accessibility (a11y) technologies to communicate with desktop
1353 applications. dogtail scripts are written in Python and executed like any
1354 other Python program.")
1355 (license license:gpl2+)))
1356
1357 (define-public python-empy
1358 (package
1359 (name "python-empy")
1360 (version "3.3.3")
1361 (source (origin
1362 (method url-fetch)
1363 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1364 version ".tar.gz"))
1365 (sha256
1366 (base32
1367 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
1368 (build-system python-build-system)
1369 (arguments
1370 `(#:tests? #f)) ; python2 only
1371 (home-page "http://www.alcyone.com/software/empy/")
1372 (synopsis "Templating system for Python")
1373 (description
1374 "EmPy is a system for embedding Python expressions and statements in
1375 template text; it takes an EmPy source file, processes it, and produces
1376 output. This is accomplished via expansions, which are special signals to the
1377 EmPy system and are set off by a special prefix (by default the at sign, @@).
1378 EmPy can expand arbitrary Python expressions and statements in this way, as
1379 well as a variety of special forms. Textual data not explicitly delimited in
1380 this way is sent unaffected to the output, allowing Python to be used in
1381 effect as a markup language. Also supported are callbacks via hooks,
1382 recording and playback via diversions, and dynamic, chainable filters. The
1383 system is highly configurable via command line options and embedded
1384 commands.")
1385 (license license:lgpl2.1+)))
1386
1387 (define-public python2-empy
1388 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
1389 (package
1390 (inherit base)
1391 (arguments `(,@(package-arguments base)
1392 #:tests? #t)))))
1393
1394 (define-public python2-element-tree
1395 (package
1396 (name "python2-element-tree")
1397 (version "1.2.6")
1398 (source (origin
1399 (method url-fetch)
1400 (uri (string-append
1401 "http://effbot.org/media/downloads/elementtree-"
1402 version "-20050316.tar.gz"))
1403 (sha256
1404 (base32
1405 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1406 (build-system python-build-system)
1407 (arguments
1408 `(#:python ,python-2 ; seems to be part of Python 3
1409 #:tests? #f)) ; no 'test' sub-command
1410 (synopsis "Toolkit for XML processing in Python")
1411 (description
1412 "ElementTree is a Python library supporting lightweight XML processing.")
1413 (home-page "http://effbot.org/zone/element-index.htm")
1414 (license (license:x11-style
1415 "http://docs.python.org/2/license.html"
1416 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1417
1418 (define-public python2-pybugz
1419 (package
1420 (name "python2-pybugz")
1421 (version "0.6.11")
1422 (source (origin
1423 (method url-fetch)
1424 (uri (string-append
1425 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1426 version ".tar.gz"))
1427 (sha256
1428 (base32
1429 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1430 (patches (search-patches "pybugz-stty.patch"
1431 "pybugz-encode-error.patch"))))
1432 (build-system python-build-system)
1433 (arguments
1434 `(#:python ,python-2 ; SyntaxError with Python 3
1435 #:tests? #f)) ; no 'test' sub-command
1436 (propagated-inputs
1437 `(("element-tree" ,python2-element-tree)))
1438 (synopsis "Python and command-line interface to Bugzilla")
1439 (description
1440 "PyBugz is a Python library and command-line tool to query the Bugzilla
1441 bug tracking system. It is meant as an aid to speed up interaction with the
1442 bug tracker.")
1443 (home-page "http://www.liquidx.net/pybugz/")
1444 (license license:gpl2)))
1445
1446 (define-public python2-enum
1447 (package
1448 (name "python2-enum")
1449 (version "0.4.6")
1450 (source (origin
1451 (method url-fetch)
1452 (uri (pypi-uri "enum" version))
1453 (sha256
1454 (base32
1455 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1456 (build-system python-build-system)
1457 (arguments
1458 `(#:python ,python-2))
1459 (home-page "http://pypi.python.org/pypi/enum/")
1460 (synopsis "Robust enumerated type support in Python")
1461 (description
1462 "This provides a module for robust enumerations in Python. It has
1463 been superseded by the Python standard library and is provided only for
1464 compatibility.")
1465 ;; Choice of either license.
1466 (license (list license:gpl3+ license:psfl))))
1467
1468 (define-public python-enum34
1469 (package
1470 (name "python-enum34")
1471 (version "1.1.6")
1472 (source
1473 (origin
1474 (method url-fetch)
1475 (uri (pypi-uri "enum34" version))
1476 (sha256
1477 (base32
1478 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1479 (build-system python-build-system)
1480 (home-page "https://pypi.python.org/pypi/enum34")
1481 (synopsis "Backported Python 3.4 Enum")
1482 (description
1483 "Enum34 is the new Python stdlib enum module available in Python 3.4
1484 backported for previous versions of Python from 2.4 to 3.3.")
1485 (license license:bsd-3)))
1486
1487 (define-public python2-enum34
1488 (package-with-python2 python-enum34))
1489
1490 (define-public python-parse-type
1491 (package
1492 (name "python-parse-type")
1493 (version "0.4.2")
1494 (source
1495 (origin
1496 (method url-fetch)
1497 (uri (pypi-uri "parse_type" version))
1498 (sha256
1499 (base32
1500 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1501 (build-system python-build-system)
1502 (propagated-inputs
1503 `(("python-six" ,python-six)
1504 ("python-parse" ,python-parse)))
1505 (native-inputs
1506 `(("python-pytest" ,python-pytest)
1507 ("python-pytest-runner" ,python-pytest-runner)))
1508 (home-page "https://github.com/jenisys/parse_type")
1509 (synopsis "Extended parse module")
1510 (description
1511 "Parse_type extends the python parse module.")
1512 (properties
1513 `((python2-variant . ,(delay python2-parse-type))))
1514 (license license:bsd-3)))
1515
1516 (define-public python2-parse-type
1517 (let ((base (package-with-python2
1518 (strip-python2-variant python-parse-type))))
1519 (package (inherit base)
1520 (propagated-inputs
1521 `(("python2-enum34" ,python2-enum34)
1522 ,@(package-propagated-inputs base))))))
1523
1524 (define-public python-parse
1525 (package
1526 (name "python-parse")
1527 (version "1.8.4")
1528 (source
1529 (origin
1530 (method url-fetch)
1531 (uri (pypi-uri "parse" version))
1532 (sha256
1533 (base32
1534 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
1535 (build-system python-build-system)
1536 (arguments
1537 `(#:phases
1538 (modify-phases %standard-phases
1539 (replace 'check
1540 (lambda _ (invoke "python" "test_parse.py"))))))
1541 (home-page "https://github.com/r1chardj0n3s/parse")
1542 (synopsis "Parse strings")
1543 (description
1544 "Parse strings using a specification based on the Python @code{format()}
1545 syntax.")
1546 (license license:x11)))
1547
1548 (define-public python-polib
1549 (package
1550 (name "python-polib")
1551 (version "1.0.8")
1552 (source (origin
1553 (method url-fetch)
1554 (uri (pypi-uri "polib" version))
1555 (sha256
1556 (base32
1557 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1558 (build-system python-build-system)
1559 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1560 (synopsis "Manipulate, create and modify gettext files")
1561 (description "Polib can manipulate any gettext format (po, pot and mo)
1562 files. It can be used to create po files from scratch or to modify
1563 existing ones.")
1564 (license license:expat)))
1565
1566 (define-public python2-polib
1567 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1568 (package
1569 (inherit base)
1570 (arguments `(,@(package-arguments base)
1571 ;; Tests don't work with python2.
1572 #:tests? #f)))))
1573
1574 (define-public scons
1575 (package
1576 (name "scons")
1577 (version "3.0.4")
1578 (source (origin
1579 (method git-fetch)
1580 (uri (git-reference
1581 (url "https://github.com/SCons/scons.git")
1582 (commit version)))
1583 (file-name (git-file-name name version))
1584 (sha256
1585 (base32
1586 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
1587 (build-system python-build-system)
1588 (arguments
1589 `(#:use-setuptools? #f ; still relies on distutils
1590 #:tests? #f ; no 'python setup.py test' command
1591 #:phases
1592 (modify-phases %standard-phases
1593 (add-before 'build 'bootstrap
1594 (lambda _
1595 (substitute* "src/engine/SCons/compat/__init__.py"
1596 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
1597 "sys.modules[new] = __import__(old)"))
1598 (substitute* "src/engine/SCons/Platform/__init__.py"
1599 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
1600 "mod = __import__(full_name)"))
1601 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
1602 (chdir "build/scons")
1603 #t)))))
1604 (home-page "http://scons.org/")
1605 (synopsis "Software construction tool written in Python")
1606 (description
1607 "SCons is a software construction tool. Think of SCons as an improved,
1608 cross-platform substitute for the classic Make utility with integrated
1609 functionality similar to autoconf/automake and compiler caches such as ccache.
1610 In short, SCons is an easier, more reliable and faster way to build
1611 software.")
1612 (license license:x11)))
1613
1614 (define-public scons-python2
1615 (package
1616 (inherit (package-with-python2 scons))
1617 (name "scons-python2")))
1618
1619 (define-public python-extras
1620 (package
1621 (name "python-extras")
1622 (version "1.0.0")
1623 (source
1624 (origin
1625 (method url-fetch)
1626 (uri (pypi-uri "extras" version))
1627 (sha256
1628 (base32
1629 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1630 (build-system python-build-system)
1631 (arguments
1632 ;; FIXME: Circular dependency on testtools.
1633 '(#:tests? #f))
1634 (home-page "https://github.com/testing-cabal/extras")
1635 (synopsis "Useful extensions to the Python standard library")
1636 (description
1637 "Extras is a set of extensions to the Python standard library.")
1638 (license license:expat)))
1639
1640 (define-public python2-extras
1641 (package-with-python2 python-extras))
1642
1643 (define-public python-mimeparse
1644 (package
1645 (name "python-mimeparse")
1646 (version "1.6.0")
1647 (source
1648 (origin
1649 (method url-fetch)
1650 (uri (pypi-uri "python-mimeparse" version))
1651 (sha256
1652 (base32
1653 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
1654 (build-system python-build-system)
1655 (arguments
1656 '(#:phases
1657 (modify-phases %standard-phases
1658 (replace 'check
1659 (lambda _
1660 (invoke "./mimeparse_test.py"))))))
1661 (home-page
1662 "https://github.com/dbtsai/python-mimeparse")
1663 (synopsis "Python library for parsing MIME types")
1664 (description
1665 "Mimeparse provides basic functions for parsing MIME type names and
1666 matching them against a list of media-ranges.")
1667 (license license:expat)))
1668
1669 (define-public python2-mimeparse
1670 (package-with-python2 python-mimeparse))
1671
1672 (define-public python-miniboa
1673 (package
1674 (name "python-miniboa")
1675 (version "1.0.7")
1676 (source
1677 (origin
1678 (method url-fetch)
1679 (uri (pypi-uri "miniboa" version))
1680 (sha256
1681 (base32
1682 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
1683 (build-system python-build-system)
1684 (home-page "https://github.com/shmup/miniboa")
1685 (synopsis "Simple, single-threaded Telnet server")
1686 (description
1687 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
1688 server.")
1689 (license license:asl2.0)))
1690
1691 (define-public python2-miniboa
1692 (package-with-python2 python-miniboa))
1693
1694 (define-public python-pafy
1695 (package
1696 (name "python-pafy")
1697 (version "0.5.3.1")
1698 (source
1699 (origin
1700 (method url-fetch)
1701 (uri (pypi-uri "pafy" version))
1702 (sha256
1703 (base32
1704 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1705 (build-system python-build-system)
1706 (arguments
1707 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1708 (propagated-inputs
1709 ;; Youtube-dl is a python package which is imported in the file
1710 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1711 `(("youtube-dl" ,youtube-dl)))
1712 (home-page "https://np1.github.io/pafy/")
1713 (synopsis "Retrieve YouTube content and metadata")
1714 (description
1715 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1716 (license license:lgpl3+)))
1717
1718 (define-public python2-funcsigs
1719 (package
1720 (name "python2-funcsigs")
1721 (version "1.0.2")
1722 (source (origin
1723 (method url-fetch)
1724 (uri (pypi-uri "funcsigs" version))
1725 (sha256
1726 (base32
1727 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1728 (build-system python-build-system)
1729 (arguments
1730 `(#:python ,python-2))
1731 (native-inputs
1732 `(("python2-unittest2" ,python2-unittest2)))
1733 (home-page "http://funcsigs.readthedocs.org")
1734 (synopsis "Python function signatures from PEP362")
1735 (description
1736 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1737 (license license:asl2.0)))
1738
1739 (define-public python2-funcsigs-bootstrap
1740 (package
1741 (inherit python2-funcsigs)
1742 (name "python2-funcsigs-bootstrap")
1743 (native-inputs `())
1744 (arguments
1745 `(#:tests? #f
1746 ,@(package-arguments python2-funcsigs)))))
1747
1748 (define-public python-py
1749 (package
1750 (name "python-py")
1751 (version "1.8.0")
1752 (source
1753 (origin
1754 (method url-fetch)
1755 (uri (pypi-uri "py" version))
1756 (sha256
1757 (base32
1758 "0lsy1gajva083pzc7csj1cvbmminb7b4l6a0prdzyb3fd829nqyw"))))
1759 (build-system python-build-system)
1760 (arguments
1761 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1762 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1763 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1764 ;; Is this module globally installed?"
1765 '(#:tests? #f))
1766 (native-inputs
1767 `(("python-setuptools-scm" ,python-setuptools-scm)))
1768 (home-page "https://github.com/pytest-dev/py")
1769 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1770 (description
1771 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1772 code introspection, and logging.")
1773 (license license:expat)))
1774
1775 (define-public python2-py
1776 (package-with-python2 python-py))
1777
1778 ;; Recent versions of python-fixtures and python-testrepository need
1779 ;; python-pbr for packaging, which itself needs these two packages for
1780 ;; testing.
1781 ;; To fix this circular dependency, we use a build of python-pbr, based on the
1782 ;; same source, just without any test dependencies and with tests disabled.
1783 ;; python-pbr-minmal is then used to package python-fixtures and
1784 ;; python-testrepository.
1785 ;; Strictly speaking we currently could remove the test-requirements from the
1786 ;; normal python-pbr package (and save this package) since test are disabled
1787 ;; there anyway. But this may change in future.
1788 (define-public python-pbr-minimal
1789 (package
1790 (name "python-pbr-minimal")
1791 (version "3.0.1")
1792 (source
1793 (origin
1794 (method url-fetch)
1795 (uri (pypi-uri "pbr" version))
1796 (sha256
1797 (base32
1798 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
1799 (build-system python-build-system)
1800 (arguments
1801 `(#:tests? #f))
1802 (home-page "http://docs.openstack.org/developer/pbr/")
1803 (synopsis "Minimal build of python-pbr used for bootstrapping")
1804 (description
1805 "Used only for bootstrapping python2-pbr, you should not need this.")
1806 (license license:asl2.0)))
1807
1808 (define-public python2-pbr-minimal
1809 (package-with-python2 python-pbr-minimal))
1810
1811 (define-public python-pbr
1812 (package
1813 (inherit python-pbr-minimal)
1814 (name "python-pbr")
1815 (arguments
1816 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1817 (propagated-inputs
1818 `(("git" ,git))) ;; pbr actually uses the "git" binary.
1819 (native-inputs
1820 `(("python-fixtures" ,python-fixtures-bootstrap)
1821 ;; discover, coverage, hacking, subunit
1822 ("python-mock" ,python-mock)
1823 ("python-six" ,python-six)
1824 ("python-sphinx" ,python-sphinx)
1825 ("python-testrepository" ,python-testrepository-bootstrap)
1826 ("python-testresources" ,python-testresources-bootstrap)
1827 ("python-testscenarios" ,python-testscenarios-bootstrap)
1828 ("python-testtools" ,python-testtools-bootstrap)
1829 ("python-virtualenv" ,python-virtualenv)))
1830 (synopsis "Enhance the default behavior of Python’s setuptools")
1831 (description
1832 "Python Build Reasonableness (PBR) is a library that injects some useful
1833 and sensible default behaviors into your setuptools run. It will set
1834 versions, process requirements files and generate AUTHORS and ChangeLog file
1835 from git information.
1836 ")))
1837
1838 (define-public python2-pbr
1839 (package-with-python2 python-pbr))
1840
1841 (define-public python-pyrsistent
1842 (package
1843 (name "python-pyrsistent")
1844 (version "0.14.11")
1845 (home-page "https://github.com/tobgu/pyrsistent")
1846 (source (origin
1847 (method url-fetch)
1848 (uri (pypi-uri "pyrsistent" version))
1849 (sha256
1850 (base32
1851 "1qkh74bm296mp5g3r11lgsksr6bh4w1bf8pji4nmxdlfj542ga1w"))))
1852 (build-system python-build-system)
1853 (native-inputs
1854 `(("python-hypothesis" ,python-hypothesis)
1855 ("python-pytest" ,python-pytest)
1856 ("python-pytest-runner" ,python-pytest-runner)))
1857 (propagated-inputs
1858 `(("python-six" ,python-six)))
1859 (synopsis "Persistent data structures for Python")
1860 (description
1861 "Pyrsistent is a number of persistent collections (by some referred to as
1862 functional data structures). Persistent in the sense that they are immutable.
1863
1864 All methods on a data structure that would normally mutate it instead return a
1865 new copy of the structure containing the requested updates. The original
1866 structure is left untouched.")
1867 (license license:expat)))
1868
1869 (define-public python2-pyrsistent
1870 (package-with-python2 python-pyrsistent))
1871
1872 (define-public python-exif-read
1873 (package
1874 (name "python-exif-read")
1875 (version "2.1.2")
1876 (source (origin
1877 (method url-fetch)
1878 (uri (pypi-uri "ExifRead" version))
1879 (sha256
1880 (base32
1881 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
1882 (build-system python-build-system)
1883 (arguments `(#:tests? #f)) ; no tests
1884 (home-page "https://github.com/ianare/exif-py")
1885 (synopsis "Python library to extract EXIF data from image files")
1886 (description
1887 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1888 files.")
1889 (license license:bsd-3)))
1890
1891 (define-public python2-exif-read
1892 (package-with-python2 python-exif-read))
1893
1894 (define-public python-pyld
1895 (package
1896 (name "python-pyld")
1897 (version "1.0.3")
1898 (source (origin
1899 (method url-fetch)
1900 (uri (pypi-uri "PyLD" version))
1901 (sha256
1902 (base32
1903 "12i2g6xdj30k7xxcibg3sc5y76snwq8l6n8fy9lyi577kgy0h2pm"))))
1904 (build-system python-build-system)
1905 (home-page "https://github.com/digitalbazaar/pyld")
1906 (synopsis "Python implementation of the JSON-LD specification")
1907 (description
1908 "PyLD is an implementation of the JSON-LD specification.")
1909 (license license:bsd-3)))
1910
1911 (define-public python2-pyld
1912 (package-with-python2 python-pyld))
1913
1914 (define-public python-click
1915 (package
1916 (name "python-click")
1917 (version "7.0")
1918 (source
1919 (origin
1920 (method url-fetch)
1921 (uri (pypi-uri "click" version))
1922 (sha256
1923 (base32
1924 "1mzjixd4vjbjvzb6vylki9w1556a9qmdh35kzmq6cign46av952v"))))
1925 (build-system python-build-system)
1926 (arguments
1927 `(#:phases
1928 (modify-phases %standard-phases
1929 (add-after 'unpack 'fix-paths
1930 (lambda* (#:key inputs #:allow-other-keys)
1931 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
1932 "cross-libc" "libc"))))
1933 (substitute* "click/_unicodefun.py"
1934 (("'locale'")
1935 (string-append "'" glibc "/bin/locale'"))))
1936 #t))
1937 (replace 'check
1938 (lambda _
1939 (invoke "python" "-m" "pytest"))))))
1940 (native-inputs
1941 `(("python-pytest" ,python-pytest)))
1942 (home-page "https://palletsprojects.com/p/click/")
1943 (synopsis "Command line library for Python")
1944 (description
1945 "Click is a Python package for creating command line interfaces in a
1946 composable way with as little code as necessary. Its name stands for
1947 \"Command Line Interface Creation Kit\". It's highly configurable but comes
1948 with sensible defaults out of the box.")
1949 (license license:bsd-3)))
1950
1951 (define-public python2-click
1952 (package-with-python2 python-click))
1953
1954 (define-public python-wheel
1955 (package
1956 (name "python-wheel")
1957 (version "0.32.3")
1958 (source
1959 (origin
1960 (method url-fetch)
1961 (uri (pypi-uri "wheel" version))
1962 (sha256
1963 (base32
1964 "1dhxl1bf18bx9szmqcnxbg6204hp3im8089q3hkwh5jfa6zh75q2"))))
1965 (build-system python-build-system)
1966 (native-inputs
1967 `(("python-jsonschema" ,python-jsonschema)
1968 ("python-pytest-cov" ,python-pytest-cov)))
1969 (home-page "https://bitbucket.org/pypa/wheel/")
1970 (synopsis "Format for built Python packages")
1971 (description
1972 "A wheel is a ZIP-format archive with a specially formatted filename and
1973 the @code{.whl} extension. It is designed to contain all the files for a PEP
1974 376 compatible install in a way that is very close to the on-disk format. Many
1975 packages will be properly installed with only the @code{Unpack} step and the
1976 unpacked archive preserves enough information to @code{Spread} (copy data and
1977 scripts to their final locations) at any later time. Wheel files can be
1978 installed with a newer @code{pip} or with wheel's own command line utility.")
1979 (license license:expat)
1980 (properties `((python2-variant . ,(delay python2-wheel))))))
1981
1982 (define-public python2-wheel
1983 (let ((wheel (package-with-python2
1984 (strip-python2-variant python-wheel))))
1985 (package (inherit wheel)
1986 (native-inputs `(("python2-functools32" ,python2-functools32)
1987 ,@(package-native-inputs wheel))))))
1988
1989 (define-public python-vcversioner
1990 (package
1991 (name "python-vcversioner")
1992 (version "2.16.0.0")
1993 (source
1994 (origin
1995 (method url-fetch)
1996 (uri (pypi-uri "vcversioner" version))
1997 (sha256
1998 (base32
1999 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
2000 (build-system python-build-system)
2001 (synopsis "Python library for version number discovery")
2002 (description "Vcversioner is a Python library that inspects tagging
2003 information in a variety of version control systems in order to discover
2004 version numbers.")
2005 (home-page "https://github.com/habnabit/vcversioner")
2006 (license license:isc)))
2007
2008 (define-public python2-vcversioner
2009 (package-with-python2 python-vcversioner))
2010
2011 (define-public python-jdcal
2012 (package
2013 (name "python-jdcal")
2014 (version "1.4")
2015 (source
2016 (origin
2017 (method url-fetch)
2018 (uri (pypi-uri "jdcal" version))
2019 (sha256
2020 (base32
2021 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
2022 (build-system python-build-system)
2023 (arguments
2024 `(#:phases (modify-phases %standard-phases
2025 (replace 'check
2026 (lambda _
2027 (invoke "pytest"))))))
2028 (native-inputs
2029 `(("python-pytest" ,python-pytest)))
2030 (home-page "https://github.com/phn/jdcal")
2031 (synopsis "Functions to convert between Julian dates Gregorian dates")
2032 (description "This Python library provides functions for converting
2033 between Julian dates and Gregorian dates.")
2034 (license license:bsd-2)))
2035
2036 (define-public python2-jdcal
2037 (package-with-python2 python-jdcal))
2038
2039 (define-public python-jsonschema
2040 (package
2041 (name "python-jsonschema")
2042 (version "3.0.1")
2043 (source (origin
2044 (method url-fetch)
2045 (uri (pypi-uri "jsonschema" version))
2046 (sha256
2047 (base32
2048 "03g20i1xfg4qdlk4475pl4pp7y0h37g1fbgs5qhy678q9xb822hc"))))
2049 (build-system python-build-system)
2050 (arguments
2051 '(#:phases
2052 (modify-phases %standard-phases
2053 (replace 'check
2054 (lambda _
2055 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
2056 (invoke "trial" "jsonschema"))))))
2057 (native-inputs
2058 `(("python-setuptools_scm" ,python-setuptools-scm)
2059 ("python-twisted" ,python-twisted)))
2060 (propagated-inputs
2061 `(("python-attrs" ,python-attrs)
2062 ("python-pyrsistent" ,python-pyrsistent)
2063 ("python-six" ,python-six)))
2064 (home-page "https://github.com/Julian/jsonschema")
2065 (synopsis "Implementation of JSON Schema for Python")
2066 (description
2067 "Jsonschema is an implementation of JSON Schema for Python.")
2068 (license license:expat)
2069 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2070
2071 (define-public python2-jsonschema
2072 (let ((jsonschema (package-with-python2
2073 (strip-python2-variant python-jsonschema))))
2074 (package (inherit jsonschema)
2075 (propagated-inputs
2076 `(("python2-functools32" ,python2-functools32)
2077 ,@(package-propagated-inputs jsonschema))))))
2078
2079 ;; This old version is still required by docker-compose as of 1.24.0.
2080 (define-public python-jsonschema-2.6
2081 (package
2082 (name "python-jsonschema")
2083 (version "2.6.0")
2084 (source (origin
2085 (method url-fetch)
2086 (uri (pypi-uri "jsonschema" version))
2087 (sha256
2088 (base32
2089 "00kf3zmpp9ya4sydffpifn0j0mzm342a2vzh82p6r0vh10cg7xbg"))))
2090 (build-system python-build-system)
2091 (arguments
2092 '(#:phases
2093 (modify-phases %standard-phases
2094 (replace 'check (lambda _ (invoke "nosetests"))))))
2095 (native-inputs
2096 `(("python-nose" ,python-nose)
2097 ("python-vcversioner" ,python-vcversioner)))
2098 (home-page "https://github.com/Julian/jsonschema")
2099 (synopsis "Implementation of JSON Schema for Python")
2100 (description
2101 "Jsonschema is an implementation of JSON Schema for Python.")
2102 (license license:expat)
2103 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2104
2105 (define-public python-schema
2106 (package
2107 (name "python-schema")
2108 (version "0.6.6")
2109 (source
2110 (origin
2111 (method url-fetch)
2112 (uri (pypi-uri "schema" version))
2113 (sha256
2114 (base32
2115 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2116 (build-system python-build-system)
2117 (native-inputs
2118 `(("python-pytest" ,python-pytest)))
2119 (home-page "https://github.com/keleshev/schema")
2120 (synopsis "Simple data validation library")
2121 (description
2122 "@code{python-schema} is a library for validating Python data
2123 structures, such as those obtained from config-files, forms, external
2124 services or command-line parsing, converted from JSON/YAML (or
2125 something else) to Python data-types.")
2126 (license license:psfl)))
2127
2128 (define-public python2-schema
2129 (package-with-python2 python-schema))
2130
2131 (define-public python-schema-0.5
2132 (package (inherit python-schema)
2133 (version "0.5.0")
2134 (source
2135 (origin
2136 (method url-fetch)
2137 (uri (pypi-uri "schema" version))
2138 (sha256
2139 (base32
2140 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2141
2142 (define-public python2-schema-0.5
2143 (package-with-python2 python-schema-0.5))
2144
2145 (define-public python-kitchen
2146 (package
2147 (name "python-kitchen")
2148 (version "1.2.5")
2149 (source
2150 (origin
2151 (method url-fetch)
2152 (uri (pypi-uri "kitchen" version))
2153 (sha256
2154 (base32
2155 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2156 (build-system python-build-system)
2157 (propagated-inputs
2158 `(("python-chardet" ,python-chardet)))
2159 (home-page "https://github.com/fedora-infra/kitchen")
2160 (synopsis "Python API for snippets")
2161 (description "@code{kitchen} module provides a python API for all sorts of
2162 little useful snippets of code that everybody ends up writing for their projects
2163 but never seem big enough to build an independent release. Use kitchen and stop
2164 cutting and pasting that code over and over.")
2165 (license (list license:lgpl2.1+
2166 ;; subprocess.py, test_subprocess.py,
2167 ;; kitchen/pycompat25/defaultdict.py:
2168 license:psfl))))
2169
2170 (define-public python2-kitchen
2171 (package-with-python2 python-kitchen))
2172
2173 (define-public python-unidecode
2174 (package
2175 (name "python-unidecode")
2176 (version "1.1.0")
2177 (source (origin
2178 (method url-fetch)
2179 (uri (pypi-uri "Unidecode" version))
2180 (sha256
2181 (base32
2182 "00pi0czzwvbf7djhkkjyvimj60wqdx0llbddzfnax650g9b8yscc"))))
2183 (build-system python-build-system)
2184 (home-page "https://pypi.python.org/pypi/Unidecode")
2185 (synopsis "ASCII transliterations of Unicode text")
2186 (description
2187 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2188 useful when integrating with legacy code that doesn't support Unicode, or for
2189 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2190 machine identifiers from human-readable Unicode strings that should still be
2191 somewhat intelligible.")
2192 (license license:gpl2+)))
2193
2194 (define-public python2-unidecode
2195 (package-with-python2 python-unidecode))
2196
2197 (define-public python-pyjwt
2198 (package
2199 (name "python-pyjwt")
2200 (version "1.7.1")
2201 (source
2202 (origin
2203 (method url-fetch)
2204 (uri (pypi-uri "PyJWT" version))
2205 (sha256
2206 (base32
2207 "15hflax5qkw1v6nssk1r0wkj83jgghskcmn875m3wgvpzdvajncd"))
2208 (modules '((guix build utils)))
2209 (snippet
2210 '(begin
2211 (for-each delete-file-recursively
2212 (find-files "." "\\.pyc$"))
2213 #t))))
2214 (build-system python-build-system)
2215 (native-inputs
2216 `(("python-pytest" ,python-pytest)
2217 ("python-pytest-cov" ,python-pytest-cov)
2218 ("python-pytest-runner" ,python-pytest-runner)))
2219 (home-page "https://github.com/progrium/pyjwt")
2220 (synopsis "JSON Web Token implementation in Python")
2221 (description
2222 "PyJWT is a JSON Web Token implementation written in Python.")
2223 (license license:expat)))
2224
2225 (define-public python2-pyjwt
2226 (package-with-python2 python-pyjwt))
2227
2228 (define-public python-pykka
2229 (package
2230 (name "python-pykka")
2231 (version "1.2.1")
2232 (source
2233 (origin
2234 (method url-fetch)
2235 (uri (pypi-uri "Pykka" version))
2236 (sha256
2237 (base32
2238 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2239 (build-system python-build-system)
2240 (native-inputs
2241 `(("python-mock" ,python-mock)
2242 ("python-nose" ,python-nose)
2243 ("python-gevent" ,python-gevent)
2244 ("python-eventlet" ,python-eventlet)))
2245 (home-page "https://www.pykka.org/")
2246 (synopsis "Pykka is a Python implementation of the actor model")
2247 (description
2248 "Pykka is a Python implementation of the actor model.
2249 The actor model introduces some simple rules to control the sharing
2250 of state and cooperation between execution units, which makes it
2251 easier to build concurrent applications.")
2252 (license license:asl2.0)))
2253
2254 (define-public python2-pykka
2255 (package-with-python2 python-pykka))
2256
2257 (define-public python-pymsgbox
2258 (package
2259 (name "python-pymsgbox")
2260 (version "1.0.6")
2261 (source
2262 (origin
2263 (method git-fetch)
2264 (uri (git-reference
2265 ;; LICENSE.txt is not present on pypi
2266 (url "https://github.com/asweigart/PyMsgBox")
2267 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
2268 (file-name (git-file-name name version))
2269 (sha256
2270 (base32
2271 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
2272 (arguments
2273 ;; Circular dependency to run tests:
2274 ;; Tests need pyautogui, which depends on pymsgbox.
2275 '(#:tests? #f))
2276 (build-system python-build-system)
2277 (home-page "https://github.com/asweigart/PyMsgBox")
2278 (synopsis "Python module for JavaScript-like message boxes")
2279 (description
2280 "PyMsgBox is a simple, cross-platform, pure Python module for
2281 JavaScript-like message boxes. Types of dialog boxes include:
2282 @enumerate
2283 @item alert
2284 @item confirm
2285 @item prompt
2286 @item password
2287 @end enumerate
2288 ")
2289 (license license:bsd-3)))
2290
2291 (define-public python-pympler
2292 (package
2293 (name "python-pympler")
2294 (home-page "https://pythonhosted.org/Pympler/")
2295 (version "0.7")
2296 (source (origin
2297 (method url-fetch)
2298 (uri (pypi-uri "Pympler" version))
2299 (sha256
2300 (base32
2301 "0ki7bqp1h9l1xc2k1h4vjyzsgs20i8ingvcdhszyi72s28wyf4bs"))))
2302 (build-system python-build-system)
2303 (arguments
2304 `(#:phases (modify-phases %standard-phases
2305 (delete 'check)
2306 (add-after 'install 'check
2307 (lambda* (#:key inputs outputs #:allow-other-keys)
2308 (add-installed-pythonpath inputs outputs)
2309 (invoke "python" "setup.py" "test"))))))
2310 (synopsis "Measure, monitor and analyze memory behavior")
2311 (description
2312 "Pympler is a development tool to measure, monitor and analyze
2313 the memory behavior of Python objects in a running Python application.
2314
2315 By pympling a Python application, detailed insight in the size and the
2316 lifetime of Python objects can be obtained. Undesirable or unexpected
2317 runtime behavior like memory bloat and other @samp{pymples} can easily
2318 be identified.
2319
2320 A web profiling frontend exposes process statistics, garbage
2321 visualisation and class tracker statistics.")
2322 (license license:asl2.0)))
2323
2324 (define-public python2-pympler
2325 (package-with-python2 python-pympler))
2326
2327 (define-public python-itsdangerous
2328 (package
2329 (name "python-itsdangerous")
2330 (version "1.1.0")
2331 (source
2332 (origin
2333 (method url-fetch)
2334 (uri (pypi-uri "itsdangerous" version))
2335 (sha256
2336 (base32
2337 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
2338 (build-system python-build-system)
2339 (home-page "https://palletsprojects.com/p/itsdangerous/")
2340 (synopsis "Python library for passing data to/from untrusted environments")
2341 (description
2342 "Itsdangerous provides various helpers to pass trusted data to untrusted
2343 environments and back.")
2344 (license license:bsd-3)))
2345
2346 (define-public python2-itsdangerous
2347 (package-with-python2 python-itsdangerous))
2348
2349 (define-public python-pyyaml
2350 (package
2351 (name "python-pyyaml")
2352 (version "3.13")
2353 (source
2354 (origin
2355 (method url-fetch)
2356 (uri (pypi-uri "PyYAML" version))
2357 (sha256
2358 (base32
2359 "1gx603g484z46cb74j9rzr6sjlh2vndxayicvlyhxdz98lhhkwry"))))
2360 (build-system python-build-system)
2361 (inputs
2362 `(("libyaml" ,libyaml)))
2363 (home-page "http://pyyaml.org/wiki/PyYAML")
2364 (synopsis "YAML parser and emitter for Python")
2365 (description
2366 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2367 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2368 API, and sensible error messages. PyYAML supports standard YAML tags and
2369 provides Python-specific tags that allow to represent an arbitrary Python
2370 object.")
2371 (license license:expat)))
2372
2373 (define-public python2-pyyaml
2374 (package-with-python2 python-pyyaml))
2375
2376 (define-public python-vine
2377 (package
2378 (name "python-vine")
2379 (version "1.1.4")
2380 (source
2381 (origin
2382 (method url-fetch)
2383 (uri (pypi-uri "vine" version))
2384 (sha256
2385 (base32
2386 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
2387 (build-system python-build-system)
2388 (native-inputs
2389 `(("python-pytest" ,python-pytest)
2390 ("python-case" ,python-case)))
2391 (home-page "https://github.com/celery/vine")
2392 (synopsis "Promises for Python")
2393 (description
2394 "@code{vine} provides a special implementation of promises in that it can
2395 be used both for \"promise of a value\" and lazy evaluation. The biggest
2396 upside for this is that everything in a promise can also be a promise,
2397 e.g. filters, callbacks and errbacks can all be promises.")
2398 (license license:bsd-3)))
2399
2400 (define-public python-virtualenv
2401 (package
2402 (name "python-virtualenv")
2403 (version "16.1.0")
2404 (source
2405 (origin
2406 (method url-fetch)
2407 (uri (pypi-uri "virtualenv" version))
2408 (sha256
2409 (base32
2410 "0242cg3hdq3qdvx5flyrki8lpwlgwf5k45c21ks5049fv7ygm6gq"))))
2411 (build-system python-build-system)
2412 (arguments
2413 `(#:phases
2414 (modify-phases %standard-phases
2415 (add-before 'check 'disable-failing-test
2416 (lambda _
2417 ;; Disable failing test. See upstream bug report
2418 ;; https://github.com/pypa/virtualenv/issues/957
2419 (substitute* "tests/test_virtualenv.py"
2420 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2421 #t)))))
2422 (native-inputs
2423 `(("python-mock" ,python-mock)
2424 ("python-pytest" ,python-pytest)))
2425 (home-page "https://virtualenv.pypa.io/")
2426 (synopsis "Virtual Python environment builder")
2427 (description
2428 "Virtualenv is a tool to create isolated Python environments.")
2429 (license license:expat)))
2430
2431 (define-public python2-virtualenv
2432 (package-with-python2 python-virtualenv))
2433
2434 (define-public python-markupsafe
2435 (package
2436 (name "python-markupsafe")
2437 (version "1.1.1")
2438 (source
2439 (origin
2440 (method url-fetch)
2441 (uri (pypi-uri "MarkupSafe" version))
2442 (sha256
2443 (base32
2444 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
2445 (build-system python-build-system)
2446 (arguments
2447 `(#:modules ((ice-9 ftw)
2448 (srfi srfi-1)
2449 (srfi srfi-26)
2450 (guix build utils)
2451 (guix build python-build-system))
2452 #:phases (modify-phases %standard-phases
2453 (replace 'check
2454 (lambda _
2455 (let ((cwd (getcwd))
2456 (libdir (find (cut string-prefix? "lib." <>)
2457 (scandir "build"))))
2458 (setenv "PYTHONPATH"
2459 (string-append cwd "/build/" libdir ":"
2460 (getenv "PYTHONPATH")))
2461 (invoke "pytest" "-vv")))))))
2462 (native-inputs
2463 `(("python-pytest" ,python-pytest)))
2464 (home-page "https://github.com/mitsuhiko/markupsafe")
2465 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2466 (description
2467 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2468 for Python.")
2469 (license license:bsd-3)))
2470
2471 (define-public python2-markupsafe
2472 (package-with-python2 python-markupsafe))
2473
2474 (define-public python-jinja2
2475 (package
2476 (name "python-jinja2")
2477 (version "2.10.1")
2478 (source
2479 (origin
2480 (method url-fetch)
2481 (uri (pypi-uri "Jinja2" version))
2482 (sha256
2483 (base32
2484 "04shqrs56aj04ipyqykj512rw2l0zfammvj9krawzxz7xc14yp06"))))
2485 (build-system python-build-system)
2486 (propagated-inputs
2487 `(("python-markupsafe" ,python-markupsafe)))
2488 (home-page "http://jinja.pocoo.org/")
2489 (synopsis "Python template engine")
2490 (description
2491 "Jinja2 is a small but fast and easy to use stand-alone template engine
2492 written in pure Python.")
2493 (license license:bsd-3)))
2494
2495 (define-public python2-jinja2
2496 (package-with-python2 python-jinja2))
2497
2498 (define-public python-pystache
2499 (package
2500 (name "python-pystache")
2501 (version "0.5.4")
2502 (source (origin
2503 (method url-fetch)
2504 (uri (pypi-uri "pystache" version))
2505 (sha256
2506 (base32
2507 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2508 (build-system python-build-system)
2509 (arguments
2510 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2511 (home-page "http://defunkt.io/pystache/")
2512 (synopsis "Python logic-less template engine")
2513 (description
2514 "Pystache is a Python implementation of the framework agnostic,
2515 logic-free templating system Mustache.")
2516 (license license:expat)
2517 (properties `((python2-variant . ,(delay python2-pystache))))))
2518
2519 (define-public python2-pystache
2520 (package (inherit (package-with-python2
2521 (strip-python2-variant python-pystache)))
2522 (arguments
2523 `(#:python ,python-2
2524 #:phases
2525 (modify-phases %standard-phases
2526 (replace 'check
2527 (lambda _
2528 (invoke "python" "test_pystache.py"))))))))
2529
2530 (define-public python-joblib
2531 (package
2532 (name "python-joblib")
2533 (version "0.13.0")
2534 (source (origin
2535 (method url-fetch)
2536 (uri (pypi-uri "joblib" version))
2537 (sha256
2538 (base32
2539 "0612nazad8dxmn3xghfrmjax6456l4xy6hn9cngs7vydi14ds7v5"))))
2540 (build-system python-build-system)
2541 (arguments
2542 `(#:phases
2543 (modify-phases %standard-phases
2544 (replace 'check
2545 (lambda _ (invoke "pytest" "-v" "joblib"))))))
2546 (native-inputs
2547 `(("python-pytest" ,python-pytest)))
2548 (home-page "https://joblib.readthedocs.io/")
2549 (synopsis "Using Python functions as pipeline jobs")
2550 (description
2551 "Joblib is a set of tools to provide lightweight pipelining in Python.
2552 In particular, joblib offers: transparent disk-caching of the output values
2553 and lazy re-evaluation (memoize pattern), easy simple parallel computing
2554 logging and tracing of the execution.")
2555 (license license:bsd-3)))
2556
2557 (define-public python2-joblib
2558 (package-with-python2 python-joblib))
2559
2560 (define-public python-daemon
2561 (package
2562 (name "python-daemon")
2563 (version "2.2.3")
2564 (source
2565 (origin
2566 (method url-fetch)
2567 (uri (pypi-uri "python-daemon" version))
2568 (sha256
2569 (base32
2570 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
2571 (build-system python-build-system)
2572 (arguments
2573 `(#:phases
2574 (modify-phases %standard-phases
2575 (add-before 'check 'disable-tests
2576 (lambda _
2577 ;; FIXME: Determine why test fails
2578 (substitute* "test/test_daemon.py"
2579 (("test_detaches_process_context")
2580 "skip_test_detaches_process_context"))
2581 #t)))))
2582 (propagated-inputs
2583 `(("python-lockfile" ,python-lockfile)))
2584 (native-inputs
2585 `(("python-unittest2" ,python-unittest2)
2586 ("python-testtools" ,python-testtools)
2587 ("python-testscenarios" ,python-testscenarios)
2588 ("python-mock" ,python-mock)
2589 ("python-docutils" ,python-docutils)))
2590 (home-page "https://pagure.io/python-daemon/")
2591 (synopsis "Python library for making a Unix daemon process")
2592 (description "Python-daemon is a library that assists a Python program to
2593 turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
2594
2595 This library provides a @code{DaemonContext} class that manages the following
2596 important tasks for becoming a daemon process:
2597 @enumerate
2598 @item Detach the process into its own process group.
2599 @item Set process environment appropriate for running inside a chroot.
2600 @item Renounce suid and sgid privileges.
2601 @item Close all open file descriptors.
2602 @item Change the working directory, uid, gid, and umask.
2603 @item Set appropriate signal handlers.
2604 @item Open new file descriptors for stdin, stdout, and stderr.
2605 @item Manage a specified PID lock file.
2606 @item Register cleanup functions for at-exit processing.
2607 @end enumerate")
2608 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
2609 (license (list license:asl2.0 license:gpl3+))))
2610
2611 (define-public python-docutils
2612 (package
2613 (name "python-docutils")
2614 (version "0.14")
2615 (source
2616 (origin
2617 (method url-fetch)
2618 (uri (pypi-uri "docutils" version))
2619 (sha256
2620 (base32
2621 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
2622 (build-system python-build-system)
2623 (arguments
2624 '(#:tests? #f)) ; no setup.py test command
2625 (home-page "http://docutils.sourceforge.net/")
2626 (synopsis "Python Documentation Utilities")
2627 (description
2628 "Docutils is a modular system for processing documentation into useful
2629 formats, such as HTML, XML, and LaTeX. For input Docutils supports
2630 reStructuredText.")
2631 ;; Most of the source code is public domain, but some source files are
2632 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2633 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2634
2635 (define-public python2-docutils
2636 (package-with-python2 python-docutils))
2637
2638 (define-public python-pygments
2639 (package
2640 (name "python-pygments")
2641 (version "2.4.2")
2642 (source
2643 (origin
2644 (method url-fetch)
2645 (uri (pypi-uri "Pygments" version))
2646 (sha256
2647 (base32
2648 "15v2sqm5g12bqa0c7wikfh9ck2nl97ayizy1hpqhmws5gqalq748"))))
2649 (build-system python-build-system)
2650 (arguments
2651 ;; FIXME: Tests require sphinx, which depends on this.
2652 '(#:tests? #f))
2653 (home-page "http://pygments.org/")
2654 (synopsis "Syntax highlighting")
2655 (description
2656 "Pygments is a syntax highlighting package written in Python.")
2657 (license license:bsd-2)))
2658
2659 (define-public python2-pygments
2660 (package-with-python2 python-pygments))
2661
2662 (define-public python-bumpversion
2663 (package
2664 (name "python-bumpversion")
2665 (version "0.5.3")
2666 (source
2667 (origin
2668 (method url-fetch)
2669 (uri (pypi-uri "bumpversion" version))
2670 (sha256
2671 (base32
2672 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
2673 (build-system python-build-system)
2674 (home-page "https://github.com/peritus/bumpversion")
2675 (synopsis "Tool to bump software version")
2676 (description "This tool provides a command-line interface (CLI) to bump a
2677 software version simply.")
2678 (license license:expat)))
2679
2680 (define-public python-deprecated
2681 (package
2682 (name "python-deprecated")
2683 (version "1.2.5")
2684 (source
2685 (origin
2686 (method git-fetch)
2687 (uri (git-reference
2688 (url "https://github.com/tantale/deprecated.git")
2689 (commit (string-append "v" version))))
2690 (file-name (git-file-name name version))
2691 (sha256
2692 (base32
2693 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
2694 (build-system python-build-system)
2695 (arguments
2696 `(#:phases (modify-phases %standard-phases
2697 (replace 'check
2698 (lambda _
2699 (invoke "pytest"))))))
2700 (propagated-inputs
2701 `(("python-wrapt" ,python-wrapt)))
2702 (native-inputs
2703 `(("python-bumpversion" ,python-bumpversion)
2704 ("python-pytest" ,python-pytest)
2705 ("python-pytest-cov" ,python-pytest-cov)
2706 ("python-sphinx" ,python-sphinx)
2707 ("python-tox" ,python-tox)))
2708 (home-page "https://github.com/tantale/deprecated")
2709 (synopsis "Python decorator to deprecate classes, functions or methods")
2710 (description "The @code{deprecated} decorator provides a convenient way to deprecate
2711 to deprecate classes, functions or methods.")
2712 (license license:expat)))
2713
2714 (define-public python-pygithub
2715 (package
2716 (name "python-pygithub")
2717 (version "1.43.7")
2718 (source
2719 ;; We fetch from the Git repo because there are no tests in the PyPI
2720 ;; archive.
2721 (origin
2722 (method git-fetch)
2723 (uri (git-reference
2724 (url "https://github.com/PyGithub/PyGithub.git")
2725 (commit (string-append "v" version))))
2726 (file-name (git-file-name name version))
2727 (sha256
2728 (base32
2729 "0ww92zz0ja9w6rw83vphmn8rwmcn6abg16j4q7zxjc0rrg2cfj9i"))))
2730 (build-system python-build-system)
2731 (arguments
2732 `(#:phases (modify-phases %standard-phases
2733 ;; Some tests rely on the network.
2734 (add-after 'unpack 'disable-failing-tests
2735 (lambda _
2736 (substitute* "tests/Issue142.py"
2737 (("testDecodeJson") "disabled_testDecodeJson"))
2738 #t))
2739 (add-before 'check 'prepare-for-tests
2740 (lambda _
2741 (for-each (lambda (f)
2742 (chmod f #o666))
2743 (find-files "./tests"))
2744 (system* "python" "-m" "lib2to3" "-w" "-n" "tests")
2745 (setenv "PYTHONPATH"
2746 (string-append "./tests:" (getenv "PYTHONPATH")))
2747 #t)))))
2748 (propagated-inputs
2749 `(("python-deprecated" ,python-deprecated)
2750 ("python-pyjwt" ,python-pyjwt)
2751 ("python-requests" ,python-requests)))
2752 (native-inputs `(("python-httpretty" ,python-httpretty)))
2753 (home-page "https://pygithub.readthedocs.io/en/latest/")
2754 (synopsis "Python library for the GitHub API")
2755 (description "This library allows managing GitHub resources such as
2756 repositories, user profiles, and organizations in your Python applications,
2757 using version 3 of the GitHub application programming interface (API).")
2758 (license license:lgpl3+)))
2759
2760 (define-public python-rellu
2761 (package
2762 (name "python-rellu")
2763 (version "0.7")
2764 (source
2765 (origin
2766 (method url-fetch)
2767 (uri (pypi-uri "rellu" version))
2768 (sha256
2769 (base32
2770 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
2771 (build-system python-build-system)
2772 (propagated-inputs
2773 `(("python-invoke" ,python-invoke)
2774 ("python-pygithub" ,python-pygithub)))
2775 (home-page "https://github.com/robotframework/rellu")
2776 (synopsis "Utilities to create PyPI releases")
2777 (description "This collection of utilities contains tooling and templates
2778 to assist in creating releases on GitHub and publishing them on PyPI. It is
2779 designed to be used by Robot Framework and tools and libraries in its
2780 ecosystem, but can naturally be used also by other projects.")
2781 (license license:asl2.0)))
2782
2783 (define-public python-robotframework
2784 (package
2785 (name "python-robotframework")
2786 (version "3.1.2")
2787 ;; There are no tests in the PyPI archive.
2788 (source
2789 (origin
2790 (method git-fetch)
2791 (uri (git-reference
2792 (url "https://github.com/robotframework/robotframework.git")
2793 (commit (string-append "v" version))))
2794 (file-name (git-file-name name version))
2795 (sha256
2796 (base32 "16gnxy0qinh8fhs0qvhff5z2xh49c3cqgm0d7bfjw120df6x7fym"))
2797 (patches (search-patches
2798 "python-robotframework-honor-source-date-epoch.patch"))))
2799 (build-system python-build-system)
2800 (arguments
2801 `(#:phases (modify-phases %standard-phases
2802 (add-before 'build 'build-and-install-doc
2803 (lambda* (#:key outputs #:allow-other-keys)
2804 (let* ((doc-output (assoc-ref outputs "doc"))
2805 (doc (string-append doc-output "/share/"
2806 ,name "-" ,version "/")))
2807 (invoke "invoke" "library-docs" "all")
2808 (mkdir-p doc)
2809 (copy-recursively "doc/libraries"
2810 (string-append doc "/libraries"))
2811 #t)))
2812 (replace 'check
2813 (lambda _
2814 (invoke "python" "utest/run.py"))))))
2815 (native-inputs
2816 `(("python-invoke" ,python-invoke)
2817 ("python-rellu" ,python-rellu)
2818 ("python:tk" ,python "tk"))) ;used when building the HTML doc
2819 (outputs '("out" "doc"))
2820 (home-page "https://robotframework.org")
2821 (synopsis "Generic automation framework")
2822 (description "Robot Framework is a generic automation framework for
2823 acceptance testing, acceptance test driven development (ATDD), and robotic
2824 process automation (RPA).")
2825 (license license:asl2.0)))
2826
2827 (define-public python-robotframework-lint
2828 ;; There is no properly tagged release; the commit below seems to correspond
2829 ;; to the 0.9 stable release available from PyPI. The tests are not
2830 ;; included in the PyPI archive, so we fetch the sources from the upstream
2831 ;; Git repo.
2832 (let ((commit "e851879bab1f63e4e53b34a4dc8a67ed95102830")
2833 (revision "1"))
2834 (package
2835 (name "python-robotframework-lint")
2836 (version (git-version "0.9.0" revision commit))
2837 (source
2838 (origin
2839 (method git-fetch)
2840 (uri (git-reference
2841 (url "https://github.com/boakley/robotframework-lint.git")
2842 (commit commit)))
2843 (file-name (git-file-name name version))
2844 (sha256
2845 (base32
2846 "1p6fknqg5sb9qz5857ji4a877657vgfjm5v3zn45994parx6ml1m"))))
2847 (build-system python-build-system)
2848 (arguments
2849 `(#:phases
2850 (modify-phases %standard-phases
2851 (replace 'check
2852 (lambda _
2853 (invoke "python" "-m" "robot" "-A"
2854 "tests/conf/default.args" "tests"))))))
2855 (propagated-inputs
2856 `(("python-robotframework" ,python-robotframework)))
2857 (home-page "https://github.com/boakley/robotframework-lint/")
2858 (synopsis "Static analysis tool (linter) for Robot Framework")
2859 (description "This package provides the @code{rflint} command-line
2860 utility, a static analysis tool (linter) for Robot Framework source files.")
2861 (license license:asl2.0))))
2862
2863 (define-public python-robotframework-sshlibrary
2864 (package
2865 (name "python-robotframework-sshlibrary")
2866 (version "3.3.0")
2867 ;; There are no tests in the PyPI archive.
2868 (source
2869 (origin
2870 (method git-fetch)
2871 (uri (git-reference
2872 (url "https://github.com/robotframework/SSHLibrary.git")
2873 (commit (string-append "v" version))))
2874 (file-name (git-file-name name version))
2875 (sha256
2876 (base32
2877 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
2878 (build-system python-build-system)
2879 (arguments
2880 `(#:phases
2881 (modify-phases %standard-phases
2882 (add-before 'build 'build-and-install-doc
2883 (lambda* (#:key outputs #:allow-other-keys)
2884 (let* ((doc-output (assoc-ref outputs "doc"))
2885 (doc (string-append doc-output "/share/"
2886 ,name "-" ,version "/")))
2887 (invoke "chmod" "-R" "+w" "docs")
2888 (invoke "invoke" "kw-docs" "project-docs")
2889 (mkdir-p doc)
2890 (for-each delete-file (find-files "docs" "\\.rst"))
2891 (copy-recursively "docs" doc)
2892 #t)))
2893 (replace 'check
2894 (lambda _
2895 ;; Some tests require an SSH server; we remove them.
2896 (delete-file "utest/test_client_api.py")
2897 (delete-file "utest/test_scp.py")
2898 (invoke "python" "utest/run.py"))))))
2899 (propagated-inputs
2900 `(("python-robotframework" ,python-robotframework)
2901 ("python-paramiko" ,python-paramiko)
2902 ("python-scp" ,python-scp)))
2903 (native-inputs
2904 `(("openssh" ,openssh)
2905 ("which" ,which)
2906 ;; To generate the documentation
2907 ("python-docutils" ,python-docutils)
2908 ("python-invoke" ,python-invoke)
2909 ("python-pygments" ,python-pygments)
2910 ("python-rellu" ,python-rellu)))
2911 (outputs '("out" "doc"))
2912 (home-page "https://github.com/robotframework/SSHLibrary")
2913 (synopsis "Robot Framework library for SSH and SFTP")
2914 (description "SSHLibrary is a Robot Framework library providing support
2915 for SSH and SFTP. It has the following main usages:
2916 @itemize @bullet
2917 @item Executing commands on the remote machine, either blocking or non-blocking.
2918 @item Writing and reading in an interactive shell.
2919 @item Transferring files and directories over SFTP.
2920 @item Ensuring that files and directories exist on the remote machine.
2921 @end itemize")
2922 (license license:asl2.0)))
2923
2924 (define-public python-scp
2925 (package
2926 (name "python-scp")
2927 (version "0.13.2")
2928 (source
2929 (origin
2930 (method url-fetch)
2931 (uri (pypi-uri "scp" version))
2932 (sha256
2933 (base32
2934 "1crlpw9lnn58fs1c1rmh7s7s9y5gkgpgjsqlvg9qa51kq1knx7gg"))))
2935 (build-system python-build-system)
2936 (arguments
2937 '(#:tests? #f)) ;tests require an SSH server
2938 (propagated-inputs
2939 `(("python-paramiko" ,python-paramiko)))
2940 (home-page "https://github.com/jbardin/scp.py")
2941 (synopsis "SCP protocol module for Python and Paramiko")
2942 (description "The scp module extends the Paramiko library to send and
2943 receive files via the SCP1 protocol, as implemented by the OpenSSH
2944 @command{scp} program.")
2945 (license license:gpl2+)))
2946
2947 (define-public python-rst.linker
2948 (package
2949 (name "python-rst.linker")
2950 (version "1.10")
2951 (source
2952 (origin
2953 (method url-fetch)
2954 (uri (pypi-uri "rst.linker" version))
2955 (sha256
2956 (base32
2957 "0iqaacp7pj1s8avs4kc0qg0r7dscywaq37y6l9j14glqdikk0wdj"))))
2958 (build-system python-build-system)
2959 (propagated-inputs
2960 `(("python-dateutil" ,python-dateutil)
2961 ("python-six" ,python-six)))
2962 (native-inputs
2963 `(("python-setuptools-scm" ,python-setuptools-scm)))
2964 ;; Test would require path.py, which would introduce a cyclic dependence.
2965 (arguments `(#:tests? #f))
2966 ;; Note: As of version 1.7 the documentation is not worth building.
2967 (home-page "https://github.com/jaraco/rst.linker")
2968 (synopsis "Sphinx plugin to add links and timestamps")
2969 (description "rst.linker allows to automatically replace text by a
2970 reStructuredText external reference or timestamps. It's primary purpose is to
2971 augment the changelog, but it can be used for other documents, too.")
2972 (license license:expat)))
2973
2974 (define-public python2-rst.linker
2975 (package-with-python2 python-rst.linker))
2976
2977 (define-public python-feedgenerator
2978 (package
2979 (name "python-feedgenerator")
2980 (version "1.9")
2981 (source
2982 (origin
2983 (method url-fetch)
2984 (uri (pypi-uri "feedgenerator" version))
2985 (sha256
2986 (base32
2987 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
2988 (modules '((guix build utils)))
2989 (snippet
2990 '(begin
2991 ;; Remove pre-compiled .pyc files from source.
2992 (for-each delete-file-recursively
2993 (find-files "." "__pycache__" #:directories? #t))
2994 (for-each delete-file (find-files "." "\\.pyc$"))
2995 #t))))
2996 (build-system python-build-system)
2997 (propagated-inputs
2998 `(("python-pytz" ,python-pytz)
2999 ("python-six" ,python-six)))
3000 (home-page "https://github.com/getpelican/feedgenerator")
3001 (synopsis
3002 "Standalone version of Django's Atom/RSS feed generator")
3003 (description
3004 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
3005 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3006 (license license:bsd-3)))
3007
3008 (define-public python2-feedgenerator
3009 (package-with-python2 python-feedgenerator))
3010
3011 (define-public python-toml
3012 (package
3013 (name "python-toml")
3014 (version "0.9.4")
3015 (source
3016 (origin
3017 (method url-fetch)
3018 (uri (pypi-uri "toml" version))
3019 (sha256
3020 (base32
3021 "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf"))))
3022 (build-system python-build-system)
3023 (arguments
3024 `(#:tests? #f)) ;no tests suite in release
3025 (home-page "https://github.com/uiri/toml")
3026 (synopsis "Library for TOML")
3027 (description
3028 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
3029 Language (TOML) configuration files.")
3030 (license license:expat)))
3031
3032 (define-public python-jsonrpc-server
3033 (package
3034 (name "python-jsonrpc-server")
3035 (version "0.1.2")
3036 (source
3037 (origin
3038 (method url-fetch)
3039 (uri (pypi-uri "python-jsonrpc-server" version))
3040 (sha256
3041 (base32
3042 "0m4ykpcdy52x37n1ikysp07j7p8ialcdvvvsrjp3545sn7iiid09"))))
3043 (build-system python-build-system)
3044 (propagated-inputs
3045 `(("python-future" ,python-future)
3046 ("python-mock" ,python-mock)
3047 ("python-pytest" ,python-pytest)))
3048 (home-page
3049 "https://github.com/palantir/python-jsonrpc-server")
3050 (synopsis "JSON RPC 2.0 server library")
3051 (description
3052 "This package provides a JSON RPC 2.0 server library for Python.")
3053 (license license:expat)))
3054
3055 (define-public python-pydocstyle
3056 (package
3057 (name "python-pydocstyle")
3058 (version "3.0.0")
3059 (source
3060 (origin
3061 (method url-fetch)
3062 (uri (pypi-uri "pydocstyle" version))
3063 (sha256
3064 (base32
3065 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
3066 (build-system python-build-system)
3067 (propagated-inputs
3068 `(("python-six" ,python-six)
3069 ("python-snowballstemmer" ,python-snowballstemmer)))
3070 (home-page
3071 "https://github.com/PyCQA/pydocstyle/")
3072 (synopsis "Python docstring style checker")
3073 (description
3074 "This package provides a style checker for the Python Language
3075 Server (PLS).")
3076 (license license:expat)))
3077
3078 ;; XXX: We must use a non-release version since the latest release version
3079 ;; requires python-jedi version < 0.15.
3080 (define-public python-language-server
3081 (let ((commit "c3cab77a85b1de4af1aec1bafea6a7320d6baec5")
3082 (revision "1"))
3083 (package
3084 (name "python-language-server")
3085 (version (git-version "0.28.3" revision commit))
3086 (source
3087 (origin
3088 (method git-fetch)
3089 (uri (git-reference
3090 (url "https://github.com/palantir/python-language-server.git")
3091 (commit commit)))
3092 (sha256
3093 (base32
3094 "1q0xdwgln09sh58j0ryygj92hfgdhwcs57zjvqihya23jr5v0bz4"))))
3095 (build-system python-build-system)
3096 (propagated-inputs
3097 `(("python-pluggy" ,python-pluggy)
3098 ("python-jsonrpc-server" ,python-jsonrpc-server)
3099 ("python-jedi" ,python-jedi)
3100 ("python-yapf" ,python-yapf)
3101 ("python-pyflakes" ,python-pyflakes)
3102 ("python-pydocstyle" ,python-pydocstyle)
3103 ("python-pycodestyle" ,python-pycodestyle)
3104 ("python-mccabe" ,python-mccabe)
3105 ("python-rope" ,python-rope)
3106 ("python-autopep8" ,python-autopep8)
3107 ("python-pylint" ,python-pylint)))
3108 (home-page "https://github.com/palantir/python-language-server")
3109 (synopsis "Python implementation of the Language Server Protocol")
3110 (description
3111 "The Python Language Server (pyls) is an implementation of the Python 3
3112 language specification for the Language Server Protocol (LSP). This tool is
3113 used in text editing environments to provide a complete and integrated
3114 feature-set for programming Python effectively.")
3115 (license license:expat))))
3116
3117 (define-public python-black
3118 (package
3119 (name "python-black")
3120 (version "18.6b4")
3121 (source
3122 (origin
3123 (method url-fetch)
3124 (uri (pypi-uri "black" version))
3125 (sha256
3126 (base32
3127 "0i4sfqgz6w15vd50kbhi7g7rifgqlf8yfr8y78rypd56q64qn592"))))
3128 (build-system python-build-system)
3129 (arguments
3130 `(#:phases
3131 (modify-phases %standard-phases
3132 (add-after 'patch-source-shebangs 'patch-extra-shebangs
3133 (lambda _
3134 (let ((python3 (which "python3")))
3135 (substitute* '("tests/data/fmtonoff.py"
3136 "tests/data/string_prefixes.py"
3137 "tests/data/function.py")
3138 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
3139 (string-append "#!" python3 (if (string? minor-version)
3140 minor-version
3141 ""))))))))))
3142 (propagated-inputs
3143 `(("python-click" ,python-click)
3144 ("python-attrs" ,python-attrs)
3145 ("python-appdirs" ,python-appdirs)
3146 ("python-toml" ,python-toml)))
3147 (home-page "https://github.com/ambv/black")
3148 (synopsis "The uncompromising code formatter")
3149 (description "Black is the uncompromising Python code formatter.")
3150 (license license:expat)))
3151
3152 (define-public python-blinker
3153 (package
3154 (name "python-blinker")
3155 (version "1.4")
3156 (source
3157 (origin
3158 (method url-fetch)
3159 (uri (pypi-uri "blinker" version))
3160 (sha256
3161 (base32
3162 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
3163 (build-system python-build-system)
3164 (home-page "http://pythonhosted.org/blinker/")
3165 (synopsis "Fast, simple object-to-object and broadcast signaling")
3166 (description
3167 "Blinker provides a fast dispatching system that allows any number of
3168 interested parties to subscribe to events, or \"signals\".")
3169 (license license:expat)))
3170
3171 (define-public python2-blinker
3172 (package-with-python2 python-blinker))
3173
3174 (define-public pelican
3175 (package
3176 (name "pelican")
3177 (version "4.0.1")
3178 (source
3179 (origin
3180 (method url-fetch)
3181 (uri (pypi-uri "pelican" version))
3182 (sha256
3183 (base32
3184 "05yda7n6r0ll18fpdjzkzyr0ls8hbb86fnjyb33k9jvv5avah2lr"))))
3185 (build-system python-build-system)
3186 (propagated-inputs
3187 `(("python-feedgenerator" ,python-feedgenerator)
3188 ("python-jinja2" ,python-jinja2)
3189 ("python-pygments" ,python-pygments)
3190 ("python-docutils" ,python-docutils)
3191 ("python-pytz" ,python-pytz)
3192 ("python-blinker" ,python-blinker)
3193 ("python-unidecode" ,python-unidecode)
3194 ("python-six" ,python-six)
3195 ("python-dateutil" ,python-dateutil)
3196 ("python-markdown" ,python-markdown)))
3197 (home-page "https://getpelican.com/")
3198 (arguments
3199 `(;; XXX Requires a lot more packages to do unit tests :P
3200 #:tests? #f
3201 #:phases (modify-phases %standard-phases
3202 (add-before
3203 'install 'adjust-requires
3204 ;; Since feedgenerator is installed from git, it doesn't
3205 ;; conform to the version requirements.
3206 ;;
3207 ;; We *do have* "feedgenerator >= 1.6", but strip off the
3208 ;; version requirement so setuptools doesn't get confused.
3209 (lambda _
3210 (substitute* "setup.py"
3211 (("['\"]feedgenerator.*?['\"]")
3212 "'feedgenerator'")))))))
3213 (synopsis "Python-based static site publishing system")
3214 (description
3215 "Pelican is a tool to generate a static blog from reStructuredText,
3216 Markdown input files, and more. Pelican uses Jinja2 for templating
3217 and is very extensible.")
3218 (license license:agpl3+)))
3219
3220 (define-public mallard-ducktype
3221 (package
3222 (name "mallard-ducktype")
3223 (version "1.0.2")
3224 (source
3225 (origin
3226 (method git-fetch)
3227 ;; git-reference because tests are not included in pypi source tarball
3228 ;; https://issues.guix.gnu.org/issue/36755#2
3229 (uri (git-reference
3230 (url "https://github.com/projectmallard/mallard-ducktype.git")
3231 (commit version)))
3232 (file-name (git-file-name name version))
3233 (sha256
3234 (base32
3235 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
3236 (build-system python-build-system)
3237 (arguments
3238 '(#:phases
3239 (modify-phases %standard-phases
3240 (replace 'check
3241 (lambda _
3242 (with-directory-excursion "tests"
3243 (invoke "sh" "runtests")))))))
3244 (home-page "http://projectmallard.org")
3245 (synopsis "Convert Ducktype to Mallard documentation markup")
3246 (description
3247 "Ducktype is a lightweight syntax that can represent all the semantics
3248 of the Mallard XML documentation system. Ducktype files can be converted to
3249 Mallard using the @command{ducktype} tool. The yelp-tools package
3250 provides additional functionality on the produced Mallard documents.")
3251 (license license:expat)))
3252
3253 (define-public python-scikit-image
3254 (package
3255 (name "python-scikit-image")
3256 (version "0.14.2")
3257 (source
3258 (origin
3259 (method url-fetch)
3260 (uri (pypi-uri "scikit-image" version))
3261 (sha256
3262 (base32 "07qchljkyxvg5nrm12fvszi7pmjk4m01qp0w0z8syxzxxs20pz8s"))))
3263 (build-system python-build-system)
3264 (arguments
3265 ;; TODO: Some tests require running X11 server. Disable them?
3266 '(#:tests? #f))
3267 ;; See DEPENDS.txt for the list of build and run time requiremnts
3268 (propagated-inputs
3269 `(("python-cloudpickle" ,python-cloudpickle)
3270 ("python-dask" ,python-dask)
3271 ("python-matplotlib" ,python-matplotlib)
3272 ("python-networkx" ,python-networkx)
3273 ("python-numpy" ,python-numpy)
3274 ("python-pillow" ,python-pillow)
3275 ("python-pywavelets" ,python-pywavelets)
3276 ("python-scipy" ,python-scipy)
3277 ("python-six" ,python-six)))
3278 (native-inputs
3279 `(("python-cython" ,python-cython)))
3280 (home-page "http://scikit-image.org/")
3281 (synopsis "Image processing in Python")
3282 (description
3283 "Scikit-image is a collection of algorithms for image processing.")
3284 (license license:bsd-3)))
3285
3286 (define-public python2-scikit-image
3287 (package-with-python2 python-scikit-image))
3288
3289 (define-public python-cython
3290 (package
3291 (name "python-cython")
3292 (version "0.29.13")
3293 (source
3294 (origin
3295 (method url-fetch)
3296 (uri (pypi-uri "Cython" version))
3297 (sha256
3298 (base32
3299 "13k37lrcgagwwnzr5bzririsscb793vndj234d475x1h9ad0d7f2"))))
3300 (build-system python-build-system)
3301 ;; we need the full python package and not just the python-wrapper
3302 ;; because we need libpython3.3m.so
3303 (inputs
3304 `(("python" ,python)))
3305 (arguments
3306 `(#:phases
3307 (modify-phases %standard-phases
3308 (add-before 'check 'set-HOME
3309 ;; some tests require access to "$HOME/.cython"
3310 (lambda _ (setenv "HOME" "/tmp") #t))
3311
3312 ;; FIXME: These tests started failing on armhf after the 0.28 update
3313 ;; (commit c69d11c5930), both with an error such as this:
3314 ;; compiling (cpp) and running dictcomp ...
3315 ;; === C/C++ compiler error output: ===
3316 ;; ‘
3317 ;; dictcomp.cpp:5221: confused by earlier errors, bailing out
3318 ;; See <https://hydra.gnu.org/build/2948724> for logs.
3319 ,@(if (target-arm32?)
3320 `((add-before 'check 'disable-failing-tests
3321 (lambda _
3322 (let ((disabled-tests (open-file "tests/bugs.txt" "a")))
3323 (for-each (lambda (test)
3324 (format disabled-tests "~a\n" test))
3325 '("memslice" "dictcomp"))
3326 (close-port disabled-tests)))))
3327 '())
3328
3329 (replace 'check
3330 (lambda _
3331 ;; Disable compiler optimizations to greatly reduce the running
3332 ;; time of the test suite.
3333 (setenv "CFLAGS" "-O0")
3334
3335 (invoke "python" "runtests.py" "-vv"
3336 "-j" (number->string (parallel-job-count))))))))
3337 (home-page "https://cython.org/")
3338 (synopsis "C extensions for Python")
3339 (description "Cython is an optimising static compiler for both the Python
3340 programming language and the extended Cython programming language. It makes
3341 writing C extensions for Python as easy as Python itself.")
3342 (license license:asl2.0)
3343 (properties `((python2-variant . ,(delay python2-cython))))))
3344
3345 (define-public python2-cython
3346 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
3347 (package
3348 (inherit base)
3349 (name "python2-cython")
3350 (inputs
3351 `(("python-2" ,python-2))) ;this is not automatically changed
3352 (arguments
3353 (substitute-keyword-arguments (package-arguments base)
3354 ((#:phases phases)
3355 `(modify-phases ,phases
3356 (add-before 'check 'adjust-test_embed
3357 (lambda _
3358 (substitute* "runtests.py"
3359 ;; test_embed goes great lengths to find the static libpythonX.Y.a
3360 ;; so it can give the right -L flag to GCC when embedding static
3361 ;; builds of Python. It is unaware that the Python "config"
3362 ;; directory (where the static library lives) was renamed in
3363 ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
3364 ;; which works fine, because that is where the shared library is.
3365 ;;
3366 ;; It also appears to be unaware that the Makefile in Demos/embed
3367 ;; already unconditionally pass the static library location to GCC,
3368 ;; after checking sysconfig.get_config_var('LIBPL).
3369 ;;
3370 ;; The effect is that the linker is unable to resolve libexpat
3371 ;; symbols when building for Python 2, because neither the Python 2
3372 ;; shared library nor Expat is available. To fix it, we can either
3373 ;; add Expat as an input and make it visible to the linker, or just
3374 ;; prevent it from overriding the Python shared library location.
3375 ;; The end result is identical, so we take the easy route.
3376 ((" or libname not in os\\.listdir\\(libdir\\)")
3377 ""))
3378 #t)))))))))
3379
3380 ;; The RPython toolchain currently does not support Python 3.
3381 (define-public python2-rpython
3382 (package
3383 (name "python2-rpython")
3384 (version "0.2.1")
3385 (source
3386 (origin
3387 (method url-fetch)
3388 (uri (pypi-uri "rpython" version))
3389 (sha256
3390 (base32
3391 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
3392 (build-system python-build-system)
3393 (arguments `(#:python ,python-2))
3394 (native-inputs
3395 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3396 (home-page "https://rpython.readthedocs.org")
3397 (synopsis "Framework for implementing interpreters and virtual machines")
3398 (description "RPython is a translation and support framework for
3399 producing implementations of dynamic languages, emphasizing a clean separation
3400 between language specification and implementation aspects.")
3401 (license license:expat)))
3402
3403 ;; NOTE: when upgrading numpy please make sure that python-pandas and
3404 ;; python-scipy still build, as these three packages are often used together.
3405 (define-public python-numpy
3406 (package
3407 (name "python-numpy")
3408 (version "1.15.4")
3409 (source
3410 (origin
3411 (method url-fetch)
3412 (uri (string-append
3413 "https://github.com/numpy/numpy/releases/download/v"
3414 version "/numpy-" version ".tar.gz"))
3415 (sha256
3416 (base32
3417 "102vcl2qq4pjbm7a3d67vkkvn4466ngia1d8wi5avqwqh8j0jvkn"))))
3418 (build-system python-build-system)
3419 (inputs
3420 `(("openblas" ,openblas)
3421 ("lapack" ,lapack)))
3422 (native-inputs
3423 `(("python-cython" ,python-cython)
3424 ("python-pytest" ,python-pytest)
3425 ("gfortran" ,gfortran)))
3426 (arguments
3427 `(#:phases
3428 (modify-phases %standard-phases
3429 (add-before 'build 'configure-blas-lapack
3430 (lambda* (#:key inputs #:allow-other-keys)
3431 (call-with-output-file "site.cfg"
3432 (lambda (port)
3433 (format port
3434 "[openblas]
3435 libraries = openblas
3436 library_dirs = ~a/lib
3437 include_dirs = ~a/include
3438
3439 # backslash-n to make emacs happy
3440 \n[lapack]
3441 lapack_libs = lapack
3442 library_dirs = ~a/lib
3443 include_dirs = ~a/include
3444 "
3445 (assoc-ref inputs "openblas")
3446 (assoc-ref inputs "openblas")
3447 (assoc-ref inputs "lapack")
3448 (assoc-ref inputs "lapack"))))
3449 #t))
3450 (add-before 'build 'fix-executable-paths
3451 (lambda* (#:key inputs #:allow-other-keys)
3452 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
3453 ;; instead of /bin/sh.
3454 (substitute* "numpy/distutils/exec_command.py"
3455 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
3456 (string-append match-start (assoc-ref inputs "bash") match-end)))
3457 ;; Use "gcc" executable, not "cc".
3458 (substitute* "numpy/distutils/system_info.py"
3459 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3460 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3461 #t))
3462 ;; Tests can only be run after the library has been installed and not
3463 ;; within the source directory.
3464 (delete 'check)
3465 (add-after 'install 'check
3466 (lambda* (#:key outputs inputs #:allow-other-keys)
3467 ;; Make installed package available for running the tests
3468 (add-installed-pythonpath inputs outputs)
3469 ;; Make sure "f2py" etc is found.
3470 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
3471 ":" (getenv "PATH")))
3472 (with-directory-excursion "/tmp"
3473 (invoke "python" "-c"
3474 "import numpy; numpy.test(verbose=2)")))))))
3475 (home-page "http://www.numpy.org/")
3476 (synopsis "Fundamental package for scientific computing with Python")
3477 (description "NumPy is the fundamental package for scientific computing
3478 with Python. It contains among other things: a powerful N-dimensional array
3479 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3480 and Fortran code, useful linear algebra, Fourier transform, and random number
3481 capabilities.")
3482 (license license:bsd-3)))
3483
3484 (define-public python2-numpy
3485 (package-with-python2 python-numpy))
3486
3487 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
3488 ;; interest only for legacy code going back to NumPy's predecessor
3489 ;; Numeric.
3490 (define-public python2-numpy-1.8
3491 (package (inherit python2-numpy)
3492 (version "1.8.2")
3493 (source
3494 (origin
3495 (method url-fetch)
3496 (uri (string-append
3497 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
3498 (file-name (string-append "python2-numpy-" version ".tar.gz"))
3499 (sha256
3500 (base32
3501 "0sc20gz1b17xnyrkp5frca3ql5qfalpv916hfg2kqxpwr6jg0f1g"))))
3502 (arguments
3503 (substitute-keyword-arguments (package-arguments python2-numpy)
3504 ((#:phases phases)
3505 `(modify-phases ,phases
3506 (replace 'configure-blas-lapack
3507 (lambda* (#:key inputs #:allow-other-keys)
3508 (call-with-output-file "site.cfg"
3509 (lambda (port)
3510 (format port
3511 "[openblas]
3512 libraries = openblas,lapack
3513 library_dirs = ~a/lib:~a/lib
3514 include_dirs = ~a/include:~a/include
3515 "
3516 (assoc-ref inputs "openblas")
3517 (assoc-ref inputs "lapack")
3518 (assoc-ref inputs "openblas")
3519 (assoc-ref inputs "lapack"))))
3520 #t))))))
3521 (native-inputs
3522 `(("python2-nose" ,python2-nose)))
3523 (description "NumPy is the fundamental package for scientific computing
3524 with Python. It contains among other things: a powerful N-dimensional array
3525 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3526 and Fortran code, useful linear algebra, Fourier transform, and random number
3527 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
3528 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
3529 Numeric.")
3530 (license license:bsd-3)))
3531
3532 (define-public python-munch
3533 (package
3534 (name "python-munch")
3535 (version "2.0.4")
3536 (source
3537 (origin
3538 (method url-fetch)
3539 (uri (pypi-uri "munch" version))
3540 (sha256
3541 (base32
3542 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3543 (build-system python-build-system)
3544 (home-page "https://github.com/Infinidat/munch")
3545 (synopsis "Dot-accessible dictionary")
3546 (description "Munch is a dot-accessible dictionary similar to JavaScript
3547 objects.")
3548 (license license:expat)))
3549
3550 (define-public python2-munch
3551 (package-with-python2 python-munch))
3552
3553 (define-public python-colormath
3554 (package
3555 (name "python-colormath")
3556 (version "3.0.0")
3557 (source
3558 (origin
3559 (method url-fetch)
3560 (uri (pypi-uri "colormath" version))
3561 (sha256
3562 (base32
3563 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
3564 (build-system python-build-system)
3565 (propagated-inputs
3566 `(("python-networkx" ,python-networkx)
3567 ("python-numpy" ,python-numpy)))
3568 (home-page "https://github.com/gtaylor/python-colormath")
3569 (synopsis "Color math and conversion library")
3570 (description
3571 "This is a Python library for color math and conversions.")
3572 (license license:bsd-3)))
3573
3574 (define-public python2-colormath
3575 (package-with-python2 python-colormath))
3576
3577 (define-public python-spectra
3578 (package
3579 (name "python-spectra")
3580 (version "0.0.11")
3581 (source
3582 (origin
3583 (method url-fetch)
3584 (uri (pypi-uri "spectra" version))
3585 (sha256
3586 (base32
3587 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
3588 (build-system python-build-system)
3589 (arguments
3590 `(#:phases
3591 (modify-phases %standard-phases
3592 (replace 'check
3593 (lambda _ (invoke "nosetests" "-v"))))))
3594 (propagated-inputs
3595 `(("python-colormath" ,python-colormath)))
3596 (native-inputs
3597 `(("python-nose" ,python-nose)))
3598 (home-page "https://github.com/jsvine/spectra")
3599 (synopsis "Color scales and color conversion")
3600 (description
3601 "This package provides a Python library intended to make color math,
3602 color scales, and color space conversion easy. It has support for:
3603
3604 @enumerate
3605 @item Color scales
3606 @item Color ranges
3607 @item Color blending
3608 @item Brightening/darkening colors
3609 @item Saturating/desaturating colors
3610 @item Conversion to/from multiple color spaces.
3611 @end enumerate\n")
3612 (license license:expat)))
3613
3614 (define-public python2-spectra
3615 (package-with-python2 python-spectra))
3616
3617 (define-public python-numpy-documentation
3618 (package
3619 (name "python-numpy-documentation")
3620 (version (package-version python-numpy))
3621 (source (package-source python-numpy))
3622 (build-system python-build-system)
3623 (native-inputs
3624 `(("python-matplotlib" ,python-matplotlib)
3625 ("python-numpy" ,python-numpy)
3626 ("pkg-config" ,pkg-config)
3627 ("python-sphinx" ,python-sphinx)
3628 ("python-numpydoc" ,python-numpydoc)
3629 ("texlive" ,(texlive-union (list texlive-fonts-cm-super
3630 texlive-fonts-ec
3631 texlive-generic-ifxetex
3632 texlive-generic-pdftex
3633 texlive-amsfonts
3634 texlive-latex-capt-of
3635 texlive-latex-cmap
3636 texlive-latex-environ
3637 texlive-latex-eqparbox
3638 texlive-latex-etoolbox
3639 texlive-latex-expdlist
3640 texlive-latex-fancyhdr
3641 texlive-latex-fancyvrb
3642 texlive-latex-fncychap
3643 texlive-latex-float
3644 texlive-latex-framed
3645 texlive-latex-geometry
3646 texlive-latex-graphics
3647 texlive-latex-hyperref
3648 texlive-latex-mdwtools
3649 texlive-latex-multirow
3650 texlive-latex-needspace
3651 texlive-latex-oberdiek
3652 texlive-latex-parskip
3653 texlive-latex-preview
3654 texlive-latex-tabulary
3655 texlive-latex-threeparttable
3656 texlive-latex-titlesec
3657 texlive-latex-trimspaces
3658 texlive-latex-ucs
3659 texlive-latex-upquote
3660 texlive-latex-url
3661 texlive-latex-varwidth
3662 texlive-latex-wrapfig)))
3663 ("texinfo" ,texinfo)
3664 ("perl" ,perl)
3665 ("scipy-sphinx-theme"
3666 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3667 (method git-fetch)
3668 (uri (git-reference
3669 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3670 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3671 (sha256
3672 (base32
3673 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3674 ,@(package-native-inputs python-numpy)))
3675 (arguments
3676 `(#:tests? #f ; we're only generating the documentation
3677 #:phases
3678 (modify-phases %standard-phases
3679 (delete 'build)
3680 (replace 'install
3681 (lambda* (#:key inputs outputs #:allow-other-keys)
3682 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3683 (doc (string-append
3684 data "/doc/" ,name "-"
3685 ,(package-version python-numpy)))
3686 (info-reader (string-append data "/info"))
3687 (html (string-append doc "/html"))
3688 (scipy-sphinx-theme "scipy-sphinx-theme")
3689 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3690 (pyver ,(string-append "PYVER=")))
3691
3692 ;; FIXME: this is needed to for texlive-union to generate
3693 ;; fonts, which are not found.
3694 (setenv "HOME" "/tmp")
3695
3696 (with-directory-excursion "doc"
3697 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3698 (mkdir-p html)
3699 (invoke "make" "html" pyver)
3700 (invoke "make" "latex" "PAPER=a4" pyver)
3701 (invoke "make" "-C" "build/latex"
3702 "all-pdf" "PAPER=a4" pyver)
3703 ;; FIXME: Generation of the info file fails.
3704 ;; (invoke "make" "info" pyver)
3705 ;; (mkdir-p info)
3706 ;; (copy-file "build/texinfo/numpy.info"
3707 ;; (string-append info "/numpy.info"))
3708 (for-each (lambda (file)
3709 (copy-file (string-append "build/latex" file)
3710 (string-append doc file)))
3711 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3712 (with-directory-excursion "build/html"
3713 (for-each (lambda (file)
3714 (let* ((dir (dirname file))
3715 (tgt-dir (string-append html "/" dir)))
3716 (unless (equal? "." dir)
3717 (mkdir-p tgt-dir))
3718 (install-file file html)))
3719 (find-files "." ".*")))))
3720 #t)))))
3721 (home-page (package-home-page python-numpy))
3722 (synopsis "Documentation for the python-numpy package")
3723 (description (package-description python-numpy))
3724 (license (package-license python-numpy))))
3725
3726 (define-public python2-numpy-documentation
3727 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3728 (package
3729 (inherit numpy-documentation)
3730 (native-inputs `(("python2-functools32" ,python2-functools32)
3731 ,@(package-native-inputs numpy-documentation))))))
3732
3733 (define-public python-pygit2
3734 (package
3735 (name "python-pygit2")
3736 (version "0.28.2")
3737 (source
3738 (origin
3739 (method url-fetch)
3740 (uri (pypi-uri "pygit2" version))
3741 (sha256
3742 (base32 "11kzj5mjkspvplnpdb6bj8dcj6rgmkk986k8hjcklyg5yaxkz32d"))))
3743 (build-system python-build-system)
3744 (arguments
3745 '(#:tests? #f)) ; tests don't run correctly in our environment
3746 (propagated-inputs
3747 `(("python-six" ,python-six)
3748 ("python-cffi" ,python-cffi)
3749 ("libgit2" ,libgit2)
3750 ("python-tox" ,python-tox)))
3751 (native-inputs
3752 `(("python-pytest" ,python-pytest)))
3753 (home-page "https://github.com/libgit2/pygit2")
3754 (synopsis "Python bindings for libgit2")
3755 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3756 library, libgit2 implements Git plumbing.")
3757 ;; GPL2.0 only, with linking exception.
3758 (license license:gpl2)))
3759
3760 (define-public python2-pygit2
3761 (package-with-python2 python-pygit2))
3762
3763 (define-public python-pyparsing
3764 (package
3765 (name "python-pyparsing")
3766 (version "2.3.1")
3767 (source
3768 (origin
3769 (method url-fetch)
3770 (uri (pypi-uri "pyparsing" version))
3771 (sha256
3772 (base32 "0yk6xl885b91dmlhlsap7x78hk2rdr879fln9anbq6k4ca42djb6"))))
3773 (build-system python-build-system)
3774 (outputs '("out" "doc"))
3775 (arguments
3776 `(#:tests? #f ; no test target
3777 #:phases
3778 (modify-phases %standard-phases
3779 (add-after 'install 'install-doc
3780 (lambda* (#:key outputs #:allow-other-keys)
3781 (let* ((doc (string-append (assoc-ref outputs "doc")
3782 "/share/doc/" ,name "-" ,version))
3783 (html-doc (string-append doc "/html"))
3784 (examples (string-append doc "/examples")))
3785 (mkdir-p html-doc)
3786 (mkdir-p examples)
3787 (for-each
3788 (lambda (dir tgt)
3789 (map (lambda (file)
3790 (install-file file tgt))
3791 (find-files dir ".*")))
3792 (list "docs" "htmldoc" "examples")
3793 (list doc html-doc examples))
3794 #t))))))
3795 (home-page "https://github.com/pyparsing/pyparsing")
3796 (synopsis "Python parsing class library")
3797 (description
3798 "The pyparsing module is an alternative approach to creating and
3799 executing simple grammars, vs. the traditional lex/yacc approach, or the use
3800 of regular expressions. The pyparsing module provides a library of classes
3801 that client code uses to construct the grammar directly in Python code.")
3802 (license license:expat)))
3803
3804 (define-public python2-pyparsing
3805 (package-with-python2 python-pyparsing))
3806
3807 (define-public python-numpydoc
3808 (package
3809 (name "python-numpydoc")
3810 (version "0.8.0")
3811 (source
3812 (origin
3813 (method url-fetch)
3814 (uri (pypi-uri "numpydoc" version))
3815 (sha256
3816 (base32
3817 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
3818 (build-system python-build-system)
3819 (propagated-inputs
3820 `(("python-sphinx" ,python-sphinx)))
3821 (native-inputs
3822 `(("python-nose" ,python-nose)))
3823 (home-page "https://pypi.python.org/pypi/numpydoc")
3824 (synopsis
3825 "Numpy's Sphinx extensions")
3826 (description
3827 "Sphinx extension to support docstrings in Numpy format.")
3828 (license license:bsd-2)))
3829
3830 (define-public python2-numpydoc
3831 (package-with-python2 python-numpydoc))
3832
3833 (define-public python-numexpr
3834 (package
3835 (name "python-numexpr")
3836 (version "2.6.5")
3837 (source
3838 (origin
3839 (method url-fetch)
3840 (uri (pypi-uri "numexpr" version))
3841 (sha256
3842 (base32
3843 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3844 (build-system python-build-system)
3845 (arguments `(#:tests? #f)) ; no tests included
3846 (propagated-inputs
3847 `(("python-numpy" ,python-numpy)))
3848 (home-page "https://github.com/pydata/numexpr")
3849 (synopsis "Fast numerical expression evaluator for NumPy")
3850 (description
3851 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3852 expressions that operate on arrays are accelerated and use less memory than
3853 doing the same calculation in Python. In addition, its multi-threaded
3854 capabilities can make use of all your cores, which may accelerate
3855 computations, most specially if they are not memory-bounded (e.g. those using
3856 transcendental functions).")
3857 (license license:expat)))
3858
3859 (define-public python2-numexpr
3860 (package-with-python2 python-numexpr))
3861
3862 (define-public python-cycler
3863 (package
3864 (name "python-cycler")
3865 (version "0.10.0")
3866 (source (origin
3867 (method url-fetch)
3868 (uri (pypi-uri "cycler" version))
3869 (sha256
3870 (base32
3871 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3872 (build-system python-build-system)
3873 (arguments
3874 ;; XXX: The current version requires 'coveralls' which we don't have.
3875 ;; Enable this for the next release which uses 'python-pytest'.
3876 '(#:tests? #f))
3877 (propagated-inputs
3878 `(("python-six" ,python-six)))
3879 (home-page "http://matplotlib.org/cycler/")
3880 (synopsis "Composable keyword argument iterator")
3881 (description
3882 "When using @code{matplotlib} and plotting more than one line, it is
3883 common to want to be able to want to be able to cycle over one or more artist
3884 styles; but the plotting logic can quickly become involved.
3885 To address this and enable easy cycling over arbitrary @code{kwargs}, the
3886 @code{Cycler} class was developed.")
3887 (license license:bsd-3)))
3888
3889 (define-public python2-cycler
3890 (package-with-python2 python-cycler))
3891
3892 (define-public python-colorspacious
3893 (package
3894 (name "python-colorspacious")
3895 (version "1.1.0")
3896 (source
3897 (origin
3898 (method git-fetch)
3899 (uri (git-reference
3900 (url "https://github.com/njsmith/colorspacious.git")
3901 (commit (string-append "v" version))))
3902 (file-name (git-file-name name version))
3903 (sha256
3904 (base32 "0g0lxqiscy5g5rq9421vv7abg0c90jzy0zmas2z3hya6k2dr5aid"))))
3905 (build-system python-build-system)
3906 (propagated-inputs
3907 `(("python-numpy" ,python-numpy)))
3908 (native-inputs
3909 `(("python-nose" ,python-nose)))
3910 (arguments
3911 `(#:phases
3912 (modify-phases %standard-phases
3913 (replace 'check
3914 (lambda _
3915 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
3916 (home-page "https://github.com/njsmith/colorspacious")
3917 (synopsis "Python library for colorspace conversions")
3918 (description "@code{colorspacious} is a Python library that lets you
3919 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3920 (license license:expat)))
3921
3922 (define-public python2-colorspacious
3923 (package-with-python2 python-colorspacious))
3924
3925 (define-public python-matplotlib
3926 (package
3927 (name "python-matplotlib")
3928 (version "3.1.1")
3929 (source
3930 (origin
3931 (method url-fetch)
3932 (uri (pypi-uri "matplotlib" version))
3933 (sha256
3934 (base32
3935 "14qc109dibp32xfd9lah54djc0rc76fhbsj9cwyb328lzqmd5sqz"))))
3936 (build-system python-build-system)
3937 (propagated-inputs ; the following packages are all needed at run time
3938 `(("python-cycler" ,python-cycler)
3939 ("python-kiwisolver" ,python-kiwisolver)
3940 ("python-pyparsing" ,python-pyparsing)
3941 ("python-pygobject" ,python-pygobject)
3942 ("gobject-introspection" ,gobject-introspection)
3943 ("python-tkinter" ,python "tk")
3944 ("python-dateutil" ,python-dateutil)
3945 ("python-numpy" ,python-numpy)
3946 ("python-pillow" ,python-pillow)
3947 ("python-pytz" ,python-pytz)
3948 ("python-six" ,python-six)
3949 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3950 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3951 ;; object. For this reason we need to import both libraries.
3952 ;; https://cairocffi.readthedocs.io/en/stable/cffi_api.html#converting-pycairo-wrappers-to-cairocffi
3953 ("python-pycairo" ,python-pycairo)
3954 ("python-cairocffi" ,python-cairocffi)))
3955 (inputs
3956 `(("libpng" ,libpng)
3957 ("imagemagick" ,imagemagick)
3958 ("freetype" ,freetype)
3959 ("cairo" ,cairo)
3960 ("glib" ,glib)
3961 ;; FIXME: Add backends when available.
3962 ;("python-wxpython" ,python-wxpython)
3963 ("tcl" ,tcl)
3964 ("tk" ,tk)))
3965 (native-inputs
3966 `(("pkg-config" ,pkg-config)
3967 ("python-pytest" ,python-pytest)
3968 ("python-mock" ,python-mock)
3969 ("unzip" ,unzip)
3970 ("jquery-ui"
3971 ,(origin
3972 (method url-fetch)
3973 (uri "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip")
3974 (sha256
3975 (base32
3976 "0kb21xf38diqgxcdi1z3s9ssq36pldvyqxy56hn6pcva6rs3c8zq"))))))
3977 (arguments
3978 `(#:phases
3979 (modify-phases %standard-phases
3980 ;; XXX We disable all image comparison tests because we're using a
3981 ;; newer version of FreeType than matplotlib expects. This leads to
3982 ;; minor differences throughout the tests.
3983 (add-after 'unpack 'fix-and-disable-failing-tests
3984 (lambda _
3985 (substitute* (append (find-files "lib/matplotlib/tests/"
3986 "test_.*\\.py$")
3987 (find-files "lib/mpl_toolkits/tests"
3988 "test_.*\\.py$"))
3989 (("^from matplotlib" match)
3990 (string-append "import pytest\n" match))
3991 (("( *)@image_comparison" match indent)
3992 (string-append indent
3993 "@pytest.mark.skip(reason=\"unknown minor image differences\")\n"
3994 match)))
3995 (substitute* "lib/matplotlib/tests/test_animation.py"
3996 (("/bin/sh") (which "sh")))
3997 (for-each delete-file
3998 ;; test_normal_axes, test_get_tightbbox_polar
3999 '("lib/matplotlib/tests/test_axes.py"
4000 ;; test_outward_ticks
4001 "lib/matplotlib/tests/test_tightlayout.py"
4002 ;; Fontconfig returns no fonts.
4003 "lib/matplotlib/tests/test_font_manager.py"))
4004 #t))
4005 (add-before 'install 'install-jquery-ui
4006 (lambda* (#:key outputs inputs #:allow-other-keys)
4007 (let ((dir (string-append (assoc-ref outputs "out")
4008 "/lib/python3.7/site-packages/matplotlib/backends/web_backend/")))
4009 (mkdir-p dir)
4010 (invoke "unzip"
4011 (assoc-ref inputs "jquery-ui")
4012 "-d" dir))
4013 #t))
4014 (delete 'check)
4015 (add-after 'install 'check
4016 (lambda* (#:key outputs inputs #:allow-other-keys)
4017 (add-installed-pythonpath inputs outputs)
4018 (invoke "python" "tests.py" "-v"
4019 "-m" "not network")))
4020 (add-before 'build 'configure-environment
4021 (lambda* (#:key outputs inputs #:allow-other-keys)
4022 (let ((cairo (assoc-ref inputs "cairo")))
4023 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
4024 ;; has not effect.
4025 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
4026 (setenv "HOME" (getcwd))
4027 (call-with-output-file "setup.cfg"
4028 (lambda (port)
4029 (format port "[directories]~%
4030 basedirlist = ~a,~a~%
4031 [packages]~%
4032 tests = True~%"
4033 (assoc-ref inputs "tcl")
4034 (assoc-ref inputs "tk")))))
4035 #t)))))
4036 (home-page "https://matplotlib.org/")
4037 (synopsis "2D plotting library for Python")
4038 (description
4039 "Matplotlib is a Python 2D plotting library which produces publication
4040 quality figures in a variety of hardcopy formats and interactive environments
4041 across platforms. Matplotlib can be used in Python scripts, the python and
4042 ipython shell, web application servers, and six graphical user interface
4043 toolkits.")
4044 (license license:psfl)
4045 (properties `((python2-variant . ,(delay python2-matplotlib))))))
4046
4047 (define-public python2-matplotlib
4048 (let ((matplotlib (package-with-python2
4049 (strip-python2-variant python-matplotlib))))
4050 (package (inherit matplotlib)
4051 (version "2.2.4")
4052 (source
4053 (origin
4054 (method url-fetch)
4055 (uri (pypi-uri "matplotlib" version))
4056 (sha256
4057 (base32
4058 "09i1gnrra1590brc1f8d5rh2zvnknmfgzp613ab0462qkrwj15h2"))))
4059 (arguments
4060 (substitute-keyword-arguments (package-arguments matplotlib)
4061 ((#:phases phases)
4062 `(modify-phases ,phases
4063 (replace 'install-jquery-ui
4064 (lambda* (#:key outputs inputs #:allow-other-keys)
4065 (let ((dir (string-append (assoc-ref outputs "out")
4066 "/lib/python2.7/site-packages/"
4067 "matplotlib/backends/web_backend/")))
4068 (mkdir-p dir)
4069 (invoke "unzip"
4070 (assoc-ref inputs "jquery-ui")
4071 "-d" dir))
4072 #t))
4073 (delete 'check))))) ; These tests weren't run the the past.
4074 ;; Make sure to use special packages for Python 2 instead
4075 ;; of those automatically rewritten by package-with-python2.
4076 (propagated-inputs
4077 `(("python2-pycairo" ,python2-pycairo)
4078 ("python2-backports-functools-lru-cache"
4079 ,python2-backports-functools-lru-cache)
4080 ("python2-functools32" ,python2-functools32)
4081 ("python2-pygobject-2" ,python2-pygobject-2)
4082 ("python2-subprocess32" ,python2-subprocess32)
4083 ("python2-tkinter" ,python-2 "tk")
4084 ,@(fold alist-delete (package-propagated-inputs matplotlib)
4085 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
4086
4087 (define-public python-matplotlib-documentation
4088 (package
4089 (name "python-matplotlib-documentation")
4090 (version (package-version python-matplotlib))
4091 (source (package-source python-matplotlib))
4092 (build-system python-build-system)
4093 (native-inputs
4094 `(("python-matplotlib" ,python-matplotlib)
4095 ("python-colorspacious" ,python-colorspacious)
4096 ("python-sphinx" ,python-sphinx)
4097 ("python-sphinx-copybutton" ,python-sphinx-copybutton)
4098 ("python-sphinx-gallery" ,python-sphinx-gallery)
4099 ("python-numpydoc" ,python-numpydoc)
4100 ("python-ipython" ,python-ipython)
4101 ("python-ipykernel" ,python-ipykernel)
4102 ("python-mock" ,python-mock)
4103 ("graphviz" ,graphviz)
4104 ("texlive" ,(texlive-union (list texlive-amsfonts
4105 texlive-latex-amsmath
4106 texlive-latex-enumitem
4107 texlive-latex-expdlist
4108 texlive-latex-geometry
4109 texlive-latex-preview
4110 texlive-latex-type1cm
4111 texlive-latex-ucs
4112
4113 texlive-generic-pdftex
4114
4115 texlive-fonts-ec
4116 texlive-fonts-adobe-times
4117 texlive-fonts-txfonts)))
4118 ("texinfo" ,texinfo)
4119 ,@(package-native-inputs python-matplotlib)))
4120 (arguments
4121 `(#:tests? #f ; we're only generating documentation
4122 #:phases
4123 (modify-phases %standard-phases
4124 ;; The tests in python-matplotlib are run after the install phase, so
4125 ;; we need to delete the extra phase here.
4126 (delete 'check)
4127 (replace 'build
4128 (lambda _
4129 (chdir "doc")
4130 (setenv "PYTHONPATH"
4131 (string-append (getenv "PYTHONPATH")
4132 ":" (getcwd) "/../examples/units"))
4133 (substitute* "conf.py"
4134 ;; Don't use git.
4135 (("^SHA = check_output.*")
4136 (string-append "SHA = \"" ,version "\"\n"))
4137 ;; Don't fetch intersphinx files from the Internet
4138 (("^explicit_order_folders" m)
4139 (string-append "intersphinx_mapping = {}\n" m))
4140 (("'sphinx.ext.intersphinx',") "")
4141 ;; Disable URL embedding which requires internet access.
4142 (("'https://docs.scipy.org/doc/numpy'") "None")
4143 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
4144 (invoke "make"
4145 "SPHINXBUILD=sphinx-build"
4146 "SPHINXOPTS=" ; don't abort on warnings
4147 "html" "texinfo")))
4148 (replace 'install
4149 (lambda* (#:key inputs outputs #:allow-other-keys)
4150 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4151 (doc (string-append data "/doc/python-matplotlib-" ,version))
4152 (info (string-append data "/info"))
4153 (html (string-append doc "/html")))
4154 (mkdir-p html)
4155 (mkdir-p info)
4156 (copy-recursively "build/html" html)
4157 (symlink (string-append html "/_images")
4158 (string-append info "/matplotlib-figures"))
4159 (with-directory-excursion "build/texinfo"
4160 (substitute* "matplotlib.texi"
4161 (("@image\\{([^,]*)" all file)
4162 (string-append "@image{matplotlib-figures/" file)))
4163 (symlink (string-append html "/_images")
4164 "./matplotlib-figures")
4165 (invoke "makeinfo" "--no-split"
4166 "-o" "matplotlib.info" "matplotlib.texi"))
4167 (install-file "build/texinfo/matplotlib.info" info))
4168 #t)))))
4169 (home-page (package-home-page python-matplotlib))
4170 (synopsis "Documentation for the python-matplotlib package")
4171 (description (package-description python-matplotlib))
4172 (license (package-license python-matplotlib))))
4173
4174 (define-public python2-matplotlib-documentation
4175 (let ((parent (package-with-python2 python-matplotlib-documentation)))
4176 (package
4177 (inherit parent)
4178 (native-inputs
4179 (alist-delete "python-sphinx-copybutton"
4180 (package-native-inputs parent))))))
4181
4182 (define-public python-matplotlib-venn
4183 (package
4184 (name "python-matplotlib-venn")
4185 (version "0.11.5")
4186 (source
4187 (origin
4188 (method url-fetch)
4189 (uri (pypi-uri "matplotlib-venn" version ".zip"))
4190 (sha256
4191 (base32
4192 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
4193 (build-system python-build-system)
4194 (arguments '(#:tests? #f)) ; tests are not included
4195 (propagated-inputs
4196 `(("python-matplotlib" ,python-matplotlib)
4197 ("python-numpy" ,python-numpy)
4198 ("python-scipy" ,python-scipy)))
4199 (native-inputs
4200 `(("unzip" ,unzip)))
4201 (home-page "https://github.com/konstantint/matplotlib-venn")
4202 (synopsis "Plot area-proportional Venn diagrams")
4203 (description
4204 "This package provides tools for plotting area-proportional two- and
4205 three-way Venn diagrams in @code{matplotlib}.")
4206 (license license:expat)))
4207
4208 (define-public python2-pysnptools
4209 (package
4210 (name "python2-pysnptools")
4211 (version "0.3.13")
4212 (source
4213 (origin
4214 (method url-fetch)
4215 (uri (pypi-uri "pysnptools" version))
4216 (sha256
4217 (base32
4218 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
4219 (build-system python-build-system)
4220 (arguments
4221 `(#:python ,python-2 ; only Python 2.7 is supported
4222 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
4223 (propagated-inputs
4224 `(("python2-numpy" ,python2-numpy)
4225 ("python2-scipy" ,python2-scipy)
4226 ("python2-pandas" ,python2-pandas)))
4227 (native-inputs
4228 `(("python2-cython" ,python2-cython)))
4229 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
4230 (synopsis "Library for reading and manipulating genetic data")
4231 (description
4232 "PySnpTools is a library for reading and manipulating genetic data. It
4233 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4234 those files. It can also efficiently manipulate ranges of integers using set
4235 operators such as union, intersection, and difference.")
4236 (license license:asl2.0)))
4237
4238 (define-public python-scipy
4239 (package
4240 (name "python-scipy")
4241 (version "1.3.1")
4242 (source
4243 (origin
4244 (method url-fetch)
4245 (uri (pypi-uri "scipy" version))
4246 (sha256
4247 (base32
4248 "1df113c9i6vazsn6y3n9wc22jh737z1g7dmx3mypkdwpdnscyhr6"))))
4249 (build-system python-build-system)
4250 (propagated-inputs
4251 `(("python-numpy" ,python-numpy)
4252 ("python-matplotlib" ,python-matplotlib)
4253 ("python-pyparsing" ,python-pyparsing)))
4254 (inputs
4255 `(("lapack" ,lapack)
4256 ("openblas" ,openblas)))
4257 (native-inputs
4258 `(("python-cython" ,python-cython)
4259 ("python-pytest" ,python-pytest)
4260 ("python-sphinx" ,python-sphinx)
4261 ("python-numpydoc" ,python-numpydoc)
4262 ("gfortran" ,gfortran)
4263 ("perl" ,perl)
4264 ("which" ,which)))
4265 (outputs '("out" "doc"))
4266 (arguments
4267 `(#:phases
4268 (modify-phases %standard-phases
4269 (add-after 'unpack 'disable-broken-tests
4270 (lambda _
4271 (substitute* "scipy/sparse/linalg/dsolve/tests/test_linsolve.py"
4272 (("^( +)def test_threads_parallel\\(self\\):" m indent)
4273 (string-append indent
4274 "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
4275 m)))
4276 (substitute* "scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py"
4277 (("^def test_parallel_threads\\(\\):" m)
4278 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
4279 m)))
4280 #t))
4281 (add-before 'build 'configure-openblas
4282 (lambda* (#:key inputs #:allow-other-keys)
4283 (call-with-output-file "site.cfg"
4284 (lambda (port)
4285 (format port
4286 "[blas]
4287 libraries = openblas
4288 library_dirs = ~a/lib
4289 include_dirs = ~a/include
4290
4291 # backslash-n to make emacs happy
4292 \n[atlas]
4293 library_dirs = ~a/lib
4294 atlas_libs = openblas
4295 "
4296 (assoc-ref inputs "openblas")
4297 (assoc-ref inputs "openblas")
4298 (assoc-ref inputs "openblas"))))
4299 #t))
4300 (add-after 'install 'install-doc
4301 (lambda* (#:key inputs outputs #:allow-other-keys)
4302 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4303 (doc (string-append data "/doc/" ,name "-" ,version))
4304 (html (string-append doc "/html"))
4305 (pyver ,(string-append "PYVER=" (version-major+minor
4306 (package-version python))))
4307 ;; By default it tries to run sphinx-build through the Python
4308 ;; interpreter which won't work with our shell wrapper.
4309 (sphinxbuild "SPHINXBUILD=LANG=C sphinx-build"))
4310 ;; Make installed package available for building the
4311 ;; documentation
4312 (add-installed-pythonpath inputs outputs)
4313 (with-directory-excursion "doc"
4314 ;; Fix generation of images for mathematical expressions.
4315 (substitute* (find-files "source" "conf\\.py")
4316 (("pngmath_use_preview = True")
4317 "pngmath_use_preview = False"))
4318 (mkdir-p html)
4319 (invoke "make" "html" pyver sphinxbuild)
4320 (with-directory-excursion "build/html"
4321 (for-each (lambda (file)
4322 (let* ((dir (dirname file))
4323 (tgt-dir (string-append html "/" dir)))
4324 (install-file file html)))
4325 (find-files "." ".*")))))
4326 #t))
4327 ;; Tests can only be run after the library has been installed and not
4328 ;; within the source directory.
4329 (delete 'check)
4330 (add-after 'install 'check
4331 (lambda* (#:key inputs outputs #:allow-other-keys)
4332 (add-installed-pythonpath inputs outputs)
4333 (with-directory-excursion "/tmp"
4334 (invoke "python" "-c"
4335 "import scipy; scipy.test(verbose=2)")))))))
4336 (home-page "https://www.scipy.org/")
4337 (synopsis "The Scipy library provides efficient numerical routines")
4338 (description "The SciPy library is one of the core packages that make up
4339 the SciPy stack. It provides many user-friendly and efficient numerical
4340 routines such as routines for numerical integration and optimization.")
4341 (properties `((python2-variant . ,(delay python2-scipy))))
4342 (license license:bsd-3)))
4343
4344 ;; Version 1.2.2 is the last version to support Python 2
4345 (define-public python2-scipy
4346 (package
4347 (inherit (package-with-python2
4348 (strip-python2-variant python-scipy)))
4349 (version "1.2.2")
4350 (source
4351 (origin
4352 (method url-fetch)
4353 (uri (pypi-uri "scipy" version))
4354 (sha256
4355 (base32
4356 "1cgvgin8fvckv96hjh3ikmwkra5rif51bdb75ifzf7xbil5iwcx4"))))))
4357
4358 (define-public python-socksipy-branch
4359 (package
4360 (name "python-socksipy-branch")
4361 (version "1.01")
4362 (source
4363 (origin
4364 (method url-fetch)
4365 (uri (pypi-uri "SocksiPy-branch" version))
4366 (sha256
4367 (base32
4368 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4369 (build-system python-build-system)
4370 (arguments
4371 `(#:tests? #f)) ; There are no tests
4372 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4373 (synopsis "Python SOCKS module")
4374 (description
4375 "SocksiPy - A Python SOCKS client module. It provides a
4376 socket-like interface that supports connections to any TCP
4377 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4378 The original version was developed by Dan Haim, this is a
4379 branch created by Mario Vilas to address some open issues,
4380 as the original project seems to have been abandoned circa 2007.")
4381 (license license:bsd-3)))
4382
4383 (define-public python2-socksipy-branch
4384 (package-with-python2 python-socksipy-branch))
4385
4386 (define-public python-pycodestyle
4387 (package
4388 (name "python-pycodestyle")
4389 (version "2.5.0")
4390 (source
4391 (origin
4392 (method url-fetch)
4393 (uri (pypi-uri "pycodestyle" version))
4394 (sha256
4395 (base32
4396 "0v4prb05n21bm8650v0a01k1nyqjdmkrsm3zycfxh2j5k9n962p4"))))
4397 (build-system python-build-system)
4398 (home-page "https://pycodestyle.readthedocs.io/")
4399 (synopsis "Python style guide checker")
4400 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4401 Python code against some of the style conventions in
4402 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4403 (license license:expat)))
4404
4405 (define-public python2-pycodestyle
4406 (package-with-python2 python-pycodestyle))
4407
4408 (define-public python-multidict
4409 (package
4410 (name "python-multidict")
4411 (version "4.2.0")
4412 (source
4413 (origin
4414 (method url-fetch)
4415 (uri (pypi-uri "multidict" version))
4416 (sha256
4417 (base32
4418 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
4419 (build-system python-build-system)
4420 (native-inputs
4421 `(("python-pytest" ,python-pytest)
4422 ("python-pytest-runner" ,python-pytest-runner)))
4423 (home-page "https://github.com/aio-libs/multidict/")
4424 (synopsis "Multidict implementation")
4425 (description "Multidict is dict-like collection of key-value pairs
4426 where key might be occurred more than once in the container.")
4427 (license license:asl2.0)))
4428
4429 (define-public python-orderedmultidict
4430 (package
4431 (name "python-orderedmultidict")
4432 (version "0.7.11")
4433 (source
4434 (origin
4435 (method url-fetch)
4436 (uri (pypi-uri "orderedmultidict" version))
4437 (sha256
4438 (base32
4439 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4440 (build-system python-build-system)
4441 (arguments
4442 `(#:phases
4443 (modify-phases %standard-phases
4444 (add-after 'unpack 'fix-tests
4445 (lambda _
4446 ;; The package uses nosetest for running the tests.
4447 ;; Adding this initfile allows to run the test suite
4448 ;; without requiring nosetest.
4449 (with-output-to-file "tests/__init__.py" newline)
4450 #t)))))
4451 (propagated-inputs
4452 `(("python-six" ,python-six)))
4453 (native-inputs
4454 `(("python-pycodestyle" ,python-pycodestyle)))
4455 (home-page "https://github.com/gruns/orderedmultidict")
4456 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4457 (description "This package contains a library for ordered multivalue
4458 dictionaries. A multivalue dictionary is a dictionary that can store
4459 multiple values for the same key. An ordered multivalue dictionary is a
4460 multivalue dictionary that retains the order of insertions and deletions.")
4461 (license license:unlicense)))
4462
4463 (define-public python2-orderedmultidict
4464 (package-with-python2 python-orderedmultidict))
4465
4466 (define-public python-autopep8
4467 (package
4468 (name "python-autopep8")
4469 (version "1.3.5")
4470 (source
4471 (origin
4472 (method url-fetch)
4473 (uri (pypi-uri "autopep8" version))
4474 (sha256
4475 (base32
4476 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
4477 (build-system python-build-system)
4478 (propagated-inputs
4479 `(("python-pycodestyle" ,python-pycodestyle)))
4480 (home-page "https://github.com/hhatto/autopep8")
4481 (synopsis "Format Python code according to the PEP 8 style guide")
4482 (description
4483 "@code{autopep8} automatically formats Python code to conform to
4484 the PEP 8 style guide. It uses the pycodestyle utility to determine
4485 what parts of the code needs to be formatted. @code{autopep8} is
4486 capable of fixing most of the formatting issues that can be reported
4487 by pycodestyle.")
4488 (license (license:non-copyleft
4489 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4490
4491 (define-public python2-autopep8
4492 (package-with-python2 python-autopep8))
4493
4494 (define-public python-distutils-extra
4495 (package
4496 (name "python-distutils-extra")
4497 (version "2.38")
4498 (source
4499 (origin
4500 (method url-fetch)
4501 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4502 version "/+download/python-distutils-extra-"
4503 version ".tar.gz"))
4504 (sha256
4505 (base32
4506 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4507 (build-system python-build-system)
4508 (home-page "https://launchpad.net/python-distutils-extra/")
4509 (synopsis "Enhancements to Python's distutils")
4510 (description
4511 "The python-distutils-extra module enables you to easily integrate
4512 gettext support, themed icons, and scrollkeeper-based documentation into
4513 Python's distutils.")
4514 (license license:gpl2)))
4515
4516 (define-public python2-distutils-extra
4517 (package-with-python2 python-distutils-extra))
4518
4519 (define-public python2-elib.intl
4520 (package
4521 (name "python2-elib.intl")
4522 (version "0.0.3")
4523 (source
4524 (origin
4525 ;; This project doesn't tag releases or publish tarballs, so we take
4526 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4527 (method git-fetch)
4528 (uri (git-reference
4529 (url "https://github.com/dieterv/elib.intl.git")
4530 (commit "d09997cfef")))
4531 (file-name (string-append name "-" version "-checkout"))
4532 (sha256
4533 (base32
4534 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4535 (build-system python-build-system)
4536 (arguments
4537 ;; incompatible with Python 3 (exception syntax)
4538 `(#:python ,python-2
4539 #:tests? #f))
4540 (home-page "https://github.com/dieterv/elib.intl")
4541 (synopsis "Enhanced internationalization for Python")
4542 (description
4543 "The elib.intl module provides enhanced internationalization (I18N)
4544 services for your Python modules and applications.")
4545 (license license:lgpl3+)))
4546
4547 (define-public python-olefile
4548 (package
4549 (name "python-olefile")
4550 (version "0.46")
4551 (source
4552 (origin
4553 (method url-fetch)
4554 (uri (string-append "https://github.com/decalage2/olefile/releases/"
4555 "download/v" version "/olefile-" version ".tar.gz"))
4556 (file-name (string-append name "-" version ".tar.gz"))
4557 (sha256
4558 (base32
4559 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
4560 (build-system python-build-system)
4561 (home-page "https://www.decalage.info/python/olefileio")
4562 (synopsis "Read and write Microsoft OLE2 files.")
4563 (description
4564 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
4565 Storage or Compound Document, Microsoft Office). It is an improved version of
4566 the OleFileIO module from PIL, the Python Image Library.")
4567 (license license:bsd-3)))
4568
4569 (define-public python2-olefile
4570 (package-with-python2 python-olefile))
4571
4572 (define-public python-pillow
4573 (package
4574 (name "python-pillow")
4575 (version "6.1.0")
4576 (source
4577 (origin
4578 (method url-fetch)
4579 (uri (pypi-uri "Pillow" version))
4580 (sha256
4581 (base32
4582 "1pnrsz0f0n0c819v1pdr8j6rm8xvhc9f3kh1fv9xpdp9n5ygf108"))))
4583 (build-system python-build-system)
4584 (native-inputs
4585 `(("python-pytest" ,python-pytest)))
4586 (inputs
4587 `(("freetype" ,freetype)
4588 ("lcms" ,lcms)
4589 ("zlib" ,zlib)
4590 ("libjpeg" ,libjpeg)
4591 ("openjpeg" ,openjpeg)
4592 ("libtiff" ,libtiff)
4593 ("libwebp" ,libwebp)))
4594 (propagated-inputs
4595 `(("python-olefile" ,python-olefile)))
4596 (arguments
4597 `(#:phases
4598 (modify-phases %standard-phases
4599 (add-after 'unpack 'patch-ldconfig
4600 (lambda _
4601 (substitute* "setup.py"
4602 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
4603 (delete 'check) ; We must run checks after python-pillow is installed.
4604 (add-after 'install 'check-installed
4605 (lambda* (#:key outputs inputs #:allow-other-keys)
4606 (begin
4607 (setenv "HOME" (getcwd))
4608 ;; Make installed package available for running the tests.
4609 (add-installed-pythonpath inputs outputs)
4610 (invoke "python" "selftest.py" "--installed")
4611 (invoke "python" "-m" "pytest" "-vv")))))))
4612 (home-page "https://python-pillow.org")
4613 (synopsis "Fork of the Python Imaging Library")
4614 (description
4615 "The Python Imaging Library adds image processing capabilities to your
4616 Python interpreter. This library provides extensive file format support, an
4617 efficient internal representation, and fairly powerful image processing
4618 capabilities. The core image library is designed for fast access to data
4619 stored in a few basic pixel formats. It should provide a solid foundation for
4620 a general image processing tool.")
4621 (license (license:x11-style
4622 "http://www.pythonware.com/products/pil/license.htm"
4623 "The PIL Software License"))))
4624
4625 (define-public python2-pillow
4626 (package-with-python2 python-pillow))
4627
4628 (define-public python-pycparser
4629 (package
4630 (name "python-pycparser")
4631 (version "2.19")
4632 (source
4633 (origin
4634 (method url-fetch)
4635 (uri (pypi-uri "pycparser" version))
4636 (sha256
4637 (base32
4638 "1cr5dcj9628lkz1qlwq3fv97c25363qppkmcayqvd05dpy573259"))))
4639 (outputs '("out" "doc"))
4640 (build-system python-build-system)
4641 (native-inputs
4642 `(("pkg-config" ,pkg-config)))
4643 (arguments
4644 `(#:phases
4645 (modify-phases %standard-phases
4646 (replace 'check
4647 (lambda _
4648 (with-directory-excursion "tests"
4649 (invoke "python" "all_tests.py"))
4650 #t))
4651 (add-after 'install 'install-doc
4652 (lambda* (#:key outputs #:allow-other-keys)
4653 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4654 (doc (string-append data "/doc/" ,name "-" ,version))
4655 (examples (string-append doc "/examples")))
4656 (mkdir-p examples)
4657 (for-each (lambda (file)
4658 (copy-file (string-append "." file)
4659 (string-append doc file)))
4660 '("/README.rst" "/CHANGES" "/LICENSE"))
4661 (copy-recursively "examples" examples)
4662 #t))))))
4663 (home-page "https://github.com/eliben/pycparser")
4664 (synopsis "C parser in Python")
4665 (description
4666 "Pycparser is a complete parser of the C language, written in pure Python
4667 using the PLY parsing library. It parses C code into an AST and can serve as
4668 a front-end for C compilers or analysis tools.")
4669 (license license:bsd-3)))
4670
4671 (define-public python2-pycparser
4672 (package-with-python2 python-pycparser))
4673
4674 (define-public python-pywavelets
4675 (package
4676 (name "python-pywavelets")
4677 (version "1.0.1")
4678 (home-page "https://github.com/PyWavelets/pywt")
4679 (source (origin
4680 (method url-fetch)
4681 (uri (pypi-uri "PyWavelets" version))
4682 (sha256
4683 (base32
4684 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
4685 (build-system python-build-system)
4686 (arguments
4687 '(#:modules ((ice-9 ftw)
4688 (srfi srfi-1)
4689 (srfi srfi-26)
4690 (guix build utils)
4691 (guix build python-build-system))
4692 #:phases (modify-phases %standard-phases
4693 (replace 'check
4694 (lambda _
4695 (let ((cwd (getcwd))
4696 (libdir (find (cut string-prefix? "lib." <>)
4697 (scandir "build"))))
4698 (with-directory-excursion (string-append cwd "/build/" libdir)
4699 (invoke "nosetests" "-v" "."))))))))
4700 (native-inputs
4701 `(("python-matplotlib" ,python-matplotlib) ;for tests
4702 ("python-nose" ,python-nose)))
4703 (propagated-inputs
4704 `(("python-numpy" ,python-numpy)))
4705 (synopsis "Wavelet transforms in Python")
4706 (description
4707 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
4708 mathematical basis functions that are localized in both time and frequency.
4709 Wavelet transforms are time-frequency transforms employing wavelets. They are
4710 similar to Fourier transforms, the difference being that Fourier transforms are
4711 localized only in frequency instead of in time and frequency.")
4712 (license license:expat)))
4713
4714 (define-public python2-pywavelets
4715 (package-with-python2 python-pywavelets))
4716
4717 (define-public python-xcffib
4718 (package
4719 (name "python-xcffib")
4720 (version "0.6.0")
4721 (source
4722 (origin
4723 (method url-fetch)
4724 (uri (pypi-uri "xcffib" version))
4725 (sha256
4726 (base32
4727 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
4728 (build-system python-build-system)
4729 (inputs
4730 `(("libxcb" ,libxcb)))
4731 (propagated-inputs
4732 `(("python-cffi" ,python-cffi) ; used at run time
4733 ("python-six" ,python-six)))
4734 (arguments
4735 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4736 #:tests? #f
4737 #:phases
4738 (modify-phases %standard-phases
4739 (add-after 'unpack 'fix-libxcb-path
4740 (lambda* (#:key inputs #:allow-other-keys)
4741 (let ((libxcb (assoc-ref inputs "libxcb")))
4742 (substitute* '("xcffib/__init__.py")
4743 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4744 #t)))
4745 (add-after 'install 'install-doc
4746 (lambda* (#:key outputs #:allow-other-keys)
4747 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4748 "/doc/" ,name "-" ,version)))
4749 (mkdir-p doc)
4750 (copy-file "README.md"
4751 (string-append doc "/README.md"))
4752 #t))))))
4753 (home-page "https://github.com/tych0/xcffib")
4754 (synopsis "XCB Python bindings")
4755 (description
4756 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4757 support for Python 3 and PyPy. It is based on cffi.")
4758 (license license:expat)))
4759
4760 (define-public python2-xcffib
4761 (package-with-python2 python-xcffib))
4762
4763 (define-public python-cairocffi
4764 (package
4765 (name "python-cairocffi")
4766 (version "0.9.0")
4767 (source
4768 (origin
4769 (method url-fetch)
4770 (uri (pypi-uri "cairocffi" version))
4771 (sha256
4772 (base32
4773 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
4774 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
4775 (build-system python-build-system)
4776 (outputs '("out" "doc"))
4777 (inputs
4778 `(("glib" ,glib)
4779 ("gtk+" ,gtk+)
4780 ("gdk-pixbuf" ,gdk-pixbuf)
4781 ("cairo" ,cairo)
4782 ("pango" ,pango)))
4783 (native-inputs
4784 `(("pkg-config" ,pkg-config)
4785 ("python-pytest" ,python-pytest)
4786 ("python-pytest-cov" ,python-pytest-cov)
4787 ("python-pytest-runner" ,python-pytest-runner)
4788 ("python-sphinx" ,python-sphinx)
4789 ("python-docutils" ,python-docutils)))
4790 (propagated-inputs
4791 `(("python-xcffib" ,python-xcffib))) ; used at run time
4792 (arguments
4793 `(#:phases
4794 (modify-phases %standard-phases
4795 (add-after 'unpack 'patch-paths
4796 (lambda* (#:key inputs outputs #:allow-other-keys)
4797 (substitute* (find-files "." "\\.py$")
4798 (("dlopen\\(ffi, 'cairo'")
4799 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
4800 "/lib/libcairo.so.2'"))
4801 (("dlopen\\(ffi, 'gdk-3'")
4802 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
4803 "/lib/libgtk-3.so.0'"))
4804 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
4805 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
4806 "/lib/libgdk_pixbuf-2.0.so.0'"))
4807 (("dlopen\\(ffi, 'glib-2.0'")
4808 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4809 "/lib/libglib-2.0.so.0'"))
4810 (("dlopen\\(ffi, 'gobject-2.0'")
4811 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4812 "/lib/libgobject-2.0.so.0'"))
4813 (("dlopen\\(ffi, 'pangocairo-1.0'")
4814 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4815 "/lib/libpangocairo-1.0.so.0'"))
4816 (("dlopen\\(ffi, 'pango-1.0'")
4817 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4818 "/lib/libpango-1.0.so.0'")))
4819 #t))
4820 (add-after 'install 'install-doc
4821 (lambda* (#:key inputs outputs #:allow-other-keys)
4822 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4823 (doc (string-append data "/doc/" ,name "-" ,version))
4824 (html (string-append doc "/html")))
4825 (setenv "LD_LIBRARY_PATH"
4826 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4827 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4828 (setenv "LANG" "en_US.UTF-8")
4829 (mkdir-p html)
4830 (for-each (lambda (file)
4831 (copy-file (string-append "." file)
4832 (string-append doc file)))
4833 '("/README.rst" "/CHANGES" "/LICENSE"))
4834 (system* "python" "setup.py" "build_sphinx")
4835 (copy-recursively "docs/_build/html" html)
4836 #t))))))
4837 (home-page "https://github.com/Kozea/cairocffi")
4838 (synopsis "Python bindings and object-oriented API for Cairo")
4839 (description
4840 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4841 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4842 graphics library with support for multiple backends including image buffers,
4843 PNG, PostScript, PDF, and SVG file output.")
4844 (license license:bsd-3)))
4845
4846 (define-public python2-cairocffi
4847 (package-with-python2 python-cairocffi))
4848
4849 (define-public python-decorator
4850 (package
4851 (name "python-decorator")
4852 (version "4.3.0")
4853 (source
4854 (origin
4855 (method url-fetch)
4856 (uri (pypi-uri "decorator" version))
4857 (sha256
4858 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
4859 (build-system python-build-system)
4860 (home-page "https://pypi.python.org/pypi/decorator/")
4861 (synopsis "Python module to simplify usage of decorators")
4862 (description
4863 "The aim of the decorator module is to simplify the usage of decorators
4864 for the average programmer, and to popularize decorators usage giving examples
4865 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4866 etc. The core of this module is a decorator factory.")
4867 (license license:expat)))
4868
4869 (define-public python2-decorator
4870 (package-with-python2 python-decorator))
4871
4872 (define-public python-drmaa
4873 (package
4874 (name "python-drmaa")
4875 (version "0.7.7")
4876 (source
4877 (origin
4878 (method url-fetch)
4879 (uri (pypi-uri "drmaa" version))
4880 (sha256
4881 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4882 (build-system python-build-system)
4883 ;; The test suite requires libdrmaa which is provided by the cluster
4884 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4885 ;; should be set to the path of the libdrmaa library.
4886 (arguments '(#:tests? #f))
4887 (native-inputs
4888 `(("python-nose" ,python-nose)))
4889 (home-page "https://pypi.python.org/pypi/drmaa")
4890 (synopsis "Python bindings for the DRMAA library")
4891 (description
4892 "A Python package for Distributed Resource Management (DRM) job
4893 submission and control. This package is an implementation of the DRMAA 1.0
4894 Python language binding specification.")
4895 (license license:bsd-3)))
4896
4897 (define-public python2-drmaa
4898 (package-with-python2 python-drmaa))
4899
4900 (define-public python-grako
4901 (package
4902 (name "python-grako")
4903 (version "3.99.9")
4904 (source
4905 (origin
4906 (method url-fetch)
4907 (uri
4908 (pypi-uri "grako" version ".zip"))
4909 (sha256
4910 (base32
4911 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4912 (build-system python-build-system)
4913 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4914 (native-inputs
4915 `(("unzip" ,unzip)
4916 ("python-pytest" ,python-pytest)
4917 ("python-pytest-runner" ,python-pytest-runner)))
4918 (home-page "https://bitbucket.org/neogeny/grako")
4919 (synopsis "EBNF parser generator")
4920 (description
4921 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4922 memoizing PEG/Packrat parser in Python.")
4923 (license license:bsd-3)))
4924
4925 (define-public python2-grako
4926 (package-with-python2 python-grako))
4927
4928 (define-public python-gridmap
4929 (package
4930 (name "python-gridmap")
4931 (version "0.13.0")
4932 (source
4933 (origin
4934 (method git-fetch)
4935 (uri (git-reference
4936 (url "https://github.com/pygridtools/gridmap.git")
4937 (commit (string-append "v" version))))
4938 (file-name (git-file-name name version))
4939 (sha256
4940 (base32 "1478lbwsr1w24cii2x01m2910fvh8r43ghnb78nc972a96hqiknm"))))
4941 (build-system python-build-system)
4942 (arguments
4943 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4944 (propagated-inputs
4945 `(("python-psutil" ,python-psutil)
4946 ("python-drmaa" ,python-drmaa)
4947 ("python-pyzmq" ,python-pyzmq)))
4948 (home-page "https://github.com/pygridtools/gridmap")
4949 (synopsis "Create jobs on a cluster directly from Python")
4950 (description
4951 "Gridmap is a Python package to allow you to easily create jobs on the
4952 cluster directly from Python. You can directly map Python functions onto the
4953 cluster without needing to write any wrapper code yourself.")
4954 (license license:gpl3+)))
4955
4956 (define-public python2-gridmap
4957 (package-with-python2 python-gridmap))
4958
4959 (define-public python-honcho
4960 (package
4961 (name "python-honcho")
4962 (version "1.0.1")
4963 (source
4964 (origin
4965 (method git-fetch)
4966 (uri (git-reference
4967 (url "https://github.com/nickstenning/honcho.git")
4968 (commit (string-append "v" version))))
4969 (file-name (git-file-name name version))
4970 (sha256
4971 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
4972 (build-system python-build-system)
4973 (native-inputs
4974 `(("python-pytest" ,python-pytest)
4975 ("python-mock" ,python-mock)
4976 ("python-tox" ,python-tox)
4977 ("which" ,which))) ;for tests
4978 (propagated-inputs
4979 `(("python-jinja2" ,python-jinja2)))
4980 (arguments
4981 `(#:phases
4982 (modify-phases %standard-phases
4983 (delete 'check)
4984 (add-after 'install 'check
4985 (lambda* (#:key outputs inputs #:allow-other-keys)
4986 ;; fix honcho path in testsuite
4987 (substitute* "tests/conftest.py"
4988 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
4989 "/bin/honcho" "'")))
4990 ;; It's easier to run tests after install.
4991 ;; Make installed package available for running the tests
4992 (add-installed-pythonpath inputs outputs)
4993 (invoke "py.test" "-v"))))))
4994 (home-page "https://github.com/nickstenning/honcho")
4995 (synopsis "Manage Procfile-based applications")
4996 (description
4997 "A Procfile is a file which describes how to run an application
4998 consisting of several processes. honcho starts all listed processes.
4999 The output of all running processes is collected by honcho and
5000 displayed.")
5001 (license license:expat)))
5002
5003 (define-public python2-honcho
5004 (package-with-python2 python-honcho))
5005
5006 (define-public python-pexpect
5007 (package
5008 (name "python-pexpect")
5009 (version "4.6.0")
5010 (source
5011 (origin
5012 (method url-fetch)
5013 (uri (pypi-uri "pexpect" version))
5014 (sha256
5015 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
5016 (build-system python-build-system)
5017 (arguments
5018 `(#:phases
5019 (modify-phases %standard-phases
5020 (add-before 'check 'prepare-tests
5021 (lambda _
5022 (substitute* (find-files "tests")
5023 (("/bin/ls") (which "ls"))
5024 (("/bin/echo") (which "echo"))
5025 (("/bin/which") (which "which"))
5026 ;; Many tests try to use the /bin directory which
5027 ;; is not present in the build environment.
5028 ;; Use one that's non-empty and unlikely to change.
5029 (("/bin'") "/dev'"))
5030 ;; XXX: Socket connection test gets "Connection reset by peer".
5031 ;; Why does it not work? Delete for now.
5032 (delete-file "tests/test_socket.py")
5033 #t))
5034 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
5035 (native-inputs
5036 `(("python-nose" ,python-nose)
5037 ("python-pytest" ,python-pytest)
5038 ("man-db" ,man-db)
5039 ("which" ,which)
5040 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
5041 (propagated-inputs
5042 `(("python-ptyprocess" ,python-ptyprocess)))
5043 (home-page "http://pexpect.readthedocs.org/")
5044 (synopsis "Controlling interactive console applications")
5045 (description
5046 "Pexpect is a pure Python module for spawning child applications;
5047 controlling them; and responding to expected patterns in their output.
5048 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
5049 child application and control it as if a human were typing commands.")
5050 (license license:isc)))
5051
5052 (define-public python2-pexpect
5053 (package-with-python2 python-pexpect))
5054
5055 (define-public python-setuptools-scm
5056 (package
5057 (name "python-setuptools-scm")
5058 (version "3.2.0")
5059 (source (origin
5060 (method url-fetch)
5061 (uri (pypi-uri "setuptools_scm" version))
5062 (sha256
5063 (base32
5064 "0n3knn3p1sqlx31k2lahn7z9bacvlv8nhlfidj77vz50bxqlgasj"))))
5065 (build-system python-build-system)
5066 (home-page "https://github.com/pypa/setuptools_scm/")
5067 (synopsis "Manage Python package versions in SCM metadata")
5068 (description
5069 "Setuptools_scm handles managing your Python package versions in
5070 @dfn{software configuration management} (SCM) metadata instead of declaring
5071 them as the version argument or in a SCM managed file.")
5072 (license license:expat)))
5073
5074 (define-public python2-setuptools-scm
5075 (package-with-python2 python-setuptools-scm))
5076
5077 (define-public python-pathlib2
5078 (package
5079 (name "python-pathlib2")
5080 (version "2.3.3")
5081 (source
5082 (origin
5083 (method url-fetch)
5084 (uri (pypi-uri "pathlib2" version))
5085 (sha256
5086 (base32
5087 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
5088 (build-system python-build-system)
5089 (propagated-inputs
5090 `(("python-scandir" ,python-scandir)
5091 ("python-six" ,python-six)))
5092 (home-page "https://pypi.python.org/pypi/pathlib2/")
5093 (synopsis "Object-oriented file system paths")
5094 (description "The goal of pathlib2 is to provide a backport of the
5095 standard @code{pathlib} module which tracks the standard library module, so
5096 all the newest features of the standard @code{pathlib} can be used also on
5097 older Python versions.")
5098 (license license:expat)))
5099
5100 (define-public python-importlib-metadata
5101 (package
5102 (name "python-importlib-metadata")
5103 (version "0.23")
5104 (source
5105 (origin
5106 (method url-fetch)
5107 (uri (pypi-uri "importlib_metadata" version))
5108 (sha256
5109 (base32 "09mdqdfv5rdrwz80jh9m379gxmvk2vhjfz0fg53hid00icvxf65a"))))
5110 (build-system python-build-system)
5111 (propagated-inputs
5112 `(("python-configparser" ,python-configparser)
5113 ("python-contextlib2" ,python-contextlib2)
5114 ("python-docutils" ,python-docutils)
5115 ("python-pathlib2" ,python-pathlib2)
5116 ("python-rst.linker" ,python-rst.linker)
5117 ("python-zipp" ,python-zipp)))
5118 (native-inputs
5119 `(("python-setuptools-scm" ,python-setuptools-scm)
5120 ("python-sphinx" ,python-sphinx)))
5121 (home-page "https://importlib-metadata.readthedocs.io/")
5122 (synopsis "Read metadata from Python packages")
5123 (description
5124 "@code{importlib_metadata} is a library which provides an API for
5125 accessing an installed Python package's metadata, such as its entry points or
5126 its top-level name. This functionality intends to replace most uses of
5127 @code{pkg_resources} entry point API and metadata API. Along with
5128 @code{importlib.resources} in Python 3.7 and newer, this can eliminate the
5129 need to use the older and less efficient @code{pkg_resources} package.")
5130 (license license:asl2.0)))
5131
5132 (define-public python-jaraco-packaging
5133 (package
5134 (name "python-jaraco-packaging")
5135 (version "6.1")
5136 (source
5137 (origin
5138 (method url-fetch)
5139 (uri (pypi-uri "jaraco.packaging" version))
5140 (sha256
5141 (base32
5142 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
5143 (build-system python-build-system)
5144 (propagated-inputs
5145 `(("python-pytest" ,python-pytest)
5146 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
5147 ("python-pytest-flake8" ,python-pytest-flake8)
5148 ("python-rst.linker" ,python-rst.linker)
5149 ("python-setuptools" ,python-setuptools)
5150 ("python-setuptools-scm" ,python-setuptools-scm)
5151 ("python-six" ,python-six)
5152 ("python-sphinx" ,python-sphinx)))
5153 (home-page "https://github.com/jaraco/jaraco.packaging")
5154 (synopsis "Tools to supplement packaging Python releases")
5155 (description
5156 "This package provides various tools to supplement packaging Python
5157 releases.")
5158 (license license:expat)))
5159
5160 (define-public python-pathpy
5161 (package
5162 (name "python-pathpy")
5163 (version "11.5.0")
5164 (source
5165 (origin
5166 (method url-fetch)
5167 (uri (pypi-uri "path.py" version))
5168 (sha256
5169 (base32 "1jxkf91syzxlpiwgm83fjfz1m5xh3jrvv4iyl5wjsnkk599pls5n"))))
5170 (outputs '("out" "doc"))
5171 (build-system python-build-system)
5172 (propagated-inputs
5173 `(("python-appdirs" ,python-appdirs)
5174 ("python-importlib-metadata" ,python-importlib-metadata)))
5175 (native-inputs
5176 `(("python-setuptools-scm" ,python-setuptools-scm)
5177 ("python-sphinx" ,python-sphinx)
5178 ("python-rst.linker" ,python-rst.linker)
5179 ("python-pytest" ,python-pytest)
5180 ("python-pytest-runner" ,python-pytest-runner)
5181 ("python-jaraco-packaging" ,python-jaraco-packaging)))
5182 (arguments
5183 `(#:phases
5184 (modify-phases %standard-phases
5185 (add-after 'build 'build-doc
5186 (lambda _
5187 (setenv "LANG" "en_US.UTF-8")
5188 (invoke "python" "setup.py" "build_sphinx")))
5189 (add-after 'install 'install-doc
5190 (lambda* (#:key outputs #:allow-other-keys)
5191 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5192 (doc (string-append data "/doc/" ,name "-" ,version))
5193 (html (string-append doc "/html")))
5194 (mkdir-p html)
5195 (for-each (lambda (file)
5196 (copy-file file (string-append doc "/" file)))
5197 '("README.rst" "CHANGES.rst"))
5198 (copy-recursively "build/sphinx/html" html)
5199 #t)))
5200 (replace 'check
5201 (lambda _
5202 ;; The import time test aborts if an import takes longer than
5203 ;; 100ms. It may very well take a little longer than that.
5204 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
5205 (home-page "https://github.com/jaraco/path.py")
5206 (synopsis "Python module wrapper for built-in os.path")
5207 (description
5208 "@code{path.py} implements path objects as first-class entities, allowing
5209 common operations on files to be invoked on those path objects directly.")
5210 (license license:expat)))
5211
5212 (define-public python2-pathpy
5213 (package-with-python2 python-pathpy))
5214
5215 (define-public python-simplegeneric
5216 (package
5217 (name "python-simplegeneric")
5218 (version "0.8.1")
5219 (source
5220 (origin
5221 (method url-fetch)
5222 (uri (pypi-uri "simplegeneric" version ".zip"))
5223 (sha256
5224 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5225 (build-system python-build-system)
5226 (native-inputs
5227 `(("unzip" ,unzip)))
5228 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5229 (synopsis "Python module for simple generic functions")
5230 (description
5231 "The simplegeneric module lets you define simple single-dispatch generic
5232 functions, akin to Python’s built-in generic functions like @code{len()},
5233 @code{iter()} and so on. However, instead of using specially-named methods,
5234 these generic functions use simple lookup tables, akin to those used by
5235 e.g. @code{pickle.dump()} and other generic functions found in the Python
5236 standard library.")
5237 (license license:zpl2.1)))
5238
5239 (define-public python2-simplegeneric
5240 (package-with-python2 python-simplegeneric))
5241
5242 (define-public python-ipython-genutils
5243 ;; TODO: This package is retired, check if can be removed, see description.
5244 (package
5245 (name "python-ipython-genutils")
5246 (version "0.1.0")
5247 (source
5248 (origin
5249 (method url-fetch)
5250 (uri (pypi-uri "ipython_genutils" version))
5251 (sha256
5252 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5253 (build-system python-build-system)
5254 (arguments `(#:tests? #f)) ; no tests
5255 (home-page "https://ipython.org")
5256 (synopsis "Vestigial utilities from IPython")
5257 (description
5258 "This package provides retired utilities from IPython. No packages
5259 outside IPython/Jupyter should depend on it.
5260
5261 This package shouldn't exist. It contains some common utilities shared by
5262 Jupyter and IPython projects during The Big Split. As soon as possible, those
5263 packages will remove their dependency on this, and this package will go
5264 away.")
5265 (license license:bsd-3)))
5266
5267 (define-public python2-ipython-genutils
5268 (package-with-python2 python-ipython-genutils))
5269
5270 (define-public python-traitlets
5271 (package
5272 (name "python-traitlets")
5273 (version "4.3.3")
5274 (source
5275 (origin
5276 (method url-fetch)
5277 (uri (pypi-uri "traitlets" version))
5278 (sha256
5279 (base32
5280 "1xsrwgivpkxlbr4dfndfsi098s29yqgswgjc1qqn69yxklvfw8yh"))))
5281 (build-system python-build-system)
5282 (arguments
5283 `(#:phases
5284 (modify-phases %standard-phases
5285 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
5286 (propagated-inputs
5287 `(("python-ipython-genutils" ,python-ipython-genutils)
5288 ("python-decorator" ,python-decorator)))
5289 (native-inputs
5290 `(("python-pytest" ,python-pytest)))
5291 (properties `((python2-variant . ,(delay python2-traitlets))))
5292 (home-page "https://ipython.org")
5293 (synopsis "Configuration system for Python applications")
5294 (description
5295 "Traitlets is a framework that lets Python classes have attributes with
5296 type checking, dynamically calculated default values, and ‘on change’
5297 callbacks. The package also includes a mechanism to use traitlets for
5298 configuration, loading values from files or from command line arguments. This
5299 is a distinct layer on top of traitlets, so you can use traitlets in your code
5300 without using the configuration machinery.")
5301 (license license:bsd-3)))
5302
5303 (define-public python2-traitlets
5304 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
5305 (package
5306 (inherit traitlets)
5307 (propagated-inputs
5308 `(("python2-enum34" ,python2-enum34)
5309 ,@(package-propagated-inputs traitlets))))))
5310
5311 (define-public python-jupyter-core
5312 (package
5313 (name "python-jupyter-core")
5314 (version "4.4.0")
5315 (source
5316 (origin
5317 (method url-fetch)
5318 (uri (string-append (pypi-uri "jupyter_core" version)))
5319 (sha256
5320 (base32
5321 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
5322 (build-system python-build-system)
5323 ;; FIXME: not sure how to run the tests
5324 (arguments `(#:tests? #f))
5325 (propagated-inputs
5326 `(("python-traitlets" ,python-traitlets)))
5327 (home-page "http://jupyter.org/")
5328 (synopsis "Jupyter base package")
5329 (description
5330 "Jupyter core is the base package on which Jupyter projects rely.")
5331 (license license:bsd-3)))
5332
5333 (define-public python2-jupyter-core
5334 (package-with-python2 python-jupyter-core))
5335
5336 (define-public python-jupyter-client
5337 (package
5338 (name "python-jupyter-client")
5339 (version "5.2.4")
5340 (source
5341 (origin
5342 (method url-fetch)
5343 (uri (pypi-uri "jupyter_client" version))
5344 (sha256
5345 (base32
5346 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
5347 (build-system python-build-system)
5348 ;; Tests fail because of missing native python kernel which I assume is
5349 ;; provided by the ipython package, which we cannot use because it would
5350 ;; cause a dependency cycle.
5351 (arguments
5352 `(#:tests? #f
5353
5354 #:phases (modify-phases %standard-phases
5355 (add-after 'unpack 'set-tool-file-names
5356 (lambda* (#:key inputs #:allow-other-keys)
5357 (let ((iproute (assoc-ref inputs "iproute")))
5358 (substitute* "jupyter_client/localinterfaces.py"
5359 (("'ip'")
5360 (string-append "'" iproute "/sbin/ip'")))
5361 #t))))))
5362 (inputs
5363 `(("iproute" ,iproute)))
5364 (propagated-inputs
5365 `(("python-pyzmq" ,python-pyzmq)
5366 ("python-traitlets" ,python-traitlets)
5367 ("python-jupyter-core" ,python-jupyter-core)))
5368 (home-page "http://jupyter.org/")
5369 (synopsis "Jupyter protocol implementation and client libraries")
5370 (description
5371 "The @code{jupyter_client} package contains the reference implementation
5372 of the Jupyter protocol. It also provides client and kernel management APIs
5373 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5374 installing @code{kernelspec}s for use with Jupyter frontends.")
5375 (license license:bsd-3)))
5376
5377 (define-public python2-jupyter-client
5378 (package-with-python2 python-jupyter-client))
5379
5380 (define-public python-ipykernel
5381 (package
5382 (name "python-ipykernel")
5383 (version "5.1.1")
5384 (source
5385 (origin
5386 (method url-fetch)
5387 (uri (pypi-uri "ipykernel" version))
5388 (sha256
5389 (base32 "173nm29g85w8cac3fg40b27qaq26g41wgg6qn79ql1hq4w2n5sgh"))))
5390 (build-system python-build-system)
5391 (arguments
5392 `(#:phases
5393 (modify-phases %standard-phases
5394 (replace 'check
5395 (lambda _
5396 (setenv "HOME" "/tmp")
5397 (invoke "pytest" "-v")
5398 #t))
5399 (add-after 'install 'set-python-file-name
5400 (lambda* (#:key outputs #:allow-other-keys)
5401 ;; Record the absolute file name of the 'python' executable in
5402 ;; 'kernel.json'.
5403 (let ((out (assoc-ref outputs "out")))
5404 (substitute* (string-append out "/share/jupyter"
5405 "/kernels/python3/kernel.json")
5406 (("\"python\"")
5407 (string-append "\"" (which "python") "\"")))
5408 #t))))))
5409 (propagated-inputs
5410 `(("python-ipython" ,python-ipython)
5411 ;; imported at runtime during connect
5412 ("python-jupyter-client" ,python-jupyter-client)))
5413 (native-inputs
5414 `(("python-pytest" ,python-pytest)
5415 ("python-nose" ,python-nose)))
5416 (home-page "https://ipython.org")
5417 (synopsis "IPython Kernel for Jupyter")
5418 (description
5419 "This package provides the IPython kernel for Jupyter.")
5420 (license license:bsd-3)))
5421
5422 ;; Version 5.1.1 and above no longer support Python 2.
5423 (define-public python2-ipykernel
5424 (package
5425 (name "python2-ipykernel")
5426 (version "5.1.0")
5427 (source
5428 (origin
5429 (method url-fetch)
5430 (uri (pypi-uri "ipykernel" version))
5431 (sha256
5432 (base32 "0br95qhrd5k65g10djngiy27hs0642301hlf2q142i8djabvzh0g"))))
5433 (build-system python-build-system)
5434 (arguments
5435 `(#:python ,python-2
5436 #:phases
5437 (modify-phases %standard-phases
5438 (replace 'check
5439 (lambda _
5440 (setenv "HOME" "/tmp")
5441 (invoke "pytest" "-v")
5442 #t)))))
5443 (propagated-inputs
5444 `(("python2-ipython" ,python2-ipython)
5445 ;; imported at runtime during connect
5446 ("python2-jupyter-client" ,python2-jupyter-client)))
5447 (native-inputs
5448 `(("python2-pytest" ,python2-pytest)
5449 ("python2-nose" ,python2-nose)))
5450 (home-page "https://ipython.org")
5451 (synopsis "IPython Kernel for Jupyter")
5452 (description
5453 "This package provides the IPython kernel for Jupyter.")
5454 (license license:bsd-3)))
5455
5456 (define-public python-pari-jupyter
5457 (package
5458 (name "python-pari-jupyter")
5459 (version "1.3.2")
5460 (source
5461 (origin
5462 (method url-fetch)
5463 (uri (pypi-uri "pari_jupyter" version))
5464 (sha256
5465 (base32
5466 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
5467 (build-system python-build-system)
5468 (propagated-inputs
5469 `(("python-ipykernel" ,python-ipykernel)))
5470 (inputs
5471 `(("pari-gp" ,pari-gp)
5472 ("readline" ,readline)))
5473 (arguments
5474 `(#:tests? #f)) ; no test suite
5475 (home-page
5476 "https://github.com/jdemeyer/pari_jupyter")
5477 (synopsis "A Jupyter kernel for PARI/GP")
5478 (description "The package provides a PARI/GP kernel for Jupyter.")
5479 (license license:gpl3+)))
5480
5481 (define-public python-backcall
5482 (package
5483 (name "python-backcall")
5484 (version "0.1.0")
5485 (source
5486 (origin
5487 (method url-fetch)
5488 (uri (pypi-uri "backcall" version))
5489 (sha256
5490 (base32
5491 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
5492 (build-system python-build-system)
5493 (home-page "https://github.com/takluyver/backcall/")
5494 (synopsis "Specifications for callback functions passed in to an API")
5495 (description
5496 "If your code lets other people supply callback functions, it's important
5497 to specify the function signature you expect, and check that functions support
5498 that. Adding extra parameters later would break other peoples code unless
5499 you're careful. The @code{backcall} package provides a way of specifying the
5500 callback signature using a prototype function.")
5501 (license license:bsd-3)))
5502
5503 ;; This is the latest release of the LTS version of ipython with support for
5504 ;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
5505 ;; dropped support for Python 2.7.
5506 (define-public python2-ipython
5507 (package
5508 (name "python2-ipython")
5509 (version "5.8.0")
5510 (source
5511 (origin
5512 (method url-fetch)
5513 (uri (pypi-uri "ipython" version ".tar.gz"))
5514 (sha256
5515 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
5516 (build-system python-build-system)
5517 (propagated-inputs
5518 `(("python2-backports-shutil-get-terminal-size"
5519 ,python2-backports-shutil-get-terminal-size)
5520 ("python2-pathlib2" ,python2-pathlib2)
5521 ("python2-pyzmq" ,python2-pyzmq)
5522 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
5523 ("python2-terminado" ,python2-terminado)
5524 ("python2-matplotlib" ,python2-matplotlib)
5525 ("python2-numpy" ,python2-numpy)
5526 ("python2-numpydoc" ,python2-numpydoc)
5527 ("python2-jinja2" ,python2-jinja2)
5528 ("python2-mistune" ,python2-mistune)
5529 ("python2-pexpect" ,python2-pexpect)
5530 ("python2-pickleshare" ,python2-pickleshare)
5531 ("python2-simplegeneric" ,python2-simplegeneric)
5532 ("python2-jsonschema" ,python2-jsonschema)
5533 ("python2-traitlets" ,python2-traitlets)
5534 ("python2-nbformat" ,python2-nbformat)
5535 ("python2-pygments" ,python2-pygments)))
5536 (inputs
5537 `(("readline" ,readline)
5538 ("which" ,which)))
5539 (native-inputs
5540 `(("graphviz" ,graphviz)
5541 ("pkg-config" ,pkg-config)
5542 ("python2-requests" ,python2-requests) ;; for tests
5543 ("python2-testpath" ,python2-testpath)
5544 ("python2-mock" ,python2-mock)
5545 ("python2-nose" ,python2-nose)))
5546 (arguments
5547 `(#:python ,python-2
5548 #:phases
5549 (modify-phases %standard-phases
5550 (add-before 'check 'delete-broken-tests
5551 (lambda* (#:key inputs #:allow-other-keys)
5552 ;; These tests throw errors for unknown reasons.
5553 (delete-file "IPython/core/tests/test_profile.py")
5554 (delete-file "IPython/core/tests/test_interactiveshell.py")
5555 (delete-file "IPython/core/tests/test_magic.py")
5556 #t)))))
5557 (home-page "https://ipython.org")
5558 (synopsis "IPython is a tool for interactive computing in Python")
5559 (description
5560 "IPython provides a rich architecture for interactive computing with:
5561 Powerful interactive shells, a browser-based notebook, support for interactive
5562 data visualization, embeddable interpreters and tools for parallel
5563 computing.")
5564 (license license:bsd-3)))
5565
5566 (define-public python-ipython
5567 (package
5568 (name "python-ipython")
5569 (version "7.5.0")
5570 (source
5571 (origin
5572 (method url-fetch)
5573 (uri (pypi-uri "ipython" version ".tar.gz"))
5574 (sha256
5575 (base32 "09mbxq37mfn88xjnib7qfzaq9krr7gf1jxwy1p6mcjr254082h78"))))
5576 (build-system python-build-system)
5577 (propagated-inputs
5578 `(("python-backcall" ,python-backcall)
5579 ("python-pyzmq" ,python-pyzmq)
5580 ("python-prompt-toolkit" ,python-prompt-toolkit)
5581 ("python-terminado" ,python-terminado)
5582 ("python-matplotlib" ,python-matplotlib)
5583 ("python-numpy" ,python-numpy)
5584 ("python-numpydoc" ,python-numpydoc)
5585 ("python-jedi" ,python-jedi)
5586 ("python-jinja2" ,python-jinja2)
5587 ("python-mistune" ,python-mistune)
5588 ("python-pexpect" ,python-pexpect)
5589 ("python-pickleshare" ,python-pickleshare)
5590 ("python-simplegeneric" ,python-simplegeneric)
5591 ("python-jsonschema" ,python-jsonschema)
5592 ("python-traitlets" ,python-traitlets)
5593 ("python-nbformat" ,python-nbformat)
5594 ("python-pygments" ,python-pygments)))
5595 (inputs
5596 `(("readline" ,readline)
5597 ("which" ,which)))
5598 (native-inputs
5599 `(("graphviz" ,graphviz)
5600 ("pkg-config" ,pkg-config)
5601 ("python-requests" ,python-requests) ;; for tests
5602 ("python-testpath" ,python-testpath)
5603 ("python-nose" ,python-nose)))
5604 (arguments
5605 `(#:phases
5606 (modify-phases %standard-phases
5607 (add-after 'unpack 'make-docs-reproducible
5608 (lambda _
5609 (substitute* "IPython/sphinxext/ipython_directive.py"
5610 ((".*import datetime") "")
5611 ((".*datetime.datetime.now\\(\\)") "")
5612 (("%timeit") "# %timeit"))
5613 #t))
5614 ;; Tests can only be run after the library has been installed and not
5615 ;; within the source directory.
5616 (delete 'check)
5617 (add-after 'install 'check
5618 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5619 (if tests?
5620 (begin
5621 ;; Make installed package available for running the tests
5622 (add-installed-pythonpath inputs outputs)
5623 (setenv "HOME" "/tmp/") ;; required by a test
5624 ;; We only test the core because one of the other tests
5625 ;; tries to import ipykernel.
5626 (invoke "python" "IPython/testing/iptest.py"
5627 "-v" "IPython/core/tests"))
5628 #t)))
5629 (add-before 'check 'fix-tests
5630 (lambda* (#:key inputs #:allow-other-keys)
5631 (substitute* "./IPython/utils/_process_posix.py"
5632 (("/usr/bin/env', 'which") (which "which")))
5633 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5634 (("#!/usr/bin/env python")
5635 (string-append "#!" (which "python"))))
5636 ;; This test introduces a circular dependency on ipykernel
5637 ;; (which depends on ipython).
5638 (delete-file "IPython/core/tests/test_display.py")
5639 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
5640 (delete-file "IPython/core/tests/test_interactiveshell.py")
5641 #t)))))
5642 (home-page "https://ipython.org")
5643 (synopsis "IPython is a tool for interactive computing in Python")
5644 (description
5645 "IPython provides a rich architecture for interactive computing with:
5646 Powerful interactive shells, a browser-based notebook, support for interactive
5647 data visualization, embeddable interpreters and tools for parallel
5648 computing.")
5649 (license license:bsd-3)))
5650
5651 (define-public python-ipython-documentation
5652 (package
5653 (inherit python-ipython)
5654 (name "python-ipython-documentation")
5655 (version (package-version python-ipython))
5656 (arguments
5657 `(#:phases
5658 (modify-phases %standard-phases
5659 (delete 'build)
5660 (delete 'check)
5661 (replace 'install
5662 (lambda* (#:key outputs #:allow-other-keys)
5663 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5664 (doc (string-append data "/doc/" ,name "-" ,version))
5665 (html (string-append doc "/html"))
5666 (man1 (string-append data "/man/man1"))
5667 (info (string-append data "/info"))
5668 (examples (string-append doc "/examples"))
5669 (python-arg (string-append "PYTHON=" (which "python"))))
5670 (setenv "LANG" "en_US.utf8")
5671 (with-directory-excursion "docs"
5672 ;; FIXME: pdf fails to build
5673 ;;(system* "make" "pdf" "PAPER=a4")
5674 (system* "make" python-arg "html")
5675 ;; FIXME: the generated texi file contains ^@^@, which trips
5676 ;; up the parser.
5677 ;; (system* "make" python-arg "info")
5678 )
5679 (copy-recursively "docs/man" man1)
5680 (copy-recursively "examples" examples)
5681 (copy-recursively "docs/build/html" html)
5682 ;; (copy-file "docs/build/latex/ipython.pdf"
5683 ;; (string-append doc "/ipython.pdf"))
5684 (mkdir-p info)
5685 ;; (copy-file "docs/build/texinfo/ipython.info"
5686 ;; (string-append info "/ipython.info"))
5687 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
5688 #t)))))
5689 (inputs
5690 `(("python-ipython" ,python-ipython)
5691 ("python-ipykernel" ,python-ipykernel)))
5692 (native-inputs
5693 `(("python-sphinx" ,python-sphinx)
5694 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
5695 ;; FIXME: It's possible that a smaller union would work just as well.
5696 ("texlive" ,(texlive-union (list texlive-amsfonts
5697 texlive-fonts-ec
5698 texlive-generic-ifxetex
5699 texlive-generic-pdftex
5700 texlive-latex-capt-of
5701 texlive-latex-cmap
5702 texlive-latex-environ
5703 texlive-latex-eqparbox
5704 texlive-latex-etoolbox
5705 texlive-latex-expdlist
5706 texlive-latex-fancyhdr
5707 texlive-latex-fancyvrb
5708 texlive-latex-fncychap
5709 texlive-latex-float
5710 texlive-latex-framed
5711 texlive-latex-geometry
5712 texlive-latex-graphics
5713 texlive-latex-hyperref
5714 texlive-latex-mdwtools
5715 texlive-latex-multirow
5716 texlive-latex-needspace
5717 texlive-latex-oberdiek
5718 texlive-latex-parskip
5719 texlive-latex-preview
5720 texlive-latex-tabulary
5721 texlive-latex-threeparttable
5722 texlive-latex-titlesec
5723 texlive-latex-trimspaces
5724 texlive-latex-ucs
5725 texlive-latex-upquote
5726 texlive-latex-url
5727 texlive-latex-varwidth
5728 texlive-latex-wrapfig)))
5729 ("texinfo" ,texinfo)))))
5730
5731 (define-public python-urwid
5732 (package
5733 (name "python-urwid")
5734 (version "2.0.1")
5735 (source
5736 (origin
5737 (method url-fetch)
5738 (uri (pypi-uri "urwid" version))
5739 (sha256
5740 (base32
5741 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
5742 (build-system python-build-system)
5743 (home-page "http://urwid.org")
5744 (synopsis "Console user interface library for Python")
5745 (description
5746 "Urwid is a curses-based UI/widget library for Python. It includes many
5747 features useful for text console applications.")
5748 (license license:lgpl2.1+)))
5749
5750 (define-public python2-urwid
5751 (package-with-python2 python-urwid))
5752
5753 (define-public python-urwidtrees
5754 (package
5755 (name "python-urwidtrees")
5756 (version "1.0.2")
5757 (source
5758 (origin
5759 (method url-fetch)
5760 ;; package author intends on distributing via github rather than pypi:
5761 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5762 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5763 version ".tar.gz"))
5764 (file-name (string-append name "-" version ".tar.gz"))
5765 (sha256
5766 (base32
5767 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
5768 (build-system python-build-system)
5769 (arguments
5770 '(#:tests? #f)) ; no tests
5771 (propagated-inputs `(("python-urwid" ,python-urwid)))
5772 (home-page "https://github.com/pazz/urwidtrees")
5773 (synopsis "Tree widgets for urwid")
5774 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5775 toolkit. Use it to build trees of widgets.")
5776 (license license:gpl3+)))
5777
5778 (define-public python2-urwidtrees
5779 (package-with-python2 python-urwidtrees))
5780
5781 (define-public python-ua-parser
5782 (package
5783 (name "python-ua-parser")
5784 (version "0.8.0")
5785 (source
5786 (origin
5787 (method url-fetch)
5788 (uri (pypi-uri "ua-parser" version))
5789 (sha256
5790 (base32
5791 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
5792 (build-system python-build-system)
5793 (arguments
5794 `(#:tests? #f)) ;no test suite in release
5795 (native-inputs
5796 `(("python-pyyaml" ,python-pyyaml)))
5797 (home-page "https://github.com/ua-parser/uap-python")
5798 (synopsis "User agent parser")
5799 (description
5800 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
5801 (license license:asl2.0)))
5802
5803 (define-public python2-ua-parser
5804 (package-with-python2 python-ua-parser))
5805
5806 (define-public python-user-agents
5807 (package
5808 (name "python-user-agents")
5809 (version "1.1.0")
5810 (source
5811 (origin
5812 (method url-fetch)
5813 (uri (pypi-uri "user-agents" version))
5814 (sha256
5815 (base32
5816 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
5817 (build-system python-build-system)
5818 (arguments
5819 `(#:tests? #f)) ;missing devices.json test file in release
5820 (propagated-inputs
5821 `(("python-ua-parser" ,python-ua-parser)))
5822 (home-page "https://github.com/selwin/python-user-agents")
5823 (synopsis "User Agent strings parsing library")
5824 (description
5825 "A library to identify devices (phones, tablets) and their capabilities by
5826 parsing (browser/HTTP) user agent strings.")
5827 (license license:expat)))
5828
5829 (define-public python2-user-agents
5830 (package-with-python2 python-user-agents))
5831
5832 (define-public python-dbus
5833 (package
5834 (name "python-dbus")
5835 (version "1.2.8")
5836 (source
5837 (origin
5838 (method url-fetch)
5839 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
5840 "dbus-python-" version ".tar.gz"))
5841 (sha256
5842 (base32
5843 "0vvvjmiwnc9cjlks3gcdk43ap7llhlpz7cm1wbw0nc2yfsxjpwdb"))))
5844 (build-system gnu-build-system)
5845 (arguments
5846 '(#:phases
5847 (modify-phases %standard-phases
5848 (add-before
5849 'check 'pre-check
5850 (lambda _
5851 ;; XXX: For the missing '/etc/machine-id'.
5852 (substitute* "test/run-test.sh"
5853 (("DBUS_FATAL_WARNINGS=1")
5854 "DBUS_FATAL_WARNINGS=0"))
5855 #t)))))
5856 (native-inputs
5857 `(("pkg-config" ,pkg-config)))
5858 (inputs
5859 `(("python" ,python-wrapper)
5860 ("dbus-glib" ,dbus-glib)))
5861 (synopsis "Python bindings for D-bus")
5862 (description "python-dbus provides bindings for libdbus, the reference
5863 implementation of D-Bus.")
5864 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
5865 (license license:expat)))
5866
5867 (define-public python2-dbus
5868 (package (inherit python-dbus)
5869 (name "python2-dbus")
5870 (inputs `(("python" ,python-2)
5871 ,@(alist-delete "python"
5872 (package-inputs python-dbus)
5873 equal?)))
5874 ;; FIXME: on Python 2, the test_utf8 fails with:
5875 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5876 (arguments `(#:tests? #f))))
5877
5878 (define-public python-notify2
5879 (package
5880 (name "python-notify2")
5881 (version "0.3.1")
5882 (source
5883 (origin
5884 (method url-fetch)
5885 (uri (pypi-uri "notify2" version))
5886 (sha256
5887 (base32
5888 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
5889 (build-system python-build-system)
5890 (arguments `(#:tests? #f)) ; tests depend on system state
5891 (native-inputs
5892 `(("python-dbus" ,python-dbus)))
5893 (home-page "https://bitbucket.org/takluyver/pynotify2")
5894 (synopsis "Python interface to D-Bus notifications")
5895 (description
5896 "Pynotify2 provides a Python interface for sending D-Bus notifications.
5897 It is a reimplementation of pynotify in pure Python, and an alternative to
5898 the GObject Introspection bindings to libnotify for non-GTK applications.")
5899 (license (list license:bsd-2
5900 license:lgpl2.1+))))
5901
5902 (define-public python2-notify2
5903 (package-with-python2 python-notify2))
5904
5905 (define-public python-lxml
5906 (package
5907 (name "python-lxml")
5908 (version "4.2.5")
5909 (source
5910 (origin
5911 (method url-fetch)
5912 (uri (pypi-uri "lxml" version))
5913 (sha256
5914 (base32
5915 "0zw0y9hs0nflxhl9cs6ipwwh53szi3w2x06wl0k9cylyqac0cwin"))))
5916 (build-system python-build-system)
5917 (inputs
5918 `(("libxml2" ,libxml2)
5919 ("libxslt" ,libxslt)))
5920 (home-page "http://lxml.de/")
5921 (synopsis
5922 "Python XML processing library")
5923 (description
5924 "The lxml XML toolkit is a Pythonic binding for the C libraries
5925 libxml2 and libxslt.")
5926 (license license:bsd-3))) ; and a few more, see LICENSES.txt
5927
5928 (define-public python2-lxml
5929 (package-with-python2 python-lxml))
5930
5931 ;; beautifulsoup4 has a totally different namespace than 3.x,
5932 ;; and pypi seems to put it under its own name, so I guess we should too
5933 (define-public python-beautifulsoup4
5934 (package
5935 (name "python-beautifulsoup4")
5936 (version "4.7.1")
5937 (source
5938 (origin
5939 (method url-fetch)
5940 (uri (pypi-uri "beautifulsoup4" version))
5941 (sha256
5942 (base32
5943 "0j2kycz2dxgx68xzjm7rxg5xn6v61gq5ifvxyg99slmqkybnal4l"))))
5944 (build-system python-build-system)
5945 (arguments
5946 `(#:phases
5947 (modify-phases %standard-phases
5948 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5949 ;; must use this conversion script when building with Python 3. The
5950 ;; conversion script also runs the tests.
5951 ;; For more information, see the file 'convert-py3k' in the source
5952 ;; distribution.
5953 (replace 'check
5954 (lambda _ (invoke "./convert-py3k"))))))
5955 (propagated-inputs
5956 `(("python-soupsieve" ,python-soupsieve)))
5957 (home-page
5958 "https://www.crummy.com/software/BeautifulSoup/bs4/")
5959 (synopsis
5960 "Python screen-scraping library")
5961 (description
5962 "Beautiful Soup is a Python library designed for rapidly setting up
5963 screen-scraping projects. It offers Pythonic idioms for navigating,
5964 searching, and modifying a parse tree, providing a toolkit for
5965 dissecting a document and extracting what you need. It automatically
5966 converts incoming documents to Unicode and outgoing documents to UTF-8.")
5967 (license license:expat)
5968 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5969
5970 (define-public python2-beautifulsoup4
5971 (package
5972 (inherit (package-with-python2
5973 (strip-python2-variant python-beautifulsoup4)))
5974 (arguments `(#:python ,python-2))))
5975
5976 (define-public python-soupsieve
5977 (package
5978 (name "python-soupsieve")
5979 (version "1.9.2")
5980 (source
5981 (origin
5982 (method url-fetch)
5983 (uri (pypi-uri "soupsieve" version))
5984 (sha256
5985 (base32
5986 "0in9rc9q3h8w5b4qf7kvl3qxcvw6vrz35ckblchgf70hm6pg3dbj"))))
5987 (build-system python-build-system)
5988 (arguments `(#:tests? #f))
5989 ;;XXX: 2 tests fail currently despite claming they were to be
5990 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
5991 ;;don't want to create a circular dependency.
5992 (home-page "https://github.com/facelessuser/soupsieve")
5993 (synopsis "CSS selector library")
5994 (description
5995 "Soup Sieve is a CSS selector library designed to be used with Beautiful
5996 Soup 4. It aims to provide selecting, matching, and filtering using modern
5997 CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
5998 specifications up through the latest CSS level 4 drafts and beyond (though
5999 some are not yet implemented).")
6000 (properties `((python2-variant . ,(delay python2-soupsieve))))
6001 (license license:expat)))
6002
6003 (define-public python2-soupsieve
6004 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
6005 (package
6006 (inherit base)
6007 (propagated-inputs
6008 `(("python2-backports-functools-lru-cache"
6009 ,python2-backports-functools-lru-cache)
6010 ,@(package-propagated-inputs base))))))
6011
6012 (define-public python-netifaces
6013 (package
6014 (name "python-netifaces")
6015 (version "0.10.7")
6016 (source
6017 (origin
6018 (method url-fetch)
6019 (uri (pypi-uri "netifaces" version))
6020 (sha256
6021 (base32
6022 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
6023 (build-system python-build-system)
6024 (home-page "https://github.com/al45tair/netifaces")
6025 (synopsis
6026 "Python module for portable network interface information")
6027 (description
6028 "Netifaces is a Python module providing information on network
6029 interfaces in an easy and portable manner.")
6030 (license license:expat)))
6031
6032 (define-public python2-netifaces
6033 (package-with-python2 python-netifaces))
6034
6035 (define-public python-networkx
6036 (package
6037 (name "python-networkx")
6038 (version "2.2")
6039 (source
6040 (origin
6041 (method url-fetch)
6042 (uri (pypi-uri "networkx" version ".zip"))
6043 (sha256
6044 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
6045 (build-system python-build-system)
6046 ;; python-decorator is needed at runtime.
6047 (propagated-inputs
6048 `(("python-decorator" ,python-decorator)))
6049 (native-inputs
6050 `(("python-nose" ,python-nose)
6051 ("unzip" ,unzip)))
6052 (home-page "https://networkx.github.io/")
6053 (synopsis "Python module for creating and manipulating graphs and networks")
6054 (description
6055 "NetworkX is a Python package for the creation, manipulation, and study
6056 of the structure, dynamics, and functions of complex networks.")
6057 (license license:bsd-3)))
6058
6059 (define-public python2-networkx
6060 (package-with-python2 python-networkx))
6061
6062 (define-public python-datrie
6063 (package
6064 (name "python-datrie")
6065 (version "0.8")
6066 (source
6067 (origin
6068 (method url-fetch)
6069 (uri (pypi-uri "datrie" version))
6070 (sha256
6071 (base32
6072 "0338r8xgmpy78556jhms0h6qkvyjr10p8bpgdvcpqzm9lrmxmmdx"))))
6073 (build-system python-build-system)
6074 (native-inputs
6075 `(("python-cython" ,python-cython)
6076 ("python-hypothesis" ,python-hypothesis)
6077 ("python-pytest" ,python-pytest)
6078 ("python-pytest-runner" ,python-pytest-runner)))
6079 (home-page "https://github.com/kmike/datrie")
6080 (synopsis "Fast, efficiently stored trie for Python")
6081 (description
6082 "This package provides a fast, efficiently stored trie implementation for
6083 Python.")
6084 (license license:lgpl2.1+)))
6085
6086 (define-public snakemake
6087 (package
6088 (name "snakemake")
6089 (version "5.2.4")
6090 (source
6091 (origin
6092 (method url-fetch)
6093 (uri (pypi-uri "snakemake" version))
6094 (sha256
6095 (base32 "0gj0xxgiq3mp9qyyrbfzldiaq1giliqw0in64nqiz7vx49myqj7z"))))
6096 (build-system python-build-system)
6097 (arguments
6098 ;; TODO: Package missing test dependencies.
6099 '(#:tests? #f
6100 #:phases
6101 (modify-phases %standard-phases
6102 ;; For cluster execution Snakemake will call Python. Since there is
6103 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
6104 ;; this by calling the snakemake wrapper instead.
6105 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
6106 (lambda* (#:key outputs #:allow-other-keys)
6107 (substitute* "snakemake/executors.py"
6108 (("\\{sys.executable\\} -m snakemake")
6109 (string-append (assoc-ref outputs "out")
6110 "/bin/snakemake")))
6111 #t)))))
6112 (propagated-inputs
6113 `(("python-gitpython" ,python-gitpython)
6114 ("python-wrapt" ,python-wrapt)
6115 ("python-requests" ,python-requests)
6116 ("python-appdirs" ,python-appdirs)
6117 ("python-configargparse" ,python-configargparse)
6118 ("python-datrie" ,python-datrie)
6119 ("python-docutils" ,python-docutils)
6120 ("python-jinja2" ,python-jinja2)
6121 ("python-jsonschema" ,python-jsonschema)
6122 ("python-networkx" ,python-networkx)
6123 ("python-pyyaml" ,python-pyyaml)
6124 ("python-ratelimiter" ,python-ratelimiter)))
6125 (home-page "https://snakemake.readthedocs.io")
6126 (synopsis "Python-based execution environment for make-like workflows")
6127 (description
6128 "Snakemake aims to reduce the complexity of creating workflows by
6129 providing a clean and modern domain specific specification language (DSL) in
6130 Python style, together with a fast and comfortable execution environment.")
6131 (license license:expat)))
6132
6133 ;; This is currently needed for the pigx-* packages.
6134 (define-public snakemake-4
6135 (package (inherit snakemake)
6136 (version "4.4.0")
6137 (source
6138 (origin
6139 (method url-fetch)
6140 (uri (pypi-uri "snakemake" version))
6141 (sha256
6142 (base32 "0g0paia4z7w3srnqdmavq3hrb2x7qnpf81jx50njl0p7y4y0j8jv"))))
6143 (propagated-inputs
6144 `(("python-wrapt" ,python-wrapt)
6145 ("python-requests" ,python-requests)
6146 ("python-appdirs" ,python-appdirs)
6147 ("python-configargparse" ,python-configargparse)
6148 ("python-pyyaml" ,python-pyyaml)
6149 ("python-ratelimiter" ,python-ratelimiter)))))
6150
6151 (define-public python-pyqrcode
6152 (package
6153 (name "python-pyqrcode")
6154 (version "1.2.1")
6155 (source
6156 (origin
6157 (method url-fetch)
6158 (uri (pypi-uri "PyQRCode" version))
6159 (sha256
6160 (base32
6161 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
6162 (build-system python-build-system)
6163 (home-page
6164 "https://github.com/mnooner256/pyqrcode")
6165 (synopsis "QR code generator")
6166 (description
6167 "Pyqrcode is a QR code generator written purely in Python with
6168 SVG, EPS, PNG and terminal output.")
6169 (license license:bsd-3)))
6170
6171 (define-public python-seaborn
6172 (package
6173 (name "python-seaborn")
6174 (version "0.9.0")
6175 (source
6176 (origin
6177 (method url-fetch)
6178 (uri (pypi-uri "seaborn" version))
6179 (sha256
6180 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))))
6181 (build-system python-build-system)
6182 (arguments
6183 `(#:phases
6184 (modify-phases %standard-phases
6185 (add-before 'check 'start-xserver
6186 (lambda* (#:key inputs #:allow-other-keys)
6187 (let ((xorg-server (assoc-ref inputs "xorg-server")))
6188 ;; There must be a running X server and make check doesn't
6189 ;; start one. Therefore we must do it.
6190 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
6191 (setenv "DISPLAY" ":1")
6192 #t)))
6193 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
6194 (propagated-inputs
6195 `(("python-pandas" ,python-pandas)
6196 ("python-matplotlib" ,python-matplotlib)
6197 ("python-numpy" ,python-numpy)
6198 ("python-scipy" ,python-scipy)))
6199 (native-inputs
6200 `(("python-pytest" ,python-pytest)
6201 ("xorg-server" ,xorg-server)))
6202 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
6203 (synopsis "Statistical data visualization")
6204 (description
6205 "Seaborn is a library for making attractive and informative statistical
6206 graphics in Python. It is built on top of matplotlib and tightly integrated
6207 with the PyData stack, including support for numpy and pandas data structures
6208 and statistical routines from scipy and statsmodels.")
6209 (license license:bsd-3)))
6210
6211 (define-public python2-seaborn
6212 (package-with-python2 python-seaborn))
6213
6214 (define-public python-mpmath
6215 (package
6216 (name "python-mpmath")
6217 (version "0.19")
6218 (source (origin
6219 (method url-fetch)
6220 (uri (string-append "http://mpmath.org/files/mpmath-"
6221 version ".tar.gz"))
6222 (sha256
6223 (base32
6224 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
6225 (build-system python-build-system)
6226 (arguments
6227 '(#:phases
6228 (modify-phases %standard-phases
6229 (replace 'check
6230 (lambda _
6231 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
6232 (home-page "http://mpmath.org")
6233 (synopsis "Arbitrary-precision floating-point arithmetic in python")
6234 (description
6235 "@code{mpmath} can be used as an arbitrary-precision substitute for
6236 Python's float/complex types and math/cmath modules, but also does much
6237 more advanced mathematics.")
6238 (license license:bsd-3)))
6239
6240 (define-public python2-mpmath
6241 (package-with-python2 python-mpmath))
6242
6243 (define-public python-bigfloat
6244 (package
6245 (name "python-bigfloat")
6246 (version "0.3.0")
6247 (source
6248 (origin
6249 (method url-fetch)
6250 (uri (pypi-uri "bigfloat" version))
6251 (sha256
6252 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
6253 (build-system python-build-system)
6254 (inputs
6255 `(("mpfr" ,mpfr)))
6256 (home-page "https://github.com/mdickinson/bigfloat")
6257 (synopsis "Arbitrary precision floating-point arithmetic for Python")
6258 (description
6259 "This package provides a Python interface to the MPFR library for
6260 multiprecision arithmetic.")
6261 (license license:lgpl3+)))
6262
6263 (define-public python2-bigfloat
6264 (package-with-python2 python-bigfloat))
6265
6266 (define-public python-sympy
6267 (package
6268 (name "python-sympy")
6269 (version "1.1.1")
6270 (source
6271 (origin
6272 (method url-fetch)
6273 (uri (string-append
6274 "https://github.com/sympy/sympy/releases/download/sympy-"
6275 version "/sympy-" version ".tar.gz"))
6276 (sha256
6277 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
6278 (build-system python-build-system)
6279 (arguments
6280 `(#:phases
6281 (modify-phases %standard-phases
6282 ;; Run the core tests after installation. By default it would run
6283 ;; *all* tests, which take a very long time to complete and are known
6284 ;; to be flaky.
6285 (delete 'check)
6286 (add-after 'install 'check
6287 (lambda* (#:key outputs #:allow-other-keys)
6288 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
6289 #t)))))
6290 (propagated-inputs
6291 `(("python-mpmath" ,python-mpmath)))
6292 (home-page "http://www.sympy.org/")
6293 (synopsis "Python library for symbolic mathematics")
6294 (description
6295 "SymPy is a Python library for symbolic mathematics. It aims to become a
6296 full-featured computer algebra system (CAS) while keeping the code as simple
6297 as possible in order to be comprehensible and easily extensible.")
6298 (license license:bsd-3)))
6299
6300 (define-public python2-sympy
6301 (package
6302 (inherit (package-with-python2 python-sympy))
6303 (arguments
6304 `(#:phases
6305 (modify-phases %standard-phases
6306 ;; Run the core tests after installation. By default it would run
6307 ;; *all* tests, which take a very long time to complete and are known
6308 ;; to be flaky.
6309 (delete 'check)
6310 (add-after 'install 'check
6311 (lambda* (#:key outputs #:allow-other-keys)
6312 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
6313 #t)))))))
6314
6315 (define-public python-q
6316 (package
6317 (name "python-q")
6318 (version "2.6")
6319 (source
6320 (origin
6321 (method url-fetch)
6322 (uri (pypi-uri "q" version))
6323 (sha256
6324 (base32
6325 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
6326 (build-system python-build-system)
6327 (home-page "https://github.com/zestyping/q")
6328 (synopsis "Quick-and-dirty debugging output for tired programmers")
6329 (description
6330 "q is a Python module for \"print\" style of debugging Python code. It
6331 provides convenient short API for print out of values, tracebacks, and
6332 falling into the Python interpreter.")
6333 (license license:asl2.0)))
6334
6335 (define-public python2-q
6336 (package-with-python2 python-q))
6337
6338 (define-public python2-xlib
6339 (package
6340 (name "python2-xlib")
6341 (version "0.14")
6342 (source (origin
6343 (method url-fetch)
6344 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6345 "/" version "/"
6346 "python-xlib-" version ".tar.gz"))
6347 (sha256
6348 (base32
6349 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6350 (build-system python-build-system)
6351 (arguments
6352 `(#:python ,python-2 ;Python 2 only
6353 #:tests? #f)) ;no tests
6354 (home-page "http://python-xlib.sourceforge.net/")
6355 (synopsis "Python X11 client library")
6356 (description
6357 "The Python X Library is intended to be a fully functional X client
6358 library for Python programs. It is useful to implement low-level X clients.
6359 It is written entirely in Python.")
6360 (license license:gpl2+)))
6361
6362 (define-public python-singledispatch
6363 (package
6364 (name "python-singledispatch")
6365 (version "3.4.0.3")
6366 (source
6367 (origin
6368 (method url-fetch)
6369 (uri (pypi-uri "singledispatch" version))
6370 (sha256
6371 (base32
6372 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6373 (build-system python-build-system)
6374 (native-inputs
6375 `(("python-six" ,python-six))) ; required for conversion, not at run-time
6376 (home-page
6377 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
6378 (synopsis "Backport of singledispatch feature from Python 3.4")
6379 (description
6380 "This library brings functools.singledispatch from Python 3.4 to Python
6381 2.6-3.3.")
6382 (license license:expat)))
6383
6384 (define-public python2-singledispatch
6385 (package-with-python2 python-singledispatch))
6386
6387 ;; the python- version can be removed with python-3.5
6388 (define-public python-backports-abc
6389 (package
6390 (name "python-backports-abc")
6391 (version "0.5")
6392 (source
6393 (origin
6394 (method url-fetch)
6395 (uri (pypi-uri "backports_abc" version))
6396 (sha256
6397 (base32
6398 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6399 (build-system python-build-system)
6400 (home-page "https://github.com/cython/backports_abc")
6401 (synopsis "Backport of additions to the 'collections.abc' module")
6402 (description
6403 "Python-backports-abc provides a backport of additions to the
6404 @code{collections.abc} module in Python-3.5.")
6405 (license license:psfl)))
6406
6407 (define-public python2-backports-abc
6408 (package-with-python2 python-backports-abc))
6409
6410 (define-public python-backports-csv
6411 (package
6412 (name "python-backports-csv")
6413 (version "1.0.5")
6414 (source
6415 (origin
6416 (method url-fetch)
6417 (uri (pypi-uri "backports.csv" version))
6418 (sha256
6419 (base32
6420 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
6421 (build-system python-build-system)
6422 (home-page "https://github.com/ryanhiebert/backports.csv")
6423 (synopsis "Backport of Python 3's csv module for Python 2")
6424 (description
6425 "Provides a backport of Python 3's @code{csv} module for parsing
6426 comma separated values. The API of the @code{csv} module in Python 2
6427 is drastically different from the @code{csv} module in Python 3.
6428 This is due, for the most part, to the difference between str in
6429 Python 2 and Python 3.")
6430 (license license:psfl)))
6431
6432 (define-public python2-backports-csv
6433 (package-with-python2 python-backports-csv))
6434
6435 (define-public python2-backports-shutil-get-terminal-size
6436 (package
6437 (name "python2-backports-shutil-get-terminal-size")
6438 (version "1.0.0")
6439 (source
6440 (origin
6441 (method url-fetch)
6442 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6443 (sha256
6444 (base32
6445 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6446 (build-system python-build-system)
6447 (arguments
6448 `(#:python ,python-2
6449 #:phases
6450 (modify-phases %standard-phases
6451 (replace 'check
6452 (lambda _
6453 (invoke "py.test" "-v"))))))
6454 (native-inputs
6455 `(("python2-pytest" ,python2-pytest)))
6456 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6457 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6458 (description
6459 "This package provides a backport of the @code{get_terminal_size
6460 function} from Python 3.3's @code{shutil}.
6461 Unlike the original version it is written in pure Python rather than C,
6462 so it might be a tiny bit slower.")
6463 (license license:expat)))
6464
6465 (define-public python-waf
6466 (package
6467 (name "python-waf")
6468 (version "2.0.11")
6469 (source (origin
6470 (method url-fetch)
6471 (uri (string-append "https://waf.io/"
6472 "waf-" version ".tar.bz2"))
6473 (sha256
6474 (base32
6475 "13zrniwkmfqgsgzi9v5m1367fppp9yzrz6z2ny6hy8dmpb8mj4z4"))))
6476 (build-system python-build-system)
6477 (arguments
6478 '(#:phases
6479 (modify-phases %standard-phases
6480 (replace 'build
6481 (lambda _
6482 (invoke "python" "waf-light" "configure" "build")))
6483 (replace 'check
6484 (lambda _
6485 (invoke "python" "waf" "--version")))
6486 (replace 'install
6487 (lambda* (#:key outputs #:allow-other-keys)
6488 (let ((out (assoc-ref outputs "out")))
6489 (install-file "waf" (string-append out "/bin")))
6490 #t))
6491 ;; waf breaks when it is wrapped.
6492 (delete 'wrap))))
6493 (home-page "https://waf.io/")
6494 (synopsis "Python-based build system")
6495 (description
6496 "Waf is a Python-based framework for configuring, compiling and installing
6497 applications.")
6498 (license license:bsd-3)))
6499
6500 (define-public python2-waf
6501 (package-with-python2 python-waf))
6502
6503 (define-public python-pyzmq
6504 (package
6505 (name "python-pyzmq")
6506 (version "17.1.2")
6507 (source
6508 (origin
6509 (method url-fetch)
6510 (uri (pypi-uri "pyzmq" version))
6511 (sha256
6512 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
6513 (build-system python-build-system)
6514 (arguments
6515 `(#:configure-flags
6516 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6517 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6518 ;; --inplace' for 'python setup.py test' to work.
6519 #:tests? #f))
6520 (inputs
6521 `(("zeromq" ,zeromq)))
6522 (native-inputs
6523 `(("pkg-config" ,pkg-config)
6524 ("python-nose" ,python-nose)))
6525 (home-page "https://github.com/zeromq/pyzmq")
6526 (synopsis "Python bindings for 0MQ")
6527 (description
6528 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
6529 (license license:bsd-4)))
6530
6531 (define-public python2-pyzmq
6532 (package-with-python2 python-pyzmq))
6533
6534 (define-public python-pep8
6535 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
6536 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
6537 ;; some dependents' test suites, and nothing more.
6538 (package
6539 (name "python-pep8")
6540 (version "1.7.0")
6541 (source
6542 (origin
6543 (method url-fetch)
6544 (uri (pypi-uri "pep8" version))
6545 (sha256
6546 (base32
6547 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
6548 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
6549 (build-system python-build-system)
6550 (home-page "https://pep8.readthedocs.org/")
6551 (synopsis "Python style guide checker")
6552 (description
6553 "This tools checks Python code against some of the style conventions in
6554 PEP 8.")
6555 (license license:expat)))
6556
6557 (define-public python2-pep8
6558 (package-with-python2 python-pep8))
6559
6560 (define-public python-pyflakes
6561 (package
6562 (name "python-pyflakes")
6563 (version "2.1.1")
6564 (source
6565 (origin
6566 (method url-fetch)
6567 (uri (pypi-uri "pyflakes" version))
6568 (sha256
6569 (base32
6570 "18pq95a1xj2dgdd0m85gyfsn40jajj4xc3lp8wfv7igqhrc86xnr"))))
6571 (build-system python-build-system)
6572 (home-page
6573 "https://github.com/pyflakes/pyflakes")
6574 (synopsis "Passive checker of Python programs")
6575 (description
6576 "Pyflakes statically checks Python source code for common errors.")
6577 (license license:expat)))
6578
6579 (define-public python2-pyflakes
6580 (package-with-python2 python-pyflakes))
6581
6582 (define-public python-mccabe
6583 (package
6584 (name "python-mccabe")
6585 (version "0.6.1")
6586 (source
6587 (origin
6588 (method url-fetch)
6589 (uri (pypi-uri "mccabe" version))
6590 (sha256
6591 (base32
6592 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
6593 (build-system python-build-system)
6594 (native-inputs
6595 `(("python-pytest" ,python-pytest-bootstrap)
6596 ("python-pytest-runner" ,python-pytest-runner)))
6597 (home-page "https://github.com/flintwork/mccabe")
6598 (synopsis "McCabe checker, plugin for flake8")
6599 (description
6600 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6601 complexity of Python source code.")
6602 (license license:expat)))
6603
6604 (define-public python2-mccabe
6605 (package-with-python2 python-mccabe))
6606
6607 (define-public python-mccabe-0.2.1
6608 (package (inherit python-mccabe)
6609 (version "0.2.1")
6610 (source
6611 (origin
6612 (method url-fetch)
6613 (uri (pypi-uri "mccabe" version))
6614 (sha256
6615 (base32
6616 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
6617
6618 (define-public python2-mccabe-0.2.1
6619 (package-with-python2 python-mccabe-0.2.1))
6620
6621 ;; Flake8 2.4.1 requires an older version of pep8.
6622 ;; This should be removed ASAP.
6623 (define-public python-pep8-1.5.7
6624 (package (inherit python-pep8)
6625 (version "1.5.7")
6626 (source
6627 (origin
6628 (method url-fetch)
6629 (uri (pypi-uri "pep8" version))
6630 (sha256
6631 (base32
6632 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
6633 (arguments
6634 ;; XXX Tests not compatible with Python 3.5.
6635 '(#:tests? #f))))
6636
6637 (define-public python2-pep8-1.5.7
6638 (package-with-python2 python-pep8-1.5.7))
6639
6640 ;; Flake8 2.4.1 requires an older version of pyflakes.
6641 ;; This should be removed ASAP.
6642 (define-public python-pyflakes-0.8.1
6643 (package (inherit python-pyflakes)
6644 (version "0.8.1")
6645 (source
6646 (origin
6647 (method url-fetch)
6648 (uri (pypi-uri "pyflakes" version))
6649 (sha256
6650 (base32
6651 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
6652 (arguments
6653 ;; XXX Tests not compatible with Python 3.5.
6654 '(#:tests? #f))))
6655
6656 (define-public python2-pyflakes-0.8.1
6657 (package-with-python2 python-pyflakes-0.8.1))
6658
6659 (define-public python-flake8
6660 (package
6661 (name "python-flake8")
6662 (version "3.7.7")
6663 (source (origin
6664 (method url-fetch)
6665 (uri (pypi-uri "flake8" version))
6666 (sha256
6667 (base32
6668 "0qg6zggqigrd4k3gv88shd1a27d0cwgfql8vfiq2c7rl7w3rd6c5"))))
6669 (build-system python-build-system)
6670 (arguments
6671 `(#:phases
6672 (modify-phases %standard-phases
6673 (delete 'check)
6674 (add-after 'install 'check
6675 (lambda* (#:key inputs outputs #:allow-other-keys)
6676 (add-installed-pythonpath inputs outputs)
6677 (invoke "pytest" "-v")
6678 #t)))))
6679 (propagated-inputs
6680 `(("python-pycodestyle" ,python-pycodestyle)
6681 ("python-entrypoints" ,python-entrypoints)
6682 ("python-pyflakes" ,python-pyflakes)
6683 ("python-mccabe" ,python-mccabe)))
6684 (native-inputs
6685 `(("python-mock" ,python-mock)
6686 ("python-pytest" ,python-pytest-bootstrap)
6687 ("python-pytest-runner" ,python-pytest-runner)))
6688 (home-page "https://gitlab.com/pycqa/flake8")
6689 (synopsis
6690 "The modular source code checker: pep8, pyflakes and co")
6691 (description
6692 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
6693 (properties `((python2-variant . ,(delay python2-flake8))))
6694 (license license:expat)))
6695
6696 (define-public python2-flake8
6697 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
6698 (package (inherit base)
6699 (propagated-inputs
6700 `(("python2-configparser" ,python2-configparser)
6701 ("python2-enum34" ,python2-enum34)
6702 ("python2-typing" ,python2-typing)
6703 ,@(package-propagated-inputs base))))))
6704
6705 ;; python-hacking requires flake8 <2.6.0.
6706 (define-public python-flake8-2.5
6707 (package
6708 (inherit python-flake8)
6709 (version "2.5.5")
6710 (source (origin
6711 (method url-fetch)
6712 (uri (pypi-uri "flake8" version))
6713 (sha256
6714 (base32
6715 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
6716 (propagated-inputs
6717 `(("python-pep8" ,python-pep8)
6718 ,@(package-propagated-inputs python-flake8)))
6719 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
6720
6721 (define-public python2-flake8-2.5
6722 (package
6723 (inherit python2-flake8)
6724 (version (package-version python-flake8-2.5))
6725 (source (origin
6726 (inherit (package-source python-flake8-2.5))))
6727 (propagated-inputs
6728 `(("python2-pep8" ,python2-pep8)
6729 ,@(package-propagated-inputs python2-flake8)))))
6730
6731 (define-public python-flake8-polyfill
6732 (package
6733 (name "python-flake8-polyfill")
6734 (version "1.0.2")
6735 (source
6736 (origin
6737 (method url-fetch)
6738 (uri (pypi-uri "flake8-polyfill" version))
6739 (sha256
6740 (base32
6741 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
6742 (build-system python-build-system)
6743 (arguments
6744 '(#:phases
6745 (modify-phases %standard-phases
6746 (replace 'check
6747 (lambda _
6748 ;; Be compatible with Pytest 4:
6749 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
6750 (substitute* "setup.cfg"
6751 (("\\[pytest\\]")
6752 "[tool:pytest]"))
6753
6754 (setenv "PYTHONPATH"
6755 (string-append (getcwd) "/build/lib:"
6756 (getenv "PYTHONPATH")))
6757 (invoke "py.test" "-v"))))))
6758 (native-inputs
6759 `(("python-flake8" ,python-flake8)
6760 ("python-mock" ,python-mock)
6761 ("python-pep8" ,python-pep8)
6762 ("python-pycodestyle" ,python-pycodestyle)
6763 ("python-pytest" ,python-pytest)))
6764 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6765 (synopsis "Polyfill package for Flake8 plugins")
6766 (description
6767 "This package that provides some compatibility helpers for Flake8
6768 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6769 (license license:expat)))
6770
6771 (define-public python2-flake8-polyfill
6772 (package-with-python2 python-flake8-polyfill))
6773
6774 (define-public python-mistune
6775 (package
6776 (name "python-mistune")
6777 (version "0.8.4")
6778 (source
6779 (origin
6780 (method url-fetch)
6781 (uri (pypi-uri "mistune" version))
6782 (sha256
6783 (base32
6784 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
6785 (build-system python-build-system)
6786 (native-inputs
6787 `(("python-nose" ,python-nose)
6788 ("python-cython" ,python-cython)))
6789 (home-page "https://github.com/lepture/mistune")
6790 (synopsis "Markdown parser in pure Python")
6791 (description "This package provides a fast markdown parser in pure
6792 Python.")
6793 (license license:bsd-3)))
6794
6795 (define-public python2-mistune
6796 (package-with-python2 python-mistune))
6797
6798 (define-public python-markdown
6799 (package
6800 (name "python-markdown")
6801 (version "3.1.1")
6802 (source
6803 (origin
6804 (method url-fetch)
6805 (uri (pypi-uri "Markdown" version))
6806 (sha256
6807 (base32
6808 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f"))))
6809 (build-system python-build-system)
6810 (native-inputs
6811 `(("python-nose" ,python-nose)
6812 ("python-pyyaml" ,python-pyyaml)))
6813 (home-page "https://python-markdown.github.io/")
6814 (synopsis "Python implementation of Markdown")
6815 (description
6816 "This package provides a Python implementation of John Gruber's
6817 Markdown. The library features international input, various Markdown
6818 extensions, and several HTML output formats. A command line wrapper
6819 markdown_py is also provided to convert Markdown files to HTML.")
6820 (license license:bsd-3)))
6821
6822 (define-public python2-markdown
6823 (package-with-python2 python-markdown))
6824
6825 (define-public python-ptyprocess
6826 (package
6827 (name "python-ptyprocess")
6828 (version "0.5.2")
6829 (source
6830 (origin
6831 (method url-fetch)
6832 (uri (pypi-uri "ptyprocess" version))
6833 (sha256
6834 (base32
6835 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
6836 (build-system python-build-system)
6837 (native-inputs
6838 `(("python-nose" ,python-nose)))
6839 (arguments
6840 `(#:phases
6841 (modify-phases %standard-phases
6842 (replace 'check
6843 (lambda _ (invoke "nosetests"))))))
6844 (home-page "https://github.com/pexpect/ptyprocess")
6845 (synopsis "Run a subprocess in a pseudo terminal")
6846 (description
6847 "This package provides a Python library used to launch a subprocess in a
6848 pseudo terminal (pty), and interact with both the process and its pty.")
6849 (license license:isc)))
6850
6851 (define-public python2-ptyprocess
6852 (package-with-python2 python-ptyprocess))
6853
6854 (define-public python-cram
6855 (package
6856 (name "python-cram")
6857 (version "0.7")
6858 (home-page "https://bitheap.org/cram/")
6859 (source (origin
6860 (method url-fetch)
6861 (uri (list (string-append home-page "cram-"
6862 version ".tar.gz")
6863 (pypi-uri "cram" version)))
6864 (sha256
6865 (base32
6866 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6867 (arguments
6868 '(#:phases
6869 (modify-phases %standard-phases
6870 (add-after 'unpack 'patch-source
6871 (lambda _
6872 (substitute* (find-files "cram" ".*\\.py$")
6873 ;; Replace default shell path.
6874 (("/bin/sh") (which "sh")))
6875 (substitute* (find-files "tests" ".*\\.t$")
6876 (("md5") "md5sum")
6877 (("/bin/bash") (which "bash"))
6878 (("/bin/sh") (which "sh")))
6879 (substitute* "cram/_test.py"
6880 ;; This hack works around a bug triggered by substituting
6881 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6882 ;; "cram -h", which breaks the output at 80 characters. This
6883 ;; causes the line showing the default shell to break into two
6884 ;; lines, but the test expects a single line...
6885 (("env\\['COLUMNS'\\] = '80'")
6886 "env['COLUMNS'] = '160'"))
6887
6888 (substitute* "Makefile"
6889 ;; Recent versions of python-coverage have caused the test
6890 ;; coverage to decrease (as of version 0.7). Allow that.
6891 (("--fail-under=100")
6892 "--fail-under=90"))
6893
6894 #t))
6895 (replace 'check
6896 ;; The test phase uses the built library and executable.
6897 (lambda* (#:key inputs outputs #:allow-other-keys)
6898 (add-installed-pythonpath inputs outputs)
6899 (setenv "PATH" (string-append (getenv "PATH") ":"
6900 (assoc-ref outputs "out") "/bin"))
6901 (invoke "make" "test"))))))
6902 (build-system python-build-system)
6903 (native-inputs
6904 `(("python-coverage" ,python-coverage)
6905 ("which" ,which)))
6906 (synopsis "Simple testing framework for command line applications")
6907 (description
6908 "Cram is a functional testing framework for command line applications.
6909 Cram tests look like snippets of interactive shell sessions. Cram runs each
6910 command and compares the command output in the test with the command’s actual
6911 output.")
6912 (license license:gpl2+)))
6913
6914 (define-public python2-cram
6915 (package-with-python2 python-cram))
6916
6917 (define-public python-straight-plugin
6918 (package
6919 (name "python-straight-plugin")
6920 (version "1.4.1")
6921 (source
6922 (origin
6923 (method url-fetch)
6924 (uri (pypi-uri "straight.plugin" version))
6925 (sha256
6926 (base32
6927 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6928 (build-system python-build-system)
6929 (home-page "https://github.com/ironfroggy/straight.plugin")
6930 (synopsis "Simple namespaced plugin facility")
6931 (description "Straight Plugin provides a type of plugin you can create from
6932 almost any existing Python modules, and an easy way for outside developers to
6933 add functionality and customization to your projects with their own plugins.")
6934 (license license:expat)))
6935
6936 (define-public python2-straight-plugin
6937 (package-with-python2 python-straight-plugin))
6938
6939 (define-public python-fonttools
6940 (package
6941 (name "python-fonttools")
6942 (version "3.38.0")
6943 (source (origin
6944 (method url-fetch)
6945 (uri (pypi-uri "fonttools" version ".zip"))
6946 (sha256
6947 (base32
6948 "12ripk3s7skgxr1bs9r8n13r94ym3s8iir7ivfixls9fa4dabmlh"))))
6949 (build-system python-build-system)
6950 (native-inputs
6951 `(("unzip" ,unzip)
6952 ("python-pytest" ,python-pytest)
6953 ("python-pytest-runner" ,python-pytest-runner)))
6954 (home-page "https://github.com/behdad/fonttools")
6955 (synopsis "Tools to manipulate font files")
6956 (description
6957 "FontTools/TTX is a library to manipulate font files from Python. It
6958 supports reading and writing of TrueType/OpenType fonts, reading and writing
6959 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6960 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6961 from an XML-based format.")
6962 (license license:expat)))
6963
6964 (define-public python2-fonttools
6965 (package-with-python2 python-fonttools))
6966
6967 (define-public python-ly
6968 (package
6969 (name "python-ly")
6970 (version "0.9.5")
6971 (source
6972 (origin
6973 (method url-fetch)
6974 (uri (pypi-uri name version))
6975 (sha256
6976 (base32
6977 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
6978 (build-system python-build-system)
6979 (arguments
6980 ;; FIXME: Some tests need network access.
6981 '(#:tests? #f))
6982 (synopsis "Tool and library for manipulating LilyPond files")
6983 (description "This package provides a Python library to parse, manipulate
6984 or create documents in LilyPond format. A command line program ly is also
6985 provided that can be used to do various manipulations with LilyPond files.")
6986 (home-page "https://pypi.python.org/pypi/python-ly")
6987 (license license:gpl2+)))
6988
6989 (define-public python-appdirs
6990 (package
6991 (name "python-appdirs")
6992 (version "1.4.3")
6993 (source
6994 (origin
6995 (method url-fetch)
6996 (uri (pypi-uri "appdirs" version))
6997 (sha256
6998 (base32
6999 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
7000 (build-system python-build-system)
7001 (home-page "https://github.com/ActiveState/appdirs")
7002 (synopsis
7003 "Determine platform-specific dirs, e.g. a \"user data dir\"")
7004 (description
7005 "This module provides a portable way of finding out where user data
7006 should be stored on various operating systems.")
7007 (license license:expat)))
7008
7009 (define-public python2-appdirs
7010 (package-with-python2 python-appdirs))
7011
7012 (define-public python-llfuse
7013 (package
7014 (name "python-llfuse")
7015 (version "1.3.5")
7016 (source (origin
7017 (method url-fetch)
7018 (uri (pypi-uri "llfuse" version ".tar.bz2"))
7019 (sha256
7020 (base32
7021 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
7022 (build-system python-build-system)
7023 (inputs
7024 `(("fuse" ,fuse)
7025 ("attr" ,attr)))
7026 (native-inputs
7027 `(("pkg-config" ,pkg-config)))
7028 (synopsis "Python bindings for FUSE")
7029 (description
7030 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
7031 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
7032 (license license:lgpl2.0+)
7033 (properties `((python2-variant . ,(delay python2-llfuse))))))
7034
7035 (define-public python2-llfuse
7036 (package (inherit (package-with-python2
7037 (strip-python2-variant python-llfuse)))
7038 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
7039
7040 ;; For attic-0.16
7041 (define-public python-llfuse-0.41
7042 (package (inherit python-llfuse)
7043 (version "0.41.1")
7044 (source (origin
7045 (method url-fetch)
7046 (uri (string-append
7047 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
7048 "llfuse-" version ".tar.bz2"))
7049 (sha256
7050 (base32
7051 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
7052 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
7053 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
7054 (license (list license:expat license:lgpl2.0+))))
7055
7056 (define-public python-msgpack
7057 (package
7058 (name "python-msgpack")
7059 (version "0.5.6")
7060 (source (origin
7061 (method url-fetch)
7062 (uri (pypi-uri "msgpack" version))
7063 (sha256
7064 (base32
7065 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
7066 (build-system python-build-system)
7067 (arguments
7068 `(#:modules ((guix build utils)
7069 (guix build python-build-system)
7070 (ice-9 ftw)
7071 (srfi srfi-1)
7072 (srfi srfi-26))
7073 #:phases
7074 (modify-phases %standard-phases
7075 (replace 'check
7076 (lambda _
7077 (let ((cwd (getcwd)))
7078 (setenv "PYTHONPATH"
7079 (string-append cwd "/build/"
7080 (find (cut string-prefix? "lib" <>)
7081 (scandir (string-append cwd "/build")))
7082 ":"
7083 (getenv "PYTHONPATH")))
7084 (invoke "pytest" "-v" "test")))))))
7085 (native-inputs
7086 `(("python-pytest" ,python-pytest)))
7087 (synopsis "MessagePack (de)serializer")
7088 (description "MessagePack is a fast, compact binary serialization format,
7089 suitable for similar data to JSON. This package provides CPython bindings for
7090 reading and writing MessagePack data.")
7091 (home-page "https://pypi.python.org/pypi/msgpack/")
7092 (license license:asl2.0)))
7093
7094 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
7095 ;; release 0.5. Some packages like borg still call it by the old name for now.
7096 ;; <https://bugs.gnu.org/30662>
7097 (define-public python-msgpack-transitional
7098 (package
7099 (inherit python-msgpack)
7100 (name "python-msgpack-transitional")
7101 (arguments
7102 (substitute-keyword-arguments (package-arguments python-msgpack)
7103 ((#:phases phases)
7104 `(modify-phases ,phases
7105 (add-after 'unpack 'configure-transitional
7106 (lambda _
7107 ;; Keep using the old name.
7108 (substitute* "setup.py"
7109 (("TRANSITIONAL = False")
7110 "TRANSITIONAL = 1"))
7111 #t))))))))
7112
7113 (define-public python2-msgpack
7114 (package-with-python2 python-msgpack))
7115
7116 (define-public python-netaddr
7117 (package
7118 (name "python-netaddr")
7119 (version "0.7.19")
7120 (source
7121 (origin
7122 (method url-fetch)
7123 (uri (pypi-uri "netaddr" version))
7124 (sha256
7125 (base32
7126 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
7127 (build-system python-build-system)
7128 (arguments `(#:tests? #f)) ;; No tests.
7129 (home-page "https://github.com/drkjam/netaddr/")
7130 (synopsis "Pythonic manipulation of network addresses")
7131 (description
7132 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
7133 and MAC network addresses.")
7134 (license license:bsd-3)))
7135
7136 (define-public python2-netaddr
7137 (package-with-python2 python-netaddr))
7138
7139 (define-public python2-pyroute2
7140 (package
7141 (name "python2-pyroute2")
7142 (version "0.5.6")
7143 (source
7144 (origin
7145 (method url-fetch)
7146 (uri (pypi-uri "pyroute2" version))
7147 (sha256
7148 (base32
7149 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
7150 (build-system python-build-system)
7151 (arguments
7152 `(#:python ,python-2)) ;Python 3.x is not supported
7153 (home-page "https://github.com/svinota/pyroute2")
7154 (synopsis "Python netlink library")
7155 (description
7156 "Pyroute2 is a pure Python netlink library with minimal dependencies.
7157 Supported netlink families and protocols include:
7158 @itemize
7159 @item rtnl, network settings - addresses, routes, traffic controls
7160 @item nfnetlink - netfilter API: ipset, nftables, ...
7161 @item ipq - simplest userspace packet filtering, iptables QUEUE target
7162 @item devlink - manage and monitor devlink-enabled hardware
7163 @item generic - generic netlink families
7164 @itemize
7165 @item nl80211 - wireless functions API (basic support)
7166 @item taskstats - extended process statistics
7167 @item acpi_events - ACPI events monitoring
7168 @item thermal_events - thermal events monitoring
7169 @item VFS_DQUOT - disk quota events monitoring
7170 @end itemize
7171 @end itemize")
7172 (license license:gpl2+)))
7173
7174 (define-public python-wrapt
7175 (package
7176 (name "python-wrapt")
7177 (version "1.11.2")
7178 (source
7179 (origin
7180 (method url-fetch)
7181 (uri (pypi-uri "wrapt" version))
7182 (sha256
7183 (base32
7184 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
7185 (build-system python-build-system)
7186 (arguments
7187 ;; Tests are not included in the tarball, they are only available in the
7188 ;; git repository.
7189 `(#:tests? #f))
7190 (home-page "https://github.com/GrahamDumpleton/wrapt")
7191 (synopsis "Module for decorators, wrappers and monkey patching")
7192 (description
7193 "The aim of the wrapt module is to provide a transparent object proxy for
7194 Python, which can be used as the basis for the construction of function
7195 wrappers and decorator functions.")
7196 (license license:bsd-2)))
7197
7198 (define-public python2-wrapt
7199 (package-with-python2 python-wrapt))
7200
7201 (define-public python-xlrd
7202 (package
7203 (name "python-xlrd")
7204 (version "1.0.0")
7205 (source (origin
7206 (method url-fetch)
7207 (uri (pypi-uri "xlrd" version))
7208 (sha256
7209 (base32
7210 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
7211 (build-system python-build-system)
7212 (arguments
7213 `(#:phases
7214 (modify-phases %standard-phases
7215 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
7216 ;; run tests instead for now.
7217 (replace 'check (lambda _ (invoke "nosetests"))))))
7218 (native-inputs `(("python-nose" ,python-nose)))
7219 (home-page "http://www.python-excel.org/")
7220 (synopsis "Library for extracting data from Excel files")
7221 (description "This package provides a library to extract data from
7222 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
7223 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
7224 Unicode-aware. It is not intended as an end-user tool.")
7225 (license license:bsd-3)))
7226
7227 (define-public python2-xlrd
7228 (package-with-python2 python-xlrd))
7229
7230 (define-public python-prettytable
7231 (package
7232 (name "python-prettytable")
7233 (version "0.7.2")
7234 (source
7235 (origin
7236 (method url-fetch)
7237 (uri (pypi-uri "prettytable" version ".tar.bz2"))
7238 (sha256
7239 (base32
7240 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7241 (build-system python-build-system)
7242 (home-page "http://code.google.com/p/prettytable/")
7243 (synopsis "Display tabular data in an ASCII table format")
7244 (description
7245 "A library designed to represent tabular data in visually appealing ASCII
7246 tables. PrettyTable allows for selection of which columns are to be printed,
7247 independent alignment of columns (left or right justified or centred) and
7248 printing of sub-tables by specifying a row range.")
7249 (license license:bsd-3)))
7250
7251 (define-public python2-prettytable
7252 (package-with-python2 python-prettytable))
7253
7254 (define-public python-tables
7255 (package
7256 (name "python-tables")
7257 (version "3.4.4")
7258 (source
7259 (origin
7260 (method url-fetch)
7261 (uri (pypi-uri "tables" version))
7262 (sha256
7263 (base32
7264 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
7265 (modules '((guix build utils)))
7266 (snippet
7267 '(begin
7268 ;; Remove pre-compiled .pyc files from source.
7269 (for-each delete-file-recursively
7270 (find-files "." "__pycache__" #:directories? #t))
7271 (for-each delete-file (find-files "." "\\.pyc$"))
7272 #t))))
7273 (build-system python-build-system)
7274 (arguments
7275 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7276 ;; or "check", so we must override the build and check phases.
7277 #:phases
7278 (modify-phases %standard-phases
7279 (add-after 'unpack 'use-gcc
7280 (lambda _
7281 (substitute* "setup.py"
7282 (("compiler = new_compiler\\(\\)" line)
7283 (string-append line
7284 "\ncompiler.set_executables(compiler='gcc',"
7285 "compiler_so='gcc',"
7286 "linker_exe='gcc',"
7287 "linker_so='gcc -shared')")))
7288 #t))
7289 (replace 'build
7290 (lambda* (#:key inputs #:allow-other-keys)
7291 (invoke "python" "setup.py" "build"
7292 (string-append "--hdf5="
7293 (assoc-ref inputs "hdf5")))))
7294 (replace 'check
7295 (lambda* (#:key inputs #:allow-other-keys)
7296 (invoke "python" "setup.py" "check"
7297 (string-append "--hdf5="
7298 (assoc-ref inputs "hdf5"))))))))
7299 (propagated-inputs
7300 `(("python-numexpr" ,python-numexpr)
7301 ("python-numpy" ,python-numpy)))
7302 (native-inputs
7303 `(("python-cython" ,python-cython)
7304 ("pkg-config" ,pkg-config)))
7305 (inputs
7306 `(("hdf5" ,hdf5)
7307 ("bzip2" ,bzip2)
7308 ("zlib" ,zlib)))
7309 (home-page "http://www.pytables.org/")
7310 (synopsis "Hierarchical datasets for Python")
7311 (description "PyTables is a package for managing hierarchical datasets and
7312 designed to efficiently cope with extremely large amounts of data.")
7313 (license license:bsd-3)))
7314
7315 (define-public python2-tables
7316 (package-with-python2 python-tables))
7317
7318 (define-public python-pyasn1
7319 (package
7320 (name "python-pyasn1")
7321 (version "0.4.3")
7322 (source
7323 (origin
7324 (method url-fetch)
7325 (uri (pypi-uri "pyasn1" version))
7326 (sha256
7327 (base32
7328 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
7329 (build-system python-build-system)
7330 (home-page "http://pyasn1.sourceforge.net/")
7331 (synopsis "ASN.1 types and codecs")
7332 (description
7333 "This is an implementation of ASN.1 types and codecs in Python. It is
7334 suitable for a wide range of protocols based on the ASN.1 specification.")
7335 (license license:bsd-2)))
7336
7337 (define-public python2-pyasn1
7338 (package-with-python2 python-pyasn1))
7339
7340 (define-public python-pyasn1-modules
7341 (package
7342 (name "python-pyasn1-modules")
7343 (version "0.2.2")
7344 (source
7345 (origin
7346 (method url-fetch)
7347 (uri (pypi-uri "pyasn1-modules" version))
7348 (sha256
7349 (base32
7350 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
7351 (build-system python-build-system)
7352 (propagated-inputs
7353 `(("python-pyasn1" ,python-pyasn1)))
7354 (home-page "https://sourceforge.net/projects/pyasn1/")
7355 (synopsis "ASN.1 codec implementations")
7356 (description
7357 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7358 implementations of ASN.1-based codecs and protocols.")
7359 (license license:bsd-3)))
7360
7361 (define-public python2-pyasn1-modules
7362 (package-with-python2 python-pyasn1-modules))
7363
7364 (define-public python-ipaddress
7365 (package
7366 (name "python-ipaddress")
7367 (version "1.0.22")
7368 (source (origin
7369 (method url-fetch)
7370 (uri (pypi-uri "ipaddress" version))
7371 (sha256
7372 (base32
7373 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
7374 (build-system python-build-system)
7375 (home-page "https://github.com/phihag/ipaddress")
7376 (synopsis "IP address manipulation library")
7377 (description
7378 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7379 in Python. This library is used to create, poke at, and manipulate IPv4 and
7380 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7381 module to older versions of Python.")
7382 (license license:psfl)))
7383
7384 (define-public python2-ipaddress
7385 (package-with-python2 python-ipaddress))
7386
7387 (define-public python2-ipaddr
7388 (package
7389 (name "python2-ipaddr")
7390 (version "2.1.11")
7391 (source
7392 (origin
7393 (method url-fetch)
7394 (uri (pypi-uri "ipaddr" version))
7395 (sha256
7396 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7397 (build-system python-build-system)
7398 (arguments
7399 `(#:python ,python-2 ;version 2 only
7400 #:phases
7401 (modify-phases %standard-phases
7402 (replace 'check
7403 (lambda _ (invoke "python" "ipaddr_test.py"))))))
7404 (home-page "https://github.com/google/ipaddr-py")
7405 (synopsis "IP address manipulation library")
7406 (description
7407 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7408 IPv6 addresses and networks.
7409
7410 For new implementations you may prefer to use the standard module
7411 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
7412 versions of Python.")
7413 (license license:asl2.0)))
7414
7415 (define-public python-idna
7416 (package
7417 (name "python-idna")
7418 (version "2.8")
7419 (source
7420 (origin
7421 (method url-fetch)
7422 (uri (pypi-uri "idna" version))
7423 (sha256
7424 (base32
7425 "01rlkigdxg17sf9yar1jl8n18ls59367wqh59hnawlyg53vb6my3"))))
7426 (build-system python-build-system)
7427 (home-page "https://github.com/kjd/idna")
7428 (synopsis "Internationalized domain names in applications")
7429 (description
7430 "This is a library to support the Internationalised Domain Names in
7431 Applications (IDNA) protocol as specified in RFC 5891. This version of the
7432 protocol is often referred to as “IDNA2008” and can produce different results
7433 from the earlier standard from 2003. The library is also intended to act as a
7434 suitable drop-in replacement for the “encodings.idna” module that comes with
7435 the Python standard library but currently only supports the older 2003
7436 specification.")
7437 (license license:bsd-4)))
7438
7439 (define-public python-idna-2.7
7440 (package (inherit python-idna)
7441 (version "2.7")
7442 (source (origin
7443 (method url-fetch)
7444 (uri (pypi-uri "idna" version))
7445 (sha256
7446 (base32
7447 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
7448
7449
7450 (define-public python2-idna
7451 (package-with-python2 python-idna))
7452
7453 (define-public python-idna-ssl
7454 (package
7455 (name "python-idna-ssl")
7456 (version "1.0.1")
7457 (source
7458 (origin
7459 (method url-fetch)
7460 (uri (pypi-uri "idna-ssl" version))
7461 (sha256
7462 (base32
7463 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
7464 (build-system python-build-system)
7465 (arguments
7466 `(#:tests? #f)) ;circular dependency with python-aiohttp
7467 (home-page "https://github.com/aio-libs/idna-ssl")
7468 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
7469 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
7470 domains support.")
7471 (license license:expat)))
7472
7473 (define-public python-pretend
7474 (package
7475 (name "python-pretend")
7476 (version "1.0.9")
7477 (source
7478 (origin
7479 (method url-fetch)
7480 (uri (pypi-uri "pretend" version))
7481 (sha256
7482 (base32
7483 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
7484 (build-system python-build-system)
7485 (home-page "https://github.com/alex/pretend")
7486 (synopsis "Library for stubbing in Python")
7487 (description
7488 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7489 technique for writing tests. You may hear the term mixed up with mocks,
7490 fakes, or doubles. Basically, a stub is an object that returns pre-canned
7491 responses, rather than doing any computation.")
7492 (license license:bsd-3)))
7493
7494 (define-public python2-pretend
7495 (package-with-python2 python-pretend))
7496
7497 (define-public python-pip
7498 (package
7499 (name "python-pip")
7500 (version "19.2.1")
7501 (source
7502 (origin
7503 (method url-fetch)
7504 (uri (pypi-uri "pip" version))
7505 (sha256
7506 (base32
7507 "100sd12ss4mbdj5lf3wawad29cm573b27765mq098x6xhcj71395"))))
7508 (build-system python-build-system)
7509 (arguments
7510 '(#:tests? #f)) ; there are no tests in the pypi archive.
7511 (home-page "https://pip.pypa.io/")
7512 (synopsis "Package manager for Python software")
7513 (description
7514 "Pip is a package manager for Python software, that finds packages on the
7515 Python Package Index (PyPI).")
7516 (license license:expat)))
7517
7518 (define-public python2-pip
7519 (package-with-python2 python-pip))
7520
7521 (define-public python-tlsh
7522 (package
7523 (name "python-tlsh")
7524 (version "3.4.5")
7525 (home-page "https://github.com/trendmicro/tlsh")
7526 (source
7527 (origin
7528 (method git-fetch)
7529 (uri (git-reference
7530 (url "https://github.com/trendmicro/tlsh.git")
7531 (commit (string-append "v" version))))
7532 (file-name (git-file-name name version))
7533 (sha256
7534 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
7535 (build-system cmake-build-system)
7536 (arguments
7537 '(#:out-of-source? #f
7538 #:phases (modify-phases %standard-phases
7539 (replace
7540 'install
7541 (lambda* (#:key outputs #:allow-other-keys)
7542 ;; Build and install the Python bindings. The underlying
7543 ;; C++ library is apparently not meant to be installed.
7544 (let ((out (assoc-ref outputs "out")))
7545 (with-directory-excursion "py_ext"
7546 (and (system* "python" "setup.py" "build")
7547 (system* "python" "setup.py" "install"
7548 (string-append "--prefix=" out))))))))))
7549 (inputs `(("python" ,python-wrapper))) ;for the bindings
7550 (synopsis "Fuzzy matching library for Python")
7551 (description
7552 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7553 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7554 value which can be used for similarity comparisons. Similar objects have
7555 similar hash values, which allows for the detection of similar objects by
7556 comparing their hash values. The byte stream should have a sufficient amount
7557 of complexity; for example, a byte stream of identical bytes will not generate
7558 a hash value.")
7559 (license license:asl2.0)))
7560
7561 (define-public python2-tlsh
7562 (package
7563 (inherit python-tlsh)
7564 (name "python2-tlsh")
7565 (inputs `(("python" ,python-2)))))
7566
7567 (define-public python-termcolor
7568 (package
7569 (name "python-termcolor")
7570 (version "1.1.0")
7571 (source
7572 (origin
7573 (method url-fetch)
7574 (uri (pypi-uri "termcolor" version))
7575 (sha256
7576 (base32
7577 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7578 (build-system python-build-system)
7579 (arguments
7580 ;; There are no tests.
7581 `(#:tests? #f))
7582 (home-page "https://pypi.python.org/pypi/termcolor")
7583 (synopsis "ANSII Color formatting for terminal output")
7584 (description
7585 "This package provides ANSII Color formatting for output in terminals.")
7586 (license license:expat)))
7587
7588 (define-public python2-termcolor
7589 (package-with-python2 python-termcolor))
7590
7591 (define-public python-libarchive-c
7592 (package
7593 (name "python-libarchive-c")
7594 (version "2.8")
7595 (source (origin
7596 (method url-fetch)
7597 (uri (pypi-uri "libarchive-c" version))
7598 (sha256
7599 (base32
7600 "0qg0v1s9c1xdk9philhnv8k6c6nicvnvfwlc0j9srg90jmdlvm06"))))
7601 (build-system python-build-system)
7602 (arguments
7603 '(#:phases (modify-phases %standard-phases
7604 (add-before
7605 'build 'reference-libarchive
7606 (lambda* (#:key inputs #:allow-other-keys)
7607 ;; Retain the absolute file name of libarchive.so.
7608 (let ((libarchive (assoc-ref inputs "libarchive")))
7609 (substitute* "libarchive/ffi.py"
7610 (("find_library\\('archive'\\)")
7611 (string-append "'" libarchive
7612 "/lib/libarchive.so'"))))))
7613 (replace 'check
7614 (lambda _ (invoke "pytest" "-vv"))))))
7615 (native-inputs
7616 `(("python-mock" ,python-mock)
7617 ("python-pytest" ,python-pytest)))
7618 (inputs
7619 `(("libarchive" ,libarchive)))
7620 (home-page "https://github.com/Changaco/python-libarchive-c")
7621 (synopsis "Python interface to libarchive")
7622 (description
7623 "This package provides Python bindings to libarchive, a C library to
7624 access possibly compressed archives in many different formats. It uses
7625 Python's @code{ctypes} foreign function interface (FFI).")
7626 (license license:lgpl2.0+)))
7627
7628 (define-public python2-libarchive-c
7629 (package-with-python2 python-libarchive-c))
7630
7631 (define-public python-file
7632 (package
7633 (inherit file)
7634 (name "python-file")
7635 (build-system python-build-system)
7636 (arguments
7637 '(#:tests? #f ;no tests
7638 #:configure-flags '("--single-version-externally-managed" "--root=/")
7639 #:phases (modify-phases %standard-phases
7640 (add-before 'build 'change-directory
7641 (lambda _
7642 (chdir "python")
7643 #t))
7644 (add-before 'build 'set-library-file-name
7645 (lambda* (#:key inputs #:allow-other-keys)
7646 (let ((file (assoc-ref inputs "file")))
7647 (substitute* "magic.py"
7648 (("find_library\\('magic'\\)")
7649 (string-append "'" file "/lib/libmagic.so'")))
7650 #t))))))
7651 (inputs `(("file" ,file)))
7652 (native-inputs (if (%current-target-system)
7653 `(("self" ,this-package))
7654 '()))
7655 (synopsis "Python bindings to the libmagic file type guesser. Note that
7656 this module and the python-magic module both provide a \"magic.py\" file;
7657 these two modules, which are different and were developed separately, both
7658 serve the same purpose: provide Python bindings for libmagic.")))
7659
7660 (define-public python2-file
7661 (package-with-python2 python-file))
7662
7663 (define-public python-debian
7664 (package
7665 (name "python-debian")
7666 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
7667 (version "0.1.36")
7668 (source
7669 (origin
7670 ;; Use git-fetch, as pypi doesn't include test suite.
7671 (method git-fetch)
7672 (uri (git-reference
7673 (url home-page)
7674 (commit version)))
7675 (file-name (git-file-name name version))
7676 (sha256
7677 (base32
7678 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
7679 (build-system python-build-system)
7680 (arguments
7681 `(#:phases (modify-phases %standard-phases
7682 (add-after 'unpack 'remove-debian-specific-tests
7683 ;; python-apt, apt and dpkg are not yet available in guix,
7684 ;; and these tests heavily depend on them.
7685 (lambda _
7686 (delete-file "lib/debian/tests/test_deb822.py")
7687 (delete-file "lib/debian/tests/test_debfile.py")
7688 #t)))))
7689 (propagated-inputs
7690 `(("python-six" ,python-six)
7691 ("python-chardet" ,python-chardet)))
7692 (synopsis "Debian package related modules")
7693 (description
7694 ;; XXX: Use @enumerate instead of @itemize to work around
7695 ;; <http://bugs.gnu.org/21772>.
7696 "This package provides Python modules that abstract many formats of
7697 Debian-related files, such as:
7698
7699 @enumerate
7700 @item Debtags information;
7701 @item @file{debian/changelog} files;
7702 @item packages files, pdiffs;
7703 @item control files of single or multiple RFC822-style paragraphs---e.g.
7704 @file{debian/control}, @file{.changes}, @file{.dsc};
7705 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7706 contained files and meta-information.
7707 @end enumerate\n")
7708
7709 ;; Modules are either GPLv2+ or GPLv3+.
7710 (license license:gpl3+)))
7711
7712 (define-public python2-debian
7713 (package-with-python2 python-debian))
7714
7715 (define-public python-nbformat
7716 (package
7717 (name "python-nbformat")
7718 (version "4.4.0")
7719 (source
7720 (origin
7721 (method url-fetch)
7722 (uri (pypi-uri "nbformat" version))
7723 (sha256
7724 (base32
7725 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
7726 (build-system python-build-system)
7727 (arguments `(#:tests? #f)) ; no test target
7728 (propagated-inputs
7729 `(("python-ipython-genutils" ,python-ipython-genutils)
7730 ("python-jsonschema" ,python-jsonschema)
7731 ("python-jupyter-core" ,python-jupyter-core)
7732 ("python-traitlets" ,python-traitlets)))
7733 (home-page "http://jupyter.org")
7734 (synopsis "Jupyter Notebook format")
7735 (description "This package provides the reference implementation of the
7736 Jupyter Notebook format and Python APIs for working with notebooks.")
7737 (license license:bsd-3)))
7738
7739 (define-public python2-nbformat
7740 (package-with-python2 python-nbformat))
7741
7742 (define-public python-bleach
7743 (package
7744 (name "python-bleach")
7745 (version "3.1.0")
7746 (source
7747 (origin
7748 (method url-fetch)
7749 (uri (pypi-uri "bleach" version))
7750 (sha256
7751 (base32
7752 "1yhrgrhkln8bd6gn3imj69g1h4xqah9gaz9q26crqr6gmmvpzprz"))))
7753 (build-system python-build-system)
7754 (propagated-inputs
7755 `(("python-webencodings" ,python-webencodings)
7756 ("python-six" ,python-six)))
7757 (native-inputs
7758 `(("python-pytest" ,python-pytest)
7759 ("python-pytest-runner" ,python-pytest-runner-2)))
7760 (home-page "https://github.com/jsocol/bleach")
7761 (synopsis "Whitelist-based HTML-sanitizing tool")
7762 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7763 (license license:asl2.0)))
7764
7765 (define-public python2-bleach
7766 (package-with-python2 python-bleach))
7767
7768 (define-public python-entrypoints
7769 (package
7770 (name "python-entrypoints")
7771 (version "0.3")
7772 (source
7773 (origin
7774 (method url-fetch)
7775 (uri (pypi-uri "entrypoints" version))
7776 (sha256
7777 (base32
7778 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
7779 (build-system python-build-system)
7780 ;; The package does not come with a setup.py file, so we have to generate
7781 ;; one ourselves.
7782 (arguments
7783 `(#:tests? #f
7784 #:phases
7785 (modify-phases %standard-phases
7786 (add-after 'unpack 'create-setup.py
7787 (lambda _
7788 (call-with-output-file "setup.py"
7789 (lambda (port)
7790 (format port "\
7791 from setuptools import setup
7792 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7793 " ,version))))))))
7794 (home-page "https://github.com/takluyver/entrypoints")
7795 (synopsis "Discover and load entry points from installed Python packages")
7796 (description "Entry points are a way for Python packages to advertise
7797 objects with some common interface. The most common examples are
7798 @code{console_scripts} entry points, which define shell commands by
7799 identifying a Python function to run. The @code{entrypoints} module contains
7800 functions to find and load entry points.")
7801 (license license:expat)))
7802
7803 (define-public python2-entrypoints
7804 (package-with-python2 python-entrypoints))
7805
7806 (define-public python-nbconvert
7807 (package
7808 (name "python-nbconvert")
7809 (version "5.0.0b1")
7810 (source
7811 (origin
7812 (method url-fetch)
7813 (uri (pypi-uri "nbconvert" version))
7814 (sha256
7815 (base32
7816 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7817 (build-system python-build-system)
7818 (arguments
7819 `(;; The "bdist_egg" target is disabled by default, causing the installation
7820 ;; to fail.
7821 #:configure-flags (list "bdist_egg")
7822 ;; FIXME: 5 failures, 40 errors.
7823 #:tests? #f))
7824 ;; #:phases
7825 ;; (modify-phases %standard-phases
7826 ;; (replace 'check
7827 ;; (lambda _
7828 ;; (zero? (system* "py.test" "-v")))))
7829 (native-inputs
7830 `(("python-pytest" ,python-pytest)))
7831 (propagated-inputs
7832 `(("python-bleach" ,python-bleach)
7833 ("python-entrypoints" ,python-entrypoints)
7834 ("python-jinja2" ,python-jinja2)
7835 ("python-jupyter-core" ,python-jupyter-core)
7836 ("python-mistune" ,python-mistune)
7837 ("python-nbformat" ,python-nbformat)
7838 ("python-pygments" ,python-pygments)
7839 ("python-traitlets" ,python-traitlets)))
7840 (home-page "http://jupyter.org")
7841 (synopsis "Converting Jupyter Notebooks")
7842 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7843 notebooks to various other formats via Jinja templates. It allows you to
7844 convert an @code{.ipynb} notebook file into various static formats including:
7845
7846 @enumerate
7847 @item HTML
7848 @item LaTeX
7849 @item PDF
7850 @item Reveal JS
7851 @item Markdown (md)
7852 @item ReStructured Text (rst)
7853 @item executable script
7854 @end enumerate\n")
7855 (license license:bsd-3)))
7856
7857 (define-public python2-nbconvert
7858 (package-with-python2 python-nbconvert))
7859
7860 (define-public python-notebook
7861 (package
7862 (name "python-notebook")
7863 (version "5.7.4")
7864 (source (origin
7865 (method url-fetch)
7866 (uri (pypi-uri "notebook" version))
7867 (sha256
7868 (base32
7869 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
7870 (build-system python-build-system)
7871 (arguments
7872 `(#:phases
7873 (modify-phases %standard-phases
7874 (replace 'check
7875 (lambda _
7876 ;; These tests require a browser
7877 (delete-file-recursively "notebook/tests/selenium")
7878 ;; Some tests need HOME
7879 (setenv "HOME" "/tmp")
7880 ;; This file contains "warningfilters", which are not supported
7881 ;; by this version of nose.
7882 (delete-file "setup.cfg")
7883 (with-directory-excursion "/tmp"
7884 (invoke "nosetests" "-v"))
7885 #t)))))
7886 (propagated-inputs
7887 `(("python-jupyter-core" ,python-jupyter-core)
7888 ("python-nbformat" ,python-nbformat)
7889 ("python-nbconvert" ,python-nbconvert)
7890 ("python-prometheus-client" ,python-prometheus-client)
7891 ("python-send2trash" ,python-send2trash)
7892 ("python-terminado" ,python-terminado)))
7893 (native-inputs
7894 `(("python-nose" ,python-nose)
7895 ("python-sphinx" ,python-sphinx)
7896 ("python-requests" ,python-requests)))
7897 (home-page "http://jupyter.org/")
7898 (synopsis "Web-based notebook environment for interactive computing")
7899 (description
7900 "The Jupyter HTML notebook is a web-based notebook environment for
7901 interactive computing.")
7902 (properties `((python2-variant . ,(delay python2-notebook))))
7903 (license license:bsd-3)))
7904
7905 (define-public python2-notebook
7906 (let ((base (package-with-python2
7907 (strip-python2-variant python-notebook))))
7908 (package (inherit base)
7909 (native-inputs
7910 `(("python2-mock" ,python2-mock)
7911 ,@(package-native-inputs base)))
7912 (arguments
7913 (substitute-keyword-arguments (package-arguments base)
7914 ((#:phases phases)
7915 `(modify-phases ,phases
7916 (add-before 'check 'disable-test-case
7917 ;; The test requires network access to localhost. Curiously it
7918 ;; fails with Python 2 only. Simply make the test-case return
7919 ;; immediately.
7920 (lambda _
7921 (substitute*
7922 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7923 (("formats = self.nbconvert_api") "return #")))))))))))
7924
7925 (define-public python-widgetsnbextension
7926 (package
7927 (name "python-widgetsnbextension")
7928 (version "3.4.2")
7929 (source
7930 (origin
7931 (method url-fetch)
7932 (uri (pypi-uri "widgetsnbextension" version))
7933 (sha256
7934 (base32
7935 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
7936 (build-system python-build-system)
7937 (propagated-inputs
7938 `(("python-ipykernel" ,python-ipykernel)
7939 ("python-notebook" ,python-notebook)))
7940 (native-inputs
7941 `(("python-certifi" ,python-certifi)
7942 ("python-nose" ,python-nose)))
7943 (home-page "https://ipython.org")
7944 (synopsis "IPython HTML widgets for Jupyter")
7945 (description "This package provides interactive HTML widgets for Jupyter
7946 notebooks.")
7947 (license license:bsd-3)))
7948
7949 (define-public python2-widgetsnbextension
7950 (package-with-python2 python-widgetsnbextension))
7951
7952 (define-public python-ipywidgets
7953 (package
7954 (name "python-ipywidgets")
7955 (version "5.2.2")
7956 (source
7957 (origin
7958 (method url-fetch)
7959 (uri (pypi-uri "ipywidgets" version))
7960 (sha256
7961 (base32
7962 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7963 (build-system python-build-system)
7964 (propagated-inputs
7965 `(("python-ipython" ,python-ipython)
7966 ("python-traitlets" ,python-traitlets)
7967 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7968 (native-inputs
7969 `(("python-nose" ,python-nose)
7970 ("python-pytest" ,python-pytest)))
7971 (home-page "https://ipython.org")
7972 (synopsis "IPython HTML widgets for Jupyter")
7973 (description "Ipywidgets are interactive HTML widgets for Jupyter
7974 notebooks and the IPython kernel. Notebooks come alive when interactive
7975 widgets are used. Users gain control of their data and can visualize changes
7976 in the data.")
7977 (license license:bsd-3)))
7978
7979 (define-public python2-ipywidgets
7980 (package-with-python2 python-ipywidgets))
7981
7982 (define-public python-jupyter-console
7983 (package
7984 (name "python-jupyter-console")
7985 (version "6.0.0")
7986 (source
7987 (origin
7988 (method url-fetch)
7989 (uri (pypi-uri "jupyter_console" version))
7990 (sha256
7991 (base32
7992 "1xdjw11cppf1fxvwkw2bk13ckkwas3bdah8baingn9296mvfi31h"))))
7993 (build-system python-build-system)
7994 (propagated-inputs
7995 `(("python-ipykernel" ,python-ipykernel)
7996 ("python-jupyter-client" ,python-jupyter-client)
7997 ("python-prompt-toolkit" ,python-prompt-toolkit)
7998 ("python-pygments" ,python-pygments)))
7999 (native-inputs
8000 `(("python-nose" ,python-nose)))
8001 (home-page "https://jupyter.org")
8002 (synopsis "Jupyter terminal console")
8003 (description "This package provides a terminal-based console frontend for
8004 Jupyter kernels. It also allows for console-based interaction with non-Python
8005 Jupyter kernels such as IJulia and IRKernel.")
8006 (license license:bsd-3)))
8007
8008 (define-public python2-jupyter-console
8009 (package
8010 (name "python2-jupyter-console")
8011 (version "5.2.0")
8012 (source
8013 (origin
8014 (method url-fetch)
8015 (uri (pypi-uri "jupyter_console" version))
8016 (sha256
8017 (base32
8018 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
8019 (build-system python-build-system)
8020 ;; Tests only run in an TTY.
8021 (arguments `(#:tests? #f))
8022 (propagated-inputs
8023 `(("python2-ipykernel" ,python2-ipykernel)
8024 ("python2-jupyter-client" ,python2-jupyter-client)
8025 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
8026 ("python2-pygments" ,python2-pygments)))
8027 (native-inputs
8028 `(("python2-nose" ,python2-nose)))
8029 (home-page "https://jupyter.org")
8030 (synopsis "Jupyter terminal console")
8031 (description "This package provides a terminal-based console frontend for
8032 Jupyter kernels. It also allows for console-based interaction with non-Python
8033 Jupyter kernels such as IJulia and IRKernel.")
8034 (license license:bsd-3)))
8035
8036 ;; The python-ipython and python-jupyter-console require each other. To get
8037 ;; the functionality in both packages working, strip down the
8038 ;; python-jupyter-console package when using it as an input to python-ipython.
8039 (define python-jupyter-console-minimal
8040 (package
8041 (inherit python-jupyter-console)
8042 (name "python-jupyter-console-minimal")
8043 (arguments
8044 (substitute-keyword-arguments
8045 (package-arguments python-jupyter-console)
8046 ((#:phases phases)
8047 `(modify-phases ,phases
8048 (add-after 'install 'delete-bin
8049 (lambda* (#:key outputs #:allow-other-keys)
8050 ;; Delete the bin files, to avoid conflicts in profiles
8051 ;; where python-ipython and python-jupyter-console are
8052 ;; both present.
8053 (delete-file-recursively
8054 (string-append
8055 (assoc-ref outputs "out") "/bin"))))))))
8056 ;; Remove the python-ipython propagated input, to avoid the cycle
8057 (propagated-inputs
8058 (alist-delete
8059 "python-ipython"
8060 (package-propagated-inputs python-jupyter-console)))))
8061
8062 (define-public python-qtconsole
8063 (package
8064 (name "python-qtconsole")
8065 (version "4.4.3")
8066 (source
8067 (origin
8068 (method url-fetch)
8069 (uri (pypi-uri "qtconsole" version))
8070 (sha256
8071 (base32
8072 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
8073 (build-system python-build-system)
8074 (arguments
8075 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
8076 ;; but we only have the LTS version 5.x. This means that there might be
8077 ;; runtime errors, but since this is a dependency of the Jupyter package,
8078 ;; and Jupyter can be used without the qtconsole we can overlook this for
8079 ;; now.
8080 `(#:tests? #f
8081 #:phases
8082 (modify-phases %standard-phases
8083 (add-before 'check 'pre-check
8084 (lambda _
8085 (setenv "QT_QPA_PLATFORM" "offscreen")
8086 #t)))))
8087 (propagated-inputs
8088 `(("python-ipykernel" ,python-ipykernel)
8089 ("python-ipython" ,python-ipython)))
8090 (native-inputs
8091 `(("python-pytest" ,python-pytest)))
8092 (home-page "http://jupyter.org")
8093 (synopsis "Jupyter Qt console")
8094 (description "This package provides a Qt-based console for Jupyter with
8095 support for rich media output.")
8096 (license license:bsd-3)))
8097
8098 (define-public python-jsbeautifier
8099 (package
8100 (name "python-jsbeautifier")
8101 (version "1.10.2")
8102 (home-page "https://github.com/beautify-web/js-beautify")
8103 (source (origin
8104 (method git-fetch)
8105 (uri (git-reference
8106 (url home-page)
8107 (commit (string-append "v" version))))
8108 (file-name (git-file-name name version))
8109 (sha256
8110 (base32
8111 "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg"))))
8112 (build-system python-build-system)
8113 (arguments
8114 `(#:phases (modify-phases %standard-phases
8115 (add-after 'unpack 'chdir
8116 (lambda _
8117 ;; The upstream Git repository contains all the code,
8118 ;; but this package only builds the python code.
8119 (chdir "python")
8120 #t))
8121 (add-after 'unpack 'patch-python-six-requirements
8122 (lambda _
8123 (substitute* "python/setup.py"
8124 (("six>=1.12.0")
8125 "six>=1.11.0"))
8126 #t)))))
8127 (propagated-inputs
8128 `(("python-editorconfig" ,python-editorconfig)
8129 ("python-six" ,python-six)))
8130 (native-inputs
8131 `(("python-pytest" ,python-pytest)))
8132 (synopsis "JavaScript unobfuscator and beautifier")
8133 (description "Beautify, unpack or deobfuscate JavaScript, leveraging
8134 popular online obfuscators.")
8135 (license license:expat)))
8136
8137 (define-public jupyter
8138 (package
8139 (name "jupyter")
8140 (version "1.0.0")
8141 (source
8142 (origin
8143 (method url-fetch)
8144 (uri (pypi-uri "jupyter" version))
8145 (sha256
8146 (base32
8147 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
8148 (build-system python-build-system)
8149 (arguments '(#:tests? #f)) ; there are none.
8150 (propagated-inputs
8151 `(("python-ipykernel" ,python-ipykernel)
8152 ("python-ipywidgets" ,python-ipywidgets)
8153 ("python-jupyter-console" ,python-jupyter-console)
8154 ("python-nbconvert" ,python-nbconvert)
8155 ("python-notebook" ,python-notebook)
8156 ("python-qtconsole" ,python-qtconsole)))
8157 (native-search-paths
8158 (list (search-path-specification
8159 (variable "JUPYTER_PATH")
8160 (files '("share/jupyter")))))
8161 (home-page "https://jupyter.org")
8162 (synopsis "Web application for interactive documents")
8163 (description
8164 "The Jupyter Notebook is a web application that allows you to create and
8165 share documents that contain live code, equations, visualizations and
8166 explanatory text. Uses include: data cleaning and transformation, numerical
8167 simulation, statistical modeling, machine learning and much more.")
8168 (license license:bsd-3)))
8169
8170 (define-public python-chardet
8171 (package
8172 (name "python-chardet")
8173 (version "3.0.4")
8174 (source
8175 (origin
8176 (method url-fetch)
8177 (uri (pypi-uri "chardet" version))
8178 (sha256
8179 (base32
8180 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
8181 (native-inputs
8182 `(("python-hypothesis" ,python-hypothesis)
8183 ("python-pytest" ,python-pytest)
8184 ("python-pytest-runner" ,python-pytest-runner)))
8185 (build-system python-build-system)
8186 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
8187 (arguments `(#:tests? #f))
8188 (home-page "https://github.com/chardet/chardet")
8189 (synopsis "Universal encoding detector for Python 2 and 3")
8190 (description
8191 "This package provides @code{chardet}, a Python module that can
8192 automatically detect a wide range of file encodings.")
8193 (license license:lgpl2.1+)))
8194
8195 (define-public python2-chardet
8196 (package-with-python2 python-chardet))
8197
8198 (define-public python-docopt
8199 (package
8200 (name "python-docopt")
8201 (version "0.6.2")
8202 (source
8203 (origin
8204 (method url-fetch)
8205 ;; The release on PyPI does not include tests.
8206 (uri (string-append
8207 "https://github.com/docopt/docopt/archive/"
8208 version ".tar.gz"))
8209 (file-name (string-append name "-" version ".tar.gz"))
8210 (sha256
8211 (base32
8212 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
8213 (build-system python-build-system)
8214 (native-inputs
8215 `(("python-pytest" ,python-pytest)))
8216 (arguments
8217 `(#:phases
8218 (modify-phases %standard-phases
8219 (replace 'check
8220 (lambda _ (invoke "py.test"))))))
8221 (home-page "http://docopt.org")
8222 (synopsis "Command-line interface description language for Python")
8223 (description "This library allows the user to define a command-line
8224 interface from a program's help message rather than specifying it
8225 programmatically with command-line parsers like @code{getopt} and
8226 @code{argparse}.")
8227 (license license:expat)))
8228
8229 (define-public python2-docopt
8230 (package-with-python2 python-docopt))
8231
8232 (define-public python-pythondialog
8233 (package
8234 (name "python-pythondialog")
8235 (version "3.4.0")
8236 (source
8237 (origin
8238 (method url-fetch)
8239 (uri (pypi-uri "pythondialog" version))
8240 (sha256
8241 (base32
8242 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
8243 (build-system python-build-system)
8244 (arguments
8245 `(#:phases
8246 (modify-phases %standard-phases
8247 (add-after 'unpack 'patch-path
8248 (lambda* (#:key inputs #:allow-other-keys)
8249 (let* ((dialog (assoc-ref inputs "dialog")))
8250 ;; Since this library really wants to grovel the search path, we
8251 ;; must hardcode dialog's store path into it.
8252 (substitute* "dialog.py"
8253 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
8254 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
8255 #t))))
8256 #:tests? #f)) ; no test suite
8257 (propagated-inputs
8258 `(("dialog" ,dialog)))
8259 (home-page "http://pythondialog.sourceforge.net/")
8260 (synopsis "Python interface to the UNIX dialog utility")
8261 (description "A Python wrapper for the dialog utility. Its purpose is to
8262 provide an easy to use, pythonic and comprehensive Python interface to dialog.
8263 This allows one to make simple text-mode user interfaces on Unix-like systems")
8264 (license license:lgpl2.1)
8265 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8266
8267 (define-public python2-pythondialog
8268 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8269 (package
8270 (inherit base)
8271 (version (package-version python-pythondialog))
8272 (source (origin
8273 (method url-fetch)
8274 (uri (pypi-uri "python2-pythondialog" version))
8275 (sha256
8276 (base32
8277 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
8278
8279 (define-public python-configobj
8280 (package
8281 (name "python-configobj")
8282 (version "5.0.6")
8283 (source (origin
8284 (method url-fetch)
8285 (uri (pypi-uri "configobj" version))
8286 (sha256
8287 (base32
8288 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8289 ;; Patch setup.py so it looks for python-setuptools, which is
8290 ;; required to parse the keyword 'install_requires' in setup.py.
8291 (patches (search-patches "python-configobj-setuptools.patch"))))
8292 (build-system python-build-system)
8293 (propagated-inputs
8294 `(("python-six" ,python-six)))
8295 (synopsis "Config file reading, writing and validation")
8296 (description "ConfigObj is a simple but powerful config file reader and
8297 writer: an ini file round tripper. Its main feature is that it is very easy to
8298 use, with a straightforward programmer’s interface and a simple syntax for
8299 config files.")
8300 (home-page "https://github.com/DiffSK/configobj")
8301 (license license:bsd-3)))
8302
8303 (define-public python2-configobj
8304 (package-with-python2 python-configobj))
8305
8306 (define-public python-configargparse
8307 (package
8308 (name "python-configargparse")
8309 (version "0.14.0")
8310 (source (origin
8311 (method url-fetch)
8312 (uri (pypi-uri "ConfigArgParse" version))
8313 (sha256
8314 (base32
8315 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
8316 (build-system python-build-system)
8317 (native-inputs
8318 `(("python-pyyaml" ,python-pyyaml)))
8319 (arguments
8320 `(#:phases
8321 (modify-phases %standard-phases
8322 (replace 'check
8323 (lambda _
8324 ;; Bypass setuptools-shim because one test relies on "setup.py"
8325 ;; being the first argument passed to the python call.
8326 ;;
8327 ;; NOTE: Many tests do not run because they rely on Python's
8328 ;; built-in test.test_argparse, but we remove the unit tests from
8329 ;; our Python installation.
8330 (invoke "python" "setup.py" "test"))))))
8331 (synopsis "Replacement for argparse")
8332 (description "A drop-in replacement for argparse that allows options to also
8333 be set via config files and/or environment variables.")
8334 (home-page "https://github.com/bw2/ConfigArgParse")
8335 (license license:expat)))
8336
8337 (define-public python2-configargparse
8338 (package-with-python2 python-configargparse))
8339
8340 (define-public python-argparse-manpage
8341 (package
8342 (name "python-argparse-manpage")
8343 (version "1.1")
8344 (source
8345 (origin
8346 (method url-fetch)
8347 (uri (pypi-uri "argparse-manpage" version))
8348 (sha256
8349 (base32
8350 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
8351 (build-system python-build-system)
8352 (home-page "https://github.com/praiskup/argparse-manpage")
8353 (synopsis "Build manual page from Python's ArgumentParser object")
8354 (description
8355 "This package provides tools to build manual pages from Python's
8356 @code{ArgumentParser} object.")
8357 (license license:asl2.0)))
8358
8359 (define-public python-contextlib2
8360 (package
8361 (name "python-contextlib2")
8362 (version "0.5.5")
8363 (source
8364 (origin
8365 (method url-fetch)
8366 (uri (pypi-uri "contextlib2" version))
8367 (sha256
8368 (base32
8369 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8370 (build-system python-build-system)
8371 (home-page "http://contextlib2.readthedocs.org/")
8372 (synopsis "Tools for decorators and context managers")
8373 (description "This module is primarily a backport of the Python
8374 3.2 contextlib to earlier Python versions. Like contextlib, it
8375 provides utilities for common tasks involving decorators and context
8376 managers. It also contains additional features that are not part of
8377 the standard library.")
8378 (license license:psfl)))
8379
8380 (define-public python2-contextlib2
8381 (package
8382 (name "python2-contextlib2")
8383 (version "0.5.5")
8384 (source
8385 (origin
8386 (method url-fetch)
8387 (uri (pypi-uri "contextlib2" version))
8388 (sha256
8389 (base32
8390 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8391 (build-system python-build-system)
8392 (arguments
8393 `(#:python ,python-2
8394 #:phases
8395 (modify-phases %standard-phases
8396 (replace 'check
8397 (lambda _ (invoke "python" "test_contextlib2.py" "-v"))))))
8398 (native-inputs
8399 `(("python2-unittest2" ,python2-unittest2)))
8400 (home-page "http://contextlib2.readthedocs.org/")
8401 (synopsis "Tools for decorators and context managers")
8402 (description "This module is primarily a backport of the Python
8403 3.2 contextlib to earlier Python versions. Like contextlib, it
8404 provides utilities for common tasks involving decorators and context
8405 managers. It also contains additional features that are not part of
8406 the standard library.")
8407 (license license:psfl)))
8408
8409 (define-public python-texttable
8410 (package
8411 (name "python-texttable")
8412 (version "0.9.1")
8413 (source
8414 (origin
8415 (method url-fetch)
8416 (uri (pypi-uri "texttable" version))
8417 (sha256
8418 (base32
8419 "0yawv64c0zbawwv6zz84whb32fnb2n9jylwjcfsrcdgh7xvl340i"))))
8420 (build-system python-build-system)
8421 (arguments '(#:tests? #f)) ; no tests
8422 (home-page "https://github.com/foutaise/texttable/")
8423 (synopsis "Python module for creating simple ASCII tables")
8424 (description "Texttable is a Python module for creating simple ASCII
8425 tables.")
8426 (license license:lgpl2.1+)))
8427
8428 (define-public python2-texttable
8429 (package-with-python2 python-texttable))
8430
8431 (define-public python-atomicwrites
8432 (package
8433 (name "python-atomicwrites")
8434 (version "1.3.0")
8435 (source (origin
8436 (method url-fetch)
8437 (uri (pypi-uri "atomicwrites" version))
8438 (sha256
8439 (base32
8440 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
8441 (build-system python-build-system)
8442 (synopsis "Atomic file writes in Python")
8443 (description "Library for atomic file writes using platform dependent tools
8444 for atomic file system operations.")
8445 (home-page "https://github.com/untitaker/python-atomicwrites")
8446 (license license:expat)))
8447
8448 (define-public python2-atomicwrites
8449 (package-with-python2 python-atomicwrites))
8450
8451 (define-public python-click-threading
8452 (package
8453 (name "python-click-threading")
8454 (version "0.4.4")
8455 (source (origin
8456 (method url-fetch)
8457 (uri (pypi-uri "click-threading" version))
8458 (sha256
8459 (base32
8460 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
8461 (build-system python-build-system)
8462 (propagated-inputs
8463 `(("python-click" ,python-click)))
8464 (synopsis "Utilities for multithreading in Click")
8465 (description "This package provides utilities for multithreading in Click
8466 applications.")
8467 (home-page "https://github.com/click-contrib/click-threading")
8468 (license license:expat)))
8469
8470 (define-public python-click-log
8471 (package
8472 (name "python-click-log")
8473 (version "0.3.2")
8474 (source (origin
8475 (method url-fetch)
8476 (uri (pypi-uri "click-log" version))
8477 (sha256
8478 (base32
8479 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
8480 (build-system python-build-system)
8481 (propagated-inputs
8482 `(("python-click" ,python-click)))
8483 (synopsis "Logging for click applications")
8484 (description "This package provides a Python library for logging Click
8485 applications.")
8486 (home-page "https://github.com/click-contrib/click-log")
8487 (license license:expat)))
8488
8489 (define-public python-apipkg
8490 (package
8491 (name "python-apipkg")
8492 (version "1.4")
8493 (source (origin
8494 (method url-fetch)
8495 (uri (pypi-uri "apipkg" version))
8496 (sha256
8497 (base32
8498 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8499 (build-system python-build-system)
8500 (native-inputs
8501 `(("python-pytest" ,python-pytest)))
8502 (synopsis "Namespace control and lazy-import mechanism")
8503 (description "With apipkg you can control the exported namespace of a Python
8504 package and greatly reduce the number of imports for your users. It is a small
8505 pure Python module that works on virtually all Python versions.")
8506 (home-page "https://github.com/pytest-dev/apipkg")
8507 (license license:expat)))
8508
8509 (define-public python2-apipkg
8510 (package-with-python2 python-apipkg))
8511
8512 (define-public python-execnet
8513 (package
8514 (name "python-execnet")
8515 (version "1.4.1")
8516 (source (origin
8517 (method url-fetch)
8518 (uri (pypi-uri "execnet" version))
8519 (sha256
8520 (base32
8521 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8522 (build-system python-build-system)
8523 (arguments
8524 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8525 ;; The two test failures are caused by the lack of an `ssh` executable.
8526 ;; The test suite can be run with pytest after the 'install' phase.
8527 #:tests? #f))
8528 (native-inputs
8529 `(("python-pytest" ,python-pytest)
8530 ("python-setuptools-scm" ,python-setuptools-scm)))
8531 (propagated-inputs
8532 `(("python-apipkg" ,python-apipkg)))
8533 (synopsis "Rapid multi-Python deployment")
8534 (description "Execnet provides a share-nothing model with
8535 channel-send/receive communication for distributing execution across many
8536 Python interpreters across version, platform and network barriers. It has a
8537 minimal and fast API targeting the following uses:
8538 @enumerate
8539 @item distribute tasks to (many) local or remote CPUs
8540 @item write and deploy hybrid multi-process applications
8541 @item write scripts to administer multiple environments
8542 @end enumerate")
8543 (home-page "http://codespeak.net/execnet/")
8544 (license license:expat)))
8545
8546 (define-public python2-execnet
8547 (package-with-python2 python-execnet))
8548
8549 (define-public python-icalendar
8550 (package
8551 (name "python-icalendar")
8552 (version "4.0.3")
8553 (source (origin
8554 (method url-fetch)
8555 (uri (pypi-uri "icalendar" version))
8556 (sha256
8557 (base32
8558 "0mk3dk1dxkcm46jy48v27j2w2349iv4sbimqj1yb5js43mx49hh7"))))
8559 (build-system python-build-system)
8560 (propagated-inputs
8561 `(("python-dateutil" ,python-dateutil)
8562 ("python-pytz" ,python-pytz)))
8563 (synopsis "Python library for parsing iCalendar files")
8564 (description "The icalendar package is a parser/generator of iCalendar
8565 files for use with Python.")
8566 (home-page "https://github.com/collective/icalendar")
8567 (license license:bsd-2)))
8568
8569 (define-public python-args
8570 (package
8571 (name "python-args")
8572 (version "0.1.0")
8573 (source (origin
8574 (method url-fetch)
8575 (uri (pypi-uri "args" version))
8576 (sha256
8577 (base32
8578 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8579 (build-system python-build-system)
8580 (home-page "https://github.com/kennethreitz/args")
8581 (synopsis "Command-line argument parser")
8582 (description
8583 "This library provides a Python module to parse command-line arguments.")
8584 (license license:bsd-3)))
8585
8586 (define-public python2-args
8587 (package-with-python2 python-args))
8588
8589 (define-public python-clint
8590 (package
8591 (name "python-clint")
8592 (version "0.5.1")
8593 (source (origin
8594 (method url-fetch)
8595 (uri (pypi-uri "clint" version))
8596 (sha256
8597 (base32
8598 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8599 (build-system python-build-system)
8600 (arguments
8601 '(#:phases
8602 (modify-phases %standard-phases
8603 (replace 'check
8604 (lambda _ (invoke "py.test" "-v"))))))
8605 (native-inputs
8606 `(("python-pytest" ,python-pytest)))
8607 (propagated-inputs
8608 `(("python-args" ,python-args)))
8609 (home-page "https://github.com/kennethreitz/clint")
8610 (synopsis "Command-line interface tools")
8611 (description
8612 "Clint is a Python module filled with a set of tools for developing
8613 command-line applications, including tools for colored and indented
8614 output, progress bar display, and pipes.")
8615 (license license:isc)))
8616
8617 (define-public python2-clint
8618 (package-with-python2 python-clint))
8619
8620 (define-public python-rply
8621 (package
8622 (name "python-rply")
8623 (version "0.7.5")
8624 (source (origin
8625 (method url-fetch)
8626 (uri (pypi-uri "rply" version))
8627 (sha256
8628 (base32
8629 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
8630 (build-system python-build-system)
8631 (propagated-inputs
8632 `(("python-appdirs" ,python-appdirs)))
8633 (home-page "https://github.com/alex/rply")
8634 (synopsis "Parser generator for Python")
8635 (description
8636 "This package provides a pure Python based parser generator, that also
8637 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8638 with a new public API, and RPython support.")
8639 (license license:bsd-3)))
8640
8641 (define-public python2-rply
8642 (package-with-python2 python-rply))
8643
8644 (define-public python-hy
8645 (package
8646 (name "python-hy")
8647 (version "0.13.0")
8648 (source (origin
8649 (method url-fetch)
8650 (uri (pypi-uri "hy" version))
8651 (sha256
8652 (base32
8653 "19sfymaksx9jhksfnb15ahid46mzrhdfzz6yy2craz2qnzvpmky8"))))
8654 (build-system python-build-system)
8655 (arguments
8656 '(#:phases
8657 (modify-phases %standard-phases
8658 (replace 'check
8659 (lambda _
8660 ;; Tests require write access to HOME.
8661 (setenv "HOME" "/tmp")
8662 (invoke "nosetests"))))))
8663 (native-inputs
8664 `(("python-coverage" ,python-coverage)
8665 ("python-nose" ,python-nose)))
8666 (propagated-inputs
8667 `(("python-astor" ,python-astor)
8668 ("python-clint" ,python-clint)
8669 ("python-rply" ,python-rply)))
8670 (home-page "http://hylang.org/")
8671 (synopsis "Lisp frontend to Python")
8672 (description
8673 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8674 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8675 Python at your fingertips, in Lisp form.")
8676 (license license:expat)))
8677
8678 (define-public python2-hy
8679 (package-with-python2 python-hy))
8680
8681 (define-public python2-functools32
8682 (package
8683 (name "python2-functools32")
8684 (version "3.2.3-2")
8685 (source
8686 (origin
8687 (method url-fetch)
8688 (uri (pypi-uri "functools32" version))
8689 (sha256
8690 (base32
8691 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8692 (build-system python-build-system)
8693 (arguments
8694 `(#:python ,python-2
8695 #:tests? #f)) ; no test target
8696 (home-page "https://github.com/MiCHiLU/python-functools32")
8697 (synopsis
8698 "Backport of the functools module from Python 3.2.3")
8699 (description
8700 "This package is a backport of the @code{functools} module from Python
8701 3.2.3 for use with older versions of Python and PyPy.")
8702 (license license:expat)))
8703
8704 (define-public python2-subprocess32
8705 (package
8706 (name "python2-subprocess32")
8707 (version "3.2.7")
8708 (source (origin
8709 (method url-fetch)
8710 (uri (pypi-uri "subprocess32" version))
8711 (sha256
8712 (base32
8713 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
8714 (patches
8715 (search-patches "python2-subprocess32-disable-input-test.patch"))))
8716 (build-system python-build-system)
8717 (arguments
8718 `(#:python ,python-2
8719 ;; The test suite fails with Python > 2.7.13:
8720 ;; import test.support
8721 ;; ImportError: No module named support
8722 #:tests? #f
8723 #:phases
8724 (modify-phases %standard-phases
8725 (add-after 'unpack 'patch-/bin/sh
8726 (lambda _
8727 (substitute* '("subprocess32.py"
8728 "test_subprocess32.py")
8729 (("/bin/sh") (which "sh")))
8730 #t)))))
8731 (home-page "https://github.com/google/python-subprocess32")
8732 (synopsis "Backport of the subprocess module from Python 3.2")
8733 (description
8734 "This is a backport of the @code{subprocess} standard library module
8735 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
8736 new features. On POSIX systems it is guaranteed to be reliable when used
8737 in threaded applications. It includes timeout support from Python 3.3 but
8738 otherwise matches 3.2’s API.")
8739 (license license:psfl)))
8740
8741 (define-public python2-futures
8742 (package
8743 (name "python2-futures")
8744 (version "3.2.0")
8745 (source
8746 (origin
8747 (method url-fetch)
8748 (uri (pypi-uri "futures" version))
8749 (sha256
8750 (base32
8751 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
8752 (build-system python-build-system)
8753 (arguments
8754 `(#:python ,python-2
8755 #:phases
8756 (modify-phases %standard-phases
8757 (replace 'check
8758 (lambda _
8759 (invoke "python" "test_futures.py")
8760 #t)))))
8761 (home-page "https://github.com/agronholm/pythonfutures")
8762 (synopsis
8763 "Backport of the concurrent.futures package from Python 3.2")
8764 (description
8765 "The concurrent.futures module provides a high-level interface for
8766 asynchronously executing callables. This package backports the
8767 concurrent.futures package from Python 3.2")
8768 (license license:bsd-3)))
8769
8770 (define-public python-promise
8771 (package
8772 (name "python-promise")
8773 (version "0.4.2")
8774 (source
8775 (origin
8776 (method url-fetch)
8777 (uri (pypi-uri "promise" version))
8778 (sha256
8779 (base32
8780 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8781 (build-system python-build-system)
8782 ;; Tests wants python-futures, which is a python2 only program, and
8783 ;; can't be found by python-promise at test time.
8784 (arguments `(#:tests? #f))
8785 (home-page "https://github.com/syrusakbary/promise")
8786 (synopsis "Promises/A+ implementation for Python")
8787 (description
8788 "Promises/A+ implementation for Python")
8789 (properties `((python2-variant . ,(delay python2-promise))))
8790 (license license:expat)))
8791
8792 (define-public python2-promise
8793 (let ((promise (package-with-python2
8794 (strip-python2-variant python-promise))))
8795 (package (inherit promise)
8796 (arguments (substitute-keyword-arguments (package-arguments promise)
8797 ((#:tests? _) #t)))
8798 (native-inputs
8799 `(("python2-futures" ,python2-futures)
8800 ("python2-pytest" ,python2-pytest)
8801 ,@(package-native-inputs promise))))))
8802
8803 (define-public python-progressbar33
8804 (package
8805 (name "python-progressbar33")
8806 (version "2.4")
8807 (source
8808 (origin
8809 (method url-fetch)
8810 (uri (pypi-uri "progressbar33" version))
8811 (sha256
8812 (base32
8813 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
8814 (build-system python-build-system)
8815 (home-page "http://github.com/germangh/python-progressbar")
8816 (synopsis "Text progress bar library for Python")
8817 (description
8818 "This package provides a text progress bar library for Python. This
8819 version only differs from the original @code{progressbar} package in that it
8820 uses relative package imports instead of absolute imports, which is necessary
8821 for the module to work under Python 3.3.")
8822 ;; Either or both of these licenses may be selected.
8823 (license (list license:lgpl2.1+ license:bsd-3))))
8824
8825 (define-public python-colorama
8826 (package
8827 (name "python-colorama")
8828 (version "0.3.9")
8829 (source
8830 (origin
8831 (method url-fetch)
8832 (uri (pypi-uri "colorama" version))
8833 (sha256
8834 (base32
8835 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
8836 (build-system python-build-system)
8837 (synopsis "Colored terminal text rendering for Python")
8838 (description "Colorama is a Python library for rendering colored terminal
8839 text.")
8840 (home-page "https://pypi.python.org/pypi/colorama")
8841 (license license:bsd-3)))
8842
8843 (define-public python2-colorama
8844 (package-with-python2 python-colorama))
8845
8846 (define-public python-rsa
8847 (package
8848 (name "python-rsa")
8849 (version "3.4.2")
8850 (source
8851 (origin
8852 (method url-fetch)
8853 (uri (pypi-uri "rsa" version))
8854 (sha256
8855 (base32
8856 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
8857 (build-system python-build-system)
8858 (propagated-inputs
8859 `(("python-pyasn1" ,python-pyasn1)))
8860 (synopsis "Pure-Python RSA implementation")
8861 (description "Python-RSA is a pure-Python RSA implementation. It supports
8862 encryption and decryption, signing and verifying signatures, and key
8863 generation according to PKCS#1 version 1.5. It can be used as a Python
8864 library as well as on the command line.")
8865 (home-page "https://stuvel.eu/rsa")
8866 (license license:asl2.0)))
8867
8868 (define-public python2-rsa
8869 (package-with-python2 python-rsa))
8870
8871 (define-public python-pluggy
8872 (package
8873 (name "python-pluggy")
8874 (version "0.11.0")
8875 (source
8876 (origin
8877 (method url-fetch)
8878 (uri (pypi-uri "pluggy" version))
8879 (sha256
8880 (base32
8881 "10511a54dvafw1jrk75mrhml53c7b7w4yaw7241696lc2hfvr895"))))
8882 (build-system python-build-system)
8883 (native-inputs
8884 `(("python-setuptools-scm" ,python-setuptools-scm)))
8885 (synopsis "Plugin and hook calling mechanism for Python")
8886 (description "Pluggy is an extraction of the plugin manager as used by
8887 Pytest but stripped of Pytest specific details.")
8888 (home-page "https://pypi.python.org/pypi/pluggy")
8889 (license license:expat)))
8890
8891 (define-public python2-pluggy
8892 (package-with-python2 python-pluggy))
8893
8894 (define-public python-tox
8895 (package
8896 (name "python-tox")
8897 (version "2.8.1")
8898 (source
8899 (origin
8900 (method url-fetch)
8901 (uri (pypi-uri "tox" version))
8902 (sha256
8903 (base32
8904 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
8905 (build-system python-build-system)
8906 (arguments
8907 ;; FIXME: Tests require pytest-timeout, which itself requires
8908 ;; pytest>=2.8.0 for installation.
8909 '(#:tests? #f))
8910 (propagated-inputs
8911 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
8912 ("python-py" ,python-py)
8913 ("python-virtualenv" ,python-virtualenv)))
8914 (native-inputs
8915 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
8916 ("python-pytest" ,python-pytest) ; >= 2.3.5
8917 ("python-setuptools-scm" ,python-setuptools-scm)))
8918 (home-page "http://tox.testrun.org/")
8919 (synopsis "Virtualenv-based automation of test activities")
8920 (description "Tox is a generic virtualenv management and test command line
8921 tool. It can be used to check that a package installs correctly with
8922 different Python versions and interpreters, or run tests in each type of
8923 supported environment, or act as a frontend to continuous integration
8924 servers.")
8925 (license license:expat)))
8926
8927 (define-public python2-tox
8928 (package-with-python2 python-tox))
8929
8930 (define-public python-jmespath
8931 (package
8932 (name "python-jmespath")
8933 (version "0.9.3")
8934 (source
8935 (origin
8936 (method url-fetch)
8937 (uri (pypi-uri "jmespath" version))
8938 (sha256
8939 (base32
8940 "0r7wc7fsxmlwzxx9j1j7rms06c6xs6d4sysirdhz1jk2mb4x90ba"))))
8941 (build-system python-build-system)
8942 (native-inputs
8943 `(("python-nose" ,python-nose)))
8944 (synopsis "JSON Matching Expressions")
8945 (description "JMESPath (pronounced “james path”) is a Python library that
8946 allows one to declaratively specify how to extract elements from a JSON
8947 document.")
8948 (home-page "https://github.com/jmespath/jmespath.py")
8949 (license license:expat)))
8950
8951 (define-public python2-jmespath
8952 (package-with-python2 python-jmespath))
8953
8954 (define-public python-botocore
8955 (package
8956 (name "python-botocore")
8957 (version "1.12.149")
8958 (source
8959 (origin
8960 (method url-fetch)
8961 (uri (pypi-uri "botocore" version))
8962 (sha256
8963 (base32
8964 "12597f74khp3ngwr282cb949w0gcqj20rkfc3x275dijavyy5cmf"))))
8965 (build-system python-build-system)
8966 (arguments
8967 ;; FIXME: Many tests are failing.
8968 '(#:tests? #f))
8969 (propagated-inputs
8970 `(("python-dateutil" ,python-dateutil)
8971 ("python-docutils" ,python-docutils)
8972 ("python-jmespath" ,python-jmespath)))
8973 (native-inputs
8974 `(("python-mock" ,python-mock)
8975 ("python-nose" ,python-nose)
8976 ("behave" ,behave)
8977 ("python-tox" ,python-tox)
8978 ("python-urllib3" ,python-urllib3)
8979 ("python-wheel" ,python-wheel)))
8980 (home-page "https://github.com/boto/botocore")
8981 (synopsis "Low-level interface to AWS")
8982 (description "Botocore is a Python library that provides a low-level
8983 interface to the Amazon Web Services (AWS) API.")
8984 (license license:asl2.0)))
8985
8986 (define-public python2-botocore
8987 (package-with-python2 python-botocore))
8988
8989 (define-public python-xdo
8990 (package
8991 (name "python-xdo")
8992 (version "0.3")
8993 (source (origin
8994 (method url-fetch)
8995 (uri (string-append
8996 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8997 "python-xdo_" version ".orig.tar.gz"))
8998 (sha256
8999 (base32
9000 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
9001 (build-system python-build-system)
9002 (arguments
9003 '(#:phases
9004 (modify-phases %standard-phases
9005 (add-before 'install 'patch-libxdo-path
9006 ;; Hardcode the path of dynamically loaded libxdo library.
9007 (lambda* (#:key inputs #:allow-other-keys)
9008 (let ((libxdo (string-append
9009 (assoc-ref inputs "xdotool")
9010 "/lib/libxdo.so")))
9011 (substitute* "xdo/_xdo.py"
9012 (("find_library\\(\"xdo\"\\)")
9013 (simple-format #f "\"~a\"" libxdo)))
9014 #t))))
9015 #:tests? #f)) ; no tests provided
9016 (propagated-inputs
9017 `(("python-six" ,python-six)))
9018 (inputs
9019 `(("xdotool" ,xdotool)
9020 ("libX11" ,libx11)))
9021 (home-page "https://tracker.debian.org/pkg/python-xdo")
9022 (synopsis "Python library for simulating X11 keyboard/mouse input")
9023 (description "Provides bindings to libxdo for manipulating X11 via simulated
9024 input. (Note that this is mostly a legacy library; you may wish to look at
9025 python-xdo for newer bindings.)")
9026 (license license:bsd-3)))
9027
9028 (define-public python2-xdo
9029 (package-with-python2 python-xdo))
9030
9031 (define-public python-mako
9032 (package
9033 (name "python-mako")
9034 (version "1.1.0")
9035 (source
9036 (origin
9037 (method url-fetch)
9038 (uri (pypi-uri "Mako" version))
9039 (sha256
9040 (base32
9041 "0jqa3qfpykyn4fmkn0kh6043sfls7br8i2bsdbccazcvk9cijsd3"))))
9042 (build-system python-build-system)
9043 (arguments
9044 `(#:phases (modify-phases %standard-phases
9045 (replace 'check
9046 (lambda _
9047 (invoke "pytest" "-vv"))))))
9048 (propagated-inputs
9049 `(("python-markupsafe" ,python-markupsafe)))
9050 (native-inputs
9051 `(("python-mock" ,python-mock)
9052 ("python-pytest" ,python-pytest)))
9053 (home-page "https://www.makotemplates.org/")
9054 (synopsis "Templating language for Python")
9055 (description "Mako is a templating language for Python that compiles
9056 templates into Python modules.")
9057 (license license:expat)))
9058
9059 (define-public python2-mako
9060 (package-with-python2 python-mako))
9061
9062 (define-public python-waitress
9063 (package
9064 (name "python-waitress")
9065 (version "1.1.0")
9066 (source
9067 (origin
9068 (method url-fetch)
9069 (uri (pypi-uri "waitress" version))
9070 (patches (search-patches "python-waitress-fix-tests.patch"))
9071 (sha256
9072 (base32
9073 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
9074 (build-system python-build-system)
9075 (home-page "https://github.com/Pylons/waitress")
9076 (synopsis "Waitress WSGI server")
9077 (description "Waitress is meant to be a production-quality pure-Python WSGI
9078 server with very acceptable performance.")
9079 (license license:zpl2.1)))
9080
9081 (define-public python2-waitress
9082 (package-with-python2 python-waitress))
9083
9084 (define-public python-pyquery
9085 (package
9086 (name "python-pyquery")
9087 (version "1.2.17")
9088 (source
9089 (origin
9090 (method url-fetch)
9091 (uri (pypi-uri "pyquery" version))
9092 (sha256
9093 (base32
9094 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
9095 (build-system python-build-system)
9096 (native-inputs
9097 `(("python-webob" ,python-webob)
9098 ("python-webtest" ,python-webtest)))
9099 (propagated-inputs
9100 `(("python-lxml" ,python-lxml)
9101 ("python-cssselect" ,python-cssselect)))
9102 (home-page "https://github.com/gawel/pyquery")
9103 (synopsis "Make jQuery-like queries on xml documents")
9104 (description "pyquery allows you to make jQuery queries on xml documents.
9105 The API is as much as possible the similar to jQuery. pyquery uses lxml for
9106 fast xml and html manipulation.")
9107 (license license:bsd-3)))
9108
9109 (define-public python-anyjson
9110 (package
9111 (name "python-anyjson")
9112 (version "0.3.3")
9113 (source
9114 (origin
9115 (method url-fetch)
9116 (uri (pypi-uri "anyjson" version))
9117 (sha256
9118 (base32
9119 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
9120 (build-system python-build-system)
9121 (arguments
9122 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
9123 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
9124 ;; whatever) so this transformation needs to be done before the tests
9125 ;; can be run. Maybe we could add a build step to transform beforehand
9126 ;; but it could be annoying/difficult.
9127 ;; We can enable tests for the Python 2 version, though, and do below.
9128 #:tests? #f))
9129 (home-page "https://bitbucket.org/runeh/anyjson/")
9130 (synopsis
9131 "Wraps best available JSON implementation in a common interface")
9132 (description
9133 "Anyjson loads whichever is the fastest JSON module installed
9134 and provides a uniform API regardless of which JSON implementation is used.")
9135 (license license:bsd-3)
9136 (properties `((python2-variant . ,(delay python2-anyjson))))))
9137
9138 (define-public python2-anyjson
9139 (let ((anyjson (package-with-python2
9140 (strip-python2-variant python-anyjson))))
9141 (package
9142 (inherit anyjson)
9143 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
9144 #:tests? #t
9145 ,@(package-arguments anyjson)))
9146 (native-inputs `(("python2-nose" ,python2-nose))))))
9147
9148 (define-public python-amqp
9149 (package
9150 (name "python-amqp")
9151 (version "2.3.2")
9152 (source
9153 (origin
9154 (method url-fetch)
9155 (uri (pypi-uri "amqp" version))
9156 (sha256
9157 (base32
9158 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
9159 (build-system python-build-system)
9160 (native-inputs
9161 `(("python-case" ,python-case)
9162 ("python-pytest-sugar" ,python-pytest-sugar)
9163 ("python-mock" ,python-mock)))
9164 (propagated-inputs
9165 `(("python-vine" ,python-vine)))
9166 (home-page "https://github.com/celery/py-amqp")
9167 (synopsis
9168 "Low-level AMQP client for Python (fork of amqplib)")
9169 (description
9170 "This is a fork of amqplib which was originally written by Barry Pederson.
9171 It is maintained by the Celery project, and used by kombu as a pure python
9172 alternative when librabbitmq is not available.")
9173 (license license:lgpl2.1+)
9174 (properties `((python2-variant . ,(delay python2-amqp))))))
9175
9176 (define-public python2-amqp
9177 (let ((amqp (package-with-python2
9178 (strip-python2-variant python-amqp))))
9179 (package
9180 (inherit amqp)
9181 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
9182 ;; unmaintained. Weirdly, does not do this on the python 3
9183 ;; version?
9184 #:tests? #f
9185 ,@(package-arguments amqp))))))
9186
9187 (define-public python-txamqp
9188 (package
9189 (name "python-txamqp")
9190 (version "0.8.2")
9191 (source
9192 (origin
9193 (method url-fetch)
9194 (uri (pypi-uri "txAMQP" version))
9195 (sha256
9196 (base32
9197 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
9198 (build-system python-build-system)
9199 (propagated-inputs
9200 `(("python-six" ,python-six)
9201 ("python-twisted" ,python-twisted)))
9202 (home-page "https://github.com/txamqp/txamqp")
9203 (synopsis "Communicate with AMQP peers and brokers using Twisted")
9204 (description
9205 "This package provides a Python library for communicating with AMQP peers
9206 and brokers using the asynchronous networking framework Twisted. It contains
9207 all the necessary code to connect, send and receive messages to/from an
9208 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
9209 also includes support for using Thrift RPC over AMQP in Twisted
9210 applications.")
9211 (license license:asl2.0)))
9212
9213 (define-public python2-txamqp
9214 (package-with-python2 python-txamqp))
9215
9216 (define-public python-kombu
9217 (package
9218 (name "python-kombu")
9219 (version "4.2.2")
9220 (source
9221 (origin
9222 (method url-fetch)
9223 (uri (pypi-uri "kombu" version))
9224 (sha256
9225 (base32
9226 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
9227 (build-system python-build-system)
9228 (native-inputs
9229 `(("python-mock" ,python-mock)
9230 ("python-case" ,python-case)
9231 ("python-pyro4" ,python-pyro4)
9232 ("python-pytest-sugar" ,python-pytest-sugar)
9233 ("python-pytz" ,python-pytz)))
9234 (propagated-inputs
9235 `(("python-anyjson" ,python-anyjson)
9236 ("python-amqp" ,python-amqp)
9237 ("python-redis" ,python-redis)))
9238 (home-page "https://kombu.readthedocs.io")
9239 (synopsis "Message passing library for Python")
9240 (description "The aim of Kombu is to make messaging in Python as easy as
9241 possible by providing an idiomatic high-level interface for the AMQ protocol,
9242 and also provide proven and tested solutions to common messaging problems.
9243 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
9244 message orientation, queuing, routing, reliability and security, for which the
9245 RabbitMQ messaging server is the most popular implementation.")
9246 (license license:bsd-3)
9247 (properties `((python2-variant . ,(delay python2-kombu))))))
9248
9249 (define-public python2-kombu
9250 (let ((kombu (package-with-python2
9251 (strip-python2-variant python-kombu))))
9252 (package
9253 (inherit kombu)
9254 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
9255 ;; It works fine on the python3 variant.
9256 #:tests? #f
9257 ,@(package-arguments kombu)))
9258 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9259 ,@(package-native-inputs kombu))))))
9260
9261 (define-public python-billiard
9262 (package
9263 (name "python-billiard")
9264 (version "3.5.0.5")
9265 (source
9266 (origin
9267 (method url-fetch)
9268 (uri (pypi-uri "billiard" version))
9269 (sha256
9270 (base32
9271 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
9272 (build-system python-build-system)
9273 (native-inputs
9274 `(("python-case" ,python-case)
9275 ("python-pytest" ,python-pytest)))
9276 (home-page "https://github.com/celery/billiard")
9277 (synopsis
9278 "Python multiprocessing fork with improvements and bugfixes")
9279 (description
9280 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9281 multiprocessing package itself is a renamed and updated version of R Oudkerk's
9282 pyprocessing package. This standalone variant is intended to be compatible with
9283 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
9284 (license license:bsd-3)
9285 (properties `((python2-variant . ,(delay python2-billiard))))))
9286
9287 (define-public python2-billiard
9288 (let ((billiard (package-with-python2
9289 (strip-python2-variant python-billiard))))
9290 (package
9291 (inherit billiard)
9292 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9293 ("python2-mock" ,python2-mock)
9294 ,@(package-native-inputs billiard))))))
9295
9296 (define-public python-celery
9297 (package
9298 (name "python-celery")
9299 (version "4.2.1")
9300 (source
9301 (origin
9302 (method url-fetch)
9303 (uri (pypi-uri "celery" version))
9304 (sha256
9305 (base32
9306 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
9307 (build-system python-build-system)
9308 (arguments
9309 '(;; TODO The tests fail with Python 3.7
9310 ;; https://github.com/celery/celery/issues/4849
9311 #:tests? #f
9312 #:phases
9313 (modify-phases %standard-phases
9314 (add-after 'unpack 'patch-requirements
9315 (lambda _
9316 (substitute* "requirements/test.txt"
9317 (("pytest>=3\\.0,<3\\.3")
9318 "pytest>=3.0"))
9319 #t)))))
9320 (native-inputs
9321 `(("python-case" ,python-case)
9322 ("python-pytest" ,python-pytest)))
9323 (propagated-inputs
9324 `(("python-pytz" ,python-pytz)
9325 ("python-billiard" ,python-billiard)
9326 ("python-kombu" ,python-kombu)))
9327 (home-page "https://celeryproject.org")
9328 (synopsis "Distributed Task Queue")
9329 (description "Celery is an asynchronous task queue/job queue based on
9330 distributed message passing. It is focused on real-time operation, but
9331 supports scheduling as well. The execution units, called tasks, are executed
9332 concurrently on a single or more worker servers using multiprocessing,
9333 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9334 synchronously (wait until ready).")
9335 (license license:bsd-3)
9336 (properties `((python2-variant . ,(delay python2-celery))))))
9337
9338 (define-public python2-celery
9339 (let ((celery (package-with-python2
9340 (strip-python2-variant python-celery))))
9341 (package
9342 (inherit celery)
9343 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9344 ("python2-mock" ,python2-mock)
9345 ,@(package-native-inputs celery))))))
9346
9347 (define-public python-translitcodec
9348 (package
9349 (name "python-translitcodec")
9350 (version "0.4.0")
9351 (source
9352 (origin
9353 (method url-fetch)
9354 (uri (pypi-uri "translitcodec" version))
9355 (sha256
9356 (base32
9357 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9358 (build-system python-build-system)
9359 (arguments
9360 `(#:tests? #f)) ; no tests provided
9361 (home-page
9362 "https://github.com/claudep/translitcodec")
9363 (synopsis
9364 "Unicode to 8-bit charset transliteration codec")
9365 (description
9366 "This package contains codecs for transliterating ISO 10646 texts into
9367 best-effort representations using smaller coded character sets (ASCII,
9368 ISO 8859, etc.).")
9369 (license license:expat)))
9370
9371 (define-public python2-translitcodec
9372 (package-with-python2 python-translitcodec))
9373
9374 (define-public python-editor
9375 (package
9376 (name "python-editor")
9377 (version "0.5")
9378 (source
9379 (origin
9380 (method url-fetch)
9381 (uri (pypi-uri "python-editor" version))
9382 (sha256
9383 (base32
9384 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
9385 (build-system python-build-system)
9386 (home-page
9387 "https://github.com/fmoo/python-editor")
9388 (synopsis
9389 "Programmatically open an editor, capture the result")
9390 (description
9391 "python-editor is a library that provides the editor module for
9392 programmatically interfacing with your system's $EDITOR.")
9393 (license license:asl2.0)))
9394
9395 (define-public python2-editor
9396 (package-with-python2 python-editor))
9397
9398 (define-public python-vobject
9399 (package
9400 (name "python-vobject")
9401 (version "0.9.5")
9402 (source (origin
9403 (method url-fetch)
9404 (uri (pypi-uri "vobject" version))
9405 (sha256
9406 (base32
9407 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
9408 (build-system python-build-system)
9409 (arguments
9410 '(;; The test suite relies on some non-portable Windows interfaces.
9411 #:tests? #f))
9412 (propagated-inputs
9413 `(("python-dateutil" ,python-dateutil)
9414 ("python-pyicu" ,python-pyicu)))
9415 (synopsis "Parse and generate vCard and vCalendar files")
9416 (description "Vobject is intended to be a full featured Python package for
9417 parsing and generating vCard and vCalendar files. Currently, iCalendar files
9418 are supported and well tested. vCard 3.0 files are supported, and all data
9419 should be imported, but only a few components are understood in a sophisticated
9420 way.")
9421 (home-page "http://eventable.github.io/vobject/")
9422 (license license:asl2.0)))
9423
9424 (define-public python2-vobject
9425 (package-with-python2 python-vobject))
9426
9427 (define-public python-munkres
9428 (package
9429 (name "python-munkres")
9430 (version "1.0.8")
9431 (source (origin
9432 (method url-fetch)
9433 (uri (pypi-uri "munkres" version))
9434 (sha256
9435 (base32
9436 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
9437 (build-system python-build-system)
9438 (arguments
9439 '(#:tests? #f)) ; no test suite
9440 (home-page "http://software.clapper.org/munkres/")
9441 (synopsis "Implementation of the Munkres algorithm")
9442 (description "The Munkres module provides an implementation of the Munkres
9443 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9444 useful for solving the Assignment Problem.")
9445 (license license:bsd-3)))
9446
9447 (define-public python2-munkres
9448 (package-with-python2 python-munkres))
9449
9450 (define-public python-whoosh
9451 (package
9452 (name "python-whoosh")
9453 (version "2.7.4")
9454 (source
9455 (origin
9456 (method url-fetch)
9457 (uri (pypi-uri "Whoosh" version))
9458 (sha256
9459 (base32
9460 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9461 (build-system python-build-system)
9462 (native-inputs
9463 `(("python-pytest" ,python-pytest)))
9464 (home-page "https://bitbucket.org/mchaput/whoosh")
9465 (synopsis "Full text indexing, search, and spell checking library")
9466 (description
9467 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9468 checking library.")
9469 (license license:bsd-2)))
9470
9471 (define-public python2-whoosh
9472 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9473 (package (inherit whoosh)
9474 (propagated-inputs
9475 `(("python2-backport-ssl-match-hostname"
9476 ,python2-backport-ssl-match-hostname)
9477 ,@(package-propagated-inputs whoosh))))))
9478
9479 (define-public python-pathlib
9480 (package
9481 (name "python-pathlib")
9482 (version "1.0.1")
9483 (source (origin
9484 (method url-fetch)
9485 (uri (pypi-uri "pathlib" version))
9486 (sha256
9487 (base32
9488 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9489 (build-system python-build-system)
9490 ;; The tests depend on the internal "test" module, which does not provide
9491 ;; a stable interface.
9492 (arguments `(#:tests? #f))
9493 (home-page "https://pathlib.readthedocs.org/")
9494 (synopsis "Object-oriented file system paths")
9495 (description "Pathlib offers a set of classes to handle file system paths.
9496 It offers the following advantages over using string objects:
9497
9498 @enumerate
9499 @item No more cumbersome use of os and os.path functions. Everything can
9500 be done easily through operators, attribute accesses, and method calls.
9501 @item Embodies the semantics of different path types. For example,
9502 comparing Windows paths ignores casing.
9503 @item Well-defined semantics, eliminating any inconsistencies or
9504 ambiguities (forward vs. backward slashes, etc.).
9505 @end enumerate
9506
9507 Note: In Python 3.4, pathlib is now part of the standard library. For other
9508 Python versions please consider python-pathlib2 instead, which tracks the
9509 standard library module. This module (python-pathlib) isn't maintained
9510 anymore.")
9511 (license license:expat)))
9512
9513 (define-public python2-pathlib
9514 (package-with-python2 python-pathlib))
9515
9516 (define-public python2-pathlib2
9517 (package
9518 (name "python2-pathlib2")
9519 (version "2.3.3")
9520 (source (origin
9521 (method url-fetch)
9522 (uri (pypi-uri "pathlib2" version))
9523 (sha256
9524 (base32
9525 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
9526 (build-system python-build-system)
9527 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9528 ;; version is 3.4 which already includes this package as part of the
9529 ;; standard library.
9530 (arguments
9531 `(#:python ,python-2))
9532 (propagated-inputs
9533 `(("python2-scandir" ,python2-scandir)
9534 ("python2-six" ,python2-six)))
9535 (home-page "https://pypi.python.org/pypi/pathlib2/")
9536 (synopsis "Object-oriented file system paths - backport of standard
9537 pathlib module")
9538 (description "The goal of pathlib2 is to provide a backport of standard
9539 pathlib module which tracks the standard library module, so all the newest
9540 features of the standard pathlib can be used also on older Python versions.
9541
9542 Pathlib offers a set of classes to handle file system paths. It offers the
9543 following advantages over using string objects:
9544
9545 @enumerate
9546 @item No more cumbersome use of os and os.path functions. Everything can
9547 be done easily through operators, attribute accesses, and method calls.
9548 @item Embodies the semantics of different path types. For example,
9549 comparing Windows paths ignores casing.
9550 @item Well-defined semantics, eliminating any inconsistencies or
9551 ambiguities (forward vs. backward slashes, etc.).
9552 @end enumerate")
9553 (license license:expat)))
9554
9555 (define-public python2-pathlib2-bootstrap
9556 (hidden-package
9557 (package
9558 (inherit python2-pathlib2)
9559 (name "python2-pathlib2-bootstrap")
9560 (propagated-inputs
9561 `(("python2-scandir" ,python2-scandir)
9562 ("python2-six" ,python2-six-bootstrap))))))
9563
9564 (define-public python-jellyfish
9565 (package
9566 (name "python-jellyfish")
9567 (version "0.5.6")
9568 (source (origin
9569 (method url-fetch)
9570 (uri (pypi-uri "jellyfish" version))
9571 (sha256
9572 (base32
9573 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
9574 (build-system python-build-system)
9575 (native-inputs
9576 `(("python-pytest" ,python-pytest)))
9577 (home-page "https://github.com/jamesturk/jellyfish")
9578 (synopsis "Approximate and phonetic matching of strings")
9579 (description "Jellyfish uses a variety of string comparison and phonetic
9580 encoding algorithms to do fuzzy string matching.")
9581 (license license:bsd-2)
9582 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9583
9584 (define-public python2-jellyfish
9585 (let ((jellyfish (package-with-python2
9586 (strip-python2-variant python-jellyfish))))
9587 (package (inherit jellyfish)
9588 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
9589 ,@(package-native-inputs jellyfish))))))
9590
9591 (define-public python2-unicodecsv
9592 (package
9593 (name "python2-unicodecsv")
9594 (version "0.14.1")
9595 (source (origin
9596 (method url-fetch)
9597 ;; The test suite is not included in the PyPi release.
9598 ;; https://github.com/jdunck/python-unicodecsv/issues/19
9599 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
9600 "archive/" version ".tar.gz"))
9601 (file-name (string-append name "-" version ".tar.gz"))
9602 (sha256
9603 (base32
9604 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
9605 (build-system python-build-system)
9606 (arguments
9607 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9608 #:python ,python-2))
9609 (native-inputs
9610 `(("python2-unittest2" ,python2-unittest2)))
9611 (home-page "https://github.com/jdunck/python-unicodecsv")
9612 (synopsis "Unicode CSV module for Python 2")
9613 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9614 module, adding support for Unicode strings.")
9615 (license license:bsd-2)))
9616
9617 (define-public python-rarfile
9618 (package
9619 (name "python-rarfile")
9620 (version "2.8")
9621 (source (origin
9622 (method url-fetch)
9623 (uri (pypi-uri "rarfile" version))
9624 (sha256
9625 (base32
9626 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
9627 (build-system python-build-system)
9628 (arguments
9629 '(#:phases
9630 (modify-phases %standard-phases
9631 (replace 'check
9632 ;; Many tests fail, but the installation proceeds.
9633 (lambda _ (invoke "make" "-C" "test" "test"))))))
9634 (native-inputs
9635 `(("which" ,which))) ; required for tests
9636 (propagated-inputs
9637 `(("libarchive" ,libarchive)))
9638 (home-page "https://github.com/markokr/rarfile")
9639 (synopsis "RAR archive reader for Python")
9640 (description "This is Python module for RAR archive reading. The interface
9641 is made as zipfile like as possible.")
9642 (license license:isc)))
9643
9644 (define-public python2-rarfile
9645 (package-with-python2 python-rarfile))
9646
9647 (define-public python-magic
9648 (package
9649 (name "python-magic")
9650 (version "0.4.15")
9651 (source
9652 (origin
9653 (method url-fetch)
9654 (uri (pypi-uri "python-magic" version))
9655 (sha256
9656 (base32
9657 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
9658 (file-name (string-append name "-" version "-checkout"))))
9659 (build-system python-build-system)
9660 (arguments
9661 ;; The tests are unreliable, so don't run them. The tests fail
9662 ;; under Python3 because they were written for Python2 and
9663 ;; contain import statements that do not work in Python3. One of
9664 ;; the tests fails under Python2 because its assertions are
9665 ;; overly stringent; it relies on comparing output strings which
9666 ;; are brittle and can change depending on the version of
9667 ;; libmagic being used and the system on which the test is
9668 ;; running. In my case, under GuixSD 0.10.0, only one test
9669 ;; failed, and it seems to have failed only because the version
9670 ;; of libmagic that is packaged in Guix outputs a slightly
9671 ;; different (but not wrong) string than the one that the test
9672 ;; expected.
9673 '(#:tests? #f
9674 #:phases (modify-phases %standard-phases
9675 ;; Replace a specific method call with a hard-coded
9676 ;; path to the necessary libmagic.so file in the
9677 ;; store. If we don't do this, then the method call
9678 ;; will fail to find the libmagic.so file, which in
9679 ;; turn will cause any application using
9680 ;; python-magic to fail.
9681 (add-before 'build 'hard-code-path-to-libmagic
9682 (lambda* (#:key inputs #:allow-other-keys)
9683 (let ((file (assoc-ref inputs "file")))
9684 (substitute* "magic.py"
9685 (("ctypes.util.find_library\\('magic'\\)")
9686 (string-append "'" file "/lib/libmagic.so'")))
9687 #t)))
9688 (add-before 'install 'disable-egg-compression
9689 (lambda _
9690 (let ((port (open-file "setup.cfg" "a")))
9691 (display "\n[easy_install]\nzip_ok = 0\n"
9692 port)
9693 (close-port port)
9694 #t))))))
9695 (inputs
9696 ;; python-magic needs to be able to find libmagic.so.
9697 `(("file" ,file)))
9698 (home-page
9699 "https://github.com/ahupp/python-magic")
9700 (synopsis
9701 "File type identification using libmagic")
9702 (description
9703 "This module uses ctypes to access the libmagic file type
9704 identification library. It makes use of the local magic database and
9705 supports both textual and MIME-type output. Note that this module and
9706 the python-file module both provide a \"magic.py\" file; these two
9707 modules, which are different and were developed separately, both serve
9708 the same purpose: to provide Python bindings for libmagic.")
9709 (license license:expat)))
9710
9711 (define-public python2-magic
9712 (package-with-python2 python-magic))
9713
9714 (define-public python2-s3cmd
9715 (package
9716 (name "python2-s3cmd")
9717 (version "1.6.1")
9718 (source
9719 (origin
9720 (method url-fetch)
9721 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
9722 "s3cmd-" version ".tar.gz"))
9723 (sha256
9724 (base32
9725 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9726 (build-system python-build-system)
9727 (arguments
9728 ;; s3cmd is written for python2 only and contains no tests.
9729 `(#:python ,python-2
9730 #:tests? #f))
9731 (propagated-inputs
9732 `(("python2-dateutil" ,python2-dateutil)
9733 ;; The python-file package also provides a magic.py module.
9734 ;; This is an unfortunate state of affairs; however, s3cmd
9735 ;; fails to install if it cannot find specifically the
9736 ;; python-magic package. Thus we include it, instead of using
9737 ;; python-file. Ironically, s3cmd sometimes works better
9738 ;; without libmagic bindings at all:
9739 ;; https://github.com/s3tools/s3cmd/issues/198
9740 ("python2-magic" ,python2-magic)))
9741 (home-page "http://s3tools.org/s3cmd")
9742 (synopsis "Command line tool for S3-compatible storage services")
9743 (description
9744 "S3cmd is a command line tool for uploading, retrieving and managing data
9745 in storage services that are compatible with the Amazon Simple Storage
9746 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9747 GnuPG encryption, and more. It also supports management of Amazon's
9748 CloudFront content delivery network.")
9749 (license license:gpl2+)))
9750
9751 (define-public python-pkgconfig
9752 (package
9753 (name "python-pkgconfig")
9754 (version "1.3.1")
9755 (source
9756 (origin
9757 (method url-fetch)
9758 (uri (pypi-uri "pkgconfig" version))
9759 (sha256
9760 (base32
9761 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
9762 (build-system python-build-system)
9763 (native-inputs
9764 `(("python-nose" ,python-nose)))
9765 (inputs
9766 `(("pkg-config" ,pkg-config)))
9767 (arguments
9768 `(#:phases
9769 (modify-phases %standard-phases
9770 (add-before 'build 'patch
9771 ;; Hard-code the path to pkg-config.
9772 (lambda _
9773 (substitute* "pkgconfig/pkgconfig.py"
9774 (("cmd = 'pkg-config")
9775 (string-append "cmd = '" (which "pkg-config"))))
9776 #t))
9777 (replace 'check
9778 (lambda _
9779 (invoke "nosetests" "test.py"))))))
9780 (home-page "https://github.com/matze/pkgconfig")
9781 (synopsis "Python interface for pkg-config")
9782 (description "This module provides a Python interface to pkg-config. It
9783 can be used to find all pkg-config packages, check if a package exists,
9784 check if a package meets certain version requirements, query CFLAGS and
9785 LDFLAGS and parse the output to build extensions with setup.py.")
9786 (license license:expat)))
9787
9788 (define-public python2-pkgconfig
9789 (package-with-python2 python-pkgconfig))
9790
9791 (define-public python-bz2file
9792 (package
9793 (name "python-bz2file")
9794 (version "0.98")
9795 (source
9796 (origin
9797 (method url-fetch)
9798 (uri (pypi-uri "bz2file" version))
9799 (sha256
9800 (base32
9801 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9802 (build-system python-build-system)
9803 (arguments
9804 `(#:tests? #f)) ; Tests use deprecated python modules.
9805 (home-page "https://github.com/nvawda/bz2file")
9806 (synopsis "Read and write bzip2-compressed files")
9807 (description
9808 "Bz2file is a Python library for reading and writing bzip2-compressed
9809 files. It contains a drop-in replacement for the I/O interface in the
9810 standard library's @code{bz2} module, including features from the latest
9811 development version of CPython that are not available in older releases.")
9812 (license license:asl2.0)))
9813
9814 (define-public python2-bz2file
9815 (package-with-python2 python-bz2file))
9816
9817 (define-public python-future
9818 (package
9819 (name "python-future")
9820 (version "0.17.1")
9821 (source
9822 (origin
9823 (method url-fetch)
9824 (uri (pypi-uri "future" version))
9825 (sha256
9826 (base32
9827 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
9828 (build-system python-build-system)
9829 ;; Many tests connect to the network or are otherwise flawed.
9830 ;; https://github.com/PythonCharmers/python-future/issues/210
9831 (arguments
9832 `(#:tests? #f))
9833 (home-page "http://python-future.org")
9834 (synopsis "Single-source support for Python 3 and 2")
9835 (description
9836 "@code{python-future} is the missing compatibility layer between Python 2 and
9837 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9838 to support both Python 2 and Python 3 with minimal overhead.")
9839 (license license:expat)))
9840
9841 (define-public python2-future
9842 (package-with-python2 python-future))
9843
9844 (define-public python-cysignals
9845 (package
9846 (name "python-cysignals")
9847 (version "1.9.0")
9848 (source
9849 (origin
9850 (method url-fetch)
9851 (uri (pypi-uri "cysignals" version))
9852 (sha256
9853 (base32
9854 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
9855 (build-system python-build-system)
9856 (native-inputs
9857 `(("python-cython" ,python-cython)
9858 ("python-sphinx" ,python-sphinx)))
9859 (inputs
9860 `(("pari-gp" ,pari-gp)))
9861 (arguments
9862 `(#:modules ((guix build python-build-system)
9863 ((guix build gnu-build-system) #:prefix gnu:)
9864 (guix build utils))
9865 ;; FIXME: Tests are executed after installation and currently fail
9866 ;; when not installing into standard locations; the author is working
9867 ;; on a fix.
9868 #:tests? #f
9869 #:phases
9870 (modify-phases %standard-phases
9871 (add-before
9872 'build 'configure
9873 (assoc-ref gnu:%standard-phases 'configure)))))
9874 (home-page
9875 "https://github.com/sagemath/cysignals")
9876 (synopsis
9877 "Handling of interrupts and signals for Cython")
9878 (description
9879 "The cysignals package provides mechanisms to handle interrupts (and
9880 other signals and errors) in Cython code, using two related approaches,
9881 for mixed Cython/Python code or external C libraries and pure Cython code,
9882 respectively.")
9883 (license license:lgpl3+)))
9884
9885 (define-public python2-cysignals
9886 (package-with-python2 python-cysignals))
9887
9888 (define-public python2-shedskin
9889 (package
9890 (name "python2-shedskin")
9891 (version "0.9.4")
9892 (source
9893 (origin
9894 (method url-fetch)
9895 (uri (string-append "https://github.com/shedskin/shedskin/"
9896 "releases/download/v" version
9897 "/shedskin-" version ".tgz"))
9898 (sha256
9899 (base32
9900 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9901 (build-system python-build-system)
9902 (arguments
9903 `(#:python ,python-2
9904 #:phases (modify-phases %standard-phases
9905 (add-after 'unpack 'fix-resulting-include-libs
9906 (lambda* (#:key inputs #:allow-other-keys)
9907 (let ((libgc (assoc-ref inputs "libgc"))
9908 (pcre (assoc-ref inputs "pcre")))
9909 (substitute* "shedskin/makefile.py"
9910 (("variable == 'CCFLAGS':[ ]*")
9911 (string-append "variable == 'CCFLAGS':\n"
9912 " line += ' -I " pcre "/include"
9913 " -I " libgc "/include'"))
9914 (("variable == 'LFLAGS':[ ]*")
9915 (string-append "variable == 'LFLAGS':\n"
9916 " line += ' -L" pcre "/lib"
9917 " -L " libgc "/lib'")))
9918 #t))))))
9919 (inputs `(("pcre" ,pcre)
9920 ("libgc" ,libgc)))
9921 (home-page "https://shedskin.github.io/")
9922 (synopsis "Experimental Python-2 to C++ Compiler")
9923 (description (string-append "This is an experimental compiler for a subset of
9924 Python. It generates C++ code and a Makefile."))
9925 (license (list license:gpl3 license:bsd-3 license:expat))))
9926
9927 (define-public python2-rope
9928 (package
9929 (name "python2-rope")
9930 (version "0.11.0")
9931 (source
9932 (origin
9933 (method url-fetch)
9934 (uri (pypi-uri "rope" version))
9935 (sha256
9936 (base32
9937 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
9938 (arguments
9939 ;; Rope has only partial python3 support, see `python-rope'
9940 `(#:python ,python-2))
9941 (build-system python-build-system)
9942 (native-inputs
9943 `(("python2-unittest2" ,python2-unittest2)))
9944 (home-page "https://github.com/python-rope/rope")
9945 (synopsis "Refactoring library for Python")
9946 (description "Rope is a refactoring library for Python. It facilitates
9947 the renaming, moving and extracting of attributes, functions, modules, fields
9948 and parameters in Python 2 source code. These refactorings can also be applied
9949 to occurrences in strings and comments.")
9950 (license license:gpl2)))
9951
9952 (define-public python-rope
9953 (package
9954 (inherit python2-rope)
9955 (name "python-rope")
9956 (arguments `(#:python ,python-wrapper
9957 ;; XXX: Only partial python3 support, results in some failing
9958 ;; tests: <https://github.com/python-rope/rope/issues/247>.
9959 #:tests? #f))
9960 (properties `((python2-variant . ,(delay python2-rope))))))
9961
9962 (define-public python-py3status
9963 (package
9964 (name "python-py3status")
9965 (version "3.16")
9966 (source
9967 (origin
9968 (method url-fetch)
9969 (uri (pypi-uri "py3status" version))
9970 (sha256
9971 (base32
9972 "1xrfph277bgjln3jbpzpgkhxad04fjvj7s3xfil42q1sxi4s3q3g"))))
9973 (build-system python-build-system)
9974 (inputs
9975 `(("file" ,file)))
9976 (arguments
9977 '(#:phases
9978 (modify-phases %standard-phases
9979 ;; 'file' is used for detection of configuration file encoding
9980 ;; let's make link the dependency to particular input
9981 (add-before 'build 'patch-file-path
9982 (lambda* (#:key inputs #:allow-other-keys)
9983 (let ((file-path (assoc-ref inputs "file")))
9984 (substitute* "py3status/parse_config.py"
9985 (("\\['file', '-b'")
9986 (string-append "['" file-path "/bin/file', '-b'")))
9987 #t))))
9988 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
9989 (home-page "https://github.com/ultrabug/py3status")
9990 (synopsis "Extensible i3status wrapper written in Python")
9991 (description "py3status is an i3status wrapper which extends i3status
9992 functionality in a modular way, allowing you to extend your panel with your
9993 own code, responding to click events and updating clock every second.")
9994 (license license:bsd-3)))
9995
9996 (define-public python-tblib
9997 (package
9998 (name "python-tblib")
9999 (version "1.3.2")
10000 (source (origin
10001 (method url-fetch)
10002 (uri (pypi-uri "tblib" version))
10003 (sha256 (base32
10004 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
10005 (build-system python-build-system)
10006 (arguments
10007 `(#:phases
10008 (modify-phases %standard-phases
10009 (add-before 'check 'adjust-tests
10010 (lambda _
10011 (when (which "python3")
10012 ;; Adjust the example output to match that of Python 3.7:
10013 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
10014 (substitute* "README.rst"
10015 (("Exception\\('fail',") "Exception('fail'"))
10016 #t)))
10017 (replace 'check
10018 (lambda _
10019 ;; Upstream runs tests after installation and the package itself
10020 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
10021 ;; found.
10022 (setenv "PYTHONPATH"
10023 (string-append (getcwd) "/build/lib:"
10024 (getenv "PYTHONPATH")))
10025 (invoke "py.test" "-vv" "tests" "README.rst"))))))
10026 (native-inputs
10027 `(("python-pytest" ,python-pytest)
10028 ("python-six" ,python-six)))
10029 (home-page "https://github.com/ionelmc/python-tblib")
10030 (synopsis "Traceback serialization library")
10031 (description
10032 "Traceback serialization allows you to:
10033
10034 @enumerate
10035 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
10036 different processes. This allows better error handling when running code over
10037 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
10038
10039 @item Parse traceback strings and raise with the parsed tracebacks.
10040 @end enumerate\n")
10041 (license license:bsd-3)))
10042
10043 (define-public python2-tblib
10044 (package-with-python2 python-tblib))
10045
10046 (define-public python-greenlet
10047 (package
10048 (name "python-greenlet")
10049 (version "0.4.15")
10050 (source (origin
10051 (method url-fetch)
10052 (uri (pypi-uri "greenlet" version))
10053 (sha256
10054 (base32
10055 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
10056 (build-system python-build-system)
10057 (home-page "https://greenlet.readthedocs.io/")
10058 (synopsis "Lightweight in-process concurrent programming")
10059 (description
10060 "Greenlet package is a spin-off of Stackless, a version of CPython
10061 that supports micro-threads called \"tasklets\". Tasklets run
10062 pseudo-concurrently (typically in a single or a few OS-level threads) and
10063 are synchronized with data exchanges on \"channels\".")
10064 (license (list license:psfl license:expat))))
10065
10066 (define-public python2-greenlet
10067 (package-with-python2 python-greenlet))
10068
10069 (define-public python-objgraph
10070 (package
10071 (name "python-objgraph")
10072 (version "3.4.0")
10073 (source
10074 (origin
10075 (method url-fetch)
10076 (uri (pypi-uri "objgraph" version))
10077 (sha256
10078 (base32
10079 "184m09am5gpbqfaiy7l0hwh476mczbrly1dffs0rw2p1d1i2q32a"))))
10080 (build-system python-build-system)
10081 (propagated-inputs
10082 `(("python-graphviz" ,python-graphviz)))
10083 (native-inputs
10084 `(("python-mock" ,python-mock)
10085 ("graphviz" ,graphviz)))
10086 (home-page "https://mg.pov.lt/objgraph/")
10087 (synopsis "Draw Python object reference graphs with graphviz")
10088 (description
10089 "This package provides tools to draw Python object reference graphs with
10090 graphviz.")
10091 (license license:expat)))
10092
10093 (define-public python-gevent
10094 (package
10095 (name "python-gevent")
10096 (version "1.3.7")
10097 (source (origin
10098 (method url-fetch)
10099 (uri (pypi-uri "gevent" version))
10100 (sha256
10101 (base32
10102 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
10103 (modules '((guix build utils)))
10104 (snippet
10105 '(begin
10106 ;; unbunding libev and c-ares
10107 (delete-file-recursively "deps")
10108 #t))))
10109 (build-system python-build-system)
10110 (arguments
10111 `(#:modules ((ice-9 ftw)
10112 (ice-9 match)
10113 (srfi srfi-26)
10114 (guix build utils)
10115 (guix build python-build-system))
10116 #:phases (modify-phases %standard-phases
10117 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
10118 (lambda _
10119 (substitute* "src/gevent/subprocess.py"
10120 (("/bin/sh") (which "sh")))
10121 (for-each (lambda (file)
10122 (substitute* file
10123 (("/bin/sh") (which "sh"))
10124 (("/bin/true") (which "true"))))
10125 (find-files "src/greentest" "\\.py$"))
10126 #t))
10127 (add-before 'build 'do-not-use-bundled-sources
10128 (lambda* (#:key inputs #:allow-other-keys)
10129 (setenv "CONFIG_SHELL" (which "bash"))
10130 (setenv "LIBEV_EMBED" "false")
10131 (setenv "CARES_EMBED" "false")
10132 (setenv "EMBED" "false")
10133
10134 ;; Prevent building bundled libev.
10135 (substitute* "setup.py"
10136 (("run_make=_BUILDING")
10137 "run_make=False"))
10138
10139 (let ((greenlet (string-append
10140 (assoc-ref inputs "python-greenlet")
10141 "/include")))
10142 (match (scandir greenlet
10143 (lambda (item)
10144 (string-prefix? "python" item)))
10145 ((python)
10146 (setenv "C_INCLUDE_PATH"
10147 (string-append greenlet "/" python)))))
10148 #t))
10149 (add-before 'check 'skip-timer-test
10150 (lambda _
10151 ;; XXX: Skip 'TestTimerResolution', which appears to be
10152 ;; unreliable.
10153 (substitute* "src/greentest/test__core_timer.py"
10154 (("not greentest.RUNNING_ON_CI") "False"))
10155 #t))
10156 (replace 'check
10157 (lambda _
10158 ;; Make sure the build directory is on PYTHONPATH.
10159 (setenv "PYTHONPATH"
10160 (string-append
10161 (getenv "PYTHONPATH") ":"
10162 (getcwd) "/build/"
10163 (car (scandir "build" (cut string-prefix? "lib." <>)))))
10164 (with-directory-excursion "src/greentest"
10165 ;; XXX: Many tests require network access. Instead we only
10166 ;; run known-good tests. Unfortunately we cannot use
10167 ;; recursion here since this directory also contains
10168 ;; Python-version-specific subfolders.
10169 (apply invoke "python" "testrunner.py" "--config"
10170 "known_failures.py"
10171 (scandir "." (cut regexp-exec
10172 (make-regexp "test_+(subprocess|core)")
10173 <>)))))))))
10174 (propagated-inputs
10175 `(("python-greenlet" ,python-greenlet)
10176 ("python-objgraph" ,python-objgraph)))
10177 (native-inputs
10178 `(("python-six" ,python-six)))
10179 (inputs
10180 `(("c-ares" ,c-ares)
10181 ("libev" ,libev)))
10182 (home-page "http://www.gevent.org/")
10183 (synopsis "Coroutine-based network library")
10184 (description
10185 "gevent is a coroutine-based Python networking library that uses greenlet
10186 to provide a high-level synchronous API on top of the libev event loop.")
10187 (license license:expat)
10188 (properties `((python2-variant . ,(delay python2-gevent))))))
10189
10190 (define-public python2-gevent
10191 (let ((base (package-with-python2
10192 (strip-python2-variant python-gevent))))
10193 (package
10194 (inherit base)
10195 (native-inputs `(,@(package-native-inputs python-gevent)
10196 ("python-mock" ,python2-mock))))))
10197
10198 (define-public python-fastimport
10199 (package
10200 (name "python-fastimport")
10201 (version "0.9.6")
10202 (source
10203 (origin
10204 (method url-fetch)
10205 (uri (pypi-uri "fastimport" version))
10206 (sha256
10207 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
10208 (build-system python-build-system)
10209 (home-page "https://github.com/jelmer/python-fastimport")
10210 (synopsis "VCS fastimport parser and generator in Python")
10211 (description "This package provides a parser for and generator of the Git
10212 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
10213 format.")
10214 (license license:gpl2+)))
10215
10216 (define-public python2-fastimport
10217 (package-with-python2 python-fastimport))
10218
10219 (define-public python-twisted
10220 (package
10221 (name "python-twisted")
10222 (version "19.7.0")
10223 (source (origin
10224 (method url-fetch)
10225 (uri (pypi-uri "Twisted" version ".tar.bz2"))
10226 (sha256
10227 (base32
10228 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
10229 (build-system python-build-system)
10230 (arguments
10231 '(#:tests? #f)) ; FIXME: some tests fail
10232 (propagated-inputs
10233 `(("python-zope-interface" ,python-zope-interface)
10234 ("python-pyhamcrest" ,python-pyhamcrest)
10235 ("python-incremental" ,python-incremental)
10236 ("python-hyperlink" ,python-hyperlink)
10237 ("python-constantly" ,python-constantly)
10238 ("python-automat" ,python-automat)))
10239 (home-page "https://twistedmatrix.com/")
10240 (synopsis "Asynchronous networking framework written in Python")
10241 (description
10242 "Twisted is an extensible framework for Python programming, with special
10243 focus on event-based network programming and multiprotocol integration.")
10244 (license license:expat)))
10245
10246 (define-public python2-twisted
10247 (package-with-python2 python-twisted))
10248
10249 (define-public python-pika
10250 (package
10251 (name "python-pika")
10252 (version "0.12.0")
10253 (source
10254 (origin
10255 (method url-fetch)
10256 (uri (pypi-uri "pika" version))
10257 (sha256
10258 (base32
10259 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
10260 (build-system python-build-system)
10261 (native-inputs
10262 `(("python-pyev" ,python-pyev)
10263 ("python-tornado" ,python-tornado)
10264 ("python-twisted" ,python-twisted)))
10265 (home-page "https://pika.readthedocs.org")
10266 (synopsis "Pure Python AMQP Client Library")
10267 (description
10268 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
10269 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
10270 network support library.")
10271 (license license:bsd-3)))
10272
10273 (define-public python2-pika
10274 (package-with-python2 python-pika))
10275
10276 (define-public python-ply
10277 (package
10278 (name "python-ply")
10279 (version "3.10")
10280 (source
10281 (origin
10282 (method url-fetch)
10283 (uri (pypi-uri "ply" version))
10284 (sha256
10285 (base32
10286 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
10287 (build-system python-build-system)
10288 (home-page "http://www.dabeaz.com/ply/")
10289 (synopsis "Python Lex & Yacc")
10290 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
10291 It uses LR parsing and does extensive error checking.")
10292 (license license:bsd-3)))
10293
10294 (define-public python2-ply
10295 (package-with-python2 python-ply))
10296
10297 (define-public python-tabulate
10298 (package
10299 (name "python-tabulate")
10300 (version "0.7.7")
10301 (source (origin
10302 (method url-fetch)
10303 (uri (pypi-uri "tabulate" version))
10304 (sha256
10305 (base32
10306 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
10307 (build-system python-build-system)
10308 (arguments
10309 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
10310 ;; and the latest release is not tagged in the upstream repository.
10311 '(#:tests? #f))
10312 (home-page "https://bitbucket.org/astanin/python-tabulate")
10313 (synopsis "Pretty-print tabular data")
10314 (description
10315 "Tabulate is a library and command-line utility to pretty-print tabular
10316 data in Python.")
10317 (license license:expat)))
10318
10319 (define-public python2-tabulate
10320 (package-with-python2 python-tabulate))
10321
10322 (define-public python-kazoo
10323 (package
10324 (name "python-kazoo")
10325 (version "2.4.0")
10326 (source
10327 (origin
10328 (method url-fetch)
10329 (uri (pypi-uri "kazoo" version))
10330 (sha256
10331 (base32
10332 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
10333 (build-system python-build-system)
10334 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
10335 (propagated-inputs
10336 `(("python-six" ,python-six)))
10337 (home-page "https://kazoo.readthedocs.org")
10338 (synopsis "High-level Zookeeper client library")
10339 (description
10340 "Kazoo is a Python client library for the Apache Zookeeper distributed
10341 application service. It is designed to be easy to use and to avoid common
10342 programming errors.")
10343 (license license:asl2.0)))
10344
10345 (define-public python2-kazoo
10346 (package-with-python2 python-kazoo))
10347
10348 (define-public python-pykafka
10349 (package
10350 (name "python-pykafka")
10351 (version "2.4.0")
10352 (source (origin
10353 (method url-fetch)
10354 (uri (pypi-uri "pykafka" version))
10355 (sha256
10356 (base32
10357 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10358 (build-system python-build-system)
10359 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
10360 (propagated-inputs
10361 `(("python-gevent" ,python-gevent)
10362 ("python-kazoo" ,python-kazoo)
10363 ("python-tabulate" ,python-tabulate)))
10364 (inputs
10365 `(("librdkafka" ,librdkafka)))
10366 (home-page "https://pykafka.readthedocs.io/")
10367 (synopsis "Apache Kafka client for Python")
10368 (description
10369 "PyKafka is a client for the Apache Kafka distributed messaging system.
10370 It includes Python implementations of Kafka producers and consumers, which
10371 are optionally backed by a C extension built on librdkafka.")
10372 (license license:asl2.0)))
10373
10374 (define-public python2-pykafka
10375 (package-with-python2 python-pykafka))
10376
10377 (define-public python-wcwidth
10378 (package
10379 (name "python-wcwidth")
10380 (version "0.1.7")
10381 (source
10382 (origin
10383 (method url-fetch)
10384 (uri (pypi-uri "wcwidth" version))
10385 (sha256
10386 (base32
10387 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
10388 (build-system python-build-system)
10389 (home-page "https://github.com/jquast/wcwidth")
10390 (synopsis "Measure number of terminal column cells of wide-character codes")
10391 (description "Wcwidth measures the number of terminal column cells of
10392 wide-character codes. It is useful for those implementing a terminal emulator,
10393 or programs that carefully produce output to be interpreted by one. It is a
10394 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
10395 specified in POSIX.1-2001 and POSIX.1-2008.")
10396 (license license:expat)))
10397
10398 (define-public python2-wcwidth
10399 (package-with-python2 python-wcwidth))
10400
10401 (define-public python2-jsonrpclib
10402 (package
10403 (name "python2-jsonrpclib")
10404 (version "0.1.7")
10405 (source (origin
10406 (method url-fetch)
10407 (uri (pypi-uri "jsonrpclib" version))
10408 (sha256
10409 (base32
10410 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10411 (build-system python-build-system)
10412 (arguments
10413 `(#:tests? #f
10414 #:python ,python-2))
10415 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10416 (synopsis "Implementation of JSON-RPC specification for Python")
10417 (description
10418 "This library is an implementation of the JSON-RPC specification.
10419 It supports both the original 1.0 specification, as well as the
10420 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10421 etc.")
10422 (license license:asl2.0)))
10423
10424 (define-public python-chai
10425 (package
10426 (name "python-chai")
10427 (version "1.1.2")
10428 (source (origin
10429 (method url-fetch)
10430 (uri (pypi-uri "chai" version))
10431 (sha256
10432 (base32
10433 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
10434 (build-system python-build-system)
10435 (home-page "https://github.com/agoragames/chai")
10436 (synopsis "Mocking framework for Python")
10437 (description
10438 "Chai provides an api for mocking, stubbing and spying your python
10439 objects, patterned after the Mocha library for Ruby.")
10440 (license license:bsd-3)))
10441
10442 (define-public python2-chai
10443 (package-with-python2 python-chai))
10444
10445 (define-public python-inflection
10446 (package
10447 (name "python-inflection")
10448 (version "0.3.1")
10449 (source
10450 (origin (method url-fetch)
10451 (uri (pypi-uri "inflection" version))
10452 (sha256
10453 (base32
10454 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10455 (build-system python-build-system)
10456 (native-inputs
10457 `(("python-pytest" ,python-pytest)))
10458 (home-page "https://github.com/jpvanhal/inflection")
10459 (synopsis "Python string transformation library")
10460 (description
10461 "Inflection is a string transformation library. It singularizes
10462 and pluralizes English words, and transforms strings from CamelCase to
10463 underscored string.")
10464 (license license:expat)))
10465
10466 (define-public python2-inflection
10467 (package-with-python2 python-inflection))
10468
10469 (define-public python-pylev
10470 (package
10471 (name "python-pylev")
10472 (version "1.3.0")
10473 (source (origin
10474 (method url-fetch)
10475 (uri (pypi-uri "pylev" version))
10476 (sha256
10477 (base32
10478 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
10479 (build-system python-build-system)
10480 (home-page "https://github.com/toastdriven/pylev")
10481 (synopsis "Levenshtein distance implementation in Python")
10482 (description "Pure Python Levenshtein implementation, based off the
10483 Wikipedia code samples at
10484 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
10485 (license license:bsd-3)))
10486
10487 (define-public python2-pylev
10488 (package-with-python2 python-pylev))
10489
10490 (define-public python-cleo
10491 (package
10492 (name "python-cleo")
10493 (version "0.6.1")
10494 (source (origin
10495 (method url-fetch)
10496 (uri (pypi-uri "cleo" version))
10497 (sha256
10498 (base32
10499 "0q1cf0szr0d54am4pypzwdnm74zpladdsinad94c2fz5i06fdpf7"))))
10500 (build-system python-build-system)
10501 (native-inputs
10502 `(;; For testing
10503 ("python-mock" ,python-mock)
10504 ("python-pytest-mock" ,python-pytest-mock)
10505 ("python-pytest" ,python-pytest)))
10506 (propagated-inputs
10507 `(("python-backpack" ,python-backpack)
10508 ("python-pastel" ,python-pastel)
10509 ("python-pylev" ,python-pylev)))
10510 (home-page "https://github.com/sdispater/cleo")
10511 (synopsis "Command-line arguments library for Python")
10512 (description
10513 "Cleo allows you to create command-line commands with signature in
10514 docstring and colored output.")
10515 (license license:expat)))
10516
10517 (define-public python2-cleo
10518 (package-with-python2 python-cleo))
10519
10520 (define-public python-lazy-object-proxy
10521 (package
10522 (name "python-lazy-object-proxy")
10523 (version "1.3.1")
10524 (source (origin
10525 (method url-fetch)
10526 (uri (pypi-uri "lazy-object-proxy" version))
10527 (sha256
10528 (base32
10529 "0yha7q9bhw857fwaby785d63mffhngl9npwzlk9i0pwlkwvbx4gb"))))
10530 (build-system python-build-system)
10531 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10532 (synopsis "Lazy object proxy for python")
10533 (description
10534 "Lazy object proxy is an object that wraps a callable but defers the call
10535 until the object is actually required, and caches the result of said call.")
10536 (license license:bsd-2)))
10537
10538 (define-public python2-lazy-object-proxy
10539 (package-with-python2 python-lazy-object-proxy))
10540
10541 (define-public python-dnspython
10542 (package
10543 (name "python-dnspython")
10544 (version "1.15.0")
10545 (source (origin
10546 (method url-fetch)
10547 (uri (string-append "http://www.dnspython.org/kits/"
10548 version "/dnspython-" version ".tar.gz"))
10549 (sha256
10550 (base32
10551 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
10552 (build-system python-build-system)
10553 (arguments '(#:tests? #f)) ; XXX: requires internet access
10554 (home-page "http://www.dnspython.org")
10555 (synopsis "DNS toolkit for Python")
10556 (description
10557 "dnspython is a DNS toolkit for Python. It supports almost all record
10558 types. It can be used for queries, zone transfers, and dynamic updates.
10559 It supports TSIG authenticated messages and EDNS0.")
10560 (license license:expat)))
10561
10562 (define-public python2-dnspython
10563 (package-with-python2 python-dnspython))
10564
10565 (define-public python-email-validator
10566 (package
10567 (name "python-email-validator")
10568 (version "1.0.2")
10569 (source
10570 (origin (method url-fetch)
10571 (uri (pypi-uri "email_validator" version))
10572 (sha256
10573 (base32
10574 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
10575 (build-system python-build-system)
10576 (arguments
10577 '(#:phases
10578 (modify-phases %standard-phases
10579 (add-before 'build 'use-dnspython
10580 (lambda _
10581 (substitute* "setup.py"
10582 (("dnspython3") "dnspython"))
10583 #t)))))
10584 (propagated-inputs
10585 `(("python-dnspython" ,python-dnspython)
10586 ("python-idna" ,python-idna)))
10587 (home-page "https://github.com/JoshData/python-email-validator")
10588 (synopsis "Email address validation library for Python")
10589 (description
10590 "This library validates email address syntax and deliverability.")
10591 (license license:cc0)))
10592
10593 (define-public python2-email-validator
10594 (package-with-python2 python-email-validator))
10595
10596 (define-public python-ukpostcodeparser
10597 (package
10598 (name "python-ukpostcodeparser")
10599 (version "1.0.3")
10600 (source (origin
10601 (method url-fetch)
10602 (uri (pypi-uri "UkPostcodeParser" version))
10603 (sha256
10604 (base32
10605 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10606 (build-system python-build-system)
10607 (home-page "https://github.com/hamstah/ukpostcodeparser")
10608 (synopsis "UK Postcode parser for Python")
10609 (description
10610 "This library provides the @code{parse_uk_postcode} function for
10611 parsing UK postcodes.")
10612 (license license:expat)))
10613
10614 (define-public python2-ukpostcodeparser
10615 (package-with-python2 python-ukpostcodeparser))
10616
10617 (define-public python-faker
10618 (package
10619 (name "python-faker")
10620 (version "0.7.9")
10621 (source (origin
10622 (method url-fetch)
10623 (uri (pypi-uri "Faker" version))
10624 (sha256
10625 (base32
10626 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
10627 (patches
10628 (search-patches "python-faker-fix-build-32bit.patch"))
10629 (modules '((guix build utils)))
10630 (snippet
10631 '(begin
10632 (for-each delete-file (find-files "." "\\.pyc$"))
10633 #t))))
10634 (build-system python-build-system)
10635 (arguments
10636 '(#:phases
10637 (modify-phases %standard-phases
10638 (replace 'check
10639 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
10640 (native-inputs
10641 `(;; For testing
10642 ("python-email-validator" ,python-email-validator)
10643 ("python-mock" ,python-mock)
10644 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
10645 (propagated-inputs
10646 `(("python-dateutil" ,python-dateutil)
10647 ("python-six" ,python-six)))
10648 (home-page "https://github.com/joke2k/faker")
10649 (synopsis "Python package that generates fake data")
10650 (description
10651 "Faker is a Python package that generates fake data such as names,
10652 addresses, and phone numbers.")
10653 (license license:expat)
10654 (properties `((python2-variant . ,(delay python2-faker))))))
10655
10656 (define-public python2-faker
10657 (let ((base (package-with-python2 (strip-python2-variant
10658 python-faker))))
10659 (package
10660 (inherit base)
10661 (propagated-inputs
10662 `(("python2-ipaddress" ,python2-ipaddress)
10663 ,@(package-propagated-inputs base))))))
10664
10665 (define-public python-pyaml
10666 (package
10667 (name "python-pyaml")
10668 (version "18.11.0")
10669 (source (origin
10670 (method url-fetch)
10671 (uri (pypi-uri "pyaml" version))
10672 (sha256
10673 (base32
10674 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
10675 (build-system python-build-system)
10676 (native-inputs
10677 `(("python-unidecode" ,python-unidecode)))
10678 (propagated-inputs
10679 `(("python-pyyaml" ,python-pyyaml)))
10680 (home-page "https://github.com/mk-fg/pretty-yaml")
10681 (synopsis "YAML pretty-print library for Python")
10682 (description
10683 "pyaml is a PyYAML based python module to produce pretty and readable
10684 YAML-serialized data.")
10685 (license license:wtfpl2)))
10686
10687 (define-public python2-pyaml
10688 (package-with-python2 python-pyaml))
10689
10690 (define-public python-backpack
10691 (package
10692 (name "python-backpack")
10693 (version "0.1")
10694 (source
10695 (origin
10696 (method url-fetch)
10697 (uri (pypi-uri "backpack" version))
10698 (sha256
10699 (base32
10700 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
10701 (build-system python-build-system)
10702 (native-inputs
10703 `(("python-pytest" ,python-pytest)
10704 ("python-nose" ,python-nose)))
10705 (propagated-inputs
10706 `(("python-simplejson" ,python-simplejson)))
10707 (home-page "https://github.com/sdispater/backpack")
10708 (synopsis "Utilities for working with Python collections")
10709 (description "Backpack provides some useful utilities for working with
10710 collections of data.")
10711 (license license:expat)))
10712
10713 (define-public python2-backpack
10714 (package-with-python2 python-backpack))
10715
10716 (define-public python-prompt-toolkit
10717 (package
10718 (name "python-prompt-toolkit")
10719 (version "2.0.7")
10720 (source
10721 (origin
10722 (method url-fetch)
10723 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10724 (sha256
10725 (base32
10726 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
10727 (build-system python-build-system)
10728 (arguments
10729 `(#:phases
10730 (modify-phases %standard-phases
10731 (delete 'check)
10732 (add-after 'install 'post-install-check
10733 (lambda* (#:key inputs outputs #:allow-other-keys)
10734 ;; HOME is needed for the test
10735 ;; "test_pathcompleter_can_expanduser".
10736 (setenv "HOME" "/tmp")
10737 (add-installed-pythonpath inputs outputs)
10738 (invoke "py.test"))))))
10739 (propagated-inputs
10740 `(("python-wcwidth" ,python-wcwidth)
10741 ("python-six" ,python-six)
10742 ("python-pygments" ,python-pygments)))
10743 (native-inputs
10744 `(("python-pytest" ,python-pytest)))
10745 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10746 (synopsis "Library for building command line interfaces in Python")
10747 (description
10748 "Prompt-Toolkit is a library for building interactive command line
10749 interfaces in Python. It's like GNU Readline but it also features syntax
10750 highlighting while typing, out-of-the-box multi-line input editing, advanced
10751 code completion, incremental search, support for Chinese double-width
10752 characters, mouse support, and auto suggestions.")
10753 (license license:bsd-3)))
10754
10755 (define-public python2-prompt-toolkit
10756 (package-with-python2 python-prompt-toolkit))
10757
10758 (define-public python-prompt-toolkit-1
10759 (package (inherit python-prompt-toolkit)
10760 (version "1.0.15")
10761 (source
10762 (origin
10763 (method url-fetch)
10764 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10765 (sha256
10766 (base32
10767 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
10768
10769 (define-public python2-prompt-toolkit-1
10770 (package-with-python2 python-prompt-toolkit-1))
10771
10772 (define-public python-jedi
10773 (package
10774 (name "python-jedi")
10775 (version "0.15.1")
10776 (source
10777 (origin
10778 (method url-fetch)
10779 (uri (pypi-uri "jedi" version))
10780 (sha256
10781 (base32
10782 "0bp4pxhsynaarbvzblsn5x32lzp29svy3sxfy8i6m5iwz9s9r1ds"))))
10783 (build-system python-build-system)
10784 (arguments
10785 `(#:phases
10786 (modify-phases %standard-phases
10787 (add-after 'unpack 'disable-file-completion-test
10788 ;; A single parameterized test currently fail (see:
10789 ;; https://github.com/davidhalter/jedi/issues/1395). Remove it.
10790 (lambda _
10791 (substitute* "test/test_api/test_completion.py"
10792 ((".*'example.py', 'rb\"' \\+ join\\('\\.\\.'.*") ""))
10793 #t))
10794 (replace 'check
10795 (lambda _
10796 (setenv "HOME" "/tmp")
10797 (invoke "python" "-m" "pytest"))))))
10798 (native-inputs
10799 `(("python-pytest" ,python-pytest)
10800 ("python-docopt" ,python-docopt)))
10801 (propagated-inputs
10802 `(("python-parso" ,python-parso)))
10803 (home-page "https://github.com/davidhalter/jedi")
10804 (synopsis "Autocompletion and static analysis library for Python")
10805 (description
10806 "Jedi is a static analysis tool for Python that can be used in Integrated
10807 Development Environments (@dfn{IDE}s) and text editors. It understands Python
10808 on a deeper level than many other static analysis frameworks for Python.
10809
10810 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
10811 well.")
10812 (license license:expat)))
10813
10814 (define-public python2-jedi
10815 (package-with-python2 python-jedi))
10816
10817 (define-public ptpython
10818 (package
10819 (name "ptpython")
10820 (version "0.34")
10821 (source (origin
10822 (method url-fetch)
10823 (uri (pypi-uri "ptpython" version))
10824 (sha256
10825 (base32
10826 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
10827 (build-system python-build-system)
10828 (arguments
10829 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
10830 (propagated-inputs
10831 `(("python-docopt" ,python-docopt)
10832 ("python-jedi" ,python-jedi)
10833 ("python-prompt-toolkit" ,python-prompt-toolkit)
10834 ("python-pygments" ,python-pygments)))
10835 (home-page "https://github.com/jonathanslenders/ptpython")
10836 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
10837 (description
10838 "ptpython is a Python read-eval-print loop with IDE-like features.
10839 It supports syntax highlighting, multiline editing, autocompletion, mouse,
10840 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
10841 etc.")
10842 (license license:bsd-3)
10843 (properties `((python2-variant . ,(delay ptpython-2))))))
10844
10845 (define-public ptpython-2
10846 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
10847 (package
10848 (inherit base)
10849 (name "ptpython2"))))
10850
10851 (define-public python-stem
10852 (package
10853 (name "python-stem")
10854 (version "1.7.1")
10855 (source
10856 (origin
10857 (method url-fetch)
10858 (uri (pypi-uri "stem" version))
10859 (sha256
10860 (base32
10861 "18lc95pmc7i089nlsb06dsxyjl5wbhxfqgdxbjcia35ndh8z7sn9"))))
10862 (build-system python-build-system)
10863 (arguments
10864 `(#:phases
10865 (modify-phases %standard-phases
10866 (replace 'check
10867 (lambda _
10868 (invoke "./run_tests.py" "--unit")
10869 #t)))))
10870 (native-inputs
10871 `(("python-mock" ,python-mock)
10872 ("python-pycodestyle" ,python-pycodestyle)
10873 ("python-pyflakes" ,python-pyflakes)))
10874 (home-page "https://stem.torproject.org/")
10875 (synopsis
10876 "Python controller library that allows applications to interact with Tor")
10877 (description
10878 "Stem is a Python controller library for Tor. With it you can use Tor's
10879 control protocol to script against the Tor process and read descriptor data
10880 relays publish about themselves.")
10881 (license license:lgpl3)))
10882
10883 (define-public python2-stem
10884 (package-with-python2 python-stem))
10885
10886 (define-public python-pyserial
10887 (package
10888 (name "python-pyserial")
10889 (version "3.1.1")
10890 (source
10891 (origin
10892 (method url-fetch)
10893 (uri (pypi-uri "pyserial" version))
10894 (sha256
10895 (base32
10896 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
10897 (build-system python-build-system)
10898 (arguments
10899 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
10900 ;; #:phases
10901 ;; (modify-phases %standard-phases
10902 ;; (replace 'check
10903 ;; (lambda _
10904 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
10905 (home-page
10906 "https://github.com/pyserial/pyserial")
10907 (synopsis "Python Serial Port Bindings")
10908 (description "@code{pyserial} provide serial port bindings for Python. It
10909 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
10910 and/or Xon/Xoff. The port is accessed in RAW mode.")
10911 (license license:bsd-3)))
10912
10913 (define-public python2-pyserial
10914 (package-with-python2 python-pyserial))
10915
10916 (define-public python-kivy
10917 (package
10918 (name "python-kivy")
10919 (version "1.10.1")
10920 (source
10921 (origin
10922 (method url-fetch)
10923 (uri (pypi-uri "Kivy" version))
10924 (file-name (string-append name "-" version ".tar.gz"))
10925 (sha256
10926 (base32
10927 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
10928 (build-system python-build-system)
10929 (arguments
10930 `(#:tests? #f ; Tests require many optional packages
10931 #:phases
10932 (modify-phases %standard-phases
10933 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
10934 (lambda* (#:key inputs #:allow-other-keys)
10935 (setenv "KIVY_SDL2_PATH"
10936 (string-append (assoc-ref inputs "sdl-union")
10937 "/include/SDL2"))
10938 #t)))))
10939 (native-inputs
10940 `(("git" ,git)
10941 ("pkg-config" ,pkg-config)
10942 ("python-cython" ,python-cython)))
10943 (inputs
10944 `(("gstreamer" ,gstreamer)
10945 ("mesa" ,mesa)
10946 ("sdl-union"
10947 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
10948 (home-page "http://kivy.org")
10949 (synopsis
10950 "Multitouch application framework")
10951 (description
10952 "A software library for rapid development of
10953 hardware-accelerated multitouch applications.")
10954 (license license:expat)))
10955
10956 (define-public python2-kivy
10957 (package-with-python2 python-kivy))
10958
10959 (define-public python-kivy-next
10960 (deprecated-package "python-kivy-next" python-kivy))
10961
10962 (define-public python2-kivy-next
10963 (deprecated-package "python2-kivy-next" python2-kivy))
10964
10965 (define-public python-binaryornot
10966 (package
10967 (name "python-binaryornot")
10968 (version "0.4.4")
10969 (source (origin
10970 (method url-fetch)
10971 (uri (pypi-uri "binaryornot" version))
10972 (sha256
10973 (base32
10974 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
10975 (build-system python-build-system)
10976 (arguments
10977 `(#:phases
10978 (modify-phases %standard-phases
10979 (add-after 'unpack 'patch-tests
10980 (lambda _
10981 ;; TypeError: binary() got an unexpected keyword argument
10982 ;; 'average_size'.
10983 (substitute* "tests/test_check.py"
10984 (("average_size=512") ""))
10985 #t)))))
10986 (propagated-inputs
10987 `(("python-chardet" ,python-chardet)
10988 ("python-hypothesis" ,python-hypothesis)))
10989 (home-page "https://github.com/audreyr/binaryornot")
10990 (synopsis "Package to check if a file is binary or text")
10991 (description "Ultra-lightweight pure Python package to check if a file is
10992 binary or text.")
10993 (license license:bsd-3)
10994 (properties `((python2-variant . ,(delay python2-binaryornot))))))
10995
10996 (define-public python2-binaryornot
10997 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
10998 (package (inherit base)
10999 (propagated-inputs
11000 `(("python2-enum34" ,python2-enum34)
11001 ,@(package-propagated-inputs base))))))
11002
11003 (define-public python-binwalk
11004 (let ((commit "64201acfb5b0a9cdd9faa58c40a36dcff8612e29")
11005 (revision "0"))
11006 (package
11007 (name "python-binwalk")
11008 (version (git-version "2.1.1" revision commit))
11009 (source
11010 (origin
11011 (method git-fetch)
11012 (uri (git-reference
11013 (url "https://github.com/ReFirmLabs/binwalk")
11014 (commit commit)))
11015 (file-name (git-file-name name version))
11016 (sha256
11017 (base32
11018 "1z7ca6rfp887hw5jc3sb45mm4fa0xid4lsp2z8g4r590dr7k7w15"))))
11019 (build-system python-build-system)
11020 (arguments
11021 `(#:phases
11022 (modify-phases %standard-phases
11023 (add-before 'check 'set-pythonpath
11024 (lambda _
11025 (setenv "PYTHONPATH"
11026 (string-append
11027 (getcwd) "/src/"
11028 ":" (getenv "PYTHONPATH")))
11029 (setenv "HOME" "")
11030 #t)))))
11031 (native-inputs
11032 `(("python-coverage" ,python-coverage)
11033 ("python-nose" ,python-nose)))
11034 (home-page "https://github.com/ReFirmLabs/binwalk")
11035 (synopsis "Firmware analysis tool")
11036 (description "Binwalk is a tool for analyzing, reverse engineering, and extracting firmware images")
11037 (license license:expat))))
11038
11039 (define-public python-nltk
11040 (package
11041 (name "python-nltk")
11042 (version "3.2.1")
11043 (source (origin
11044 (method url-fetch)
11045 (uri (pypi-uri "nltk" version))
11046 (sha256
11047 (base32
11048 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
11049 (build-system python-build-system)
11050 (arguments
11051 '(;; The tests require some extra resources to be downloaded.
11052 ;; TODO Try packaging these resources.
11053 #:tests? #f))
11054 (home-page "http://nltk.org/")
11055 (synopsis "Natural Language Toolkit")
11056 (description "It provides interfaces to over 50 corpora and lexical
11057 resources such as WordNet, along with a suite of text processing libraries
11058 for classification, tokenization, stemming, tagging, parsing, and semantic
11059 reasoning, wrappers for natural language processing libraries.")
11060 (license license:asl2.0)))
11061
11062 (define-public python2-nltk
11063 (package-with-python2 python-nltk))
11064
11065 (define-public python-pymongo
11066 (package
11067 (name "python-pymongo")
11068 (version "3.7.2")
11069 (source (origin
11070 (method url-fetch)
11071 (uri (pypi-uri "pymongo" version))
11072 (sha256
11073 (base32
11074 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
11075 (build-system python-build-system)
11076 (propagated-inputs
11077 `(("python-certifi" ,python-certifi)))
11078 (home-page "https://github.com/mongodb/mongo-python-driver")
11079 (synopsis "Python driver for MongoDB")
11080 (description "Python driver for MongoDB.")
11081 (license license:asl2.0)))
11082
11083 (define-public python2-pymongo
11084 (package-with-python2 python-pymongo))
11085
11086 (define-public python-consul
11087 (package
11088 (name "python-consul")
11089 (version "0.6.1")
11090 (source
11091 (origin
11092 (method url-fetch)
11093 (uri (pypi-uri "python-consul" version))
11094 (sha256
11095 (base32
11096 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
11097 (build-system python-build-system)
11098 (arguments
11099 '(#:tests? #f)) ; The tests are not distributed
11100 (propagated-inputs
11101 `(("python-requests" ,python-requests)
11102 ("python-six" ,python-six)))
11103 (home-page "https://github.com/cablehead/python-consul")
11104 (synopsis "Python client for Consul")
11105 (description
11106 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
11107 discovery, monitoring and configuration.")
11108 (license license:expat)))
11109
11110 (define-public python2-consul
11111 (package-with-python2 python-consul))
11112
11113 (define-public python-schematics
11114 (package
11115 (name "python-schematics")
11116 (version "1.1.1")
11117 (source
11118 (origin
11119 (method git-fetch)
11120 (uri (git-reference
11121 (url "https://github.com/schematics/schematics.git")
11122 (commit (string-append "v" version))))
11123 (file-name (git-file-name name version))
11124 (sha256
11125 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
11126 (build-system python-build-system)
11127 (propagated-inputs
11128 `(("python-six" ,python-six)))
11129 (arguments
11130 ;; The tests require a bunch of not very nice packages with fixed
11131 ;; version requirements (e.g. python-coveralls).
11132 `(#:tests? #f))
11133 (home-page "https://github.com/schematics/schematics")
11134 (synopsis "Python Data Structures for Humans")
11135 (description "Python Data Structures for Humans.")
11136 (license license:bsd-3)))
11137
11138 (define-public python2-schematics
11139 (package-with-python2 python-schematics))
11140
11141 (define-public python-odfpy
11142 (package
11143 (name "python-odfpy")
11144 (version "1.3.3")
11145 (source (origin
11146 (method url-fetch)
11147 (uri (pypi-uri "odfpy" version))
11148 (sha256
11149 (base32
11150 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
11151 (arguments
11152 `(#:modules ((srfi srfi-1)
11153 (guix build python-build-system)
11154 (guix build utils))
11155 #:phases
11156 (modify-phases %standard-phases
11157 (replace 'check
11158 ;; The test runner invokes python2 and python3 for test*.py.
11159 ;; To avoid having both in inputs, we replicate it here.
11160 (lambda _
11161 (for-each (lambda (test-file) (invoke "python" test-file))
11162 (find-files "tests" "^test.*\\.py$"))
11163 #t)))))
11164 (build-system python-build-system)
11165 (home-page "https://github.com/eea/odfpy")
11166 (synopsis "Python API and tools to manipulate OpenDocument files")
11167 (description "Collection of libraries and utility programs written in
11168 Python to manipulate OpenDocument 1.2 files.")
11169 (license
11170 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
11171 ;; number of files with other licenses.
11172 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
11173
11174 (define-public python2-odfpy
11175 (package-with-python2 python-odfpy))
11176
11177 (define-public python-natsort
11178 (package
11179 (name "python-natsort")
11180 (version "5.4.1")
11181 (source (origin
11182 (method url-fetch)
11183 (uri (pypi-uri "natsort" version))
11184 (sha256
11185 (base32
11186 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
11187 (build-system python-build-system)
11188 (arguments
11189 `(#:modules ((guix build utils)
11190 (guix build python-build-system)
11191 (srfi srfi-1)
11192 (srfi srfi-26)
11193 (ice-9 ftw))
11194 #:phases
11195 (modify-phases %standard-phases
11196 (add-before 'check 'set-cachedir
11197 ;; Tests require write access to $HOME by default
11198 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
11199 (replace 'check
11200 (lambda _
11201 (let ((cwd (getcwd)))
11202 (setenv "PYTHONPATH"
11203 (string-append
11204 cwd "/build/"
11205 (find (cut string-prefix? "lib" <>)
11206 (scandir (string-append cwd "/build")))
11207 ":"
11208 (getenv "PYTHONPATH")))
11209 (invoke "pytest" "-v")))))))
11210 (native-inputs
11211 `(("python-hypothesis" ,python-hypothesis)
11212 ("python-pytest-cov" ,python-pytest-cov)
11213 ("python-pytest-mock" ,python-pytest-mock)
11214 ("python-pytest" ,python-pytest)))
11215 (propagated-inputs ; TODO: Add python-fastnumbers.
11216 `(("python-pyicu" ,python-pyicu)))
11217 (home-page "https://github.com/SethMMorton/natsort")
11218 (synopsis "Natural sorting for python and shell")
11219 (description
11220 "Natsort lets you apply natural sorting on lists instead of
11221 lexicographical. If you use the built-in @code{sorted} method in python
11222 on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
11223 @code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
11224 @code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
11225 identifies numbers and sorts them separately from strings. It can also sort
11226 version numbers, real numbers, mixed types and more, and comes with a shell
11227 command @command{natsort} that exposes this functionality in the command line.")
11228 (license license:expat)
11229 (properties `((python2-variant . ,(delay python2-natsort))))))
11230
11231 (define-public python2-natsort
11232 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
11233 (package (inherit base)
11234 (native-inputs
11235 `(("python2-pathlib" ,python2-pathlib)
11236 ,@(package-native-inputs base))))))
11237
11238 (define-public python-glances
11239 (package
11240 (name "python-glances")
11241 (version "3.1.1")
11242 (source
11243 (origin
11244 (method url-fetch)
11245 (uri (pypi-uri "Glances" version))
11246 (sha256
11247 (base32
11248 "07j1ggzsqiskyz1i4mrnyr9i95v0dqi0i0hibnv1l188km8shmi8"))
11249 (modules '((guix build utils)))
11250 (snippet
11251 '(begin
11252 ;; Glances phones PyPI for weekly update checks by default.
11253 ;; Disable these. The user can re-enable them if desired.
11254 (substitute* "glances/outdated.py"
11255 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
11256 (string-append indentation
11257 "self.args.disable_check_update = True\n"
11258 line)))
11259 #t))))
11260 (build-system python-build-system)
11261 (propagated-inputs
11262 `(("python-future" ,python-future)
11263 ("python-psutil" ,python-psutil)))
11264 (home-page
11265 "https://github.com/nicolargo/glances")
11266 (synopsis "Cross-platform curses-based monitoring tool")
11267 (description
11268 "Glances is a curses-based monitoring tool for a wide variety of platforms.
11269 Glances uses the PsUtil library to get information from your system. It
11270 monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
11271 (license license:lgpl3+)))
11272
11273 (define-public python2-glances
11274 (package-with-python2 python-glances))
11275
11276 (define-public python-graphql-core
11277 (package
11278 (name "python-graphql-core")
11279 (version "0.5.3")
11280 (source
11281 (origin
11282 (method url-fetch)
11283 (uri (pypi-uri "graphql-core" version))
11284 (sha256
11285 (base32
11286 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
11287 (build-system python-build-system)
11288 (arguments
11289 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
11290 #:phases
11291 (modify-phases %standard-phases
11292 (add-after 'unpack 'patch-hardcoded-version
11293 (lambda _ (substitute*
11294 "setup.py"
11295 (("'gevent==1.1rc1'") "'gevent'"))
11296 #t)))))
11297 (native-inputs
11298 `(("python-gevent" ,python-gevent)
11299 ("python-mock" ,python-mock)
11300 ("python-pytest-mock" ,python-pytest-mock)))
11301 (propagated-inputs
11302 `(("python-promise" ,python-promise)
11303 ("python-six" ,python-six)))
11304 (home-page "https://github.com/graphql-python/graphql-core")
11305 (synopsis "GraphQL implementation for Python")
11306 (description
11307 "GraphQL implementation for Python. GraphQL is a data query language and
11308 runtime designed and used to request and deliver data to mobile and web apps.
11309 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
11310 to Python.")
11311 (license license:expat)))
11312
11313 (define-public python2-graphql-core
11314 (package-with-python2 python-graphql-core))
11315
11316 (define-public python-graphql-relay
11317 (package
11318 (name "python-graphql-relay")
11319 (version "0.4.5")
11320 (source
11321 (origin
11322 (method url-fetch)
11323 (uri (pypi-uri "graphql-relay" version))
11324 (sha256
11325 (base32
11326 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
11327 (build-system python-build-system)
11328 (arguments
11329 '(#:tests? #f)) ; The tests are not distributed
11330 (propagated-inputs
11331 `(("python-graphql-core" ,python-graphql-core)
11332 ("python-promise" ,python-promise)
11333 ("python-six" ,python-six)))
11334 (home-page "https://github.com/graphql-python/graphql-relay-py")
11335 (synopsis "Relay implementation for Python")
11336 (description
11337 "This is a library to allow the easy creation of Relay-compliant servers
11338 using the GraphQL Python reference implementation of a GraphQL server. It
11339 should be noted that the code is a exact port of the original
11340 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
11341 from Facebook.")
11342 (license license:expat)))
11343
11344 (define-public python2-graphql-relay
11345 (package-with-python2 python-graphql-relay))
11346
11347 (define-public python-graphene
11348 (package
11349 (name "python-graphene")
11350 (version "0.10.2")
11351 (source
11352 (origin
11353 (method url-fetch)
11354 (uri (pypi-uri "graphene" version))
11355 (sha256
11356 (base32
11357 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11358 (build-system python-build-system)
11359 (propagated-inputs
11360 `(("python-graphql-core" ,python-graphql-core)
11361 ("python-graphql-relay" ,python-graphql-relay)
11362 ("python-iso8601" ,python-iso8601)
11363 ("python-promise" ,python-promise)
11364 ("python-six" ,python-six)))
11365 (arguments
11366 `(#:tests? #f)) ; no tests/ in the PyPI tarball
11367 (home-page "http://graphene-python.org/")
11368 (synopsis "GraphQL Framework for Python")
11369 (description
11370 "Graphene is a Python library for building GraphQL schemas/types.
11371 A GraphQL schema describes your data model, and provides a GraphQL server
11372 with an associated set of resolve methods that know how to fetch data.")
11373 (properties `((python2-variant . ,(delay python2-graphene))))
11374 (license license:expat)))
11375
11376 (define-public python2-graphene
11377 (let ((base (package-with-python2
11378 (strip-python2-variant python-graphene))))
11379 (package (inherit base)
11380 (native-inputs
11381 `(("python2-sqlalchemy" ,python2-sqlalchemy)
11382 ,@(package-native-inputs base))))))
11383
11384 (define-public python-nautilus
11385 (package
11386 (name "python-nautilus")
11387 (version "0.4.9")
11388 (source
11389 (origin
11390 (method url-fetch)
11391 (uri (pypi-uri "nautilus" version))
11392 (sha256
11393 (base32
11394 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11395 (build-system python-build-system)
11396 (arguments `(#:tests? #f)) ; fails to import test modules
11397 (propagated-inputs
11398 `(("python-bcrypt" ,python-bcrypt)
11399 ("python-click" ,python-click)
11400 ("python-consul" ,python-consul)
11401 ("python-graphene" ,python-graphene)
11402 ("python-jinja2" ,python-jinja2)
11403 ("python-peewee" ,python-peewee)
11404 ("python-pika" ,python-pika)
11405 ("python-tornado" ,python-tornado)
11406 ("python-wtforms" ,python-wtforms)))
11407 (native-inputs
11408 `(("python-nose2" ,python-nose2)))
11409 (home-page "https://github.com/AlecAivazis/nautilus")
11410 (synopsis "Library for creating microservice applications")
11411 (description
11412 "Nautilus is a framework for flux based microservices that looks to
11413 provide extendible implementations of common aspects of a cloud so that you can
11414 focus on building massively scalable web applications.")
11415 (license license:expat)))
11416
11417 (define-public python-snowballstemmer
11418 (package
11419 (name "python-snowballstemmer")
11420 (version "1.2.1")
11421 (source (origin
11422 (method url-fetch)
11423 (uri (pypi-uri "snowballstemmer" version))
11424 (sha256
11425 (base32
11426 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
11427 (build-system python-build-system)
11428 (arguments
11429 `(;; No tests exist
11430 #:tests? #f))
11431 (home-page "https://github.com/shibukawa/snowball_py")
11432 (synopsis "Snowball stemming library collection for Python")
11433 (description "This package provides 16 word stemmer algorithms generated
11434 from Snowball algorithms. It includes the 15 original ones plus the Poerter
11435 English stemmer.")
11436 (license license:bsd-3)))
11437
11438 (define-public python2-snowballstemmer
11439 (package-with-python2 python-snowballstemmer))
11440
11441 (define-public python-setproctitle
11442 (package
11443 (name "python-setproctitle")
11444 (version "1.1.10")
11445 (source
11446 (origin
11447 (method url-fetch)
11448 (uri (pypi-uri "setproctitle" version))
11449 (sha256
11450 (base32
11451 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11452 (build-system python-build-system)
11453 (arguments
11454 '(#:phases
11455 (modify-phases %standard-phases
11456 (add-before 'check 'patch-Makefile
11457 ;; Stricly this is only required for the python2 variant.
11458 ;; But adding a phase in an inherited package seems to be
11459 ;; cumbersum. So we patch even for python3.
11460 (lambda _
11461 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11462 (when nose
11463 (substitute* "Makefile"
11464 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11465 (string-append nose "/bin/nosetests "))))
11466 #t)))
11467 (replace 'check
11468 (lambda _
11469 (setenv "PYTHON" (or (which "python3") (which "python")))
11470 (setenv "PYCONFIG" (or (which "python3-config")
11471 (which "python-config")))
11472 (setenv "CC" "gcc")
11473 ;; No need to extend PYTHONPATH to find the built package, since
11474 ;; the Makefile will build anyway
11475 (invoke "make" "check"))))))
11476 (native-inputs
11477 `(("procps" ,procps))) ; required for tests
11478 (home-page
11479 "https://github.com/dvarrazzo/py-setproctitle")
11480 (synopsis
11481 "Setproctitle implementation for Python to customize the process title")
11482 (description "The library allows a process to change its title (as displayed
11483 by system tools such as ps and top).
11484
11485 Changing the title is mostly useful in multi-process systems, for
11486 example when a master process is forked: changing the children's title
11487 allows to identify the task each process is busy with. The technique
11488 is used by PostgreSQL and the OpenSSH Server for example.")
11489 (license license:bsd-3)
11490 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11491
11492 (define-public python2-setproctitle
11493 (let ((base (package-with-python2
11494 (strip-python2-variant python-setproctitle))))
11495 (package
11496 (inherit base)
11497 (native-inputs `(("python2-nose" ,python2-nose)
11498 ,@(package-native-inputs base))))))
11499
11500 (define-public python-validictory
11501 (package
11502 (name "python-validictory")
11503 (version "1.0.1")
11504 (source
11505 (origin
11506 (method url-fetch)
11507 (uri (pypi-uri "validictory" version))
11508 (sha256
11509 (base32
11510 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11511 (build-system python-build-system)
11512 (arguments
11513 '(#:phases
11514 (modify-phases %standard-phases
11515 (add-after 'unpack 'bootstrap
11516 ;; Move the tests out of the package directory to avoid
11517 ;; packaging them.
11518 (lambda* _
11519 (rename-file "validictory/tests" "tests")
11520 (delete-file "tests/__init__.py")))
11521 (replace 'check
11522 (lambda _
11523 ;; Extend PYTHONPATH so the built package will be found.
11524 (setenv "PYTHONPATH"
11525 (string-append (getcwd) "/build/lib:"
11526 (getenv "PYTHONPATH")))
11527 (invoke "py.test" "-vv" ))))))
11528 (native-inputs
11529 `(("python-pytest" ,python-pytest)))
11530 (home-page
11531 "https://github.com/jamesturk/validictory")
11532 (synopsis "General purpose Python data validator")
11533 (description "It allows validation of arbitrary Python data structures.
11534
11535 The schema format is based on the JSON Schema
11536 proposal (http://json-schema.org), so combined with json the library is also
11537 useful as a validator for JSON data.")
11538 (license license:expat)))
11539
11540 (define-public python2-validictory
11541 (package-with-python2 python-validictory))
11542
11543 (define-public python-pyelftools
11544 (package
11545 (name "python-pyelftools")
11546 (version "0.25")
11547 (source
11548 (origin
11549 (method url-fetch)
11550 (uri (pypi-uri "pyelftools" version))
11551 (sha256
11552 (base32
11553 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
11554 (build-system python-build-system)
11555 (arguments
11556 `(#:phases
11557 (modify-phases %standard-phases
11558 (add-before 'check 'set-pythonpath
11559 (lambda _
11560 (setenv "PYTHONPATH"
11561 (string-append
11562 (getcwd) "/test/"
11563 ":" (getenv "PYTHONPATH")))
11564 #t)))))
11565 (home-page
11566 "https://github.com/eliben/pyelftools")
11567 (synopsis
11568 "Analyze binary and library file information")
11569 (description "This Python library provides interfaces for parsing and
11570 analyzing two binary and library file formats; the Executable and Linking
11571 Format (ELF), and debugging information in the Debugging With Attributed
11572 Record Format (DWARF).")
11573 (license license:public-domain)))
11574
11575 (define-public python-pyev
11576 (package
11577 (name "python-pyev")
11578 (version "0.9.0")
11579 (source
11580 (origin
11581 (method url-fetch)
11582 (uri (pypi-uri "pyev" version))
11583 (sha256
11584 (base32
11585 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
11586 (build-system python-build-system)
11587 (arguments
11588 `(#:tests? #f ; no test suite
11589 #:phases
11590 (modify-phases %standard-phases
11591 (add-after 'unpack 'patch
11592 (lambda* (#:key inputs #:allow-other-keys)
11593 (let ((libev (string-append (assoc-ref inputs "libev")
11594 "/lib/libev.so.4")))
11595 (substitute* "setup.py"
11596 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
11597 (string-append "libev_dll_name = \"" libev "\"")))))))))
11598 (inputs
11599 `(("libev" ,libev)))
11600 (home-page "http://pythonhosted.org/pyev/")
11601 (synopsis "Python libev interface")
11602 (description "Pyev provides a Python interface to libev.")
11603 (license license:gpl3)))
11604
11605 (define-public python2-pyev
11606 (package-with-python2 python-pyev))
11607
11608 (define-public python-imagesize
11609 (package
11610 (name "python-imagesize")
11611 (version "1.1.0")
11612 (source
11613 (origin
11614 (method url-fetch)
11615 (uri (pypi-uri "imagesize" version))
11616 (sha256
11617 (base32
11618 "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk"))))
11619 (build-system python-build-system)
11620 (home-page "https://github.com/shibukawa/imagesize_py")
11621 (synopsis "Gets image size of files in various formats in Python")
11622 (description
11623 "This package allows determination of image size from
11624 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
11625 (license license:expat)))
11626
11627 (define-public python2-imagesize
11628 (package-with-python2 python-imagesize))
11629
11630 (define-public python-termstyle
11631 (package
11632 (name "python-termstyle")
11633 (version "0.1.11")
11634 (source
11635 (origin
11636 (method url-fetch)
11637 (uri (pypi-uri "termstyle" version))
11638 (sha256
11639 (base32
11640 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
11641 (build-system python-build-system)
11642 (arguments
11643 '(#:phases
11644 (modify-phases %standard-phases
11645 (replace 'check
11646 (lambda _
11647 (invoke "python" "test3.py"))))))
11648 (home-page "https://github.com/gfxmonk/termstyle")
11649 (synopsis "Console text coloring for Python")
11650 (description "This package provides console text coloring for Python.")
11651 (license license:bsd-3)))
11652
11653 (define-public python-argcomplete
11654 (package
11655 (name "python-argcomplete")
11656 (version "1.7.0")
11657 (source
11658 (origin
11659 (method url-fetch)
11660 (uri (pypi-uri "argcomplete" version))
11661 (sha256
11662 (base32
11663 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
11664 (build-system python-build-system)
11665 (native-inputs
11666 `(("python-pexpect" ,python-pexpect)
11667 ("tcsh" ,tcsh)
11668 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
11669 (home-page "https://github.com/kislyuk/argcomplete")
11670 (synopsis "Shell tab completion for Python argparse")
11671 (description "argcomplete provides extensible command line tab completion
11672 of arguments and options for Python scripts using @code{argparse}. It's
11673 particularly useful for programs with many options or sub-parsers that can
11674 dynamically suggest completions; for example, when browsing resources over the
11675 network.")
11676 (license license:asl2.0)))
11677
11678 (define-public python2-argcomplete
11679 (package-with-python2 python-argcomplete))
11680
11681 (define-public python-xopen
11682 (package
11683 (name "python-xopen")
11684 (version "0.5.0")
11685 (source
11686 (origin
11687 (method url-fetch)
11688 (uri (pypi-uri "xopen" version))
11689 (sha256
11690 (base32
11691 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
11692 (build-system python-build-system)
11693 (propagated-inputs
11694 `(("python-setuptools-scm" ,python-setuptools-scm)))
11695 (home-page "https://github.com/marcelm/xopen/")
11696 (synopsis "Open compressed files transparently")
11697 (description "This module provides an @code{xopen} function that works like
11698 Python's built-in @code{open} function, but can also deal with compressed files.
11699 Supported compression formats are gzip, bzip2 and, xz, and are automatically
11700 recognized by their file extensions. The focus is on being as efficient as
11701 possible on all supported Python versions.")
11702 (license license:expat)))
11703
11704 (define-public python2-xopen
11705 (let ((base (package-with-python2
11706 (strip-python2-variant python-xopen))))
11707 (package
11708 (inherit base)
11709 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
11710 ,@(package-propagated-inputs base))))))
11711
11712 (define-public python-cheetah
11713 (package
11714 (name "python-cheetah")
11715 (version "3.1.0")
11716 (source
11717 (origin
11718 (method url-fetch)
11719 (uri (pypi-uri "Cheetah3" version))
11720 (sha256
11721 (base32
11722 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
11723 (build-system python-build-system)
11724 (arguments
11725 `(#:modules ((guix build utils)
11726 (guix build python-build-system)
11727 (ice-9 ftw)
11728 (srfi srfi-1)
11729 (srfi srfi-26))
11730 #:phases (modify-phases %standard-phases
11731 (add-after 'unpack 'use-absolute-python
11732 (lambda _
11733 (substitute* "Cheetah/CheetahWrapper.py"
11734 (("#!/usr/bin/env python")
11735 (string-append "#!" (which "python"))))
11736 #t))
11737 (replace 'check
11738 (lambda _
11739 (let ((cwd (getcwd)))
11740 (setenv "PYTHONPATH"
11741 (string-append
11742 cwd "/build/"
11743 (find (cut string-prefix? "lib" <>)
11744 (scandir (string-append cwd "/build")))
11745 ":" (getenv "PYTHONPATH")))
11746 (setenv "PATH"
11747 (string-append (getenv "PATH")
11748 ":" cwd "/bin"))
11749 (setenv "TMPDIR" "/tmp")
11750
11751 (substitute* "Cheetah/Tests/Test.py"
11752 (("unittest.TextTestRunner\\(\\)")
11753 "unittest.TextTestRunner(verbosity=2)"))
11754
11755 (invoke "python" "Cheetah/Tests/Test.py")))))))
11756 (propagated-inputs
11757 `(("python-markdown" ,python-markdown))) ;optional
11758 (home-page "http://cheetahtemplate.org/")
11759 (synopsis "Template engine")
11760 (description "Cheetah is a text-based template engine and Python code
11761 generator.
11762
11763 Cheetah can be used as a standalone templating utility or referenced as
11764 a library from other Python applications. It has many potential uses,
11765 but web developers looking for a viable alternative to ASP, JSP, PHP and
11766 PSP are expected to be its principle user group.
11767
11768 Features:
11769 @enumerate
11770 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
11771 text-based format.
11772 @item Cleanly separates content, graphic design, and program code.
11773 @item Blends the power and flexibility of Python with a simple template language
11774 that non-programmers can understand.
11775 @item Gives template writers full access to any Python data structure, module,
11776 function, object, or method in their templates.
11777 @item Makes code reuse easy by providing an object-orientated interface to
11778 templates that is accessible from Python code or other Cheetah templates.
11779 One template can subclass another and selectively reimplement sections of it.
11780 @item Provides a simple, yet powerful, caching mechanism that can dramatically
11781 improve the performance of a dynamic website.
11782 @item Compiles templates into optimized, yet readable, Python code.
11783 @end enumerate")
11784 (license (license:x11-style "file://LICENSE"))))
11785
11786 (define-public python2-cheetah
11787 (package-with-python2 python-cheetah))
11788
11789 (define-public python-dulwich
11790 (package
11791 (name "python-dulwich")
11792 (version "0.18.6")
11793 (source
11794 (origin
11795 (method url-fetch)
11796 (uri (list (string-append "https://www.dulwich.io/releases/"
11797 "dulwich-" version ".tar.gz")
11798 (pypi-uri "dulwich" version)))
11799 (sha256
11800 (base32
11801 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
11802 (build-system python-build-system)
11803 (arguments
11804 `(#:phases
11805 (modify-phases %standard-phases
11806 (add-before 'check 'fix-tests
11807 (lambda* (#:key inputs #:allow-other-keys)
11808 ;; The tests use Popen with a custom environment which doesn't
11809 ;; include PATH.
11810 (substitute* "dulwich/tests/compat/utils.py"
11811 (("'git'") (string-append "'"
11812 (which "git")
11813 "'")))
11814 (substitute* '("dulwich/tests/test_repository.py"
11815 "dulwich/tests/test_hooks.py")
11816 (("#!/bin/sh") (string-append "#!" (which "sh"))))
11817 (setenv "TEST_RUNNER" "unittest")
11818 (setenv "PYTHONHASHSEED" "random")
11819 #t)))))
11820 (propagated-inputs
11821 `(("python-fastimport" ,python-fastimport)))
11822 (native-inputs
11823 `(("python-mock" ,python-mock)
11824 ("python-geventhttpclient" ,python-geventhttpclient)
11825 ("git" ,git)))
11826 (home-page "https://www.dulwich.io/")
11827 (synopsis "Git implementation in Python")
11828 (description "Dulwich is an implementation of the Git file formats and
11829 protocols written in pure Python.")
11830 ;; Can be used with either license.
11831 (license (list license:asl2.0 license:gpl2+))))
11832
11833 (define-public python2-dulwich
11834 (package-with-python2 python-dulwich))
11835
11836 (define-public python-pbkdf2
11837 (package
11838 (name "python-pbkdf2")
11839 (version "1.3")
11840 (source
11841 (origin
11842 (method url-fetch)
11843 (uri (pypi-uri "pbkdf2" version))
11844 (sha256
11845 (base32
11846 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
11847 (build-system python-build-system)
11848 (arguments
11849 '(#:phases
11850 (modify-phases %standard-phases
11851 (replace 'check
11852 (lambda _
11853 (setenv "PYTHONPATH"
11854 (string-append (getcwd) "/build/lib:"
11855 (getenv "PYTHONPATH")))
11856 (invoke "python" "test/test_pbkdf2.py"))))))
11857 (propagated-inputs
11858 `(("python-pycrypto" ,python-pycrypto))) ; optional
11859 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
11860 (synopsis "Password-based key derivation")
11861 (description "This module implements the password-based key derivation
11862 function, PBKDF2, specified in RSA PKCS#5 v2.0.
11863
11864 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
11865 is part of the RSA Public Key Cryptography Standards series. The provided
11866 implementation takes a password or a passphrase and a salt value (and
11867 optionally a iteration count, a digest module, and a MAC module) and provides
11868 a file-like object from which an arbitrarly-sized key can be read.")
11869 (license license:expat)))
11870
11871 (define-public python2-pbkdf2
11872 (package-with-python2 python-pbkdf2))
11873
11874 (define-public python-qrcode
11875 (package
11876 (name "python-qrcode")
11877 (version "6.1")
11878 (source
11879 (origin
11880 (method url-fetch)
11881 (uri (pypi-uri "qrcode" version))
11882 (sha256
11883 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
11884 (build-system python-build-system)
11885 (arguments
11886 ;; FIXME: Tests require packaging 'pymaging'.
11887 '(#:tests? #f))
11888 (propagated-inputs
11889 `(("python-lxml" ,python-lxml) ; for SVG output
11890 ("python-pillow" ,python-pillow) ; for PNG output
11891 ("python-six" ,python-six)))
11892 (home-page "https://github.com/lincolnloop/python-qrcode")
11893 (synopsis "QR Code image generator")
11894 (description "This package provides a pure Python QR Code generator
11895 module. It uses the Python Imaging Library (PIL) to allow for the generation
11896 of QR Codes.
11897
11898 In addition this package provides a command line tool to generate QR codes and
11899 either write these QR codes to a file or do the output as ascii art at the
11900 console.")
11901 (license license:bsd-3)))
11902
11903 (define-public python2-qrcode
11904 (package-with-python2 python-qrcode))
11905
11906 (define-public python-rst2ansi
11907 (package
11908 (name "python-rst2ansi")
11909 (version "0.1.5")
11910 (source
11911 (origin
11912 (method url-fetch)
11913 (uri (pypi-uri "rst2ansi" version))
11914 (sha256
11915 (base32
11916 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
11917 (build-system python-build-system)
11918 (propagated-inputs
11919 `(("python-docutils" ,python-docutils)))
11920 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
11921 (synopsis "Convert RST to ANSI-decorated console output")
11922 (description
11923 "Python module dedicated to rendering RST (reStructuredText) documents
11924 to ansi-escaped strings suitable for display in a terminal.")
11925 (license license:expat)))
11926
11927 (define-public python-ansi2html
11928 (package
11929 (name "python-ansi2html")
11930 (version "1.2.0")
11931 (source
11932 (origin
11933 (method url-fetch)
11934 (uri (pypi-uri "ansi2html" version))
11935 (sha256
11936 (base32
11937 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
11938 (build-system python-build-system)
11939 (native-inputs
11940 `(("python-mock" ,python-mock)
11941 ("python-nose" ,python-nose)))
11942 (propagated-inputs
11943 `(("python-six" ,python-six)))
11944 (home-page "https://github.com/ralphbean/ansi2html")
11945 (synopsis "Convert ANSI-decorated console output to HTML")
11946 (description
11947 "@command{ansi2html} is a Python library and command line utility for
11948 convering text with ANSI color codes to HTML or LaTeX.")
11949 (license license:gpl3+)))
11950
11951 (define-public python2-ansi2html
11952 (package-with-python2 python-ansi2html))
11953
11954 (define-public python-ddt
11955 (package
11956 (name "python-ddt")
11957 (version "1.1.3")
11958 (source
11959 (origin
11960 (method url-fetch)
11961 (uri (pypi-uri "ddt" version))
11962 (sha256
11963 (base32
11964 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
11965 (build-system python-build-system)
11966 (native-inputs
11967 `(("python-mock" ,python-mock)
11968 ("python-nose" ,python-nose)))
11969 (propagated-inputs
11970 `(("python-six" ,python-six)
11971 ("python-pyyaml" ,python-pyyaml)))
11972 (home-page "https://github.com/txels/ddt")
11973 (synopsis "Data-Driven Tests")
11974 (description
11975 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
11976 running it with different test data, and make it appear as multiple test
11977 cases.")
11978 (license license:expat)))
11979
11980 (define-public python2-ddt
11981 (package-with-python2 python-ddt))
11982
11983 (define-public python-pycountry
11984 (package
11985 (name "python-pycountry")
11986 (version "18.5.26")
11987 (source
11988 (origin
11989 (method url-fetch)
11990 (uri (pypi-uri "pycountry" version))
11991 (sha256
11992 (base32
11993 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
11994 (build-system python-build-system)
11995 (home-page "https://bitbucket.org/flyingcircus/pycountry")
11996 (synopsis "ISO databases for languages, countries, currencies, etc.")
11997 (description
11998 "@code{pycountry} provides the ISO databases for the standards:
11999 @enumerate
12000 @item 639-3 (Languages)
12001 @item 3166 (Countries)
12002 @item 3166-3 (Deleted Countries)
12003 @item 3166-2 (Subdivisions of countries)
12004 @item 4217 (Currencies)
12005 @item 15924 (Scripts)
12006 @end enumerate
12007 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
12008 through a Python API.")
12009 (license license:lgpl2.1+)))
12010
12011 (define-public python2-pycountry
12012 (package-with-python2 python-pycountry))
12013
12014 (define-public python-pycosat
12015 (package
12016 (name "python-pycosat")
12017 (version "0.6.1")
12018 (source
12019 (origin
12020 (method url-fetch)
12021 (uri (pypi-uri "pycosat" version))
12022 (sha256
12023 (base32
12024 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
12025 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
12026 (build-system python-build-system)
12027 (home-page "https://github.com/ContinuumIO/pycosat")
12028 (synopsis "Bindings to picosat (a SAT solver)")
12029 (description
12030 "This package provides efficient Python bindings to @code{picosat} on
12031 the C level. When importing pycosat, the @code{picosat} solver becomes part
12032 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
12033 Problem} (SAT) solver.")
12034 (license license:expat)))
12035
12036 (define-public python2-pycosat
12037 (package-with-python2 python-pycosat))
12038
12039 (define-public python2-ruamel.ordereddict
12040 (package
12041 (name "python2-ruamel.ordereddict")
12042 (version "0.4.9")
12043 (source
12044 (origin
12045 (method url-fetch)
12046 (uri (pypi-uri "ruamel.ordereddict" version))
12047 (sha256
12048 (base32
12049 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
12050 (build-system python-build-system)
12051 (arguments
12052 `(#:python ,python-2
12053 #:phases
12054 (modify-phases %standard-phases
12055 (delete 'check)
12056 (add-after 'install 'check
12057 (lambda* (#:key inputs outputs #:allow-other-keys)
12058 (add-installed-pythonpath inputs outputs)
12059 (invoke "python" "test/testordereddict.py"))))))
12060 (home-page "https://bitbucket.org/ruamel/ordereddict")
12061 (synopsis "Version of dict that keeps keys in insertion order")
12062 (description
12063 "This is an implementation of an ordered dictionary with @dfn{Key
12064 Insertion Order} (KIO: updates of values do not affect the position of the
12065 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
12066 removed and put at the back). The standard library module @code{OrderedDict},
12067 implemented later, implements a subset of @code{ordereddict} functionality.
12068 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
12069 Order} (KSO, no sorting function can be specified, but a transform can be
12070 specified to apply on the key before comparison (e.g. @code{string.lower})).")
12071 (license license:expat)))
12072
12073 (define-public python-pypeg2
12074 (package
12075 (name "python-pypeg2")
12076 (version "2.15.2")
12077 (source
12078 (origin
12079 (method url-fetch)
12080 (uri (pypi-uri "pyPEG2" version))
12081 (sha256
12082 (base32
12083 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
12084 (build-system python-build-system)
12085 (propagated-inputs `(("python-lxml" ,python-lxml)))
12086 (arguments
12087 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
12088 '(#:tests? #f))
12089 (home-page "https://fdik.org/pyPEG/")
12090 (synopsis "Parsering Expression Grammars in Python")
12091 (description "PyPEG is an intrinsic parser interpreter framework for
12092 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
12093 parse many formal languages.")
12094 (license license:gpl2)))
12095
12096 (define-public python-incremental
12097 (package
12098 (name "python-incremental")
12099 (version "17.5.0")
12100 (source
12101 (origin
12102 (method url-fetch)
12103 (uri (pypi-uri "incremental" version))
12104 (sha256
12105 (base32
12106 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
12107 (build-system python-build-system)
12108 (home-page "https://github.com/hawkowl/incremental")
12109 (synopsis "Library for versioning Python projects")
12110 (description "Incremental is a small library that versions your Python
12111 projects.")
12112 (license license:expat)))
12113
12114 (define-public python2-incremental
12115 (package-with-python2 python-incremental))
12116
12117 (define-public python-invoke
12118 (package
12119 (name "python-invoke")
12120 (home-page "http://www.pyinvoke.org/")
12121 (version "1.1.0")
12122 (source (origin
12123 (method url-fetch)
12124 (uri (pypi-uri "invoke" version))
12125 (sha256
12126 (base32
12127 "0aiy1xvk1f91246zxd1zqrm679vdvd10h843a2na41cqr3cflpi6"))))
12128 (build-system python-build-system)
12129 (arguments
12130 ;; XXX: Requires many dependencies that are not yet in Guix.
12131 `(#:tests? #f))
12132 (synopsis "Pythonic task execution")
12133 (description
12134 "Invoke is a Python task execution tool and library, drawing inspiration
12135 from various sources to arrive at a powerful and clean feature set. It is
12136 evolved from the Fabric project, but focuses on local and abstract concerns
12137 instead of servers and network commands.")
12138 (license license:bsd-3)))
12139
12140 (define-public python2-invoke
12141 (package-with-python2 python-invoke))
12142
12143 (define-public python-automat
12144 (package
12145 (name "python-automat")
12146 (version "0.7.0")
12147 (source (origin
12148 (method url-fetch)
12149 (uri (pypi-uri "Automat" version))
12150 (sha256
12151 (base32
12152 "03ivg70n3b1cbcd2zvjhk8y4kmqxcvhmili39lmgx09dza1qpmyb"))))
12153 (build-system python-build-system)
12154 ;; We disable the tests because they require python-twisted, while
12155 ;; python-twisted depends on python-automat. Twisted is optional, but the
12156 ;; tests fail if it is not available. Also see
12157 ;; <https://github.com/glyph/automat/issues/71>.
12158 (arguments '(#:tests? #f))
12159 (native-inputs
12160 `(("python-m2r" ,python-m2r)
12161 ("python-setuptools-scm" ,python-setuptools-scm)
12162 ("python-graphviz" ,python-graphviz)))
12163 (propagated-inputs
12164 `(("python-six" ,python-six)
12165 ("python-attrs" ,python-attrs)))
12166 (home-page "https://github.com/glyph/Automat")
12167 (synopsis "Self-service finite-state machines")
12168 (description "Automat is a library for concise, idiomatic Python
12169 expression of finite-state automata (particularly deterministic finite-state
12170 transducers).")
12171 (license license:expat)))
12172
12173 (define-public python2-automat
12174 (package-with-python2 python-automat))
12175
12176 (define-public python-m2r
12177 (package
12178 (name "python-m2r")
12179 (version "0.2.1")
12180 (source (origin
12181 (method url-fetch)
12182 (uri (pypi-uri "m2r" version))
12183 (sha256
12184 (base32
12185 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
12186 (build-system python-build-system)
12187 (propagated-inputs
12188 `(("python-docutils" ,python-docutils)
12189 ("python-mistune" ,python-mistune)))
12190 (native-inputs
12191 `(("python-pygments" ,python-pygments)
12192 ("python-mock" ,python-mock)))
12193 (home-page "https://github.com/miyakogi/m2r")
12194 (synopsis "Markdown to reStructuredText converter")
12195 (description "M2R converts a markdown file including reST markups to valid
12196 reST format.")
12197 (license license:expat)))
12198
12199 (define-public python2-m2r
12200 (package-with-python2 python-m2r))
12201
12202 (define-public python-constantly
12203 (package
12204 (name "python-constantly")
12205 (version "15.1.0")
12206 (source (origin
12207 (method url-fetch)
12208 (uri (pypi-uri "constantly" version))
12209 (sha256
12210 (base32
12211 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
12212 (build-system python-build-system)
12213 (home-page "https://github.com/twisted/constantly")
12214 (synopsis "Symbolic constants in Python")
12215 (description "Constantly is a Python library that provides symbolic
12216 constant support. It includes collections and constants with text, numeric,
12217 and bit flag values.")
12218 (license license:expat)))
12219
12220 (define-public python2-constantly
12221 (package-with-python2 python-constantly))
12222
12223 (define-public python-attrs
12224 (package
12225 (name "python-attrs")
12226 (version "19.1.0")
12227 (source (origin
12228 (method url-fetch)
12229 (uri (pypi-uri "attrs" version))
12230 (sha256
12231 (base32
12232 "16g33zr5f449lqc5wgvzpknxryfzrfsxcr6kpgxwn7l5fkv71f7h"))))
12233 (build-system python-build-system)
12234 (arguments
12235 `(#:modules ((guix build utils)
12236 (guix build python-build-system)
12237 (ice-9 ftw)
12238 (srfi srfi-1)
12239 (srfi srfi-26))
12240 #:phases (modify-phases %standard-phases
12241 (replace 'check
12242 (lambda _
12243 (let ((cwd (getcwd)))
12244 (setenv "PYTHONPATH"
12245 (string-append
12246 cwd "/build/"
12247 (find (cut string-prefix? "lib" <>)
12248 (scandir (string-append cwd "/build")))
12249 ":"
12250 (getenv "PYTHONPATH")))
12251 (invoke "python" "-m" "pytest")))))))
12252 (native-inputs
12253 `(("python-coverage" ,python-coverage)
12254 ("python-hypothesis" ,python-hypothesis)
12255 ("python-pympler" ,python-pympler)
12256 ("python-pytest" ,python-pytest)
12257 ("python-six" ,python-six)
12258 ("python-sphinx" ,python-sphinx)
12259 ("python-zope-interface" ,python-zope-interface)))
12260 (home-page "https://github.com/python-attrs/attrs/")
12261 (synopsis "Attributes without boilerplate")
12262 (description "@code{attrs} is a Python package with class decorators that
12263 ease the chores of implementing the most common attribute-related object
12264 protocols.")
12265 (license license:expat)))
12266
12267 (define-public python2-attrs
12268 (package-with-python2 python-attrs))
12269
12270 (define-public python-attrs-bootstrap
12271 (package
12272 (inherit python-attrs)
12273 (name "python-attrs-bootstrap")
12274 (native-inputs `())
12275 (arguments `(#:tests? #f))))
12276
12277 (define-public python2-attrs-bootstrap
12278 (package-with-python2 python-attrs-bootstrap))
12279
12280 (define-public python2-cliapp
12281 (package
12282 (name "python2-cliapp")
12283 (version "1.20180812.1")
12284 (source
12285 (origin
12286 (method url-fetch)
12287 (uri (string-append
12288 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
12289 version ".tar.gz"))
12290 (sha256
12291 (base32
12292 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
12293 (build-system python-build-system)
12294 (arguments
12295 `(#:python ,python-2
12296 #:phases
12297 (modify-phases %standard-phases
12298 ;; check phase needs to be run before the build phase. If not,
12299 ;; coverage-test-runner looks for tests for the built source files,
12300 ;; and fails.
12301 (delete 'check)
12302 (add-before 'build 'check
12303 (lambda _
12304 ;; Disable python3 tests
12305 (substitute* "check"
12306 (("python3") "# python3"))
12307 (invoke "./check"))))))
12308 (native-inputs
12309 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12310 ("python2-pep8" ,python2-pep8)))
12311 (propagated-inputs
12312 `(("python2-pyaml" ,python2-pyaml)))
12313 (home-page "https://liw.fi/cliapp/")
12314 (synopsis "Python framework for command line programs")
12315 (description "@code{python2-cliapp} is a python framework for
12316 command line programs. It contains the typical stuff such programs
12317 need to do, such as parsing the command line for options, and
12318 iterating over input files.")
12319 (license license:gpl2+)))
12320
12321 (define-public python2-ttystatus
12322 (package
12323 (name "python2-ttystatus")
12324 (version "0.36")
12325 (source
12326 (origin
12327 (method url-fetch)
12328 (uri (string-append
12329 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
12330 version ".tar.gz"))
12331 (sha256
12332 (base32
12333 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
12334 (build-system python-build-system)
12335 (native-inputs
12336 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12337 ("python2-pep8" ,python2-pep8)))
12338 (arguments
12339 `(#:python ,python-2
12340 #:phases
12341 (modify-phases %standard-phases
12342 ;; check phase needs to be run before the build phase. If not,
12343 ;; coverage-test-runner looks for tests for the built source files,
12344 ;; and fails.
12345 (delete 'check)
12346 (add-before 'build 'check
12347 (lambda _ (invoke "make" "check"))))))
12348 (home-page "https://liw.fi/ttystatus/")
12349 (synopsis "Python library for showing progress reporting and
12350 status updates on terminals")
12351 (description "@code{python2-ttystatus} is a python library for
12352 showing progress reporting and status updates on terminals, for
12353 command line programs. Output is automatically adapted to the width
12354 of the terminal: truncated if it does not fit, and resized if the
12355 terminal size changes.")
12356 (license license:gpl3+)))
12357
12358 (define-public python2-tracing
12359 (package
12360 (name "python2-tracing")
12361 (version "0.10")
12362 (source
12363 (origin
12364 (method url-fetch)
12365 (uri (string-append
12366 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
12367 version ".tar.gz"))
12368 (sha256
12369 (base32
12370 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
12371 (build-system python-build-system)
12372 (arguments
12373 `(#:python ,python-2))
12374 (home-page "https://liw.fi/tracing/")
12375 (synopsis "Python debug logging helper")
12376 (description "@code{python2-tracing} is a python library for
12377 logging debug messages. It provides a way to turn debugging messages
12378 on and off, based on the filename they occur in. It is much faster
12379 than using @code{logging.Filter} to accomplish the same thing, which
12380 matters when code is run in production mode. The actual logging still
12381 happens using the @code{logging} library.")
12382 (license license:gpl3+)))
12383
12384 (define-public python2-larch
12385 (package
12386 (name "python2-larch")
12387 (version "1.20151025")
12388 (source
12389 (origin
12390 (method url-fetch)
12391 (uri (string-append
12392 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
12393 version ".tar.gz"))
12394 (patches (search-patches
12395 "python2-larch-coverage-4.0a6-compatibility.patch"))
12396 (sha256
12397 (base32
12398 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
12399 (build-system python-build-system)
12400 (arguments
12401 `(#:python ,python-2
12402 #:phases
12403 (modify-phases %standard-phases
12404 ;; check phase needs to be run before the build phase. If not,
12405 ;; coverage-test-runner looks for tests for the built source files,
12406 ;; and fails.
12407 (delete 'check)
12408 (add-before 'build 'check
12409 (lambda _ (invoke "make" "check"))))))
12410 (native-inputs
12411 `(("cmdtest" ,cmdtest)
12412 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
12413 (propagated-inputs
12414 `(("python2-tracing" ,python2-tracing)))
12415 (home-page "https://liw.fi/larch/")
12416 (synopsis "Python copy-on-write B-tree library")
12417 (description "@code{python2-larch} is an implementation of
12418 particular kind of B-tree, based on research by Ohad Rodeh. See
12419 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
12420 on the data structure.
12421
12422 The distinctive feature of this B-tree is that a node is never
12423 (conceptually) modified. Instead, all updates are done by
12424 copy-on-write. This makes it easy to clone a tree, and modify only the
12425 clone, while other processes access the original tree.")
12426 (license license:gpl3+)))
12427
12428 (define-public python-astroid
12429 (package
12430 (name "python-astroid")
12431 (version "2.1.0")
12432 (source
12433 (origin
12434 (method url-fetch)
12435 (uri (pypi-uri "astroid" version))
12436 (sha256
12437 (base32
12438 "08hz675knh4294bancdapql392fmbjyimhbyrmfkz1ka7l035c1m"))))
12439 (build-system python-build-system)
12440 (propagated-inputs
12441 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
12442 ("python-six" ,python-six)
12443 ("python-wrapt" ,python-wrapt)))
12444 (native-inputs
12445 `(("python-dateutil" ,python-dateutil)
12446 ("python-nose" ,python-nose)
12447 ("python-pytest" ,python-pytest)
12448 ("python-pytest-runner" ,python-pytest-runner)))
12449 (arguments
12450 `(#:phases
12451 (modify-phases %standard-phases
12452 (add-after 'unpack 'remove-spurious-test
12453 (lambda _
12454 ;; This can be removed after upgrading from python-3.7
12455 ;; https://github.com/PyCQA/astroid/issues/593
12456 ;; https://bugs.python.org/issue34056
12457 (delete-file "astroid/tests/unittest_modutils.py")
12458 #t))
12459 (replace 'check
12460 (lambda _
12461 (invoke "pytest" "astroid"))))))
12462 (home-page "https://github.com/PyCQA/astroid")
12463 (synopsis "Common base representation of python source code for pylint and
12464 other projects")
12465 (description "@code{python-astroid} provides a common base representation
12466 of python source code for projects such as pychecker, pyreverse, pylint, etc.
12467
12468 It provides a compatible representation which comes from the _ast module. It
12469 rebuilds the tree generated by the builtin _ast module by recursively walking
12470 down the AST and building an extended ast. The new node classes have
12471 additional methods and attributes for different usages. They include some
12472 support for static inference and local name scopes. Furthermore, astroid
12473 builds partial trees by inspecting living objects.")
12474 (license license:lgpl2.1+)
12475 (properties `((python2-variant . ,(delay python2-astroid))))))
12476
12477 (define-public python2-astroid
12478 (let ((base (package-with-python2
12479 (strip-python2-variant python-astroid))))
12480 (package (inherit base)
12481 ;; Version 2.x removes python2 support.
12482 (version "1.6.5")
12483 (source
12484 (origin
12485 (method url-fetch)
12486 (uri (pypi-uri "astroid" version))
12487 (sha256
12488 (base32
12489 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
12490 (arguments
12491 (substitute-keyword-arguments (package-arguments base)
12492 ((#:phases phases)
12493 `(modify-phases ,phases
12494 (add-after 'unpack 'remove-spurious-test
12495 (lambda _
12496 ;; https://github.com/PyCQA/astroid/issues/276
12497 (delete-file "astroid/tests/unittest_brain.py")
12498 #t))
12499 (replace 'check
12500 (lambda _
12501 (invoke"python" "-m" "unittest" "discover"
12502 "-p" "unittest*.py")))))))
12503 (native-inputs `())
12504 (propagated-inputs
12505 `(("python2-backports-functools-lru-cache"
12506 ,python2-backports-functools-lru-cache)
12507 ("python2-enum34" ,python2-enum34)
12508 ("python2-singledispatch" ,python2-singledispatch)
12509 ,@(package-propagated-inputs base))))))
12510
12511 (define-public python-isort
12512 (package
12513 (name "python-isort")
12514 (version "4.3.4")
12515 (source
12516 (origin
12517 (method git-fetch)
12518 (uri (git-reference
12519 ;; Tests pass only from the Github sources
12520 (url "https://github.com/timothycrosley/isort")
12521 (commit version)))
12522 (file-name (git-file-name name version))
12523 (sha256
12524 (base32
12525 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
12526 (build-system python-build-system)
12527 (native-inputs
12528 `(("python-mock" ,python-mock)
12529 ("python-pytest" ,python-pytest)))
12530 (home-page "https://github.com/timothycrosley/isort")
12531 (synopsis "Python utility/library to sort python imports")
12532 (description "@code{python-isort} is a python utility/library to sort
12533 imports alphabetically, and automatically separated into sections. It
12534 provides a command line utility, a python library and plugins for various
12535 editors.")
12536 (license license:expat)
12537 (properties `((python2-variant . ,(delay python2-isort))))))
12538
12539 (define-public python2-isort
12540 (let ((base (package-with-python2
12541 (strip-python2-variant python-isort))))
12542 (package (inherit base)
12543 (native-inputs
12544 `(("python2-futures" ,python2-futures)
12545 ,@(package-native-inputs base))))))
12546
12547 (define-public python2-backports-functools-lru-cache
12548 (package
12549 (name "python2-backports-functools-lru-cache")
12550 (version "1.5")
12551 (source
12552 (origin
12553 (method url-fetch)
12554 ;; only the pypi tarballs contain the necessary metadata
12555 (uri (pypi-uri "backports.functools_lru_cache" version))
12556 (sha256
12557 (base32
12558 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
12559 (build-system python-build-system)
12560 (native-inputs
12561 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
12562 (arguments
12563 `(#:python ,python-2))
12564 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
12565 (synopsis "Backport of functools.lru_cache from Python 3.3")
12566 (description "@code{python2-backports-functools-lru-cache} is a backport
12567 of @code{functools.lru_cache} from python 3.3.")
12568 (license license:expat)))
12569
12570 (define-public python-configparser
12571 (package
12572 (name "python-configparser")
12573 (version "3.7.1")
12574 (source
12575 (origin
12576 (method url-fetch)
12577 (uri (pypi-uri "configparser" version))
12578 (sha256
12579 (base32
12580 "0cnz213il9lhgda6x70fw7mfqr8da43s3wm343lwzhqx94mgmmav"))))
12581 (build-system python-build-system)
12582 (home-page "https://github.com/jaraco/configparser/")
12583 (synopsis "Backport of configparser from python 3.5")
12584 (description "@code{python-configparser} is a backport of
12585 @code{configparser} from Python 3.5 so that it can be used directly
12586 in other versions.")
12587 (license license:expat)))
12588
12589 (define-public python2-configparser
12590 (package-with-python2 python-configparser))
12591
12592 (define-public python-mando
12593 (package
12594 (name "python-mando")
12595 (version "0.6.4")
12596 (source (origin
12597 (method url-fetch)
12598 (uri (pypi-uri "mando" version))
12599 (sha256
12600 (base32
12601 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
12602 (build-system python-build-system)
12603 (propagated-inputs
12604 `(("python-rst2ansi" ,python-rst2ansi)
12605 ("python-six" ,python-six)))
12606 (native-inputs
12607 `(("python-pytest" ,python-pytest)))
12608 (home-page "https://mando.readthedocs.org/")
12609 (synopsis
12610 "Wrapper around argparse, allowing creation of complete CLI applications")
12611 (description
12612 "This package is a wrapper around argparse, allowing you to write complete CLI
12613 applications in seconds while maintaining all the flexibility.")
12614 (license license:expat)))
12615
12616 (define-public python2-mando
12617 (package-with-python2 python-mando))
12618
12619 (define-public python2-argparse
12620 (package
12621 (name "python2-argparse")
12622 (version "1.4.0")
12623 (source
12624 (origin
12625 (method url-fetch)
12626 (uri (pypi-uri "argparse" version))
12627 (sha256
12628 (base32
12629 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
12630 (build-system python-build-system)
12631 (arguments
12632 `(#:python ,python-2))
12633 (home-page "https://github.com/ThomasWaldmann/argparse/")
12634 (synopsis "Python command-line parsing library")
12635 (description
12636 "This package is mostly for people who want to have @code{argparse} on
12637 older Pythons because it was not part of the standard library back then.")
12638 (license license:psfl)))
12639
12640 (define-public python-fudge
12641 (package
12642 (name "python-fudge")
12643 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
12644 ;; package, which is currently the only use of this package.
12645 (version "0.9.6")
12646 (source
12647 (origin
12648 (method url-fetch)
12649 (uri (pypi-uri "fudge" version))
12650 (sha256
12651 (base32
12652 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
12653 (build-system python-build-system)
12654 (arguments
12655 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
12656 (home-page "https://github.com/fudge-py/fudge")
12657 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
12658 (description
12659 "Fudge is a Python module for using fake objects (mocks and stubs) to
12660 test real ones.
12661
12662 In readable Python code, you declare the methods available on your fake object
12663 and how they should be called. Then you inject that into your application and
12664 start testing. This declarative approach means you don’t have to record and
12665 playback actions and you don’t have to inspect your fakes after running code.
12666 If the fake object was used incorrectly then you’ll see an informative
12667 exception message with a traceback that points to the culprit.")
12668 (license license:expat)))
12669
12670 (define-public python2-fudge
12671 (package-with-python2 python-fudge))
12672
12673 (define-public python-mwclient
12674 (package
12675 (name "python-mwclient")
12676 (version "0.8.4")
12677 (source
12678 (origin
12679 (method url-fetch)
12680 ;; The PyPI version wouldn't contain tests.
12681 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
12682 "v" version ".tar.gz"))
12683 (file-name (string-append name "-" version ".tar.gz"))
12684 (sha256
12685 (base32
12686 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
12687 (build-system python-build-system)
12688 (propagated-inputs
12689 `(("python-requests" ,python-requests)
12690 ("python-requests-oauthlib"
12691 ,python-requests-oauthlib)
12692 ("python-six" ,python-six)))
12693 (native-inputs
12694 `(("python-mock" ,python-mock)
12695 ("python-pytest" ,python-pytest)
12696 ("python-pytest-pep8" ,python-pytest-pep8)
12697 ("python-pytest-cache" ,python-pytest-cache)
12698 ("python-pytest-cov" ,python-pytest-cov)
12699 ("python-responses" ,python-responses)))
12700 (home-page "https://github.com/btongminh/mwclient")
12701 (synopsis "MediaWiki API client")
12702 (description "This package provides a MediaWiki API client.")
12703 (license license:expat)))
12704
12705 (define-public python2-mwclient
12706 (package-with-python2 python-mwclient))
12707
12708 (define-public python-utils
12709 (package
12710 (name "python-utils")
12711 (version "2.1.0")
12712 (source (origin
12713 (method url-fetch)
12714 (uri (pypi-uri "python-utils" version))
12715 (sha256
12716 (base32
12717 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
12718 (build-system python-build-system)
12719 (native-inputs
12720 `(("pytest-runner" ,python-pytest-runner)
12721 ("pytest" ,python-pytest)
12722 ("six" ,python-six)))
12723 (home-page "https://github.com/WoLpH/python-utils")
12724 (synopsis "Convenient utilities not included with the standard Python install")
12725 (description
12726 "Python Utils is a collection of small Python functions and classes which
12727 make common patterns shorter and easier.")
12728 (license license:bsd-2)))
12729
12730 (define-public python2-utils
12731 (package-with-python2 python-utils))
12732
12733 (define-public python-diff-match-patch
12734 (package
12735 (name "python-diff-match-patch")
12736 (version "20121119")
12737 (source
12738 (origin
12739 (method url-fetch)
12740 (uri (pypi-uri "diff-match-patch" version))
12741 (sha256
12742 (base32
12743 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
12744 (build-system python-build-system)
12745 (home-page "https://code.google.com/p/google-diff-match-patch")
12746 (synopsis "Synchronize plain text")
12747 (description "Diff Match and Patch libraries offer robust algorithms to
12748 perform the operations required for synchronizing plain text.")
12749 (license license:asl2.0)))
12750
12751 (define-public python2-diff-match-patch
12752 (package-with-python2 python-diff-match-patch))
12753
12754 (define-public python-dirsync
12755 (package
12756 (name "python-dirsync")
12757 (version "2.2.3")
12758 (source
12759 (origin
12760 (method url-fetch)
12761 (uri (pypi-uri "dirsync" version))
12762 (sha256
12763 (base32
12764 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
12765 (build-system python-build-system)
12766 (propagated-inputs
12767 `(("six" ,python-six)))
12768 (home-page "https://bitbucket.org/tkhyn/dirsync")
12769 (synopsis "Advanced directory tree synchronisation tool")
12770 (description "Advanced directory tree synchronisation tool.")
12771 (license license:expat)))
12772
12773 (define-public python2-dirsync
12774 (package-with-python2 python-dirsync))
12775
12776 (define-public python-levenshtein
12777 (package
12778 (name "python-levenshtein")
12779 (version "0.12.0")
12780 (source
12781 (origin
12782 (method url-fetch)
12783 (uri (pypi-uri "python-Levenshtein" version))
12784 (sha256
12785 (base32
12786 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
12787 (build-system python-build-system)
12788 (home-page "https://github.com/ztane/python-Levenshtein")
12789 (synopsis "Fast computation of Levenshtein distance and string similarity")
12790 (description
12791 "The Levenshtein Python C extension module contains functions for fast computation of
12792 @enumerate
12793 @item Levenshtein (edit) distance, and edit operations
12794 @item string similarity
12795 @item approximate median strings, and generally string averaging
12796 @item string sequence and set similarity
12797 @end enumerate
12798 It supports both normal and Unicode strings.")
12799 (license license:gpl2+)))
12800
12801 (define-public python2-levenshtein
12802 (package-with-python2 python-levenshtein))
12803
12804 (define-public python-scandir
12805 (package
12806 (name "python-scandir")
12807 (version "1.9.0")
12808 (source
12809 (origin
12810 (method url-fetch)
12811 (uri (pypi-uri "scandir" version))
12812 (sha256
12813 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
12814 (build-system python-build-system)
12815 (arguments
12816 `(#:phases (modify-phases %standard-phases
12817 (replace 'check
12818 (lambda _
12819 (invoke "python" "test/run_tests.py"))))))
12820 (home-page "https://github.com/benhoyt/scandir")
12821 (synopsis "Directory iteration function")
12822 (description
12823 "Directory iteration function like os.listdir(), except that instead of
12824 returning a list of bare filenames, it yields DirEntry objects that include
12825 file type and stat information along with the name. Using scandir() increases
12826 the speed of os.walk() by 2-20 times (depending on the platform and file
12827 system) by avoiding unnecessary calls to os.stat() in most cases.
12828
12829 This package is part of the Python standard library since version 3.5.")
12830 (license license:bsd-3)))
12831
12832 (define-public python2-scandir
12833 (package-with-python2 python-scandir))
12834
12835 (define-public python2-stemming
12836 (package
12837 (name "python2-stemming")
12838 (version "1.0.1")
12839 (source
12840 (origin
12841 (method url-fetch)
12842 (uri (pypi-uri "stemming" version))
12843 (sha256
12844 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
12845 (build-system python-build-system)
12846 (arguments
12847 `(#:python ,python-2))
12848 (home-page "https://bitbucket.org/mchaput/stemming/overview")
12849 (synopsis "Python implementations of various stemming algorithms")
12850 (description
12851 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
12852 stemming algorithms for English. These implementations are straightforward and
12853 efficient, unlike some Python versions of the same algorithms available on the
12854 Web. This package is an extraction of the stemming code included in the Whoosh
12855 search engine.")
12856 (license license:public-domain)))
12857
12858 (define-public python-factory-boy
12859 (package
12860 (name "python-factory-boy")
12861 (version "2.8.1")
12862 (source
12863 (origin
12864 (method url-fetch)
12865 (uri (pypi-uri "factory_boy" version))
12866 (sha256
12867 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
12868 (build-system python-build-system)
12869 (arguments
12870 ;; Tests are not included in the tarball.
12871 `(#:tests? #f))
12872 (propagated-inputs
12873 `(("faker" ,python-faker)))
12874 (home-page "https://github.com/benhoyt/scandir")
12875 (synopsis "Versatile test fixtures replacement")
12876 (description
12877 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
12878
12879 As a fixtures replacement tool, it aims to replace static, hard to maintain
12880 fixtures with easy-to-use factories for complex object.
12881
12882 Instead of building an exhaustive test setup with every possible combination
12883 of corner cases, factory_boy allows you to use objects customized for the
12884 current test, while only declaring the test-specific fields")
12885 (license license:expat)))
12886
12887 (define-public python2-factory-boy
12888 (package-with-python2 python-factory-boy))
12889
12890 (define-public python-translate-toolkit
12891 (package
12892 (name "python-translate-toolkit")
12893 (version "2.1.0")
12894 (source
12895 (origin
12896 (method url-fetch)
12897 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
12898 (sha256
12899 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
12900 (build-system python-build-system)
12901 (native-inputs
12902 `(("python-pytest" ,python-pytest)
12903 ("python-sphinx" ,python-sphinx)))
12904 (propagated-inputs
12905 `(("python-babel" ,python-babel)
12906 ("python-beautifulsoup4" ,python-beautifulsoup4)
12907 ("python-chardet" ,python-chardet)
12908 ("python-diff-match-patch" ,python-diff-match-patch)
12909 ("python-levenshtein" ,python-levenshtein)
12910 ("python-lxml" ,python-lxml)
12911 ("python-six" ,python-six)
12912 ("python-vobject" ,python-vobject)
12913 ("python-pyyaml" ,python-pyyaml)))
12914 (arguments
12915 ;; TODO: tests are not run, because they end with
12916 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
12917 ;; 'parse_funcs'
12918 ;; during test setup.
12919 `(#:tests? #f))
12920 (home-page "https://toolkit.translatehouse.org")
12921 (synopsis "Tools and API for translation and localization engineering")
12922 (description
12923 "Tools and API for translation and localization engineering. It contains
12924 several utilities, as well as an API for building localization tools.")
12925 (license license:gpl2+)))
12926
12927 (define-public python2-translate-toolkit
12928 (package-with-python2 python-translate-toolkit))
12929
12930 (define-public python-packaging
12931 (package
12932 (name "python-packaging")
12933 (version "19.2")
12934 (source
12935 (origin
12936 (method url-fetch)
12937 (uri (pypi-uri "packaging" version))
12938 (sha256
12939 (base32
12940 "0izwlz9h0bw171a1chr311g2y7n657zjaf4mq4rgm8pp9lbj9f98"))))
12941 (build-system python-build-system)
12942 (arguments
12943 `(#:phases (modify-phases %standard-phases
12944 (replace 'check
12945 (lambda _ (invoke "py.test" "-vv"))))))
12946 (native-inputs
12947 `(("python-pretend" ,python-pretend)
12948 ("python-pytest" ,python-pytest)))
12949 (propagated-inputs
12950 `(("python-pyparsing" ,python-pyparsing)
12951 ("python-six" ,python-six)))
12952 (home-page "https://github.com/pypa/packaging")
12953 (synopsis "Core utilities for Python packages")
12954 (description "Packaging is a Python module for dealing with Python packages.
12955 It offers an interface for working with package versions, names, and dependency
12956 information.")
12957 ;; From 'LICENSE': This software is made available under the terms of
12958 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
12959 ;; Contributions to this software is made under the terms of *both* these
12960 ;; licenses.
12961 (license (list license:asl2.0 license:bsd-2))))
12962
12963 (define-public python2-packaging
12964 (package-with-python2 python-packaging))
12965
12966 (define-public python-relatorio
12967 (package
12968 (name "python-relatorio")
12969 (version "0.8.0")
12970 (source
12971 (origin
12972 (method url-fetch)
12973 (uri (pypi-uri "relatorio" version))
12974 (sha256
12975 (base32
12976 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
12977 (build-system python-build-system)
12978 (propagated-inputs
12979 `(("python-lxml" ,python-lxml)
12980 ("python-genshi" ,python-genshi)))
12981 (native-inputs
12982 `(("python-magic" ,python-magic)))
12983 (home-page "https://relatorio.tryton.org/")
12984 (synopsis "Templating library able to output ODT and PDF files")
12985 (description "Relatorio is a templating library which provides a way to
12986 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
12987 for more filetypes can be easily added by creating plugins for them.")
12988 (license license:gpl3+)))
12989
12990 (define-public python2-relatorio
12991 (package-with-python2 python-relatorio))
12992
12993 (define-public python-radon
12994 (package
12995 (name "python-radon")
12996 (version "2.2.0")
12997 (source
12998 (origin
12999 (method url-fetch)
13000 (uri (pypi-uri "radon" version))
13001 (sha256
13002 (base32
13003 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
13004 (build-system python-build-system)
13005 (arguments
13006 `(#:phases (modify-phases %standard-phases
13007 (replace 'check
13008 (lambda _
13009 (invoke "python" "radon/tests/run.py"))))))
13010 (propagated-inputs
13011 `(("python-colorama" ,python-colorama)
13012 ("python-flake8-polyfill" ,python-flake8-polyfill)
13013 ("python-mando" ,python-mando)))
13014 (native-inputs
13015 `(("python-pytest" ,python-pytest)
13016 ("python-pytest-mock" ,python-pytest-mock)))
13017 (home-page "https://radon.readthedocs.org/")
13018 (synopsis "Code Metrics in Python")
13019 (description "Radon is a Python tool which computes various code metrics.
13020 Supported metrics are:
13021 @itemize @bullet
13022 @item raw metrics: SLOC, comment lines, blank lines, &c.
13023 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
13024 @item Halstead metrics (all of them)
13025 @item the Maintainability Index (a Visual Studio metric)
13026 @end itemize")
13027 (license license:expat)))
13028
13029 (define-public python2-radon
13030 (package-with-python2 python-radon))
13031
13032 (define-public python-sure
13033 (package
13034 (name "python-sure")
13035 (version "1.4.11")
13036 (source
13037 (origin
13038 (method url-fetch)
13039 (uri (pypi-uri "sure" version))
13040 (sha256
13041 (base32
13042 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
13043 (build-system python-build-system)
13044 (propagated-inputs
13045 `(("python-mock" ,python-mock)
13046 ("python-six" ,python-six)))
13047 (native-inputs
13048 `(("python-nose" ,python-nose)))
13049 (home-page "https://github.com/gabrielfalcao/sure")
13050 (synopsis "Automated testing library in python for python")
13051 (description
13052 "Sure is a python library that leverages a DSL for writing assertions.
13053 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
13054 (license license:gpl3+)))
13055
13056 (define-public python2-sure
13057 (package-with-python2 python-sure))
13058
13059 (define-public python2-couleur
13060 ;; This package does not seem to support python3 at all, hence,
13061 ;; only the python2 variant definition is provided.
13062 (package
13063 (name "python2-couleur")
13064 (version "0.6.2")
13065 (source
13066 (origin
13067 (method url-fetch)
13068 (uri (pypi-uri "couleur" version))
13069 (sha256
13070 (base32
13071 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
13072 (build-system python-build-system)
13073 (arguments
13074 `(#:python ,python-2))
13075 (home-page "https://github.com/gabrielfalcao/couleur")
13076 (synopsis
13077 "ANSI terminal tool for python, colored shell and other handy fancy features")
13078 (description
13079 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
13080 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
13081 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
13082 ;; https://github.com/gabrielfalcao/couleur/issues/11
13083 (license license:lgpl3+)))
13084
13085 (define-public python-misaka
13086 (package
13087 (name "python-misaka")
13088 (version "2.1.1")
13089 (source
13090 (origin
13091 (method url-fetch)
13092 (uri (pypi-uri "misaka" version))
13093 (sha256
13094 (base32
13095 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
13096 (build-system python-build-system)
13097 (arguments
13098 `(;; Line 37 of setup.py calls self.run_command('develop')
13099 ;; in the 'check' phase. This command seems to be trying
13100 ;; to write to
13101 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
13102 ;; for which it does not have the permission to write.
13103 #:tests? #f))
13104 (propagated-inputs
13105 `(("python-cffi" ,python-cffi)))
13106 (home-page "https://github.com/FSX/misaka")
13107 (synopsis "Python binding for Hoedown")
13108 (description
13109 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
13110 library written in C. It features a fast HTML renderer and functionality to make custom
13111 renderers (e.g. man pages or LaTeX).")
13112 (license license:expat)))
13113
13114 (define-public python2-misaka
13115 (package-with-python2 python-misaka))
13116
13117 (define-public python2-steadymark
13118 ;; This is forced into being a python2 only variant
13119 ;; due to its dependence on couleur that has no support
13120 ;; for python3
13121 (package
13122 (name "python2-steadymark")
13123 (version "0.7.3")
13124 (source
13125 (origin
13126 (method url-fetch)
13127 (uri (pypi-uri "steadymark" version))
13128 (sha256
13129 (base32
13130 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
13131 (build-system python-build-system)
13132 (native-inputs
13133 `(("python-couleur" ,python2-couleur)
13134 ("python-sure" ,python2-sure)
13135 ("python-misaka" ,python2-misaka)))
13136 (arguments
13137 `(#:python ,python-2
13138 #:phases
13139 (modify-phases %standard-phases
13140 (add-before 'build 'patch-setup-py
13141 (lambda _
13142 ;; Update requirements from dependency==version
13143 ;; to dependency>=version
13144 (substitute* "setup.py"
13145 (("==") ">="))
13146 #t)))))
13147 (home-page "https://github.com/gabrielfalcao/steadymark")
13148 (synopsis "Markdown-based test runner for python")
13149 (description
13150 "@code{Steadymark} allows documentation to be written in github-flavoured
13151 markdown. The documentation may contain snippets of code surrounded by python
13152 code blocks and @code{Steadymark} will find these snippets and run them, making
13153 sure that there are no old malfunctional examples in the documentation examples.")
13154 (license license:expat)))
13155
13156 (define-public python-jsonpointer
13157 (package
13158 (name "python-jsonpointer")
13159 (version "1.10")
13160 (source
13161 (origin
13162 (method url-fetch)
13163 (uri (pypi-uri "jsonpointer" version))
13164 (sha256
13165 (base32
13166 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
13167 (build-system python-build-system)
13168 (home-page "https://github.com/stefankoegl/python-json-pointer")
13169 (synopsis "Identify specific nodes in a JSON document")
13170 (description "@code{jsonpointer} allows you to access specific nodes
13171 by path in a JSON document (see RFC 6901).")
13172 (license license:bsd-3)))
13173
13174 (define-public python2-jsonpointer
13175 (package-with-python2 python-jsonpointer))
13176
13177 (define-public python-jsonpatch
13178 (package
13179 (name "python-jsonpatch")
13180 (version "1.16")
13181 (source
13182 (origin
13183 (method url-fetch)
13184 ;; pypi version lacks tests.js
13185 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
13186 "archive/v" version ".tar.gz"))
13187 (file-name (string-append name "-" version ".tar.gz"))
13188 (sha256
13189 (base32
13190 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
13191 (build-system python-build-system)
13192 (native-inputs
13193 `(("python-jsonpointer" ,python-jsonpointer)))
13194 (home-page "https://github.com/stefankoegl/python-json-patch")
13195 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
13196 (description "@code{jsonpatch} is a library and program that allows
13197 applying JSON Patches according to RFC 6902.")
13198 (license license:bsd-3)))
13199
13200 (define-public python2-jsonpatch
13201 (package-with-python2 python-jsonpatch))
13202
13203 (define-public python-jsonpatch-0.4
13204 (package (inherit python-jsonpatch)
13205 (name "python-jsonpatch")
13206 (version "0.4")
13207 (source
13208 (origin
13209 (method url-fetch)
13210 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
13211 "archive/v" version ".tar.gz"))
13212 (file-name (string-append name "-" version ".tar.gz"))
13213 (sha256
13214 (base32
13215 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
13216
13217 (define-public python2-jsonpatch-0.4
13218 (package-with-python2 python-jsonpatch-0.4))
13219
13220 (define-public python-rfc3986
13221 (package
13222 (name "python-rfc3986")
13223 (version "1.1.0")
13224 (source (origin
13225 (method url-fetch)
13226 (uri (pypi-uri "rfc3986" version))
13227 (sha256
13228 (base32
13229 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
13230 (build-system python-build-system)
13231 (arguments
13232 `(#:modules ((guix build utils)
13233 (guix build python-build-system)
13234 (ice-9 ftw)
13235 (srfi srfi-1)
13236 (srfi srfi-26))
13237 #:phases
13238 (modify-phases %standard-phases
13239 (replace 'check
13240 (lambda _
13241 (let ((cwd (getcwd)))
13242 (setenv "PYTHONPATH"
13243 (string-append cwd "/build/"
13244 (find (cut string-prefix? "lib" <>)
13245 (scandir (string-append cwd "/build")))
13246 ":"
13247 (getenv "PYTHONPATH")))
13248 (invoke "pytest" "-v")))))))
13249 (native-inputs
13250 `(("python-pytest" ,python-pytest)))
13251 (home-page "https://rfc3986.readthedocs.io/")
13252 (synopsis "Parse and validate URI references")
13253 (description
13254 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
13255 validation and authority parsing. This module also supports RFC@tie{}6874
13256 which adds support for zone identifiers to IPv6 addresses.")
13257 (license license:asl2.0)))
13258
13259 (define-public python2-rfc3986
13260 (package-with-python2 python-rfc3986))
13261
13262 (define-public python-rfc3987
13263 (package
13264 (name "python-rfc3987")
13265 (version "1.3.7")
13266 (source
13267 (origin
13268 (method url-fetch)
13269 (uri (pypi-uri "rfc3987" version))
13270 (sha256
13271 (base32
13272 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
13273 (build-system python-build-system)
13274 (home-page "https://pypi.python.org/pypi/rfc3987")
13275 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
13276 (description "@code{rfc3987} provides routines for parsing and
13277 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
13278 (license license:gpl3+)))
13279
13280 (define-public python2-rfc3987
13281 (package-with-python2 python-rfc3987))
13282
13283 (define-public python-validate-email
13284 (package
13285 (name "python-validate-email")
13286 (version "1.3")
13287 (source
13288 (origin
13289 (method url-fetch)
13290 (uri (pypi-uri "validate_email" version))
13291 (sha256
13292 (base32
13293 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
13294 (build-system python-build-system)
13295 (home-page "https://github.com/syrusakbary/validate_email")
13296 (synopsis "Verifies if an email address is valid and really exists")
13297 (description "@code{validate_email} can be used to verify if an email
13298 address is valid and really exists.")
13299 (license license:lgpl3+)))
13300
13301 (define-public python2-validate-email
13302 (package-with-python2 python-validate-email))
13303
13304 (define-public python-flex
13305 (package
13306 (name "python-flex")
13307 (version "6.10.0")
13308 (source
13309 (origin
13310 (method url-fetch)
13311 (uri (pypi-uri "flex" version))
13312 (sha256
13313 (base32
13314 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
13315 (build-system python-build-system)
13316 (propagated-inputs
13317 `(("python-click" ,python-click)
13318 ("python-iso8601" ,python-iso8601)
13319 ("python-jsonpointer" ,python-jsonpointer)
13320 ("python-pyyaml" ,python-pyyaml)
13321 ("python-requests" ,python-requests)
13322 ("python-rfc3987" ,python-rfc3987)
13323 ("python-six" ,python-six)
13324 ("python-validate-email" ,python-validate-email)))
13325 (home-page "https://github.com/pipermerriam/flex")
13326 (synopsis "Validates Swagger schemata")
13327 (description "@code{flex} can be used to validate Swagger schemata.")
13328 (license license:bsd-3)))
13329
13330 (define-public python2-flex
13331 (package-with-python2 python-flex))
13332
13333 (define-public python-marshmallow
13334 (package
13335 (name "python-marshmallow")
13336 (version "3.0.0b14")
13337 (source
13338 (origin
13339 (method url-fetch)
13340 (uri (pypi-uri "marshmallow" version))
13341 (sha256
13342 (base32
13343 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
13344 (build-system python-build-system)
13345 (propagated-inputs
13346 `(("python-dateutil" ,python-dateutil)
13347 ("python-simplejson" ,python-simplejson)))
13348 (native-inputs
13349 `(("python-pytest" ,python-pytest)
13350 ("python-pytz" ,python-pytz)))
13351 (home-page "https://github.com/marshmallow-code/marshmallow")
13352 (synopsis "Convert complex datatypes to and from native
13353 Python datatypes.")
13354 (description "@code{marshmallow} provides a library for converting
13355 complex datatypes to and from native Python datatypes.")
13356 (license license:expat)))
13357
13358 (define-public python2-marshmallow
13359 (package-with-python2 python-marshmallow))
13360
13361 (define-public python-apispec
13362 (package
13363 (name "python-apispec")
13364 (version "0.25.3")
13365 (source
13366 (origin
13367 (method url-fetch)
13368 (uri (pypi-uri "apispec" version))
13369 (sha256
13370 (base32
13371 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
13372 (build-system python-build-system)
13373 (propagated-inputs
13374 `(("python-pyyaml" ,python-pyyaml)))
13375 (native-inputs
13376 `(("python-pytest" ,python-pytest)
13377 ("python-flask" ,python-flask)
13378 ("python-marshmallow" ,python-marshmallow)
13379 ("python-tornado" ,python-tornado)
13380 ("python-bottle" ,python-bottle)
13381 ("python-mock" ,python-mock)))
13382 (home-page "https://github.com/marshmallow-code/apispec")
13383 (synopsis "Swagger 2.0 API specification generator")
13384 (description "@code{python-apispec} is a pluggable API specification
13385 generator. Currently supports the OpenAPI specification (f.k.a.
13386 Swagger 2.0).")
13387 (license license:expat)))
13388
13389 (define-public python2-apispec
13390 (package-with-python2 python-apispec))
13391
13392 (define-public python-flasgger
13393 (package
13394 (name "python-flasgger")
13395 (version "0.6.3")
13396 (source
13397 (origin
13398 (method git-fetch)
13399 (uri (git-reference
13400 (url "https://github.com/rochacbruno/flasgger.git")
13401 (commit version)))
13402 (file-name (git-file-name name version))
13403 (sha256
13404 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
13405 (build-system python-build-system)
13406 (arguments
13407 `(#:phases
13408 (modify-phases %standard-phases
13409 (replace 'check
13410 (lambda* (#:key inputs outputs #:allow-other-keys)
13411 (substitute* "Makefile"
13412 (("flake8 flasgger --ignore=F403")
13413 "flake8 flasgger --ignore=E731,F403"))
13414 (setenv "PYTHONPATH" (string-append (getcwd)
13415 ":"
13416 (getenv "PYTHONPATH")))
13417 (invoke "py.test"))))))
13418 (propagated-inputs
13419 `(("python-flask" ,python-flask)
13420 ("python-pyyaml" ,python-pyyaml)
13421 ("python-jsonschema" ,python-jsonschema)
13422 ("python-mistune" ,python-mistune)
13423 ("python-six" ,python-six)))
13424 (native-inputs
13425 `(("python-decorator" ,python-decorator)
13426 ("python-flake8" ,python-flake8)
13427 ("python-flask-restful" ,python-flask-restful)
13428 ("python-flex" ,python-flex)
13429 ("python-pytest" ,python-pytest)
13430 ("python-pytest-cov" ,python-pytest-cov)
13431 ("python-marshmallow" ,python-marshmallow)
13432 ("python-apispec" ,python-apispec)))
13433 (home-page "https://github.com/rochacbruno/flasgger/")
13434 (synopsis "Extract Swagger specs from your Flask project")
13435 (description "@code{python-flasgger} allows extracting Swagger specs
13436 from your Flask project. It is a fork of Flask-Swagger.")
13437 (license license:expat)))
13438
13439 (define-public python2-flasgger
13440 (package-with-python2 python-flasgger))
13441
13442 (define-public python-swagger-spec-validator
13443 (package
13444 (name "python-swagger-spec-validator")
13445 (version "2.4.3")
13446 (source
13447 (origin
13448 (method url-fetch)
13449 (uri (pypi-uri "swagger-spec-validator" version))
13450 (sha256
13451 (base32
13452 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
13453 (build-system python-build-system)
13454 (propagated-inputs
13455 `(("python-jsonschema" ,python-jsonschema)
13456 ("python-pyyaml" ,python-pyyaml)
13457 ("python-six" ,python-six)))
13458 (home-page
13459 "https://github.com/Yelp/swagger_spec_validator")
13460 (synopsis "Validation of Swagger specifications")
13461 (description "@code{swagger_spec_validator} provides a library for
13462 validating Swagger API specifications.")
13463 (license license:asl2.0)))
13464
13465 (define-public python2-swagger-spec-validator
13466 (package-with-python2 python-swagger-spec-validator))
13467
13468 (define-public python-apache-libcloud
13469 (package
13470 (name "python-apache-libcloud")
13471 (version "2.4.0")
13472 (source
13473 (origin
13474 (method url-fetch)
13475 (uri (pypi-uri "apache-libcloud" version))
13476 (sha256
13477 (base32
13478 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
13479 (build-system python-build-system)
13480 (arguments
13481 `(#:phases
13482 (modify-phases %standard-phases
13483 (add-after 'unpack 'patch-ssh
13484 (lambda* (#:key inputs #:allow-other-keys)
13485 (substitute* "libcloud/compute/ssh.py"
13486 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
13487 "/bin/ssh" "'")))
13488 #t))
13489 (add-after 'unpack 'patch-tests
13490 (lambda _
13491 (substitute* "./libcloud/test/test_file_fixtures.py"
13492 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
13493 (("def _ascii") "def _raw_data(self, method, url, body, headers):
13494 return (httplib.OK,
13495 \"1234abcd\",
13496 {\"test\": \"value\"},
13497 httplib.responses[httplib.OK])
13498 def _ascii"))
13499 (substitute* "libcloud/test/compute/test_ssh_client.py"
13500 (("class ShellOutSSHClientTests")
13501 "@unittest.skip(\"Guix container doesn't have ssh service\")
13502 class ShellOutSSHClientTests")
13503 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
13504 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
13505 (("'.xF0', '.x90', '.x8D', '.x88'")
13506 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
13507 #t))
13508 (add-before 'check 'copy-secret
13509 (lambda _
13510 (copy-file "libcloud/test/secrets.py-dist"
13511 "libcloud/test/secrets.py")
13512 #t)))))
13513 (inputs
13514 `(("openssh" ,openssh)))
13515 (propagated-inputs
13516 `(("python-paramiko" ,python-paramiko)
13517 ("python-requests" ,python-requests)))
13518 (native-inputs
13519 `(("python-lockfile" ,python-lockfile)
13520 ("python-mock" ,python-mock)
13521 ("python-pytest" ,python-pytest)
13522 ("python-pytest-runner" ,python-pytest-runner)
13523 ("python-requests-mock" ,python-requests-mock)))
13524 (home-page "https://libcloud.apache.org/")
13525 (synopsis "Unified Cloud API")
13526 (description "@code{libcloud} is a Python library for interacting with
13527 many of the popular cloud service providers using a unified API.")
13528 (license license:asl2.0)))
13529
13530 (define-public python2-apache-libcloud
13531 (package-with-python2 python-apache-libcloud))
13532
13533 (define-public python-smmap2
13534 (package
13535 (name "python-smmap2")
13536 (version "2.0.3")
13537 (source
13538 (origin
13539 (method url-fetch)
13540 (uri (pypi-uri "smmap2" version))
13541 (sha256
13542 (base32
13543 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
13544 (build-system python-build-system)
13545 (native-inputs
13546 `(("python-nosexcover" ,python-nosexcover)))
13547 (home-page "https://github.com/Byron/smmap")
13548 (synopsis "Python sliding window memory map manager")
13549 (description "@code{smmap2} is a pure Python implementation of a sliding
13550 window memory map manager.")
13551 (license license:bsd-3)))
13552
13553 (define-public python2-smmap2
13554 (package-with-python2 python-smmap2))
13555
13556 (define-public python-regex
13557 (package
13558 (name "python-regex")
13559 (version "2019.04.14")
13560 (source (origin
13561 (method url-fetch)
13562 (uri (pypi-uri "regex" version))
13563 (sha256
13564 (base32
13565 "1a6hhfs6l6snr1z654ay6wzbmwdkmv282fzfkd5hk2d1n73y8v6m"))))
13566 ;; TODO: Fix and enable regex_test.py tests that complain about the
13567 ;; test.support module not existing.
13568 (build-system python-build-system)
13569 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
13570 (synopsis "Alternative regular expression module")
13571 (description "This regular expression implementation is backwards-
13572 compatible with the standard @code{re} module, but offers additional
13573 functionality like full case-folding for case-insensitive matches in Unicode.")
13574 (license license:psfl)))
13575
13576 (define-public python2-regex
13577 (package-with-python2 python-regex))
13578
13579 (define-public python2-pyopengl
13580 (package
13581 (name "python2-pyopengl")
13582 (version "3.1.0")
13583 (source
13584 (origin
13585 (method url-fetch)
13586 (uri (pypi-uri "PyOpenGL" version))
13587 (sha256
13588 (base32
13589 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
13590 (arguments
13591 `(#:python ,python-2))
13592 (build-system python-build-system)
13593 (home-page "http://pyopengl.sourceforge.net")
13594 (synopsis "Standard OpenGL bindings for Python")
13595 (description
13596 "PyOpenGL is the most common cross platform Python binding to OpenGL and
13597 related APIs. The binding is created using the standard @code{ctypes}
13598 library.")
13599 (license license:bsd-3)))
13600
13601 (define-public python2-pyopengl-accelerate
13602 (package
13603 (inherit python2-pyopengl)
13604 (name "python2-pyopengl-accelerate")
13605 (version "3.1.0")
13606 (source
13607 (origin
13608 (method url-fetch)
13609 (uri (pypi-uri "PyOpenGL-accelerate" version))
13610 (sha256
13611 (base32
13612 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
13613 (synopsis "Acceleration code for PyOpenGL")
13614 (description
13615 "This is the Cython-coded accelerator module for PyOpenGL.")))
13616
13617 (define-public python-rencode
13618 (package
13619 (name "python-rencode")
13620 (version "1.0.5")
13621 (source
13622 (origin
13623 (method url-fetch)
13624 (uri (pypi-uri "rencode" version))
13625 (sha256
13626 (base32
13627 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
13628 (build-system python-build-system)
13629 (arguments
13630 `(#:phases
13631 (modify-phases %standard-phases
13632 (add-before 'check 'delete-bogus-test
13633 ;; This test requires /home/aresch/Downloads, which is not provided by
13634 ;; the build environment.
13635 (lambda _
13636 (delete-file "rencode/t.py")
13637 #t)))))
13638 (native-inputs `(("pkg-config" ,pkg-config)
13639 ("python-cython" ,python-cython)))
13640 (home-page "https://github.com/aresch/rencode")
13641 (synopsis "Serialization of heterogeneous data structures")
13642 (description
13643 "The @code{rencode} module is a data structure serialization library,
13644 similar to @code{bencode} from the BitTorrent project. For complex,
13645 heterogeneous data structures with many small elements, r-encoding stake up
13646 significantly less space than b-encodings. This version of rencode is a
13647 complete rewrite in Cython to attempt to increase the performance over the
13648 pure Python module.")
13649 (license license:bsd-3)))
13650
13651 (define-public python2-rencode
13652 (package-with-python2 python-rencode))
13653
13654 (define-public python-xenon
13655 (package
13656 (name "python-xenon")
13657 (version "0.5.4")
13658 (source
13659 (origin
13660 (method url-fetch)
13661 (uri (pypi-uri "xenon" version))
13662 (sha256
13663 (base32
13664 "029cbhysg2vr5n4jz8gpg2793f8wkwnqpr1qgv6c1dn685vy31mc"))))
13665 (build-system python-build-system)
13666 (native-inputs
13667 `(("python-pyyaml" ,python-pyyaml)
13668 ("python-radon" ,python-radon)
13669 ("python-requests" ,python-requests)
13670 ("python-flake8" ,python-flake8)
13671 ("python-tox" ,python-tox)))
13672 (arguments
13673 `(#:phases
13674 (modify-phases %standard-phases
13675 (add-before 'build 'patch-test-requirements
13676 (lambda _
13677 ;; Remove httpretty dependency for tests.
13678 (substitute* "setup.py"
13679 (("httpretty") ""))
13680 #t)))))
13681 (home-page "https://xenon.readthedocs.org/")
13682 (synopsis "Monitor code metrics for Python on your CI server")
13683 (description
13684 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
13685 Ideally, @code{xenon} is run every time code is committed. Through command
13686 line options, various thresholds can be set for the complexity of code. It
13687 will fail (i.e. it will exit with a non-zero exit code) when any of these
13688 requirements is not met.")
13689 (license license:expat)))
13690
13691 (define-public python2-xenon
13692 (package-with-python2 python-xenon))
13693
13694 (define-public python-pysocks
13695 (package
13696 (name "python-pysocks")
13697 (version "1.7.0")
13698 (source
13699 (origin
13700 (method url-fetch)
13701 (uri (pypi-uri "PySocks" version))
13702 (sha256
13703 (base32
13704 "0z4p31bpqm893cf87qqgb30k7nwd8kqfjwwjm5cvxb6zbyj1w0yr"))))
13705 (build-system python-build-system)
13706 (arguments `(#:tests? #f))
13707 (home-page "https://github.com/Anorov/PySocks")
13708 (synopsis "SOCKS client module")
13709 (description "@code{pysocks} is an updated and semi-actively maintained
13710 version of @code{SocksiPy} with bug fixes and extra features.")
13711 (license license:bsd-3)))
13712
13713 (define-public python2-pysocks
13714 (package-with-python2 python-pysocks))
13715
13716 (define-public python-pydiff
13717 (package
13718 (name "python-pydiff")
13719 (version "0.2")
13720 (source
13721 (origin
13722 (method url-fetch)
13723 (uri (pypi-uri "pydiff" version))
13724 (sha256
13725 (base32
13726 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
13727 (build-system python-build-system)
13728 (home-page "https://github.com/myint/pydiff")
13729 (synopsis "Library to diff two Python files at the bytecode level")
13730 (description
13731 "@code{pydiff} makes it easy to look for actual code changes while
13732 ignoring formatting changes.")
13733 (license license:expat)))
13734
13735 (define-public python2-pydiff
13736 (package-with-python2 python-pydiff))
13737
13738 (define-public python-tqdm
13739 (package
13740 (name "python-tqdm")
13741 (version "4.19.6")
13742 (source
13743 (origin
13744 (method url-fetch)
13745 (uri (pypi-uri "tqdm" version))
13746 (sha256
13747 (base32
13748 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
13749 (build-system python-build-system)
13750 (native-inputs
13751 `(("python-flake8" ,python-flake8)
13752 ("python-nose" ,python-nose)
13753 ("python-coverage" ,python-coverage)))
13754 (home-page "https://github.com/tqdm/tqdm")
13755 (synopsis "Fast, extensible progress meter")
13756 (description
13757 "Make loops show a progress bar on the console by just wrapping any
13758 iterable with @code{|tqdm(iterable)|}. Offers many options to define
13759 design and layout.")
13760 (license (list license:mpl2.0 license:expat))
13761 (properties `((python2-variant . ,(delay python2-tqdm))))))
13762
13763 (define-public python2-tqdm
13764 (let ((tqdm (package-with-python2
13765 (strip-python2-variant python-tqdm))))
13766 (package (inherit tqdm)
13767 (native-inputs `(("python2-functools32" ,python2-functools32)
13768 ,@(package-native-inputs tqdm))))))
13769
13770 (define-public python-pkginfo
13771 (package
13772 (name "python-pkginfo")
13773 (version "1.4.2")
13774 (source
13775 (origin
13776 (method url-fetch)
13777 (uri (pypi-uri "pkginfo" version))
13778 (sha256
13779 (base32
13780 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
13781 (build-system python-build-system)
13782 (arguments
13783 ;; The tests are broken upstream.
13784 '(#:tests? #f))
13785 (home-page
13786 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
13787 (synopsis
13788 "Query metadatdata from sdists, bdists, and installed packages")
13789 (description
13790 "API to query the distutils metadata written in @file{PKG-INFO} inside a
13791 source distriubtion (an sdist) or a binary distribution (e.g., created by
13792 running bdist_egg). It can also query the EGG-INFO directory of an installed
13793 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
13794 created by running @code{python setup.py develop}).")
13795 (license license:expat)))
13796
13797 (define-public python2-pkginfo
13798 (package-with-python2 python-pkginfo))
13799
13800 (define-public python-twine
13801 (package
13802 (name "python-twine")
13803 (version "1.9.1")
13804 (source
13805 (origin
13806 (method url-fetch)
13807 (uri (pypi-uri "twine" version))
13808 (sha256
13809 (base32
13810 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
13811 (build-system python-build-system)
13812 (propagated-inputs
13813 `(("python-tqdm" ,python-tqdm)
13814 ("python-pkginfo" ,python-pkginfo)
13815 ("python-requests" ,python-requests)
13816 ("python-requests-toolbelt" ,python-requests-toolbelt)))
13817 (home-page "https://github.com/pypa/twine")
13818 (synopsis "Collection of utilities for interacting with PyPI")
13819 (description
13820 "@code{twine} currently supports registering projects and uploading
13821 distributions. It authenticates the user over HTTPS, allows them to pre-sign
13822 their files and supports any packaging format (including wheels).")
13823 (license license:asl2.0)))
13824
13825 (define-public python2-twine
13826 (package-with-python2 python-twine))
13827
13828 (define-public python-linecache2
13829 (package
13830 (name "python-linecache2")
13831 (version "1.0.0")
13832 (source
13833 (origin
13834 (method url-fetch)
13835 (uri (pypi-uri "linecache2" version))
13836 (sha256
13837 (base32
13838 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
13839 (build-system python-build-system)
13840 (arguments
13841 `(;; The tests depend on unittest2, and our version is a bit too old.
13842 #:tests? #f))
13843 (native-inputs
13844 `(("python-pbr" ,python-pbr-minimal)))
13845 (home-page
13846 "https://github.com/testing-cabal/linecache2")
13847 (synopsis "Backports of the linecache module")
13848 (description
13849 "The linecache module allows one to get any line from any file, while
13850 attempting to optimize internally, using a cache, the common case where many
13851 lines are read from a single file.")
13852 (license license:psfl)))
13853
13854 (define-public python2-linecache2
13855 (package-with-python2 python-linecache2))
13856
13857 (define-public python-traceback2
13858 (package
13859 (name "python-traceback2")
13860 (version "1.4.0")
13861 (source
13862 (origin
13863 (method url-fetch)
13864 (uri (pypi-uri "traceback2" version))
13865 (sha256
13866 (base32
13867 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
13868 (build-system python-build-system)
13869 (arguments
13870 `(;; python-traceback2 and python-unittest2 depend on one another.
13871 #:tests? #f))
13872 (native-inputs
13873 `(("python-pbr" ,python-pbr-minimal)))
13874 (propagated-inputs
13875 `(("python-linecache2" ,python-linecache2)))
13876 (home-page
13877 "https://github.com/testing-cabal/traceback2")
13878 (synopsis "Backports of the traceback module")
13879 (description
13880 "This module provides a standard interface to extract, format and print
13881 stack traces of Python programs. It exactly mimics the behavior of the Python
13882 interpreter when it prints a stack trace.")
13883 (license license:psfl)))
13884
13885 (define-public python2-traceback2
13886 (package-with-python2 python-traceback2))
13887
13888 (define-public python-ratelimiter
13889 (package
13890 (name "python-ratelimiter")
13891 (version "1.2.0")
13892 (source
13893 (origin
13894 (method url-fetch)
13895 (uri (pypi-uri "ratelimiter" version))
13896 (sha256
13897 (base32
13898 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
13899 (build-system python-build-system)
13900 (arguments
13901 '(#:tests? #f)) ; There are no tests in the pypi archive.
13902 (home-page "https://github.com/RazerM/ratelimiter")
13903 (synopsis "Simple rate limiting object")
13904 (description
13905 "The @code{ratelimiter} module ensures that an operation will not be
13906 executed more than a given number of times during a given period.")
13907 (license license:asl2.0)))
13908
13909 (define-public python2-ratelimiter
13910 (package-with-python2 python-ratelimiter))
13911
13912 (define-public python-dukpy
13913 (package
13914 (name "python-dukpy")
13915 (version "0.3")
13916 (source
13917 (origin
13918 (method git-fetch)
13919 (uri (git-reference
13920 (url "https://github.com/kovidgoyal/dukpy.git")
13921 (commit (string-append "v" version))))
13922 (file-name (git-file-name name version))
13923 (sha256
13924 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
13925 (build-system python-build-system)
13926 (home-page "https://github.com/kovidgoyal/dukpy")
13927 (synopsis "Run JavaScript in python")
13928 (description
13929 "dukpy is a JavaScript runtime environment for Python using the duktape
13930 embeddable JavaScript engine.")
13931 ;; Dukpy is licensed under MIT like the embedded duktape library,
13932 ;; with 'errors.c' as GPL3.
13933 (license (list license:expat license:gpl3))))
13934
13935 (define-public python2-dukpy
13936 (package-with-python2 python-dukpy))
13937
13938 (define-public python-jsonrpclib-pelix
13939 (package
13940 (name "python-jsonrpclib-pelix")
13941 (version "0.3.2")
13942 (source
13943 (origin
13944 (method url-fetch)
13945 (uri (pypi-uri "jsonrpclib-pelix" version))
13946 (sha256
13947 (base32
13948 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
13949 (build-system python-build-system)
13950 (arguments
13951 `(#:tests? #f)) ; no tests in PyPI tarball
13952 (home-page "https://github.com/tcalmant/jsonrpclib/")
13953 (synopsis "JSON-RPC 2.0 client library for Python")
13954 (description
13955 "This library implements the JSON-RPC v2.0
13956 specification (backwards-compatible) as a client library for Python. This
13957 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
13958 services.")
13959 (license license:asl2.0)))
13960
13961 (define-public python2-jsonrpclib-pelix
13962 (package-with-python2 python-jsonrpclib-pelix))
13963
13964 (define-public python-setuptools-scm-git-archive
13965 (package
13966 (name "python-setuptools-scm-git-archive")
13967 (version "1.0")
13968 (source
13969 (origin
13970 (method url-fetch)
13971 (uri (pypi-uri "setuptools_scm_git_archive" version))
13972 (sha256
13973 (base32
13974 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
13975 (build-system python-build-system)
13976 (native-inputs
13977 `(("python-pytest" ,python-pytest)))
13978 (propagated-inputs
13979 `(("python-setuptools-scm" ,python-setuptools-scm)))
13980 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
13981 (synopsis "Setuptools_scm plugin for git archives")
13982 (description
13983 "The setuptools_scm_git_archive package is a plugin to
13984 setuptools_scm, which supports obtaining versions from git archives that
13985 belong to tagged versions.")
13986 (license license:expat)))
13987
13988 (define-public python2-setuptools-scm-git-archive
13989 (package-with-python2 python-setuptools-scm-git-archive))
13990
13991 (define-public python-setuptools-git
13992 (package
13993 (name "python-setuptools-git")
13994 (version "1.2")
13995 (source
13996 (origin
13997 (method url-fetch)
13998 (uri (pypi-uri "setuptools-git" version))
13999 (sha256
14000 (base32
14001 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
14002 (build-system python-build-system)
14003 (arguments
14004 `(#:phases
14005 (modify-phases %standard-phases
14006 ;; This is needed for tests.
14007 (add-after 'unpack 'configure-git
14008 (lambda _
14009 (setenv "HOME" "/tmp")
14010 (invoke "git" "config" "--global" "user.email" "guix")
14011 (invoke "git" "config" "--global" "user.name" "guix")
14012 #t)))))
14013 (native-inputs
14014 `(("git" ,git-minimal)))
14015 (home-page "https://github.com/msabramo/setuptools-git")
14016 (synopsis "Setuptools revision control system plugin for Git")
14017 (description
14018 "This package provides a plugin for Setuptools for revision control with
14019 Git.")
14020 (license license:bsd-3)))
14021
14022 (define-public python-pyclipper
14023 (package
14024 (name "python-pyclipper")
14025 (version "1.1.0.post1")
14026 (source
14027 (origin
14028 (method url-fetch)
14029 (uri (pypi-uri "pyclipper" version ".zip"))
14030 (sha256
14031 (base32
14032 "0ldbkbnx94an4zzrwb1sxmg6k0jgk4cwmvcdyy8y5k1zslc612wa"))
14033 (modules '((guix build utils)))
14034 (snippet
14035 '(begin
14036 ;; This file is generated by Cython.
14037 (delete-file "pyclipper/pyclipper.cpp") #t))))
14038 (build-system python-build-system)
14039 (arguments
14040 `(#:phases
14041 (modify-phases %standard-phases
14042 (add-before 'build 'cythonize-sources
14043 (lambda _
14044 (with-directory-excursion "pyclipper"
14045 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
14046 (propagated-inputs
14047 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
14048 (native-inputs
14049 `(("python-cython" ,python-cython)
14050 ("python-pytest" ,python-pytest)
14051 ("python-pytest-runner" ,python-pytest-runner)
14052 ("python-unittest2" ,python-unittest2)
14053 ("unzip" ,unzip)))
14054 (home-page "https://github.com/greginvm/pyclipper")
14055 (synopsis "Wrapper for Angus Johnson's Clipper library")
14056 (description
14057 "Pyclipper is a Cython wrapper for the C++ translation of the
14058 Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
14059 (license license:expat)))
14060
14061 (define-public python2-pyclipper
14062 (package-with-python2 python-pyclipper))
14063
14064 (define-public python2-booleanoperations
14065 (package
14066 (name "python2-booleanoperations")
14067 (version "0.7.1")
14068 (source
14069 (origin
14070 (method url-fetch)
14071 (uri (pypi-uri "booleanOperations" version ".zip"))
14072 (sha256
14073 (base32
14074 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
14075 (build-system python-build-system)
14076 (arguments
14077 `(#:python ,python-2))
14078 (native-inputs
14079 `(("unzip" ,unzip)
14080 ("python2-pytest" ,python2-pytest)
14081 ("python2-pytest-runner" ,python2-pytest-runner)))
14082 (propagated-inputs
14083 `(("python-fonttools" ,python2-fonttools)
14084 ("python-pyclipper" ,python2-pyclipper)
14085 ("python-ufolib" ,python2-ufolib)))
14086 (home-page "https://github.com/typemytype/booleanOperations")
14087 (synopsis "Boolean operations on paths")
14088 (description
14089 "BooleanOperations provides a Python library that enables
14090 boolean operations on paths.")
14091 (license license:expat)))
14092
14093 (define-public python-tempdir
14094 (package
14095 (name "python-tempdir")
14096 (version "0.7.1")
14097 (source
14098 (origin
14099 (method url-fetch)
14100 (uri (pypi-uri "tempdir" version))
14101 (sha256
14102 (base32
14103 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
14104 (build-system python-build-system)
14105 (home-page "https://pypi.org/project/tempdir/")
14106 (arguments
14107 ;; the package has no tests
14108 '(#:tests? #f))
14109 (synopsis "Python library for managing temporary directories")
14110 (description
14111 "This library manages temporary directories that are automatically
14112 deleted with all their contents when they are no longer needed. It is
14113 particularly convenient for use in tests.")
14114 (license license:expat)))
14115
14116 (define-public python2-tempdir
14117 (package-with-python2 python-tempdir))
14118
14119 (define-public python-activepapers
14120 (package
14121 (name "python-activepapers")
14122 (version "0.2.2")
14123 (source
14124 (origin
14125 (method url-fetch)
14126 (uri (pypi-uri "ActivePapers.Py" version))
14127 (sha256
14128 (base32
14129 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
14130 (build-system python-build-system)
14131 (arguments
14132 `(#:modules ((ice-9 ftw)
14133 (srfi srfi-1)
14134 (guix build utils)
14135 (guix build python-build-system))
14136
14137 #:phases
14138 (modify-phases %standard-phases
14139 (add-after 'unpack 'delete-python2-code
14140 (lambda _
14141 (for-each delete-file
14142 '("lib/activepapers/builtins2.py"
14143 "lib/activepapers/standardlib2.py"
14144 "lib/activepapers/utility2.py"))))
14145 (replace 'check
14146 (lambda _
14147 ;; Deactivate the test cases that download files
14148 (setenv "NO_NETWORK_ACCESS" "1")
14149 ;; For some strange reason, some tests fail if nosetests runs all
14150 ;; test modules in a single execution. They pass if each test
14151 ;; module is run individually.
14152 (for-each (lambda (filename)
14153 (invoke "nosetests"
14154 (string-append "tests/" filename)))
14155 (scandir "tests"
14156 (lambda (filename)
14157 (string-suffix? ".py" filename)))))))))
14158 (native-inputs
14159 `(("python-tempdir" ,python-tempdir)
14160 ("python-nose" ,python-nose)))
14161 (propagated-inputs
14162 `(("python-h5py" ,python-h5py)))
14163 (home-page "http://www.activepapers.org/")
14164 (synopsis "Executable papers for scientific computing")
14165 (description
14166 "ActivePapers is a tool for working with executable papers, which
14167 combine data, code, and documentation in single-file packages,
14168 suitable for publication as supplementary material or on repositories
14169 such as figshare or Zenodo.")
14170 (properties `((python2-variant . ,(delay python2-activepapers))))
14171 (license license:bsd-3)))
14172
14173 (define-public python2-activepapers
14174 (let ((base (package-with-python2
14175 (strip-python2-variant python-activepapers))))
14176 (package
14177 (inherit base)
14178 (arguments
14179 (substitute-keyword-arguments (package-arguments base)
14180 ((#:phases phases)
14181 `(modify-phases ,phases
14182 (delete 'delete-python2-code)
14183 (add-after 'unpack 'delete-python3-code
14184 (lambda _
14185 (for-each delete-file
14186 '("lib/activepapers/builtins3.py"
14187 "lib/activepapers/standardlib3.py"
14188 "lib/activepapers/utility3.py")))))))))))
14189
14190 (define-public python-semver
14191 (package
14192 (name "python-semver")
14193 (version "2.7.9")
14194 (source
14195 (origin
14196 (method url-fetch)
14197 (uri (pypi-uri "semver" version))
14198 (sha256
14199 (base32
14200 "0hhgqppchv59rqj0yzi1prdg2nfsywqmjsqy2rycyxm0hvxmbyqz"))))
14201 (build-system python-build-system)
14202 (arguments
14203 `(#:phases
14204 (modify-phases %standard-phases
14205 (add-after 'unpack 'patch-test-requirements
14206 (lambda _
14207 (substitute* "setup.py"
14208 ;; Our Python is new enough.
14209 (("'virtualenv<14\\.0\\.0'") "'virtualenv'"))
14210 #t)))))
14211 (native-inputs
14212 `(("python-tox" ,python-tox)
14213 ("python-virtualenv" ,python-virtualenv)))
14214 (home-page "https://github.com/k-bx/python-semver")
14215 (synopsis "Python helper for Semantic Versioning")
14216 (description "This package provides a Python library for
14217 @url{Semantic Versioning, http://semver.org/}.")
14218 (license license:bsd-3)))
14219
14220 (define-public python2-semver
14221 (package-with-python2 python-semver))
14222
14223 (define-public python-pyro4
14224 (package
14225 (name "python-pyro4")
14226 (version "4.75")
14227 (source
14228 (origin
14229 (method url-fetch)
14230 (uri (pypi-uri "Pyro4" version))
14231 (sha256
14232 (base32 "1dfpp36imddx19yv0kd28gk1l71ckhpqy6jd590wpm2680jw15rq"))))
14233 (build-system python-build-system)
14234 (propagated-inputs
14235 `(("python-serpent" ,python-serpent)))
14236 (home-page "https://pyro4.readthedocs.io")
14237 (synopsis "Distributed object middleware for Python")
14238 (description
14239 "Pyro enables you to build applications in which objects can talk to each
14240 other over the network. You can just use normal Python method calls to call
14241 objects on other machines, also known as remote procedure calls (RPC).")
14242 (license license:expat)))
14243
14244 (define-public python2-pyro
14245 (package
14246 (name "python2-pyro")
14247 (version "3.16")
14248 (source
14249 (origin
14250 (method url-fetch)
14251 (uri (pypi-uri "Pyro" version))
14252 (file-name (string-append "Pyro-" version ".tar.gz"))
14253 (sha256
14254 (base32
14255 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
14256 (build-system python-build-system)
14257 (arguments
14258 ;; Pyro is not compatible with Python 3
14259 `(#:python ,python-2
14260 ;; Pyro has no test cases for automatic execution
14261 #:tests? #f))
14262 (home-page "http://pythonhosted.org/Pyro/")
14263 (synopsis "Distributed object manager for Python")
14264 (description "Pyro is a Distributed Object Technology system
14265 written in Python that is designed to be easy to use. It resembles
14266 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
14267 which is a system and language independent Distributed Object Technology
14268 and has much more to offer than Pyro or RMI. Pyro 3.x is no
14269 longer maintained. New projects should use Pyro4 instead, which
14270 is the new Pyro version that is actively developed.")
14271 (license license:expat)))
14272
14273 (define-public python2-scientific
14274 (package
14275 (name "python2-scientific")
14276 (version "2.9.4")
14277 (source
14278 (origin
14279 (method url-fetch)
14280 (uri (string-append "https://bitbucket.org/khinsen/"
14281 "scientificpython/downloads/ScientificPython-"
14282 version ".tar.gz"))
14283 (file-name (string-append "ScientificPython-" version ".tar.gz"))
14284 (sha256
14285 (base32
14286 "0fc69zhlsn9d2jvbzyjl9ah53vj598h84nkq230c83ahfvgzx5y3"))))
14287 (build-system python-build-system)
14288 (inputs
14289 `(("netcdf" ,netcdf)))
14290 (propagated-inputs
14291 `(("python-numpy" ,python2-numpy-1.8)
14292 ("python-pyro" ,python2-pyro)))
14293 (arguments
14294 ;; ScientificPython is not compatible with Python 3
14295 `(#:python ,python-2
14296 #:tests? #f ; No test suite
14297 #:phases
14298 (modify-phases %standard-phases
14299 (replace 'build
14300 (lambda* (#:key inputs #:allow-other-keys)
14301 (invoke "python" "setup.py" "build"
14302 (string-append "--netcdf_prefix="
14303 (assoc-ref inputs "netcdf"))))))))
14304 (home-page "https://bitbucket.org/khinsen/scientificpython")
14305 (synopsis "Python modules for scientific computing")
14306 (description "ScientificPython is a collection of Python modules that are
14307 useful for scientific computing. Most modules are rather general (Geometry,
14308 physical units, automatic derivatives, ...) whereas others are more
14309 domain-specific (e.g. netCDF and PDB support). The library is currently
14310 not actively maintained and works only with Python 2 and NumPy < 1.9.")
14311 (license license:cecill-c)))
14312
14313 (define-public python2-mmtk
14314 (package
14315 (name "python2-mmtk")
14316 (version "2.7.11")
14317 (source
14318 (origin
14319 (method url-fetch)
14320 (uri (string-append "https://bitbucket.org/khinsen/"
14321 "mmtk/downloads/MMTK-" version ".tar.gz"))
14322 (file-name (string-append "MMTK-" version ".tar.gz"))
14323 (sha256
14324 (base32
14325 "1d0nnjx4lwsvh8f99vv1r6gi50d93yba0adkz8b4zgv4za4c5862"))))
14326 (build-system python-build-system)
14327 (native-inputs
14328 `(("netcdf" ,netcdf)))
14329 (propagated-inputs
14330 `(("python-scientific" ,python2-scientific)
14331 ("python-tkinter" ,python-2 "tk")))
14332 (arguments
14333 `(#:python ,python-2
14334 #:tests? #f
14335 #:phases
14336 (modify-phases %standard-phases
14337 (add-before 'build 'includes-from-scientific
14338 (lambda* (#:key inputs #:allow-other-keys)
14339 (mkdir-p "Include/Scientific")
14340 (copy-recursively
14341 (string-append
14342 (assoc-ref inputs "python-scientific")
14343 "/include/python2.7/Scientific")
14344 "Include/Scientific"))))))
14345 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
14346 (synopsis "Python library for molecular simulation")
14347 (description "MMTK is a library for molecular simulations with an emphasis
14348 on biomolecules. It provides widely used methods such as Molecular Dynamics
14349 and normal mode analysis, but also basic routines for implementing new methods
14350 for simulation and analysis. The library is currently not actively maintained
14351 and works only with Python 2 and NumPy < 1.9.")
14352 (license license:cecill-c)))
14353
14354 (define-public python-phonenumbers
14355 (package
14356 (name "python-phonenumbers")
14357 (version "8.9.1")
14358 (source
14359 (origin
14360 (method url-fetch)
14361 (uri (pypi-uri "phonenumbers" version))
14362 (sha256
14363 (base32
14364 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
14365 (build-system python-build-system)
14366 (home-page
14367 "https://github.com/daviddrysdale/python-phonenumbers")
14368 (synopsis
14369 "Python library for dealing with international phone numbers")
14370 (description
14371 "This package provides a Python port of Google's libphonenumber library.")
14372 (license license:asl2.0)))
14373
14374 (define-public python2-phonenumbers
14375 (package-with-python2 python-phonenumbers))
14376
14377 (define-public python-send2trash
14378 (package
14379 (name "python-send2trash")
14380 (version "1.5.0")
14381 (source
14382 (origin (method git-fetch)
14383 ;; Source tarball on PyPI doesn't include tests.
14384 (uri (git-reference
14385 (url "https://github.com/hsoft/send2trash.git")
14386 (commit version)))
14387 (file-name (git-file-name name version))
14388 (sha256
14389 (base32
14390 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
14391 (build-system python-build-system)
14392 (arguments
14393 '(#:phases
14394 (modify-phases %standard-phases
14395 (add-before 'check 'pre-check
14396 (lambda _
14397 (mkdir-p "/tmp/foo")
14398 (setenv "HOME" "/tmp/foo")
14399 #t)))))
14400 (home-page "https://github.com/hsoft/send2trash")
14401 (synopsis "Send files to the user's @file{~/Trash} directory")
14402 (description "This package provides a Python library to send files to the
14403 user's @file{~/Trash} directory.")
14404 (properties `((python2-variant . ,(delay python2-send2trash))))
14405 (license license:bsd-3)))
14406
14407 (define-public python2-send2trash
14408 (package
14409 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
14410 (arguments
14411 (substitute-keyword-arguments (package-arguments python-send2trash)
14412 ((#:phases phases)
14413 `(modify-phases ,phases
14414 (add-before 'check 'setenv
14415 (lambda _
14416 (setenv "PYTHONPATH"
14417 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
14418 #t))))))))
14419
14420 (define-public python-yapf
14421 (package
14422 (name "python-yapf")
14423 (version "0.24.0")
14424 (source
14425 (origin
14426 (method url-fetch)
14427 (uri (pypi-uri "yapf" version))
14428 (sha256
14429 (base32
14430 "0anwby0ydmyzcsgjc5dn1ryddwvii4dq61vck447q0n96npnzfyf"))))
14431 (build-system python-build-system)
14432 (home-page "https://github.com/google/yapf")
14433 (synopsis "Formatter for Python code")
14434 (description "YAPF is a formatter for Python code. It's based off of
14435 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
14436 takes the code and reformats it to the best formatting that conforms to the
14437 style guide, even if the original code didn't violate the style guide.")
14438 (license license:asl2.0)))
14439
14440 (define-public python2-yapf
14441 (package-with-python2 python-yapf))
14442
14443 (define-public python-gyp
14444 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
14445 (revision "0"))
14446 (package
14447 (name "python-gyp")
14448 ;; Google does not release versions,
14449 ;; based on second most recent commit date.
14450 (version (git-version "0.0.0" revision commit))
14451 (source
14452 (origin
14453 ;; Google does not release tarballs,
14454 ;; git checkout is needed.
14455 (method git-fetch)
14456 (uri (git-reference
14457 (url "https://chromium.googlesource.com/external/gyp")
14458 (commit commit)))
14459 (file-name (git-file-name name version))
14460 (sha256
14461 (base32
14462 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
14463 (build-system python-build-system)
14464 (home-page "https://gyp.gsrc.io/")
14465 (synopsis "GYP is a Meta-Build system")
14466 (description
14467 "GYP builds build systems for large, cross platform applications.
14468 It can be used to generate XCode projects, Visual Studio projects, Ninja build
14469 files, and Makefiles.")
14470 (license license:bsd-3))))
14471
14472 (define-public python2-gyp
14473 (package-with-python2 python-gyp))
14474
14475 (define-public python-whatever
14476 (package
14477 (name "python-whatever")
14478 (version "0.5")
14479 (source
14480 (origin
14481 (method url-fetch)
14482 (uri (string-append "https://github.com/Suor/whatever/archive/" version
14483 ".tar.gz"))
14484 (sha256
14485 (base32
14486 "1iqvnaf0zpc6b4rvbqq4xy45mszcscyzpzknv8wg6j84pbp22sap"))
14487 (file-name (string-append name "-" version ".tar.gz"))))
14488 (build-system python-build-system)
14489 (arguments
14490 `(#:phases
14491 (modify-phases %standard-phases
14492 (replace 'check
14493 (lambda _
14494 (invoke "py.test"))))))
14495 (native-inputs
14496 `(("python-pytest" ,python-pytest)))
14497 (home-page "http://github.com/Suor/whatever")
14498 (synopsis "Make anonymous functions by partial application of operators")
14499 (description "@code{whatever} provides an easy way to make anonymous
14500 functions by partial application of operators.")
14501 (license license:bsd-3)))
14502
14503 (define-public python2-whatever
14504 (package-with-python2 python-whatever))
14505
14506 (define-public python-funcy
14507 (package
14508 (name "python-funcy")
14509 (version "1.11")
14510 (source
14511 (origin
14512 (method git-fetch)
14513 (uri (git-reference
14514 (url "https://github.com/Suor/funcy.git")
14515 (commit version)))
14516 (sha256
14517 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
14518 (file-name (git-file-name name version))))
14519 (build-system python-build-system)
14520 (arguments
14521 `(#:phases
14522 (modify-phases %standard-phases
14523 (replace 'check
14524 (lambda _
14525 (invoke "py.test"))))))
14526 (native-inputs
14527 `(("python-pytest" ,python-pytest)
14528 ("python-whatever" ,python-whatever)))
14529 (home-page "http://github.com/Suor/funcy")
14530 (synopsis "Functional tools")
14531 (description "@code{funcy} is a library that provides functional tools.
14532 Examples are:
14533 @enumerate
14534 @item merge - Merges collections of the same type
14535 @item walk - Type-preserving map
14536 @item select - Selects a part of a collection
14537 @item take - Takes the first n items of a collection
14538 @item first - Takes the first item of a collection
14539 @item remove - Predicated-removes items of a collection
14540 @item concat - Concatenates two collections
14541 @item flatten - Flattens a collection with subcollections
14542 @item distinct - Returns only distinct items
14543 @item split - Predicated-splits a collection
14544 @item split_at - Splits a collection at a given item
14545 @item group_by - Groups items by group
14546 @item pairwise - Pairs off adjacent items
14547 @item partial - Partially-applies a function
14548 @item curry - Curries a function
14549 @item compose - Composes functions
14550 @item complement - Complements a predicate
14551 @item all_fn - \"all\" with predicate
14552 @end enumerate")
14553 (license license:bsd-3)))
14554
14555 (define-public python2-funcy
14556 (package-with-python2 python-funcy))
14557
14558 (define-public python-isoweek
14559 (package
14560 (name "python-isoweek")
14561 (version "1.3.3")
14562 (source
14563 (origin
14564 (method url-fetch)
14565 (uri (pypi-uri "isoweek" version))
14566 (sha256
14567 (base32
14568 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
14569 (build-system python-build-system)
14570 (home-page "https://github.com/gisle/isoweek")
14571 (synopsis "Objects representing a week")
14572 (description "The @code{isoweek} module provide the class Week that
14573 implements the week definition of ISO 8601. This standard also defines
14574 a notation for identifying weeks; yyyyWww (where the W is a literal).
14575 Week instances stringify to this form.")
14576 (license license:bsd-3)))
14577
14578 (define-public python2-isoweek
14579 (package-with-python2 python-isoweek))
14580
14581 (define-public python-tokenize-rt
14582 (package
14583 (name "python-tokenize-rt")
14584 (version "2.0.1")
14585 (source
14586 (origin
14587 (method url-fetch)
14588 (uri (pypi-uri "tokenize-rt" version))
14589 (sha256
14590 (base32
14591 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
14592 (build-system python-build-system)
14593 (home-page "https://github.com/asottile/tokenize-rt")
14594 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
14595 (description
14596 "This Python library is a wrapper around @code{tokenize} from the Python
14597 standard library. It provides two additional tokens @code{ESCAPED_NL} and
14598 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
14599 and @code{tokens_to_src} to roundtrip.")
14600 (license license:expat)))
14601
14602 (define-public python-future-fstrings
14603 (package
14604 (name "python-future-fstrings")
14605 (version "0.4.1")
14606 (source
14607 (origin
14608 (method url-fetch)
14609 (uri (pypi-uri "future_fstrings" version))
14610 (sha256
14611 (base32
14612 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
14613 (build-system python-build-system)
14614 (propagated-inputs
14615 `(("python-tokenize-rt" ,python-tokenize-rt)))
14616 (home-page "https://github.com/asottile/future-fstrings")
14617 (synopsis "Backport of fstrings to Python < 3.6")
14618 (description
14619 "This package provides a UTF-8 compatible encoding
14620 @code{future_fstrings}, which performs source manipulation. It decodes the
14621 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
14622 @code{f} strings.")
14623 (license license:expat)))
14624
14625 (define-public python-typed-ast
14626 (package
14627 (name "python-typed-ast")
14628 (version "1.3.5")
14629 (source
14630 (origin
14631 (method url-fetch)
14632 (uri (pypi-uri "typed-ast" version))
14633 (sha256
14634 (base32
14635 "1m7pr6qpana3cvqwiw7mlvrgvmw27ch5mx1592572xhlki8g85ak"))))
14636 (build-system python-build-system)
14637 (arguments
14638 `(#:modules ((guix build utils)
14639 (guix build python-build-system)
14640 (ice-9 ftw)
14641 (srfi srfi-1)
14642 (srfi srfi-26))
14643 #:phases
14644 (modify-phases %standard-phases
14645 (replace 'check
14646 (lambda _
14647 (let ((cwd (getcwd)))
14648 (setenv "PYTHONPATH"
14649 (string-append cwd "/build/"
14650 (find (cut string-prefix? "lib" <>)
14651 (scandir (string-append cwd "/build")))
14652 ":"
14653 (getenv "PYTHONPATH"))))
14654 (invoke "pytest")
14655 #t)))))
14656 (native-inputs `(("python-pytest" ,python-pytest)))
14657 (home-page "https://github.com/python/typed_ast")
14658 (synopsis "Fork of Python @code{ast} modules with type comment support")
14659 (description "This package provides a parser similar to the standard
14660 @code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
14661 include PEP 484 type comments and are independent of the version of Python
14662 under which they are run. The @code{typed_ast} parsers produce the standard
14663 Python AST (plus type comments), and are both fast and correct, as they are
14664 based on the CPython 2.7 and 3.7 parsers.")
14665 ;; See the file "LICENSE" for the details.
14666 (license (list license:psfl
14667 license:asl2.0
14668 license:expat)))) ;ast27/Parser/spark.py
14669
14670 (define-public python-typing
14671 (package
14672 (name "python-typing")
14673 (version "3.6.6")
14674 (source
14675 (origin
14676 (method url-fetch)
14677 (uri (pypi-uri "typing" version))
14678 (sha256
14679 (base32
14680 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
14681 (build-system python-build-system)
14682 (home-page "https://docs.python.org/3/library/typing.html")
14683 (synopsis "Type hints for Python")
14684 (description "This is a backport of the standard library @code{typing}
14685 module to Python versions older than 3.5. Typing defines a standard notation
14686 for Python function and variable type annotations. The notation can be used
14687 for documenting code in a concise, standard format, and it has been designed
14688 to also be used by static and runtime type checkers, static analyzers, IDEs
14689 and other tools.")
14690 (license license:psfl)))
14691
14692 (define-public python2-typing
14693 (package-with-python2 python-typing))
14694
14695 (define-public python-typing-extensions
14696 (package
14697 (name "python-typing-extensions")
14698 (version "3.7.2")
14699 (source
14700 (origin
14701 (method url-fetch)
14702 (uri (pypi-uri "typing_extensions" version))
14703 (sha256
14704 (base32
14705 "0wfsv71pvkyf2na938l579jh0v3kzl6g744ijgnahcwd4d9x0b7v"))))
14706 (build-system python-build-system)
14707 (home-page
14708 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
14709 (synopsis "Experimental type hints for Python")
14710 (description
14711 "The typing_extensions module contains additional @code{typing} hints not
14712 yet present in the of the @code{typing} standard library.
14713 Included are implementations of:
14714 @enumerate
14715 @item ClassVar
14716 @item ContextManager
14717 @item Counter
14718 @item DefaultDict
14719 @item Deque
14720 @item NewType
14721 @item NoReturn
14722 @item overload
14723 @item Protocol
14724 @item runtime
14725 @item Text
14726 @item Type
14727 @item TYPE_CHECKING
14728 @item AsyncGenerator
14729 @end enumerate\n")
14730 (license license:psfl)))
14731
14732 (define-public bpython
14733 (package
14734 (name "bpython")
14735 (version "0.17.1")
14736 (source
14737 (origin
14738 (method url-fetch)
14739 (uri (pypi-uri "bpython" version))
14740 (sha256
14741 (base32
14742 "0bxhxi5zxdkrf8b4gwn0d363kdz3qnypjwhm1aydki53ph8ca1w9"))))
14743 (build-system python-build-system)
14744 (arguments
14745 `(#:phases
14746 (modify-phases %standard-phases
14747 (add-after 'unpack 'remove-failing-test
14748 (lambda _
14749 ;; Remove failing test. FIXME: make it pass
14750 (delete-file "bpython/test/test_args.py")
14751 #t))
14752 (add-after 'wrap 'add-aliases
14753 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
14754 (lambda* (#:key outputs #:allow-other-keys)
14755 (let ((out (assoc-ref outputs "out")))
14756 (for-each
14757 (lambda (old new)
14758 (symlink old (string-append out "/bin/" new)))
14759 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
14760 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
14761 #t)))))
14762 (propagated-inputs
14763 `(("python-pygments" ,python-pygments)
14764 ("python-requests" ,python-requests)
14765 ("python-babel" ,python-babel) ; optional, for internationalization
14766 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
14767 ("python-greenlet" ,python-greenlet)
14768 ("python-urwid" ,python-urwid) ; for bpython-urwid only
14769 ("python-six" ,python-six)))
14770 (native-inputs
14771 `(("python-sphinx" ,python-sphinx)
14772 ("python-mock" ,python-mock)))
14773 (home-page "https://bpython-interpreter.org/")
14774 (synopsis "Fancy interface to the Python interpreter")
14775 (description "Bpython is a fancy interface to the Python
14776 interpreter. bpython's main features are
14777
14778 @enumerate
14779 @item in-line syntax highlighting,
14780 @item readline-like autocomplete with suggestions displayed as you type,
14781 @item expected parameter list for any Python function,
14782 @item \"rewind\" function to pop the last line of code from memory and
14783 re-evaluate,
14784 @item send the code you've entered off to a pastebin,
14785 @item save the code you've entered to a file, and
14786 @item auto-indentation.
14787 @end enumerate")
14788 (license license:expat)))
14789
14790 (define-public bpython2
14791 (let ((base (package-with-python2
14792 (strip-python2-variant bpython))))
14793 (package (inherit base)
14794 (name "bpython2")
14795 (arguments
14796 `(#:python ,python-2
14797 #:phases
14798 (modify-phases %standard-phases
14799 (add-after 'unpack 'remove-failing-test
14800 (lambda _
14801 ;; Remove failing test. FIXME: make it pass
14802 (delete-file "bpython/test/test_args.py")
14803 ;; Disable failing test-cases (renaming inhibits they are
14804 ;; discovered)
14805 (substitute* "bpython/test/test_curtsies_repl.py"
14806 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
14807 (string-append a "xxx_off_" b))
14808 (("^(\\s*def )(test_complex\\W)" _ a b)
14809 (string-append a "xxx_off_" b)))
14810 #t))
14811 (add-before 'build 'rename-scripts
14812 ;; rename the scripts to bypthon2, bpdb2, etc.
14813 (lambda _
14814 (substitute* "setup.py"
14815 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
14816 (string-append name "2" rest "\n"))
14817 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
14818 (string-append name "2" (or sub "") rest "\n")))
14819 #t))))))))
14820
14821 (define-public python-pyinotify
14822 (package
14823 (name "python-pyinotify")
14824 (version "0.9.6")
14825 (source (origin
14826 (method url-fetch)
14827 (uri (pypi-uri "pyinotify" version))
14828 (sha256
14829 (base32
14830 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
14831 (build-system python-build-system)
14832 (arguments `(#:tests? #f)) ;no tests
14833 (home-page "https://github.com/seb-m/pyinotify")
14834 (synopsis "Python library for monitoring inotify events")
14835 (description
14836 "@code{pyinotify} provides a Python interface for monitoring
14837 file system events on Linux.")
14838 (license license:expat)))
14839
14840 (define-public python2-pyinotify
14841 (package-with-python2 python-pyinotify))
14842
14843 ;; Ada parser uses this version.
14844 (define-public python2-quex-0.67.3
14845 (package
14846 (name "python2-quex")
14847 (version "0.67.3")
14848 (source
14849 (origin
14850 (method url-fetch)
14851 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
14852 (version-major+minor version)
14853 "/quex-" version ".zip"))
14854 (sha256
14855 (base32
14856 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
14857 (build-system python-build-system)
14858 (native-inputs
14859 `(("unzip" ,unzip)))
14860 (arguments
14861 `(#:python ,python-2
14862 #:tests? #f
14863 #:phases
14864 (modify-phases %standard-phases
14865 (delete 'configure)
14866 (delete 'build)
14867 (replace 'install
14868 (lambda* (#:key outputs #:allow-other-keys)
14869 (let* ((out (assoc-ref outputs "out"))
14870 (share/quex (string-append out "/share/quex"))
14871 (bin (string-append out "/bin")))
14872 (copy-recursively "." share/quex)
14873 (mkdir-p bin)
14874 (symlink (string-append share/quex "/quex-exe.py")
14875 (string-append bin "/quex"))
14876 #t))))))
14877 (native-search-paths
14878 (list (search-path-specification
14879 (variable "QUEX_PATH")
14880 (files '("share/quex")))))
14881 (home-page "http://quex.sourceforge.net/")
14882 (synopsis "Lexical analyzer generator in Python")
14883 (description "@code{quex} is a lexical analyzer generator in Python.")
14884 (license license:lgpl2.1+))) ; Non-military
14885
14886 (define-public python2-quex
14887 (package (inherit python2-quex-0.67.3)
14888 (name "python2-quex")
14889 (version "0.68.1")
14890 (source
14891 (origin
14892 (method url-fetch)
14893 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
14894 (sha256
14895 (base32
14896 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
14897 (file-name (string-append name "-" version ".tar.gz"))))))
14898
14899 (define-public python-more-itertools
14900 (package
14901 (name "python-more-itertools")
14902 (version "7.1.0")
14903 (source
14904 (origin
14905 (method url-fetch)
14906 (uri (pypi-uri "more-itertools" version))
14907 (sha256
14908 (base32
14909 "16phg2f2dvm6ci5wr49ncha5lmc0m2in3bsl33c61vzca4gkvd4b"))))
14910 (build-system python-build-system)
14911 (home-page "https://github.com/erikrose/more-itertools")
14912 (synopsis "More routines for operating on iterables, beyond itertools")
14913 (description "Python's built-in @code{itertools} module implements a
14914 number of iterator building blocks inspired by constructs from APL, Haskell,
14915 and SML. @code{more-itertools} includes additional building blocks for
14916 working with iterables.")
14917 (properties `((python2-variant . ,(delay python2-more-itertools))))
14918 (license license:expat)))
14919
14920 ;; The 5.x series are the last versions supporting Python 2.7.
14921 (define-public python2-more-itertools
14922 (package
14923 (inherit python-more-itertools)
14924 (name "python2-more-itertools")
14925 (version "5.0.0")
14926 (source (origin
14927 (method url-fetch)
14928 (uri (pypi-uri "more-itertools" version))
14929 (sha256
14930 (base32
14931 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
14932 (arguments
14933 `(#:python ,python2-minimal))
14934 (propagated-inputs
14935 `(("python2-six" ,python2-six-bootstrap)))))
14936
14937 (define-public python-latexcodec
14938 (package
14939 (name "python-latexcodec")
14940 (version "1.0.6")
14941 (source
14942 (origin
14943 (method url-fetch)
14944 (uri (pypi-uri "latexcodec" version))
14945 (sha256
14946 (base32 "0s4wdbg0w2l8pj3i0y4510i0s04p8nhxcsa2z41bjsv0k66npb81"))))
14947 (build-system python-build-system)
14948 (inputs
14949 `(("python-six" ,python-six)))
14950 (home-page "https://readthedocs.org/projects/latexcodec/")
14951 (synopsis "Work with LaTeX code in Python")
14952 (description "Lexer and codec to work with LaTeX code in Python.")
14953 (license license:expat)))
14954
14955 (define-public python-pybtex
14956 (package
14957 (name "python-pybtex")
14958 (version "0.22.2")
14959 (source
14960 (origin
14961 (method url-fetch)
14962 (uri (pypi-uri "pybtex" version))
14963 (sha256
14964 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
14965 (build-system python-build-system)
14966 (native-inputs
14967 `(("python-nose" ,python-nose)))
14968 (inputs
14969 `(("python-latexcodec" ,python-latexcodec)
14970 ("python-pyyaml" ,python-pyyaml)
14971 ("python-six" ,python-six)))
14972 (arguments
14973 `(#:test-target "nosetests"))
14974 (home-page "https://pybtex.org/")
14975 (synopsis "BibTeX-compatible bibliography processor")
14976 (description "Pybtex is a BibTeX-compatible bibliography processor written
14977 in Python. You can simply type pybtex instead of bibtex.")
14978 (license license:expat)))
14979
14980 (define-public python-onetimepass
14981 (package
14982 (name "python-onetimepass")
14983 (version "1.0.1")
14984 (source
14985 (origin
14986 (method url-fetch)
14987 (uri (pypi-uri "onetimepass" version))
14988 (sha256
14989 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
14990 (build-system python-build-system)
14991 (propagated-inputs `(("python-six" ,python-six)))
14992 (home-page "https://github.com/tadeck/onetimepass/")
14993 (synopsis "One-time password library")
14994 (description "Python one-time password library for HMAC-based (HOTP) and
14995 time-based (TOTP) passwords.")
14996 (license license:expat)))
14997
14998 (define-public python-parso
14999 (package
15000 (name "python-parso")
15001 (version "0.5.1")
15002 (source
15003 (origin
15004 (method url-fetch)
15005 (uri (pypi-uri "parso" version))
15006 (sha256
15007 (base32
15008 "171a9ivhxwsd52h1cgsz40zgzpgzscn7yqb7sdjhy8m1lzj0wsv6"))))
15009 (native-inputs
15010 `(("python-pytest" ,python-pytest)))
15011 (build-system python-build-system)
15012 (arguments
15013 `(#:phases (modify-phases %standard-phases
15014 (replace 'check
15015 (lambda _ (invoke "pytest" "-vv"))))))
15016 (home-page "https://github.com/davidhalter/parso")
15017 (synopsis "Python Parser")
15018 (description "Parso is a Python parser that supports error recovery and
15019 round-trip parsing for different Python versions (in multiple Python versions).
15020 Parso is also able to list multiple syntax errors in your Python file.")
15021 (license license:expat)))
15022
15023 (define-public python2-parso
15024 (package-with-python2 python-parso))
15025
15026 (define-public python-async-generator
15027 (package
15028 (name "python-async-generator")
15029 (version "1.10")
15030 (source
15031 (origin
15032 (method url-fetch)
15033 (uri (pypi-uri "async_generator" version))
15034 (sha256
15035 (base32
15036 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
15037 (build-system python-build-system)
15038 (native-inputs
15039 `(("python-pytest" ,python-pytest)))
15040 (home-page "https://github.com/python-trio/async_generator")
15041 (synopsis "Async generators and context managers for Python 3.5+")
15042 (description "@code{async_generator} back-ports Python 3.6's native async
15043 generators and Python 3.7's context managers into Python 3.5.")
15044 ;; Dual licensed.
15045 (license (list license:expat license:asl2.0))))
15046
15047 (define-public python-async-timeout
15048 (package
15049 (name "python-async-timeout")
15050 (version "3.0.1")
15051 (source
15052 (origin
15053 (method url-fetch)
15054 (uri (pypi-uri "async-timeout" version))
15055 (sha256
15056 (base32
15057 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
15058 (build-system python-build-system)
15059 (home-page "https://github.com/aio-libs/async_timeout/")
15060 (synopsis "Timeout context manager for asyncio programs")
15061 (description "@code{async-timeout} provides a timeout timeout context
15062 manager compatible with @code{asyncio}.")
15063 (license license:asl2.0)))
15064
15065 (define-public python-glob2
15066 (package
15067 (name "python-glob2")
15068 (version "0.6")
15069 (source
15070 (origin
15071 (method git-fetch)
15072 (uri (git-reference
15073 (url "https://github.com/miracle2k/python-glob2.git")
15074 (commit version)))
15075 (file-name (git-file-name name version))
15076 (sha256
15077 (base32 "1lm1xz3k3l0k1c5bcp9hlzmi3gp5j8dl1k3xhpiq5mnm0xq6n163"))))
15078 (build-system python-build-system)
15079 (home-page "https://github.com/miracle2k/python-glob2/")
15080 (synopsis "Extended Version of the python buildin glob module")
15081 (description "This is an extended version of the Python
15082 @url{http://docs.python.org/library/glob.html, built-in glob module} which
15083 adds:
15084
15085 @itemize
15086 @item The ability to capture the text matched by glob patterns, and return
15087 those matches alongside the file names.
15088 @item A recursive @code{**} globbing syntax, akin for example to the
15089 @code{globstar} option of Bash.
15090 @item The ability to replace the file system functions used, in order to glob
15091 on virtual file systems.
15092 @item Compatible with Python 2 and Python 3 (tested with 3.3).
15093 @end itemize
15094
15095 Glob2 currently based on the glob code from Python 3.3.1.")
15096 (license license:bsd-2)))
15097
15098 (define-public python2-glob2
15099 (package-with-python2 python-glob2))
15100
15101 (define-public python-gipc
15102 (package
15103 (name "python-gipc")
15104 (version "0.6.0")
15105 (source
15106 (origin
15107 (method url-fetch)
15108 (uri (pypi-uri "gipc" version ".zip"))
15109 (sha256
15110 (base32
15111 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
15112 (build-system python-build-system)
15113 (native-inputs
15114 `(("unzip" ,unzip)))
15115 (propagated-inputs
15116 `(("python-gevent" ,python-gevent)))
15117 (home-page "http://gehrcke.de/gipc")
15118 (synopsis "Child process management in the context of gevent")
15119 (description "Usage of Python's multiprocessing package in a
15120 gevent-powered application may raise problems. With @code{gipc},
15121 process-based child processes can safely be created anywhere within a
15122 gevent-powered application.")
15123 (license license:expat)))
15124
15125 (define-public python2-gipc
15126 (package-with-python2 python-gipc))
15127
15128 (define-public python-fusepy
15129 (package
15130 (name "python-fusepy")
15131 (version "2.0.4")
15132 (source
15133 (origin
15134 (method url-fetch)
15135 (uri (pypi-uri "fusepy" version))
15136 (sha256
15137 (base32
15138 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
15139 (build-system python-build-system)
15140 (arguments
15141 `(#:phases
15142 (modify-phases %standard-phases
15143 (add-before 'build 'set-library-file-name
15144 (lambda* (#:key inputs #:allow-other-keys)
15145 (let ((fuse (assoc-ref inputs "fuse")))
15146 (substitute* "fuse.py"
15147 (("find_library\\('fuse'\\)")
15148 (string-append "'" fuse "/lib/libfuse.so'")))
15149 #t))))))
15150 (propagated-inputs
15151 `(("fuse" ,fuse)))
15152 (home-page "https://github.com/fusepy/fusepy")
15153 (synopsis "Simple ctypes bindings for FUSE")
15154 (description "Python module that provides a simple interface to FUSE and
15155 MacFUSE. The binding is created using the standard @code{ctypes} library.")
15156 (license license:isc)))
15157
15158 (define-public python2-fusepy
15159 (package-with-python2 python-fusepy))
15160
15161 (define-public python2-gdrivefs
15162 (package
15163 (name "python2-gdrivefs")
15164 (version "0.14.9")
15165 (source
15166 (origin
15167 (method url-fetch)
15168 (uri (pypi-uri "gdrivefs" version))
15169 (sha256
15170 (base32
15171 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
15172 (build-system python-build-system)
15173 (arguments
15174 `(#:python ,python-2
15175 #:phases
15176 (modify-phases %standard-phases
15177 (add-before 'build 'patch-setup-py
15178 (lambda _
15179 ;; Update requirements from dependency==version
15180 ;; to dependency>=version
15181 (substitute* "gdrivefs/resources/requirements.txt"
15182 (("==") ">="))
15183 #t)))))
15184 (native-inputs
15185 `(("python2-gipc" ,python2-gipc)
15186 ("python2-gevent" ,python2-gevent)
15187 ("python2-greenlet" ,python2-greenlet)
15188 ("python2-httplib2" ,python2-httplib2)
15189 ("python2-uritemplate" ,python2-uritemplate)
15190 ("python2-oauth2client" ,python2-oauth2client)
15191 ("python2-six" ,python2-six)))
15192 (propagated-inputs
15193 `(("python2-dateutil" ,python2-dateutil)
15194 ("python2-fusepy" ,python2-fusepy)
15195 ("python2-google-api-client" ,python2-google-api-client)))
15196 (home-page "https://github.com/dsoprea/GDriveFS")
15197 (synopsis "Mount Google Drive as a local file system")
15198 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
15199 under Python 2.7.")
15200 (license license:gpl2)))
15201
15202 (define-public pybind11
15203 (package
15204 (name "pybind11")
15205 (version "2.3.0")
15206 (source (origin
15207 (method git-fetch)
15208 (uri (git-reference
15209 (url "https://github.com/pybind/pybind11.git")
15210 (commit (string-append "v" version))))
15211 (sha256
15212 (base32
15213 "11b6dniri8m05spfd2a19irz82shf4sdca73566bniggrf3zclnf"))
15214 (file-name (git-file-name name version))))
15215 (build-system cmake-build-system)
15216 (native-inputs
15217 `(("python" ,python)
15218 ("python-pytest" ,python-pytest)))
15219 (arguments
15220 `(#:test-target "check"))
15221 (home-page "https://github.com/pybind/pybind11/")
15222 (synopsis "Seamless operability between C++11 and Python")
15223 (description "pybind11 is a lightweight header-only library that exposes
15224 C++ types in Python and vice versa, mainly to create Python bindings of
15225 existing C++ code. Its goals and syntax are similar to the excellent
15226 Boost.Python library by David Abrahams: to minimize boilerplate code in
15227 traditional extension modules by inferring type information using compile-time
15228 introspection.")
15229 (license license:expat)))
15230
15231 (define-public python-fasteners
15232 (package
15233 (name "python-fasteners")
15234 (version "0.14.1")
15235 (source
15236 (origin
15237 (method url-fetch)
15238 (uri (pypi-uri "fasteners" version))
15239 (sha256
15240 (base32
15241 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
15242 (build-system python-build-system)
15243 (propagated-inputs
15244 `(("python-monotonic" ,python-monotonic)
15245 ("python-six" ,python-six)
15246 ("python-testtools" ,python-testtools)))
15247 (home-page "https://github.com/harlowja/fasteners")
15248 (synopsis "Python package that provides useful locks")
15249 (description
15250 "This package provides a Python program that provides following locks:
15251
15252 @itemize
15253 @item Locking decorator
15254 @item Reader-writer locks
15255 @item Inter-process locks
15256 @item Generic helpers
15257 @end itemize\n")
15258 (properties `((python2-variant . ,(delay python2-fasteners))))
15259 (license license:asl2.0)))
15260
15261 (define-public python2-fasteners
15262 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
15263 (package
15264 (inherit base)
15265 (propagated-inputs
15266 `(("python2-futures" ,python2-futures)
15267 ,@(package-propagated-inputs base))))))
15268
15269 (define-public python-requests-file
15270 (package
15271 (name "python-requests-file")
15272 (version "1.4.3")
15273 (source
15274 (origin
15275 (method url-fetch)
15276 (uri (pypi-uri "requests-file" version))
15277 (sha256
15278 (base32
15279 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
15280 (build-system python-build-system)
15281 (propagated-inputs
15282 `(("python-requests" ,python-requests)
15283 ("python-six" ,python-six)))
15284 (home-page
15285 "https://github.com/dashea/requests-file")
15286 (synopsis "File transport adapter for Requests")
15287 (description
15288 "Requests-File is a transport adapter for use with the Requests Python
15289 library to allow local file system access via @code{file://} URLs.")
15290 (license license:asl2.0)))
15291
15292 (define-public python2-requests-file
15293 (package-with-python2 python-requests-file))
15294
15295 (define-public python-tldextract
15296 (package
15297 (name "python-tldextract")
15298 (version "2.2.0")
15299 (source
15300 (origin
15301 (method url-fetch)
15302 (uri (pypi-uri "tldextract" version))
15303 (sha256
15304 (base32
15305 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
15306 (build-system python-build-system)
15307 (native-inputs
15308 `(("python-pytest" ,python-pytest)
15309 ("python-responses" ,python-responses)))
15310 (propagated-inputs
15311 `(("python-idna" ,python-idna)
15312 ("python-requests" ,python-requests)
15313 ("python-requests-file" ,python-requests-file)))
15314 (home-page
15315 "https://github.com/john-kurkowski/tldextract")
15316 (synopsis
15317 "Separate the TLD from the registered domain and subdomains of a URL")
15318 (description
15319 "TLDExtract accurately separates the TLD from the registered domain and
15320 subdomains of a URL, using the Public Suffix List. By default, this includes
15321 the public ICANN TLDs and their exceptions. It can optionally support the
15322 Public Suffix List's private domains as well.")
15323 (license license:bsd-3)))
15324
15325 (define-public python2-tldextract
15326 (package-with-python2 python-tldextract))
15327
15328 (define-public python-pynamecheap
15329 (package
15330 (name "python-pynamecheap")
15331 (version "0.0.3")
15332 (source
15333 (origin
15334 (method url-fetch)
15335 (uri (pypi-uri "PyNamecheap" version))
15336 (sha256
15337 (base32
15338 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
15339 (build-system python-build-system)
15340 (propagated-inputs
15341 `(("python-requests" ,python-requests)))
15342 (home-page
15343 "https://github.com/Bemmu/PyNamecheap")
15344 (synopsis
15345 "Namecheap API client in Python")
15346 (description
15347 "PyNamecheap is a Namecheap API client in Python.")
15348 (license license:expat)))
15349
15350 (define-public python2-pynamecheap
15351 (package-with-python2 python-pynamecheap))
15352
15353 (define-public python-dns-lexicon
15354 (package
15355 (name "python-dns-lexicon")
15356 (version "2.4.0")
15357 (source
15358 (origin
15359 (method url-fetch)
15360 (uri (pypi-uri "dns-lexicon" version))
15361 (sha256
15362 (base32
15363 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
15364 (build-system python-build-system)
15365 (arguments
15366 `(#:tests? #f)) ;requires internet access
15367 (propagated-inputs
15368 `(("python-future" ,python-future)
15369 ("python-pynamecheap" ,python-pynamecheap)
15370 ("python-requests" ,python-requests)
15371 ("python-tldextract" ,python-tldextract)
15372 ("python-urllib3" ,python-urllib3)))
15373 (home-page "https://github.com/AnalogJ/lexicon")
15374 (synopsis
15375 "Manipulate DNS records on various DNS providers")
15376 (description
15377 "Lexicon provides a way to manipulate DNS records on multiple DNS
15378 providers in a standardized way. It has a CLI but it can also be used as a
15379 Python library. It was designed to be used in automation, specifically with
15380 Let's Encrypt.")
15381 (license license:expat)))
15382
15383 (define-public python2-dns-lexicon
15384 (package-with-python2 python-dns-lexicon))
15385
15386 (define-public python-commandlines
15387 (package
15388 (name "python-commandlines")
15389 (version "0.4.1")
15390 (source
15391 (origin
15392 (method url-fetch)
15393 (uri (pypi-uri "commandlines" version))
15394 (sha256
15395 (base32
15396 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
15397 (build-system python-build-system)
15398 (home-page "https://github.com/chrissimpkins/commandlines")
15399 (synopsis "Command line argument to object parsing library")
15400 (description
15401 "@code{Commandlines} is a Python library for command line application
15402 development that supports command line argument parsing, command string
15403 validation testing and application logic.")
15404 (license license:expat)))
15405
15406 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
15407 ;; python-numba. They have a very unflexible relationship.
15408 (define-public python-numba
15409 (package
15410 (name "python-numba")
15411 (version "0.42.0")
15412 (source
15413 (origin
15414 (method url-fetch)
15415 (uri (pypi-uri "numba" version))
15416 (sha256
15417 (base32
15418 "03rqdfx0512lcri2bcpngx5k3jwfbqnanqj3n19c7d6h6hqxvq9x"))))
15419 (build-system python-build-system)
15420 (arguments
15421 `(#:modules ((guix build utils)
15422 (guix build python-build-system)
15423 (ice-9 ftw)
15424 (srfi srfi-1)
15425 (srfi srfi-26))
15426 #:phases
15427 (modify-phases %standard-phases
15428 (add-after 'unpack 'disable-proprietary-features
15429 (lambda _
15430 (setenv "NUMBA_DISABLE_HSA" "1")
15431 (setenv "NUMBA_DISABLE_CUDA" "1")
15432 #t))
15433 (add-after 'unpack 'remove-failing-tests
15434 (lambda _
15435 ;; FIXME: these tests fail for unknown reasons:
15436 ;; test_non_writable_pycache, test_non_creatable_pycache, and
15437 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
15438 (substitute* "numba/tests/test_dispatcher.py"
15439 (("def test(_non_writable_pycache)" _ m)
15440 (string-append "def guix_skip" m))
15441 (("def test(_non_creatable_pycache)" _ m)
15442 (string-append "def guix_skip" m))
15443 (("def test(_frozen)" _ m)
15444 (string-append "def guix_skip" m)))
15445
15446 ;; These tests fail because we don't run the tests from the build
15447 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
15448 ;; They ar in numba.tests.test_pycc.TestDistutilsSupport.
15449 (substitute* "numba/tests/test_pycc.py"
15450 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
15451 (string-append "def guix_skip" m)))
15452 #t))
15453 (replace 'check
15454 (lambda _
15455 (let ((cwd (getcwd)))
15456 (setenv "PYTHONPATH"
15457 (string-append cwd "/build/"
15458 (find (cut string-prefix? "lib" <>)
15459 (scandir (string-append cwd "/build")))
15460 ":"
15461 (getenv "PYTHONPATH")))
15462 ;; Something is wrong with the PYTHONPATH when running the
15463 ;; tests from the build directory, as it complains about not being
15464 ;; able to import certain modules.
15465 (with-directory-excursion "/tmp"
15466 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
15467 #t)))))
15468 (propagated-inputs
15469 `(("python-llvmlite" ,python-llvmlite)
15470 ("python-numpy" ,python-numpy)
15471 ("python-singledispatch" ,python-singledispatch)))
15472 ;; Needed for tests.
15473 (inputs
15474 `(("python-jinja2" ,python-jinja2)
15475 ("python-pygments" ,python-pygments)))
15476 (home-page "https://numba.pydata.org")
15477 (synopsis "Compile Python code using LLVM")
15478 (description "Numba gives you the power to speed up your applications with
15479 high performance functions written directly in Python. With a few
15480 annotations, array-oriented and math-heavy Python code can be just-in-time
15481 compiled to native machine instructions, similar in performance to C, C++ and
15482 Fortran, without having to switch languages or Python interpreters.
15483
15484 Numba works by generating optimized machine code using the LLVM compiler
15485 infrastructure at import time, runtime, or statically (using the included pycc
15486 tool).")
15487 (license license:bsd-3)))
15488
15489 (define-public python-anndata
15490 (package
15491 (name "python-anndata")
15492 (version "0.6.18")
15493 (source
15494 (origin
15495 (method url-fetch)
15496 (uri (pypi-uri "anndata" version))
15497 (sha256
15498 (base32
15499 "03x83yjaccbqszj7x4fwwmpil0ai59yx64d1zmf2691za3j03w73"))))
15500 (build-system python-build-system)
15501 (propagated-inputs
15502 `(("python-h5py" ,python-h5py)
15503 ("python-natsort" ,python-natsort)
15504 ("python-pandas" ,python-pandas)
15505 ("python-scipy" ,python-scipy)))
15506 (home-page "https://github.com/theislab/anndata")
15507 (synopsis "Annotated data for data analysis pipelines")
15508 (description "Anndata is a package for simple (functional) high-level APIs
15509 for data analysis pipelines. In this context, it provides an efficient,
15510 scalable way of keeping track of data together with learned annotations and
15511 reduces the code overhead typically encountered when using a mostly
15512 object-oriented library such as @code{scikit-learn}.")
15513 (license license:bsd-3)))
15514
15515 (define-public python-dill
15516 (package
15517 (name "python-dill")
15518 (version "0.2.9")
15519 (source
15520 (origin
15521 (method url-fetch)
15522 (uri (pypi-uri "dill" version))
15523 (sha256
15524 (base32 "0vwqyi6hyz2r29zydc78dqymkbc5y7gia16xcdh215cikxph9mpn"))))
15525 (build-system python-build-system)
15526 ;; FIXME: The check phase fails with "don't know how to make test from: …".
15527 (arguments '(#:tests? #f))
15528 (home-page "https://pypi.org/project/dill")
15529 (synopsis "Serialize all of Python")
15530 (description "Dill extends Python's @code{pickle} module for serializing
15531 and de-serializing Python objects to the majority of the built-in Python
15532 types. Dill provides the user the same interface as the @code{pickle} module,
15533 and also includes some additional features. In addition to pickling Python
15534 objects, @code{dill} provides the ability to save the state of an interpreter
15535 session in a single command. Hence, it would be feasible to save a
15536 interpreter session, close the interpreter, ship the pickled file to another
15537 computer, open a new interpreter, unpickle the session and thus continue from
15538 the saved state of the original interpreter session.")
15539 (license license:bsd-3)))
15540
15541 (define-public python-multiprocess
15542 (package
15543 (name "python-multiprocess")
15544 (version "0.70.6.1")
15545 (source
15546 (origin
15547 (method url-fetch)
15548 (uri (pypi-uri "multiprocess" version))
15549 (sha256
15550 (base32
15551 "1ip5caz67b3q0553mr8gm8xwsb8x500jn8ml0gihgyfy52m2ypcq"))))
15552 (build-system python-build-system)
15553 (propagated-inputs
15554 `(("python-dill" ,python-dill)))
15555 (home-page "https://pypi.org/project/multiprocess")
15556 (synopsis "Multiprocessing and multithreading in Python")
15557 (description
15558 "This package is a fork of the multiprocessing Python package, a package
15559 which supports the spawning of processes using the API of the standard
15560 library's @code{threading} module.")
15561 (license license:bsd-3)))
15562
15563 (define-public python-toolz
15564 (package
15565 (name "python-toolz")
15566 (version "0.9.0")
15567 (source
15568 (origin
15569 (method url-fetch)
15570 (uri (pypi-uri "toolz" version))
15571 (sha256
15572 (base32
15573 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
15574 (build-system python-build-system)
15575 ;; FIXME: tests cannot be computed: "Can't perform this operation for
15576 ;; unregistered loader type"
15577 (arguments '(#:tests? #f))
15578 (home-page "https://github.com/pytoolz/toolz/")
15579 (synopsis "List processing tools and functional utilities")
15580 (description
15581 "This package provides a set of utility functions for iterators,
15582 functions, and dictionaries.")
15583 (license license:bsd-3)))
15584
15585 (define-public python2-toolz
15586 (package-with-python2 python-toolz))
15587
15588 (define-public python-cytoolz
15589 (package
15590 (name "python-cytoolz")
15591 (version "0.9.0.1")
15592 (source
15593 (origin
15594 (method url-fetch)
15595 (uri (pypi-uri "cytoolz" version))
15596 (sha256
15597 (base32
15598 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
15599 (build-system python-build-system)
15600 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
15601 ;; 'exceptions'"
15602 (arguments '(#:tests? #f))
15603 (propagated-inputs
15604 `(("python-toolz" ,python-toolz)))
15605 (native-inputs
15606 `(("python-cython" ,python-cython)))
15607 (home-page "https://github.com/pytoolz/cytoolz")
15608 (synopsis "High performance functional utilities")
15609 (description
15610 "The cytoolz package implements the same API as provided by toolz. The
15611 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
15612 that is accessible to other projects developed in Cython.")
15613 (license license:bsd-3)))
15614
15615 (define-public python-sortedcontainers
15616 (package
15617 (name "python-sortedcontainers")
15618 (version "2.0.4")
15619 (source
15620 (origin
15621 (method url-fetch)
15622 (uri (pypi-uri "sortedcontainers" version))
15623 (sha256
15624 (base32
15625 "10hrk2k0hbf9x78vd3f0lj277m1yzfhzzxr0hja718liwb398wk0"))))
15626 (build-system python-build-system)
15627 (native-inputs
15628 `(("python-tox" ,python-tox)))
15629 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
15630 (synopsis "Sorted List, Sorted Dict, Sorted Set")
15631 (description
15632 "This package provides a sorted collections library, written in
15633 pure-Python.")
15634 (license license:asl2.0)))
15635
15636 (define-public python-cloudpickle
15637 (package
15638 (name "python-cloudpickle")
15639 (version "0.6.1")
15640 (source
15641 (origin
15642 (method url-fetch)
15643 (uri (pypi-uri "cloudpickle" version))
15644 (sha256
15645 (base32
15646 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
15647 (build-system python-build-system)
15648 ;; FIXME: there are 5 errors in 122 tests:
15649 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
15650 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
15651 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15652 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15653 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
15654 ;; TypeError: cannot serialize '_io.BufferedRandom' object
15655 (arguments '(#:tests? #f))
15656 (native-inputs
15657 `(("python-pytest" ,python-pytest)
15658 ("python-mock" ,python-mock)
15659 ("python-tornado" ,python-tornado)))
15660 (home-page "https://github.com/cloudpipe/cloudpickle")
15661 (synopsis "Extended pickling support for Python objects")
15662 (description
15663 "Cloudpickle makes it possible to serialize Python constructs not
15664 supported by the default pickle module from the Python standard library. It
15665 is especially useful for cluster computing where Python expressions are
15666 shipped over the network to execute on remote hosts, possibly close to the
15667 data.")
15668 (license license:bsd-3)))
15669
15670 (define-public python2-cloudpickle
15671 (package-with-python2 python-cloudpickle))
15672
15673 (define-public python-locket
15674 (package
15675 (name "python-locket")
15676 (version "0.2.0")
15677 (source
15678 (origin
15679 (method url-fetch)
15680 (uri (pypi-uri "locket" version))
15681 (sha256
15682 (base32
15683 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
15684 (build-system python-build-system)
15685 (home-page "https://github.com/mwilliamson/locket.py")
15686 (synopsis "File-based locks for Python")
15687 (description
15688 "Locket implements a lock that can be used by multiple processes provided
15689 they use the same path.")
15690 (license license:bsd-2)))
15691
15692 (define-public python2-locket
15693 (package-with-python2 python-locket))
15694
15695 (define-public python-blosc
15696 (package
15697 (name "python-blosc")
15698 (version "1.5.1")
15699 (source
15700 (origin
15701 (method url-fetch)
15702 (uri (pypi-uri "blosc" version))
15703 (sha256
15704 (base32
15705 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
15706 (build-system python-build-system)
15707 ;; FIXME: all tests pass, but then this error is printed:
15708 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
15709 (arguments '(#:tests? #f))
15710 (propagated-inputs
15711 `(("python-numpy" ,python-numpy)))
15712 (home-page "https://github.com/blosc/python-blosc")
15713 (synopsis "Python wrapper for the Blosc data compressor library")
15714 (description "Blosc is a high performance compressor optimized for binary
15715 data. It has been designed to transmit data to the processor cache faster
15716 than the traditional, non-compressed, direct memory fetch approach via a
15717 @code{memcpy()} system call.
15718
15719 Blosc works well for compressing numerical arrays that contains data with
15720 relatively low entropy, like sparse data, time series, grids with
15721 regular-spaced values, etc.
15722
15723 This Python package wraps the Blosc library.")
15724 (license license:bsd-3)))
15725
15726 (define-public python2-blosc
15727 (package-with-python2 python-blosc))
15728
15729 (define-public python-partd
15730 (package
15731 (name "python-partd")
15732 (version "0.3.9")
15733 (source
15734 (origin
15735 (method url-fetch)
15736 (uri (pypi-uri "partd" version))
15737 (sha256
15738 (base32
15739 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
15740 (build-system python-build-system)
15741 (propagated-inputs
15742 `(("python-blosc" ,python-blosc)
15743 ("python-locket" ,python-locket)
15744 ("python-numpy" ,python-numpy)
15745 ("python-pandas" ,python-pandas)
15746 ("python-pyzmq" ,python-pyzmq)
15747 ("python-toolz" ,python-toolz)))
15748 (home-page "https://github.com/dask/partd/")
15749 (synopsis "Appendable key-value storage")
15750 (description "Partd stores key-value pairs. Values are raw bytes. We
15751 append on old values. Partd excels at shuffling operations.")
15752 (license license:bsd-3)))
15753
15754 (define-public python2-partd
15755 (package-with-python2 python-partd))
15756
15757 (define-public python-dask
15758 (package
15759 (name "python-dask")
15760 (version "1.2.2")
15761 (source
15762 (origin
15763 (method url-fetch)
15764 (uri (pypi-uri "dask" version))
15765 (sha256
15766 (base32 "0b29gvf96gmp20wicly3v3mhyc93zbm3mdv935fka6x0wax7cy2y"))))
15767 (build-system python-build-system)
15768 ;; A single test out of 5000+ fails. This test is marked as xfail when
15769 ;; pytest-xdist is used.
15770 (arguments
15771 `(#:phases
15772 (modify-phases %standard-phases
15773 (add-after 'unpack 'disable-broken-test
15774 (lambda _
15775 (substitute* "dask/tests/test_threaded.py"
15776 (("def test_interrupt\\(\\)" m)
15777 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15778 m)))
15779 (when (which "python2")
15780 ;; This test fails with recent Pandas:
15781 ;; <https://github.com/dask/dask/issues/3794>.
15782 (substitute* "dask/dataframe/tests/test_dataframe.py"
15783 (("def test_info\\(\\)" m)
15784 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15785 m))))
15786 #t))
15787 (replace 'check
15788 (lambda _ (invoke "pytest" "-vv"))))))
15789 (propagated-inputs
15790 `(("python-cloudpickle" ,python-cloudpickle)
15791 ("python-numpy" ,python-numpy)
15792 ("python-pandas" ,python-pandas)
15793 ("python-partd" ,python-partd)
15794 ("python-toolz" ,python-toolz)
15795 ("python-pyyaml" ,python-pyyaml)))
15796 (native-inputs
15797 `(("python-pytest" ,python-pytest)
15798 ("python-pytest-runner" ,python-pytest-runner)))
15799 (home-page "https://github.com/dask/dask/")
15800 (synopsis "Parallel computing with task scheduling")
15801 (description
15802 "Dask is a flexible parallel computing library for analytics. It
15803 consists of two components: dynamic task scheduling optimized for computation,
15804 and large data collections like parallel arrays, dataframes, and lists that
15805 extend common interfaces like NumPy, Pandas, or Python iterators to
15806 larger-than-memory or distributed environments. These parallel collections
15807 run on top of the dynamic task schedulers. ")
15808 (license license:bsd-3)))
15809
15810 (define-public python2-dask
15811 (package-with-python2 python-dask))
15812
15813 (define-public python-ilinkedlist
15814 (package
15815 (name "python-ilinkedlist")
15816 (version "0.4.0")
15817 (source
15818 (origin
15819 (method url-fetch)
15820 (uri (pypi-uri "ilinkedlist" version))
15821 (sha256
15822 (base32
15823 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
15824 (build-system python-build-system)
15825 (native-inputs `(("python-pytest" ,python-pytest)))
15826 (inputs `(("python" ,python)))
15827 (home-page "https://github.com/luther9/ilinkedlist-py")
15828 (synopsis "Immutable linked list library")
15829 (description
15830 "This is a implementation of immutable linked lists for Python. It
15831 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
15832 Since a linked list is treated as immutable, it is hashable, and its length
15833 can be retrieved in constant time. Some of the terminology is inspired by
15834 LISP. It is possible to create an improper list by creating a @code{Pair}
15835 with a non-list @code{cdr}.")
15836 (license license:gpl3+)))
15837
15838 (define-public python-readlike
15839 (package
15840 (name "python-readlike")
15841 (version "0.1.3")
15842 (source
15843 (origin
15844 (method url-fetch)
15845 (uri (pypi-uri "readlike" version))
15846 (sha256
15847 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
15848 (build-system python-build-system)
15849 (home-page "https://github.com/jangler/readlike")
15850 (synopsis "GNU Readline-like line editing module")
15851 (description
15852 "This Python module provides line editing functions similar to the default
15853 Emacs-style ones of GNU Readline. Unlike the Python standard library's
15854 @code{readline} package, this one allows access to those capabilties in settings
15855 outside of a standard command-line interface. It is especially well-suited to
15856 interfacing with Urwid, due to a shared syntax for describing key inputs.
15857
15858 Currently, all stateless Readline commands are implemented. Yanking and history
15859 are not supported.")
15860 (license license:expat)))
15861
15862 (define-public python2-readlike
15863 (package-with-python2 python-readlike))
15864
15865 (define-public python-reparser
15866 (package
15867 (name "python-reparser")
15868 (version "1.4.3")
15869 (source
15870 (origin
15871 (method url-fetch)
15872 (uri (pypi-uri "ReParser" version))
15873 (sha256
15874 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
15875 (build-system python-build-system)
15876 (home-page "https://github.com/xmikos/reparser")
15877 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
15878 (description
15879 "This Python library provides a simple lexer/parser for inline markup based
15880 on regular expressions.")
15881 (license license:expat)))
15882
15883 (define-public python2-reparser
15884 (let ((reparser (package-with-python2
15885 (strip-python2-variant python-reparser))))
15886 (package (inherit reparser)
15887 (propagated-inputs
15888 `(("python2-enum34" ,python2-enum34)
15889 ,@(package-propagated-inputs reparser))))))
15890
15891 (define-public python-precis-i18n
15892 (package
15893 (name "python-precis-i18n")
15894 (version "1.0.0")
15895 (source
15896 (origin
15897 (method url-fetch)
15898 (uri (pypi-uri "precis_i18n" version))
15899 (sha256
15900 (base32
15901 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
15902 (build-system python-build-system)
15903 (home-page "https://github.com/byllyfish/precis_i18n")
15904 (synopsis "Implementation of the PRECIS framework")
15905 (description
15906 "This module implements the PRECIS Framework as described in RFC 8264,
15907 RFC 8265 and RFC 8266.")
15908 (license license:expat)))
15909
15910 (define-public python-absl-py
15911 (package
15912 (name "python-absl-py")
15913 (version "0.6.1")
15914 (source
15915 (origin
15916 (method url-fetch)
15917 (uri (pypi-uri "absl-py" version))
15918 (sha256
15919 (base32
15920 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
15921 (build-system python-build-system)
15922 (propagated-inputs
15923 `(("python-six" ,python-six)))
15924 (home-page "https://github.com/abseil/abseil-py")
15925 (synopsis "Abseil Python common libraries")
15926 (description
15927 "This package provides the Abseil Python Common Libraries, a collection
15928 of Python libraries for building Python applications.")
15929 (license license:asl2.0)))
15930
15931 (define-public python-astor
15932 (package
15933 (name "python-astor")
15934 (version "0.7.1")
15935 (source
15936 (origin
15937 (method url-fetch)
15938 (uri (pypi-uri "astor" version))
15939 (sha256
15940 (base32
15941 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
15942 (build-system python-build-system)
15943 ;; FIXME: There are two errors and two test failures.
15944 (arguments `(#:tests? #f))
15945 (home-page "https://github.com/berkerpeksag/astor")
15946 (synopsis "Read and write Python ASTs")
15947 (description "Astor is designed to allow easy manipulation of Python
15948 source via the Abstract Syntax Tree.")
15949 (license license:bsd-3)))
15950
15951 (define-public python2-astor
15952 (package-with-python2 python-astor))
15953
15954 (define-public python-grpcio
15955 (package
15956 (name "python-grpcio")
15957 (version "1.17.1")
15958 (source
15959 (origin
15960 (method url-fetch)
15961 (uri (pypi-uri "grpcio" version))
15962 (sha256
15963 (base32
15964 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
15965 (build-system python-build-system)
15966 (propagated-inputs
15967 `(("python-six" ,python-six)))
15968 (home-page "https://grpc.io")
15969 (synopsis "HTTP/2-based RPC framework")
15970 (description "This package provides a Python library for communicating
15971 with the HTTP/2-based RPC framework gRPC.")
15972 (license license:asl2.0)))
15973
15974 (define-public python-astunparse
15975 (package
15976 (name "python-astunparse")
15977 (version "1.6.2")
15978 (source
15979 (origin
15980 (method url-fetch)
15981 (uri (pypi-uri "astunparse" version))
15982 (sha256
15983 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
15984 (build-system python-build-system)
15985 (arguments '(#:tests? #f)) ; there are none
15986 (propagated-inputs
15987 `(("python-six" ,python-six)
15988 ("python-wheel" ,python-wheel)))
15989 (home-page "https://github.com/simonpercivall/astunparse")
15990 (synopsis "AST unparser for Python")
15991 (description "This package provides an AST unparser for Python. It is a
15992 factored out version of @code{unparse} found in the Python source
15993 distribution.")
15994 (license license:bsd-3)))
15995
15996 (define-public python-gast
15997 (package
15998 (name "python-gast")
15999 (version "0.2.2")
16000 (source
16001 (origin
16002 (method url-fetch)
16003 (uri (pypi-uri "gast" version))
16004 (sha256
16005 (base32 "1w5dzdb3gpcfmd2s0b93d8gff40a1s41rv31458z14inb3s9v4zy"))))
16006 (build-system python-build-system)
16007 (propagated-inputs
16008 `(("python-astunparse" ,python-astunparse)))
16009 (home-page "https://pypi.org/project/gast/")
16010 (synopsis "Generic Python AST that abstracts the underlying Python version")
16011 (description
16012 "GAST provides a compatibility layer between the AST of various Python
16013 versions, as produced by @code{ast.parse} from the standard @code{ast}
16014 module.")
16015 (license license:bsd-3)))
16016
16017 (define-public python-wikidata
16018 (package
16019 (name "python-wikidata")
16020 (version "0.6.1")
16021 (source
16022 (origin
16023 (method url-fetch)
16024 (uri (pypi-uri "Wikidata" version))
16025 (sha256
16026 (base32
16027 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
16028 (build-system python-build-system)
16029 (propagated-inputs
16030 `(("python-babel" ,python-babel)))
16031 (home-page "https://github.com/dahlia/wikidata")
16032 (synopsis "Wikidata client library")
16033 (description
16034 "This package provides a Python interface to
16035 @url{https://www.wikidata.org/, Wikidata}.")
16036 (properties '((upstream-name . "Wikidata")))
16037 (license license:gpl3+)))
16038
16039 (define-public python-doctest-ignore-unicode
16040 (package
16041 (name "python-doctest-ignore-unicode")
16042 (version "0.1.2")
16043 (source
16044 (origin
16045 (method url-fetch)
16046 (uri (pypi-uri "doctest-ignore-unicode" version))
16047 (sha256
16048 (base32
16049 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
16050 (build-system python-build-system)
16051 (native-inputs
16052 `(("python-nose" ,python-nose)))
16053 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
16054 (synopsis "Ignore Unicode literal prefixes in doctests")
16055 (description
16056 "This package adds support for a flag to ignore Unicode literal prefixes
16057 in doctests.")
16058 (license license:asl2.0)))
16059
16060 (define-public python-attr
16061 (package
16062 (name "python-attr")
16063 (version "0.3.1")
16064 (source
16065 (origin
16066 (method url-fetch)
16067 (uri (pypi-uri "attr" version))
16068 (sha256
16069 (base32
16070 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
16071 (build-system python-build-system)
16072 (home-page "https://github.com/denis-ryzhkov/attr")
16073 (synopsis "Decorator for attributes of target function or class")
16074 (description "Simple decorator to set attributes of target function or
16075 class in a @acronym{DRY, Don't Repeat Yourself} way.")
16076 (license license:expat)))
16077
16078 (define-public python-construct
16079 (package
16080 (name "python-construct")
16081 (version "2.9.45")
16082 (source
16083 (origin
16084 (method url-fetch)
16085 (uri (pypi-uri "construct" version))
16086 (sha256
16087 (base32
16088 "130iy05awzigm2xah2yvlmb08mac5bi4gzr5m3g7k1krs3ps0w92"))))
16089 (build-system python-build-system)
16090 (arguments
16091 `(#:tests? #f)) ; No tests exist.
16092 (propagated-inputs
16093 `(("python-extras" ,python-extras)
16094 ("python-arrow" ,python-arrow)
16095 ("python-numpy" ,python-numpy)
16096 ("python-ruamel.yaml" ,python-ruamel.yaml)))
16097 (home-page "http://construct.readthedocs.io")
16098 (synopsis "Declarative and symmetrical parser and builder for binary data")
16099 (description
16100 "This package provides both simple, atomic constructs (such as
16101 integers of various sizes), as well as composite ones which allow you
16102 form hierarchical and sequential structures of increasing complexity.
16103 It features bit and byte granularity, easy debugging and testing, an
16104 easy-to-extend subclass system, and lots of primitive constructs to
16105 make your work easier.")
16106 (license license:expat)))
16107
16108 (define-public python-humanize
16109 (package
16110 (name "python-humanize")
16111 (version "0.5.1")
16112 (source
16113 (origin
16114 (method url-fetch)
16115 (uri (pypi-uri "humanize" version))
16116 (sha256
16117 (base32
16118 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
16119 (arguments
16120 '(#:tests? #f)) ; tests not in pypi archive
16121 (build-system python-build-system)
16122 (home-page "https://github.com/jmoiron/humanize")
16123 (synopsis "Print numerical information in a human-readable form")
16124 (description "This package provides a Python module that displays numbers
16125 and dates in \"human readable\" forms. For example, it would display
16126 \"12345591313\" as \"12.3 billion\".")
16127 (license license:expat)))
16128
16129 (define-public python-txaio
16130 (package
16131 (name "python-txaio")
16132 (version "18.8.1")
16133 (source
16134 (origin
16135 (method url-fetch)
16136 (uri (pypi-uri "txaio" version))
16137 (sha256
16138 (base32
16139 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
16140 (build-system python-build-system)
16141 (propagated-inputs
16142 `(("python-twisted" ,python-twisted)
16143 ("python-six" ,python-six)))
16144 (home-page "https://github.com/crossbario/txaio")
16145 (synopsis "Compatibility layer between Python asyncio and Twisted")
16146 (description "Txaio provides a compatibility layer between the Python
16147 @code{asyncio} module and @code{Twisted}.")
16148 (license license:expat)))
16149
16150 (define-public python-toolshed
16151 (package
16152 (name "python-toolshed")
16153 (version "0.4.6")
16154 (source
16155 (origin
16156 (method url-fetch)
16157 (uri (pypi-uri "toolshed" version))
16158 (sha256
16159 (base32
16160 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
16161 (build-system python-build-system)
16162 (native-inputs
16163 `(("python-nose" ,python-nose)))
16164 (home-page "https://github.com/brentp/toolshed/")
16165 (synopsis "Collection of modules and functions for working with data")
16166 (description "This is a collection of well-tested, simple modules and
16167 functions that aim to reduce boilerplate when working with data.")
16168 (license license:bsd-2)))
16169
16170 (define-public python-annoy
16171 (package
16172 (name "python-annoy")
16173 (version "1.15.1")
16174 (source
16175 (origin
16176 (method url-fetch)
16177 (uri (pypi-uri "annoy" version))
16178 (sha256
16179 (base32
16180 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
16181 (build-system python-build-system)
16182 (native-inputs
16183 `(("python-nose" ,python-nose)))
16184 (home-page "https://github.com/spotify/annoy/")
16185 (synopsis "Approximate nearest neighbors library")
16186 (description
16187 "Annoy is a C++ library with Python bindings to search for points in
16188 space that are close to a given query point. It also creates large read-only
16189 file-based data structures that are @code{mmap}ped into memory so that many
16190 processes may share the same data.")
16191 (license license:asl2.0)))
16192
16193 (define-public python-pylzma
16194 (package
16195 (name "python-pylzma")
16196 (version "0.5.0")
16197 (source
16198 (origin
16199 (method url-fetch)
16200 (uri (pypi-uri "pylzma" version))
16201 (sha256
16202 (base32
16203 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
16204 (build-system python-build-system)
16205 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
16206 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
16207 (description "This package provides Python bindings for the LZMA library
16208 by Igor Pavlov.")
16209 (license license:lgpl2.1+)))
16210
16211 (define-public python2-pylzma
16212 (package-with-python2 python-pylzma))
16213
16214 (define-public python2-zeroconf
16215 (package
16216 (name "python2-zeroconf")
16217
16218 ;; This is the last version that supports Python 2.x.
16219 (version "0.19.1")
16220 (source
16221 (origin
16222 (method url-fetch)
16223 (uri (pypi-uri "zeroconf" version))
16224 (sha256
16225 (base32
16226 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
16227 (build-system python-build-system)
16228 (arguments
16229 `(#:python ,python-2
16230 #:phases
16231 (modify-phases %standard-phases
16232 (add-after 'unpack 'patch-requires
16233 (lambda* (#:key inputs #:allow-other-keys)
16234 (substitute* "setup.py"
16235 (("enum-compat")
16236 "enum34"))
16237 #t)))))
16238 (native-inputs
16239 `(("python2-six" ,python2-six)
16240 ("python2-enum32" ,python2-enum34)
16241 ("python2-netifaces" ,python2-netifaces)
16242 ("python2-typing" ,python2-typing)))
16243 (home-page "https://github.com/jstasiak/python-zeroconf")
16244 (synopsis "Pure Python mDNS service discovery")
16245 (description
16246 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
16247 compatible).")
16248 (license license:lgpl2.1+)))
16249
16250 (define-public python-bsddb3
16251 (package
16252 (name "python-bsddb3")
16253 (version "6.2.6")
16254 (source
16255 (origin
16256 (method url-fetch)
16257 (uri (pypi-uri "bsddb3" version))
16258 (sha256
16259 (base32
16260 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
16261 (build-system python-build-system)
16262 (inputs
16263 `(("bdb" ,bdb)))
16264 (arguments
16265 '(#:phases
16266 (modify-phases %standard-phases
16267 (add-after 'unpack 'configure-locations
16268 (lambda* (#:key inputs #:allow-other-keys)
16269 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
16270 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
16271 #t))
16272 (replace 'check
16273 (lambda _
16274 (invoke "python3" "test3.py" "-v"))))))
16275 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
16276 (synopsis "Python bindings for Oracle Berkeley DB")
16277 (description
16278 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
16279 C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
16280 Transaction objects, and each of these is exposed as a Python type in the
16281 bsddb3.db module. The database objects can use various access methods: btree,
16282 hash, recno, and queue. Complete support of Berkeley DB distributed
16283 transactions. Complete support for Berkeley DB Replication Manager.
16284 Complete support for Berkeley DB Base Replication. Support for RPC.")
16285 (license license:bsd-3)))
16286
16287 (define-public python-dbfread
16288 (package
16289 (name "python-dbfread")
16290 (version "2.0.7")
16291 (source (origin
16292 (method url-fetch)
16293 (uri (pypi-uri "dbfread" version))
16294 (sha256
16295 (base32
16296 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
16297 (build-system python-build-system)
16298 (native-inputs
16299 `(("python-pytest" ,python-pytest)))
16300 (home-page "https://dbfread.readthedocs.io")
16301 (synopsis "Read DBF Files with Python")
16302 (description
16303 "This library reads DBF files and returns the data as native Python data
16304 types for further processing. It is primarily intended for batch jobs and
16305 one-off scripts.")
16306 (license license:expat)))
16307
16308 (define-public python-cached-property
16309 (package
16310 (name "python-cached-property")
16311 (version "1.5.1")
16312 (source
16313 (origin
16314 (method url-fetch)
16315 (uri (pypi-uri "cached-property" version))
16316 (sha256
16317 (base32
16318 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
16319 (build-system python-build-system)
16320 (arguments
16321 `(#:phases
16322 (modify-phases %standard-phases
16323 ;; https://github.com/pydanny/cached-property/issues/131
16324 ;; recent versions of freezegun break one test
16325 (add-after 'unpack 'disable-broken-test
16326 (lambda _
16327 (substitute* "tests/test_cached_property.py"
16328 (("def test_threads_ttl_expiry\\(self\\)" m)
16329 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
16330 " " m)))
16331 #t)))))
16332 (native-inputs
16333 `(("python-freezegun" ,python-freezegun)))
16334 (home-page
16335 "https://github.com/pydanny/cached-property")
16336 (synopsis
16337 "Decorator for caching properties in classes")
16338 (description
16339 "This package provides a decorator which makes caching
16340 time-or-computationally-expensive properties quick and easy and works in Python
16341 2 or 3.")
16342 (license license:bsd-3)))
16343
16344 (define-public python-folium
16345 (package
16346 (name "python-folium")
16347 (version "0.10.0")
16348 (source
16349 (origin
16350 (method url-fetch)
16351 (uri (pypi-uri "folium" version))
16352 (sha256
16353 (base32
16354 "18fzxijsgrb95r0a8anc9ba5ijyw3nlnv3rpavfbkqa5v878x84f"))))
16355 (build-system python-build-system)
16356 (propagated-inputs
16357 `(("python-branca" ,python-branca)
16358 ("python-jinja2" ,python-jinja2)
16359 ("python-numpy" ,python-numpy)
16360 ("python-requests" ,python-requests)))
16361 (native-inputs
16362 `(("python-pytest" ,python-pytest)))
16363 (home-page "https://github.com/python-visualization/folium")
16364 (synopsis "Make beautiful maps with Leaflet.js & Python")
16365 (description "@code{folium} makes it easy to visualize data that’s been
16366 manipulated in Python on an interactive leaflet map. It enables both the
16367 binding of data to a map for @code{choropleth} visualizations as well as
16368 passing rich vector/raster/HTML visualizations as markers on the map.
16369
16370 The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
16371 Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
16372 supports Image, Video, GeoJSON and TopoJSON overlays.")
16373 (license license:expat)))
16374
16375 (define-public jube
16376 (package
16377 ;; This is a command-line tool, so no "python-" prefix.
16378 (name "jube")
16379 (version "2.2.2")
16380 (source (origin
16381 (method url-fetch)
16382 (uri (string-append
16383 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
16384 version))
16385 (sha256
16386 (base32
16387 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
16388 (file-name (string-append "jube-" version ".tar.gz"))))
16389 (build-system python-build-system)
16390 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
16391 (synopsis "Benchmarking environment")
16392 (description
16393 "JUBE helps perform and analyze benchmarks in a systematic way. For each
16394 benchmarked application, benchmark data is stored in a format that allows JUBE
16395 to deduct the desired information. This data can be parsed by automatic pre-
16396 and post-processing scripts that draw information and store it more densely
16397 for manual interpretation.")
16398 (license license:gpl3+)))
16399
16400 (define-public python-pyroutelib3
16401 (package
16402 (name "python-pyroutelib3")
16403 (version "1.3.post1")
16404 (source
16405 (origin
16406 (method url-fetch)
16407 (uri (pypi-uri "pyroutelib3" version))
16408 (sha256
16409 (base32
16410 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
16411 (build-system python-build-system)
16412 (propagated-inputs
16413 `(("python-dateutil" ,python-dateutil)))
16414 (home-page "https://github.com/MKuranowski/pyroutelib3")
16415 (synopsis "Library for simple routing on OSM data")
16416 (description "Library for simple routing on OSM data")
16417 (license license:gpl3+)))
16418
16419 (define-public python-elementpath
16420 (package
16421 (name "python-elementpath")
16422 (version "1.2.0")
16423 (source
16424 (origin
16425 (method url-fetch)
16426 (uri (pypi-uri "elementpath" version))
16427 (sha256
16428 (base32
16429 "1syn2z543brab23dskh3fjd9pqvz6npqbcicrs2d88dbg26xl08p"))))
16430 (build-system python-build-system)
16431 (home-page
16432 "https://github.com/sissaschool/elementpath")
16433 (synopsis
16434 "XPath 1.0/2.0 parsers and selectors for ElementTree and lxml")
16435 (description
16436 "The proposal of this package is to provide XPath 1.0 and 2.0 selectors
16437 for Python's ElementTree XML data structures, both for the standard
16438 ElementTree library and for the @uref{http://lxml.de, lxml.etree} library.
16439
16440 For lxml.etree this package can be useful for providing XPath 2.0 selectors,
16441 because lxml.etree already has it's own implementation of XPath 1.0.")
16442 (license license:expat)))
16443
16444 (define-public python-bibtexparser
16445 (package
16446 (name "python-bibtexparser")
16447 (version "1.1.0")
16448 (source
16449 (origin
16450 (method url-fetch)
16451 (uri (pypi-uri "bibtexparser" version))
16452 (sha256
16453 (base32
16454 "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
16455 (build-system python-build-system)
16456 (propagated-inputs
16457 `(("python-pyparsing" ,python-pyparsing)))
16458 (native-inputs
16459 `(("python-future" ,python-future)))
16460 (home-page "https://github.com/sciunto-org/python-bibtexparser")
16461 (synopsis "Python library to parse BibTeX files")
16462 (description "BibtexParser is a Python library to parse BibTeX files.")
16463 (license (list license:bsd-3 license:lgpl3))))
16464
16465 (define-public python-distro
16466 (package
16467 (name "python-distro")
16468 (version "1.4.0")
16469 (source
16470 (origin
16471 (method url-fetch)
16472 (uri (pypi-uri "distro" version))
16473 (sha256
16474 (base32
16475 "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n"))))
16476 (build-system python-build-system)
16477 (native-inputs
16478 `(("python-pytest" ,python-pytest)))
16479 (home-page "https://github.com/nir0s/distro")
16480 (synopsis
16481 "OS platform information API")
16482 (description
16483 "@code{distro} provides information about the OS distribution it runs on,
16484 such as a reliable machine-readable ID, or version information.
16485
16486 It is the recommended replacement for Python's original
16487 `platform.linux_distribution` function (which will be removed in Python 3.8).
16488 @code{distro} also provides a command-line interface to output the platform
16489 information in various formats.")
16490 (license license:asl2.0)))