Merge branch 'master' into core-updates
[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.5.3")
2201 (source
2202 (origin
2203 (method url-fetch)
2204 (uri (pypi-uri "PyJWT" version))
2205 (sha256
2206 (base32
2207 "1rxsg14i33vm2i6lz0my628108c81k43v10n4h3p0gx62xdyf2sh"))
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 "1.4.3")
7746 (source
7747 (origin
7748 (method url-fetch)
7749 (uri (pypi-uri "bleach" version))
7750 (sha256
7751 (base32
7752 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
7753 (build-system python-build-system)
7754 (propagated-inputs
7755 `(("python-html5lib" ,python-html5lib-0.9)
7756 ("python-six" ,python-six)))
7757 (native-inputs
7758 `(("python-nose" ,python-nose)))
7759 (home-page "https://github.com/jsocol/bleach")
7760 (synopsis "Whitelist-based HTML-sanitizing tool")
7761 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7762 (license license:asl2.0)))
7763
7764 (define-public python2-bleach
7765 (package-with-python2 python-bleach))
7766
7767 (define-public python-entrypoints
7768 (package
7769 (name "python-entrypoints")
7770 (version "0.3")
7771 (source
7772 (origin
7773 (method url-fetch)
7774 (uri (pypi-uri "entrypoints" version))
7775 (sha256
7776 (base32
7777 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
7778 (build-system python-build-system)
7779 ;; The package does not come with a setup.py file, so we have to generate
7780 ;; one ourselves.
7781 (arguments
7782 `(#:tests? #f
7783 #:phases
7784 (modify-phases %standard-phases
7785 (add-after 'unpack 'create-setup.py
7786 (lambda _
7787 (call-with-output-file "setup.py"
7788 (lambda (port)
7789 (format port "\
7790 from setuptools import setup
7791 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7792 " ,version))))))))
7793 (home-page "https://github.com/takluyver/entrypoints")
7794 (synopsis "Discover and load entry points from installed Python packages")
7795 (description "Entry points are a way for Python packages to advertise
7796 objects with some common interface. The most common examples are
7797 @code{console_scripts} entry points, which define shell commands by
7798 identifying a Python function to run. The @code{entrypoints} module contains
7799 functions to find and load entry points.")
7800 (license license:expat)))
7801
7802 (define-public python2-entrypoints
7803 (package-with-python2 python-entrypoints))
7804
7805 (define-public python-nbconvert
7806 (package
7807 (name "python-nbconvert")
7808 (version "5.0.0b1")
7809 (source
7810 (origin
7811 (method url-fetch)
7812 (uri (pypi-uri "nbconvert" version))
7813 (sha256
7814 (base32
7815 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7816 (build-system python-build-system)
7817 (arguments
7818 `(;; The "bdist_egg" target is disabled by default, causing the installation
7819 ;; to fail.
7820 #:configure-flags (list "bdist_egg")
7821 ;; FIXME: 5 failures, 40 errors.
7822 #:tests? #f))
7823 ;; #:phases
7824 ;; (modify-phases %standard-phases
7825 ;; (replace 'check
7826 ;; (lambda _
7827 ;; (zero? (system* "py.test" "-v")))))
7828 (native-inputs
7829 `(("python-pytest" ,python-pytest)))
7830 (propagated-inputs
7831 `(("python-bleach" ,python-bleach)
7832 ("python-entrypoints" ,python-entrypoints)
7833 ("python-jinja2" ,python-jinja2)
7834 ("python-jupyter-core" ,python-jupyter-core)
7835 ("python-mistune" ,python-mistune)
7836 ("python-nbformat" ,python-nbformat)
7837 ("python-pygments" ,python-pygments)
7838 ("python-traitlets" ,python-traitlets)))
7839 (home-page "http://jupyter.org")
7840 (synopsis "Converting Jupyter Notebooks")
7841 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7842 notebooks to various other formats via Jinja templates. It allows you to
7843 convert an @code{.ipynb} notebook file into various static formats including:
7844
7845 @enumerate
7846 @item HTML
7847 @item LaTeX
7848 @item PDF
7849 @item Reveal JS
7850 @item Markdown (md)
7851 @item ReStructured Text (rst)
7852 @item executable script
7853 @end enumerate\n")
7854 (license license:bsd-3)))
7855
7856 (define-public python2-nbconvert
7857 (package-with-python2 python-nbconvert))
7858
7859 (define-public python-notebook
7860 (package
7861 (name "python-notebook")
7862 (version "5.7.4")
7863 (source (origin
7864 (method url-fetch)
7865 (uri (pypi-uri "notebook" version))
7866 (sha256
7867 (base32
7868 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
7869 (build-system python-build-system)
7870 (arguments
7871 `(#:phases
7872 (modify-phases %standard-phases
7873 (replace 'check
7874 (lambda _
7875 ;; These tests require a browser
7876 (delete-file-recursively "notebook/tests/selenium")
7877 ;; Some tests need HOME
7878 (setenv "HOME" "/tmp")
7879 ;; This file contains "warningfilters", which are not supported
7880 ;; by this version of nose.
7881 (delete-file "setup.cfg")
7882 (with-directory-excursion "/tmp"
7883 (invoke "nosetests" "-v"))
7884 #t)))))
7885 (propagated-inputs
7886 `(("python-jupyter-core" ,python-jupyter-core)
7887 ("python-nbformat" ,python-nbformat)
7888 ("python-nbconvert" ,python-nbconvert)
7889 ("python-prometheus-client" ,python-prometheus-client)
7890 ("python-send2trash" ,python-send2trash)
7891 ("python-terminado" ,python-terminado)))
7892 (native-inputs
7893 `(("python-nose" ,python-nose)
7894 ("python-sphinx" ,python-sphinx)
7895 ("python-requests" ,python-requests)))
7896 (home-page "http://jupyter.org/")
7897 (synopsis "Web-based notebook environment for interactive computing")
7898 (description
7899 "The Jupyter HTML notebook is a web-based notebook environment for
7900 interactive computing.")
7901 (properties `((python2-variant . ,(delay python2-notebook))))
7902 (license license:bsd-3)))
7903
7904 (define-public python2-notebook
7905 (let ((base (package-with-python2
7906 (strip-python2-variant python-notebook))))
7907 (package (inherit base)
7908 (native-inputs
7909 `(("python2-mock" ,python2-mock)
7910 ,@(package-native-inputs base)))
7911 (arguments
7912 (substitute-keyword-arguments (package-arguments base)
7913 ((#:phases phases)
7914 `(modify-phases ,phases
7915 (add-before 'check 'disable-test-case
7916 ;; The test requires network access to localhost. Curiously it
7917 ;; fails with Python 2 only. Simply make the test-case return
7918 ;; immediately.
7919 (lambda _
7920 (substitute*
7921 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7922 (("formats = self.nbconvert_api") "return #")))))))))))
7923
7924 (define-public python-widgetsnbextension
7925 (package
7926 (name "python-widgetsnbextension")
7927 (version "3.4.2")
7928 (source
7929 (origin
7930 (method url-fetch)
7931 (uri (pypi-uri "widgetsnbextension" version))
7932 (sha256
7933 (base32
7934 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
7935 (build-system python-build-system)
7936 (propagated-inputs
7937 `(("python-ipykernel" ,python-ipykernel)
7938 ("python-notebook" ,python-notebook)))
7939 (native-inputs
7940 `(("python-certifi" ,python-certifi)
7941 ("python-nose" ,python-nose)))
7942 (home-page "https://ipython.org")
7943 (synopsis "IPython HTML widgets for Jupyter")
7944 (description "This package provides interactive HTML widgets for Jupyter
7945 notebooks.")
7946 (license license:bsd-3)))
7947
7948 (define-public python2-widgetsnbextension
7949 (package-with-python2 python-widgetsnbextension))
7950
7951 (define-public python-ipywidgets
7952 (package
7953 (name "python-ipywidgets")
7954 (version "5.2.2")
7955 (source
7956 (origin
7957 (method url-fetch)
7958 (uri (pypi-uri "ipywidgets" version))
7959 (sha256
7960 (base32
7961 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7962 (build-system python-build-system)
7963 (propagated-inputs
7964 `(("python-ipython" ,python-ipython)
7965 ("python-traitlets" ,python-traitlets)
7966 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7967 (native-inputs
7968 `(("python-nose" ,python-nose)
7969 ("python-pytest" ,python-pytest)))
7970 (home-page "https://ipython.org")
7971 (synopsis "IPython HTML widgets for Jupyter")
7972 (description "Ipywidgets are interactive HTML widgets for Jupyter
7973 notebooks and the IPython kernel. Notebooks come alive when interactive
7974 widgets are used. Users gain control of their data and can visualize changes
7975 in the data.")
7976 (license license:bsd-3)))
7977
7978 (define-public python2-ipywidgets
7979 (package-with-python2 python-ipywidgets))
7980
7981 (define-public python-jupyter-console
7982 (package
7983 (name "python-jupyter-console")
7984 (version "6.0.0")
7985 (source
7986 (origin
7987 (method url-fetch)
7988 (uri (pypi-uri "jupyter_console" version))
7989 (sha256
7990 (base32
7991 "1xdjw11cppf1fxvwkw2bk13ckkwas3bdah8baingn9296mvfi31h"))))
7992 (build-system python-build-system)
7993 (propagated-inputs
7994 `(("python-ipykernel" ,python-ipykernel)
7995 ("python-jupyter-client" ,python-jupyter-client)
7996 ("python-prompt-toolkit" ,python-prompt-toolkit)
7997 ("python-pygments" ,python-pygments)))
7998 (native-inputs
7999 `(("python-nose" ,python-nose)))
8000 (home-page "https://jupyter.org")
8001 (synopsis "Jupyter terminal console")
8002 (description "This package provides a terminal-based console frontend for
8003 Jupyter kernels. It also allows for console-based interaction with non-Python
8004 Jupyter kernels such as IJulia and IRKernel.")
8005 (license license:bsd-3)))
8006
8007 (define-public python2-jupyter-console
8008 (package
8009 (name "python2-jupyter-console")
8010 (version "5.2.0")
8011 (source
8012 (origin
8013 (method url-fetch)
8014 (uri (pypi-uri "jupyter_console" version))
8015 (sha256
8016 (base32
8017 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
8018 (build-system python-build-system)
8019 ;; Tests only run in an TTY.
8020 (arguments `(#:tests? #f))
8021 (propagated-inputs
8022 `(("python2-ipykernel" ,python2-ipykernel)
8023 ("python2-jupyter-client" ,python2-jupyter-client)
8024 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
8025 ("python2-pygments" ,python2-pygments)))
8026 (native-inputs
8027 `(("python2-nose" ,python2-nose)))
8028 (home-page "https://jupyter.org")
8029 (synopsis "Jupyter terminal console")
8030 (description "This package provides a terminal-based console frontend for
8031 Jupyter kernels. It also allows for console-based interaction with non-Python
8032 Jupyter kernels such as IJulia and IRKernel.")
8033 (license license:bsd-3)))
8034
8035 ;; The python-ipython and python-jupyter-console require each other. To get
8036 ;; the functionality in both packages working, strip down the
8037 ;; python-jupyter-console package when using it as an input to python-ipython.
8038 (define python-jupyter-console-minimal
8039 (package
8040 (inherit python-jupyter-console)
8041 (name "python-jupyter-console-minimal")
8042 (arguments
8043 (substitute-keyword-arguments
8044 (package-arguments python-jupyter-console)
8045 ((#:phases phases)
8046 `(modify-phases ,phases
8047 (add-after 'install 'delete-bin
8048 (lambda* (#:key outputs #:allow-other-keys)
8049 ;; Delete the bin files, to avoid conflicts in profiles
8050 ;; where python-ipython and python-jupyter-console are
8051 ;; both present.
8052 (delete-file-recursively
8053 (string-append
8054 (assoc-ref outputs "out") "/bin"))))))))
8055 ;; Remove the python-ipython propagated input, to avoid the cycle
8056 (propagated-inputs
8057 (alist-delete
8058 "python-ipython"
8059 (package-propagated-inputs python-jupyter-console)))))
8060
8061 (define-public python-qtconsole
8062 (package
8063 (name "python-qtconsole")
8064 (version "4.4.3")
8065 (source
8066 (origin
8067 (method url-fetch)
8068 (uri (pypi-uri "qtconsole" version))
8069 (sha256
8070 (base32
8071 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
8072 (build-system python-build-system)
8073 (arguments
8074 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
8075 ;; but we only have the LTS version 5.x. This means that there might be
8076 ;; runtime errors, but since this is a dependency of the Jupyter package,
8077 ;; and Jupyter can be used without the qtconsole we can overlook this for
8078 ;; now.
8079 `(#:tests? #f
8080 #:phases
8081 (modify-phases %standard-phases
8082 (add-before 'check 'pre-check
8083 (lambda _
8084 (setenv "QT_QPA_PLATFORM" "offscreen")
8085 #t)))))
8086 (propagated-inputs
8087 `(("python-ipykernel" ,python-ipykernel)
8088 ("python-ipython" ,python-ipython)))
8089 (native-inputs
8090 `(("python-pytest" ,python-pytest)))
8091 (home-page "http://jupyter.org")
8092 (synopsis "Jupyter Qt console")
8093 (description "This package provides a Qt-based console for Jupyter with
8094 support for rich media output.")
8095 (license license:bsd-3)))
8096
8097 (define-public python-jsbeautifier
8098 (package
8099 (name "python-jsbeautifier")
8100 (version "1.10.2")
8101 (home-page "https://github.com/beautify-web/js-beautify")
8102 (source (origin
8103 (method git-fetch)
8104 (uri (git-reference
8105 (url home-page)
8106 (commit (string-append "v" version))))
8107 (file-name (git-file-name name version))
8108 (sha256
8109 (base32
8110 "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg"))))
8111 (build-system python-build-system)
8112 (arguments
8113 `(#:phases (modify-phases %standard-phases
8114 (add-after 'unpack 'chdir
8115 (lambda _
8116 ;; The upstream Git repository contains all the code,
8117 ;; but this package only builds the python code.
8118 (chdir "python")
8119 #t))
8120 (add-after 'unpack 'patch-python-six-requirements
8121 (lambda _
8122 (substitute* "python/setup.py"
8123 (("six>=1.12.0")
8124 "six>=1.11.0"))
8125 #t)))))
8126 (propagated-inputs
8127 `(("python-editorconfig" ,python-editorconfig)
8128 ("python-six" ,python-six)))
8129 (native-inputs
8130 `(("python-pytest" ,python-pytest)))
8131 (synopsis "JavaScript unobfuscator and beautifier")
8132 (description "Beautify, unpack or deobfuscate JavaScript, leveraging
8133 popular online obfuscators.")
8134 (license license:expat)))
8135
8136 (define-public jupyter
8137 (package
8138 (name "jupyter")
8139 (version "1.0.0")
8140 (source
8141 (origin
8142 (method url-fetch)
8143 (uri (pypi-uri "jupyter" version))
8144 (sha256
8145 (base32
8146 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
8147 (build-system python-build-system)
8148 (arguments '(#:tests? #f)) ; there are none.
8149 (propagated-inputs
8150 `(("python-ipykernel" ,python-ipykernel)
8151 ("python-ipywidgets" ,python-ipywidgets)
8152 ("python-jupyter-console" ,python-jupyter-console)
8153 ("python-nbconvert" ,python-nbconvert)
8154 ("python-notebook" ,python-notebook)
8155 ("python-qtconsole" ,python-qtconsole)))
8156 (native-search-paths
8157 (list (search-path-specification
8158 (variable "JUPYTER_PATH")
8159 (files '("share/jupyter")))))
8160 (home-page "https://jupyter.org")
8161 (synopsis "Web application for interactive documents")
8162 (description
8163 "The Jupyter Notebook is a web application that allows you to create and
8164 share documents that contain live code, equations, visualizations and
8165 explanatory text. Uses include: data cleaning and transformation, numerical
8166 simulation, statistical modeling, machine learning and much more.")
8167 (license license:bsd-3)))
8168
8169 (define-public python-chardet
8170 (package
8171 (name "python-chardet")
8172 (version "3.0.4")
8173 (source
8174 (origin
8175 (method url-fetch)
8176 (uri (pypi-uri "chardet" version))
8177 (sha256
8178 (base32
8179 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
8180 (native-inputs
8181 `(("python-hypothesis" ,python-hypothesis)
8182 ("python-pytest" ,python-pytest)
8183 ("python-pytest-runner" ,python-pytest-runner)))
8184 (build-system python-build-system)
8185 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
8186 (arguments `(#:tests? #f))
8187 (home-page "https://github.com/chardet/chardet")
8188 (synopsis "Universal encoding detector for Python 2 and 3")
8189 (description
8190 "This package provides @code{chardet}, a Python module that can
8191 automatically detect a wide range of file encodings.")
8192 (license license:lgpl2.1+)))
8193
8194 (define-public python2-chardet
8195 (package-with-python2 python-chardet))
8196
8197 (define-public python-docopt
8198 (package
8199 (name "python-docopt")
8200 (version "0.6.2")
8201 (source
8202 (origin
8203 (method url-fetch)
8204 ;; The release on PyPI does not include tests.
8205 (uri (string-append
8206 "https://github.com/docopt/docopt/archive/"
8207 version ".tar.gz"))
8208 (file-name (string-append name "-" version ".tar.gz"))
8209 (sha256
8210 (base32
8211 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
8212 (build-system python-build-system)
8213 (native-inputs
8214 `(("python-pytest" ,python-pytest)))
8215 (arguments
8216 `(#:phases
8217 (modify-phases %standard-phases
8218 (replace 'check
8219 (lambda _ (invoke "py.test"))))))
8220 (home-page "http://docopt.org")
8221 (synopsis "Command-line interface description language for Python")
8222 (description "This library allows the user to define a command-line
8223 interface from a program's help message rather than specifying it
8224 programmatically with command-line parsers like @code{getopt} and
8225 @code{argparse}.")
8226 (license license:expat)))
8227
8228 (define-public python2-docopt
8229 (package-with-python2 python-docopt))
8230
8231 (define-public python-pythondialog
8232 (package
8233 (name "python-pythondialog")
8234 (version "3.4.0")
8235 (source
8236 (origin
8237 (method url-fetch)
8238 (uri (pypi-uri "pythondialog" version))
8239 (sha256
8240 (base32
8241 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
8242 (build-system python-build-system)
8243 (arguments
8244 `(#:phases
8245 (modify-phases %standard-phases
8246 (add-after 'unpack 'patch-path
8247 (lambda* (#:key inputs #:allow-other-keys)
8248 (let* ((dialog (assoc-ref inputs "dialog")))
8249 ;; Since this library really wants to grovel the search path, we
8250 ;; must hardcode dialog's store path into it.
8251 (substitute* "dialog.py"
8252 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
8253 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
8254 #t))))
8255 #:tests? #f)) ; no test suite
8256 (propagated-inputs
8257 `(("dialog" ,dialog)))
8258 (home-page "http://pythondialog.sourceforge.net/")
8259 (synopsis "Python interface to the UNIX dialog utility")
8260 (description "A Python wrapper for the dialog utility. Its purpose is to
8261 provide an easy to use, pythonic and comprehensive Python interface to dialog.
8262 This allows one to make simple text-mode user interfaces on Unix-like systems")
8263 (license license:lgpl2.1)
8264 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8265
8266 (define-public python2-pythondialog
8267 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8268 (package
8269 (inherit base)
8270 (version (package-version python-pythondialog))
8271 (source (origin
8272 (method url-fetch)
8273 (uri (pypi-uri "python2-pythondialog" version))
8274 (sha256
8275 (base32
8276 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
8277
8278 (define-public python-configobj
8279 (package
8280 (name "python-configobj")
8281 (version "5.0.6")
8282 (source (origin
8283 (method url-fetch)
8284 (uri (pypi-uri "configobj" version))
8285 (sha256
8286 (base32
8287 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8288 ;; Patch setup.py so it looks for python-setuptools, which is
8289 ;; required to parse the keyword 'install_requires' in setup.py.
8290 (patches (search-patches "python-configobj-setuptools.patch"))))
8291 (build-system python-build-system)
8292 (propagated-inputs
8293 `(("python-six" ,python-six)))
8294 (synopsis "Config file reading, writing and validation")
8295 (description "ConfigObj is a simple but powerful config file reader and
8296 writer: an ini file round tripper. Its main feature is that it is very easy to
8297 use, with a straightforward programmer’s interface and a simple syntax for
8298 config files.")
8299 (home-page "https://github.com/DiffSK/configobj")
8300 (license license:bsd-3)))
8301
8302 (define-public python2-configobj
8303 (package-with-python2 python-configobj))
8304
8305 (define-public python-configargparse
8306 (package
8307 (name "python-configargparse")
8308 (version "0.14.0")
8309 (source (origin
8310 (method url-fetch)
8311 (uri (pypi-uri "ConfigArgParse" version))
8312 (sha256
8313 (base32
8314 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
8315 (build-system python-build-system)
8316 (native-inputs
8317 `(("python-pyyaml" ,python-pyyaml)))
8318 (arguments
8319 `(#:phases
8320 (modify-phases %standard-phases
8321 (replace 'check
8322 (lambda _
8323 ;; Bypass setuptools-shim because one test relies on "setup.py"
8324 ;; being the first argument passed to the python call.
8325 ;;
8326 ;; NOTE: Many tests do not run because they rely on Python's
8327 ;; built-in test.test_argparse, but we remove the unit tests from
8328 ;; our Python installation.
8329 (invoke "python" "setup.py" "test"))))))
8330 (synopsis "Replacement for argparse")
8331 (description "A drop-in replacement for argparse that allows options to also
8332 be set via config files and/or environment variables.")
8333 (home-page "https://github.com/bw2/ConfigArgParse")
8334 (license license:expat)))
8335
8336 (define-public python2-configargparse
8337 (package-with-python2 python-configargparse))
8338
8339 (define-public python-argparse-manpage
8340 (package
8341 (name "python-argparse-manpage")
8342 (version "1.1")
8343 (source
8344 (origin
8345 (method url-fetch)
8346 (uri (pypi-uri "argparse-manpage" version))
8347 (sha256
8348 (base32
8349 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
8350 (build-system python-build-system)
8351 (home-page "https://github.com/praiskup/argparse-manpage")
8352 (synopsis "Build manual page from Python's ArgumentParser object")
8353 (description
8354 "This package provides tools to build manual pages from Python's
8355 @code{ArgumentParser} object.")
8356 (license license:asl2.0)))
8357
8358 (define-public python-contextlib2
8359 (package
8360 (name "python-contextlib2")
8361 (version "0.5.5")
8362 (source
8363 (origin
8364 (method url-fetch)
8365 (uri (pypi-uri "contextlib2" version))
8366 (sha256
8367 (base32
8368 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8369 (build-system python-build-system)
8370 (home-page "http://contextlib2.readthedocs.org/")
8371 (synopsis "Tools for decorators and context managers")
8372 (description "This module is primarily a backport of the Python
8373 3.2 contextlib to earlier Python versions. Like contextlib, it
8374 provides utilities for common tasks involving decorators and context
8375 managers. It also contains additional features that are not part of
8376 the standard library.")
8377 (license license:psfl)))
8378
8379 (define-public python2-contextlib2
8380 (package
8381 (name "python2-contextlib2")
8382 (version "0.5.5")
8383 (source
8384 (origin
8385 (method url-fetch)
8386 (uri (pypi-uri "contextlib2" version))
8387 (sha256
8388 (base32
8389 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8390 (build-system python-build-system)
8391 (arguments
8392 `(#:python ,python-2
8393 #:phases
8394 (modify-phases %standard-phases
8395 (replace 'check
8396 (lambda _ (invoke "python" "test_contextlib2.py" "-v"))))))
8397 (native-inputs
8398 `(("python2-unittest2" ,python2-unittest2)))
8399 (home-page "http://contextlib2.readthedocs.org/")
8400 (synopsis "Tools for decorators and context managers")
8401 (description "This module is primarily a backport of the Python
8402 3.2 contextlib to earlier Python versions. Like contextlib, it
8403 provides utilities for common tasks involving decorators and context
8404 managers. It also contains additional features that are not part of
8405 the standard library.")
8406 (license license:psfl)))
8407
8408 (define-public python-texttable
8409 (package
8410 (name "python-texttable")
8411 (version "0.9.1")
8412 (source
8413 (origin
8414 (method url-fetch)
8415 (uri (pypi-uri "texttable" version))
8416 (sha256
8417 (base32
8418 "0yawv64c0zbawwv6zz84whb32fnb2n9jylwjcfsrcdgh7xvl340i"))))
8419 (build-system python-build-system)
8420 (arguments '(#:tests? #f)) ; no tests
8421 (home-page "https://github.com/foutaise/texttable/")
8422 (synopsis "Python module for creating simple ASCII tables")
8423 (description "Texttable is a Python module for creating simple ASCII
8424 tables.")
8425 (license license:lgpl2.1+)))
8426
8427 (define-public python2-texttable
8428 (package-with-python2 python-texttable))
8429
8430 (define-public python-atomicwrites
8431 (package
8432 (name "python-atomicwrites")
8433 (version "1.3.0")
8434 (source (origin
8435 (method url-fetch)
8436 (uri (pypi-uri "atomicwrites" version))
8437 (sha256
8438 (base32
8439 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
8440 (build-system python-build-system)
8441 (synopsis "Atomic file writes in Python")
8442 (description "Library for atomic file writes using platform dependent tools
8443 for atomic file system operations.")
8444 (home-page "https://github.com/untitaker/python-atomicwrites")
8445 (license license:expat)))
8446
8447 (define-public python2-atomicwrites
8448 (package-with-python2 python-atomicwrites))
8449
8450 (define-public python-click-threading
8451 (package
8452 (name "python-click-threading")
8453 (version "0.4.4")
8454 (source (origin
8455 (method url-fetch)
8456 (uri (pypi-uri "click-threading" version))
8457 (sha256
8458 (base32
8459 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
8460 (build-system python-build-system)
8461 (propagated-inputs
8462 `(("python-click" ,python-click)))
8463 (synopsis "Utilities for multithreading in Click")
8464 (description "This package provides utilities for multithreading in Click
8465 applications.")
8466 (home-page "https://github.com/click-contrib/click-threading")
8467 (license license:expat)))
8468
8469 (define-public python-click-log
8470 (package
8471 (name "python-click-log")
8472 (version "0.3.2")
8473 (source (origin
8474 (method url-fetch)
8475 (uri (pypi-uri "click-log" version))
8476 (sha256
8477 (base32
8478 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
8479 (build-system python-build-system)
8480 (propagated-inputs
8481 `(("python-click" ,python-click)))
8482 (synopsis "Logging for click applications")
8483 (description "This package provides a Python library for logging Click
8484 applications.")
8485 (home-page "https://github.com/click-contrib/click-log")
8486 (license license:expat)))
8487
8488 (define-public python-apipkg
8489 (package
8490 (name "python-apipkg")
8491 (version "1.4")
8492 (source (origin
8493 (method url-fetch)
8494 (uri (pypi-uri "apipkg" version))
8495 (sha256
8496 (base32
8497 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8498 (build-system python-build-system)
8499 (native-inputs
8500 `(("python-pytest" ,python-pytest)))
8501 (synopsis "Namespace control and lazy-import mechanism")
8502 (description "With apipkg you can control the exported namespace of a Python
8503 package and greatly reduce the number of imports for your users. It is a small
8504 pure Python module that works on virtually all Python versions.")
8505 (home-page "https://github.com/pytest-dev/apipkg")
8506 (license license:expat)))
8507
8508 (define-public python2-apipkg
8509 (package-with-python2 python-apipkg))
8510
8511 (define-public python-execnet
8512 (package
8513 (name "python-execnet")
8514 (version "1.4.1")
8515 (source (origin
8516 (method url-fetch)
8517 (uri (pypi-uri "execnet" version))
8518 (sha256
8519 (base32
8520 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8521 (build-system python-build-system)
8522 (arguments
8523 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8524 ;; The two test failures are caused by the lack of an `ssh` executable.
8525 ;; The test suite can be run with pytest after the 'install' phase.
8526 #:tests? #f))
8527 (native-inputs
8528 `(("python-pytest" ,python-pytest)
8529 ("python-setuptools-scm" ,python-setuptools-scm)))
8530 (propagated-inputs
8531 `(("python-apipkg" ,python-apipkg)))
8532 (synopsis "Rapid multi-Python deployment")
8533 (description "Execnet provides a share-nothing model with
8534 channel-send/receive communication for distributing execution across many
8535 Python interpreters across version, platform and network barriers. It has a
8536 minimal and fast API targeting the following uses:
8537 @enumerate
8538 @item distribute tasks to (many) local or remote CPUs
8539 @item write and deploy hybrid multi-process applications
8540 @item write scripts to administer multiple environments
8541 @end enumerate")
8542 (home-page "http://codespeak.net/execnet/")
8543 (license license:expat)))
8544
8545 (define-public python2-execnet
8546 (package-with-python2 python-execnet))
8547
8548 (define-public python-icalendar
8549 (package
8550 (name "python-icalendar")
8551 (version "4.0.3")
8552 (source (origin
8553 (method url-fetch)
8554 (uri (pypi-uri "icalendar" version))
8555 (sha256
8556 (base32
8557 "0mk3dk1dxkcm46jy48v27j2w2349iv4sbimqj1yb5js43mx49hh7"))))
8558 (build-system python-build-system)
8559 (propagated-inputs
8560 `(("python-dateutil" ,python-dateutil)
8561 ("python-pytz" ,python-pytz)))
8562 (synopsis "Python library for parsing iCalendar files")
8563 (description "The icalendar package is a parser/generator of iCalendar
8564 files for use with Python.")
8565 (home-page "https://github.com/collective/icalendar")
8566 (license license:bsd-2)))
8567
8568 (define-public python-args
8569 (package
8570 (name "python-args")
8571 (version "0.1.0")
8572 (source (origin
8573 (method url-fetch)
8574 (uri (pypi-uri "args" version))
8575 (sha256
8576 (base32
8577 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8578 (build-system python-build-system)
8579 (home-page "https://github.com/kennethreitz/args")
8580 (synopsis "Command-line argument parser")
8581 (description
8582 "This library provides a Python module to parse command-line arguments.")
8583 (license license:bsd-3)))
8584
8585 (define-public python2-args
8586 (package-with-python2 python-args))
8587
8588 (define-public python-clint
8589 (package
8590 (name "python-clint")
8591 (version "0.5.1")
8592 (source (origin
8593 (method url-fetch)
8594 (uri (pypi-uri "clint" version))
8595 (sha256
8596 (base32
8597 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8598 (build-system python-build-system)
8599 (arguments
8600 '(#:phases
8601 (modify-phases %standard-phases
8602 (replace 'check
8603 (lambda _ (invoke "py.test" "-v"))))))
8604 (native-inputs
8605 `(("python-pytest" ,python-pytest)))
8606 (propagated-inputs
8607 `(("python-args" ,python-args)))
8608 (home-page "https://github.com/kennethreitz/clint")
8609 (synopsis "Command-line interface tools")
8610 (description
8611 "Clint is a Python module filled with a set of tools for developing
8612 command-line applications, including tools for colored and indented
8613 output, progress bar display, and pipes.")
8614 (license license:isc)))
8615
8616 (define-public python2-clint
8617 (package-with-python2 python-clint))
8618
8619 (define-public python-rply
8620 (package
8621 (name "python-rply")
8622 (version "0.7.5")
8623 (source (origin
8624 (method url-fetch)
8625 (uri (pypi-uri "rply" version))
8626 (sha256
8627 (base32
8628 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
8629 (build-system python-build-system)
8630 (propagated-inputs
8631 `(("python-appdirs" ,python-appdirs)))
8632 (home-page "https://github.com/alex/rply")
8633 (synopsis "Parser generator for Python")
8634 (description
8635 "This package provides a pure Python based parser generator, that also
8636 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8637 with a new public API, and RPython support.")
8638 (license license:bsd-3)))
8639
8640 (define-public python2-rply
8641 (package-with-python2 python-rply))
8642
8643 (define-public python-hy
8644 (package
8645 (name "python-hy")
8646 (version "0.13.0")
8647 (source (origin
8648 (method url-fetch)
8649 (uri (pypi-uri "hy" version))
8650 (sha256
8651 (base32
8652 "19sfymaksx9jhksfnb15ahid46mzrhdfzz6yy2craz2qnzvpmky8"))))
8653 (build-system python-build-system)
8654 (arguments
8655 '(#:phases
8656 (modify-phases %standard-phases
8657 (replace 'check
8658 (lambda _
8659 ;; Tests require write access to HOME.
8660 (setenv "HOME" "/tmp")
8661 (invoke "nosetests"))))))
8662 (native-inputs
8663 `(("python-coverage" ,python-coverage)
8664 ("python-nose" ,python-nose)))
8665 (propagated-inputs
8666 `(("python-astor" ,python-astor)
8667 ("python-clint" ,python-clint)
8668 ("python-rply" ,python-rply)))
8669 (home-page "http://hylang.org/")
8670 (synopsis "Lisp frontend to Python")
8671 (description
8672 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8673 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8674 Python at your fingertips, in Lisp form.")
8675 (license license:expat)))
8676
8677 (define-public python2-hy
8678 (package-with-python2 python-hy))
8679
8680 (define-public python2-functools32
8681 (package
8682 (name "python2-functools32")
8683 (version "3.2.3-2")
8684 (source
8685 (origin
8686 (method url-fetch)
8687 (uri (pypi-uri "functools32" version))
8688 (sha256
8689 (base32
8690 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8691 (build-system python-build-system)
8692 (arguments
8693 `(#:python ,python-2
8694 #:tests? #f)) ; no test target
8695 (home-page "https://github.com/MiCHiLU/python-functools32")
8696 (synopsis
8697 "Backport of the functools module from Python 3.2.3")
8698 (description
8699 "This package is a backport of the @code{functools} module from Python
8700 3.2.3 for use with older versions of Python and PyPy.")
8701 (license license:expat)))
8702
8703 (define-public python2-subprocess32
8704 (package
8705 (name "python2-subprocess32")
8706 (version "3.2.7")
8707 (source (origin
8708 (method url-fetch)
8709 (uri (pypi-uri "subprocess32" version))
8710 (sha256
8711 (base32
8712 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
8713 (patches
8714 (search-patches "python2-subprocess32-disable-input-test.patch"))))
8715 (build-system python-build-system)
8716 (arguments
8717 `(#:python ,python-2
8718 ;; The test suite fails with Python > 2.7.13:
8719 ;; import test.support
8720 ;; ImportError: No module named support
8721 #:tests? #f
8722 #:phases
8723 (modify-phases %standard-phases
8724 (add-after 'unpack 'patch-/bin/sh
8725 (lambda _
8726 (substitute* '("subprocess32.py"
8727 "test_subprocess32.py")
8728 (("/bin/sh") (which "sh")))
8729 #t)))))
8730 (home-page "https://github.com/google/python-subprocess32")
8731 (synopsis "Backport of the subprocess module from Python 3.2")
8732 (description
8733 "This is a backport of the @code{subprocess} standard library module
8734 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
8735 new features. On POSIX systems it is guaranteed to be reliable when used
8736 in threaded applications. It includes timeout support from Python 3.3 but
8737 otherwise matches 3.2’s API.")
8738 (license license:psfl)))
8739
8740 (define-public python2-futures
8741 (package
8742 (name "python2-futures")
8743 (version "3.2.0")
8744 (source
8745 (origin
8746 (method url-fetch)
8747 (uri (pypi-uri "futures" version))
8748 (sha256
8749 (base32
8750 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
8751 (build-system python-build-system)
8752 (arguments
8753 `(#:python ,python-2
8754 #:phases
8755 (modify-phases %standard-phases
8756 (replace 'check
8757 (lambda _
8758 (invoke "python" "test_futures.py")
8759 #t)))))
8760 (home-page "https://github.com/agronholm/pythonfutures")
8761 (synopsis
8762 "Backport of the concurrent.futures package from Python 3.2")
8763 (description
8764 "The concurrent.futures module provides a high-level interface for
8765 asynchronously executing callables. This package backports the
8766 concurrent.futures package from Python 3.2")
8767 (license license:bsd-3)))
8768
8769 (define-public python-promise
8770 (package
8771 (name "python-promise")
8772 (version "0.4.2")
8773 (source
8774 (origin
8775 (method url-fetch)
8776 (uri (pypi-uri "promise" version))
8777 (sha256
8778 (base32
8779 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8780 (build-system python-build-system)
8781 ;; Tests wants python-futures, which is a python2 only program, and
8782 ;; can't be found by python-promise at test time.
8783 (arguments `(#:tests? #f))
8784 (home-page "https://github.com/syrusakbary/promise")
8785 (synopsis "Promises/A+ implementation for Python")
8786 (description
8787 "Promises/A+ implementation for Python")
8788 (properties `((python2-variant . ,(delay python2-promise))))
8789 (license license:expat)))
8790
8791 (define-public python2-promise
8792 (let ((promise (package-with-python2
8793 (strip-python2-variant python-promise))))
8794 (package (inherit promise)
8795 (arguments (substitute-keyword-arguments (package-arguments promise)
8796 ((#:tests? _) #t)))
8797 (native-inputs
8798 `(("python2-futures" ,python2-futures)
8799 ("python2-pytest" ,python2-pytest)
8800 ,@(package-native-inputs promise))))))
8801
8802 (define-public python-progressbar33
8803 (package
8804 (name "python-progressbar33")
8805 (version "2.4")
8806 (source
8807 (origin
8808 (method url-fetch)
8809 (uri (pypi-uri "progressbar33" version))
8810 (sha256
8811 (base32
8812 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
8813 (build-system python-build-system)
8814 (home-page "http://github.com/germangh/python-progressbar")
8815 (synopsis "Text progress bar library for Python")
8816 (description
8817 "This package provides a text progress bar library for Python. This
8818 version only differs from the original @code{progressbar} package in that it
8819 uses relative package imports instead of absolute imports, which is necessary
8820 for the module to work under Python 3.3.")
8821 ;; Either or both of these licenses may be selected.
8822 (license (list license:lgpl2.1+ license:bsd-3))))
8823
8824 (define-public python-colorama
8825 (package
8826 (name "python-colorama")
8827 (version "0.3.9")
8828 (source
8829 (origin
8830 (method url-fetch)
8831 (uri (pypi-uri "colorama" version))
8832 (sha256
8833 (base32
8834 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
8835 (build-system python-build-system)
8836 (synopsis "Colored terminal text rendering for Python")
8837 (description "Colorama is a Python library for rendering colored terminal
8838 text.")
8839 (home-page "https://pypi.python.org/pypi/colorama")
8840 (license license:bsd-3)))
8841
8842 (define-public python2-colorama
8843 (package-with-python2 python-colorama))
8844
8845 (define-public python-rsa
8846 (package
8847 (name "python-rsa")
8848 (version "3.4.2")
8849 (source
8850 (origin
8851 (method url-fetch)
8852 (uri (pypi-uri "rsa" version))
8853 (sha256
8854 (base32
8855 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
8856 (build-system python-build-system)
8857 (propagated-inputs
8858 `(("python-pyasn1" ,python-pyasn1)))
8859 (synopsis "Pure-Python RSA implementation")
8860 (description "Python-RSA is a pure-Python RSA implementation. It supports
8861 encryption and decryption, signing and verifying signatures, and key
8862 generation according to PKCS#1 version 1.5. It can be used as a Python
8863 library as well as on the command line.")
8864 (home-page "https://stuvel.eu/rsa")
8865 (license license:asl2.0)))
8866
8867 (define-public python2-rsa
8868 (package-with-python2 python-rsa))
8869
8870 (define-public python-pluggy
8871 (package
8872 (name "python-pluggy")
8873 (version "0.11.0")
8874 (source
8875 (origin
8876 (method url-fetch)
8877 (uri (pypi-uri "pluggy" version))
8878 (sha256
8879 (base32
8880 "10511a54dvafw1jrk75mrhml53c7b7w4yaw7241696lc2hfvr895"))))
8881 (build-system python-build-system)
8882 (native-inputs
8883 `(("python-setuptools-scm" ,python-setuptools-scm)))
8884 (synopsis "Plugin and hook calling mechanism for Python")
8885 (description "Pluggy is an extraction of the plugin manager as used by
8886 Pytest but stripped of Pytest specific details.")
8887 (home-page "https://pypi.python.org/pypi/pluggy")
8888 (license license:expat)))
8889
8890 (define-public python2-pluggy
8891 (package-with-python2 python-pluggy))
8892
8893 (define-public python-tox
8894 (package
8895 (name "python-tox")
8896 (version "2.8.1")
8897 (source
8898 (origin
8899 (method url-fetch)
8900 (uri (pypi-uri "tox" version))
8901 (sha256
8902 (base32
8903 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
8904 (build-system python-build-system)
8905 (arguments
8906 ;; FIXME: Tests require pytest-timeout, which itself requires
8907 ;; pytest>=2.8.0 for installation.
8908 '(#:tests? #f))
8909 (propagated-inputs
8910 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
8911 ("python-py" ,python-py)
8912 ("python-virtualenv" ,python-virtualenv)))
8913 (native-inputs
8914 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
8915 ("python-pytest" ,python-pytest) ; >= 2.3.5
8916 ("python-setuptools-scm" ,python-setuptools-scm)))
8917 (home-page "http://tox.testrun.org/")
8918 (synopsis "Virtualenv-based automation of test activities")
8919 (description "Tox is a generic virtualenv management and test command line
8920 tool. It can be used to check that a package installs correctly with
8921 different Python versions and interpreters, or run tests in each type of
8922 supported environment, or act as a frontend to continuous integration
8923 servers.")
8924 (license license:expat)))
8925
8926 (define-public python2-tox
8927 (package-with-python2 python-tox))
8928
8929 (define-public python-jmespath
8930 (package
8931 (name "python-jmespath")
8932 (version "0.9.3")
8933 (source
8934 (origin
8935 (method url-fetch)
8936 (uri (pypi-uri "jmespath" version))
8937 (sha256
8938 (base32
8939 "0r7wc7fsxmlwzxx9j1j7rms06c6xs6d4sysirdhz1jk2mb4x90ba"))))
8940 (build-system python-build-system)
8941 (native-inputs
8942 `(("python-nose" ,python-nose)))
8943 (synopsis "JSON Matching Expressions")
8944 (description "JMESPath (pronounced “james path”) is a Python library that
8945 allows one to declaratively specify how to extract elements from a JSON
8946 document.")
8947 (home-page "https://github.com/jmespath/jmespath.py")
8948 (license license:expat)))
8949
8950 (define-public python2-jmespath
8951 (package-with-python2 python-jmespath))
8952
8953 (define-public python-botocore
8954 (package
8955 (name "python-botocore")
8956 (version "1.12.149")
8957 (source
8958 (origin
8959 (method url-fetch)
8960 (uri (pypi-uri "botocore" version))
8961 (sha256
8962 (base32
8963 "12597f74khp3ngwr282cb949w0gcqj20rkfc3x275dijavyy5cmf"))))
8964 (build-system python-build-system)
8965 (arguments
8966 ;; FIXME: Many tests are failing.
8967 '(#:tests? #f))
8968 (propagated-inputs
8969 `(("python-dateutil" ,python-dateutil)
8970 ("python-docutils" ,python-docutils)
8971 ("python-jmespath" ,python-jmespath)))
8972 (native-inputs
8973 `(("python-mock" ,python-mock)
8974 ("python-nose" ,python-nose)
8975 ("behave" ,behave)
8976 ("python-tox" ,python-tox)
8977 ("python-urllib3" ,python-urllib3)
8978 ("python-wheel" ,python-wheel)))
8979 (home-page "https://github.com/boto/botocore")
8980 (synopsis "Low-level interface to AWS")
8981 (description "Botocore is a Python library that provides a low-level
8982 interface to the Amazon Web Services (AWS) API.")
8983 (license license:asl2.0)))
8984
8985 (define-public python2-botocore
8986 (package-with-python2 python-botocore))
8987
8988 (define-public python-xdo
8989 (package
8990 (name "python-xdo")
8991 (version "0.3")
8992 (source (origin
8993 (method url-fetch)
8994 (uri (string-append
8995 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8996 "python-xdo_" version ".orig.tar.gz"))
8997 (sha256
8998 (base32
8999 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
9000 (build-system python-build-system)
9001 (arguments
9002 '(#:phases
9003 (modify-phases %standard-phases
9004 (add-before 'install 'patch-libxdo-path
9005 ;; Hardcode the path of dynamically loaded libxdo library.
9006 (lambda* (#:key inputs #:allow-other-keys)
9007 (let ((libxdo (string-append
9008 (assoc-ref inputs "xdotool")
9009 "/lib/libxdo.so")))
9010 (substitute* "xdo/_xdo.py"
9011 (("find_library\\(\"xdo\"\\)")
9012 (simple-format #f "\"~a\"" libxdo)))
9013 #t))))
9014 #:tests? #f)) ; no tests provided
9015 (propagated-inputs
9016 `(("python-six" ,python-six)))
9017 (inputs
9018 `(("xdotool" ,xdotool)
9019 ("libX11" ,libx11)))
9020 (home-page "https://tracker.debian.org/pkg/python-xdo")
9021 (synopsis "Python library for simulating X11 keyboard/mouse input")
9022 (description "Provides bindings to libxdo for manipulating X11 via simulated
9023 input. (Note that this is mostly a legacy library; you may wish to look at
9024 python-xdo for newer bindings.)")
9025 (license license:bsd-3)))
9026
9027 (define-public python2-xdo
9028 (package-with-python2 python-xdo))
9029
9030 (define-public python-mako
9031 (package
9032 (name "python-mako")
9033 (version "1.1.0")
9034 (source
9035 (origin
9036 (method url-fetch)
9037 (uri (pypi-uri "Mako" version))
9038 (sha256
9039 (base32
9040 "0jqa3qfpykyn4fmkn0kh6043sfls7br8i2bsdbccazcvk9cijsd3"))))
9041 (build-system python-build-system)
9042 (arguments
9043 `(#:phases (modify-phases %standard-phases
9044 (replace 'check
9045 (lambda _
9046 (invoke "pytest" "-vv"))))))
9047 (propagated-inputs
9048 `(("python-markupsafe" ,python-markupsafe)))
9049 (native-inputs
9050 `(("python-mock" ,python-mock)
9051 ("python-pytest" ,python-pytest)))
9052 (home-page "https://www.makotemplates.org/")
9053 (synopsis "Templating language for Python")
9054 (description "Mako is a templating language for Python that compiles
9055 templates into Python modules.")
9056 (license license:expat)))
9057
9058 (define-public python2-mako
9059 (package-with-python2 python-mako))
9060
9061 (define-public python-waitress
9062 (package
9063 (name "python-waitress")
9064 (version "1.1.0")
9065 (source
9066 (origin
9067 (method url-fetch)
9068 (uri (pypi-uri "waitress" version))
9069 (patches (search-patches "python-waitress-fix-tests.patch"))
9070 (sha256
9071 (base32
9072 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
9073 (build-system python-build-system)
9074 (home-page "https://github.com/Pylons/waitress")
9075 (synopsis "Waitress WSGI server")
9076 (description "Waitress is meant to be a production-quality pure-Python WSGI
9077 server with very acceptable performance.")
9078 (license license:zpl2.1)))
9079
9080 (define-public python2-waitress
9081 (package-with-python2 python-waitress))
9082
9083 (define-public python-pyquery
9084 (package
9085 (name "python-pyquery")
9086 (version "1.2.17")
9087 (source
9088 (origin
9089 (method url-fetch)
9090 (uri (pypi-uri "pyquery" version))
9091 (sha256
9092 (base32
9093 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
9094 (build-system python-build-system)
9095 (native-inputs
9096 `(("python-webob" ,python-webob)
9097 ("python-webtest" ,python-webtest)))
9098 (propagated-inputs
9099 `(("python-lxml" ,python-lxml)
9100 ("python-cssselect" ,python-cssselect)))
9101 (home-page "https://github.com/gawel/pyquery")
9102 (synopsis "Make jQuery-like queries on xml documents")
9103 (description "pyquery allows you to make jQuery queries on xml documents.
9104 The API is as much as possible the similar to jQuery. pyquery uses lxml for
9105 fast xml and html manipulation.")
9106 (license license:bsd-3)))
9107
9108 (define-public python-anyjson
9109 (package
9110 (name "python-anyjson")
9111 (version "0.3.3")
9112 (source
9113 (origin
9114 (method url-fetch)
9115 (uri (pypi-uri "anyjson" version))
9116 (sha256
9117 (base32
9118 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
9119 (build-system python-build-system)
9120 (arguments
9121 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
9122 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
9123 ;; whatever) so this transformation needs to be done before the tests
9124 ;; can be run. Maybe we could add a build step to transform beforehand
9125 ;; but it could be annoying/difficult.
9126 ;; We can enable tests for the Python 2 version, though, and do below.
9127 #:tests? #f))
9128 (home-page "https://bitbucket.org/runeh/anyjson/")
9129 (synopsis
9130 "Wraps best available JSON implementation in a common interface")
9131 (description
9132 "Anyjson loads whichever is the fastest JSON module installed
9133 and provides a uniform API regardless of which JSON implementation is used.")
9134 (license license:bsd-3)
9135 (properties `((python2-variant . ,(delay python2-anyjson))))))
9136
9137 (define-public python2-anyjson
9138 (let ((anyjson (package-with-python2
9139 (strip-python2-variant python-anyjson))))
9140 (package
9141 (inherit anyjson)
9142 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
9143 #:tests? #t
9144 ,@(package-arguments anyjson)))
9145 (native-inputs `(("python2-nose" ,python2-nose))))))
9146
9147 (define-public python-amqp
9148 (package
9149 (name "python-amqp")
9150 (version "2.3.2")
9151 (source
9152 (origin
9153 (method url-fetch)
9154 (uri (pypi-uri "amqp" version))
9155 (sha256
9156 (base32
9157 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
9158 (build-system python-build-system)
9159 (native-inputs
9160 `(("python-case" ,python-case)
9161 ("python-pytest-sugar" ,python-pytest-sugar)
9162 ("python-mock" ,python-mock)))
9163 (propagated-inputs
9164 `(("python-vine" ,python-vine)))
9165 (home-page "https://github.com/celery/py-amqp")
9166 (synopsis
9167 "Low-level AMQP client for Python (fork of amqplib)")
9168 (description
9169 "This is a fork of amqplib which was originally written by Barry Pederson.
9170 It is maintained by the Celery project, and used by kombu as a pure python
9171 alternative when librabbitmq is not available.")
9172 (license license:lgpl2.1+)
9173 (properties `((python2-variant . ,(delay python2-amqp))))))
9174
9175 (define-public python2-amqp
9176 (let ((amqp (package-with-python2
9177 (strip-python2-variant python-amqp))))
9178 (package
9179 (inherit amqp)
9180 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
9181 ;; unmaintained. Weirdly, does not do this on the python 3
9182 ;; version?
9183 #:tests? #f
9184 ,@(package-arguments amqp))))))
9185
9186 (define-public python-txamqp
9187 (package
9188 (name "python-txamqp")
9189 (version "0.8.2")
9190 (source
9191 (origin
9192 (method url-fetch)
9193 (uri (pypi-uri "txAMQP" version))
9194 (sha256
9195 (base32
9196 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
9197 (build-system python-build-system)
9198 (propagated-inputs
9199 `(("python-six" ,python-six)
9200 ("python-twisted" ,python-twisted)))
9201 (home-page "https://github.com/txamqp/txamqp")
9202 (synopsis "Communicate with AMQP peers and brokers using Twisted")
9203 (description
9204 "This package provides a Python library for communicating with AMQP peers
9205 and brokers using the asynchronous networking framework Twisted. It contains
9206 all the necessary code to connect, send and receive messages to/from an
9207 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
9208 also includes support for using Thrift RPC over AMQP in Twisted
9209 applications.")
9210 (license license:asl2.0)))
9211
9212 (define-public python2-txamqp
9213 (package-with-python2 python-txamqp))
9214
9215 (define-public python-kombu
9216 (package
9217 (name "python-kombu")
9218 (version "4.2.2")
9219 (source
9220 (origin
9221 (method url-fetch)
9222 (uri (pypi-uri "kombu" version))
9223 (sha256
9224 (base32
9225 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
9226 (build-system python-build-system)
9227 (native-inputs
9228 `(("python-mock" ,python-mock)
9229 ("python-case" ,python-case)
9230 ("python-pyro4" ,python-pyro4)
9231 ("python-pytest-sugar" ,python-pytest-sugar)
9232 ("python-pytz" ,python-pytz)))
9233 (propagated-inputs
9234 `(("python-anyjson" ,python-anyjson)
9235 ("python-amqp" ,python-amqp)
9236 ("python-redis" ,python-redis)))
9237 (home-page "https://kombu.readthedocs.io")
9238 (synopsis "Message passing library for Python")
9239 (description "The aim of Kombu is to make messaging in Python as easy as
9240 possible by providing an idiomatic high-level interface for the AMQ protocol,
9241 and also provide proven and tested solutions to common messaging problems.
9242 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
9243 message orientation, queuing, routing, reliability and security, for which the
9244 RabbitMQ messaging server is the most popular implementation.")
9245 (license license:bsd-3)
9246 (properties `((python2-variant . ,(delay python2-kombu))))))
9247
9248 (define-public python2-kombu
9249 (let ((kombu (package-with-python2
9250 (strip-python2-variant python-kombu))))
9251 (package
9252 (inherit kombu)
9253 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
9254 ;; It works fine on the python3 variant.
9255 #:tests? #f
9256 ,@(package-arguments kombu)))
9257 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9258 ,@(package-native-inputs kombu))))))
9259
9260 (define-public python-billiard
9261 (package
9262 (name "python-billiard")
9263 (version "3.5.0.5")
9264 (source
9265 (origin
9266 (method url-fetch)
9267 (uri (pypi-uri "billiard" version))
9268 (sha256
9269 (base32
9270 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
9271 (build-system python-build-system)
9272 (native-inputs
9273 `(("python-case" ,python-case)
9274 ("python-pytest" ,python-pytest)))
9275 (home-page "https://github.com/celery/billiard")
9276 (synopsis
9277 "Python multiprocessing fork with improvements and bugfixes")
9278 (description
9279 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9280 multiprocessing package itself is a renamed and updated version of R Oudkerk's
9281 pyprocessing package. This standalone variant is intended to be compatible with
9282 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
9283 (license license:bsd-3)
9284 (properties `((python2-variant . ,(delay python2-billiard))))))
9285
9286 (define-public python2-billiard
9287 (let ((billiard (package-with-python2
9288 (strip-python2-variant python-billiard))))
9289 (package
9290 (inherit billiard)
9291 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9292 ("python2-mock" ,python2-mock)
9293 ,@(package-native-inputs billiard))))))
9294
9295 (define-public python-celery
9296 (package
9297 (name "python-celery")
9298 (version "4.2.1")
9299 (source
9300 (origin
9301 (method url-fetch)
9302 (uri (pypi-uri "celery" version))
9303 (sha256
9304 (base32
9305 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
9306 (build-system python-build-system)
9307 (arguments
9308 '(;; TODO The tests fail with Python 3.7
9309 ;; https://github.com/celery/celery/issues/4849
9310 #:tests? #f
9311 #:phases
9312 (modify-phases %standard-phases
9313 (add-after 'unpack 'patch-requirements
9314 (lambda _
9315 (substitute* "requirements/test.txt"
9316 (("pytest>=3\\.0,<3\\.3")
9317 "pytest>=3.0"))
9318 #t)))))
9319 (native-inputs
9320 `(("python-case" ,python-case)
9321 ("python-pytest" ,python-pytest)))
9322 (propagated-inputs
9323 `(("python-pytz" ,python-pytz)
9324 ("python-billiard" ,python-billiard)
9325 ("python-kombu" ,python-kombu)))
9326 (home-page "https://celeryproject.org")
9327 (synopsis "Distributed Task Queue")
9328 (description "Celery is an asynchronous task queue/job queue based on
9329 distributed message passing. It is focused on real-time operation, but
9330 supports scheduling as well. The execution units, called tasks, are executed
9331 concurrently on a single or more worker servers using multiprocessing,
9332 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9333 synchronously (wait until ready).")
9334 (license license:bsd-3)
9335 (properties `((python2-variant . ,(delay python2-celery))))))
9336
9337 (define-public python2-celery
9338 (let ((celery (package-with-python2
9339 (strip-python2-variant python-celery))))
9340 (package
9341 (inherit celery)
9342 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9343 ("python2-mock" ,python2-mock)
9344 ,@(package-native-inputs celery))))))
9345
9346 (define-public python-translitcodec
9347 (package
9348 (name "python-translitcodec")
9349 (version "0.4.0")
9350 (source
9351 (origin
9352 (method url-fetch)
9353 (uri (pypi-uri "translitcodec" version))
9354 (sha256
9355 (base32
9356 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9357 (build-system python-build-system)
9358 (arguments
9359 `(#:tests? #f)) ; no tests provided
9360 (home-page
9361 "https://github.com/claudep/translitcodec")
9362 (synopsis
9363 "Unicode to 8-bit charset transliteration codec")
9364 (description
9365 "This package contains codecs for transliterating ISO 10646 texts into
9366 best-effort representations using smaller coded character sets (ASCII,
9367 ISO 8859, etc.).")
9368 (license license:expat)))
9369
9370 (define-public python2-translitcodec
9371 (package-with-python2 python-translitcodec))
9372
9373 (define-public python-editor
9374 (package
9375 (name "python-editor")
9376 (version "0.5")
9377 (source
9378 (origin
9379 (method url-fetch)
9380 (uri (pypi-uri "python-editor" version))
9381 (sha256
9382 (base32
9383 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
9384 (build-system python-build-system)
9385 (home-page
9386 "https://github.com/fmoo/python-editor")
9387 (synopsis
9388 "Programmatically open an editor, capture the result")
9389 (description
9390 "python-editor is a library that provides the editor module for
9391 programmatically interfacing with your system's $EDITOR.")
9392 (license license:asl2.0)))
9393
9394 (define-public python2-editor
9395 (package-with-python2 python-editor))
9396
9397 (define-public python-vobject
9398 (package
9399 (name "python-vobject")
9400 (version "0.9.5")
9401 (source (origin
9402 (method url-fetch)
9403 (uri (pypi-uri "vobject" version))
9404 (sha256
9405 (base32
9406 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
9407 (build-system python-build-system)
9408 (arguments
9409 '(;; The test suite relies on some non-portable Windows interfaces.
9410 #:tests? #f))
9411 (propagated-inputs
9412 `(("python-dateutil" ,python-dateutil)
9413 ("python-pyicu" ,python-pyicu)))
9414 (synopsis "Parse and generate vCard and vCalendar files")
9415 (description "Vobject is intended to be a full featured Python package for
9416 parsing and generating vCard and vCalendar files. Currently, iCalendar files
9417 are supported and well tested. vCard 3.0 files are supported, and all data
9418 should be imported, but only a few components are understood in a sophisticated
9419 way.")
9420 (home-page "http://eventable.github.io/vobject/")
9421 (license license:asl2.0)))
9422
9423 (define-public python2-vobject
9424 (package-with-python2 python-vobject))
9425
9426 (define-public python-munkres
9427 (package
9428 (name "python-munkres")
9429 (version "1.0.8")
9430 (source (origin
9431 (method url-fetch)
9432 (uri (pypi-uri "munkres" version))
9433 (sha256
9434 (base32
9435 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
9436 (build-system python-build-system)
9437 (arguments
9438 '(#:tests? #f)) ; no test suite
9439 (home-page "http://software.clapper.org/munkres/")
9440 (synopsis "Implementation of the Munkres algorithm")
9441 (description "The Munkres module provides an implementation of the Munkres
9442 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9443 useful for solving the Assignment Problem.")
9444 (license license:bsd-3)))
9445
9446 (define-public python2-munkres
9447 (package-with-python2 python-munkres))
9448
9449 (define-public python-whoosh
9450 (package
9451 (name "python-whoosh")
9452 (version "2.7.4")
9453 (source
9454 (origin
9455 (method url-fetch)
9456 (uri (pypi-uri "Whoosh" version))
9457 (sha256
9458 (base32
9459 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9460 (build-system python-build-system)
9461 (native-inputs
9462 `(("python-pytest" ,python-pytest)))
9463 (home-page "https://bitbucket.org/mchaput/whoosh")
9464 (synopsis "Full text indexing, search, and spell checking library")
9465 (description
9466 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9467 checking library.")
9468 (license license:bsd-2)))
9469
9470 (define-public python2-whoosh
9471 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9472 (package (inherit whoosh)
9473 (propagated-inputs
9474 `(("python2-backport-ssl-match-hostname"
9475 ,python2-backport-ssl-match-hostname)
9476 ,@(package-propagated-inputs whoosh))))))
9477
9478 (define-public python-pathlib
9479 (package
9480 (name "python-pathlib")
9481 (version "1.0.1")
9482 (source (origin
9483 (method url-fetch)
9484 (uri (pypi-uri "pathlib" version))
9485 (sha256
9486 (base32
9487 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9488 (build-system python-build-system)
9489 ;; The tests depend on the internal "test" module, which does not provide
9490 ;; a stable interface.
9491 (arguments `(#:tests? #f))
9492 (home-page "https://pathlib.readthedocs.org/")
9493 (synopsis "Object-oriented file system paths")
9494 (description "Pathlib offers a set of classes to handle file system paths.
9495 It offers the following advantages over using string objects:
9496
9497 @enumerate
9498 @item No more cumbersome use of os and os.path functions. Everything can
9499 be done easily through operators, attribute accesses, and method calls.
9500 @item Embodies the semantics of different path types. For example,
9501 comparing Windows paths ignores casing.
9502 @item Well-defined semantics, eliminating any inconsistencies or
9503 ambiguities (forward vs. backward slashes, etc.).
9504 @end enumerate
9505
9506 Note: In Python 3.4, pathlib is now part of the standard library. For other
9507 Python versions please consider python-pathlib2 instead, which tracks the
9508 standard library module. This module (python-pathlib) isn't maintained
9509 anymore.")
9510 (license license:expat)))
9511
9512 (define-public python2-pathlib
9513 (package-with-python2 python-pathlib))
9514
9515 (define-public python2-pathlib2
9516 (package
9517 (name "python2-pathlib2")
9518 (version "2.3.3")
9519 (source (origin
9520 (method url-fetch)
9521 (uri (pypi-uri "pathlib2" version))
9522 (sha256
9523 (base32
9524 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
9525 (build-system python-build-system)
9526 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9527 ;; version is 3.4 which already includes this package as part of the
9528 ;; standard library.
9529 (arguments
9530 `(#:python ,python-2))
9531 (propagated-inputs
9532 `(("python2-scandir" ,python2-scandir)
9533 ("python2-six" ,python2-six)))
9534 (home-page "https://pypi.python.org/pypi/pathlib2/")
9535 (synopsis "Object-oriented file system paths - backport of standard
9536 pathlib module")
9537 (description "The goal of pathlib2 is to provide a backport of standard
9538 pathlib module which tracks the standard library module, so all the newest
9539 features of the standard pathlib can be used also on older Python versions.
9540
9541 Pathlib offers a set of classes to handle file system paths. It offers the
9542 following advantages over using string objects:
9543
9544 @enumerate
9545 @item No more cumbersome use of os and os.path functions. Everything can
9546 be done easily through operators, attribute accesses, and method calls.
9547 @item Embodies the semantics of different path types. For example,
9548 comparing Windows paths ignores casing.
9549 @item Well-defined semantics, eliminating any inconsistencies or
9550 ambiguities (forward vs. backward slashes, etc.).
9551 @end enumerate")
9552 (license license:expat)))
9553
9554 (define-public python2-pathlib2-bootstrap
9555 (hidden-package
9556 (package
9557 (inherit python2-pathlib2)
9558 (name "python2-pathlib2-bootstrap")
9559 (propagated-inputs
9560 `(("python2-scandir" ,python2-scandir)
9561 ("python2-six" ,python2-six-bootstrap))))))
9562
9563 (define-public python-jellyfish
9564 (package
9565 (name "python-jellyfish")
9566 (version "0.5.6")
9567 (source (origin
9568 (method url-fetch)
9569 (uri (pypi-uri "jellyfish" version))
9570 (sha256
9571 (base32
9572 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
9573 (build-system python-build-system)
9574 (native-inputs
9575 `(("python-pytest" ,python-pytest)))
9576 (home-page "https://github.com/jamesturk/jellyfish")
9577 (synopsis "Approximate and phonetic matching of strings")
9578 (description "Jellyfish uses a variety of string comparison and phonetic
9579 encoding algorithms to do fuzzy string matching.")
9580 (license license:bsd-2)
9581 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9582
9583 (define-public python2-jellyfish
9584 (let ((jellyfish (package-with-python2
9585 (strip-python2-variant python-jellyfish))))
9586 (package (inherit jellyfish)
9587 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
9588 ,@(package-native-inputs jellyfish))))))
9589
9590 (define-public python2-unicodecsv
9591 (package
9592 (name "python2-unicodecsv")
9593 (version "0.14.1")
9594 (source (origin
9595 (method url-fetch)
9596 ;; The test suite is not included in the PyPi release.
9597 ;; https://github.com/jdunck/python-unicodecsv/issues/19
9598 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
9599 "archive/" version ".tar.gz"))
9600 (file-name (string-append name "-" version ".tar.gz"))
9601 (sha256
9602 (base32
9603 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
9604 (build-system python-build-system)
9605 (arguments
9606 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9607 #:python ,python-2))
9608 (native-inputs
9609 `(("python2-unittest2" ,python2-unittest2)))
9610 (home-page "https://github.com/jdunck/python-unicodecsv")
9611 (synopsis "Unicode CSV module for Python 2")
9612 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9613 module, adding support for Unicode strings.")
9614 (license license:bsd-2)))
9615
9616 (define-public python-rarfile
9617 (package
9618 (name "python-rarfile")
9619 (version "2.8")
9620 (source (origin
9621 (method url-fetch)
9622 (uri (pypi-uri "rarfile" version))
9623 (sha256
9624 (base32
9625 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
9626 (build-system python-build-system)
9627 (arguments
9628 '(#:phases
9629 (modify-phases %standard-phases
9630 (replace 'check
9631 ;; Many tests fail, but the installation proceeds.
9632 (lambda _ (invoke "make" "-C" "test" "test"))))))
9633 (native-inputs
9634 `(("which" ,which))) ; required for tests
9635 (propagated-inputs
9636 `(("libarchive" ,libarchive)))
9637 (home-page "https://github.com/markokr/rarfile")
9638 (synopsis "RAR archive reader for Python")
9639 (description "This is Python module for RAR archive reading. The interface
9640 is made as zipfile like as possible.")
9641 (license license:isc)))
9642
9643 (define-public python2-rarfile
9644 (package-with-python2 python-rarfile))
9645
9646 (define-public python-magic
9647 (package
9648 (name "python-magic")
9649 (version "0.4.15")
9650 (source
9651 (origin
9652 (method url-fetch)
9653 (uri (pypi-uri "python-magic" version))
9654 (sha256
9655 (base32
9656 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
9657 (file-name (string-append name "-" version "-checkout"))))
9658 (build-system python-build-system)
9659 (arguments
9660 ;; The tests are unreliable, so don't run them. The tests fail
9661 ;; under Python3 because they were written for Python2 and
9662 ;; contain import statements that do not work in Python3. One of
9663 ;; the tests fails under Python2 because its assertions are
9664 ;; overly stringent; it relies on comparing output strings which
9665 ;; are brittle and can change depending on the version of
9666 ;; libmagic being used and the system on which the test is
9667 ;; running. In my case, under GuixSD 0.10.0, only one test
9668 ;; failed, and it seems to have failed only because the version
9669 ;; of libmagic that is packaged in Guix outputs a slightly
9670 ;; different (but not wrong) string than the one that the test
9671 ;; expected.
9672 '(#:tests? #f
9673 #:phases (modify-phases %standard-phases
9674 ;; Replace a specific method call with a hard-coded
9675 ;; path to the necessary libmagic.so file in the
9676 ;; store. If we don't do this, then the method call
9677 ;; will fail to find the libmagic.so file, which in
9678 ;; turn will cause any application using
9679 ;; python-magic to fail.
9680 (add-before 'build 'hard-code-path-to-libmagic
9681 (lambda* (#:key inputs #:allow-other-keys)
9682 (let ((file (assoc-ref inputs "file")))
9683 (substitute* "magic.py"
9684 (("ctypes.util.find_library\\('magic'\\)")
9685 (string-append "'" file "/lib/libmagic.so'")))
9686 #t)))
9687 (add-before 'install 'disable-egg-compression
9688 (lambda _
9689 (let ((port (open-file "setup.cfg" "a")))
9690 (display "\n[easy_install]\nzip_ok = 0\n"
9691 port)
9692 (close-port port)
9693 #t))))))
9694 (inputs
9695 ;; python-magic needs to be able to find libmagic.so.
9696 `(("file" ,file)))
9697 (home-page
9698 "https://github.com/ahupp/python-magic")
9699 (synopsis
9700 "File type identification using libmagic")
9701 (description
9702 "This module uses ctypes to access the libmagic file type
9703 identification library. It makes use of the local magic database and
9704 supports both textual and MIME-type output. Note that this module and
9705 the python-file module both provide a \"magic.py\" file; these two
9706 modules, which are different and were developed separately, both serve
9707 the same purpose: to provide Python bindings for libmagic.")
9708 (license license:expat)))
9709
9710 (define-public python2-magic
9711 (package-with-python2 python-magic))
9712
9713 (define-public python2-s3cmd
9714 (package
9715 (name "python2-s3cmd")
9716 (version "1.6.1")
9717 (source
9718 (origin
9719 (method url-fetch)
9720 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
9721 "s3cmd-" version ".tar.gz"))
9722 (sha256
9723 (base32
9724 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9725 (build-system python-build-system)
9726 (arguments
9727 ;; s3cmd is written for python2 only and contains no tests.
9728 `(#:python ,python-2
9729 #:tests? #f))
9730 (propagated-inputs
9731 `(("python2-dateutil" ,python2-dateutil)
9732 ;; The python-file package also provides a magic.py module.
9733 ;; This is an unfortunate state of affairs; however, s3cmd
9734 ;; fails to install if it cannot find specifically the
9735 ;; python-magic package. Thus we include it, instead of using
9736 ;; python-file. Ironically, s3cmd sometimes works better
9737 ;; without libmagic bindings at all:
9738 ;; https://github.com/s3tools/s3cmd/issues/198
9739 ("python2-magic" ,python2-magic)))
9740 (home-page "http://s3tools.org/s3cmd")
9741 (synopsis "Command line tool for S3-compatible storage services")
9742 (description
9743 "S3cmd is a command line tool for uploading, retrieving and managing data
9744 in storage services that are compatible with the Amazon Simple Storage
9745 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9746 GnuPG encryption, and more. It also supports management of Amazon's
9747 CloudFront content delivery network.")
9748 (license license:gpl2+)))
9749
9750 (define-public python-pkgconfig
9751 (package
9752 (name "python-pkgconfig")
9753 (version "1.3.1")
9754 (source
9755 (origin
9756 (method url-fetch)
9757 (uri (pypi-uri "pkgconfig" version))
9758 (sha256
9759 (base32
9760 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
9761 (build-system python-build-system)
9762 (native-inputs
9763 `(("python-nose" ,python-nose)))
9764 (inputs
9765 `(("pkg-config" ,pkg-config)))
9766 (arguments
9767 `(#:phases
9768 (modify-phases %standard-phases
9769 (add-before 'build 'patch
9770 ;; Hard-code the path to pkg-config.
9771 (lambda _
9772 (substitute* "pkgconfig/pkgconfig.py"
9773 (("cmd = 'pkg-config")
9774 (string-append "cmd = '" (which "pkg-config"))))
9775 #t))
9776 (replace 'check
9777 (lambda _
9778 (invoke "nosetests" "test.py"))))))
9779 (home-page "https://github.com/matze/pkgconfig")
9780 (synopsis "Python interface for pkg-config")
9781 (description "This module provides a Python interface to pkg-config. It
9782 can be used to find all pkg-config packages, check if a package exists,
9783 check if a package meets certain version requirements, query CFLAGS and
9784 LDFLAGS and parse the output to build extensions with setup.py.")
9785 (license license:expat)))
9786
9787 (define-public python2-pkgconfig
9788 (package-with-python2 python-pkgconfig))
9789
9790 (define-public python-bz2file
9791 (package
9792 (name "python-bz2file")
9793 (version "0.98")
9794 (source
9795 (origin
9796 (method url-fetch)
9797 (uri (pypi-uri "bz2file" version))
9798 (sha256
9799 (base32
9800 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9801 (build-system python-build-system)
9802 (arguments
9803 `(#:tests? #f)) ; Tests use deprecated python modules.
9804 (home-page "https://github.com/nvawda/bz2file")
9805 (synopsis "Read and write bzip2-compressed files")
9806 (description
9807 "Bz2file is a Python library for reading and writing bzip2-compressed
9808 files. It contains a drop-in replacement for the I/O interface in the
9809 standard library's @code{bz2} module, including features from the latest
9810 development version of CPython that are not available in older releases.")
9811 (license license:asl2.0)))
9812
9813 (define-public python2-bz2file
9814 (package-with-python2 python-bz2file))
9815
9816 (define-public python-future
9817 (package
9818 (name "python-future")
9819 (version "0.17.1")
9820 (source
9821 (origin
9822 (method url-fetch)
9823 (uri (pypi-uri "future" version))
9824 (sha256
9825 (base32
9826 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
9827 (build-system python-build-system)
9828 ;; Many tests connect to the network or are otherwise flawed.
9829 ;; https://github.com/PythonCharmers/python-future/issues/210
9830 (arguments
9831 `(#:tests? #f))
9832 (home-page "http://python-future.org")
9833 (synopsis "Single-source support for Python 3 and 2")
9834 (description
9835 "@code{python-future} is the missing compatibility layer between Python 2 and
9836 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9837 to support both Python 2 and Python 3 with minimal overhead.")
9838 (license license:expat)))
9839
9840 (define-public python2-future
9841 (package-with-python2 python-future))
9842
9843 (define-public python-cysignals
9844 (package
9845 (name "python-cysignals")
9846 (version "1.9.0")
9847 (source
9848 (origin
9849 (method url-fetch)
9850 (uri (pypi-uri "cysignals" version))
9851 (sha256
9852 (base32
9853 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
9854 (build-system python-build-system)
9855 (native-inputs
9856 `(("python-cython" ,python-cython)
9857 ("python-sphinx" ,python-sphinx)))
9858 (inputs
9859 `(("pari-gp" ,pari-gp)))
9860 (arguments
9861 `(#:modules ((guix build python-build-system)
9862 ((guix build gnu-build-system) #:prefix gnu:)
9863 (guix build utils))
9864 ;; FIXME: Tests are executed after installation and currently fail
9865 ;; when not installing into standard locations; the author is working
9866 ;; on a fix.
9867 #:tests? #f
9868 #:phases
9869 (modify-phases %standard-phases
9870 (add-before
9871 'build 'configure
9872 (assoc-ref gnu:%standard-phases 'configure)))))
9873 (home-page
9874 "https://github.com/sagemath/cysignals")
9875 (synopsis
9876 "Handling of interrupts and signals for Cython")
9877 (description
9878 "The cysignals package provides mechanisms to handle interrupts (and
9879 other signals and errors) in Cython code, using two related approaches,
9880 for mixed Cython/Python code or external C libraries and pure Cython code,
9881 respectively.")
9882 (license license:lgpl3+)))
9883
9884 (define-public python2-cysignals
9885 (package-with-python2 python-cysignals))
9886
9887 (define-public python2-shedskin
9888 (package
9889 (name "python2-shedskin")
9890 (version "0.9.4")
9891 (source
9892 (origin
9893 (method url-fetch)
9894 (uri (string-append "https://github.com/shedskin/shedskin/"
9895 "releases/download/v" version
9896 "/shedskin-" version ".tgz"))
9897 (sha256
9898 (base32
9899 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9900 (build-system python-build-system)
9901 (arguments
9902 `(#:python ,python-2
9903 #:phases (modify-phases %standard-phases
9904 (add-after 'unpack 'fix-resulting-include-libs
9905 (lambda* (#:key inputs #:allow-other-keys)
9906 (let ((libgc (assoc-ref inputs "libgc"))
9907 (pcre (assoc-ref inputs "pcre")))
9908 (substitute* "shedskin/makefile.py"
9909 (("variable == 'CCFLAGS':[ ]*")
9910 (string-append "variable == 'CCFLAGS':\n"
9911 " line += ' -I " pcre "/include"
9912 " -I " libgc "/include'"))
9913 (("variable == 'LFLAGS':[ ]*")
9914 (string-append "variable == 'LFLAGS':\n"
9915 " line += ' -L" pcre "/lib"
9916 " -L " libgc "/lib'")))
9917 #t))))))
9918 (inputs `(("pcre" ,pcre)
9919 ("libgc" ,libgc)))
9920 (home-page "https://shedskin.github.io/")
9921 (synopsis "Experimental Python-2 to C++ Compiler")
9922 (description (string-append "This is an experimental compiler for a subset of
9923 Python. It generates C++ code and a Makefile."))
9924 (license (list license:gpl3 license:bsd-3 license:expat))))
9925
9926 (define-public python2-rope
9927 (package
9928 (name "python2-rope")
9929 (version "0.11.0")
9930 (source
9931 (origin
9932 (method url-fetch)
9933 (uri (pypi-uri "rope" version))
9934 (sha256
9935 (base32
9936 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
9937 (arguments
9938 ;; Rope has only partial python3 support, see `python-rope'
9939 `(#:python ,python-2))
9940 (build-system python-build-system)
9941 (native-inputs
9942 `(("python2-unittest2" ,python2-unittest2)))
9943 (home-page "https://github.com/python-rope/rope")
9944 (synopsis "Refactoring library for Python")
9945 (description "Rope is a refactoring library for Python. It facilitates
9946 the renaming, moving and extracting of attributes, functions, modules, fields
9947 and parameters in Python 2 source code. These refactorings can also be applied
9948 to occurrences in strings and comments.")
9949 (license license:gpl2)))
9950
9951 (define-public python-rope
9952 (package
9953 (inherit python2-rope)
9954 (name "python-rope")
9955 (arguments `(#:python ,python-wrapper
9956 ;; XXX: Only partial python3 support, results in some failing
9957 ;; tests: <https://github.com/python-rope/rope/issues/247>.
9958 #:tests? #f))
9959 (properties `((python2-variant . ,(delay python2-rope))))))
9960
9961 (define-public python-py3status
9962 (package
9963 (name "python-py3status")
9964 (version "3.16")
9965 (source
9966 (origin
9967 (method url-fetch)
9968 (uri (pypi-uri "py3status" version))
9969 (sha256
9970 (base32
9971 "1xrfph277bgjln3jbpzpgkhxad04fjvj7s3xfil42q1sxi4s3q3g"))))
9972 (build-system python-build-system)
9973 (inputs
9974 `(("file" ,file)))
9975 (arguments
9976 '(#:phases
9977 (modify-phases %standard-phases
9978 ;; 'file' is used for detection of configuration file encoding
9979 ;; let's make link the dependency to particular input
9980 (add-before 'build 'patch-file-path
9981 (lambda* (#:key inputs #:allow-other-keys)
9982 (let ((file-path (assoc-ref inputs "file")))
9983 (substitute* "py3status/parse_config.py"
9984 (("\\['file', '-b'")
9985 (string-append "['" file-path "/bin/file', '-b'")))
9986 #t))))
9987 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
9988 (home-page "https://github.com/ultrabug/py3status")
9989 (synopsis "Extensible i3status wrapper written in Python")
9990 (description "py3status is an i3status wrapper which extends i3status
9991 functionality in a modular way, allowing you to extend your panel with your
9992 own code, responding to click events and updating clock every second.")
9993 (license license:bsd-3)))
9994
9995 (define-public python-tblib
9996 (package
9997 (name "python-tblib")
9998 (version "1.3.2")
9999 (source (origin
10000 (method url-fetch)
10001 (uri (pypi-uri "tblib" version))
10002 (sha256 (base32
10003 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
10004 (build-system python-build-system)
10005 (arguments
10006 `(#:phases
10007 (modify-phases %standard-phases
10008 (add-before 'check 'adjust-tests
10009 (lambda _
10010 (when (which "python3")
10011 ;; Adjust the example output to match that of Python 3.7:
10012 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
10013 (substitute* "README.rst"
10014 (("Exception\\('fail',") "Exception('fail'"))
10015 #t)))
10016 (replace 'check
10017 (lambda _
10018 ;; Upstream runs tests after installation and the package itself
10019 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
10020 ;; found.
10021 (setenv "PYTHONPATH"
10022 (string-append (getcwd) "/build/lib:"
10023 (getenv "PYTHONPATH")))
10024 (invoke "py.test" "-vv" "tests" "README.rst"))))))
10025 (native-inputs
10026 `(("python-pytest" ,python-pytest)
10027 ("python-six" ,python-six)))
10028 (home-page "https://github.com/ionelmc/python-tblib")
10029 (synopsis "Traceback serialization library")
10030 (description
10031 "Traceback serialization allows you to:
10032
10033 @enumerate
10034 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
10035 different processes. This allows better error handling when running code over
10036 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
10037
10038 @item Parse traceback strings and raise with the parsed tracebacks.
10039 @end enumerate\n")
10040 (license license:bsd-3)))
10041
10042 (define-public python2-tblib
10043 (package-with-python2 python-tblib))
10044
10045 (define-public python-greenlet
10046 (package
10047 (name "python-greenlet")
10048 (version "0.4.15")
10049 (source (origin
10050 (method url-fetch)
10051 (uri (pypi-uri "greenlet" version))
10052 (sha256
10053 (base32
10054 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
10055 (build-system python-build-system)
10056 (home-page "https://greenlet.readthedocs.io/")
10057 (synopsis "Lightweight in-process concurrent programming")
10058 (description
10059 "Greenlet package is a spin-off of Stackless, a version of CPython
10060 that supports micro-threads called \"tasklets\". Tasklets run
10061 pseudo-concurrently (typically in a single or a few OS-level threads) and
10062 are synchronized with data exchanges on \"channels\".")
10063 (license (list license:psfl license:expat))))
10064
10065 (define-public python2-greenlet
10066 (package-with-python2 python-greenlet))
10067
10068 (define-public python-objgraph
10069 (package
10070 (name "python-objgraph")
10071 (version "3.4.0")
10072 (source
10073 (origin
10074 (method url-fetch)
10075 (uri (pypi-uri "objgraph" version))
10076 (sha256
10077 (base32
10078 "184m09am5gpbqfaiy7l0hwh476mczbrly1dffs0rw2p1d1i2q32a"))))
10079 (build-system python-build-system)
10080 (propagated-inputs
10081 `(("python-graphviz" ,python-graphviz)))
10082 (native-inputs
10083 `(("python-mock" ,python-mock)
10084 ("graphviz" ,graphviz)))
10085 (home-page "https://mg.pov.lt/objgraph/")
10086 (synopsis "Draw Python object reference graphs with graphviz")
10087 (description
10088 "This package provides tools to draw Python object reference graphs with
10089 graphviz.")
10090 (license license:expat)))
10091
10092 (define-public python-gevent
10093 (package
10094 (name "python-gevent")
10095 (version "1.3.7")
10096 (source (origin
10097 (method url-fetch)
10098 (uri (pypi-uri "gevent" version))
10099 (sha256
10100 (base32
10101 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
10102 (modules '((guix build utils)))
10103 (snippet
10104 '(begin
10105 ;; unbunding libev and c-ares
10106 (delete-file-recursively "deps")
10107 #t))))
10108 (build-system python-build-system)
10109 (arguments
10110 `(#:modules ((ice-9 ftw)
10111 (ice-9 match)
10112 (srfi srfi-26)
10113 (guix build utils)
10114 (guix build python-build-system))
10115 #:phases (modify-phases %standard-phases
10116 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
10117 (lambda _
10118 (substitute* "src/gevent/subprocess.py"
10119 (("/bin/sh") (which "sh")))
10120 (for-each (lambda (file)
10121 (substitute* file
10122 (("/bin/sh") (which "sh"))
10123 (("/bin/true") (which "true"))))
10124 (find-files "src/greentest" "\\.py$"))
10125 #t))
10126 (add-before 'build 'do-not-use-bundled-sources
10127 (lambda* (#:key inputs #:allow-other-keys)
10128 (setenv "CONFIG_SHELL" (which "bash"))
10129 (setenv "LIBEV_EMBED" "false")
10130 (setenv "CARES_EMBED" "false")
10131 (setenv "EMBED" "false")
10132
10133 ;; Prevent building bundled libev.
10134 (substitute* "setup.py"
10135 (("run_make=_BUILDING")
10136 "run_make=False"))
10137
10138 (let ((greenlet (string-append
10139 (assoc-ref inputs "python-greenlet")
10140 "/include")))
10141 (match (scandir greenlet
10142 (lambda (item)
10143 (string-prefix? "python" item)))
10144 ((python)
10145 (setenv "C_INCLUDE_PATH"
10146 (string-append greenlet "/" python)))))
10147 #t))
10148 (add-before 'check 'skip-timer-test
10149 (lambda _
10150 ;; XXX: Skip 'TestTimerResolution', which appears to be
10151 ;; unreliable.
10152 (substitute* "src/greentest/test__core_timer.py"
10153 (("not greentest.RUNNING_ON_CI") "False"))
10154 #t))
10155 (replace 'check
10156 (lambda _
10157 ;; Make sure the build directory is on PYTHONPATH.
10158 (setenv "PYTHONPATH"
10159 (string-append
10160 (getenv "PYTHONPATH") ":"
10161 (getcwd) "/build/"
10162 (car (scandir "build" (cut string-prefix? "lib." <>)))))
10163 (with-directory-excursion "src/greentest"
10164 ;; XXX: Many tests require network access. Instead we only
10165 ;; run known-good tests. Unfortunately we cannot use
10166 ;; recursion here since this directory also contains
10167 ;; Python-version-specific subfolders.
10168 (apply invoke "python" "testrunner.py" "--config"
10169 "known_failures.py"
10170 (scandir "." (cut regexp-exec
10171 (make-regexp "test_+(subprocess|core)")
10172 <>)))))))))
10173 (propagated-inputs
10174 `(("python-greenlet" ,python-greenlet)
10175 ("python-objgraph" ,python-objgraph)))
10176 (native-inputs
10177 `(("python-six" ,python-six)))
10178 (inputs
10179 `(("c-ares" ,c-ares)
10180 ("libev" ,libev)))
10181 (home-page "http://www.gevent.org/")
10182 (synopsis "Coroutine-based network library")
10183 (description
10184 "gevent is a coroutine-based Python networking library that uses greenlet
10185 to provide a high-level synchronous API on top of the libev event loop.")
10186 (license license:expat)
10187 (properties `((python2-variant . ,(delay python2-gevent))))))
10188
10189 (define-public python2-gevent
10190 (let ((base (package-with-python2
10191 (strip-python2-variant python-gevent))))
10192 (package
10193 (inherit base)
10194 (native-inputs `(,@(package-native-inputs python-gevent)
10195 ("python-mock" ,python2-mock))))))
10196
10197 (define-public python-fastimport
10198 (package
10199 (name "python-fastimport")
10200 (version "0.9.6")
10201 (source
10202 (origin
10203 (method url-fetch)
10204 (uri (pypi-uri "fastimport" version))
10205 (sha256
10206 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
10207 (build-system python-build-system)
10208 (home-page "https://github.com/jelmer/python-fastimport")
10209 (synopsis "VCS fastimport parser and generator in Python")
10210 (description "This package provides a parser for and generator of the Git
10211 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
10212 format.")
10213 (license license:gpl2+)))
10214
10215 (define-public python2-fastimport
10216 (package-with-python2 python-fastimport))
10217
10218 (define-public python-twisted
10219 (package
10220 (name "python-twisted")
10221 (version "19.7.0")
10222 (source (origin
10223 (method url-fetch)
10224 (uri (pypi-uri "Twisted" version ".tar.bz2"))
10225 (sha256
10226 (base32
10227 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
10228 (build-system python-build-system)
10229 (arguments
10230 '(#:tests? #f)) ; FIXME: some tests fail
10231 (propagated-inputs
10232 `(("python-zope-interface" ,python-zope-interface)
10233 ("python-pyhamcrest" ,python-pyhamcrest)
10234 ("python-incremental" ,python-incremental)
10235 ("python-hyperlink" ,python-hyperlink)
10236 ("python-constantly" ,python-constantly)
10237 ("python-automat" ,python-automat)))
10238 (home-page "https://twistedmatrix.com/")
10239 (synopsis "Asynchronous networking framework written in Python")
10240 (description
10241 "Twisted is an extensible framework for Python programming, with special
10242 focus on event-based network programming and multiprotocol integration.")
10243 (license license:expat)))
10244
10245 (define-public python2-twisted
10246 (package-with-python2 python-twisted))
10247
10248 (define-public python-pika
10249 (package
10250 (name "python-pika")
10251 (version "0.12.0")
10252 (source
10253 (origin
10254 (method url-fetch)
10255 (uri (pypi-uri "pika" version))
10256 (sha256
10257 (base32
10258 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
10259 (build-system python-build-system)
10260 (native-inputs
10261 `(("python-pyev" ,python-pyev)
10262 ("python-tornado" ,python-tornado)
10263 ("python-twisted" ,python-twisted)))
10264 (home-page "https://pika.readthedocs.org")
10265 (synopsis "Pure Python AMQP Client Library")
10266 (description
10267 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
10268 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
10269 network support library.")
10270 (license license:bsd-3)))
10271
10272 (define-public python2-pika
10273 (package-with-python2 python-pika))
10274
10275 (define-public python-ply
10276 (package
10277 (name "python-ply")
10278 (version "3.10")
10279 (source
10280 (origin
10281 (method url-fetch)
10282 (uri (pypi-uri "ply" version))
10283 (sha256
10284 (base32
10285 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
10286 (build-system python-build-system)
10287 (home-page "http://www.dabeaz.com/ply/")
10288 (synopsis "Python Lex & Yacc")
10289 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
10290 It uses LR parsing and does extensive error checking.")
10291 (license license:bsd-3)))
10292
10293 (define-public python2-ply
10294 (package-with-python2 python-ply))
10295
10296 (define-public python-tabulate
10297 (package
10298 (name "python-tabulate")
10299 (version "0.7.7")
10300 (source (origin
10301 (method url-fetch)
10302 (uri (pypi-uri "tabulate" version))
10303 (sha256
10304 (base32
10305 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
10306 (build-system python-build-system)
10307 (arguments
10308 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
10309 ;; and the latest release is not tagged in the upstream repository.
10310 '(#:tests? #f))
10311 (home-page "https://bitbucket.org/astanin/python-tabulate")
10312 (synopsis "Pretty-print tabular data")
10313 (description
10314 "Tabulate is a library and command-line utility to pretty-print tabular
10315 data in Python.")
10316 (license license:expat)))
10317
10318 (define-public python2-tabulate
10319 (package-with-python2 python-tabulate))
10320
10321 (define-public python-kazoo
10322 (package
10323 (name "python-kazoo")
10324 (version "2.4.0")
10325 (source
10326 (origin
10327 (method url-fetch)
10328 (uri (pypi-uri "kazoo" version))
10329 (sha256
10330 (base32
10331 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
10332 (build-system python-build-system)
10333 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
10334 (propagated-inputs
10335 `(("python-six" ,python-six)))
10336 (home-page "https://kazoo.readthedocs.org")
10337 (synopsis "High-level Zookeeper client library")
10338 (description
10339 "Kazoo is a Python client library for the Apache Zookeeper distributed
10340 application service. It is designed to be easy to use and to avoid common
10341 programming errors.")
10342 (license license:asl2.0)))
10343
10344 (define-public python2-kazoo
10345 (package-with-python2 python-kazoo))
10346
10347 (define-public python-pykafka
10348 (package
10349 (name "python-pykafka")
10350 (version "2.4.0")
10351 (source (origin
10352 (method url-fetch)
10353 (uri (pypi-uri "pykafka" version))
10354 (sha256
10355 (base32
10356 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10357 (build-system python-build-system)
10358 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
10359 (propagated-inputs
10360 `(("python-gevent" ,python-gevent)
10361 ("python-kazoo" ,python-kazoo)
10362 ("python-tabulate" ,python-tabulate)))
10363 (inputs
10364 `(("librdkafka" ,librdkafka)))
10365 (home-page "https://pykafka.readthedocs.io/")
10366 (synopsis "Apache Kafka client for Python")
10367 (description
10368 "PyKafka is a client for the Apache Kafka distributed messaging system.
10369 It includes Python implementations of Kafka producers and consumers, which
10370 are optionally backed by a C extension built on librdkafka.")
10371 (license license:asl2.0)))
10372
10373 (define-public python2-pykafka
10374 (package-with-python2 python-pykafka))
10375
10376 (define-public python-wcwidth
10377 (package
10378 (name "python-wcwidth")
10379 (version "0.1.7")
10380 (source
10381 (origin
10382 (method url-fetch)
10383 (uri (pypi-uri "wcwidth" version))
10384 (sha256
10385 (base32
10386 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
10387 (build-system python-build-system)
10388 (home-page "https://github.com/jquast/wcwidth")
10389 (synopsis "Measure number of terminal column cells of wide-character codes")
10390 (description "Wcwidth measures the number of terminal column cells of
10391 wide-character codes. It is useful for those implementing a terminal emulator,
10392 or programs that carefully produce output to be interpreted by one. It is a
10393 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
10394 specified in POSIX.1-2001 and POSIX.1-2008.")
10395 (license license:expat)))
10396
10397 (define-public python2-wcwidth
10398 (package-with-python2 python-wcwidth))
10399
10400 (define-public python2-jsonrpclib
10401 (package
10402 (name "python2-jsonrpclib")
10403 (version "0.1.7")
10404 (source (origin
10405 (method url-fetch)
10406 (uri (pypi-uri "jsonrpclib" version))
10407 (sha256
10408 (base32
10409 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10410 (build-system python-build-system)
10411 (arguments
10412 `(#:tests? #f
10413 #:python ,python-2))
10414 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10415 (synopsis "Implementation of JSON-RPC specification for Python")
10416 (description
10417 "This library is an implementation of the JSON-RPC specification.
10418 It supports both the original 1.0 specification, as well as the
10419 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10420 etc.")
10421 (license license:asl2.0)))
10422
10423 (define-public python-chai
10424 (package
10425 (name "python-chai")
10426 (version "1.1.2")
10427 (source (origin
10428 (method url-fetch)
10429 (uri (pypi-uri "chai" version))
10430 (sha256
10431 (base32
10432 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
10433 (build-system python-build-system)
10434 (home-page "https://github.com/agoragames/chai")
10435 (synopsis "Mocking framework for Python")
10436 (description
10437 "Chai provides an api for mocking, stubbing and spying your python
10438 objects, patterned after the Mocha library for Ruby.")
10439 (license license:bsd-3)))
10440
10441 (define-public python2-chai
10442 (package-with-python2 python-chai))
10443
10444 (define-public python-inflection
10445 (package
10446 (name "python-inflection")
10447 (version "0.3.1")
10448 (source
10449 (origin (method url-fetch)
10450 (uri (pypi-uri "inflection" version))
10451 (sha256
10452 (base32
10453 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10454 (build-system python-build-system)
10455 (native-inputs
10456 `(("python-pytest" ,python-pytest)))
10457 (home-page "https://github.com/jpvanhal/inflection")
10458 (synopsis "Python string transformation library")
10459 (description
10460 "Inflection is a string transformation library. It singularizes
10461 and pluralizes English words, and transforms strings from CamelCase to
10462 underscored string.")
10463 (license license:expat)))
10464
10465 (define-public python2-inflection
10466 (package-with-python2 python-inflection))
10467
10468 (define-public python-pylev
10469 (package
10470 (name "python-pylev")
10471 (version "1.3.0")
10472 (source (origin
10473 (method url-fetch)
10474 (uri (pypi-uri "pylev" version))
10475 (sha256
10476 (base32
10477 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
10478 (build-system python-build-system)
10479 (home-page "https://github.com/toastdriven/pylev")
10480 (synopsis "Levenshtein distance implementation in Python")
10481 (description "Pure Python Levenshtein implementation, based off the
10482 Wikipedia code samples at
10483 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
10484 (license license:bsd-3)))
10485
10486 (define-public python2-pylev
10487 (package-with-python2 python-pylev))
10488
10489 (define-public python-cleo
10490 (package
10491 (name "python-cleo")
10492 (version "0.6.1")
10493 (source (origin
10494 (method url-fetch)
10495 (uri (pypi-uri "cleo" version))
10496 (sha256
10497 (base32
10498 "0q1cf0szr0d54am4pypzwdnm74zpladdsinad94c2fz5i06fdpf7"))))
10499 (build-system python-build-system)
10500 (native-inputs
10501 `(;; For testing
10502 ("python-mock" ,python-mock)
10503 ("python-pytest-mock" ,python-pytest-mock)
10504 ("python-pytest" ,python-pytest)))
10505 (propagated-inputs
10506 `(("python-backpack" ,python-backpack)
10507 ("python-pastel" ,python-pastel)
10508 ("python-pylev" ,python-pylev)))
10509 (home-page "https://github.com/sdispater/cleo")
10510 (synopsis "Command-line arguments library for Python")
10511 (description
10512 "Cleo allows you to create command-line commands with signature in
10513 docstring and colored output.")
10514 (license license:expat)))
10515
10516 (define-public python2-cleo
10517 (package-with-python2 python-cleo))
10518
10519 (define-public python-lazy-object-proxy
10520 (package
10521 (name "python-lazy-object-proxy")
10522 (version "1.3.1")
10523 (source (origin
10524 (method url-fetch)
10525 (uri (pypi-uri "lazy-object-proxy" version))
10526 (sha256
10527 (base32
10528 "0yha7q9bhw857fwaby785d63mffhngl9npwzlk9i0pwlkwvbx4gb"))))
10529 (build-system python-build-system)
10530 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10531 (synopsis "Lazy object proxy for python")
10532 (description
10533 "Lazy object proxy is an object that wraps a callable but defers the call
10534 until the object is actually required, and caches the result of said call.")
10535 (license license:bsd-2)))
10536
10537 (define-public python2-lazy-object-proxy
10538 (package-with-python2 python-lazy-object-proxy))
10539
10540 (define-public python-dnspython
10541 (package
10542 (name "python-dnspython")
10543 (version "1.15.0")
10544 (source (origin
10545 (method url-fetch)
10546 (uri (string-append "http://www.dnspython.org/kits/"
10547 version "/dnspython-" version ".tar.gz"))
10548 (sha256
10549 (base32
10550 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
10551 (build-system python-build-system)
10552 (arguments '(#:tests? #f)) ; XXX: requires internet access
10553 (home-page "http://www.dnspython.org")
10554 (synopsis "DNS toolkit for Python")
10555 (description
10556 "dnspython is a DNS toolkit for Python. It supports almost all record
10557 types. It can be used for queries, zone transfers, and dynamic updates.
10558 It supports TSIG authenticated messages and EDNS0.")
10559 (license license:expat)))
10560
10561 (define-public python2-dnspython
10562 (package-with-python2 python-dnspython))
10563
10564 (define-public python-email-validator
10565 (package
10566 (name "python-email-validator")
10567 (version "1.0.2")
10568 (source
10569 (origin (method url-fetch)
10570 (uri (pypi-uri "email_validator" version))
10571 (sha256
10572 (base32
10573 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
10574 (build-system python-build-system)
10575 (arguments
10576 '(#:phases
10577 (modify-phases %standard-phases
10578 (add-before 'build 'use-dnspython
10579 (lambda _
10580 (substitute* "setup.py"
10581 (("dnspython3") "dnspython"))
10582 #t)))))
10583 (propagated-inputs
10584 `(("python-dnspython" ,python-dnspython)
10585 ("python-idna" ,python-idna)))
10586 (home-page "https://github.com/JoshData/python-email-validator")
10587 (synopsis "Email address validation library for Python")
10588 (description
10589 "This library validates email address syntax and deliverability.")
10590 (license license:cc0)))
10591
10592 (define-public python2-email-validator
10593 (package-with-python2 python-email-validator))
10594
10595 (define-public python-ukpostcodeparser
10596 (package
10597 (name "python-ukpostcodeparser")
10598 (version "1.0.3")
10599 (source (origin
10600 (method url-fetch)
10601 (uri (pypi-uri "UkPostcodeParser" version))
10602 (sha256
10603 (base32
10604 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10605 (build-system python-build-system)
10606 (home-page "https://github.com/hamstah/ukpostcodeparser")
10607 (synopsis "UK Postcode parser for Python")
10608 (description
10609 "This library provides the @code{parse_uk_postcode} function for
10610 parsing UK postcodes.")
10611 (license license:expat)))
10612
10613 (define-public python2-ukpostcodeparser
10614 (package-with-python2 python-ukpostcodeparser))
10615
10616 (define-public python-faker
10617 (package
10618 (name "python-faker")
10619 (version "0.7.9")
10620 (source (origin
10621 (method url-fetch)
10622 (uri (pypi-uri "Faker" version))
10623 (sha256
10624 (base32
10625 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
10626 (patches
10627 (search-patches "python-faker-fix-build-32bit.patch"))
10628 (modules '((guix build utils)))
10629 (snippet
10630 '(begin
10631 (for-each delete-file (find-files "." "\\.pyc$"))
10632 #t))))
10633 (build-system python-build-system)
10634 (arguments
10635 '(#:phases
10636 (modify-phases %standard-phases
10637 (replace 'check
10638 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
10639 (native-inputs
10640 `(;; For testing
10641 ("python-email-validator" ,python-email-validator)
10642 ("python-mock" ,python-mock)
10643 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
10644 (propagated-inputs
10645 `(("python-dateutil" ,python-dateutil)
10646 ("python-six" ,python-six)))
10647 (home-page "https://github.com/joke2k/faker")
10648 (synopsis "Python package that generates fake data")
10649 (description
10650 "Faker is a Python package that generates fake data such as names,
10651 addresses, and phone numbers.")
10652 (license license:expat)
10653 (properties `((python2-variant . ,(delay python2-faker))))))
10654
10655 (define-public python2-faker
10656 (let ((base (package-with-python2 (strip-python2-variant
10657 python-faker))))
10658 (package
10659 (inherit base)
10660 (propagated-inputs
10661 `(("python2-ipaddress" ,python2-ipaddress)
10662 ,@(package-propagated-inputs base))))))
10663
10664 (define-public python-pyaml
10665 (package
10666 (name "python-pyaml")
10667 (version "18.11.0")
10668 (source (origin
10669 (method url-fetch)
10670 (uri (pypi-uri "pyaml" version))
10671 (sha256
10672 (base32
10673 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
10674 (build-system python-build-system)
10675 (native-inputs
10676 `(("python-unidecode" ,python-unidecode)))
10677 (propagated-inputs
10678 `(("python-pyyaml" ,python-pyyaml)))
10679 (home-page "https://github.com/mk-fg/pretty-yaml")
10680 (synopsis "YAML pretty-print library for Python")
10681 (description
10682 "pyaml is a PyYAML based python module to produce pretty and readable
10683 YAML-serialized data.")
10684 (license license:wtfpl2)))
10685
10686 (define-public python2-pyaml
10687 (package-with-python2 python-pyaml))
10688
10689 (define-public python-backpack
10690 (package
10691 (name "python-backpack")
10692 (version "0.1")
10693 (source
10694 (origin
10695 (method url-fetch)
10696 (uri (pypi-uri "backpack" version))
10697 (sha256
10698 (base32
10699 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
10700 (build-system python-build-system)
10701 (native-inputs
10702 `(("python-pytest" ,python-pytest)
10703 ("python-nose" ,python-nose)))
10704 (propagated-inputs
10705 `(("python-simplejson" ,python-simplejson)))
10706 (home-page "https://github.com/sdispater/backpack")
10707 (synopsis "Utilities for working with Python collections")
10708 (description "Backpack provides some useful utilities for working with
10709 collections of data.")
10710 (license license:expat)))
10711
10712 (define-public python2-backpack
10713 (package-with-python2 python-backpack))
10714
10715 (define-public python-prompt-toolkit
10716 (package
10717 (name "python-prompt-toolkit")
10718 (version "2.0.7")
10719 (source
10720 (origin
10721 (method url-fetch)
10722 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10723 (sha256
10724 (base32
10725 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
10726 (build-system python-build-system)
10727 (arguments
10728 `(#:phases
10729 (modify-phases %standard-phases
10730 (delete 'check)
10731 (add-after 'install 'post-install-check
10732 (lambda* (#:key inputs outputs #:allow-other-keys)
10733 ;; HOME is needed for the test
10734 ;; "test_pathcompleter_can_expanduser".
10735 (setenv "HOME" "/tmp")
10736 (add-installed-pythonpath inputs outputs)
10737 (invoke "py.test"))))))
10738 (propagated-inputs
10739 `(("python-wcwidth" ,python-wcwidth)
10740 ("python-six" ,python-six)
10741 ("python-pygments" ,python-pygments)))
10742 (native-inputs
10743 `(("python-pytest" ,python-pytest)))
10744 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10745 (synopsis "Library for building command line interfaces in Python")
10746 (description
10747 "Prompt-Toolkit is a library for building interactive command line
10748 interfaces in Python. It's like GNU Readline but it also features syntax
10749 highlighting while typing, out-of-the-box multi-line input editing, advanced
10750 code completion, incremental search, support for Chinese double-width
10751 characters, mouse support, and auto suggestions.")
10752 (license license:bsd-3)))
10753
10754 (define-public python2-prompt-toolkit
10755 (package-with-python2 python-prompt-toolkit))
10756
10757 (define-public python-prompt-toolkit-1
10758 (package (inherit python-prompt-toolkit)
10759 (version "1.0.15")
10760 (source
10761 (origin
10762 (method url-fetch)
10763 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10764 (sha256
10765 (base32
10766 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
10767
10768 (define-public python2-prompt-toolkit-1
10769 (package-with-python2 python-prompt-toolkit-1))
10770
10771 (define-public python-jedi
10772 (package
10773 (name "python-jedi")
10774 (version "0.15.1")
10775 (source
10776 (origin
10777 (method url-fetch)
10778 (uri (pypi-uri "jedi" version))
10779 (sha256
10780 (base32
10781 "0bp4pxhsynaarbvzblsn5x32lzp29svy3sxfy8i6m5iwz9s9r1ds"))))
10782 (build-system python-build-system)
10783 (arguments
10784 `(#:phases
10785 (modify-phases %standard-phases
10786 (add-after 'unpack 'disable-file-completion-test
10787 ;; A single parameterized test currently fail (see:
10788 ;; https://github.com/davidhalter/jedi/issues/1395). Remove it.
10789 (lambda _
10790 (substitute* "test/test_api/test_completion.py"
10791 ((".*'example.py', 'rb\"' \\+ join\\('\\.\\.'.*") ""))
10792 #t))
10793 (replace 'check
10794 (lambda _
10795 (setenv "HOME" "/tmp")
10796 (invoke "python" "-m" "pytest"))))))
10797 (native-inputs
10798 `(("python-pytest" ,python-pytest)
10799 ("python-docopt" ,python-docopt)))
10800 (propagated-inputs
10801 `(("python-parso" ,python-parso)))
10802 (home-page "https://github.com/davidhalter/jedi")
10803 (synopsis "Autocompletion and static analysis library for Python")
10804 (description
10805 "Jedi is a static analysis tool for Python that can be used in Integrated
10806 Development Environments (@dfn{IDE}s) and text editors. It understands Python
10807 on a deeper level than many other static analysis frameworks for Python.
10808
10809 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
10810 well.")
10811 (license license:expat)))
10812
10813 (define-public python2-jedi
10814 (package-with-python2 python-jedi))
10815
10816 (define-public ptpython
10817 (package
10818 (name "ptpython")
10819 (version "0.34")
10820 (source (origin
10821 (method url-fetch)
10822 (uri (pypi-uri "ptpython" version))
10823 (sha256
10824 (base32
10825 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
10826 (build-system python-build-system)
10827 (arguments
10828 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
10829 (propagated-inputs
10830 `(("python-docopt" ,python-docopt)
10831 ("python-jedi" ,python-jedi)
10832 ("python-prompt-toolkit" ,python-prompt-toolkit)
10833 ("python-pygments" ,python-pygments)))
10834 (home-page "https://github.com/jonathanslenders/ptpython")
10835 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
10836 (description
10837 "ptpython is a Python read-eval-print loop with IDE-like features.
10838 It supports syntax highlighting, multiline editing, autocompletion, mouse,
10839 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
10840 etc.")
10841 (license license:bsd-3)
10842 (properties `((python2-variant . ,(delay ptpython-2))))))
10843
10844 (define-public ptpython-2
10845 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
10846 (package
10847 (inherit base)
10848 (name "ptpython2"))))
10849
10850 (define-public python-stem
10851 (package
10852 (name "python-stem")
10853 (version "1.7.1")
10854 (source
10855 (origin
10856 (method url-fetch)
10857 (uri (pypi-uri "stem" version))
10858 (sha256
10859 (base32
10860 "18lc95pmc7i089nlsb06dsxyjl5wbhxfqgdxbjcia35ndh8z7sn9"))))
10861 (build-system python-build-system)
10862 (arguments
10863 `(#:phases
10864 (modify-phases %standard-phases
10865 (replace 'check
10866 (lambda _
10867 (invoke "./run_tests.py" "--unit")
10868 #t)))))
10869 (native-inputs
10870 `(("python-mock" ,python-mock)
10871 ("python-pycodestyle" ,python-pycodestyle)
10872 ("python-pyflakes" ,python-pyflakes)))
10873 (home-page "https://stem.torproject.org/")
10874 (synopsis
10875 "Python controller library that allows applications to interact with Tor")
10876 (description
10877 "Stem is a Python controller library for Tor. With it you can use Tor's
10878 control protocol to script against the Tor process and read descriptor data
10879 relays publish about themselves.")
10880 (license license:lgpl3)))
10881
10882 (define-public python2-stem
10883 (package-with-python2 python-stem))
10884
10885 (define-public python-pyserial
10886 (package
10887 (name "python-pyserial")
10888 (version "3.1.1")
10889 (source
10890 (origin
10891 (method url-fetch)
10892 (uri (pypi-uri "pyserial" version))
10893 (sha256
10894 (base32
10895 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
10896 (build-system python-build-system)
10897 (arguments
10898 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
10899 ;; #:phases
10900 ;; (modify-phases %standard-phases
10901 ;; (replace 'check
10902 ;; (lambda _
10903 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
10904 (home-page
10905 "https://github.com/pyserial/pyserial")
10906 (synopsis "Python Serial Port Bindings")
10907 (description "@code{pyserial} provide serial port bindings for Python. It
10908 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
10909 and/or Xon/Xoff. The port is accessed in RAW mode.")
10910 (license license:bsd-3)))
10911
10912 (define-public python2-pyserial
10913 (package-with-python2 python-pyserial))
10914
10915 (define-public python-kivy
10916 (package
10917 (name "python-kivy")
10918 (version "1.10.1")
10919 (source
10920 (origin
10921 (method url-fetch)
10922 (uri (pypi-uri "Kivy" version))
10923 (file-name (string-append name "-" version ".tar.gz"))
10924 (sha256
10925 (base32
10926 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
10927 (build-system python-build-system)
10928 (arguments
10929 `(#:tests? #f ; Tests require many optional packages
10930 #:phases
10931 (modify-phases %standard-phases
10932 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
10933 (lambda* (#:key inputs #:allow-other-keys)
10934 (setenv "KIVY_SDL2_PATH"
10935 (string-append (assoc-ref inputs "sdl-union")
10936 "/include/SDL2"))
10937 #t)))))
10938 (native-inputs
10939 `(("git" ,git)
10940 ("pkg-config" ,pkg-config)
10941 ("python-cython" ,python-cython)))
10942 (inputs
10943 `(("gstreamer" ,gstreamer)
10944 ("mesa" ,mesa)
10945 ("sdl-union"
10946 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
10947 (home-page "http://kivy.org")
10948 (synopsis
10949 "Multitouch application framework")
10950 (description
10951 "A software library for rapid development of
10952 hardware-accelerated multitouch applications.")
10953 (license license:expat)))
10954
10955 (define-public python2-kivy
10956 (package-with-python2 python-kivy))
10957
10958 (define-public python-kivy-next
10959 (deprecated-package "python-kivy-next" python-kivy))
10960
10961 (define-public python2-kivy-next
10962 (deprecated-package "python2-kivy-next" python2-kivy))
10963
10964 (define-public python-binaryornot
10965 (package
10966 (name "python-binaryornot")
10967 (version "0.4.4")
10968 (source (origin
10969 (method url-fetch)
10970 (uri (pypi-uri "binaryornot" version))
10971 (sha256
10972 (base32
10973 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
10974 (build-system python-build-system)
10975 (propagated-inputs
10976 `(("python-chardet" ,python-chardet)
10977 ("python-hypothesis" ,python-hypothesis)))
10978 (home-page "https://github.com/audreyr/binaryornot")
10979 (synopsis "Package to check if a file is binary or text")
10980 (description "Ultra-lightweight pure Python package to check if a file is
10981 binary or text.")
10982 (license license:bsd-3)
10983 (properties `((python2-variant . ,(delay python2-binaryornot))))))
10984
10985 (define-public python2-binaryornot
10986 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
10987 (package (inherit base)
10988 (propagated-inputs
10989 `(("python2-enum34" ,python2-enum34)
10990 ,@(package-propagated-inputs base))))))
10991
10992 (define-public python-binwalk
10993 (let ((commit "64201acfb5b0a9cdd9faa58c40a36dcff8612e29")
10994 (revision "0"))
10995 (package
10996 (name "python-binwalk")
10997 (version (git-version "2.1.1" revision commit))
10998 (source
10999 (origin
11000 (method git-fetch)
11001 (uri (git-reference
11002 (url "https://github.com/ReFirmLabs/binwalk")
11003 (commit commit)))
11004 (file-name (git-file-name name version))
11005 (sha256
11006 (base32
11007 "1z7ca6rfp887hw5jc3sb45mm4fa0xid4lsp2z8g4r590dr7k7w15"))))
11008 (build-system python-build-system)
11009 (arguments
11010 `(#:phases
11011 (modify-phases %standard-phases
11012 (add-before 'check 'set-pythonpath
11013 (lambda _
11014 (setenv "PYTHONPATH"
11015 (string-append
11016 (getcwd) "/src/"
11017 ":" (getenv "PYTHONPATH")))
11018 (setenv "HOME" "")
11019 #t)))))
11020 (native-inputs
11021 `(("python-coverage" ,python-coverage)
11022 ("python-nose" ,python-nose)))
11023 (home-page "https://github.com/ReFirmLabs/binwalk")
11024 (synopsis "Firmware analysis tool")
11025 (description "Binwalk is a tool for analyzing, reverse engineering, and extracting firmware images")
11026 (license license:expat))))
11027
11028 (define-public python-nltk
11029 (package
11030 (name "python-nltk")
11031 (version "3.2.1")
11032 (source (origin
11033 (method url-fetch)
11034 (uri (pypi-uri "nltk" version))
11035 (sha256
11036 (base32
11037 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
11038 (build-system python-build-system)
11039 (arguments
11040 '(;; The tests require some extra resources to be downloaded.
11041 ;; TODO Try packaging these resources.
11042 #:tests? #f))
11043 (home-page "http://nltk.org/")
11044 (synopsis "Natural Language Toolkit")
11045 (description "It provides interfaces to over 50 corpora and lexical
11046 resources such as WordNet, along with a suite of text processing libraries
11047 for classification, tokenization, stemming, tagging, parsing, and semantic
11048 reasoning, wrappers for natural language processing libraries.")
11049 (license license:asl2.0)))
11050
11051 (define-public python2-nltk
11052 (package-with-python2 python-nltk))
11053
11054 (define-public python-pymongo
11055 (package
11056 (name "python-pymongo")
11057 (version "3.7.2")
11058 (source (origin
11059 (method url-fetch)
11060 (uri (pypi-uri "pymongo" version))
11061 (sha256
11062 (base32
11063 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
11064 (build-system python-build-system)
11065 (propagated-inputs
11066 `(("python-certifi" ,python-certifi)))
11067 (home-page "https://github.com/mongodb/mongo-python-driver")
11068 (synopsis "Python driver for MongoDB")
11069 (description "Python driver for MongoDB.")
11070 (license license:asl2.0)))
11071
11072 (define-public python2-pymongo
11073 (package-with-python2 python-pymongo))
11074
11075 (define-public python-consul
11076 (package
11077 (name "python-consul")
11078 (version "0.6.1")
11079 (source
11080 (origin
11081 (method url-fetch)
11082 (uri (pypi-uri "python-consul" version))
11083 (sha256
11084 (base32
11085 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
11086 (build-system python-build-system)
11087 (arguments
11088 '(#:tests? #f)) ; The tests are not distributed
11089 (propagated-inputs
11090 `(("python-requests" ,python-requests)
11091 ("python-six" ,python-six)))
11092 (home-page "https://github.com/cablehead/python-consul")
11093 (synopsis "Python client for Consul")
11094 (description
11095 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
11096 discovery, monitoring and configuration.")
11097 (license license:expat)))
11098
11099 (define-public python2-consul
11100 (package-with-python2 python-consul))
11101
11102 (define-public python-schematics
11103 (package
11104 (name "python-schematics")
11105 (version "1.1.1")
11106 (source
11107 (origin
11108 (method git-fetch)
11109 (uri (git-reference
11110 (url "https://github.com/schematics/schematics.git")
11111 (commit (string-append "v" version))))
11112 (file-name (git-file-name name version))
11113 (sha256
11114 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
11115 (build-system python-build-system)
11116 (propagated-inputs
11117 `(("python-six" ,python-six)))
11118 (arguments
11119 ;; The tests require a bunch of not very nice packages with fixed
11120 ;; version requirements (e.g. python-coveralls).
11121 `(#:tests? #f))
11122 (home-page "https://github.com/schematics/schematics")
11123 (synopsis "Python Data Structures for Humans")
11124 (description "Python Data Structures for Humans.")
11125 (license license:bsd-3)))
11126
11127 (define-public python2-schematics
11128 (package-with-python2 python-schematics))
11129
11130 (define-public python-odfpy
11131 (package
11132 (name "python-odfpy")
11133 (version "1.3.3")
11134 (source (origin
11135 (method url-fetch)
11136 (uri (pypi-uri "odfpy" version))
11137 (sha256
11138 (base32
11139 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
11140 (arguments
11141 `(#:modules ((srfi srfi-1)
11142 (guix build python-build-system)
11143 (guix build utils))
11144 #:phases
11145 (modify-phases %standard-phases
11146 (replace 'check
11147 ;; The test runner invokes python2 and python3 for test*.py.
11148 ;; To avoid having both in inputs, we replicate it here.
11149 (lambda _
11150 (for-each (lambda (test-file) (invoke "python" test-file))
11151 (find-files "tests" "^test.*\\.py$"))
11152 #t)))))
11153 (build-system python-build-system)
11154 (home-page "https://github.com/eea/odfpy")
11155 (synopsis "Python API and tools to manipulate OpenDocument files")
11156 (description "Collection of libraries and utility programs written in
11157 Python to manipulate OpenDocument 1.2 files.")
11158 (license
11159 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
11160 ;; number of files with other licenses.
11161 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
11162
11163 (define-public python2-odfpy
11164 (package-with-python2 python-odfpy))
11165
11166 (define-public python-natsort
11167 (package
11168 (name "python-natsort")
11169 (version "5.4.1")
11170 (source (origin
11171 (method url-fetch)
11172 (uri (pypi-uri "natsort" version))
11173 (sha256
11174 (base32
11175 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
11176 (build-system python-build-system)
11177 (arguments
11178 `(#:modules ((guix build utils)
11179 (guix build python-build-system)
11180 (srfi srfi-1)
11181 (srfi srfi-26)
11182 (ice-9 ftw))
11183 #:phases
11184 (modify-phases %standard-phases
11185 (add-before 'check 'set-cachedir
11186 ;; Tests require write access to $HOME by default
11187 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
11188 (replace 'check
11189 (lambda _
11190 (let ((cwd (getcwd)))
11191 (setenv "PYTHONPATH"
11192 (string-append
11193 cwd "/build/"
11194 (find (cut string-prefix? "lib" <>)
11195 (scandir (string-append cwd "/build")))
11196 ":"
11197 (getenv "PYTHONPATH")))
11198 (invoke "pytest" "-v")))))))
11199 (native-inputs
11200 `(("python-hypothesis" ,python-hypothesis)
11201 ("python-pytest-cov" ,python-pytest-cov)
11202 ("python-pytest-mock" ,python-pytest-mock)
11203 ("python-pytest" ,python-pytest)))
11204 (propagated-inputs ; TODO: Add python-fastnumbers.
11205 `(("python-pyicu" ,python-pyicu)))
11206 (home-page "https://github.com/SethMMorton/natsort")
11207 (synopsis "Natural sorting for python and shell")
11208 (description
11209 "Natsort lets you apply natural sorting on lists instead of
11210 lexicographical. If you use the built-in @code{sorted} method in python
11211 on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
11212 @code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
11213 @code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
11214 identifies numbers and sorts them separately from strings. It can also sort
11215 version numbers, real numbers, mixed types and more, and comes with a shell
11216 command @command{natsort} that exposes this functionality in the command line.")
11217 (license license:expat)
11218 (properties `((python2-variant . ,(delay python2-natsort))))))
11219
11220 (define-public python2-natsort
11221 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
11222 (package (inherit base)
11223 (native-inputs
11224 `(("python2-pathlib" ,python2-pathlib)
11225 ,@(package-native-inputs base))))))
11226
11227 (define-public python-glances
11228 (package
11229 (name "python-glances")
11230 (version "3.1.1")
11231 (source
11232 (origin
11233 (method url-fetch)
11234 (uri (pypi-uri "Glances" version))
11235 (sha256
11236 (base32
11237 "07j1ggzsqiskyz1i4mrnyr9i95v0dqi0i0hibnv1l188km8shmi8"))
11238 (modules '((guix build utils)))
11239 (snippet
11240 '(begin
11241 ;; Glances phones PyPI for weekly update checks by default.
11242 ;; Disable these. The user can re-enable them if desired.
11243 (substitute* "glances/outdated.py"
11244 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
11245 (string-append indentation
11246 "self.args.disable_check_update = True\n"
11247 line)))
11248 #t))))
11249 (build-system python-build-system)
11250 (propagated-inputs
11251 `(("python-future" ,python-future)
11252 ("python-psutil" ,python-psutil)))
11253 (home-page
11254 "https://github.com/nicolargo/glances")
11255 (synopsis "Cross-platform curses-based monitoring tool")
11256 (description
11257 "Glances is a curses-based monitoring tool for a wide variety of platforms.
11258 Glances uses the PsUtil library to get information from your system. It
11259 monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
11260 (license license:lgpl3+)))
11261
11262 (define-public python2-glances
11263 (package-with-python2 python-glances))
11264
11265 (define-public python-graphql-core
11266 (package
11267 (name "python-graphql-core")
11268 (version "0.5.3")
11269 (source
11270 (origin
11271 (method url-fetch)
11272 (uri (pypi-uri "graphql-core" version))
11273 (sha256
11274 (base32
11275 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
11276 (build-system python-build-system)
11277 (arguments
11278 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
11279 #:phases
11280 (modify-phases %standard-phases
11281 (add-after 'unpack 'patch-hardcoded-version
11282 (lambda _ (substitute*
11283 "setup.py"
11284 (("'gevent==1.1rc1'") "'gevent'"))
11285 #t)))))
11286 (native-inputs
11287 `(("python-gevent" ,python-gevent)
11288 ("python-mock" ,python-mock)
11289 ("python-pytest-mock" ,python-pytest-mock)))
11290 (propagated-inputs
11291 `(("python-promise" ,python-promise)
11292 ("python-six" ,python-six)))
11293 (home-page "https://github.com/graphql-python/graphql-core")
11294 (synopsis "GraphQL implementation for Python")
11295 (description
11296 "GraphQL implementation for Python. GraphQL is a data query language and
11297 runtime designed and used to request and deliver data to mobile and web apps.
11298 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
11299 to Python.")
11300 (license license:expat)))
11301
11302 (define-public python2-graphql-core
11303 (package-with-python2 python-graphql-core))
11304
11305 (define-public python-graphql-relay
11306 (package
11307 (name "python-graphql-relay")
11308 (version "0.4.5")
11309 (source
11310 (origin
11311 (method url-fetch)
11312 (uri (pypi-uri "graphql-relay" version))
11313 (sha256
11314 (base32
11315 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
11316 (build-system python-build-system)
11317 (arguments
11318 '(#:tests? #f)) ; The tests are not distributed
11319 (propagated-inputs
11320 `(("python-graphql-core" ,python-graphql-core)
11321 ("python-promise" ,python-promise)
11322 ("python-six" ,python-six)))
11323 (home-page "https://github.com/graphql-python/graphql-relay-py")
11324 (synopsis "Relay implementation for Python")
11325 (description
11326 "This is a library to allow the easy creation of Relay-compliant servers
11327 using the GraphQL Python reference implementation of a GraphQL server. It
11328 should be noted that the code is a exact port of the original
11329 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
11330 from Facebook.")
11331 (license license:expat)))
11332
11333 (define-public python2-graphql-relay
11334 (package-with-python2 python-graphql-relay))
11335
11336 (define-public python-graphene
11337 (package
11338 (name "python-graphene")
11339 (version "0.10.2")
11340 (source
11341 (origin
11342 (method url-fetch)
11343 (uri (pypi-uri "graphene" version))
11344 (sha256
11345 (base32
11346 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11347 (build-system python-build-system)
11348 (propagated-inputs
11349 `(("python-graphql-core" ,python-graphql-core)
11350 ("python-graphql-relay" ,python-graphql-relay)
11351 ("python-iso8601" ,python-iso8601)
11352 ("python-promise" ,python-promise)
11353 ("python-six" ,python-six)))
11354 (arguments
11355 `(#:tests? #f)) ; no tests/ in the PyPI tarball
11356 (home-page "http://graphene-python.org/")
11357 (synopsis "GraphQL Framework for Python")
11358 (description
11359 "Graphene is a Python library for building GraphQL schemas/types.
11360 A GraphQL schema describes your data model, and provides a GraphQL server
11361 with an associated set of resolve methods that know how to fetch data.")
11362 (properties `((python2-variant . ,(delay python2-graphene))))
11363 (license license:expat)))
11364
11365 (define-public python2-graphene
11366 (let ((base (package-with-python2
11367 (strip-python2-variant python-graphene))))
11368 (package (inherit base)
11369 (native-inputs
11370 `(("python2-sqlalchemy" ,python2-sqlalchemy)
11371 ,@(package-native-inputs base))))))
11372
11373 (define-public python-nautilus
11374 (package
11375 (name "python-nautilus")
11376 (version "0.4.9")
11377 (source
11378 (origin
11379 (method url-fetch)
11380 (uri (pypi-uri "nautilus" version))
11381 (sha256
11382 (base32
11383 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11384 (build-system python-build-system)
11385 (arguments `(#:tests? #f)) ; fails to import test modules
11386 (propagated-inputs
11387 `(("python-bcrypt" ,python-bcrypt)
11388 ("python-click" ,python-click)
11389 ("python-consul" ,python-consul)
11390 ("python-graphene" ,python-graphene)
11391 ("python-jinja2" ,python-jinja2)
11392 ("python-peewee" ,python-peewee)
11393 ("python-pika" ,python-pika)
11394 ("python-tornado" ,python-tornado)
11395 ("python-wtforms" ,python-wtforms)))
11396 (native-inputs
11397 `(("python-nose2" ,python-nose2)))
11398 (home-page "https://github.com/AlecAivazis/nautilus")
11399 (synopsis "Library for creating microservice applications")
11400 (description
11401 "Nautilus is a framework for flux based microservices that looks to
11402 provide extendible implementations of common aspects of a cloud so that you can
11403 focus on building massively scalable web applications.")
11404 (license license:expat)))
11405
11406 (define-public python-snowballstemmer
11407 (package
11408 (name "python-snowballstemmer")
11409 (version "1.2.1")
11410 (source (origin
11411 (method url-fetch)
11412 (uri (pypi-uri "snowballstemmer" version))
11413 (sha256
11414 (base32
11415 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
11416 (build-system python-build-system)
11417 (arguments
11418 `(;; No tests exist
11419 #:tests? #f))
11420 (home-page "https://github.com/shibukawa/snowball_py")
11421 (synopsis "Snowball stemming library collection for Python")
11422 (description "This package provides 16 word stemmer algorithms generated
11423 from Snowball algorithms. It includes the 15 original ones plus the Poerter
11424 English stemmer.")
11425 (license license:bsd-3)))
11426
11427 (define-public python2-snowballstemmer
11428 (package-with-python2 python-snowballstemmer))
11429
11430 (define-public python-setproctitle
11431 (package
11432 (name "python-setproctitle")
11433 (version "1.1.10")
11434 (source
11435 (origin
11436 (method url-fetch)
11437 (uri (pypi-uri "setproctitle" version))
11438 (sha256
11439 (base32
11440 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11441 (build-system python-build-system)
11442 (arguments
11443 '(#:phases
11444 (modify-phases %standard-phases
11445 (add-before 'check 'patch-Makefile
11446 ;; Stricly this is only required for the python2 variant.
11447 ;; But adding a phase in an inherited package seems to be
11448 ;; cumbersum. So we patch even for python3.
11449 (lambda _
11450 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11451 (when nose
11452 (substitute* "Makefile"
11453 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11454 (string-append nose "/bin/nosetests "))))
11455 #t)))
11456 (replace 'check
11457 (lambda _
11458 (setenv "PYTHON" (or (which "python3") (which "python")))
11459 (setenv "PYCONFIG" (or (which "python3-config")
11460 (which "python-config")))
11461 (setenv "CC" "gcc")
11462 ;; No need to extend PYTHONPATH to find the built package, since
11463 ;; the Makefile will build anyway
11464 (invoke "make" "check"))))))
11465 (native-inputs
11466 `(("procps" ,procps))) ; required for tests
11467 (home-page
11468 "https://github.com/dvarrazzo/py-setproctitle")
11469 (synopsis
11470 "Setproctitle implementation for Python to customize the process title")
11471 (description "The library allows a process to change its title (as displayed
11472 by system tools such as ps and top).
11473
11474 Changing the title is mostly useful in multi-process systems, for
11475 example when a master process is forked: changing the children's title
11476 allows to identify the task each process is busy with. The technique
11477 is used by PostgreSQL and the OpenSSH Server for example.")
11478 (license license:bsd-3)
11479 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11480
11481 (define-public python2-setproctitle
11482 (let ((base (package-with-python2
11483 (strip-python2-variant python-setproctitle))))
11484 (package
11485 (inherit base)
11486 (native-inputs `(("python2-nose" ,python2-nose)
11487 ,@(package-native-inputs base))))))
11488
11489 (define-public python-validictory
11490 (package
11491 (name "python-validictory")
11492 (version "1.0.1")
11493 (source
11494 (origin
11495 (method url-fetch)
11496 (uri (pypi-uri "validictory" version))
11497 (sha256
11498 (base32
11499 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11500 (build-system python-build-system)
11501 (arguments
11502 '(#:phases
11503 (modify-phases %standard-phases
11504 (add-after 'unpack 'bootstrap
11505 ;; Move the tests out of the package directory to avoid
11506 ;; packaging them.
11507 (lambda* _
11508 (rename-file "validictory/tests" "tests")
11509 (delete-file "tests/__init__.py")))
11510 (replace 'check
11511 (lambda _
11512 ;; Extend PYTHONPATH so the built package will be found.
11513 (setenv "PYTHONPATH"
11514 (string-append (getcwd) "/build/lib:"
11515 (getenv "PYTHONPATH")))
11516 (invoke "py.test" "-vv" ))))))
11517 (native-inputs
11518 `(("python-pytest" ,python-pytest)))
11519 (home-page
11520 "https://github.com/jamesturk/validictory")
11521 (synopsis "General purpose Python data validator")
11522 (description "It allows validation of arbitrary Python data structures.
11523
11524 The schema format is based on the JSON Schema
11525 proposal (http://json-schema.org), so combined with json the library is also
11526 useful as a validator for JSON data.")
11527 (license license:expat)))
11528
11529 (define-public python2-validictory
11530 (package-with-python2 python-validictory))
11531
11532 (define-public python-pyelftools
11533 (package
11534 (name "python-pyelftools")
11535 (version "0.25")
11536 (source
11537 (origin
11538 (method url-fetch)
11539 (uri (pypi-uri "pyelftools" version))
11540 (sha256
11541 (base32
11542 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
11543 (build-system python-build-system)
11544 (arguments
11545 `(#:phases
11546 (modify-phases %standard-phases
11547 (add-before 'check 'set-pythonpath
11548 (lambda _
11549 (setenv "PYTHONPATH"
11550 (string-append
11551 (getcwd) "/test/"
11552 ":" (getenv "PYTHONPATH")))
11553 #t)))))
11554 (home-page
11555 "https://github.com/eliben/pyelftools")
11556 (synopsis
11557 "Analyze binary and library file information")
11558 (description "This Python library provides interfaces for parsing and
11559 analyzing two binary and library file formats; the Executable and Linking
11560 Format (ELF), and debugging information in the Debugging With Attributed
11561 Record Format (DWARF).")
11562 (license license:public-domain)))
11563
11564 (define-public python-pyev
11565 (package
11566 (name "python-pyev")
11567 (version "0.9.0")
11568 (source
11569 (origin
11570 (method url-fetch)
11571 (uri (pypi-uri "pyev" version))
11572 (sha256
11573 (base32
11574 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
11575 (build-system python-build-system)
11576 (arguments
11577 `(#:tests? #f ; no test suite
11578 #:phases
11579 (modify-phases %standard-phases
11580 (add-after 'unpack 'patch
11581 (lambda* (#:key inputs #:allow-other-keys)
11582 (let ((libev (string-append (assoc-ref inputs "libev")
11583 "/lib/libev.so.4")))
11584 (substitute* "setup.py"
11585 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
11586 (string-append "libev_dll_name = \"" libev "\"")))))))))
11587 (inputs
11588 `(("libev" ,libev)))
11589 (home-page "http://pythonhosted.org/pyev/")
11590 (synopsis "Python libev interface")
11591 (description "Pyev provides a Python interface to libev.")
11592 (license license:gpl3)))
11593
11594 (define-public python2-pyev
11595 (package-with-python2 python-pyev))
11596
11597 (define-public python-imagesize
11598 (package
11599 (name "python-imagesize")
11600 (version "1.1.0")
11601 (source
11602 (origin
11603 (method url-fetch)
11604 (uri (pypi-uri "imagesize" version))
11605 (sha256
11606 (base32
11607 "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk"))))
11608 (build-system python-build-system)
11609 (home-page "https://github.com/shibukawa/imagesize_py")
11610 (synopsis "Gets image size of files in various formats in Python")
11611 (description
11612 "This package allows determination of image size from
11613 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
11614 (license license:expat)))
11615
11616 (define-public python2-imagesize
11617 (package-with-python2 python-imagesize))
11618
11619 (define-public python-termstyle
11620 (package
11621 (name "python-termstyle")
11622 (version "0.1.11")
11623 (source
11624 (origin
11625 (method url-fetch)
11626 (uri (pypi-uri "termstyle" version))
11627 (sha256
11628 (base32
11629 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
11630 (build-system python-build-system)
11631 (arguments
11632 '(#:phases
11633 (modify-phases %standard-phases
11634 (replace 'check
11635 (lambda _
11636 (invoke "python" "test3.py"))))))
11637 (home-page "https://github.com/gfxmonk/termstyle")
11638 (synopsis "Console text coloring for Python")
11639 (description "This package provides console text coloring for Python.")
11640 (license license:bsd-3)))
11641
11642 (define-public python-argcomplete
11643 (package
11644 (name "python-argcomplete")
11645 (version "1.7.0")
11646 (source
11647 (origin
11648 (method url-fetch)
11649 (uri (pypi-uri "argcomplete" version))
11650 (sha256
11651 (base32
11652 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
11653 (build-system python-build-system)
11654 (native-inputs
11655 `(("python-pexpect" ,python-pexpect)
11656 ("tcsh" ,tcsh)
11657 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
11658 (home-page "https://github.com/kislyuk/argcomplete")
11659 (synopsis "Shell tab completion for Python argparse")
11660 (description "argcomplete provides extensible command line tab completion
11661 of arguments and options for Python scripts using @code{argparse}. It's
11662 particularly useful for programs with many options or sub-parsers that can
11663 dynamically suggest completions; for example, when browsing resources over the
11664 network.")
11665 (license license:asl2.0)))
11666
11667 (define-public python2-argcomplete
11668 (package-with-python2 python-argcomplete))
11669
11670 (define-public python-xopen
11671 (package
11672 (name "python-xopen")
11673 (version "0.5.0")
11674 (source
11675 (origin
11676 (method url-fetch)
11677 (uri (pypi-uri "xopen" version))
11678 (sha256
11679 (base32
11680 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
11681 (build-system python-build-system)
11682 (propagated-inputs
11683 `(("python-setuptools-scm" ,python-setuptools-scm)))
11684 (home-page "https://github.com/marcelm/xopen/")
11685 (synopsis "Open compressed files transparently")
11686 (description "This module provides an @code{xopen} function that works like
11687 Python's built-in @code{open} function, but can also deal with compressed files.
11688 Supported compression formats are gzip, bzip2 and, xz, and are automatically
11689 recognized by their file extensions. The focus is on being as efficient as
11690 possible on all supported Python versions.")
11691 (license license:expat)))
11692
11693 (define-public python2-xopen
11694 (let ((base (package-with-python2
11695 (strip-python2-variant python-xopen))))
11696 (package
11697 (inherit base)
11698 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
11699 ,@(package-propagated-inputs base))))))
11700
11701 (define-public python-cheetah
11702 (package
11703 (name "python-cheetah")
11704 (version "3.1.0")
11705 (source
11706 (origin
11707 (method url-fetch)
11708 (uri (pypi-uri "Cheetah3" version))
11709 (sha256
11710 (base32
11711 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
11712 (build-system python-build-system)
11713 (arguments
11714 `(#:modules ((guix build utils)
11715 (guix build python-build-system)
11716 (ice-9 ftw)
11717 (srfi srfi-1)
11718 (srfi srfi-26))
11719 #:phases (modify-phases %standard-phases
11720 (add-after 'unpack 'use-absolute-python
11721 (lambda _
11722 (substitute* "Cheetah/CheetahWrapper.py"
11723 (("#!/usr/bin/env python")
11724 (string-append "#!" (which "python"))))
11725 #t))
11726 (replace 'check
11727 (lambda _
11728 (let ((cwd (getcwd)))
11729 (setenv "PYTHONPATH"
11730 (string-append
11731 cwd "/build/"
11732 (find (cut string-prefix? "lib" <>)
11733 (scandir (string-append cwd "/build")))
11734 ":" (getenv "PYTHONPATH")))
11735 (setenv "PATH"
11736 (string-append (getenv "PATH")
11737 ":" cwd "/bin"))
11738 (setenv "TMPDIR" "/tmp")
11739
11740 (substitute* "Cheetah/Tests/Test.py"
11741 (("unittest.TextTestRunner\\(\\)")
11742 "unittest.TextTestRunner(verbosity=2)"))
11743
11744 (invoke "python" "Cheetah/Tests/Test.py")))))))
11745 (propagated-inputs
11746 `(("python-markdown" ,python-markdown))) ;optional
11747 (home-page "http://cheetahtemplate.org/")
11748 (synopsis "Template engine")
11749 (description "Cheetah is a text-based template engine and Python code
11750 generator.
11751
11752 Cheetah can be used as a standalone templating utility or referenced as
11753 a library from other Python applications. It has many potential uses,
11754 but web developers looking for a viable alternative to ASP, JSP, PHP and
11755 PSP are expected to be its principle user group.
11756
11757 Features:
11758 @enumerate
11759 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
11760 text-based format.
11761 @item Cleanly separates content, graphic design, and program code.
11762 @item Blends the power and flexibility of Python with a simple template language
11763 that non-programmers can understand.
11764 @item Gives template writers full access to any Python data structure, module,
11765 function, object, or method in their templates.
11766 @item Makes code reuse easy by providing an object-orientated interface to
11767 templates that is accessible from Python code or other Cheetah templates.
11768 One template can subclass another and selectively reimplement sections of it.
11769 @item Provides a simple, yet powerful, caching mechanism that can dramatically
11770 improve the performance of a dynamic website.
11771 @item Compiles templates into optimized, yet readable, Python code.
11772 @end enumerate")
11773 (license (license:x11-style "file://LICENSE"))))
11774
11775 (define-public python2-cheetah
11776 (package-with-python2 python-cheetah))
11777
11778 (define-public python-dulwich
11779 (package
11780 (name "python-dulwich")
11781 (version "0.18.6")
11782 (source
11783 (origin
11784 (method url-fetch)
11785 (uri (list (string-append "https://www.dulwich.io/releases/"
11786 "dulwich-" version ".tar.gz")
11787 (pypi-uri "dulwich" version)))
11788 (sha256
11789 (base32
11790 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
11791 (build-system python-build-system)
11792 (arguments
11793 `(#:phases
11794 (modify-phases %standard-phases
11795 (add-before 'check 'fix-tests
11796 (lambda* (#:key inputs #:allow-other-keys)
11797 ;; The tests use Popen with a custom environment which doesn't
11798 ;; include PATH.
11799 (substitute* "dulwich/tests/compat/utils.py"
11800 (("'git'") (string-append "'"
11801 (which "git")
11802 "'")))
11803 (substitute* '("dulwich/tests/test_repository.py"
11804 "dulwich/tests/test_hooks.py")
11805 (("#!/bin/sh") (string-append "#!" (which "sh"))))
11806 (setenv "TEST_RUNNER" "unittest")
11807 (setenv "PYTHONHASHSEED" "random")
11808 #t)))))
11809 (propagated-inputs
11810 `(("python-fastimport" ,python-fastimport)))
11811 (native-inputs
11812 `(("python-mock" ,python-mock)
11813 ("python-geventhttpclient" ,python-geventhttpclient)
11814 ("git" ,git)))
11815 (home-page "https://www.dulwich.io/")
11816 (synopsis "Git implementation in Python")
11817 (description "Dulwich is an implementation of the Git file formats and
11818 protocols written in pure Python.")
11819 ;; Can be used with either license.
11820 (license (list license:asl2.0 license:gpl2+))))
11821
11822 (define-public python2-dulwich
11823 (package-with-python2 python-dulwich))
11824
11825 (define-public python-pbkdf2
11826 (package
11827 (name "python-pbkdf2")
11828 (version "1.3")
11829 (source
11830 (origin
11831 (method url-fetch)
11832 (uri (pypi-uri "pbkdf2" version))
11833 (sha256
11834 (base32
11835 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
11836 (build-system python-build-system)
11837 (arguments
11838 '(#:phases
11839 (modify-phases %standard-phases
11840 (replace 'check
11841 (lambda _
11842 (setenv "PYTHONPATH"
11843 (string-append (getcwd) "/build/lib:"
11844 (getenv "PYTHONPATH")))
11845 (invoke "python" "test/test_pbkdf2.py"))))))
11846 (propagated-inputs
11847 `(("python-pycrypto" ,python-pycrypto))) ; optional
11848 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
11849 (synopsis "Password-based key derivation")
11850 (description "This module implements the password-based key derivation
11851 function, PBKDF2, specified in RSA PKCS#5 v2.0.
11852
11853 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
11854 is part of the RSA Public Key Cryptography Standards series. The provided
11855 implementation takes a password or a passphrase and a salt value (and
11856 optionally a iteration count, a digest module, and a MAC module) and provides
11857 a file-like object from which an arbitrarly-sized key can be read.")
11858 (license license:expat)))
11859
11860 (define-public python2-pbkdf2
11861 (package-with-python2 python-pbkdf2))
11862
11863 (define-public python-qrcode
11864 (package
11865 (name "python-qrcode")
11866 (version "6.1")
11867 (source
11868 (origin
11869 (method url-fetch)
11870 (uri (pypi-uri "qrcode" version))
11871 (sha256
11872 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
11873 (build-system python-build-system)
11874 (arguments
11875 ;; FIXME: Tests require packaging 'pymaging'.
11876 '(#:tests? #f))
11877 (propagated-inputs
11878 `(("python-lxml" ,python-lxml) ; for SVG output
11879 ("python-pillow" ,python-pillow) ; for PNG output
11880 ("python-six" ,python-six)))
11881 (home-page "https://github.com/lincolnloop/python-qrcode")
11882 (synopsis "QR Code image generator")
11883 (description "This package provides a pure Python QR Code generator
11884 module. It uses the Python Imaging Library (PIL) to allow for the generation
11885 of QR Codes.
11886
11887 In addition this package provides a command line tool to generate QR codes and
11888 either write these QR codes to a file or do the output as ascii art at the
11889 console.")
11890 (license license:bsd-3)))
11891
11892 (define-public python2-qrcode
11893 (package-with-python2 python-qrcode))
11894
11895 (define-public python-rst2ansi
11896 (package
11897 (name "python-rst2ansi")
11898 (version "0.1.5")
11899 (source
11900 (origin
11901 (method url-fetch)
11902 (uri (pypi-uri "rst2ansi" version))
11903 (sha256
11904 (base32
11905 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
11906 (build-system python-build-system)
11907 (propagated-inputs
11908 `(("python-docutils" ,python-docutils)))
11909 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
11910 (synopsis "Convert RST to ANSI-decorated console output")
11911 (description
11912 "Python module dedicated to rendering RST (reStructuredText) documents
11913 to ansi-escaped strings suitable for display in a terminal.")
11914 (license license:expat)))
11915
11916 (define-public python-ansi2html
11917 (package
11918 (name "python-ansi2html")
11919 (version "1.2.0")
11920 (source
11921 (origin
11922 (method url-fetch)
11923 (uri (pypi-uri "ansi2html" version))
11924 (sha256
11925 (base32
11926 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
11927 (build-system python-build-system)
11928 (native-inputs
11929 `(("python-mock" ,python-mock)
11930 ("python-nose" ,python-nose)))
11931 (propagated-inputs
11932 `(("python-six" ,python-six)))
11933 (home-page "https://github.com/ralphbean/ansi2html")
11934 (synopsis "Convert ANSI-decorated console output to HTML")
11935 (description
11936 "@command{ansi2html} is a Python library and command line utility for
11937 convering text with ANSI color codes to HTML or LaTeX.")
11938 (license license:gpl3+)))
11939
11940 (define-public python2-ansi2html
11941 (package-with-python2 python-ansi2html))
11942
11943 (define-public python-ddt
11944 (package
11945 (name "python-ddt")
11946 (version "1.1.3")
11947 (source
11948 (origin
11949 (method url-fetch)
11950 (uri (pypi-uri "ddt" version))
11951 (sha256
11952 (base32
11953 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
11954 (build-system python-build-system)
11955 (native-inputs
11956 `(("python-mock" ,python-mock)
11957 ("python-nose" ,python-nose)))
11958 (propagated-inputs
11959 `(("python-six" ,python-six)
11960 ("python-pyyaml" ,python-pyyaml)))
11961 (home-page "https://github.com/txels/ddt")
11962 (synopsis "Data-Driven Tests")
11963 (description
11964 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
11965 running it with different test data, and make it appear as multiple test
11966 cases.")
11967 (license license:expat)))
11968
11969 (define-public python2-ddt
11970 (package-with-python2 python-ddt))
11971
11972 (define-public python-pycountry
11973 (package
11974 (name "python-pycountry")
11975 (version "18.5.26")
11976 (source
11977 (origin
11978 (method url-fetch)
11979 (uri (pypi-uri "pycountry" version))
11980 (sha256
11981 (base32
11982 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
11983 (build-system python-build-system)
11984 (home-page "https://bitbucket.org/flyingcircus/pycountry")
11985 (synopsis "ISO databases for languages, countries, currencies, etc.")
11986 (description
11987 "@code{pycountry} provides the ISO databases for the standards:
11988 @enumerate
11989 @item 639-3 (Languages)
11990 @item 3166 (Countries)
11991 @item 3166-3 (Deleted Countries)
11992 @item 3166-2 (Subdivisions of countries)
11993 @item 4217 (Currencies)
11994 @item 15924 (Scripts)
11995 @end enumerate
11996 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
11997 through a Python API.")
11998 (license license:lgpl2.1+)))
11999
12000 (define-public python2-pycountry
12001 (package-with-python2 python-pycountry))
12002
12003 (define-public python-pycosat
12004 (package
12005 (name "python-pycosat")
12006 (version "0.6.1")
12007 (source
12008 (origin
12009 (method url-fetch)
12010 (uri (pypi-uri "pycosat" version))
12011 (sha256
12012 (base32
12013 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
12014 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
12015 (build-system python-build-system)
12016 (home-page "https://github.com/ContinuumIO/pycosat")
12017 (synopsis "Bindings to picosat (a SAT solver)")
12018 (description
12019 "This package provides efficient Python bindings to @code{picosat} on
12020 the C level. When importing pycosat, the @code{picosat} solver becomes part
12021 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
12022 Problem} (SAT) solver.")
12023 (license license:expat)))
12024
12025 (define-public python2-pycosat
12026 (package-with-python2 python-pycosat))
12027
12028 (define-public python2-ruamel.ordereddict
12029 (package
12030 (name "python2-ruamel.ordereddict")
12031 (version "0.4.9")
12032 (source
12033 (origin
12034 (method url-fetch)
12035 (uri (pypi-uri "ruamel.ordereddict" version))
12036 (sha256
12037 (base32
12038 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
12039 (build-system python-build-system)
12040 (arguments
12041 `(#:python ,python-2
12042 #:phases
12043 (modify-phases %standard-phases
12044 (delete 'check)
12045 (add-after 'install 'check
12046 (lambda* (#:key inputs outputs #:allow-other-keys)
12047 (add-installed-pythonpath inputs outputs)
12048 (invoke "python" "test/testordereddict.py"))))))
12049 (home-page "https://bitbucket.org/ruamel/ordereddict")
12050 (synopsis "Version of dict that keeps keys in insertion order")
12051 (description
12052 "This is an implementation of an ordered dictionary with @dfn{Key
12053 Insertion Order} (KIO: updates of values do not affect the position of the
12054 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
12055 removed and put at the back). The standard library module @code{OrderedDict},
12056 implemented later, implements a subset of @code{ordereddict} functionality.
12057 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
12058 Order} (KSO, no sorting function can be specified, but a transform can be
12059 specified to apply on the key before comparison (e.g. @code{string.lower})).")
12060 (license license:expat)))
12061
12062 (define-public python-pypeg2
12063 (package
12064 (name "python-pypeg2")
12065 (version "2.15.2")
12066 (source
12067 (origin
12068 (method url-fetch)
12069 (uri (pypi-uri "pyPEG2" version))
12070 (sha256
12071 (base32
12072 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
12073 (build-system python-build-system)
12074 (propagated-inputs `(("python-lxml" ,python-lxml)))
12075 (arguments
12076 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
12077 '(#:tests? #f))
12078 (home-page "https://fdik.org/pyPEG/")
12079 (synopsis "Parsering Expression Grammars in Python")
12080 (description "PyPEG is an intrinsic parser interpreter framework for
12081 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
12082 parse many formal languages.")
12083 (license license:gpl2)))
12084
12085 (define-public python-incremental
12086 (package
12087 (name "python-incremental")
12088 (version "17.5.0")
12089 (source
12090 (origin
12091 (method url-fetch)
12092 (uri (pypi-uri "incremental" version))
12093 (sha256
12094 (base32
12095 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
12096 (build-system python-build-system)
12097 (home-page "https://github.com/hawkowl/incremental")
12098 (synopsis "Library for versioning Python projects")
12099 (description "Incremental is a small library that versions your Python
12100 projects.")
12101 (license license:expat)))
12102
12103 (define-public python2-incremental
12104 (package-with-python2 python-incremental))
12105
12106 (define-public python-invoke
12107 (package
12108 (name "python-invoke")
12109 (home-page "http://www.pyinvoke.org/")
12110 (version "1.1.0")
12111 (source (origin
12112 (method url-fetch)
12113 (uri (pypi-uri "invoke" version))
12114 (sha256
12115 (base32
12116 "0aiy1xvk1f91246zxd1zqrm679vdvd10h843a2na41cqr3cflpi6"))))
12117 (build-system python-build-system)
12118 (arguments
12119 ;; XXX: Requires many dependencies that are not yet in Guix.
12120 `(#:tests? #f))
12121 (synopsis "Pythonic task execution")
12122 (description
12123 "Invoke is a Python task execution tool and library, drawing inspiration
12124 from various sources to arrive at a powerful and clean feature set. It is
12125 evolved from the Fabric project, but focuses on local and abstract concerns
12126 instead of servers and network commands.")
12127 (license license:bsd-3)))
12128
12129 (define-public python2-invoke
12130 (package-with-python2 python-invoke))
12131
12132 (define-public python-automat
12133 (package
12134 (name "python-automat")
12135 (version "0.7.0")
12136 (source (origin
12137 (method url-fetch)
12138 (uri (pypi-uri "Automat" version))
12139 (sha256
12140 (base32
12141 "03ivg70n3b1cbcd2zvjhk8y4kmqxcvhmili39lmgx09dza1qpmyb"))))
12142 (build-system python-build-system)
12143 ;; We disable the tests because they require python-twisted, while
12144 ;; python-twisted depends on python-automat. Twisted is optional, but the
12145 ;; tests fail if it is not available. Also see
12146 ;; <https://github.com/glyph/automat/issues/71>.
12147 (arguments '(#:tests? #f))
12148 (native-inputs
12149 `(("python-m2r" ,python-m2r)
12150 ("python-setuptools-scm" ,python-setuptools-scm)
12151 ("python-graphviz" ,python-graphviz)))
12152 (propagated-inputs
12153 `(("python-six" ,python-six)
12154 ("python-attrs" ,python-attrs)))
12155 (home-page "https://github.com/glyph/Automat")
12156 (synopsis "Self-service finite-state machines")
12157 (description "Automat is a library for concise, idiomatic Python
12158 expression of finite-state automata (particularly deterministic finite-state
12159 transducers).")
12160 (license license:expat)))
12161
12162 (define-public python2-automat
12163 (package-with-python2 python-automat))
12164
12165 (define-public python-m2r
12166 (package
12167 (name "python-m2r")
12168 (version "0.2.1")
12169 (source (origin
12170 (method url-fetch)
12171 (uri (pypi-uri "m2r" version))
12172 (sha256
12173 (base32
12174 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
12175 (build-system python-build-system)
12176 (propagated-inputs
12177 `(("python-docutils" ,python-docutils)
12178 ("python-mistune" ,python-mistune)))
12179 (native-inputs
12180 `(("python-pygments" ,python-pygments)
12181 ("python-mock" ,python-mock)))
12182 (home-page "https://github.com/miyakogi/m2r")
12183 (synopsis "Markdown to reStructuredText converter")
12184 (description "M2R converts a markdown file including reST markups to valid
12185 reST format.")
12186 (license license:expat)))
12187
12188 (define-public python2-m2r
12189 (package-with-python2 python-m2r))
12190
12191 (define-public python-constantly
12192 (package
12193 (name "python-constantly")
12194 (version "15.1.0")
12195 (source (origin
12196 (method url-fetch)
12197 (uri (pypi-uri "constantly" version))
12198 (sha256
12199 (base32
12200 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
12201 (build-system python-build-system)
12202 (home-page "https://github.com/twisted/constantly")
12203 (synopsis "Symbolic constants in Python")
12204 (description "Constantly is a Python library that provides symbolic
12205 constant support. It includes collections and constants with text, numeric,
12206 and bit flag values.")
12207 (license license:expat)))
12208
12209 (define-public python2-constantly
12210 (package-with-python2 python-constantly))
12211
12212 (define-public python-attrs
12213 (package
12214 (name "python-attrs")
12215 (version "19.1.0")
12216 (source (origin
12217 (method url-fetch)
12218 (uri (pypi-uri "attrs" version))
12219 (sha256
12220 (base32
12221 "16g33zr5f449lqc5wgvzpknxryfzrfsxcr6kpgxwn7l5fkv71f7h"))))
12222 (build-system python-build-system)
12223 (arguments
12224 `(#:modules ((guix build utils)
12225 (guix build python-build-system)
12226 (ice-9 ftw)
12227 (srfi srfi-1)
12228 (srfi srfi-26))
12229 #:phases (modify-phases %standard-phases
12230 (replace 'check
12231 (lambda _
12232 (let ((cwd (getcwd)))
12233 (setenv "PYTHONPATH"
12234 (string-append
12235 cwd "/build/"
12236 (find (cut string-prefix? "lib" <>)
12237 (scandir (string-append cwd "/build")))
12238 ":"
12239 (getenv "PYTHONPATH")))
12240 (invoke "python" "-m" "pytest")))))))
12241 (native-inputs
12242 `(("python-coverage" ,python-coverage)
12243 ("python-hypothesis" ,python-hypothesis)
12244 ("python-pympler" ,python-pympler)
12245 ("python-pytest" ,python-pytest)
12246 ("python-six" ,python-six)
12247 ("python-sphinx" ,python-sphinx)
12248 ("python-zope-interface" ,python-zope-interface)))
12249 (home-page "https://github.com/python-attrs/attrs/")
12250 (synopsis "Attributes without boilerplate")
12251 (description "@code{attrs} is a Python package with class decorators that
12252 ease the chores of implementing the most common attribute-related object
12253 protocols.")
12254 (license license:expat)))
12255
12256 (define-public python2-attrs
12257 (package-with-python2 python-attrs))
12258
12259 (define-public python-attrs-bootstrap
12260 (package
12261 (inherit python-attrs)
12262 (name "python-attrs-bootstrap")
12263 (native-inputs `())
12264 (arguments `(#:tests? #f))))
12265
12266 (define-public python2-attrs-bootstrap
12267 (package-with-python2 python-attrs-bootstrap))
12268
12269 (define-public python2-cliapp
12270 (package
12271 (name "python2-cliapp")
12272 (version "1.20180812.1")
12273 (source
12274 (origin
12275 (method url-fetch)
12276 (uri (string-append
12277 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
12278 version ".tar.gz"))
12279 (sha256
12280 (base32
12281 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
12282 (build-system python-build-system)
12283 (arguments
12284 `(#:python ,python-2
12285 #:phases
12286 (modify-phases %standard-phases
12287 ;; check phase needs to be run before the build phase. If not,
12288 ;; coverage-test-runner looks for tests for the built source files,
12289 ;; and fails.
12290 (delete 'check)
12291 (add-before 'build 'check
12292 (lambda _
12293 ;; Disable python3 tests
12294 (substitute* "check"
12295 (("python3") "# python3"))
12296 (invoke "./check"))))))
12297 (native-inputs
12298 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12299 ("python2-pep8" ,python2-pep8)))
12300 (propagated-inputs
12301 `(("python2-pyaml" ,python2-pyaml)))
12302 (home-page "https://liw.fi/cliapp/")
12303 (synopsis "Python framework for command line programs")
12304 (description "@code{python2-cliapp} is a python framework for
12305 command line programs. It contains the typical stuff such programs
12306 need to do, such as parsing the command line for options, and
12307 iterating over input files.")
12308 (license license:gpl2+)))
12309
12310 (define-public python2-ttystatus
12311 (package
12312 (name "python2-ttystatus")
12313 (version "0.36")
12314 (source
12315 (origin
12316 (method url-fetch)
12317 (uri (string-append
12318 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
12319 version ".tar.gz"))
12320 (sha256
12321 (base32
12322 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
12323 (build-system python-build-system)
12324 (native-inputs
12325 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12326 ("python2-pep8" ,python2-pep8)))
12327 (arguments
12328 `(#:python ,python-2
12329 #:phases
12330 (modify-phases %standard-phases
12331 ;; check phase needs to be run before the build phase. If not,
12332 ;; coverage-test-runner looks for tests for the built source files,
12333 ;; and fails.
12334 (delete 'check)
12335 (add-before 'build 'check
12336 (lambda _ (invoke "make" "check"))))))
12337 (home-page "https://liw.fi/ttystatus/")
12338 (synopsis "Python library for showing progress reporting and
12339 status updates on terminals")
12340 (description "@code{python2-ttystatus} is a python library for
12341 showing progress reporting and status updates on terminals, for
12342 command line programs. Output is automatically adapted to the width
12343 of the terminal: truncated if it does not fit, and resized if the
12344 terminal size changes.")
12345 (license license:gpl3+)))
12346
12347 (define-public python2-tracing
12348 (package
12349 (name "python2-tracing")
12350 (version "0.10")
12351 (source
12352 (origin
12353 (method url-fetch)
12354 (uri (string-append
12355 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
12356 version ".tar.gz"))
12357 (sha256
12358 (base32
12359 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
12360 (build-system python-build-system)
12361 (arguments
12362 `(#:python ,python-2))
12363 (home-page "https://liw.fi/tracing/")
12364 (synopsis "Python debug logging helper")
12365 (description "@code{python2-tracing} is a python library for
12366 logging debug messages. It provides a way to turn debugging messages
12367 on and off, based on the filename they occur in. It is much faster
12368 than using @code{logging.Filter} to accomplish the same thing, which
12369 matters when code is run in production mode. The actual logging still
12370 happens using the @code{logging} library.")
12371 (license license:gpl3+)))
12372
12373 (define-public python2-larch
12374 (package
12375 (name "python2-larch")
12376 (version "1.20151025")
12377 (source
12378 (origin
12379 (method url-fetch)
12380 (uri (string-append
12381 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
12382 version ".tar.gz"))
12383 (patches (search-patches
12384 "python2-larch-coverage-4.0a6-compatibility.patch"))
12385 (sha256
12386 (base32
12387 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
12388 (build-system python-build-system)
12389 (arguments
12390 `(#:python ,python-2
12391 #:phases
12392 (modify-phases %standard-phases
12393 ;; check phase needs to be run before the build phase. If not,
12394 ;; coverage-test-runner looks for tests for the built source files,
12395 ;; and fails.
12396 (delete 'check)
12397 (add-before 'build 'check
12398 (lambda _ (invoke "make" "check"))))))
12399 (native-inputs
12400 `(("cmdtest" ,cmdtest)
12401 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
12402 (propagated-inputs
12403 `(("python2-tracing" ,python2-tracing)))
12404 (home-page "https://liw.fi/larch/")
12405 (synopsis "Python copy-on-write B-tree library")
12406 (description "@code{python2-larch} is an implementation of
12407 particular kind of B-tree, based on research by Ohad Rodeh. See
12408 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
12409 on the data structure.
12410
12411 The distinctive feature of this B-tree is that a node is never
12412 (conceptually) modified. Instead, all updates are done by
12413 copy-on-write. This makes it easy to clone a tree, and modify only the
12414 clone, while other processes access the original tree.")
12415 (license license:gpl3+)))
12416
12417 (define-public python-astroid
12418 (package
12419 (name "python-astroid")
12420 (version "2.1.0")
12421 (source
12422 (origin
12423 (method url-fetch)
12424 (uri (pypi-uri "astroid" version))
12425 (sha256
12426 (base32
12427 "08hz675knh4294bancdapql392fmbjyimhbyrmfkz1ka7l035c1m"))))
12428 (build-system python-build-system)
12429 (propagated-inputs
12430 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
12431 ("python-six" ,python-six)
12432 ("python-wrapt" ,python-wrapt)))
12433 (native-inputs
12434 `(("python-dateutil" ,python-dateutil)
12435 ("python-nose" ,python-nose)
12436 ("python-pytest" ,python-pytest)
12437 ("python-pytest-runner" ,python-pytest-runner)))
12438 (arguments
12439 `(#:phases
12440 (modify-phases %standard-phases
12441 (add-after 'unpack 'remove-spurious-test
12442 (lambda _
12443 ;; This can be removed after upgrading from python-3.7
12444 ;; https://github.com/PyCQA/astroid/issues/593
12445 ;; https://bugs.python.org/issue34056
12446 (delete-file "astroid/tests/unittest_modutils.py")
12447 #t))
12448 (replace 'check
12449 (lambda _
12450 (invoke "pytest" "astroid"))))))
12451 (home-page "https://github.com/PyCQA/astroid")
12452 (synopsis "Common base representation of python source code for pylint and
12453 other projects")
12454 (description "@code{python-astroid} provides a common base representation
12455 of python source code for projects such as pychecker, pyreverse, pylint, etc.
12456
12457 It provides a compatible representation which comes from the _ast module. It
12458 rebuilds the tree generated by the builtin _ast module by recursively walking
12459 down the AST and building an extended ast. The new node classes have
12460 additional methods and attributes for different usages. They include some
12461 support for static inference and local name scopes. Furthermore, astroid
12462 builds partial trees by inspecting living objects.")
12463 (license license:lgpl2.1+)
12464 (properties `((python2-variant . ,(delay python2-astroid))))))
12465
12466 (define-public python2-astroid
12467 (let ((base (package-with-python2
12468 (strip-python2-variant python-astroid))))
12469 (package (inherit base)
12470 ;; Version 2.x removes python2 support.
12471 (version "1.6.5")
12472 (source
12473 (origin
12474 (method url-fetch)
12475 (uri (pypi-uri "astroid" version))
12476 (sha256
12477 (base32
12478 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
12479 (arguments
12480 (substitute-keyword-arguments (package-arguments base)
12481 ((#:phases phases)
12482 `(modify-phases ,phases
12483 (add-after 'unpack 'remove-spurious-test
12484 (lambda _
12485 ;; https://github.com/PyCQA/astroid/issues/276
12486 (delete-file "astroid/tests/unittest_brain.py")
12487 #t))
12488 (replace 'check
12489 (lambda _
12490 (invoke"python" "-m" "unittest" "discover"
12491 "-p" "unittest*.py")))))))
12492 (native-inputs `())
12493 (propagated-inputs
12494 `(("python2-backports-functools-lru-cache"
12495 ,python2-backports-functools-lru-cache)
12496 ("python2-enum34" ,python2-enum34)
12497 ("python2-singledispatch" ,python2-singledispatch)
12498 ,@(package-propagated-inputs base))))))
12499
12500 (define-public python-isort
12501 (package
12502 (name "python-isort")
12503 (version "4.3.4")
12504 (source
12505 (origin
12506 (method git-fetch)
12507 (uri (git-reference
12508 ;; Tests pass only from the Github sources
12509 (url "https://github.com/timothycrosley/isort")
12510 (commit version)))
12511 (file-name (git-file-name name version))
12512 (sha256
12513 (base32
12514 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
12515 (build-system python-build-system)
12516 (native-inputs
12517 `(("python-mock" ,python-mock)
12518 ("python-pytest" ,python-pytest)))
12519 (home-page "https://github.com/timothycrosley/isort")
12520 (synopsis "Python utility/library to sort python imports")
12521 (description "@code{python-isort} is a python utility/library to sort
12522 imports alphabetically, and automatically separated into sections. It
12523 provides a command line utility, a python library and plugins for various
12524 editors.")
12525 (license license:expat)
12526 (properties `((python2-variant . ,(delay python2-isort))))))
12527
12528 (define-public python2-isort
12529 (let ((base (package-with-python2
12530 (strip-python2-variant python-isort))))
12531 (package (inherit base)
12532 (native-inputs
12533 `(("python2-futures" ,python2-futures)
12534 ,@(package-native-inputs base))))))
12535
12536 (define-public python2-backports-functools-lru-cache
12537 (package
12538 (name "python2-backports-functools-lru-cache")
12539 (version "1.5")
12540 (source
12541 (origin
12542 (method url-fetch)
12543 ;; only the pypi tarballs contain the necessary metadata
12544 (uri (pypi-uri "backports.functools_lru_cache" version))
12545 (sha256
12546 (base32
12547 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
12548 (build-system python-build-system)
12549 (native-inputs
12550 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
12551 (arguments
12552 `(#:python ,python-2))
12553 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
12554 (synopsis "Backport of functools.lru_cache from Python 3.3")
12555 (description "@code{python2-backports-functools-lru-cache} is a backport
12556 of @code{functools.lru_cache} from python 3.3.")
12557 (license license:expat)))
12558
12559 (define-public python-configparser
12560 (package
12561 (name "python-configparser")
12562 (version "3.7.1")
12563 (source
12564 (origin
12565 (method url-fetch)
12566 (uri (pypi-uri "configparser" version))
12567 (sha256
12568 (base32
12569 "0cnz213il9lhgda6x70fw7mfqr8da43s3wm343lwzhqx94mgmmav"))))
12570 (build-system python-build-system)
12571 (home-page "https://github.com/jaraco/configparser/")
12572 (synopsis "Backport of configparser from python 3.5")
12573 (description "@code{python-configparser} is a backport of
12574 @code{configparser} from Python 3.5 so that it can be used directly
12575 in other versions.")
12576 (license license:expat)))
12577
12578 (define-public python2-configparser
12579 (package-with-python2 python-configparser))
12580
12581 (define-public python-mando
12582 (package
12583 (name "python-mando")
12584 (version "0.6.4")
12585 (source (origin
12586 (method url-fetch)
12587 (uri (pypi-uri "mando" version))
12588 (sha256
12589 (base32
12590 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
12591 (build-system python-build-system)
12592 (propagated-inputs
12593 `(("python-rst2ansi" ,python-rst2ansi)
12594 ("python-six" ,python-six)))
12595 (native-inputs
12596 `(("python-pytest" ,python-pytest)))
12597 (home-page "https://mando.readthedocs.org/")
12598 (synopsis
12599 "Wrapper around argparse, allowing creation of complete CLI applications")
12600 (description
12601 "This package is a wrapper around argparse, allowing you to write complete CLI
12602 applications in seconds while maintaining all the flexibility.")
12603 (license license:expat)))
12604
12605 (define-public python2-mando
12606 (package-with-python2 python-mando))
12607
12608 (define-public python2-argparse
12609 (package
12610 (name "python2-argparse")
12611 (version "1.4.0")
12612 (source
12613 (origin
12614 (method url-fetch)
12615 (uri (pypi-uri "argparse" version))
12616 (sha256
12617 (base32
12618 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
12619 (build-system python-build-system)
12620 (arguments
12621 `(#:python ,python-2))
12622 (home-page "https://github.com/ThomasWaldmann/argparse/")
12623 (synopsis "Python command-line parsing library")
12624 (description
12625 "This package is mostly for people who want to have @code{argparse} on
12626 older Pythons because it was not part of the standard library back then.")
12627 (license license:psfl)))
12628
12629 (define-public python-fudge
12630 (package
12631 (name "python-fudge")
12632 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
12633 ;; package, which is currently the only use of this package.
12634 (version "0.9.6")
12635 (source
12636 (origin
12637 (method url-fetch)
12638 (uri (pypi-uri "fudge" version))
12639 (sha256
12640 (base32
12641 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
12642 (build-system python-build-system)
12643 (arguments
12644 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
12645 (home-page "https://github.com/fudge-py/fudge")
12646 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
12647 (description
12648 "Fudge is a Python module for using fake objects (mocks and stubs) to
12649 test real ones.
12650
12651 In readable Python code, you declare the methods available on your fake object
12652 and how they should be called. Then you inject that into your application and
12653 start testing. This declarative approach means you don’t have to record and
12654 playback actions and you don’t have to inspect your fakes after running code.
12655 If the fake object was used incorrectly then you’ll see an informative
12656 exception message with a traceback that points to the culprit.")
12657 (license license:expat)))
12658
12659 (define-public python2-fudge
12660 (package-with-python2 python-fudge))
12661
12662 (define-public python-mwclient
12663 (package
12664 (name "python-mwclient")
12665 (version "0.8.4")
12666 (source
12667 (origin
12668 (method url-fetch)
12669 ;; The PyPI version wouldn't contain tests.
12670 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
12671 "v" version ".tar.gz"))
12672 (file-name (string-append name "-" version ".tar.gz"))
12673 (sha256
12674 (base32
12675 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
12676 (build-system python-build-system)
12677 (propagated-inputs
12678 `(("python-requests" ,python-requests)
12679 ("python-requests-oauthlib"
12680 ,python-requests-oauthlib)
12681 ("python-six" ,python-six)))
12682 (native-inputs
12683 `(("python-mock" ,python-mock)
12684 ("python-pytest" ,python-pytest)
12685 ("python-pytest-pep8" ,python-pytest-pep8)
12686 ("python-pytest-cache" ,python-pytest-cache)
12687 ("python-pytest-cov" ,python-pytest-cov)
12688 ("python-responses" ,python-responses)))
12689 (home-page "https://github.com/btongminh/mwclient")
12690 (synopsis "MediaWiki API client")
12691 (description "This package provides a MediaWiki API client.")
12692 (license license:expat)))
12693
12694 (define-public python2-mwclient
12695 (package-with-python2 python-mwclient))
12696
12697 (define-public python-utils
12698 (package
12699 (name "python-utils")
12700 (version "2.1.0")
12701 (source (origin
12702 (method url-fetch)
12703 (uri (pypi-uri "python-utils" version))
12704 (sha256
12705 (base32
12706 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
12707 (build-system python-build-system)
12708 (native-inputs
12709 `(("pytest-runner" ,python-pytest-runner)
12710 ("pytest" ,python-pytest)
12711 ("six" ,python-six)))
12712 (home-page "https://github.com/WoLpH/python-utils")
12713 (synopsis "Convenient utilities not included with the standard Python install")
12714 (description
12715 "Python Utils is a collection of small Python functions and classes which
12716 make common patterns shorter and easier.")
12717 (license license:bsd-2)))
12718
12719 (define-public python2-utils
12720 (package-with-python2 python-utils))
12721
12722 (define-public python-diff-match-patch
12723 (package
12724 (name "python-diff-match-patch")
12725 (version "20121119")
12726 (source
12727 (origin
12728 (method url-fetch)
12729 (uri (pypi-uri "diff-match-patch" version))
12730 (sha256
12731 (base32
12732 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
12733 (build-system python-build-system)
12734 (home-page "https://code.google.com/p/google-diff-match-patch")
12735 (synopsis "Synchronize plain text")
12736 (description "Diff Match and Patch libraries offer robust algorithms to
12737 perform the operations required for synchronizing plain text.")
12738 (license license:asl2.0)))
12739
12740 (define-public python2-diff-match-patch
12741 (package-with-python2 python-diff-match-patch))
12742
12743 (define-public python-dirsync
12744 (package
12745 (name "python-dirsync")
12746 (version "2.2.3")
12747 (source
12748 (origin
12749 (method url-fetch)
12750 (uri (pypi-uri "dirsync" version))
12751 (sha256
12752 (base32
12753 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
12754 (build-system python-build-system)
12755 (propagated-inputs
12756 `(("six" ,python-six)))
12757 (home-page "https://bitbucket.org/tkhyn/dirsync")
12758 (synopsis "Advanced directory tree synchronisation tool")
12759 (description "Advanced directory tree synchronisation tool.")
12760 (license license:expat)))
12761
12762 (define-public python2-dirsync
12763 (package-with-python2 python-dirsync))
12764
12765 (define-public python-levenshtein
12766 (package
12767 (name "python-levenshtein")
12768 (version "0.12.0")
12769 (source
12770 (origin
12771 (method url-fetch)
12772 (uri (pypi-uri "python-Levenshtein" version))
12773 (sha256
12774 (base32
12775 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
12776 (build-system python-build-system)
12777 (home-page "https://github.com/ztane/python-Levenshtein")
12778 (synopsis "Fast computation of Levenshtein distance and string similarity")
12779 (description
12780 "The Levenshtein Python C extension module contains functions for fast computation of
12781 @enumerate
12782 @item Levenshtein (edit) distance, and edit operations
12783 @item string similarity
12784 @item approximate median strings, and generally string averaging
12785 @item string sequence and set similarity
12786 @end enumerate
12787 It supports both normal and Unicode strings.")
12788 (license license:gpl2+)))
12789
12790 (define-public python2-levenshtein
12791 (package-with-python2 python-levenshtein))
12792
12793 (define-public python-scandir
12794 (package
12795 (name "python-scandir")
12796 (version "1.9.0")
12797 (source
12798 (origin
12799 (method url-fetch)
12800 (uri (pypi-uri "scandir" version))
12801 (sha256
12802 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
12803 (build-system python-build-system)
12804 (arguments
12805 `(#:phases (modify-phases %standard-phases
12806 (replace 'check
12807 (lambda _
12808 (invoke "python" "test/run_tests.py"))))))
12809 (home-page "https://github.com/benhoyt/scandir")
12810 (synopsis "Directory iteration function")
12811 (description
12812 "Directory iteration function like os.listdir(), except that instead of
12813 returning a list of bare filenames, it yields DirEntry objects that include
12814 file type and stat information along with the name. Using scandir() increases
12815 the speed of os.walk() by 2-20 times (depending on the platform and file
12816 system) by avoiding unnecessary calls to os.stat() in most cases.
12817
12818 This package is part of the Python standard library since version 3.5.")
12819 (license license:bsd-3)))
12820
12821 (define-public python2-scandir
12822 (package-with-python2 python-scandir))
12823
12824 (define-public python2-stemming
12825 (package
12826 (name "python2-stemming")
12827 (version "1.0.1")
12828 (source
12829 (origin
12830 (method url-fetch)
12831 (uri (pypi-uri "stemming" version))
12832 (sha256
12833 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
12834 (build-system python-build-system)
12835 (arguments
12836 `(#:python ,python-2))
12837 (home-page "https://bitbucket.org/mchaput/stemming/overview")
12838 (synopsis "Python implementations of various stemming algorithms")
12839 (description
12840 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
12841 stemming algorithms for English. These implementations are straightforward and
12842 efficient, unlike some Python versions of the same algorithms available on the
12843 Web. This package is an extraction of the stemming code included in the Whoosh
12844 search engine.")
12845 (license license:public-domain)))
12846
12847 (define-public python-factory-boy
12848 (package
12849 (name "python-factory-boy")
12850 (version "2.8.1")
12851 (source
12852 (origin
12853 (method url-fetch)
12854 (uri (pypi-uri "factory_boy" version))
12855 (sha256
12856 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
12857 (build-system python-build-system)
12858 (arguments
12859 ;; Tests are not included in the tarball.
12860 `(#:tests? #f))
12861 (propagated-inputs
12862 `(("faker" ,python-faker)))
12863 (home-page "https://github.com/benhoyt/scandir")
12864 (synopsis "Versatile test fixtures replacement")
12865 (description
12866 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
12867
12868 As a fixtures replacement tool, it aims to replace static, hard to maintain
12869 fixtures with easy-to-use factories for complex object.
12870
12871 Instead of building an exhaustive test setup with every possible combination
12872 of corner cases, factory_boy allows you to use objects customized for the
12873 current test, while only declaring the test-specific fields")
12874 (license license:expat)))
12875
12876 (define-public python2-factory-boy
12877 (package-with-python2 python-factory-boy))
12878
12879 (define-public python-translate-toolkit
12880 (package
12881 (name "python-translate-toolkit")
12882 (version "2.1.0")
12883 (source
12884 (origin
12885 (method url-fetch)
12886 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
12887 (sha256
12888 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
12889 (build-system python-build-system)
12890 (native-inputs
12891 `(("python-pytest" ,python-pytest)
12892 ("python-sphinx" ,python-sphinx)))
12893 (propagated-inputs
12894 `(("python-babel" ,python-babel)
12895 ("python-beautifulsoup4" ,python-beautifulsoup4)
12896 ("python-chardet" ,python-chardet)
12897 ("python-diff-match-patch" ,python-diff-match-patch)
12898 ("python-levenshtein" ,python-levenshtein)
12899 ("python-lxml" ,python-lxml)
12900 ("python-six" ,python-six)
12901 ("python-vobject" ,python-vobject)
12902 ("python-pyyaml" ,python-pyyaml)))
12903 (arguments
12904 ;; TODO: tests are not run, because they end with
12905 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
12906 ;; 'parse_funcs'
12907 ;; during test setup.
12908 `(#:tests? #f))
12909 (home-page "https://toolkit.translatehouse.org")
12910 (synopsis "Tools and API for translation and localization engineering")
12911 (description
12912 "Tools and API for translation and localization engineering. It contains
12913 several utilities, as well as an API for building localization tools.")
12914 (license license:gpl2+)))
12915
12916 (define-public python2-translate-toolkit
12917 (package-with-python2 python-translate-toolkit))
12918
12919 (define-public python-packaging
12920 (package
12921 (name "python-packaging")
12922 (version "19.0")
12923 (source
12924 (origin
12925 (method url-fetch)
12926 (uri (pypi-uri "packaging" version))
12927 (sha256
12928 (base32
12929 "1brjhygq9dz6x1kdljivkjfldi3qf5rbkqgck1bpgv9qpv8ab60c"))))
12930 (build-system python-build-system)
12931 (arguments
12932 `(#:phases (modify-phases %standard-phases
12933 (replace 'check
12934 (lambda _ (invoke "py.test" "-vv"))))))
12935 (native-inputs
12936 `(("python-pretend" ,python-pretend)
12937 ("python-pytest" ,python-pytest)))
12938 (propagated-inputs
12939 `(("python-pyparsing" ,python-pyparsing)
12940 ("python-six" ,python-six)))
12941 (home-page "https://github.com/pypa/packaging")
12942 (synopsis "Core utilities for Python packages")
12943 (description "Packaging is a Python module for dealing with Python packages.
12944 It offers an interface for working with package versions, names, and dependency
12945 information.")
12946 ;; From 'LICENSE': This software is made available under the terms of
12947 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
12948 ;; Contributions to this software is made under the terms of *both* these
12949 ;; licenses.
12950 (license (list license:asl2.0 license:bsd-2))))
12951
12952 (define-public python2-packaging
12953 (package-with-python2 python-packaging))
12954
12955 (define-public python-relatorio
12956 (package
12957 (name "python-relatorio")
12958 (version "0.8.0")
12959 (source
12960 (origin
12961 (method url-fetch)
12962 (uri (pypi-uri "relatorio" version))
12963 (sha256
12964 (base32
12965 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
12966 (build-system python-build-system)
12967 (propagated-inputs
12968 `(("python-lxml" ,python-lxml)
12969 ("python-genshi" ,python-genshi)))
12970 (native-inputs
12971 `(("python-magic" ,python-magic)))
12972 (home-page "https://relatorio.tryton.org/")
12973 (synopsis "Templating library able to output ODT and PDF files")
12974 (description "Relatorio is a templating library which provides a way to
12975 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
12976 for more filetypes can be easily added by creating plugins for them.")
12977 (license license:gpl3+)))
12978
12979 (define-public python2-relatorio
12980 (package-with-python2 python-relatorio))
12981
12982 (define-public python-radon
12983 (package
12984 (name "python-radon")
12985 (version "2.2.0")
12986 (source
12987 (origin
12988 (method url-fetch)
12989 (uri (pypi-uri "radon" version))
12990 (sha256
12991 (base32
12992 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
12993 (build-system python-build-system)
12994 (arguments
12995 `(#:phases (modify-phases %standard-phases
12996 (replace 'check
12997 (lambda _
12998 (invoke "python" "radon/tests/run.py"))))))
12999 (propagated-inputs
13000 `(("python-colorama" ,python-colorama)
13001 ("python-flake8-polyfill" ,python-flake8-polyfill)
13002 ("python-mando" ,python-mando)))
13003 (native-inputs
13004 `(("python-pytest" ,python-pytest)
13005 ("python-pytest-mock" ,python-pytest-mock)))
13006 (home-page "https://radon.readthedocs.org/")
13007 (synopsis "Code Metrics in Python")
13008 (description "Radon is a Python tool which computes various code metrics.
13009 Supported metrics are:
13010 @itemize @bullet
13011 @item raw metrics: SLOC, comment lines, blank lines, &c.
13012 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
13013 @item Halstead metrics (all of them)
13014 @item the Maintainability Index (a Visual Studio metric)
13015 @end itemize")
13016 (license license:expat)))
13017
13018 (define-public python2-radon
13019 (package-with-python2 python-radon))
13020
13021 (define-public python-sure
13022 (package
13023 (name "python-sure")
13024 (version "1.4.11")
13025 (source
13026 (origin
13027 (method url-fetch)
13028 (uri (pypi-uri "sure" version))
13029 (sha256
13030 (base32
13031 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
13032 (build-system python-build-system)
13033 (propagated-inputs
13034 `(("python-mock" ,python-mock)
13035 ("python-six" ,python-six)))
13036 (native-inputs
13037 `(("python-nose" ,python-nose)))
13038 (home-page "https://github.com/gabrielfalcao/sure")
13039 (synopsis "Automated testing library in python for python")
13040 (description
13041 "Sure is a python library that leverages a DSL for writing assertions.
13042 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
13043 (license license:gpl3+)))
13044
13045 (define-public python2-sure
13046 (package-with-python2 python-sure))
13047
13048 (define-public python2-couleur
13049 ;; This package does not seem to support python3 at all, hence,
13050 ;; only the python2 variant definition is provided.
13051 (package
13052 (name "python2-couleur")
13053 (version "0.6.2")
13054 (source
13055 (origin
13056 (method url-fetch)
13057 (uri (pypi-uri "couleur" version))
13058 (sha256
13059 (base32
13060 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
13061 (build-system python-build-system)
13062 (arguments
13063 `(#:python ,python-2))
13064 (home-page "https://github.com/gabrielfalcao/couleur")
13065 (synopsis
13066 "ANSI terminal tool for python, colored shell and other handy fancy features")
13067 (description
13068 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
13069 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
13070 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
13071 ;; https://github.com/gabrielfalcao/couleur/issues/11
13072 (license license:lgpl3+)))
13073
13074 (define-public python-misaka
13075 (package
13076 (name "python-misaka")
13077 (version "2.1.1")
13078 (source
13079 (origin
13080 (method url-fetch)
13081 (uri (pypi-uri "misaka" version))
13082 (sha256
13083 (base32
13084 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
13085 (build-system python-build-system)
13086 (arguments
13087 `(;; Line 37 of setup.py calls self.run_command('develop')
13088 ;; in the 'check' phase. This command seems to be trying
13089 ;; to write to
13090 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
13091 ;; for which it does not have the permission to write.
13092 #:tests? #f))
13093 (propagated-inputs
13094 `(("python-cffi" ,python-cffi)))
13095 (home-page "https://github.com/FSX/misaka")
13096 (synopsis "Python binding for Hoedown")
13097 (description
13098 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
13099 library written in C. It features a fast HTML renderer and functionality to make custom
13100 renderers (e.g. man pages or LaTeX).")
13101 (license license:expat)))
13102
13103 (define-public python2-misaka
13104 (package-with-python2 python-misaka))
13105
13106 (define-public python2-steadymark
13107 ;; This is forced into being a python2 only variant
13108 ;; due to its dependence on couleur that has no support
13109 ;; for python3
13110 (package
13111 (name "python2-steadymark")
13112 (version "0.7.3")
13113 (source
13114 (origin
13115 (method url-fetch)
13116 (uri (pypi-uri "steadymark" version))
13117 (sha256
13118 (base32
13119 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
13120 (build-system python-build-system)
13121 (native-inputs
13122 `(("python-couleur" ,python2-couleur)
13123 ("python-sure" ,python2-sure)
13124 ("python-misaka" ,python2-misaka)))
13125 (arguments
13126 `(#:python ,python-2
13127 #:phases
13128 (modify-phases %standard-phases
13129 (add-before 'build 'patch-setup-py
13130 (lambda _
13131 ;; Update requirements from dependency==version
13132 ;; to dependency>=version
13133 (substitute* "setup.py"
13134 (("==") ">="))
13135 #t)))))
13136 (home-page "https://github.com/gabrielfalcao/steadymark")
13137 (synopsis "Markdown-based test runner for python")
13138 (description
13139 "@code{Steadymark} allows documentation to be written in github-flavoured
13140 markdown. The documentation may contain snippets of code surrounded by python
13141 code blocks and @code{Steadymark} will find these snippets and run them, making
13142 sure that there are no old malfunctional examples in the documentation examples.")
13143 (license license:expat)))
13144
13145 (define-public python-jsonpointer
13146 (package
13147 (name "python-jsonpointer")
13148 (version "1.10")
13149 (source
13150 (origin
13151 (method url-fetch)
13152 (uri (pypi-uri "jsonpointer" version))
13153 (sha256
13154 (base32
13155 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
13156 (build-system python-build-system)
13157 (home-page "https://github.com/stefankoegl/python-json-pointer")
13158 (synopsis "Identify specific nodes in a JSON document")
13159 (description "@code{jsonpointer} allows you to access specific nodes
13160 by path in a JSON document (see RFC 6901).")
13161 (license license:bsd-3)))
13162
13163 (define-public python2-jsonpointer
13164 (package-with-python2 python-jsonpointer))
13165
13166 (define-public python-jsonpatch
13167 (package
13168 (name "python-jsonpatch")
13169 (version "1.16")
13170 (source
13171 (origin
13172 (method url-fetch)
13173 ;; pypi version lacks tests.js
13174 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
13175 "archive/v" version ".tar.gz"))
13176 (file-name (string-append name "-" version ".tar.gz"))
13177 (sha256
13178 (base32
13179 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
13180 (build-system python-build-system)
13181 (native-inputs
13182 `(("python-jsonpointer" ,python-jsonpointer)))
13183 (home-page "https://github.com/stefankoegl/python-json-patch")
13184 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
13185 (description "@code{jsonpatch} is a library and program that allows
13186 applying JSON Patches according to RFC 6902.")
13187 (license license:bsd-3)))
13188
13189 (define-public python2-jsonpatch
13190 (package-with-python2 python-jsonpatch))
13191
13192 (define-public python-jsonpatch-0.4
13193 (package (inherit python-jsonpatch)
13194 (name "python-jsonpatch")
13195 (version "0.4")
13196 (source
13197 (origin
13198 (method url-fetch)
13199 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
13200 "archive/v" version ".tar.gz"))
13201 (file-name (string-append name "-" version ".tar.gz"))
13202 (sha256
13203 (base32
13204 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
13205
13206 (define-public python2-jsonpatch-0.4
13207 (package-with-python2 python-jsonpatch-0.4))
13208
13209 (define-public python-rfc3986
13210 (package
13211 (name "python-rfc3986")
13212 (version "1.1.0")
13213 (source (origin
13214 (method url-fetch)
13215 (uri (pypi-uri "rfc3986" version))
13216 (sha256
13217 (base32
13218 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
13219 (build-system python-build-system)
13220 (arguments
13221 `(#:modules ((guix build utils)
13222 (guix build python-build-system)
13223 (ice-9 ftw)
13224 (srfi srfi-1)
13225 (srfi srfi-26))
13226 #:phases
13227 (modify-phases %standard-phases
13228 (replace 'check
13229 (lambda _
13230 (let ((cwd (getcwd)))
13231 (setenv "PYTHONPATH"
13232 (string-append cwd "/build/"
13233 (find (cut string-prefix? "lib" <>)
13234 (scandir (string-append cwd "/build")))
13235 ":"
13236 (getenv "PYTHONPATH")))
13237 (invoke "pytest" "-v")))))))
13238 (native-inputs
13239 `(("python-pytest" ,python-pytest)))
13240 (home-page "https://rfc3986.readthedocs.io/")
13241 (synopsis "Parse and validate URI references")
13242 (description
13243 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
13244 validation and authority parsing. This module also supports RFC@tie{}6874
13245 which adds support for zone identifiers to IPv6 addresses.")
13246 (license license:asl2.0)))
13247
13248 (define-public python2-rfc3986
13249 (package-with-python2 python-rfc3986))
13250
13251 (define-public python-rfc3987
13252 (package
13253 (name "python-rfc3987")
13254 (version "1.3.7")
13255 (source
13256 (origin
13257 (method url-fetch)
13258 (uri (pypi-uri "rfc3987" version))
13259 (sha256
13260 (base32
13261 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
13262 (build-system python-build-system)
13263 (home-page "https://pypi.python.org/pypi/rfc3987")
13264 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
13265 (description "@code{rfc3987} provides routines for parsing and
13266 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
13267 (license license:gpl3+)))
13268
13269 (define-public python2-rfc3987
13270 (package-with-python2 python-rfc3987))
13271
13272 (define-public python-validate-email
13273 (package
13274 (name "python-validate-email")
13275 (version "1.3")
13276 (source
13277 (origin
13278 (method url-fetch)
13279 (uri (pypi-uri "validate_email" version))
13280 (sha256
13281 (base32
13282 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
13283 (build-system python-build-system)
13284 (home-page "https://github.com/syrusakbary/validate_email")
13285 (synopsis "Verifies if an email address is valid and really exists")
13286 (description "@code{validate_email} can be used to verify if an email
13287 address is valid and really exists.")
13288 (license license:lgpl3+)))
13289
13290 (define-public python2-validate-email
13291 (package-with-python2 python-validate-email))
13292
13293 (define-public python-flex
13294 (package
13295 (name "python-flex")
13296 (version "6.10.0")
13297 (source
13298 (origin
13299 (method url-fetch)
13300 (uri (pypi-uri "flex" version))
13301 (sha256
13302 (base32
13303 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
13304 (build-system python-build-system)
13305 (propagated-inputs
13306 `(("python-click" ,python-click)
13307 ("python-iso8601" ,python-iso8601)
13308 ("python-jsonpointer" ,python-jsonpointer)
13309 ("python-pyyaml" ,python-pyyaml)
13310 ("python-requests" ,python-requests)
13311 ("python-rfc3987" ,python-rfc3987)
13312 ("python-six" ,python-six)
13313 ("python-validate-email" ,python-validate-email)))
13314 (home-page "https://github.com/pipermerriam/flex")
13315 (synopsis "Validates Swagger schemata")
13316 (description "@code{flex} can be used to validate Swagger schemata.")
13317 (license license:bsd-3)))
13318
13319 (define-public python2-flex
13320 (package-with-python2 python-flex))
13321
13322 (define-public python-marshmallow
13323 (package
13324 (name "python-marshmallow")
13325 (version "3.0.0b14")
13326 (source
13327 (origin
13328 (method url-fetch)
13329 (uri (pypi-uri "marshmallow" version))
13330 (sha256
13331 (base32
13332 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
13333 (build-system python-build-system)
13334 (propagated-inputs
13335 `(("python-dateutil" ,python-dateutil)
13336 ("python-simplejson" ,python-simplejson)))
13337 (native-inputs
13338 `(("python-pytest" ,python-pytest)
13339 ("python-pytz" ,python-pytz)))
13340 (home-page "https://github.com/marshmallow-code/marshmallow")
13341 (synopsis "Convert complex datatypes to and from native
13342 Python datatypes.")
13343 (description "@code{marshmallow} provides a library for converting
13344 complex datatypes to and from native Python datatypes.")
13345 (license license:expat)))
13346
13347 (define-public python2-marshmallow
13348 (package-with-python2 python-marshmallow))
13349
13350 (define-public python-apispec
13351 (package
13352 (name "python-apispec")
13353 (version "0.25.3")
13354 (source
13355 (origin
13356 (method url-fetch)
13357 (uri (pypi-uri "apispec" version))
13358 (sha256
13359 (base32
13360 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
13361 (build-system python-build-system)
13362 (propagated-inputs
13363 `(("python-pyyaml" ,python-pyyaml)))
13364 (native-inputs
13365 `(("python-pytest" ,python-pytest)
13366 ("python-flask" ,python-flask)
13367 ("python-marshmallow" ,python-marshmallow)
13368 ("python-tornado" ,python-tornado)
13369 ("python-bottle" ,python-bottle)
13370 ("python-mock" ,python-mock)))
13371 (home-page "https://github.com/marshmallow-code/apispec")
13372 (synopsis "Swagger 2.0 API specification generator")
13373 (description "@code{python-apispec} is a pluggable API specification
13374 generator. Currently supports the OpenAPI specification (f.k.a.
13375 Swagger 2.0).")
13376 (license license:expat)))
13377
13378 (define-public python2-apispec
13379 (package-with-python2 python-apispec))
13380
13381 (define-public python-flasgger
13382 (package
13383 (name "python-flasgger")
13384 (version "0.6.3")
13385 (source
13386 (origin
13387 (method git-fetch)
13388 (uri (git-reference
13389 (url "https://github.com/rochacbruno/flasgger.git")
13390 (commit version)))
13391 (file-name (git-file-name name version))
13392 (sha256
13393 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
13394 (build-system python-build-system)
13395 (arguments
13396 `(#:phases
13397 (modify-phases %standard-phases
13398 (replace 'check
13399 (lambda* (#:key inputs outputs #:allow-other-keys)
13400 (substitute* "Makefile"
13401 (("flake8 flasgger --ignore=F403")
13402 "flake8 flasgger --ignore=E731,F403"))
13403 (setenv "PYTHONPATH" (string-append (getcwd)
13404 ":"
13405 (getenv "PYTHONPATH")))
13406 (invoke "py.test"))))))
13407 (propagated-inputs
13408 `(("python-flask" ,python-flask)
13409 ("python-pyyaml" ,python-pyyaml)
13410 ("python-jsonschema" ,python-jsonschema)
13411 ("python-mistune" ,python-mistune)
13412 ("python-six" ,python-six)))
13413 (native-inputs
13414 `(("python-decorator" ,python-decorator)
13415 ("python-flake8" ,python-flake8)
13416 ("python-flask-restful" ,python-flask-restful)
13417 ("python-flex" ,python-flex)
13418 ("python-pytest" ,python-pytest)
13419 ("python-pytest-cov" ,python-pytest-cov)
13420 ("python-marshmallow" ,python-marshmallow)
13421 ("python-apispec" ,python-apispec)))
13422 (home-page "https://github.com/rochacbruno/flasgger/")
13423 (synopsis "Extract Swagger specs from your Flask project")
13424 (description "@code{python-flasgger} allows extracting Swagger specs
13425 from your Flask project. It is a fork of Flask-Swagger.")
13426 (license license:expat)))
13427
13428 (define-public python2-flasgger
13429 (package-with-python2 python-flasgger))
13430
13431 (define-public python-swagger-spec-validator
13432 (package
13433 (name "python-swagger-spec-validator")
13434 (version "2.4.3")
13435 (source
13436 (origin
13437 (method url-fetch)
13438 (uri (pypi-uri "swagger-spec-validator" version))
13439 (sha256
13440 (base32
13441 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
13442 (build-system python-build-system)
13443 (propagated-inputs
13444 `(("python-jsonschema" ,python-jsonschema)
13445 ("python-pyyaml" ,python-pyyaml)
13446 ("python-six" ,python-six)))
13447 (home-page
13448 "https://github.com/Yelp/swagger_spec_validator")
13449 (synopsis "Validation of Swagger specifications")
13450 (description "@code{swagger_spec_validator} provides a library for
13451 validating Swagger API specifications.")
13452 (license license:asl2.0)))
13453
13454 (define-public python2-swagger-spec-validator
13455 (package-with-python2 python-swagger-spec-validator))
13456
13457 (define-public python-apache-libcloud
13458 (package
13459 (name "python-apache-libcloud")
13460 (version "2.4.0")
13461 (source
13462 (origin
13463 (method url-fetch)
13464 (uri (pypi-uri "apache-libcloud" version))
13465 (sha256
13466 (base32
13467 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
13468 (build-system python-build-system)
13469 (arguments
13470 `(#:phases
13471 (modify-phases %standard-phases
13472 (add-after 'unpack 'patch-ssh
13473 (lambda* (#:key inputs #:allow-other-keys)
13474 (substitute* "libcloud/compute/ssh.py"
13475 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
13476 "/bin/ssh" "'")))
13477 #t))
13478 (add-after 'unpack 'patch-tests
13479 (lambda _
13480 (substitute* "./libcloud/test/test_file_fixtures.py"
13481 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
13482 (("def _ascii") "def _raw_data(self, method, url, body, headers):
13483 return (httplib.OK,
13484 \"1234abcd\",
13485 {\"test\": \"value\"},
13486 httplib.responses[httplib.OK])
13487 def _ascii"))
13488 (substitute* "libcloud/test/compute/test_ssh_client.py"
13489 (("class ShellOutSSHClientTests")
13490 "@unittest.skip(\"Guix container doesn't have ssh service\")
13491 class ShellOutSSHClientTests")
13492 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
13493 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
13494 (("'.xF0', '.x90', '.x8D', '.x88'")
13495 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
13496 #t))
13497 (add-before 'check 'copy-secret
13498 (lambda _
13499 (copy-file "libcloud/test/secrets.py-dist"
13500 "libcloud/test/secrets.py")
13501 #t)))))
13502 (inputs
13503 `(("openssh" ,openssh)))
13504 (propagated-inputs
13505 `(("python-paramiko" ,python-paramiko)
13506 ("python-requests" ,python-requests)))
13507 (native-inputs
13508 `(("python-lockfile" ,python-lockfile)
13509 ("python-mock" ,python-mock)
13510 ("python-pytest" ,python-pytest)
13511 ("python-pytest-runner" ,python-pytest-runner)
13512 ("python-requests-mock" ,python-requests-mock)))
13513 (home-page "https://libcloud.apache.org/")
13514 (synopsis "Unified Cloud API")
13515 (description "@code{libcloud} is a Python library for interacting with
13516 many of the popular cloud service providers using a unified API.")
13517 (license license:asl2.0)))
13518
13519 (define-public python2-apache-libcloud
13520 (package-with-python2 python-apache-libcloud))
13521
13522 (define-public python-smmap2
13523 (package
13524 (name "python-smmap2")
13525 (version "2.0.3")
13526 (source
13527 (origin
13528 (method url-fetch)
13529 (uri (pypi-uri "smmap2" version))
13530 (sha256
13531 (base32
13532 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
13533 (build-system python-build-system)
13534 (native-inputs
13535 `(("python-nosexcover" ,python-nosexcover)))
13536 (home-page "https://github.com/Byron/smmap")
13537 (synopsis "Python sliding window memory map manager")
13538 (description "@code{smmap2} is a pure Python implementation of a sliding
13539 window memory map manager.")
13540 (license license:bsd-3)))
13541
13542 (define-public python2-smmap2
13543 (package-with-python2 python-smmap2))
13544
13545 (define-public python-regex
13546 (package
13547 (name "python-regex")
13548 (version "2019.04.14")
13549 (source (origin
13550 (method url-fetch)
13551 (uri (pypi-uri "regex" version))
13552 (sha256
13553 (base32
13554 "1a6hhfs6l6snr1z654ay6wzbmwdkmv282fzfkd5hk2d1n73y8v6m"))))
13555 ;; TODO: Fix and enable regex_test.py tests that complain about the
13556 ;; test.support module not existing.
13557 (build-system python-build-system)
13558 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
13559 (synopsis "Alternative regular expression module")
13560 (description "This regular expression implementation is backwards-
13561 compatible with the standard @code{re} module, but offers additional
13562 functionality like full case-folding for case-insensitive matches in Unicode.")
13563 (license license:psfl)))
13564
13565 (define-public python2-regex
13566 (package-with-python2 python-regex))
13567
13568 (define-public python2-pyopengl
13569 (package
13570 (name "python2-pyopengl")
13571 (version "3.1.0")
13572 (source
13573 (origin
13574 (method url-fetch)
13575 (uri (pypi-uri "PyOpenGL" version))
13576 (sha256
13577 (base32
13578 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
13579 (arguments
13580 `(#:python ,python-2))
13581 (build-system python-build-system)
13582 (home-page "http://pyopengl.sourceforge.net")
13583 (synopsis "Standard OpenGL bindings for Python")
13584 (description
13585 "PyOpenGL is the most common cross platform Python binding to OpenGL and
13586 related APIs. The binding is created using the standard @code{ctypes}
13587 library.")
13588 (license license:bsd-3)))
13589
13590 (define-public python2-pyopengl-accelerate
13591 (package
13592 (inherit python2-pyopengl)
13593 (name "python2-pyopengl-accelerate")
13594 (version "3.1.0")
13595 (source
13596 (origin
13597 (method url-fetch)
13598 (uri (pypi-uri "PyOpenGL-accelerate" version))
13599 (sha256
13600 (base32
13601 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
13602 (synopsis "Acceleration code for PyOpenGL")
13603 (description
13604 "This is the Cython-coded accelerator module for PyOpenGL.")))
13605
13606 (define-public python-rencode
13607 (package
13608 (name "python-rencode")
13609 (version "1.0.5")
13610 (source
13611 (origin
13612 (method url-fetch)
13613 (uri (pypi-uri "rencode" version))
13614 (sha256
13615 (base32
13616 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
13617 (build-system python-build-system)
13618 (arguments
13619 `(#:phases
13620 (modify-phases %standard-phases
13621 (add-before 'check 'delete-bogus-test
13622 ;; This test requires /home/aresch/Downloads, which is not provided by
13623 ;; the build environment.
13624 (lambda _
13625 (delete-file "rencode/t.py")
13626 #t)))))
13627 (native-inputs `(("pkg-config" ,pkg-config)
13628 ("python-cython" ,python-cython)))
13629 (home-page "https://github.com/aresch/rencode")
13630 (synopsis "Serialization of heterogeneous data structures")
13631 (description
13632 "The @code{rencode} module is a data structure serialization library,
13633 similar to @code{bencode} from the BitTorrent project. For complex,
13634 heterogeneous data structures with many small elements, r-encoding stake up
13635 significantly less space than b-encodings. This version of rencode is a
13636 complete rewrite in Cython to attempt to increase the performance over the
13637 pure Python module.")
13638 (license license:bsd-3)))
13639
13640 (define-public python2-rencode
13641 (package-with-python2 python-rencode))
13642
13643 (define-public python-xenon
13644 (package
13645 (name "python-xenon")
13646 (version "0.5.4")
13647 (source
13648 (origin
13649 (method url-fetch)
13650 (uri (pypi-uri "xenon" version))
13651 (sha256
13652 (base32
13653 "029cbhysg2vr5n4jz8gpg2793f8wkwnqpr1qgv6c1dn685vy31mc"))))
13654 (build-system python-build-system)
13655 (native-inputs
13656 `(("python-pyyaml" ,python-pyyaml)
13657 ("python-radon" ,python-radon)
13658 ("python-requests" ,python-requests)
13659 ("python-flake8" ,python-flake8)
13660 ("python-tox" ,python-tox)))
13661 (arguments
13662 `(#:phases
13663 (modify-phases %standard-phases
13664 (add-before 'build 'patch-test-requirements
13665 (lambda _
13666 ;; Remove httpretty dependency for tests.
13667 (substitute* "setup.py"
13668 (("httpretty") ""))
13669 #t)))))
13670 (home-page "https://xenon.readthedocs.org/")
13671 (synopsis "Monitor code metrics for Python on your CI server")
13672 (description
13673 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
13674 Ideally, @code{xenon} is run every time code is committed. Through command
13675 line options, various thresholds can be set for the complexity of code. It
13676 will fail (i.e. it will exit with a non-zero exit code) when any of these
13677 requirements is not met.")
13678 (license license:expat)))
13679
13680 (define-public python2-xenon
13681 (package-with-python2 python-xenon))
13682
13683 (define-public python-pysocks
13684 (package
13685 (name "python-pysocks")
13686 (version "1.7.0")
13687 (source
13688 (origin
13689 (method url-fetch)
13690 (uri (pypi-uri "PySocks" version))
13691 (sha256
13692 (base32
13693 "0z4p31bpqm893cf87qqgb30k7nwd8kqfjwwjm5cvxb6zbyj1w0yr"))))
13694 (build-system python-build-system)
13695 (arguments `(#:tests? #f))
13696 (home-page "https://github.com/Anorov/PySocks")
13697 (synopsis "SOCKS client module")
13698 (description "@code{pysocks} is an updated and semi-actively maintained
13699 version of @code{SocksiPy} with bug fixes and extra features.")
13700 (license license:bsd-3)))
13701
13702 (define-public python2-pysocks
13703 (package-with-python2 python-pysocks))
13704
13705 (define-public python-pydiff
13706 (package
13707 (name "python-pydiff")
13708 (version "0.2")
13709 (source
13710 (origin
13711 (method url-fetch)
13712 (uri (pypi-uri "pydiff" version))
13713 (sha256
13714 (base32
13715 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
13716 (build-system python-build-system)
13717 (home-page "https://github.com/myint/pydiff")
13718 (synopsis "Library to diff two Python files at the bytecode level")
13719 (description
13720 "@code{pydiff} makes it easy to look for actual code changes while
13721 ignoring formatting changes.")
13722 (license license:expat)))
13723
13724 (define-public python2-pydiff
13725 (package-with-python2 python-pydiff))
13726
13727 (define-public python-tqdm
13728 (package
13729 (name "python-tqdm")
13730 (version "4.19.6")
13731 (source
13732 (origin
13733 (method url-fetch)
13734 (uri (pypi-uri "tqdm" version))
13735 (sha256
13736 (base32
13737 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
13738 (build-system python-build-system)
13739 (native-inputs
13740 `(("python-flake8" ,python-flake8)
13741 ("python-nose" ,python-nose)
13742 ("python-coverage" ,python-coverage)))
13743 (home-page "https://github.com/tqdm/tqdm")
13744 (synopsis "Fast, extensible progress meter")
13745 (description
13746 "Make loops show a progress bar on the console by just wrapping any
13747 iterable with @code{|tqdm(iterable)|}. Offers many options to define
13748 design and layout.")
13749 (license (list license:mpl2.0 license:expat))))
13750
13751 (define-public python2-tqdm
13752 (package-with-python2 python-tqdm))
13753
13754 (define-public python-pkginfo
13755 (package
13756 (name "python-pkginfo")
13757 (version "1.4.2")
13758 (source
13759 (origin
13760 (method url-fetch)
13761 (uri (pypi-uri "pkginfo" version))
13762 (sha256
13763 (base32
13764 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
13765 (build-system python-build-system)
13766 (arguments
13767 ;; The tests are broken upstream.
13768 '(#:tests? #f))
13769 (home-page
13770 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
13771 (synopsis
13772 "Query metadatdata from sdists, bdists, and installed packages")
13773 (description
13774 "API to query the distutils metadata written in @file{PKG-INFO} inside a
13775 source distriubtion (an sdist) or a binary distribution (e.g., created by
13776 running bdist_egg). It can also query the EGG-INFO directory of an installed
13777 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
13778 created by running @code{python setup.py develop}).")
13779 (license license:expat)))
13780
13781 (define-public python2-pkginfo
13782 (package-with-python2 python-pkginfo))
13783
13784 (define-public python-twine
13785 (package
13786 (name "python-twine")
13787 (version "1.9.1")
13788 (source
13789 (origin
13790 (method url-fetch)
13791 (uri (pypi-uri "twine" version))
13792 (sha256
13793 (base32
13794 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
13795 (build-system python-build-system)
13796 (propagated-inputs
13797 `(("python-tqdm" ,python-tqdm)
13798 ("python-pkginfo" ,python-pkginfo)
13799 ("python-requests" ,python-requests)
13800 ("python-requests-toolbelt" ,python-requests-toolbelt)))
13801 (home-page "https://github.com/pypa/twine")
13802 (synopsis "Collection of utilities for interacting with PyPI")
13803 (description
13804 "@code{twine} currently supports registering projects and uploading
13805 distributions. It authenticates the user over HTTPS, allows them to pre-sign
13806 their files and supports any packaging format (including wheels).")
13807 (license license:asl2.0)))
13808
13809 (define-public python2-twine
13810 (package-with-python2 python-twine))
13811
13812 (define-public python-linecache2
13813 (package
13814 (name "python-linecache2")
13815 (version "1.0.0")
13816 (source
13817 (origin
13818 (method url-fetch)
13819 (uri (pypi-uri "linecache2" version))
13820 (sha256
13821 (base32
13822 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
13823 (build-system python-build-system)
13824 (arguments
13825 `(;; The tests depend on unittest2, and our version is a bit too old.
13826 #:tests? #f))
13827 (native-inputs
13828 `(("python-pbr" ,python-pbr-minimal)))
13829 (home-page
13830 "https://github.com/testing-cabal/linecache2")
13831 (synopsis "Backports of the linecache module")
13832 (description
13833 "The linecache module allows one to get any line from any file, while
13834 attempting to optimize internally, using a cache, the common case where many
13835 lines are read from a single file.")
13836 (license license:psfl)))
13837
13838 (define-public python2-linecache2
13839 (package-with-python2 python-linecache2))
13840
13841 (define-public python-traceback2
13842 (package
13843 (name "python-traceback2")
13844 (version "1.4.0")
13845 (source
13846 (origin
13847 (method url-fetch)
13848 (uri (pypi-uri "traceback2" version))
13849 (sha256
13850 (base32
13851 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
13852 (build-system python-build-system)
13853 (arguments
13854 `(;; python-traceback2 and python-unittest2 depend on one another.
13855 #:tests? #f))
13856 (native-inputs
13857 `(("python-pbr" ,python-pbr-minimal)))
13858 (propagated-inputs
13859 `(("python-linecache2" ,python-linecache2)))
13860 (home-page
13861 "https://github.com/testing-cabal/traceback2")
13862 (synopsis "Backports of the traceback module")
13863 (description
13864 "This module provides a standard interface to extract, format and print
13865 stack traces of Python programs. It exactly mimics the behavior of the Python
13866 interpreter when it prints a stack trace.")
13867 (license license:psfl)))
13868
13869 (define-public python2-traceback2
13870 (package-with-python2 python-traceback2))
13871
13872 (define-public python-ratelimiter
13873 (package
13874 (name "python-ratelimiter")
13875 (version "1.2.0")
13876 (source
13877 (origin
13878 (method url-fetch)
13879 (uri (pypi-uri "ratelimiter" version))
13880 (sha256
13881 (base32
13882 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
13883 (build-system python-build-system)
13884 (arguments
13885 '(#:tests? #f)) ; There are no tests in the pypi archive.
13886 (home-page "https://github.com/RazerM/ratelimiter")
13887 (synopsis "Simple rate limiting object")
13888 (description
13889 "The @code{ratelimiter} module ensures that an operation will not be
13890 executed more than a given number of times during a given period.")
13891 (license license:asl2.0)))
13892
13893 (define-public python2-ratelimiter
13894 (package-with-python2 python-ratelimiter))
13895
13896 (define-public python-dukpy
13897 (package
13898 (name "python-dukpy")
13899 (version "0.3")
13900 (source
13901 (origin
13902 (method git-fetch)
13903 (uri (git-reference
13904 (url "https://github.com/kovidgoyal/dukpy.git")
13905 (commit (string-append "v" version))))
13906 (file-name (git-file-name name version))
13907 (sha256
13908 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
13909 (build-system python-build-system)
13910 (home-page "https://github.com/kovidgoyal/dukpy")
13911 (synopsis "Run JavaScript in python")
13912 (description
13913 "dukpy is a JavaScript runtime environment for Python using the duktape
13914 embeddable JavaScript engine.")
13915 ;; Dukpy is licensed under MIT like the embedded duktape library,
13916 ;; with 'errors.c' as GPL3.
13917 (license (list license:expat license:gpl3))))
13918
13919 (define-public python2-dukpy
13920 (package-with-python2 python-dukpy))
13921
13922 (define-public python-jsonrpclib-pelix
13923 (package
13924 (name "python-jsonrpclib-pelix")
13925 (version "0.3.2")
13926 (source
13927 (origin
13928 (method url-fetch)
13929 (uri (pypi-uri "jsonrpclib-pelix" version))
13930 (sha256
13931 (base32
13932 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
13933 (build-system python-build-system)
13934 (arguments
13935 `(#:tests? #f)) ; no tests in PyPI tarball
13936 (home-page "https://github.com/tcalmant/jsonrpclib/")
13937 (synopsis "JSON-RPC 2.0 client library for Python")
13938 (description
13939 "This library implements the JSON-RPC v2.0
13940 specification (backwards-compatible) as a client library for Python. This
13941 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
13942 services.")
13943 (license license:asl2.0)))
13944
13945 (define-public python2-jsonrpclib-pelix
13946 (package-with-python2 python-jsonrpclib-pelix))
13947
13948 (define-public python-setuptools-scm-git-archive
13949 (package
13950 (name "python-setuptools-scm-git-archive")
13951 (version "1.0")
13952 (source
13953 (origin
13954 (method url-fetch)
13955 (uri (pypi-uri "setuptools_scm_git_archive" version))
13956 (sha256
13957 (base32
13958 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
13959 (build-system python-build-system)
13960 (native-inputs
13961 `(("python-pytest" ,python-pytest)))
13962 (propagated-inputs
13963 `(("python-setuptools-scm" ,python-setuptools-scm)))
13964 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
13965 (synopsis "Setuptools_scm plugin for git archives")
13966 (description
13967 "The setuptools_scm_git_archive package is a plugin to
13968 setuptools_scm, which supports obtaining versions from git archives that
13969 belong to tagged versions.")
13970 (license license:expat)))
13971
13972 (define-public python2-setuptools-scm-git-archive
13973 (package-with-python2 python-setuptools-scm-git-archive))
13974
13975 (define-public python-setuptools-git
13976 (package
13977 (name "python-setuptools-git")
13978 (version "1.2")
13979 (source
13980 (origin
13981 (method url-fetch)
13982 (uri (pypi-uri "setuptools-git" version))
13983 (sha256
13984 (base32
13985 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
13986 (build-system python-build-system)
13987 (arguments
13988 `(#:phases
13989 (modify-phases %standard-phases
13990 ;; This is needed for tests.
13991 (add-after 'unpack 'configure-git
13992 (lambda _
13993 (setenv "HOME" "/tmp")
13994 (invoke "git" "config" "--global" "user.email" "guix")
13995 (invoke "git" "config" "--global" "user.name" "guix")
13996 #t)))))
13997 (native-inputs
13998 `(("git" ,git-minimal)))
13999 (home-page "https://github.com/msabramo/setuptools-git")
14000 (synopsis "Setuptools revision control system plugin for Git")
14001 (description
14002 "This package provides a plugin for Setuptools for revision control with
14003 Git.")
14004 (license license:bsd-3)))
14005
14006 (define-public python-pyclipper
14007 (package
14008 (name "python-pyclipper")
14009 (version "1.1.0.post1")
14010 (source
14011 (origin
14012 (method url-fetch)
14013 (uri (pypi-uri "pyclipper" version ".zip"))
14014 (sha256
14015 (base32
14016 "0ldbkbnx94an4zzrwb1sxmg6k0jgk4cwmvcdyy8y5k1zslc612wa"))
14017 (modules '((guix build utils)))
14018 (snippet
14019 '(begin
14020 ;; This file is generated by Cython.
14021 (delete-file "pyclipper/pyclipper.cpp") #t))))
14022 (build-system python-build-system)
14023 (arguments
14024 `(#:phases
14025 (modify-phases %standard-phases
14026 (add-before 'build 'cythonize-sources
14027 (lambda _
14028 (with-directory-excursion "pyclipper"
14029 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
14030 (propagated-inputs
14031 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
14032 (native-inputs
14033 `(("python-cython" ,python-cython)
14034 ("python-pytest" ,python-pytest)
14035 ("python-pytest-runner" ,python-pytest-runner)
14036 ("python-unittest2" ,python-unittest2)
14037 ("unzip" ,unzip)))
14038 (home-page "https://github.com/greginvm/pyclipper")
14039 (synopsis "Wrapper for Angus Johnson's Clipper library")
14040 (description
14041 "Pyclipper is a Cython wrapper for the C++ translation of the
14042 Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
14043 (license license:expat)))
14044
14045 (define-public python2-pyclipper
14046 (package-with-python2 python-pyclipper))
14047
14048 (define-public python2-booleanoperations
14049 (package
14050 (name "python2-booleanoperations")
14051 (version "0.7.1")
14052 (source
14053 (origin
14054 (method url-fetch)
14055 (uri (pypi-uri "booleanOperations" version ".zip"))
14056 (sha256
14057 (base32
14058 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
14059 (build-system python-build-system)
14060 (arguments
14061 `(#:python ,python-2))
14062 (native-inputs
14063 `(("unzip" ,unzip)
14064 ("python2-pytest" ,python2-pytest)
14065 ("python2-pytest-runner" ,python2-pytest-runner)))
14066 (propagated-inputs
14067 `(("python-fonttools" ,python2-fonttools)
14068 ("python-pyclipper" ,python2-pyclipper)
14069 ("python-ufolib" ,python2-ufolib)))
14070 (home-page "https://github.com/typemytype/booleanOperations")
14071 (synopsis "Boolean operations on paths")
14072 (description
14073 "BooleanOperations provides a Python library that enables
14074 boolean operations on paths.")
14075 (license license:expat)))
14076
14077 (define-public python-tempdir
14078 (package
14079 (name "python-tempdir")
14080 (version "0.7.1")
14081 (source
14082 (origin
14083 (method url-fetch)
14084 (uri (pypi-uri "tempdir" version))
14085 (sha256
14086 (base32
14087 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
14088 (build-system python-build-system)
14089 (home-page "https://pypi.org/project/tempdir/")
14090 (arguments
14091 ;; the package has no tests
14092 '(#:tests? #f))
14093 (synopsis "Python library for managing temporary directories")
14094 (description
14095 "This library manages temporary directories that are automatically
14096 deleted with all their contents when they are no longer needed. It is
14097 particularly convenient for use in tests.")
14098 (license license:expat)))
14099
14100 (define-public python2-tempdir
14101 (package-with-python2 python-tempdir))
14102
14103 (define-public python-activepapers
14104 (package
14105 (name "python-activepapers")
14106 (version "0.2.2")
14107 (source
14108 (origin
14109 (method url-fetch)
14110 (uri (pypi-uri "ActivePapers.Py" version))
14111 (sha256
14112 (base32
14113 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
14114 (build-system python-build-system)
14115 (arguments
14116 `(#:modules ((ice-9 ftw)
14117 (srfi srfi-1)
14118 (guix build utils)
14119 (guix build python-build-system))
14120
14121 #:phases
14122 (modify-phases %standard-phases
14123 (add-after 'unpack 'delete-python2-code
14124 (lambda _
14125 (for-each delete-file
14126 '("lib/activepapers/builtins2.py"
14127 "lib/activepapers/standardlib2.py"
14128 "lib/activepapers/utility2.py"))))
14129 (replace 'check
14130 (lambda _
14131 ;; Deactivate the test cases that download files
14132 (setenv "NO_NETWORK_ACCESS" "1")
14133 ;; For some strange reason, some tests fail if nosetests runs all
14134 ;; test modules in a single execution. They pass if each test
14135 ;; module is run individually.
14136 (for-each (lambda (filename)
14137 (invoke "nosetests"
14138 (string-append "tests/" filename)))
14139 (scandir "tests"
14140 (lambda (filename)
14141 (string-suffix? ".py" filename)))))))))
14142 (native-inputs
14143 `(("python-tempdir" ,python-tempdir)
14144 ("python-nose" ,python-nose)))
14145 (propagated-inputs
14146 `(("python-h5py" ,python-h5py)))
14147 (home-page "http://www.activepapers.org/")
14148 (synopsis "Executable papers for scientific computing")
14149 (description
14150 "ActivePapers is a tool for working with executable papers, which
14151 combine data, code, and documentation in single-file packages,
14152 suitable for publication as supplementary material or on repositories
14153 such as figshare or Zenodo.")
14154 (properties `((python2-variant . ,(delay python2-activepapers))))
14155 (license license:bsd-3)))
14156
14157 (define-public python2-activepapers
14158 (let ((base (package-with-python2
14159 (strip-python2-variant python-activepapers))))
14160 (package
14161 (inherit base)
14162 (arguments
14163 (substitute-keyword-arguments (package-arguments base)
14164 ((#:phases phases)
14165 `(modify-phases ,phases
14166 (delete 'delete-python2-code)
14167 (add-after 'unpack 'delete-python3-code
14168 (lambda _
14169 (for-each delete-file
14170 '("lib/activepapers/builtins3.py"
14171 "lib/activepapers/standardlib3.py"
14172 "lib/activepapers/utility3.py")))))))))))
14173
14174 (define-public python-semver
14175 (package
14176 (name "python-semver")
14177 (version "2.7.9")
14178 (source
14179 (origin
14180 (method url-fetch)
14181 (uri (pypi-uri "semver" version))
14182 (sha256
14183 (base32
14184 "0hhgqppchv59rqj0yzi1prdg2nfsywqmjsqy2rycyxm0hvxmbyqz"))))
14185 (build-system python-build-system)
14186 (arguments
14187 `(#:phases
14188 (modify-phases %standard-phases
14189 (add-after 'unpack 'patch-test-requirements
14190 (lambda _
14191 (substitute* "setup.py"
14192 ;; Our Python is new enough.
14193 (("'virtualenv<14\\.0\\.0'") "'virtualenv'"))
14194 #t)))))
14195 (native-inputs
14196 `(("python-tox" ,python-tox)
14197 ("python-virtualenv" ,python-virtualenv)))
14198 (home-page "https://github.com/k-bx/python-semver")
14199 (synopsis "Python helper for Semantic Versioning")
14200 (description "This package provides a Python library for
14201 @url{Semantic Versioning, http://semver.org/}.")
14202 (license license:bsd-3)))
14203
14204 (define-public python2-semver
14205 (package-with-python2 python-semver))
14206
14207 (define-public python-pyro4
14208 (package
14209 (name "python-pyro4")
14210 (version "4.75")
14211 (source
14212 (origin
14213 (method url-fetch)
14214 (uri (pypi-uri "Pyro4" version))
14215 (sha256
14216 (base32 "1dfpp36imddx19yv0kd28gk1l71ckhpqy6jd590wpm2680jw15rq"))))
14217 (build-system python-build-system)
14218 (propagated-inputs
14219 `(("python-serpent" ,python-serpent)))
14220 (home-page "https://pyro4.readthedocs.io")
14221 (synopsis "Distributed object middleware for Python")
14222 (description
14223 "Pyro enables you to build applications in which objects can talk to each
14224 other over the network. You can just use normal Python method calls to call
14225 objects on other machines, also known as remote procedure calls (RPC).")
14226 (license license:expat)))
14227
14228 (define-public python2-pyro
14229 (package
14230 (name "python2-pyro")
14231 (version "3.16")
14232 (source
14233 (origin
14234 (method url-fetch)
14235 (uri (pypi-uri "Pyro" version))
14236 (file-name (string-append "Pyro-" version ".tar.gz"))
14237 (sha256
14238 (base32
14239 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
14240 (build-system python-build-system)
14241 (arguments
14242 ;; Pyro is not compatible with Python 3
14243 `(#:python ,python-2
14244 ;; Pyro has no test cases for automatic execution
14245 #:tests? #f))
14246 (home-page "http://pythonhosted.org/Pyro/")
14247 (synopsis "Distributed object manager for Python")
14248 (description "Pyro is a Distributed Object Technology system
14249 written in Python that is designed to be easy to use. It resembles
14250 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
14251 which is a system and language independent Distributed Object Technology
14252 and has much more to offer than Pyro or RMI. Pyro 3.x is no
14253 longer maintained. New projects should use Pyro4 instead, which
14254 is the new Pyro version that is actively developed.")
14255 (license license:expat)))
14256
14257 (define-public python2-scientific
14258 (package
14259 (name "python2-scientific")
14260 (version "2.9.4")
14261 (source
14262 (origin
14263 (method url-fetch)
14264 (uri (string-append "https://bitbucket.org/khinsen/"
14265 "scientificpython/downloads/ScientificPython-"
14266 version ".tar.gz"))
14267 (file-name (string-append "ScientificPython-" version ".tar.gz"))
14268 (sha256
14269 (base32
14270 "0fc69zhlsn9d2jvbzyjl9ah53vj598h84nkq230c83ahfvgzx5y3"))))
14271 (build-system python-build-system)
14272 (inputs
14273 `(("netcdf" ,netcdf)))
14274 (propagated-inputs
14275 `(("python-numpy" ,python2-numpy-1.8)
14276 ("python-pyro" ,python2-pyro)))
14277 (arguments
14278 ;; ScientificPython is not compatible with Python 3
14279 `(#:python ,python-2
14280 #:tests? #f ; No test suite
14281 #:phases
14282 (modify-phases %standard-phases
14283 (replace 'build
14284 (lambda* (#:key inputs #:allow-other-keys)
14285 (invoke "python" "setup.py" "build"
14286 (string-append "--netcdf_prefix="
14287 (assoc-ref inputs "netcdf"))))))))
14288 (home-page "https://bitbucket.org/khinsen/scientificpython")
14289 (synopsis "Python modules for scientific computing")
14290 (description "ScientificPython is a collection of Python modules that are
14291 useful for scientific computing. Most modules are rather general (Geometry,
14292 physical units, automatic derivatives, ...) whereas others are more
14293 domain-specific (e.g. netCDF and PDB support). The library is currently
14294 not actively maintained and works only with Python 2 and NumPy < 1.9.")
14295 (license license:cecill-c)))
14296
14297 (define-public python2-mmtk
14298 (package
14299 (name "python2-mmtk")
14300 (version "2.7.11")
14301 (source
14302 (origin
14303 (method url-fetch)
14304 (uri (string-append "https://bitbucket.org/khinsen/"
14305 "mmtk/downloads/MMTK-" version ".tar.gz"))
14306 (file-name (string-append "MMTK-" version ".tar.gz"))
14307 (sha256
14308 (base32
14309 "1d0nnjx4lwsvh8f99vv1r6gi50d93yba0adkz8b4zgv4za4c5862"))))
14310 (build-system python-build-system)
14311 (native-inputs
14312 `(("netcdf" ,netcdf)))
14313 (propagated-inputs
14314 `(("python-scientific" ,python2-scientific)
14315 ("python-tkinter" ,python-2 "tk")))
14316 (arguments
14317 `(#:python ,python-2
14318 #:tests? #f
14319 #:phases
14320 (modify-phases %standard-phases
14321 (add-before 'build 'includes-from-scientific
14322 (lambda* (#:key inputs #:allow-other-keys)
14323 (mkdir-p "Include/Scientific")
14324 (copy-recursively
14325 (string-append
14326 (assoc-ref inputs "python-scientific")
14327 "/include/python2.7/Scientific")
14328 "Include/Scientific"))))))
14329 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
14330 (synopsis "Python library for molecular simulation")
14331 (description "MMTK is a library for molecular simulations with an emphasis
14332 on biomolecules. It provides widely used methods such as Molecular Dynamics
14333 and normal mode analysis, but also basic routines for implementing new methods
14334 for simulation and analysis. The library is currently not actively maintained
14335 and works only with Python 2 and NumPy < 1.9.")
14336 (license license:cecill-c)))
14337
14338 (define-public python-phonenumbers
14339 (package
14340 (name "python-phonenumbers")
14341 (version "8.9.1")
14342 (source
14343 (origin
14344 (method url-fetch)
14345 (uri (pypi-uri "phonenumbers" version))
14346 (sha256
14347 (base32
14348 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
14349 (build-system python-build-system)
14350 (home-page
14351 "https://github.com/daviddrysdale/python-phonenumbers")
14352 (synopsis
14353 "Python library for dealing with international phone numbers")
14354 (description
14355 "This package provides a Python port of Google's libphonenumber library.")
14356 (license license:asl2.0)))
14357
14358 (define-public python2-phonenumbers
14359 (package-with-python2 python-phonenumbers))
14360
14361 (define-public python-send2trash
14362 (package
14363 (name "python-send2trash")
14364 (version "1.5.0")
14365 (source
14366 (origin (method git-fetch)
14367 ;; Source tarball on PyPI doesn't include tests.
14368 (uri (git-reference
14369 (url "https://github.com/hsoft/send2trash.git")
14370 (commit version)))
14371 (file-name (git-file-name name version))
14372 (sha256
14373 (base32
14374 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
14375 (build-system python-build-system)
14376 (arguments
14377 '(#:phases
14378 (modify-phases %standard-phases
14379 (add-before 'check 'pre-check
14380 (lambda _
14381 (mkdir-p "/tmp/foo")
14382 (setenv "HOME" "/tmp/foo")
14383 #t)))))
14384 (home-page "https://github.com/hsoft/send2trash")
14385 (synopsis "Send files to the user's @file{~/Trash} directory")
14386 (description "This package provides a Python library to send files to the
14387 user's @file{~/Trash} directory.")
14388 (properties `((python2-variant . ,(delay python2-send2trash))))
14389 (license license:bsd-3)))
14390
14391 (define-public python2-send2trash
14392 (package
14393 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
14394 (arguments
14395 (substitute-keyword-arguments (package-arguments python-send2trash)
14396 ((#:phases phases)
14397 `(modify-phases ,phases
14398 (add-before 'check 'setenv
14399 (lambda _
14400 (setenv "PYTHONPATH"
14401 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
14402 #t))))))))
14403
14404 (define-public python-yapf
14405 (package
14406 (name "python-yapf")
14407 (version "0.24.0")
14408 (source
14409 (origin
14410 (method url-fetch)
14411 (uri (pypi-uri "yapf" version))
14412 (sha256
14413 (base32
14414 "0anwby0ydmyzcsgjc5dn1ryddwvii4dq61vck447q0n96npnzfyf"))))
14415 (build-system python-build-system)
14416 (home-page "https://github.com/google/yapf")
14417 (synopsis "Formatter for Python code")
14418 (description "YAPF is a formatter for Python code. It's based off of
14419 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
14420 takes the code and reformats it to the best formatting that conforms to the
14421 style guide, even if the original code didn't violate the style guide.")
14422 (license license:asl2.0)))
14423
14424 (define-public python2-yapf
14425 (package-with-python2 python-yapf))
14426
14427 (define-public python-gyp
14428 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
14429 (revision "0"))
14430 (package
14431 (name "python-gyp")
14432 ;; Google does not release versions,
14433 ;; based on second most recent commit date.
14434 (version (git-version "0.0.0" revision commit))
14435 (source
14436 (origin
14437 ;; Google does not release tarballs,
14438 ;; git checkout is needed.
14439 (method git-fetch)
14440 (uri (git-reference
14441 (url "https://chromium.googlesource.com/external/gyp")
14442 (commit commit)))
14443 (file-name (git-file-name name version))
14444 (sha256
14445 (base32
14446 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
14447 (build-system python-build-system)
14448 (home-page "https://gyp.gsrc.io/")
14449 (synopsis "GYP is a Meta-Build system")
14450 (description
14451 "GYP builds build systems for large, cross platform applications.
14452 It can be used to generate XCode projects, Visual Studio projects, Ninja build
14453 files, and Makefiles.")
14454 (license license:bsd-3))))
14455
14456 (define-public python2-gyp
14457 (package-with-python2 python-gyp))
14458
14459 (define-public python-whatever
14460 (package
14461 (name "python-whatever")
14462 (version "0.5")
14463 (source
14464 (origin
14465 (method url-fetch)
14466 (uri (string-append "https://github.com/Suor/whatever/archive/" version
14467 ".tar.gz"))
14468 (sha256
14469 (base32
14470 "1iqvnaf0zpc6b4rvbqq4xy45mszcscyzpzknv8wg6j84pbp22sap"))
14471 (file-name (string-append name "-" version ".tar.gz"))))
14472 (build-system python-build-system)
14473 (arguments
14474 `(#:phases
14475 (modify-phases %standard-phases
14476 (replace 'check
14477 (lambda _
14478 (invoke "py.test"))))))
14479 (native-inputs
14480 `(("python-pytest" ,python-pytest)))
14481 (home-page "http://github.com/Suor/whatever")
14482 (synopsis "Make anonymous functions by partial application of operators")
14483 (description "@code{whatever} provides an easy way to make anonymous
14484 functions by partial application of operators.")
14485 (license license:bsd-3)))
14486
14487 (define-public python2-whatever
14488 (package-with-python2 python-whatever))
14489
14490 (define-public python-funcy
14491 (package
14492 (name "python-funcy")
14493 (version "1.11")
14494 (source
14495 (origin
14496 (method git-fetch)
14497 (uri (git-reference
14498 (url "https://github.com/Suor/funcy.git")
14499 (commit version)))
14500 (sha256
14501 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
14502 (file-name (git-file-name name version))))
14503 (build-system python-build-system)
14504 (arguments
14505 `(#:phases
14506 (modify-phases %standard-phases
14507 (replace 'check
14508 (lambda _
14509 (invoke "py.test"))))))
14510 (native-inputs
14511 `(("python-pytest" ,python-pytest)
14512 ("python-whatever" ,python-whatever)))
14513 (home-page "http://github.com/Suor/funcy")
14514 (synopsis "Functional tools")
14515 (description "@code{funcy} is a library that provides functional tools.
14516 Examples are:
14517 @enumerate
14518 @item merge - Merges collections of the same type
14519 @item walk - Type-preserving map
14520 @item select - Selects a part of a collection
14521 @item take - Takes the first n items of a collection
14522 @item first - Takes the first item of a collection
14523 @item remove - Predicated-removes items of a collection
14524 @item concat - Concatenates two collections
14525 @item flatten - Flattens a collection with subcollections
14526 @item distinct - Returns only distinct items
14527 @item split - Predicated-splits a collection
14528 @item split_at - Splits a collection at a given item
14529 @item group_by - Groups items by group
14530 @item pairwise - Pairs off adjacent items
14531 @item partial - Partially-applies a function
14532 @item curry - Curries a function
14533 @item compose - Composes functions
14534 @item complement - Complements a predicate
14535 @item all_fn - \"all\" with predicate
14536 @end enumerate")
14537 (license license:bsd-3)))
14538
14539 (define-public python2-funcy
14540 (package-with-python2 python-funcy))
14541
14542 (define-public python-isoweek
14543 (package
14544 (name "python-isoweek")
14545 (version "1.3.3")
14546 (source
14547 (origin
14548 (method url-fetch)
14549 (uri (pypi-uri "isoweek" version))
14550 (sha256
14551 (base32
14552 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
14553 (build-system python-build-system)
14554 (home-page "https://github.com/gisle/isoweek")
14555 (synopsis "Objects representing a week")
14556 (description "The @code{isoweek} module provide the class Week that
14557 implements the week definition of ISO 8601. This standard also defines
14558 a notation for identifying weeks; yyyyWww (where the W is a literal).
14559 Week instances stringify to this form.")
14560 (license license:bsd-3)))
14561
14562 (define-public python2-isoweek
14563 (package-with-python2 python-isoweek))
14564
14565 (define-public python-tokenize-rt
14566 (package
14567 (name "python-tokenize-rt")
14568 (version "2.0.1")
14569 (source
14570 (origin
14571 (method url-fetch)
14572 (uri (pypi-uri "tokenize-rt" version))
14573 (sha256
14574 (base32
14575 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
14576 (build-system python-build-system)
14577 (home-page "https://github.com/asottile/tokenize-rt")
14578 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
14579 (description
14580 "This Python library is a wrapper around @code{tokenize} from the Python
14581 standard library. It provides two additional tokens @code{ESCAPED_NL} and
14582 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
14583 and @code{tokens_to_src} to roundtrip.")
14584 (license license:expat)))
14585
14586 (define-public python-future-fstrings
14587 (package
14588 (name "python-future-fstrings")
14589 (version "0.4.1")
14590 (source
14591 (origin
14592 (method url-fetch)
14593 (uri (pypi-uri "future_fstrings" version))
14594 (sha256
14595 (base32
14596 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
14597 (build-system python-build-system)
14598 (propagated-inputs
14599 `(("python-tokenize-rt" ,python-tokenize-rt)))
14600 (home-page "https://github.com/asottile/future-fstrings")
14601 (synopsis "Backport of fstrings to Python < 3.6")
14602 (description
14603 "This package provides a UTF-8 compatible encoding
14604 @code{future_fstrings}, which performs source manipulation. It decodes the
14605 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
14606 @code{f} strings.")
14607 (license license:expat)))
14608
14609 (define-public python-typed-ast
14610 (package
14611 (name "python-typed-ast")
14612 (version "1.3.5")
14613 (source
14614 (origin
14615 (method url-fetch)
14616 (uri (pypi-uri "typed-ast" version))
14617 (sha256
14618 (base32
14619 "1m7pr6qpana3cvqwiw7mlvrgvmw27ch5mx1592572xhlki8g85ak"))))
14620 (build-system python-build-system)
14621 (arguments
14622 `(#:modules ((guix build utils)
14623 (guix build python-build-system)
14624 (ice-9 ftw)
14625 (srfi srfi-1)
14626 (srfi srfi-26))
14627 #:phases
14628 (modify-phases %standard-phases
14629 (replace 'check
14630 (lambda _
14631 (let ((cwd (getcwd)))
14632 (setenv "PYTHONPATH"
14633 (string-append cwd "/build/"
14634 (find (cut string-prefix? "lib" <>)
14635 (scandir (string-append cwd "/build")))
14636 ":"
14637 (getenv "PYTHONPATH"))))
14638 (invoke "pytest")
14639 #t)))))
14640 (native-inputs `(("python-pytest" ,python-pytest)))
14641 (home-page "https://github.com/python/typed_ast")
14642 (synopsis "Fork of Python @code{ast} modules with type comment support")
14643 (description "This package provides a parser similar to the standard
14644 @code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
14645 include PEP 484 type comments and are independent of the version of Python
14646 under which they are run. The @code{typed_ast} parsers produce the standard
14647 Python AST (plus type comments), and are both fast and correct, as they are
14648 based on the CPython 2.7 and 3.7 parsers.")
14649 ;; See the file "LICENSE" for the details.
14650 (license (list license:psfl
14651 license:asl2.0
14652 license:expat)))) ;ast27/Parser/spark.py
14653
14654 (define-public python-typing
14655 (package
14656 (name "python-typing")
14657 (version "3.6.6")
14658 (source
14659 (origin
14660 (method url-fetch)
14661 (uri (pypi-uri "typing" version))
14662 (sha256
14663 (base32
14664 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
14665 (build-system python-build-system)
14666 (home-page "https://docs.python.org/3/library/typing.html")
14667 (synopsis "Type hints for Python")
14668 (description "This is a backport of the standard library @code{typing}
14669 module to Python versions older than 3.5. Typing defines a standard notation
14670 for Python function and variable type annotations. The notation can be used
14671 for documenting code in a concise, standard format, and it has been designed
14672 to also be used by static and runtime type checkers, static analyzers, IDEs
14673 and other tools.")
14674 (license license:psfl)))
14675
14676 (define-public python2-typing
14677 (package-with-python2 python-typing))
14678
14679 (define-public python-typing-extensions
14680 (package
14681 (name "python-typing-extensions")
14682 (version "3.7.2")
14683 (source
14684 (origin
14685 (method url-fetch)
14686 (uri (pypi-uri "typing_extensions" version))
14687 (sha256
14688 (base32
14689 "0wfsv71pvkyf2na938l579jh0v3kzl6g744ijgnahcwd4d9x0b7v"))))
14690 (build-system python-build-system)
14691 (home-page
14692 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
14693 (synopsis "Experimental type hints for Python")
14694 (description
14695 "The typing_extensions module contains additional @code{typing} hints not
14696 yet present in the of the @code{typing} standard library.
14697 Included are implementations of:
14698 @enumerate
14699 @item ClassVar
14700 @item ContextManager
14701 @item Counter
14702 @item DefaultDict
14703 @item Deque
14704 @item NewType
14705 @item NoReturn
14706 @item overload
14707 @item Protocol
14708 @item runtime
14709 @item Text
14710 @item Type
14711 @item TYPE_CHECKING
14712 @item AsyncGenerator
14713 @end enumerate\n")
14714 (license license:psfl)))
14715
14716 (define-public bpython
14717 (package
14718 (name "bpython")
14719 (version "0.17.1")
14720 (source
14721 (origin
14722 (method url-fetch)
14723 (uri (pypi-uri "bpython" version))
14724 (sha256
14725 (base32
14726 "0bxhxi5zxdkrf8b4gwn0d363kdz3qnypjwhm1aydki53ph8ca1w9"))))
14727 (build-system python-build-system)
14728 (arguments
14729 `(#:phases
14730 (modify-phases %standard-phases
14731 (add-after 'unpack 'remove-failing-test
14732 (lambda _
14733 ;; Remove failing test. FIXME: make it pass
14734 (delete-file "bpython/test/test_args.py")
14735 #t))
14736 (add-after 'wrap 'add-aliases
14737 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
14738 (lambda* (#:key outputs #:allow-other-keys)
14739 (let ((out (assoc-ref outputs "out")))
14740 (for-each
14741 (lambda (old new)
14742 (symlink old (string-append out "/bin/" new)))
14743 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
14744 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
14745 #t)))))
14746 (propagated-inputs
14747 `(("python-pygments" ,python-pygments)
14748 ("python-requests" ,python-requests)
14749 ("python-babel" ,python-babel) ; optional, for internationalization
14750 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
14751 ("python-greenlet" ,python-greenlet)
14752 ("python-urwid" ,python-urwid) ; for bpython-urwid only
14753 ("python-six" ,python-six)))
14754 (native-inputs
14755 `(("python-sphinx" ,python-sphinx)
14756 ("python-mock" ,python-mock)))
14757 (home-page "https://bpython-interpreter.org/")
14758 (synopsis "Fancy interface to the Python interpreter")
14759 (description "Bpython is a fancy interface to the Python
14760 interpreter. bpython's main features are
14761
14762 @enumerate
14763 @item in-line syntax highlighting,
14764 @item readline-like autocomplete with suggestions displayed as you type,
14765 @item expected parameter list for any Python function,
14766 @item \"rewind\" function to pop the last line of code from memory and
14767 re-evaluate,
14768 @item send the code you've entered off to a pastebin,
14769 @item save the code you've entered to a file, and
14770 @item auto-indentation.
14771 @end enumerate")
14772 (license license:expat)))
14773
14774 (define-public bpython2
14775 (let ((base (package-with-python2
14776 (strip-python2-variant bpython))))
14777 (package (inherit base)
14778 (name "bpython2")
14779 (arguments
14780 `(#:python ,python-2
14781 #:phases
14782 (modify-phases %standard-phases
14783 (add-after 'unpack 'remove-failing-test
14784 (lambda _
14785 ;; Remove failing test. FIXME: make it pass
14786 (delete-file "bpython/test/test_args.py")
14787 ;; Disable failing test-cases (renaming inhibits they are
14788 ;; discovered)
14789 (substitute* "bpython/test/test_curtsies_repl.py"
14790 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
14791 (string-append a "xxx_off_" b))
14792 (("^(\\s*def )(test_complex\\W)" _ a b)
14793 (string-append a "xxx_off_" b)))
14794 #t))
14795 (add-before 'build 'rename-scripts
14796 ;; rename the scripts to bypthon2, bpdb2, etc.
14797 (lambda _
14798 (substitute* "setup.py"
14799 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
14800 (string-append name "2" rest "\n"))
14801 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
14802 (string-append name "2" (or sub "") rest "\n")))
14803 #t))))))))
14804
14805 (define-public python-pyinotify
14806 (package
14807 (name "python-pyinotify")
14808 (version "0.9.6")
14809 (source (origin
14810 (method url-fetch)
14811 (uri (pypi-uri "pyinotify" version))
14812 (sha256
14813 (base32
14814 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
14815 (build-system python-build-system)
14816 (arguments `(#:tests? #f)) ;no tests
14817 (home-page "https://github.com/seb-m/pyinotify")
14818 (synopsis "Python library for monitoring inotify events")
14819 (description
14820 "@code{pyinotify} provides a Python interface for monitoring
14821 file system events on Linux.")
14822 (license license:expat)))
14823
14824 (define-public python2-pyinotify
14825 (package-with-python2 python-pyinotify))
14826
14827 ;; Ada parser uses this version.
14828 (define-public python2-quex-0.67.3
14829 (package
14830 (name "python2-quex")
14831 (version "0.67.3")
14832 (source
14833 (origin
14834 (method url-fetch)
14835 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
14836 (version-major+minor version)
14837 "/quex-" version ".zip"))
14838 (sha256
14839 (base32
14840 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
14841 (build-system python-build-system)
14842 (native-inputs
14843 `(("unzip" ,unzip)))
14844 (arguments
14845 `(#:python ,python-2
14846 #:tests? #f
14847 #:phases
14848 (modify-phases %standard-phases
14849 (delete 'configure)
14850 (delete 'build)
14851 (replace 'install
14852 (lambda* (#:key outputs #:allow-other-keys)
14853 (let* ((out (assoc-ref outputs "out"))
14854 (share/quex (string-append out "/share/quex"))
14855 (bin (string-append out "/bin")))
14856 (copy-recursively "." share/quex)
14857 (mkdir-p bin)
14858 (symlink (string-append share/quex "/quex-exe.py")
14859 (string-append bin "/quex"))
14860 #t))))))
14861 (native-search-paths
14862 (list (search-path-specification
14863 (variable "QUEX_PATH")
14864 (files '("share/quex")))))
14865 (home-page "http://quex.sourceforge.net/")
14866 (synopsis "Lexical analyzer generator in Python")
14867 (description "@code{quex} is a lexical analyzer generator in Python.")
14868 (license license:lgpl2.1+))) ; Non-military
14869
14870 (define-public python2-quex
14871 (package (inherit python2-quex-0.67.3)
14872 (name "python2-quex")
14873 (version "0.68.1")
14874 (source
14875 (origin
14876 (method url-fetch)
14877 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
14878 (sha256
14879 (base32
14880 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
14881 (file-name (string-append name "-" version ".tar.gz"))))))
14882
14883 (define-public python-more-itertools
14884 (package
14885 (name "python-more-itertools")
14886 (version "7.1.0")
14887 (source
14888 (origin
14889 (method url-fetch)
14890 (uri (pypi-uri "more-itertools" version))
14891 (sha256
14892 (base32
14893 "16phg2f2dvm6ci5wr49ncha5lmc0m2in3bsl33c61vzca4gkvd4b"))))
14894 (build-system python-build-system)
14895 (home-page "https://github.com/erikrose/more-itertools")
14896 (synopsis "More routines for operating on iterables, beyond itertools")
14897 (description "Python's built-in @code{itertools} module implements a
14898 number of iterator building blocks inspired by constructs from APL, Haskell,
14899 and SML. @code{more-itertools} includes additional building blocks for
14900 working with iterables.")
14901 (properties `((python2-variant . ,(delay python2-more-itertools))))
14902 (license license:expat)))
14903
14904 ;; The 5.x series are the last versions supporting Python 2.7.
14905 (define-public python2-more-itertools
14906 (package
14907 (inherit python-more-itertools)
14908 (name "python2-more-itertools")
14909 (version "5.0.0")
14910 (source (origin
14911 (method url-fetch)
14912 (uri (pypi-uri "more-itertools" version))
14913 (sha256
14914 (base32
14915 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
14916 (arguments
14917 `(#:python ,python2-minimal))
14918 (propagated-inputs
14919 `(("python2-six" ,python2-six-bootstrap)))))
14920
14921 (define-public python-latexcodec
14922 (package
14923 (name "python-latexcodec")
14924 (version "1.0.6")
14925 (source
14926 (origin
14927 (method url-fetch)
14928 (uri (pypi-uri "latexcodec" version))
14929 (sha256
14930 (base32 "0s4wdbg0w2l8pj3i0y4510i0s04p8nhxcsa2z41bjsv0k66npb81"))))
14931 (build-system python-build-system)
14932 (inputs
14933 `(("python-six" ,python-six)))
14934 (home-page "https://readthedocs.org/projects/latexcodec/")
14935 (synopsis "Work with LaTeX code in Python")
14936 (description "Lexer and codec to work with LaTeX code in Python.")
14937 (license license:expat)))
14938
14939 (define-public python-pybtex
14940 (package
14941 (name "python-pybtex")
14942 (version "0.22.2")
14943 (source
14944 (origin
14945 (method url-fetch)
14946 (uri (pypi-uri "pybtex" version))
14947 (sha256
14948 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
14949 (build-system python-build-system)
14950 (native-inputs
14951 `(("python-nose" ,python-nose)))
14952 (inputs
14953 `(("python-latexcodec" ,python-latexcodec)
14954 ("python-pyyaml" ,python-pyyaml)
14955 ("python-six" ,python-six)))
14956 (arguments
14957 `(#:test-target "nosetests"))
14958 (home-page "https://pybtex.org/")
14959 (synopsis "BibTeX-compatible bibliography processor")
14960 (description "Pybtex is a BibTeX-compatible bibliography processor written
14961 in Python. You can simply type pybtex instead of bibtex.")
14962 (license license:expat)))
14963
14964 (define-public python-onetimepass
14965 (package
14966 (name "python-onetimepass")
14967 (version "1.0.1")
14968 (source
14969 (origin
14970 (method url-fetch)
14971 (uri (pypi-uri "onetimepass" version))
14972 (sha256
14973 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
14974 (build-system python-build-system)
14975 (propagated-inputs `(("python-six" ,python-six)))
14976 (home-page "https://github.com/tadeck/onetimepass/")
14977 (synopsis "One-time password library")
14978 (description "Python one-time password library for HMAC-based (HOTP) and
14979 time-based (TOTP) passwords.")
14980 (license license:expat)))
14981
14982 (define-public python-parso
14983 (package
14984 (name "python-parso")
14985 (version "0.5.1")
14986 (source
14987 (origin
14988 (method url-fetch)
14989 (uri (pypi-uri "parso" version))
14990 (sha256
14991 (base32
14992 "171a9ivhxwsd52h1cgsz40zgzpgzscn7yqb7sdjhy8m1lzj0wsv6"))))
14993 (native-inputs
14994 `(("python-pytest" ,python-pytest)))
14995 (build-system python-build-system)
14996 (arguments
14997 `(#:phases (modify-phases %standard-phases
14998 (replace 'check
14999 (lambda _ (invoke "pytest" "-vv"))))))
15000 (home-page "https://github.com/davidhalter/parso")
15001 (synopsis "Python Parser")
15002 (description "Parso is a Python parser that supports error recovery and
15003 round-trip parsing for different Python versions (in multiple Python versions).
15004 Parso is also able to list multiple syntax errors in your Python file.")
15005 (license license:expat)))
15006
15007 (define-public python2-parso
15008 (package-with-python2 python-parso))
15009
15010 (define-public python-async-generator
15011 (package
15012 (name "python-async-generator")
15013 (version "1.10")
15014 (source
15015 (origin
15016 (method url-fetch)
15017 (uri (pypi-uri "async_generator" version))
15018 (sha256
15019 (base32
15020 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
15021 (build-system python-build-system)
15022 (native-inputs
15023 `(("python-pytest" ,python-pytest)))
15024 (home-page "https://github.com/python-trio/async_generator")
15025 (synopsis "Async generators and context managers for Python 3.5+")
15026 (description "@code{async_generator} back-ports Python 3.6's native async
15027 generators and Python 3.7's context managers into Python 3.5.")
15028 ;; Dual licensed.
15029 (license (list license:expat license:asl2.0))))
15030
15031 (define-public python-async-timeout
15032 (package
15033 (name "python-async-timeout")
15034 (version "3.0.1")
15035 (source
15036 (origin
15037 (method url-fetch)
15038 (uri (pypi-uri "async-timeout" version))
15039 (sha256
15040 (base32
15041 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
15042 (build-system python-build-system)
15043 (home-page "https://github.com/aio-libs/async_timeout/")
15044 (synopsis "Timeout context manager for asyncio programs")
15045 (description "@code{async-timeout} provides a timeout timeout context
15046 manager compatible with @code{asyncio}.")
15047 (license license:asl2.0)))
15048
15049 (define-public python-glob2
15050 (package
15051 (name "python-glob2")
15052 (version "0.6")
15053 (source
15054 (origin
15055 (method git-fetch)
15056 (uri (git-reference
15057 (url "https://github.com/miracle2k/python-glob2.git")
15058 (commit version)))
15059 (file-name (git-file-name name version))
15060 (sha256
15061 (base32 "1lm1xz3k3l0k1c5bcp9hlzmi3gp5j8dl1k3xhpiq5mnm0xq6n163"))))
15062 (build-system python-build-system)
15063 (home-page "https://github.com/miracle2k/python-glob2/")
15064 (synopsis "Extended Version of the python buildin glob module")
15065 (description "This is an extended version of the Python
15066 @url{http://docs.python.org/library/glob.html, built-in glob module} which
15067 adds:
15068
15069 @itemize
15070 @item The ability to capture the text matched by glob patterns, and return
15071 those matches alongside the file names.
15072 @item A recursive @code{**} globbing syntax, akin for example to the
15073 @code{globstar} option of Bash.
15074 @item The ability to replace the file system functions used, in order to glob
15075 on virtual file systems.
15076 @item Compatible with Python 2 and Python 3 (tested with 3.3).
15077 @end itemize
15078
15079 Glob2 currently based on the glob code from Python 3.3.1.")
15080 (license license:bsd-2)))
15081
15082 (define-public python2-glob2
15083 (package-with-python2 python-glob2))
15084
15085 (define-public python-gipc
15086 (package
15087 (name "python-gipc")
15088 (version "0.6.0")
15089 (source
15090 (origin
15091 (method url-fetch)
15092 (uri (pypi-uri "gipc" version ".zip"))
15093 (sha256
15094 (base32
15095 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
15096 (build-system python-build-system)
15097 (native-inputs
15098 `(("unzip" ,unzip)))
15099 (propagated-inputs
15100 `(("python-gevent" ,python-gevent)))
15101 (home-page "http://gehrcke.de/gipc")
15102 (synopsis "Child process management in the context of gevent")
15103 (description "Usage of Python's multiprocessing package in a
15104 gevent-powered application may raise problems. With @code{gipc},
15105 process-based child processes can safely be created anywhere within a
15106 gevent-powered application.")
15107 (license license:expat)))
15108
15109 (define-public python2-gipc
15110 (package-with-python2 python-gipc))
15111
15112 (define-public python-fusepy
15113 (package
15114 (name "python-fusepy")
15115 (version "2.0.4")
15116 (source
15117 (origin
15118 (method url-fetch)
15119 (uri (pypi-uri "fusepy" version))
15120 (sha256
15121 (base32
15122 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
15123 (build-system python-build-system)
15124 (arguments
15125 `(#:phases
15126 (modify-phases %standard-phases
15127 (add-before 'build 'set-library-file-name
15128 (lambda* (#:key inputs #:allow-other-keys)
15129 (let ((fuse (assoc-ref inputs "fuse")))
15130 (substitute* "fuse.py"
15131 (("find_library\\('fuse'\\)")
15132 (string-append "'" fuse "/lib/libfuse.so'")))
15133 #t))))))
15134 (propagated-inputs
15135 `(("fuse" ,fuse)))
15136 (home-page "https://github.com/fusepy/fusepy")
15137 (synopsis "Simple ctypes bindings for FUSE")
15138 (description "Python module that provides a simple interface to FUSE and
15139 MacFUSE. The binding is created using the standard @code{ctypes} library.")
15140 (license license:isc)))
15141
15142 (define-public python2-fusepy
15143 (package-with-python2 python-fusepy))
15144
15145 (define-public python2-gdrivefs
15146 (package
15147 (name "python2-gdrivefs")
15148 (version "0.14.9")
15149 (source
15150 (origin
15151 (method url-fetch)
15152 (uri (pypi-uri "gdrivefs" version))
15153 (sha256
15154 (base32
15155 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
15156 (build-system python-build-system)
15157 (arguments
15158 `(#:python ,python-2
15159 #:phases
15160 (modify-phases %standard-phases
15161 (add-before 'build 'patch-setup-py
15162 (lambda _
15163 ;; Update requirements from dependency==version
15164 ;; to dependency>=version
15165 (substitute* "gdrivefs/resources/requirements.txt"
15166 (("==") ">="))
15167 #t)))))
15168 (native-inputs
15169 `(("python2-gipc" ,python2-gipc)
15170 ("python2-gevent" ,python2-gevent)
15171 ("python2-greenlet" ,python2-greenlet)
15172 ("python2-httplib2" ,python2-httplib2)
15173 ("python2-uritemplate" ,python2-uritemplate)
15174 ("python2-oauth2client" ,python2-oauth2client)
15175 ("python2-six" ,python2-six)))
15176 (propagated-inputs
15177 `(("python2-dateutil" ,python2-dateutil)
15178 ("python2-fusepy" ,python2-fusepy)
15179 ("python2-google-api-client" ,python2-google-api-client)))
15180 (home-page "https://github.com/dsoprea/GDriveFS")
15181 (synopsis "Mount Google Drive as a local file system")
15182 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
15183 under Python 2.7.")
15184 (license license:gpl2)))
15185
15186 (define-public pybind11
15187 (package
15188 (name "pybind11")
15189 (version "2.3.0")
15190 (source (origin
15191 (method git-fetch)
15192 (uri (git-reference
15193 (url "https://github.com/pybind/pybind11.git")
15194 (commit (string-append "v" version))))
15195 (sha256
15196 (base32
15197 "11b6dniri8m05spfd2a19irz82shf4sdca73566bniggrf3zclnf"))
15198 (file-name (git-file-name name version))))
15199 (build-system cmake-build-system)
15200 (native-inputs
15201 `(("python" ,python)
15202 ("python-pytest" ,python-pytest)))
15203 (arguments
15204 `(#:test-target "check"))
15205 (home-page "https://github.com/pybind/pybind11/")
15206 (synopsis "Seamless operability between C++11 and Python")
15207 (description "pybind11 is a lightweight header-only library that exposes
15208 C++ types in Python and vice versa, mainly to create Python bindings of
15209 existing C++ code. Its goals and syntax are similar to the excellent
15210 Boost.Python library by David Abrahams: to minimize boilerplate code in
15211 traditional extension modules by inferring type information using compile-time
15212 introspection.")
15213 (license license:expat)))
15214
15215 (define-public python-fasteners
15216 (package
15217 (name "python-fasteners")
15218 (version "0.14.1")
15219 (source
15220 (origin
15221 (method url-fetch)
15222 (uri (pypi-uri "fasteners" version))
15223 (sha256
15224 (base32
15225 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
15226 (build-system python-build-system)
15227 (propagated-inputs
15228 `(("python-monotonic" ,python-monotonic)
15229 ("python-six" ,python-six)
15230 ("python-testtools" ,python-testtools)))
15231 (home-page "https://github.com/harlowja/fasteners")
15232 (synopsis "Python package that provides useful locks")
15233 (description
15234 "This package provides a Python program that provides following locks:
15235
15236 @itemize
15237 @item Locking decorator
15238 @item Reader-writer locks
15239 @item Inter-process locks
15240 @item Generic helpers
15241 @end itemize\n")
15242 (properties `((python2-variant . ,(delay python2-fasteners))))
15243 (license license:asl2.0)))
15244
15245 (define-public python2-fasteners
15246 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
15247 (package
15248 (inherit base)
15249 (propagated-inputs
15250 `(("python2-futures" ,python2-futures)
15251 ,@(package-propagated-inputs base))))))
15252
15253 (define-public python-requests-file
15254 (package
15255 (name "python-requests-file")
15256 (version "1.4.3")
15257 (source
15258 (origin
15259 (method url-fetch)
15260 (uri (pypi-uri "requests-file" version))
15261 (sha256
15262 (base32
15263 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
15264 (build-system python-build-system)
15265 (propagated-inputs
15266 `(("python-requests" ,python-requests)
15267 ("python-six" ,python-six)))
15268 (home-page
15269 "https://github.com/dashea/requests-file")
15270 (synopsis "File transport adapter for Requests")
15271 (description
15272 "Requests-File is a transport adapter for use with the Requests Python
15273 library to allow local file system access via @code{file://} URLs.")
15274 (license license:asl2.0)))
15275
15276 (define-public python2-requests-file
15277 (package-with-python2 python-requests-file))
15278
15279 (define-public python-tldextract
15280 (package
15281 (name "python-tldextract")
15282 (version "2.2.0")
15283 (source
15284 (origin
15285 (method url-fetch)
15286 (uri (pypi-uri "tldextract" version))
15287 (sha256
15288 (base32
15289 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
15290 (build-system python-build-system)
15291 (native-inputs
15292 `(("python-pytest" ,python-pytest)
15293 ("python-responses" ,python-responses)))
15294 (propagated-inputs
15295 `(("python-idna" ,python-idna)
15296 ("python-requests" ,python-requests)
15297 ("python-requests-file" ,python-requests-file)))
15298 (home-page
15299 "https://github.com/john-kurkowski/tldextract")
15300 (synopsis
15301 "Separate the TLD from the registered domain and subdomains of a URL")
15302 (description
15303 "TLDExtract accurately separates the TLD from the registered domain and
15304 subdomains of a URL, using the Public Suffix List. By default, this includes
15305 the public ICANN TLDs and their exceptions. It can optionally support the
15306 Public Suffix List's private domains as well.")
15307 (license license:bsd-3)))
15308
15309 (define-public python2-tldextract
15310 (package-with-python2 python-tldextract))
15311
15312 (define-public python-pynamecheap
15313 (package
15314 (name "python-pynamecheap")
15315 (version "0.0.3")
15316 (source
15317 (origin
15318 (method url-fetch)
15319 (uri (pypi-uri "PyNamecheap" version))
15320 (sha256
15321 (base32
15322 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
15323 (build-system python-build-system)
15324 (propagated-inputs
15325 `(("python-requests" ,python-requests)))
15326 (home-page
15327 "https://github.com/Bemmu/PyNamecheap")
15328 (synopsis
15329 "Namecheap API client in Python")
15330 (description
15331 "PyNamecheap is a Namecheap API client in Python.")
15332 (license license:expat)))
15333
15334 (define-public python2-pynamecheap
15335 (package-with-python2 python-pynamecheap))
15336
15337 (define-public python-dns-lexicon
15338 (package
15339 (name "python-dns-lexicon")
15340 (version "2.4.0")
15341 (source
15342 (origin
15343 (method url-fetch)
15344 (uri (pypi-uri "dns-lexicon" version))
15345 (sha256
15346 (base32
15347 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
15348 (build-system python-build-system)
15349 (arguments
15350 `(#:tests? #f)) ;requires internet access
15351 (propagated-inputs
15352 `(("python-future" ,python-future)
15353 ("python-pynamecheap" ,python-pynamecheap)
15354 ("python-requests" ,python-requests)
15355 ("python-tldextract" ,python-tldextract)
15356 ("python-urllib3" ,python-urllib3)))
15357 (home-page "https://github.com/AnalogJ/lexicon")
15358 (synopsis
15359 "Manipulate DNS records on various DNS providers")
15360 (description
15361 "Lexicon provides a way to manipulate DNS records on multiple DNS
15362 providers in a standardized way. It has a CLI but it can also be used as a
15363 Python library. It was designed to be used in automation, specifically with
15364 Let's Encrypt.")
15365 (license license:expat)))
15366
15367 (define-public python2-dns-lexicon
15368 (package-with-python2 python-dns-lexicon))
15369
15370 (define-public python-commandlines
15371 (package
15372 (name "python-commandlines")
15373 (version "0.4.1")
15374 (source
15375 (origin
15376 (method url-fetch)
15377 (uri (pypi-uri "commandlines" version))
15378 (sha256
15379 (base32
15380 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
15381 (build-system python-build-system)
15382 (home-page "https://github.com/chrissimpkins/commandlines")
15383 (synopsis "Command line argument to object parsing library")
15384 (description
15385 "@code{Commandlines} is a Python library for command line application
15386 development that supports command line argument parsing, command string
15387 validation testing and application logic.")
15388 (license license:expat)))
15389
15390 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
15391 ;; python-numba. They have a very unflexible relationship.
15392 (define-public python-numba
15393 (package
15394 (name "python-numba")
15395 (version "0.42.0")
15396 (source
15397 (origin
15398 (method url-fetch)
15399 (uri (pypi-uri "numba" version))
15400 (sha256
15401 (base32
15402 "03rqdfx0512lcri2bcpngx5k3jwfbqnanqj3n19c7d6h6hqxvq9x"))))
15403 (build-system python-build-system)
15404 (arguments
15405 `(#:modules ((guix build utils)
15406 (guix build python-build-system)
15407 (ice-9 ftw)
15408 (srfi srfi-1)
15409 (srfi srfi-26))
15410 #:phases
15411 (modify-phases %standard-phases
15412 (add-after 'unpack 'disable-proprietary-features
15413 (lambda _
15414 (setenv "NUMBA_DISABLE_HSA" "1")
15415 (setenv "NUMBA_DISABLE_CUDA" "1")
15416 #t))
15417 (add-after 'unpack 'remove-failing-tests
15418 (lambda _
15419 ;; FIXME: these tests fail for unknown reasons:
15420 ;; test_non_writable_pycache, test_non_creatable_pycache, and
15421 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
15422 (substitute* "numba/tests/test_dispatcher.py"
15423 (("def test(_non_writable_pycache)" _ m)
15424 (string-append "def guix_skip" m))
15425 (("def test(_non_creatable_pycache)" _ m)
15426 (string-append "def guix_skip" m))
15427 (("def test(_frozen)" _ m)
15428 (string-append "def guix_skip" m)))
15429
15430 ;; These tests fail because we don't run the tests from the build
15431 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
15432 ;; They ar in numba.tests.test_pycc.TestDistutilsSupport.
15433 (substitute* "numba/tests/test_pycc.py"
15434 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
15435 (string-append "def guix_skip" m)))
15436 #t))
15437 (replace 'check
15438 (lambda _
15439 (let ((cwd (getcwd)))
15440 (setenv "PYTHONPATH"
15441 (string-append cwd "/build/"
15442 (find (cut string-prefix? "lib" <>)
15443 (scandir (string-append cwd "/build")))
15444 ":"
15445 (getenv "PYTHONPATH")))
15446 ;; Something is wrong with the PYTHONPATH when running the
15447 ;; tests from the build directory, as it complains about not being
15448 ;; able to import certain modules.
15449 (with-directory-excursion "/tmp"
15450 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
15451 #t)))))
15452 (propagated-inputs
15453 `(("python-llvmlite" ,python-llvmlite)
15454 ("python-numpy" ,python-numpy)
15455 ("python-singledispatch" ,python-singledispatch)))
15456 ;; Needed for tests.
15457 (inputs
15458 `(("python-jinja2" ,python-jinja2)
15459 ("python-pygments" ,python-pygments)))
15460 (home-page "https://numba.pydata.org")
15461 (synopsis "Compile Python code using LLVM")
15462 (description "Numba gives you the power to speed up your applications with
15463 high performance functions written directly in Python. With a few
15464 annotations, array-oriented and math-heavy Python code can be just-in-time
15465 compiled to native machine instructions, similar in performance to C, C++ and
15466 Fortran, without having to switch languages or Python interpreters.
15467
15468 Numba works by generating optimized machine code using the LLVM compiler
15469 infrastructure at import time, runtime, or statically (using the included pycc
15470 tool).")
15471 (license license:bsd-3)))
15472
15473 (define-public python-anndata
15474 (package
15475 (name "python-anndata")
15476 (version "0.6.18")
15477 (source
15478 (origin
15479 (method url-fetch)
15480 (uri (pypi-uri "anndata" version))
15481 (sha256
15482 (base32
15483 "03x83yjaccbqszj7x4fwwmpil0ai59yx64d1zmf2691za3j03w73"))))
15484 (build-system python-build-system)
15485 (propagated-inputs
15486 `(("python-h5py" ,python-h5py)
15487 ("python-natsort" ,python-natsort)
15488 ("python-pandas" ,python-pandas)
15489 ("python-scipy" ,python-scipy)))
15490 (home-page "https://github.com/theislab/anndata")
15491 (synopsis "Annotated data for data analysis pipelines")
15492 (description "Anndata is a package for simple (functional) high-level APIs
15493 for data analysis pipelines. In this context, it provides an efficient,
15494 scalable way of keeping track of data together with learned annotations and
15495 reduces the code overhead typically encountered when using a mostly
15496 object-oriented library such as @code{scikit-learn}.")
15497 (license license:bsd-3)))
15498
15499 (define-public python-dill
15500 (package
15501 (name "python-dill")
15502 (version "0.2.9")
15503 (source
15504 (origin
15505 (method url-fetch)
15506 (uri (pypi-uri "dill" version))
15507 (sha256
15508 (base32 "0vwqyi6hyz2r29zydc78dqymkbc5y7gia16xcdh215cikxph9mpn"))))
15509 (build-system python-build-system)
15510 ;; FIXME: The check phase fails with "don't know how to make test from: …".
15511 (arguments '(#:tests? #f))
15512 (home-page "https://pypi.org/project/dill")
15513 (synopsis "Serialize all of Python")
15514 (description "Dill extends Python's @code{pickle} module for serializing
15515 and de-serializing Python objects to the majority of the built-in Python
15516 types. Dill provides the user the same interface as the @code{pickle} module,
15517 and also includes some additional features. In addition to pickling Python
15518 objects, @code{dill} provides the ability to save the state of an interpreter
15519 session in a single command. Hence, it would be feasible to save a
15520 interpreter session, close the interpreter, ship the pickled file to another
15521 computer, open a new interpreter, unpickle the session and thus continue from
15522 the saved state of the original interpreter session.")
15523 (license license:bsd-3)))
15524
15525 (define-public python-multiprocess
15526 (package
15527 (name "python-multiprocess")
15528 (version "0.70.6.1")
15529 (source
15530 (origin
15531 (method url-fetch)
15532 (uri (pypi-uri "multiprocess" version))
15533 (sha256
15534 (base32
15535 "1ip5caz67b3q0553mr8gm8xwsb8x500jn8ml0gihgyfy52m2ypcq"))))
15536 (build-system python-build-system)
15537 (propagated-inputs
15538 `(("python-dill" ,python-dill)))
15539 (home-page "https://pypi.org/project/multiprocess")
15540 (synopsis "Multiprocessing and multithreading in Python")
15541 (description
15542 "This package is a fork of the multiprocessing Python package, a package
15543 which supports the spawning of processes using the API of the standard
15544 library's @code{threading} module.")
15545 (license license:bsd-3)))
15546
15547 (define-public python-toolz
15548 (package
15549 (name "python-toolz")
15550 (version "0.9.0")
15551 (source
15552 (origin
15553 (method url-fetch)
15554 (uri (pypi-uri "toolz" version))
15555 (sha256
15556 (base32
15557 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
15558 (build-system python-build-system)
15559 ;; FIXME: tests cannot be computed: "Can't perform this operation for
15560 ;; unregistered loader type"
15561 (arguments '(#:tests? #f))
15562 (home-page "https://github.com/pytoolz/toolz/")
15563 (synopsis "List processing tools and functional utilities")
15564 (description
15565 "This package provides a set of utility functions for iterators,
15566 functions, and dictionaries.")
15567 (license license:bsd-3)))
15568
15569 (define-public python2-toolz
15570 (package-with-python2 python-toolz))
15571
15572 (define-public python-cytoolz
15573 (package
15574 (name "python-cytoolz")
15575 (version "0.9.0.1")
15576 (source
15577 (origin
15578 (method url-fetch)
15579 (uri (pypi-uri "cytoolz" version))
15580 (sha256
15581 (base32
15582 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
15583 (build-system python-build-system)
15584 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
15585 ;; 'exceptions'"
15586 (arguments '(#:tests? #f))
15587 (propagated-inputs
15588 `(("python-toolz" ,python-toolz)))
15589 (native-inputs
15590 `(("python-cython" ,python-cython)))
15591 (home-page "https://github.com/pytoolz/cytoolz")
15592 (synopsis "High performance functional utilities")
15593 (description
15594 "The cytoolz package implements the same API as provided by toolz. The
15595 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
15596 that is accessible to other projects developed in Cython.")
15597 (license license:bsd-3)))
15598
15599 (define-public python-sortedcontainers
15600 (package
15601 (name "python-sortedcontainers")
15602 (version "2.0.4")
15603 (source
15604 (origin
15605 (method url-fetch)
15606 (uri (pypi-uri "sortedcontainers" version))
15607 (sha256
15608 (base32
15609 "10hrk2k0hbf9x78vd3f0lj277m1yzfhzzxr0hja718liwb398wk0"))))
15610 (build-system python-build-system)
15611 (native-inputs
15612 `(("python-tox" ,python-tox)))
15613 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
15614 (synopsis "Sorted List, Sorted Dict, Sorted Set")
15615 (description
15616 "This package provides a sorted collections library, written in
15617 pure-Python.")
15618 (license license:asl2.0)))
15619
15620 (define-public python-cloudpickle
15621 (package
15622 (name "python-cloudpickle")
15623 (version "0.6.1")
15624 (source
15625 (origin
15626 (method url-fetch)
15627 (uri (pypi-uri "cloudpickle" version))
15628 (sha256
15629 (base32
15630 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
15631 (build-system python-build-system)
15632 ;; FIXME: there are 5 errors in 122 tests:
15633 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
15634 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
15635 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15636 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15637 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
15638 ;; TypeError: cannot serialize '_io.BufferedRandom' object
15639 (arguments '(#:tests? #f))
15640 (native-inputs
15641 `(("python-pytest" ,python-pytest)
15642 ("python-mock" ,python-mock)
15643 ("python-tornado" ,python-tornado)))
15644 (home-page "https://github.com/cloudpipe/cloudpickle")
15645 (synopsis "Extended pickling support for Python objects")
15646 (description
15647 "Cloudpickle makes it possible to serialize Python constructs not
15648 supported by the default pickle module from the Python standard library. It
15649 is especially useful for cluster computing where Python expressions are
15650 shipped over the network to execute on remote hosts, possibly close to the
15651 data.")
15652 (license license:bsd-3)))
15653
15654 (define-public python2-cloudpickle
15655 (package-with-python2 python-cloudpickle))
15656
15657 (define-public python-locket
15658 (package
15659 (name "python-locket")
15660 (version "0.2.0")
15661 (source
15662 (origin
15663 (method url-fetch)
15664 (uri (pypi-uri "locket" version))
15665 (sha256
15666 (base32
15667 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
15668 (build-system python-build-system)
15669 (home-page "https://github.com/mwilliamson/locket.py")
15670 (synopsis "File-based locks for Python")
15671 (description
15672 "Locket implements a lock that can be used by multiple processes provided
15673 they use the same path.")
15674 (license license:bsd-2)))
15675
15676 (define-public python2-locket
15677 (package-with-python2 python-locket))
15678
15679 (define-public python-blosc
15680 (package
15681 (name "python-blosc")
15682 (version "1.5.1")
15683 (source
15684 (origin
15685 (method url-fetch)
15686 (uri (pypi-uri "blosc" version))
15687 (sha256
15688 (base32
15689 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
15690 (build-system python-build-system)
15691 ;; FIXME: all tests pass, but then this error is printed:
15692 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
15693 (arguments '(#:tests? #f))
15694 (propagated-inputs
15695 `(("python-numpy" ,python-numpy)))
15696 (home-page "https://github.com/blosc/python-blosc")
15697 (synopsis "Python wrapper for the Blosc data compressor library")
15698 (description "Blosc is a high performance compressor optimized for binary
15699 data. It has been designed to transmit data to the processor cache faster
15700 than the traditional, non-compressed, direct memory fetch approach via a
15701 @code{memcpy()} system call.
15702
15703 Blosc works well for compressing numerical arrays that contains data with
15704 relatively low entropy, like sparse data, time series, grids with
15705 regular-spaced values, etc.
15706
15707 This Python package wraps the Blosc library.")
15708 (license license:bsd-3)))
15709
15710 (define-public python2-blosc
15711 (package-with-python2 python-blosc))
15712
15713 (define-public python-partd
15714 (package
15715 (name "python-partd")
15716 (version "0.3.9")
15717 (source
15718 (origin
15719 (method url-fetch)
15720 (uri (pypi-uri "partd" version))
15721 (sha256
15722 (base32
15723 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
15724 (build-system python-build-system)
15725 (propagated-inputs
15726 `(("python-blosc" ,python-blosc)
15727 ("python-locket" ,python-locket)
15728 ("python-numpy" ,python-numpy)
15729 ("python-pandas" ,python-pandas)
15730 ("python-pyzmq" ,python-pyzmq)
15731 ("python-toolz" ,python-toolz)))
15732 (home-page "https://github.com/dask/partd/")
15733 (synopsis "Appendable key-value storage")
15734 (description "Partd stores key-value pairs. Values are raw bytes. We
15735 append on old values. Partd excels at shuffling operations.")
15736 (license license:bsd-3)))
15737
15738 (define-public python2-partd
15739 (package-with-python2 python-partd))
15740
15741 (define-public python-dask
15742 (package
15743 (name "python-dask")
15744 (version "1.2.2")
15745 (source
15746 (origin
15747 (method url-fetch)
15748 (uri (pypi-uri "dask" version))
15749 (sha256
15750 (base32 "0b29gvf96gmp20wicly3v3mhyc93zbm3mdv935fka6x0wax7cy2y"))))
15751 (build-system python-build-system)
15752 ;; A single test out of 5000+ fails. This test is marked as xfail when
15753 ;; pytest-xdist is used.
15754 (arguments
15755 `(#:phases
15756 (modify-phases %standard-phases
15757 (add-after 'unpack 'disable-broken-test
15758 (lambda _
15759 (substitute* "dask/tests/test_threaded.py"
15760 (("def test_interrupt\\(\\)" m)
15761 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15762 m)))
15763 (when (which "python2")
15764 ;; This test fails with recent Pandas:
15765 ;; <https://github.com/dask/dask/issues/3794>.
15766 (substitute* "dask/dataframe/tests/test_dataframe.py"
15767 (("def test_info\\(\\)" m)
15768 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15769 m))))
15770 #t))
15771 (replace 'check
15772 (lambda _ (invoke "pytest" "-vv"))))))
15773 (propagated-inputs
15774 `(("python-cloudpickle" ,python-cloudpickle)
15775 ("python-numpy" ,python-numpy)
15776 ("python-pandas" ,python-pandas)
15777 ("python-partd" ,python-partd)
15778 ("python-toolz" ,python-toolz)
15779 ("python-pyyaml" ,python-pyyaml)))
15780 (native-inputs
15781 `(("python-pytest" ,python-pytest)
15782 ("python-pytest-runner" ,python-pytest-runner)))
15783 (home-page "https://github.com/dask/dask/")
15784 (synopsis "Parallel computing with task scheduling")
15785 (description
15786 "Dask is a flexible parallel computing library for analytics. It
15787 consists of two components: dynamic task scheduling optimized for computation,
15788 and large data collections like parallel arrays, dataframes, and lists that
15789 extend common interfaces like NumPy, Pandas, or Python iterators to
15790 larger-than-memory or distributed environments. These parallel collections
15791 run on top of the dynamic task schedulers. ")
15792 (license license:bsd-3)))
15793
15794 (define-public python2-dask
15795 (package-with-python2 python-dask))
15796
15797 (define-public python-ilinkedlist
15798 (package
15799 (name "python-ilinkedlist")
15800 (version "0.4.0")
15801 (source
15802 (origin
15803 (method url-fetch)
15804 (uri (pypi-uri "ilinkedlist" version))
15805 (sha256
15806 (base32
15807 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
15808 (build-system python-build-system)
15809 (native-inputs `(("python-pytest" ,python-pytest)))
15810 (inputs `(("python" ,python)))
15811 (home-page "https://github.com/luther9/ilinkedlist-py")
15812 (synopsis "Immutable linked list library")
15813 (description
15814 "This is a implementation of immutable linked lists for Python. It
15815 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
15816 Since a linked list is treated as immutable, it is hashable, and its length
15817 can be retrieved in constant time. Some of the terminology is inspired by
15818 LISP. It is possible to create an improper list by creating a @code{Pair}
15819 with a non-list @code{cdr}.")
15820 (license license:gpl3+)))
15821
15822 (define-public python-readlike
15823 (package
15824 (name "python-readlike")
15825 (version "0.1.3")
15826 (source
15827 (origin
15828 (method url-fetch)
15829 (uri (pypi-uri "readlike" version))
15830 (sha256
15831 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
15832 (build-system python-build-system)
15833 (home-page "https://github.com/jangler/readlike")
15834 (synopsis "GNU Readline-like line editing module")
15835 (description
15836 "This Python module provides line editing functions similar to the default
15837 Emacs-style ones of GNU Readline. Unlike the Python standard library's
15838 @code{readline} package, this one allows access to those capabilties in settings
15839 outside of a standard command-line interface. It is especially well-suited to
15840 interfacing with Urwid, due to a shared syntax for describing key inputs.
15841
15842 Currently, all stateless Readline commands are implemented. Yanking and history
15843 are not supported.")
15844 (license license:expat)))
15845
15846 (define-public python2-readlike
15847 (package-with-python2 python-readlike))
15848
15849 (define-public python-reparser
15850 (package
15851 (name "python-reparser")
15852 (version "1.4.3")
15853 (source
15854 (origin
15855 (method url-fetch)
15856 (uri (pypi-uri "ReParser" version))
15857 (sha256
15858 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
15859 (build-system python-build-system)
15860 (home-page "https://github.com/xmikos/reparser")
15861 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
15862 (description
15863 "This Python library provides a simple lexer/parser for inline markup based
15864 on regular expressions.")
15865 (license license:expat)))
15866
15867 (define-public python2-reparser
15868 (let ((reparser (package-with-python2
15869 (strip-python2-variant python-reparser))))
15870 (package (inherit reparser)
15871 (propagated-inputs
15872 `(("python2-enum34" ,python2-enum34)
15873 ,@(package-propagated-inputs reparser))))))
15874
15875 (define-public python-precis-i18n
15876 (package
15877 (name "python-precis-i18n")
15878 (version "1.0.0")
15879 (source
15880 (origin
15881 (method url-fetch)
15882 (uri (pypi-uri "precis_i18n" version))
15883 (sha256
15884 (base32
15885 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
15886 (build-system python-build-system)
15887 (home-page "https://github.com/byllyfish/precis_i18n")
15888 (synopsis "Implementation of the PRECIS framework")
15889 (description
15890 "This module implements the PRECIS Framework as described in RFC 8264,
15891 RFC 8265 and RFC 8266.")
15892 (license license:expat)))
15893
15894 (define-public python-absl-py
15895 (package
15896 (name "python-absl-py")
15897 (version "0.6.1")
15898 (source
15899 (origin
15900 (method url-fetch)
15901 (uri (pypi-uri "absl-py" version))
15902 (sha256
15903 (base32
15904 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
15905 (build-system python-build-system)
15906 (propagated-inputs
15907 `(("python-six" ,python-six)))
15908 (home-page "https://github.com/abseil/abseil-py")
15909 (synopsis "Abseil Python common libraries")
15910 (description
15911 "This package provides the Abseil Python Common Libraries, a collection
15912 of Python libraries for building Python applications.")
15913 (license license:asl2.0)))
15914
15915 (define-public python-astor
15916 (package
15917 (name "python-astor")
15918 (version "0.7.1")
15919 (source
15920 (origin
15921 (method url-fetch)
15922 (uri (pypi-uri "astor" version))
15923 (sha256
15924 (base32
15925 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
15926 (build-system python-build-system)
15927 ;; FIXME: There are two errors and two test failures.
15928 (arguments `(#:tests? #f))
15929 (home-page "https://github.com/berkerpeksag/astor")
15930 (synopsis "Read and write Python ASTs")
15931 (description "Astor is designed to allow easy manipulation of Python
15932 source via the Abstract Syntax Tree.")
15933 (license license:bsd-3)))
15934
15935 (define-public python2-astor
15936 (package-with-python2 python-astor))
15937
15938 (define-public python-grpcio
15939 (package
15940 (name "python-grpcio")
15941 (version "1.17.1")
15942 (source
15943 (origin
15944 (method url-fetch)
15945 (uri (pypi-uri "grpcio" version))
15946 (sha256
15947 (base32
15948 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
15949 (build-system python-build-system)
15950 (propagated-inputs
15951 `(("python-six" ,python-six)))
15952 (home-page "https://grpc.io")
15953 (synopsis "HTTP/2-based RPC framework")
15954 (description "This package provides a Python library for communicating
15955 with the HTTP/2-based RPC framework gRPC.")
15956 (license license:asl2.0)))
15957
15958 (define-public python-astunparse
15959 (package
15960 (name "python-astunparse")
15961 (version "1.6.2")
15962 (source
15963 (origin
15964 (method url-fetch)
15965 (uri (pypi-uri "astunparse" version))
15966 (sha256
15967 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
15968 (build-system python-build-system)
15969 (arguments '(#:tests? #f)) ; there are none
15970 (propagated-inputs
15971 `(("python-six" ,python-six)
15972 ("python-wheel" ,python-wheel)))
15973 (home-page "https://github.com/simonpercivall/astunparse")
15974 (synopsis "AST unparser for Python")
15975 (description "This package provides an AST unparser for Python. It is a
15976 factored out version of @code{unparse} found in the Python source
15977 distribution.")
15978 (license license:bsd-3)))
15979
15980 (define-public python-gast
15981 (package
15982 (name "python-gast")
15983 (version "0.2.2")
15984 (source
15985 (origin
15986 (method url-fetch)
15987 (uri (pypi-uri "gast" version))
15988 (sha256
15989 (base32 "1w5dzdb3gpcfmd2s0b93d8gff40a1s41rv31458z14inb3s9v4zy"))))
15990 (build-system python-build-system)
15991 (propagated-inputs
15992 `(("python-astunparse" ,python-astunparse)))
15993 (home-page "https://pypi.org/project/gast/")
15994 (synopsis "Generic Python AST that abstracts the underlying Python version")
15995 (description
15996 "GAST provides a compatibility layer between the AST of various Python
15997 versions, as produced by @code{ast.parse} from the standard @code{ast}
15998 module.")
15999 (license license:bsd-3)))
16000
16001 (define-public python-wikidata
16002 (package
16003 (name "python-wikidata")
16004 (version "0.6.1")
16005 (source
16006 (origin
16007 (method url-fetch)
16008 (uri (pypi-uri "Wikidata" version))
16009 (sha256
16010 (base32
16011 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
16012 (build-system python-build-system)
16013 (propagated-inputs
16014 `(("python-babel" ,python-babel)))
16015 (home-page "https://github.com/dahlia/wikidata")
16016 (synopsis "Wikidata client library")
16017 (description
16018 "This package provides a Python interface to
16019 @url{https://www.wikidata.org/, Wikidata}.")
16020 (properties '((upstream-name . "Wikidata")))
16021 (license license:gpl3+)))
16022
16023 (define-public python-doctest-ignore-unicode
16024 (package
16025 (name "python-doctest-ignore-unicode")
16026 (version "0.1.2")
16027 (source
16028 (origin
16029 (method url-fetch)
16030 (uri (pypi-uri "doctest-ignore-unicode" version))
16031 (sha256
16032 (base32
16033 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
16034 (build-system python-build-system)
16035 (native-inputs
16036 `(("python-nose" ,python-nose)))
16037 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
16038 (synopsis "Ignore Unicode literal prefixes in doctests")
16039 (description
16040 "This package adds support for a flag to ignore Unicode literal prefixes
16041 in doctests.")
16042 (license license:asl2.0)))
16043
16044 (define-public python-attr
16045 (package
16046 (name "python-attr")
16047 (version "0.3.1")
16048 (source
16049 (origin
16050 (method url-fetch)
16051 (uri (pypi-uri "attr" version))
16052 (sha256
16053 (base32
16054 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
16055 (build-system python-build-system)
16056 (home-page "https://github.com/denis-ryzhkov/attr")
16057 (synopsis "Decorator for attributes of target function or class")
16058 (description "Simple decorator to set attributes of target function or
16059 class in a @acronym{DRY, Don't Repeat Yourself} way.")
16060 (license license:expat)))
16061
16062 (define-public python-construct
16063 (package
16064 (name "python-construct")
16065 (version "2.9.45")
16066 (source
16067 (origin
16068 (method url-fetch)
16069 (uri (pypi-uri "construct" version))
16070 (sha256
16071 (base32
16072 "130iy05awzigm2xah2yvlmb08mac5bi4gzr5m3g7k1krs3ps0w92"))))
16073 (build-system python-build-system)
16074 (arguments
16075 `(#:tests? #f)) ; No tests exist.
16076 (propagated-inputs
16077 `(("python-extras" ,python-extras)
16078 ("python-arrow" ,python-arrow)
16079 ("python-numpy" ,python-numpy)
16080 ("python-ruamel.yaml" ,python-ruamel.yaml)))
16081 (home-page "http://construct.readthedocs.io")
16082 (synopsis "Declarative and symmetrical parser and builder for binary data")
16083 (description
16084 "This package provides both simple, atomic constructs (such as
16085 integers of various sizes), as well as composite ones which allow you
16086 form hierarchical and sequential structures of increasing complexity.
16087 It features bit and byte granularity, easy debugging and testing, an
16088 easy-to-extend subclass system, and lots of primitive constructs to
16089 make your work easier.")
16090 (license license:expat)))
16091
16092 (define-public python-humanize
16093 (package
16094 (name "python-humanize")
16095 (version "0.5.1")
16096 (source
16097 (origin
16098 (method url-fetch)
16099 (uri (pypi-uri "humanize" version))
16100 (sha256
16101 (base32
16102 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
16103 (arguments
16104 '(#:tests? #f)) ; tests not in pypi archive
16105 (build-system python-build-system)
16106 (home-page "https://github.com/jmoiron/humanize")
16107 (synopsis "Print numerical information in a human-readable form")
16108 (description "This package provides a Python module that displays numbers
16109 and dates in \"human readable\" forms. For example, it would display
16110 \"12345591313\" as \"12.3 billion\".")
16111 (license license:expat)))
16112
16113 (define-public python-txaio
16114 (package
16115 (name "python-txaio")
16116 (version "18.8.1")
16117 (source
16118 (origin
16119 (method url-fetch)
16120 (uri (pypi-uri "txaio" version))
16121 (sha256
16122 (base32
16123 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
16124 (build-system python-build-system)
16125 (propagated-inputs
16126 `(("python-twisted" ,python-twisted)
16127 ("python-six" ,python-six)))
16128 (home-page "https://github.com/crossbario/txaio")
16129 (synopsis "Compatibility layer between Python asyncio and Twisted")
16130 (description "Txaio provides a compatibility layer between the Python
16131 @code{asyncio} module and @code{Twisted}.")
16132 (license license:expat)))
16133
16134 (define-public python-toolshed
16135 (package
16136 (name "python-toolshed")
16137 (version "0.4.6")
16138 (source
16139 (origin
16140 (method url-fetch)
16141 (uri (pypi-uri "toolshed" version))
16142 (sha256
16143 (base32
16144 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
16145 (build-system python-build-system)
16146 (native-inputs
16147 `(("python-nose" ,python-nose)))
16148 (home-page "https://github.com/brentp/toolshed/")
16149 (synopsis "Collection of modules and functions for working with data")
16150 (description "This is a collection of well-tested, simple modules and
16151 functions that aim to reduce boilerplate when working with data.")
16152 (license license:bsd-2)))
16153
16154 (define-public python-annoy
16155 (package
16156 (name "python-annoy")
16157 (version "1.15.1")
16158 (source
16159 (origin
16160 (method url-fetch)
16161 (uri (pypi-uri "annoy" version))
16162 (sha256
16163 (base32
16164 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
16165 (build-system python-build-system)
16166 (native-inputs
16167 `(("python-nose" ,python-nose)))
16168 (home-page "https://github.com/spotify/annoy/")
16169 (synopsis "Approximate nearest neighbors library")
16170 (description
16171 "Annoy is a C++ library with Python bindings to search for points in
16172 space that are close to a given query point. It also creates large read-only
16173 file-based data structures that are @code{mmap}ped into memory so that many
16174 processes may share the same data.")
16175 (license license:asl2.0)))
16176
16177 (define-public python-pylzma
16178 (package
16179 (name "python-pylzma")
16180 (version "0.5.0")
16181 (source
16182 (origin
16183 (method url-fetch)
16184 (uri (pypi-uri "pylzma" version))
16185 (sha256
16186 (base32
16187 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
16188 (build-system python-build-system)
16189 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
16190 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
16191 (description "This package provides Python bindings for the LZMA library
16192 by Igor Pavlov.")
16193 (license license:lgpl2.1+)))
16194
16195 (define-public python2-pylzma
16196 (package-with-python2 python-pylzma))
16197
16198 (define-public python2-zeroconf
16199 (package
16200 (name "python2-zeroconf")
16201
16202 ;; This is the last version that supports Python 2.x.
16203 (version "0.19.1")
16204 (source
16205 (origin
16206 (method url-fetch)
16207 (uri (pypi-uri "zeroconf" version))
16208 (sha256
16209 (base32
16210 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
16211 (build-system python-build-system)
16212 (arguments
16213 `(#:python ,python-2
16214 #:phases
16215 (modify-phases %standard-phases
16216 (add-after 'unpack 'patch-requires
16217 (lambda* (#:key inputs #:allow-other-keys)
16218 (substitute* "setup.py"
16219 (("enum-compat")
16220 "enum34"))
16221 #t)))))
16222 (native-inputs
16223 `(("python2-six" ,python2-six)
16224 ("python2-enum32" ,python2-enum34)
16225 ("python2-netifaces" ,python2-netifaces)
16226 ("python2-typing" ,python2-typing)))
16227 (home-page "https://github.com/jstasiak/python-zeroconf")
16228 (synopsis "Pure Python mDNS service discovery")
16229 (description
16230 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
16231 compatible).")
16232 (license license:lgpl2.1+)))
16233
16234 (define-public python-bsddb3
16235 (package
16236 (name "python-bsddb3")
16237 (version "6.2.6")
16238 (source
16239 (origin
16240 (method url-fetch)
16241 (uri (pypi-uri "bsddb3" version))
16242 (sha256
16243 (base32
16244 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
16245 (build-system python-build-system)
16246 (inputs
16247 `(("bdb" ,bdb)))
16248 (arguments
16249 '(#:phases
16250 (modify-phases %standard-phases
16251 (add-after 'unpack 'configure-locations
16252 (lambda* (#:key inputs #:allow-other-keys)
16253 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
16254 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
16255 #t))
16256 (replace 'check
16257 (lambda _
16258 (invoke "python3" "test3.py" "-v"))))))
16259 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
16260 (synopsis "Python bindings for Oracle Berkeley DB")
16261 (description
16262 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
16263 C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
16264 Transaction objects, and each of these is exposed as a Python type in the
16265 bsddb3.db module. The database objects can use various access methods: btree,
16266 hash, recno, and queue. Complete support of Berkeley DB distributed
16267 transactions. Complete support for Berkeley DB Replication Manager.
16268 Complete support for Berkeley DB Base Replication. Support for RPC.")
16269 (license license:bsd-3)))
16270
16271 (define-public python-dbfread
16272 (package
16273 (name "python-dbfread")
16274 (version "2.0.7")
16275 (source (origin
16276 (method url-fetch)
16277 (uri (pypi-uri "dbfread" version))
16278 (sha256
16279 (base32
16280 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
16281 (build-system python-build-system)
16282 (native-inputs
16283 `(("python-pytest" ,python-pytest)))
16284 (home-page "https://dbfread.readthedocs.io")
16285 (synopsis "Read DBF Files with Python")
16286 (description
16287 "This library reads DBF files and returns the data as native Python data
16288 types for further processing. It is primarily intended for batch jobs and
16289 one-off scripts.")
16290 (license license:expat)))
16291
16292 (define-public python-cached-property
16293 (package
16294 (name "python-cached-property")
16295 (version "1.5.1")
16296 (source
16297 (origin
16298 (method url-fetch)
16299 (uri (pypi-uri "cached-property" version))
16300 (sha256
16301 (base32
16302 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
16303 (build-system python-build-system)
16304 (arguments
16305 `(#:phases
16306 (modify-phases %standard-phases
16307 ;; https://github.com/pydanny/cached-property/issues/131
16308 ;; recent versions of freezegun break one test
16309 (add-after 'unpack 'disable-broken-test
16310 (lambda _
16311 (substitute* "tests/test_cached_property.py"
16312 (("def test_threads_ttl_expiry\\(self\\)" m)
16313 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
16314 " " m)))
16315 #t)))))
16316 (native-inputs
16317 `(("python-freezegun" ,python-freezegun)))
16318 (home-page
16319 "https://github.com/pydanny/cached-property")
16320 (synopsis
16321 "Decorator for caching properties in classes")
16322 (description
16323 "This package provides a decorator which makes caching
16324 time-or-computationally-expensive properties quick and easy and works in Python
16325 2 or 3.")
16326 (license license:bsd-3)))
16327
16328 (define-public python-folium
16329 (package
16330 (name "python-folium")
16331 (version "0.10.0")
16332 (source
16333 (origin
16334 (method url-fetch)
16335 (uri (pypi-uri "folium" version))
16336 (sha256
16337 (base32
16338 "18fzxijsgrb95r0a8anc9ba5ijyw3nlnv3rpavfbkqa5v878x84f"))))
16339 (build-system python-build-system)
16340 (propagated-inputs
16341 `(("python-branca" ,python-branca)
16342 ("python-jinja2" ,python-jinja2)
16343 ("python-numpy" ,python-numpy)
16344 ("python-requests" ,python-requests)))
16345 (native-inputs
16346 `(("python-pytest" ,python-pytest)))
16347 (home-page "https://github.com/python-visualization/folium")
16348 (synopsis "Make beautiful maps with Leaflet.js & Python")
16349 (description "@code{folium} makes it easy to visualize data that’s been
16350 manipulated in Python on an interactive leaflet map. It enables both the
16351 binding of data to a map for @code{choropleth} visualizations as well as
16352 passing rich vector/raster/HTML visualizations as markers on the map.
16353
16354 The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
16355 Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
16356 supports Image, Video, GeoJSON and TopoJSON overlays.")
16357 (license license:expat)))
16358
16359 (define-public jube
16360 (package
16361 ;; This is a command-line tool, so no "python-" prefix.
16362 (name "jube")
16363 (version "2.2.2")
16364 (source (origin
16365 (method url-fetch)
16366 (uri (string-append
16367 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
16368 version))
16369 (sha256
16370 (base32
16371 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
16372 (file-name (string-append "jube-" version ".tar.gz"))))
16373 (build-system python-build-system)
16374 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
16375 (synopsis "Benchmarking environment")
16376 (description
16377 "JUBE helps perform and analyze benchmarks in a systematic way. For each
16378 benchmarked application, benchmark data is stored in a format that allows JUBE
16379 to deduct the desired information. This data can be parsed by automatic pre-
16380 and post-processing scripts that draw information and store it more densely
16381 for manual interpretation.")
16382 (license license:gpl3+)))
16383
16384 (define-public python-pyroutelib3
16385 (package
16386 (name "python-pyroutelib3")
16387 (version "1.3.post1")
16388 (source
16389 (origin
16390 (method url-fetch)
16391 (uri (pypi-uri "pyroutelib3" version))
16392 (sha256
16393 (base32
16394 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
16395 (build-system python-build-system)
16396 (propagated-inputs
16397 `(("python-dateutil" ,python-dateutil)))
16398 (home-page "https://github.com/MKuranowski/pyroutelib3")
16399 (synopsis "Library for simple routing on OSM data")
16400 (description "Library for simple routing on OSM data")
16401 (license license:gpl3+)))
16402
16403 (define-public python-elementpath
16404 (package
16405 (name "python-elementpath")
16406 (version "1.2.0")
16407 (source
16408 (origin
16409 (method url-fetch)
16410 (uri (pypi-uri "elementpath" version))
16411 (sha256
16412 (base32
16413 "1syn2z543brab23dskh3fjd9pqvz6npqbcicrs2d88dbg26xl08p"))))
16414 (build-system python-build-system)
16415 (home-page
16416 "https://github.com/sissaschool/elementpath")
16417 (synopsis
16418 "XPath 1.0/2.0 parsers and selectors for ElementTree and lxml")
16419 (description
16420 "The proposal of this package is to provide XPath 1.0 and 2.0 selectors
16421 for Python's ElementTree XML data structures, both for the standard
16422 ElementTree library and for the @uref{http://lxml.de, lxml.etree} library.
16423
16424 For lxml.etree this package can be useful for providing XPath 2.0 selectors,
16425 because lxml.etree already has it's own implementation of XPath 1.0.")
16426 (license license:expat)))
16427
16428 (define-public python-bibtexparser
16429 (package
16430 (name "python-bibtexparser")
16431 (version "1.1.0")
16432 (source
16433 (origin
16434 (method url-fetch)
16435 (uri (pypi-uri "bibtexparser" version))
16436 (sha256
16437 (base32
16438 "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
16439 (build-system python-build-system)
16440 (propagated-inputs
16441 `(("python-pyparsing" ,python-pyparsing)))
16442 (native-inputs
16443 `(("python-future" ,python-future)))
16444 (home-page "https://github.com/sciunto-org/python-bibtexparser")
16445 (synopsis "Python library to parse BibTeX files")
16446 (description "BibtexParser is a Python library to parse BibTeX files.")
16447 (license (list license:bsd-3 license:lgpl3))))
16448
16449 (define-public python-distro
16450 (package
16451 (name "python-distro")
16452 (version "1.4.0")
16453 (source
16454 (origin
16455 (method url-fetch)
16456 (uri (pypi-uri "distro" version))
16457 (sha256
16458 (base32
16459 "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n"))))
16460 (build-system python-build-system)
16461 (native-inputs
16462 `(("python-pytest" ,python-pytest)))
16463 (home-page "https://github.com/nir0s/distro")
16464 (synopsis
16465 "OS platform information API")
16466 (description
16467 "@code{distro} provides information about the OS distribution it runs on,
16468 such as a reliable machine-readable ID, or version information.
16469
16470 It is the recommended replacement for Python's original
16471 `platform.linux_distribution` function (which will be removed in Python 3.8).
16472 @code{distro} also provides a command-line interface to output the platform
16473 information in various formats.")
16474 (license license:asl2.0)))