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, 2020 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, 2020 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, 2020 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, 2020 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, 2020 Julien Lepiller <julien@lepiller.eu>
35 ;;; Copyright © 2016, 2017, 2018, 2019, 2020 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, 2019 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, 2019 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, 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr>
55 ;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
56 ;;; Copyright © 2018, 2019 Clément Lassieur <clement@lassieur.org>
57 ;;; Copyright © 2018, 2019, 2020 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, 2020 Brett Gilio <brettg@gnu.org>
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 ;;; Copyright © 2019 Tanguy Le Carrour <tanguy@bioneland.org>
70 ;;; Copyright © 2019 Mădălin Ionel Patrașcu <madalinionel.patrascu@mdc-berlin.de>
71 ;;; Copyright © 2020 Riku Viitanen <riku.viitanen@protonmail.com>
72 ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
73 ;;; Copyright © 2020 sirgazil <sirgazil@zoho.com>
74 ;;;
75 ;;; This file is part of GNU Guix.
76 ;;;
77 ;;; GNU Guix is free software; you can redistribute it and/or modify it
78 ;;; under the terms of the GNU General Public License as published by
79 ;;; the Free Software Foundation; either version 3 of the License, or (at
80 ;;; your option) any later version.
81 ;;;
82 ;;; GNU Guix is distributed in the hope that it will be useful, but
83 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
84 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
85 ;;; GNU General Public License for more details.
86 ;;;
87 ;;; You should have received a copy of the GNU General Public License
88 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
89
90 (define-module (gnu packages python-xyz)
91 #:use-module ((guix licenses) #:prefix license:)
92 #:use-module (gnu packages)
93 #:use-module (gnu packages algebra)
94 #:use-module (gnu packages adns)
95 #:use-module (gnu packages attr)
96 #:use-module (gnu packages backup)
97 #:use-module (gnu packages bash)
98 #:use-module (gnu packages check)
99 #:use-module (gnu packages compression)
100 #:use-module (gnu packages crypto)
101 #:use-module (gnu packages databases)
102 #:use-module (gnu packages dbm)
103 #:use-module (gnu packages enchant)
104 #:use-module (gnu packages file)
105 #:use-module (gnu packages fontutils)
106 #:use-module (gnu packages gcc)
107 #:use-module (gnu packages geo)
108 #:use-module (gnu packages ghostscript)
109 #:use-module (gnu packages gl)
110 #:use-module (gnu packages glib)
111 #:use-module (gnu packages gnome)
112 #:use-module (gnu packages graphviz)
113 #:use-module (gnu packages graphics)
114 #:use-module (gnu packages gstreamer)
115 #:use-module (gnu packages gtk)
116 #:use-module (gnu packages icu4c)
117 #:use-module (gnu packages image)
118 #:use-module (gnu packages imagemagick)
119 #:use-module (gnu packages kerberos)
120 #:use-module (gnu packages libevent)
121 #:use-module (gnu packages libffi)
122 #:use-module (gnu packages linux)
123 #:use-module (gnu packages llvm)
124 #:use-module (gnu packages man)
125 #:use-module (gnu packages maths)
126 #:use-module (gnu packages monitoring)
127 #:use-module (gnu packages multiprecision)
128 #:use-module (gnu packages networking)
129 #:use-module (gnu packages ncurses)
130 #:use-module (gnu packages openstack)
131 #:use-module (gnu packages pcre)
132 #:use-module (gnu packages perl)
133 #:use-module (gnu packages pkg-config)
134 #:use-module (gnu packages python)
135 #:use-module (gnu packages python-check)
136 #:use-module (gnu packages python-compression)
137 #:use-module (gnu packages python-crypto)
138 #:use-module (gnu packages python-science)
139 #:use-module (gnu packages python-web)
140 #:use-module (gnu packages qt)
141 #:use-module (gnu packages readline)
142 #:use-module (gnu packages sdl)
143 #:use-module (gnu packages search)
144 #:use-module (gnu packages shells)
145 #:use-module (gnu packages sphinx)
146 #:use-module (gnu packages ssh)
147 #:use-module (gnu packages terminals)
148 #:use-module (gnu packages tex)
149 #:use-module (gnu packages texinfo)
150 #:use-module (gnu packages time)
151 #:use-module (gnu packages tls)
152 #:use-module (gnu packages version-control)
153 #:use-module (gnu packages video)
154 #:use-module (gnu packages web)
155 #:use-module (gnu packages base)
156 #:use-module (gnu packages xml)
157 #:use-module (gnu packages xorg)
158 #:use-module (gnu packages xdisorg)
159 #:use-module (gnu packages tcl)
160 #:use-module (gnu packages bdw-gc)
161 #:use-module (gnu packages serialization)
162 #:use-module (guix packages)
163 #:use-module (guix download)
164 #:use-module (guix git-download)
165 #:use-module (guix hg-download)
166 #:use-module (guix utils)
167 #:use-module (guix build-system gnu)
168 #:use-module (guix build-system cmake)
169 #:use-module (guix build-system python)
170 #:use-module (guix build-system trivial)
171 #:use-module (srfi srfi-1)
172 #:use-module (srfi srfi-26))
173
174 (define-public python-psutil
175 (package
176 (name "python-psutil")
177 (version "5.6.5")
178 (source
179 (origin
180 (method url-fetch)
181 (uri (pypi-uri "psutil" version))
182 (sha256
183 (base32 "0isil5jxwwd8awz54qk28rpgjg43i5l6yl70g40vxwa4r4m56lfh"))))
184 (build-system python-build-system)
185 (arguments
186 ;; FIXME: some tests does not return and times out.
187 '(#:tests? #f))
188 (home-page "https://www.github.com/giampaolo/psutil")
189 (synopsis "Library for retrieving information on running processes")
190 (description
191 "psutil (Python system and process utilities) is a library for retrieving
192 information on running processes and system utilization (CPU, memory, disks,
193 network) in Python. It is useful mainly for system monitoring, profiling and
194 limiting process resources and management of running processes. It implements
195 many functionalities offered by command line tools such as: ps, top, lsof,
196 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
197 pidof, tty, taskset, pmap.")
198 (properties `((python2-variant . ,(delay python2-psutil))))
199 (license license:bsd-3)))
200
201 (define-public python2-psutil
202 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
203 (package
204 (inherit base)
205 (propagated-inputs
206 `(("python2-enum34" ,python2-enum34) ;optional
207 ,@(package-propagated-inputs base))))))
208
209 (define-public python-shapely
210 (package
211 (name "python-shapely")
212 (version "1.6.4.post2")
213 (source
214 (origin
215 (method url-fetch)
216 (uri (pypi-uri "Shapely" version))
217 (sha256
218 (base32
219 "03r42fmd9alp6r3q95ad6rldq2f7n1wimrw53zy5kpn33yv7pf64"))))
220 (build-system python-build-system)
221 (native-inputs
222 `(("python-cython" ,python-cython)
223 ("python-matplotlib" ,python-matplotlib)
224 ("python-pytest" ,python-pytest)
225 ("python-pytest-cov" ,python-pytest-cov)))
226 (inputs
227 `(("geos" ,geos)))
228 (propagated-inputs
229 `(("python-numpy" ,python-numpy)))
230 (arguments
231 `(#:phases
232 (modify-phases %standard-phases
233 (add-after 'unpack 'patch-geos-path
234 (lambda* (#:key inputs #:allow-other-keys)
235 (let ((geos (assoc-ref inputs "geos"))
236 (glibc (assoc-ref inputs ,(if (%current-target-system)
237 "cross-libc" "libc"))))
238 (substitute* "shapely/geos.py"
239 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
240 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
241 geos "/lib/libgeos_c.so'])"))
242 (("free = load_dll\\('c'\\)\\.free")
243 (string-append "free = load_dll('c', fallbacks=['"
244 glibc "/lib/libc.so.6']).free"))))
245 #t)))))
246 (home-page "https://github.com/Toblerity/Shapely")
247 (synopsis "Library for the manipulation and analysis of geometric objects")
248 (description "Shapely is a Python package for manipulation and analysis of
249 planar geometric objects. It is based on the @code{GEOS} library.")
250 (license license:bsd-3)))
251
252 (define-public python-shortuuid
253 (package
254 (name "python-shortuuid")
255 (version "0.5.0")
256 (source
257 (origin
258 (method url-fetch)
259 (uri (pypi-uri "shortuuid" version))
260 (sha256
261 (base32
262 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
263 (build-system python-build-system)
264 (native-inputs
265 `(("python-pep8" ,python-pep8)))
266 (home-page "https://github.com/skorokithakis/shortuuid")
267 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
268 (description
269 "@code{shortuuid} is a Python library for generating concise, unambiguous
270 and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
271 module and then similar looking characters are removed.")
272 (license license:bsd-3)))
273
274 (define-public python-logwrap
275 (package
276 (name "python-logwrap")
277 (version "3.2.1")
278 (source
279 (origin
280 (method url-fetch)
281 (uri (pypi-uri "logwrap" version ".zip"))
282 (sha256
283 (base32
284 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
285 (build-system python-build-system)
286 (propagated-inputs
287 `(("python-six" ,python-six)
288 ("python-typing" ,python-typing)))
289 (native-inputs
290 `(("unzip" ,unzip)
291 ("python-cython" ,python-cython)
292 ("python-pytest" ,python-pytest)
293 ("python-pytest-cov" ,python-pytest-cov)
294 ("python-pytest-runner" ,python-pytest-runner)))
295 (home-page "https://github.com/penguinolog/logwrap")
296 (synopsis "Decorator for logging function arguments")
297 (description "This package provides a decorator to log function arguments
298 and function call return values in a human-readable way.")
299 (license license:asl2.0)))
300
301 (define-public python2-shapely
302 (package-with-python2 python-shapely))
303
304 (define-public python-clyent
305 (package
306 (name "python-clyent")
307 (version "1.2.1")
308 (source
309 (origin
310 (method url-fetch)
311 (uri (pypi-uri "clyent" version))
312 (sha256
313 (base32
314 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
315 (build-system python-build-system)
316 (native-inputs
317 `(("python-mock" ,python-mock)))
318 (home-page "https://github.com/binstar/clyent")
319 (synopsis "Command line client library")
320 (description "Clyent is a Python command line utiliy library. It is used
321 by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
322 (license license:bsd-3)))
323
324 (define-public python2-clyent
325 (package-with-python2 python-clyent))
326
327 (define-public python-babel
328 (package
329 (name "python-babel")
330 (version "2.7.0")
331 (source
332 (origin
333 (method url-fetch)
334 (uri (pypi-uri "Babel" version))
335 (sha256
336 (base32
337 "0a7wawx8vsg7igvz6p3x909fskhg4b2y1910xk4f4c8y22p3aqg8"))))
338 (build-system python-build-system)
339 (native-inputs
340 `(("python-freezegun" ,python-freezegun)
341 ("python-pytest" ,python-pytest)))
342 (propagated-inputs
343 `(("python-pytz" ,python-pytz)))
344 (arguments
345 `(#:phases (modify-phases %standard-phases
346 (replace 'check
347 (lambda _
348 (invoke "pytest" "-vv" "-k"
349 (string-append
350 ;; XXX: These tests fail when using Pytest 4.x and
351 ;; Babel 2.6.0. Try removing this for later versions.
352 "not test_no_inherit_metazone_marker_never_in_output"
353 " and not test_smoke_dates"
354 " and not test_smoke_numbers")))))))
355 (home-page "http://babel.pocoo.org/")
356 (synopsis
357 "Tools for internationalizing Python applications")
358 (description
359 "Babel is composed of two major parts:
360 - tools to build and work with gettext message catalogs
361 - a Python interface to the CLDR (Common Locale Data Repository), providing
362 access to various locale display names, localized number and date formatting,
363 etc. ")
364 (license license:bsd-3)))
365
366 (define-public python2-babel
367 (package-with-python2 python-babel))
368
369 ;; Sphinx < 2.0 requires this version. Remove once no longer needed.
370 (define-public python2-babel-2.6
371 (package
372 (inherit python2-babel)
373 (version "2.6.0")
374 (source (origin
375 (method url-fetch)
376 (uri (pypi-uri "Babel" version))
377 (sha256
378 (base32
379 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))))
380
381 (define-public python2-backport-ssl-match-hostname
382 (package
383 (name "python2-backport-ssl-match-hostname")
384 (version "3.5.0.1")
385 (source
386 (origin
387 (method url-fetch)
388 (uri (pypi-uri "backports.ssl_match_hostname" version))
389 (sha256
390 (base32
391 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
392 (build-system python-build-system)
393 (arguments
394 `(#:python ,python-2
395 #:tests? #f)) ; no test target
396 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
397 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
398 (description
399 "This backport brings the ssl.match_hostname() function to users of
400 earlier versions of Python. The function checks the hostname in the
401 certificate returned by the server to which a connection has been established,
402 and verifies that it matches the intended target hostname.")
403 (license license:psfl)))
404
405 (define-public python-boolean.py
406 (package
407 (name "python-boolean.py")
408 (version "3.6")
409 (source
410 (origin
411 ;; There's no source tarball on PyPI.
412 (method git-fetch)
413 (uri (git-reference
414 (url "https://github.com/bastikr/boolean.py")
415 (commit (string-append "v" version))))
416 (file-name (git-file-name name version))
417 (sha256
418 (base32 "1wc89y73va58cj7dsx6c199zpxsy9q53dsffsdj6zmc90inqz6qs"))))
419 (build-system python-build-system)
420 (home-page "https://github.com/bastikr/boolean.py")
421 (synopsis "Boolean algebra in one Python module")
422 (description
423 "This is a small Python library that implements boolean algebra.
424 It defines two base elements, @code{TRUE} and @code{FALSE}, and a
425 @code{Symbol} class that can take on one of these two values. Calculations
426 are done only in terms of @code{AND}, @code{OR}, and @code{NOT}---other
427 compositions like @code{XOR} and @code{NAND} are emulated on top of them.
428 Expressions are constructed from parsed strings or directly in Python.")
429 (license license:bsd-2)))
430
431 (define-public python-hdf4
432 (package
433 (name "python-hdf4")
434 (version "0.9")
435 (source
436 (origin
437 (method url-fetch)
438 (uri (pypi-uri name version))
439 (sha256
440 (base32
441 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
442 (build-system python-build-system)
443 (native-inputs `(("nose" ,python-nose)))
444 (propagated-inputs `(("numpy" ,python-numpy)))
445 (inputs
446 `(("hdf4" ,hdf4)
447 ("libjpeg" ,libjpeg-turbo)
448 ("zlib" ,zlib)))
449 (arguments
450 `(#:phases
451 (modify-phases %standard-phases
452 (replace 'check
453 (lambda _
454 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
455 ;; on to import numpy. Somehow this works on their CI system.
456 ;; Let's just manage PYTHONPATH here instead.
457 (substitute* "runexamples.sh"
458 (("export PYTHONPATH=.*") ""))
459 (setenv "PYTHONPATH"
460 (string-append (getcwd) ":"
461 (getenv "PYTHONPATH")))
462 (invoke "./runexamples.sh")
463 (invoke "nosetests" "-v"))))))
464 (home-page "https://github.com/fhs/python-hdf4")
465 (synopsis "Python interface to the NCSA HDF4 library")
466 (description
467 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
468 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
469 NetCDF files can also be read and modified. Python-HDF4 is a fork of
470 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
471 (license license:expat)))
472
473 (define-public python2-hdf4
474 (package-with-python2 python-hdf4))
475
476 (define-public python-h5py
477 (package
478 (name "python-h5py")
479 (version "2.10.0")
480 (source
481 (origin
482 (method url-fetch)
483 (uri (pypi-uri "h5py" version))
484 (sha256
485 (base32
486 "0baipzv8n93m0dq0riyi8rfhzrjrfrfh8zqhszzp1j2xjac2fhc4"))))
487 (build-system python-build-system)
488 (arguments
489 `(#:tests? #f ; no test target
490 #:phases
491 (modify-phases %standard-phases
492 (add-after 'unpack 'fix-hdf5-paths
493 (lambda* (#:key inputs #:allow-other-keys)
494 (let ((prefix (assoc-ref inputs "hdf5")))
495 (substitute* "setup_build.py"
496 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
497 (string-append "['" prefix "/lib" "']"))
498 (("'/opt/local/include', '/usr/local/include'")
499 (string-append "'" prefix "/include" "'")))
500 (substitute* "setup_configure.py"
501 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
502 (string-append "['" prefix "/lib" "']")))
503 #t))))))
504 (propagated-inputs
505 `(("python-six" ,python-six)
506 ("python-numpy" ,python-numpy)))
507 (inputs
508 `(("hdf5" ,hdf5-1.10)))
509 (native-inputs
510 `(("python-cython" ,python-cython)
511 ("python-pkgconfig" ,python-pkgconfig)
512 ("pkg-config" ,pkg-config)))
513 (home-page "https://www.h5py.org/")
514 (synopsis "Read and write HDF5 files from Python")
515 (description
516 "The h5py package provides both a high- and low-level interface to the
517 HDF5 library from Python. The low-level interface is intended to be a
518 complete wrapping of the HDF5 API, while the high-level component supports
519 access to HDF5 files, datasets and groups using established Python and NumPy
520 concepts.")
521 (license license:bsd-3)))
522
523 (define-public python2-h5py
524 (package-with-python2 python-h5py))
525
526 (define-public python-sh
527 (package
528 (name "python-sh")
529 (version "1.12.14")
530 (source
531 (origin
532 (method url-fetch)
533 (uri (pypi-uri "sh" version))
534 (sha256
535 (base32
536 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
537 (build-system python-build-system)
538 (arguments
539 '(#:phases
540 (modify-phases %standard-phases
541 (replace 'check
542 (lambda _
543 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
544 (setenv "HOME" "/tmp")
545 (invoke "python" "sh.py" "test"))))))
546 (native-inputs
547 `(("python-coverage" ,python-coverage)))
548 (home-page "https://github.com/amoffat/sh")
549 (synopsis "Python subprocess replacement")
550 (description "This package provides a replacement for Python's
551 @code{subprocess} feature.")
552 (license license:expat)))
553
554 (define-public python2-sh
555 (package-with-python2 python-sh))
556
557 (define-public python-cftime
558 (package
559 (name "python-cftime")
560 (version "1.0.4.2")
561 (source
562 (origin
563 (method url-fetch)
564 (uri (pypi-uri "cftime" version))
565 (sha256
566 (base32 "0w0gi6jnch38hiygl62j4xkcirv4y3dcwrvxl9p7bsk6j27lzihs"))))
567 (build-system python-build-system)
568 (propagated-inputs
569 `(("python-numpy" ,python-numpy)))
570 (native-inputs
571 `(("python-coveralls" ,python-coveralls)
572 ("python-cython" ,python-cython)
573 ("python-pytest-cov" ,python-pytest-cov)))
574 (home-page "https://github.com/Unidata/cftime")
575 (synopsis "Library for time handling")
576 (description
577 "This package provides time-handling functionality that used to be part
578 of the netcdf4 package before.")
579 ;; This package claims to include code under the GPLv3 but is released
580 ;; under ISC.
581 (license (list license:isc license:gpl3+))))
582
583 (define-public python-netcdf4
584 (package
585 (name "python-netcdf4")
586 (version "1.4.2")
587 (source
588 (origin
589 (method url-fetch)
590 (uri (pypi-uri "netCDF4" version))
591 (sha256
592 (base32
593 "0c0sklgrmv15ygliin8qq0hp7vanmbi74m6zpi0r1ksr0hssyd5r"))))
594 (build-system python-build-system)
595 (arguments
596 '(#:phases
597 (modify-phases %standard-phases
598 (add-after 'unpack 'configure-locations
599 (lambda* (#:key inputs #:allow-other-keys)
600 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
601 #t)))))
602 (native-inputs
603 `(("python-cython" ,python-cython)))
604 (propagated-inputs
605 `(("python-numpy" ,python-numpy)
606 ("python-cftime" ,python-cftime)))
607 (inputs
608 `(("netcdf" ,netcdf)
609 ("hdf4" ,hdf4)
610 ("hdf5" ,hdf5)))
611 (home-page "https://github.com/Unidata/netcdf4-python")
612 (synopsis "Python/numpy interface to the netCDF library")
613 (description "Netcdf4-python is a Python interface to the netCDF C
614 library. netCDF version 4 has many features not found in earlier
615 versions of the library and is implemented on top of HDF5. This module
616 can read and write files in both the new netCDF 4 and the old netCDF 3
617 format, and can create files that are readable by HDF5 clients. The
618 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
619 to users of that module.")
620 ;; The software is mainly ISC, but includes some files covered
621 ;; by the Expat license.
622 (license (list license:isc license:expat))))
623
624 (define-public python2-netcdf4
625 (package-with-python2 python-netcdf4))
626
627 (define-public python-license-expression
628 (package
629 (name "python-license-expression")
630 (version "0.999")
631 (source
632 (origin
633 (method url-fetch)
634 (uri (pypi-uri "license-expression" version))
635 (sha256
636 (base32 "08ppb0bxbrsxazy88sgpl9yffvdsabw6dkk1nc332wcz2mphwwyf"))))
637 (build-system python-build-system)
638 (propagated-inputs
639 `(("python-boolean.py" ,python-boolean.py)))
640 (home-page "https://github.com/nexB/license-expression")
641 (synopsis "Apply boolean logic to license expressions")
642 (description
643 "This Python module defines a tiny language to evaluate and compare
644 license expressions using boolean logic. Logical combinations of licenses can
645 be tested for equality, containment, and equivalence. They can be normalised
646 and simplified. It supports SPDX license expressions as well as other naming
647 conventions and aliases in the same expression.")
648 (license license:gpl2+)))
649
650 (define-public python-lockfile
651 (package
652 (name "python-lockfile")
653 (version "0.12.2")
654 (source
655 (origin
656 (method url-fetch)
657 (uri (pypi-uri "lockfile" version))
658 (sha256
659 (base32
660 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
661 (build-system python-build-system)
662 (arguments '(#:test-target "check"))
663 (native-inputs
664 `(("python-pbr" ,python-pbr)))
665 (home-page "https://launchpad.net/pylockfile")
666 (synopsis "Platform-independent file locking module")
667 (description
668 "The lockfile package exports a LockFile class which provides a simple
669 API for locking files.")
670 (license license:expat)))
671
672 (define-public python2-lockfile
673 (package-with-python2 python-lockfile))
674
675 (define-public python-filelock
676 (package
677 (name "python-filelock")
678 (version "3.0.12")
679 (source
680 (origin
681 (method url-fetch)
682 (uri (pypi-uri "filelock" version))
683 (sha256
684 (base32
685 "0ngzlvb5j8gqs2nxlp2b0jhzii792h66wsn694qm8kqixr225n0q"))))
686 (build-system python-build-system)
687 (home-page
688 "https://github.com/benediktschmitt/py-filelock")
689 (synopsis "Platform independent file lock")
690 (description "@code{filelock} contains a single module implementing
691 a platform independent file lock in Python, which provides a simple way of
692 inter-process communication.")
693 (license license:unlicense)))
694
695 (define-public python-semantic-version
696 (package
697 (name "python-semantic-version")
698 (version "2.6.0")
699 (source
700 (origin
701 (method url-fetch)
702 (uri (pypi-uri "semantic_version" version))
703 (sha256
704 (base32
705 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
706 (build-system python-build-system)
707 (arguments
708 `(#:tests? #f)) ; PyPI tarball lacks tests
709 (home-page "https://github.com/rbarrois/python-semanticversion")
710 (synopsis "Semantic versioning module for Python")
711 (description
712 "The @code{semantic_version} class is a small library for handling
713 @uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
714
715 It can compare versions, generate a new version that represents a bump in one of
716 the version levels, and check whether any given string is a proper semantic
717 version identifier.")
718 (license license:bsd-3)))
719
720 (define-public python2-semantic-version
721 (package-with-python2 python-semantic-version))
722
723 (define-public python-serpent
724 (package
725 (name "python-serpent")
726 (version "1.28")
727 (source
728 (origin
729 (method url-fetch)
730 (uri (pypi-uri "serpent" version))
731 (sha256
732 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
733 (build-system python-build-system)
734 (native-inputs
735 `(("python-attrs" ,python-attrs)
736 ("python-pytz" ,python-pytz)))
737 (home-page "https://github.com/irmen/Serpent")
738 (synopsis "Serializer for literal Python expressions")
739 (description
740 "Serpent provides @code{ast.literal_eval()}-compatible object tree
741 serialization. It serializes an object tree into bytes (an utf-8 encoded
742 string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
743 to rebuild the original object tree.
744
745 Because only safe literals are encoded, it is safe to send serpent data to
746 other machines, such as over the network.")
747 (license license:expat)))
748
749 (define-public python-setuptools
750 (package
751 (name "python-setuptools")
752 (version "41.0.1")
753 (source
754 (origin
755 (method url-fetch)
756 (uri (pypi-uri "setuptools" version ".zip"))
757 (sha256
758 (base32
759 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
760 (modules '((guix build utils)))
761 (snippet
762 '(begin
763 ;; Remove included binaries which are used to build self-extracting
764 ;; installers for Windows.
765 ;; TODO: Find some way to build them ourself so we can include them.
766 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
767 #t))))
768 (build-system python-build-system)
769 ;; FIXME: Tests require pytest, which itself relies on setuptools.
770 ;; One could bootstrap with an internal untested setuptools.
771 (arguments
772 `(#:tests? #f))
773 (home-page "https://pypi.org/project/setuptools/")
774 (synopsis
775 "Library designed to facilitate packaging Python projects")
776 (description
777 "Setuptools is a fully-featured, stable library designed to facilitate
778 packaging Python projects, where packaging includes:
779 Python package and module definitions,
780 distribution package metadata,
781 test hooks,
782 project installation,
783 platform-specific details,
784 Python 3 support.")
785 ;; TODO: setuptools now bundles the following libraries:
786 ;; packaging, pyparsing, six and appdirs. How to unbundle?
787 (license (list license:psfl ; setuptools itself
788 license:expat ; six, appdirs, pyparsing
789 license:asl2.0 ; packaging is dual ASL2/BSD-2
790 license:bsd-2))))
791
792 (define-public python2-setuptools
793 (package-with-python2 python-setuptools))
794
795 ;; The setuptools provided by Python 3.7.4 is too new for Tensorflow.
796 (define-public python-setuptools-for-tensorflow
797 (hidden-package
798 (package
799 (inherit python-setuptools)
800 (version "39.1.0")
801 (source (origin
802 (inherit (package-source python-setuptools))
803 (uri (pypi-uri "setuptools" version ".zip"))
804 (sha256
805 (base32
806 "1mzdhvfhnv4lggxa8rjl0dzqxvfx377gg5sqs57v89wrp09lwj65")))))))
807
808 (define-public python-uniseg
809 (package
810 (name "python-uniseg")
811 (version "0.7.1")
812 (source
813 (origin
814 (method url-fetch)
815 (uri (pypi-uri "uniseg" version ".zip"))
816 (sha256
817 (base32
818 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
819 (build-system python-build-system)
820 (arguments
821 '(#:tests? #f)) ; The test suite requires network access.
822 (native-inputs
823 `(("unzip" ,unzip)))
824 (home-page
825 "https://bitbucket.org/emptypage/uniseg-python")
826 (synopsis
827 "Python library to determine Unicode text segmentations")
828 (description
829 "Uniseg is a Python package used to determine Unicode text segmentations.
830 Supported segmentations include:
831 @enumerate
832 @item @dfn{Code point} (any value in the Unicode codespace)
833 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
834 multiple Unicode code points, e.g. \"G\" + acute-accent)
835 @item Word break
836 @item Sentence break
837 @item Line break
838 @end enumerate")
839 (license license:expat)))
840
841 (define-public python2-uniseg
842 (package-with-python2 python-uniseg))
843
844 (define-public python-humanfriendly
845 (package
846 (name "python-humanfriendly")
847 (version "4.4.1")
848 (source
849 (origin
850 (method url-fetch)
851 (uri (pypi-uri "humanfriendly" version))
852 (sha256
853 (base32
854 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
855 (build-system python-build-system)
856 (arguments
857 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
858 #:tests? #f))
859 (propagated-inputs
860 `(("python-monotonic" ,python-monotonic)))
861 (home-page "https://humanfriendly.readthedocs.io")
862 (synopsis "Human-friendly input and output in Python")
863 (description
864 "The functions and classes in @code{humanfriendly} can be used to make
865 text interfaces more user-friendly. It includes tools to parse and format
866 numbers, file sizes, and timespans, timers for long-running operations, menus
867 to allow the user to choose from a list of options, and terminal interaction
868 helpers.")
869 (license license:expat)))
870
871 (define-public python2-humanfriendly
872 (package-with-python2 python-humanfriendly))
873
874 (define-public python-capturer
875 (package
876 (name "python-capturer")
877 (version "2.4")
878 (source
879 (origin
880 (method url-fetch)
881 (uri (pypi-uri "capturer" version))
882 (sha256
883 (base32
884 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
885 (build-system python-build-system)
886 (arguments
887 `(#:tests? #f))
888 (propagated-inputs
889 `(("python-humanfriendly" ,python-humanfriendly)))
890 (home-page "https://capturer.readthedocs.io")
891 (synopsis "Capture stdout and stderr streams of the current process")
892 (description
893 "The capturer package makes it easy to capture the stdout and stderr
894 streams of the current process and subprocesses. Output can be relayed
895 to the terminal in real time but is also available to the Python program
896 for additional processing.")
897 (license license:expat)))
898
899 (define-public python2-capturer
900 (package-with-python2 python-capturer))
901
902 (define-public python-case
903 (package
904 (name "python-case")
905 (version "1.5.3")
906 (source
907 (origin
908 (method url-fetch)
909 (uri (pypi-uri "case" version))
910 (sha256
911 (base32
912 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
913 (build-system python-build-system)
914 (propagated-inputs
915 `(("python-mock" ,python-mock)
916 ("python-nose" ,python-nose)
917 ("python-six" ,python-six)
918 ("python-unittest2" ,python-unittest2)))
919 (native-inputs
920 `(("python-coverage" ,python-coverage)))
921 (home-page "https://github.com/celery/case")
922 (synopsis "Unittest utilities and convenience methods")
923 (description
924 "The @code{case} package provides utilities on top of unittest, including
925 some helpful Python 2 compatibility convenience methods.")
926 (license license:bsd-3)))
927
928 (define-public python-verboselogs
929 (package
930 (name "python-verboselogs")
931 (version "1.7")
932 (source
933 (origin
934 (method url-fetch)
935 (uri (pypi-uri "verboselogs" version))
936 (sha256
937 (base32
938 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
939 (build-system python-build-system)
940 (arguments
941 `(#:phases
942 (modify-phases %standard-phases
943 (replace 'check
944 (lambda _
945 ;; Do not run pylint plugin test, as astroid is an old
946 ;; unsupported version.
947 (invoke "pytest" "-v" "-k" "not test_pylint_plugin"
948 "verboselogs/tests.py"))))))
949 (native-inputs
950 `(("python-mock" ,python-mock)
951 ("python-pytest" ,python-pytest)))
952 (home-page "https://verboselogs.readthedocs.io")
953 (synopsis "Verbose logging level for Python's logging module")
954 (description
955 "The @code{verboselogs} package extends Python's @code{logging} module to
956 add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
957 (license license:expat)))
958
959 (define-public python2-verboselogs
960 (package-with-python2 python-verboselogs))
961
962 (define-public python-coloredlogs
963 (package
964 (name "python-coloredlogs")
965 (version "10.0")
966 (source
967 (origin
968 (method url-fetch)
969 (uri (pypi-uri "coloredlogs" version))
970 (sha256
971 (base32
972 "0dkw6xp0r1dwgz4s2f58npx5nxfq51wf4l6qkm5ib27slgfs4sdq"))))
973 (build-system python-build-system)
974 (arguments
975 `(;Tests require some updated modules
976 #:tests? #f))
977 (propagated-inputs
978 `(("python-capturer" ,python-capturer)))
979 (home-page "https://coloredlogs.readthedocs.io")
980 (synopsis "Colored stream handler for Python's logging module")
981 (description
982 "The @code{coloredlogs} package enables colored terminal output for
983 Python's logging module. The @code{ColoredFormatter} class inherits from
984 @code{logging.Formatter} and uses ANSI escape sequences to render your logging
985 messages in color.")
986 (license license:expat)))
987
988 (define-public python2-coloredlogs
989 (package-with-python2 python-coloredlogs))
990
991 (define-public python-editorconfig
992 (package
993 (name "python-editorconfig")
994 (version "0.12.2")
995 (source
996 (origin
997 (method url-fetch)
998 (uri (pypi-uri "EditorConfig" version))
999 (sha256
1000 (base32
1001 "0v55z351p9qkyp3bbspwywwn28sbcknhirngjbj779n3z52z63hv"))))
1002 (build-system python-build-system)
1003 (home-page "https://editorconfig.org/")
1004 (synopsis "EditorConfig bindings for python")
1005 (description "The EditorConfig project consists of a file format for
1006 defining coding styles and a collection of text editor plugins that enable
1007 editors to read the file format and adhere to defined styles. EditorConfig
1008 files are easily readable and they work nicely with version control systems.")
1009 ;; "fnmatch.py" and "ini.py" are licensed under psfl, the rest is bsd-2.
1010 (license (list license:bsd-2 license:psfl))))
1011
1012 (define-public python-et-xmlfile
1013 (package
1014 (name "python-et-xmlfile")
1015 (version "1.0.1")
1016 (source
1017 (origin
1018 (method url-fetch)
1019 (uri (pypi-uri "et_xmlfile" version))
1020 (sha256
1021 (base32
1022 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
1023 (build-system python-build-system)
1024 (arguments
1025 `(#:phases (modify-phases %standard-phases
1026 (replace 'check
1027 (lambda _
1028 (invoke "pytest"))))))
1029 (native-inputs
1030 `(("python-pytest" ,python-pytest)
1031 ("python-lxml" ,python-lxml))) ;used for the tests
1032 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
1033 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
1034 (description "This Python library is based upon the @code{xmlfile} module
1035 from @code{lxml}. It aims to provide a low memory, compatible implementation
1036 of @code{xmlfile}.")
1037 (license license:expat)))
1038
1039 (define-public python2-et-xmlfile
1040 (package-with-python2 python-et-xmlfile))
1041
1042 (define-public python-openpyxl
1043 (package
1044 (name "python-openpyxl")
1045 (version "2.6.2")
1046 (source
1047 (origin
1048 ;; We use the upstream repository, as the tests are not included in the
1049 ;; PyPI releases.
1050 (method hg-fetch)
1051 (uri (hg-reference
1052 (url "https://bitbucket.org/openpyxl/openpyxl")
1053 (changeset version)))
1054 (file-name (string-append name "-" version "-checkout"))
1055 (sha256
1056 (base32 "1qhij6kcvdxqjy4g6193nsv4q7fy8n4fwyd3c2z047idlm6s3j4w"))))
1057 (build-system python-build-system)
1058 (arguments
1059 `(#:phases (modify-phases %standard-phases
1060 (replace 'check
1061 (lambda _
1062 (invoke "pytest"))))))
1063 (native-inputs
1064 ;; For the test suite.
1065 `(("python-lxml" ,python-lxml)
1066 ("python-pillow" ,python-pillow)
1067 ("python-pytest" ,python-pytest)))
1068 (propagated-inputs
1069 `(("python-et-xmlfile" ,python-et-xmlfile)
1070 ("python-jdcal" ,python-jdcal)))
1071 (home-page "https://openpyxl.readthedocs.io")
1072 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
1073 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
1074 XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
1075 standard.")
1076 (license license:expat)))
1077
1078 (define-public python-eventlet
1079 (package
1080 (name "python-eventlet")
1081 (version "0.25.1")
1082 (source
1083 (origin
1084 (method url-fetch)
1085 (uri (pypi-uri "eventlet" version))
1086 (sha256
1087 (base32
1088 "1hgz8jq19wlz8vwqj900ry8cjv578nz4scc91mlc8944yid6573c"))))
1089 (build-system python-build-system)
1090 (propagated-inputs
1091 `(("python-greenlet" ,python-greenlet)))
1092 (arguments
1093 ;; TODO: Requires unpackaged 'enum-compat'.
1094 '(#:tests? #f))
1095 (home-page "https://eventlet.net")
1096 (synopsis "Concurrent networking library for Python")
1097 (description
1098 "Eventlet is a concurrent networking library for Python that
1099 allows you to change how you run your code, not how you write it.
1100 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1101 Coroutines ensure that the developer uses a blocking style of programming
1102 that is similar to threading, but provide the benefits of non-blocking I/O.
1103 The event dispatch is implicit, which means you can easily use @code{Eventlet}
1104 from the Python interpreter, or as a small part of a larger application.")
1105 (license license:expat)))
1106
1107 (define-public python2-eventlet
1108 (let ((base (package-with-python2
1109 (strip-python2-variant python-eventlet))))
1110 (package (inherit base)
1111 (propagated-inputs
1112 `(("python2-enum34" ,python2-enum34)
1113 ,@(package-propagated-inputs base))))))
1114
1115 (define-public python-six
1116 (package
1117 (name "python-six")
1118 (version "1.14.0")
1119 (source
1120 (origin
1121 (method url-fetch)
1122 (uri (pypi-uri "six" version))
1123 (sha256
1124 (base32
1125 "02lw67hprv57hyg3cfy02y3ixjk3nzwc0dx3c4ynlvkfwkfdnsr3"))))
1126 (build-system python-build-system)
1127 (arguments
1128 `(#:phases
1129 (modify-phases %standard-phases
1130 (replace 'check
1131 (lambda _
1132 (invoke "py.test" "-v"))))))
1133 (native-inputs
1134 `(("python-pytest" ,python-pytest-bootstrap)))
1135 (home-page "https://pypi.org/project/six/")
1136 (synopsis "Python 2 and 3 compatibility utilities")
1137 (description
1138 "Six is a Python 2 and 3 compatibility library. It provides utility
1139 functions for smoothing over the differences between the Python versions with
1140 the goal of writing Python code that is compatible on both Python versions.
1141 Six supports every Python version since 2.5. It is contained in only one
1142 Python file, so it can be easily copied into your project.")
1143 (license license:x11)))
1144
1145 (define-public python2-six
1146 (package-with-python2 python-six))
1147
1148 (define-public python-six-bootstrap
1149 (package
1150 (inherit python-six)
1151 (name "python-six-bootstrap")
1152 (native-inputs `())
1153 (arguments `(#:tests? #f))))
1154
1155 (define-public python2-six-bootstrap
1156 (package-with-python2 python-six-bootstrap))
1157
1158 (define-public python-schedule
1159 (package
1160 (name "python-schedule")
1161 (version "0.4.3")
1162 (source
1163 (origin
1164 (method url-fetch)
1165 (uri (pypi-uri "schedule" version))
1166 (sha256
1167 (base32
1168 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1169 (build-system python-build-system)
1170 (native-inputs
1171 `(("python-pytest" ,python-pytest)
1172 ("python-mock" ,python-mock)))
1173 (home-page "https://github.com/dbader/schedule")
1174 (synopsis "Schedule periodic function calls in Python")
1175 (description
1176 "Schedule is an in-process scheduler for periodic jobs that uses the
1177 builder pattern for configuration. Schedule lets you run Python functions (or
1178 any other callable) periodically at pre-determined intervals using a simple,
1179 human-friendly syntax.")
1180 (license license:expat)))
1181
1182 (define-public python2-schedule
1183 (package-with-python2 python-schedule))
1184
1185 (define-public python2-mechanize
1186 (package
1187 (name "python2-mechanize")
1188 (version "0.2.5")
1189 (source
1190 (origin
1191 (method url-fetch)
1192 (uri (pypi-uri "mechanize" version))
1193 (sha256
1194 (base32
1195 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1196 (build-system python-build-system)
1197 (arguments
1198 `(#:python ,python-2 ; apparently incompatible with Python 3
1199 #:tests? #f))
1200 ;; test fails with message
1201 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1202 ;; (python-3.3.2) or
1203 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1204 ;; (python-2.7.5).
1205 ;; The source code is from March 2011 and probably not up-to-date
1206 ;; with respect to python unit tests.
1207 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1208 (synopsis
1209 "Stateful programmatic web browsing in Python")
1210 (description
1211 "Mechanize implements stateful programmatic web browsing in Python,
1212 after Andy Lester’s Perl module WWW::Mechanize.")
1213 (license (license:non-copyleft
1214 "file://COPYING"
1215 "See COPYING in the distribution."))))
1216
1217
1218 (define-public python-simplejson
1219 (package
1220 (name "python-simplejson")
1221 (version "3.14.0")
1222 (source
1223 (origin
1224 (method url-fetch)
1225 (uri (pypi-uri "simplejson" version))
1226 (sha256
1227 (base32
1228 "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy"))))
1229 (build-system python-build-system)
1230 (home-page "http://simplejson.readthedocs.org/en/latest/")
1231 (synopsis
1232 "Json library for Python")
1233 (description
1234 "JSON (JavaScript Object Notation) is a subset of JavaScript
1235 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1236 format.
1237
1238 Simplejson exposes an API familiar to users of the standard library marshal
1239 and pickle modules. It is the externally maintained version of the json
1240 library contained in Python 2.6, but maintains compatibility with Python 2.5
1241 and (currently) has significant performance advantages, even without using
1242 the optional C extension for speedups. Simplejson is also supported on
1243 Python 3.3+.")
1244 (license license:x11)))
1245
1246 (define-public python2-simplejson
1247 (package-with-python2 python-simplejson))
1248
1249
1250 (define-public python-pyicu
1251 (package
1252 (name "python-pyicu")
1253 (version "2.3.1")
1254 (source
1255 (origin
1256 (method url-fetch)
1257 (uri (pypi-uri "PyICU" version))
1258 (sha256
1259 (base32
1260 "1x4w8m7ifki9z2a187pgjr33z6z0rp2fii9b73djak1vhm9v9cnx"))))
1261 (build-system python-build-system)
1262 (inputs
1263 `(("icu4c" ,icu4c)))
1264 (native-inputs
1265 `(("python-pytest" ,python-pytest)
1266 ("python-six" ,python-six)))
1267 (home-page "https://github.com/ovalhub/pyicu")
1268 (synopsis "Python extension wrapping the ICU C++ API")
1269 (description
1270 "PyICU is a python extension wrapping the ICU C++ API.")
1271 (properties `((python2-variant . ,(delay python2-pyicu))))
1272 (license license:x11)))
1273
1274 (define-public python2-pyicu
1275 (let ((base (package-with-python2
1276 (strip-python2-variant python-pyicu))))
1277 (package
1278 (inherit base)
1279 (arguments
1280 `(,@(package-arguments base)
1281 #:phases
1282 (modify-phases %standard-phases
1283 (add-before 'check 'delete-failing-test
1284 (λ _
1285 ;; XXX: This fails due to Unicode issues unique to Python 2,
1286 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1287 (delete-file "test/test_Script.py")
1288 #t))))))))
1289
1290 (define-public python2-dogtail
1291 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1292 ;; spaces in indentation" with Python 3.
1293 (package
1294 (name "python2-dogtail")
1295 (version "0.9.9")
1296 (source (origin
1297 (method url-fetch)
1298 (uri (pypi-uri "dogtail" version))
1299 (sha256
1300 (base32
1301 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1302 (build-system python-build-system)
1303 (arguments `(#:python ,python-2
1304 #:tests? #f)) ; invalid command "test"
1305 ;; Currently no offical homepage.
1306 (home-page "https://pypi.org/project/dogtail/")
1307 (synopsis "GUI test tool and automation framework written in Python")
1308 (description
1309 "Dogtail is a GUI test tool and automation framework written in Python.
1310 It uses Accessibility (a11y) technologies to communicate with desktop
1311 applications. dogtail scripts are written in Python and executed like any
1312 other Python program.")
1313 (license license:gpl2+)))
1314
1315 (define-public python-empy
1316 (package
1317 (name "python-empy")
1318 (version "3.3.3")
1319 (source (origin
1320 (method url-fetch)
1321 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1322 version ".tar.gz"))
1323 (sha256
1324 (base32
1325 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
1326 (build-system python-build-system)
1327 (arguments
1328 `(#:tests? #f)) ; python2 only
1329 (home-page "http://www.alcyone.com/software/empy/")
1330 (synopsis "Templating system for Python")
1331 (description
1332 "EmPy is a system for embedding Python expressions and statements in
1333 template text; it takes an EmPy source file, processes it, and produces
1334 output. This is accomplished via expansions, which are special signals to the
1335 EmPy system and are set off by a special prefix (by default the at sign, @@).
1336 EmPy can expand arbitrary Python expressions and statements in this way, as
1337 well as a variety of special forms. Textual data not explicitly delimited in
1338 this way is sent unaffected to the output, allowing Python to be used in
1339 effect as a markup language. Also supported are callbacks via hooks,
1340 recording and playback via diversions, and dynamic, chainable filters. The
1341 system is highly configurable via command line options and embedded
1342 commands.")
1343 (license license:lgpl2.1+)))
1344
1345 (define-public python2-empy
1346 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
1347 (package
1348 (inherit base)
1349 (arguments `(,@(package-arguments base)
1350 #:tests? #t)))))
1351
1352 (define-public python2-element-tree
1353 (package
1354 (name "python2-element-tree")
1355 (version "1.2.6")
1356 (source (origin
1357 (method url-fetch)
1358 (uri (string-append
1359 "http://effbot.org/media/downloads/elementtree-"
1360 version "-20050316.tar.gz"))
1361 (sha256
1362 (base32
1363 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1364 (build-system python-build-system)
1365 (arguments
1366 `(#:python ,python-2 ; seems to be part of Python 3
1367 #:tests? #f)) ; no 'test' sub-command
1368 (synopsis "Toolkit for XML processing in Python")
1369 (description
1370 "ElementTree is a Python library supporting lightweight XML processing.")
1371 (home-page "http://effbot.org/zone/element-index.htm")
1372 (license (license:x11-style
1373 "http://docs.python.org/2/license.html"
1374 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1375
1376 (define-public python2-pybugz
1377 (package
1378 (name "python2-pybugz")
1379 (version "0.6.11")
1380 (source (origin
1381 (method url-fetch)
1382 (uri (string-append
1383 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1384 version ".tar.gz"))
1385 (sha256
1386 (base32
1387 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1388 (patches (search-patches "pybugz-stty.patch"
1389 "pybugz-encode-error.patch"))))
1390 (build-system python-build-system)
1391 (arguments
1392 `(#:python ,python-2 ; SyntaxError with Python 3
1393 #:tests? #f)) ; no 'test' sub-command
1394 (propagated-inputs
1395 `(("element-tree" ,python2-element-tree)))
1396 (synopsis "Python and command-line interface to Bugzilla")
1397 (description
1398 "PyBugz is a Python library and command-line tool to query the Bugzilla
1399 bug tracking system. It is meant as an aid to speed up interaction with the
1400 bug tracker.")
1401 (home-page "http://www.liquidx.net/pybugz/")
1402 (license license:gpl2)))
1403
1404 (define-public python2-enum
1405 (package
1406 (name "python2-enum")
1407 (version "0.4.6")
1408 (source (origin
1409 (method url-fetch)
1410 (uri (pypi-uri "enum" version))
1411 (sha256
1412 (base32
1413 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1414 (build-system python-build-system)
1415 (arguments
1416 `(#:python ,python-2))
1417 (home-page "https://pypi.org/project/enum/")
1418 (synopsis "Robust enumerated type support in Python")
1419 (description
1420 "This provides a module for robust enumerations in Python. It has
1421 been superseded by the Python standard library and is provided only for
1422 compatibility.")
1423 ;; Choice of either license.
1424 (license (list license:gpl3+ license:psfl))))
1425
1426 (define-public python-enum34
1427 (package
1428 (name "python-enum34")
1429 (version "1.1.6")
1430 (source
1431 (origin
1432 (method url-fetch)
1433 (uri (pypi-uri "enum34" version))
1434 (sha256
1435 (base32
1436 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1437 (build-system python-build-system)
1438 (home-page "https://pypi.org/project/enum34/")
1439 (synopsis "Backported Python 3.4 Enum")
1440 (description
1441 "Enum34 is the new Python stdlib enum module available in Python 3.4
1442 backported for previous versions of Python from 2.4 to 3.3.")
1443 (license license:bsd-3)))
1444
1445 (define-public python2-enum34
1446 (package-with-python2 python-enum34))
1447
1448 (define-public python-parse-type
1449 (package
1450 (name "python-parse-type")
1451 (version "0.4.2")
1452 (source
1453 (origin
1454 (method url-fetch)
1455 (uri (pypi-uri "parse_type" version))
1456 (sha256
1457 (base32
1458 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1459 (build-system python-build-system)
1460 (propagated-inputs
1461 `(("python-six" ,python-six)
1462 ("python-parse" ,python-parse)))
1463 (native-inputs
1464 `(("python-pytest" ,python-pytest)
1465 ("python-pytest-runner" ,python-pytest-runner)))
1466 (home-page "https://github.com/jenisys/parse_type")
1467 (synopsis "Extended parse module")
1468 (description
1469 "Parse_type extends the python parse module.")
1470 (properties
1471 `((python2-variant . ,(delay python2-parse-type))))
1472 (license license:bsd-3)))
1473
1474 (define-public python2-parse-type
1475 (let ((base (package-with-python2
1476 (strip-python2-variant python-parse-type))))
1477 (package (inherit base)
1478 (propagated-inputs
1479 `(("python2-enum34" ,python2-enum34)
1480 ,@(package-propagated-inputs base))))))
1481
1482 (define-public python-parse
1483 (package
1484 (name "python-parse")
1485 (version "1.8.4")
1486 (source
1487 (origin
1488 (method url-fetch)
1489 (uri (pypi-uri "parse" version))
1490 (sha256
1491 (base32
1492 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
1493 (build-system python-build-system)
1494 (arguments
1495 `(#:phases
1496 (modify-phases %standard-phases
1497 (replace 'check
1498 (lambda _ (invoke "python" "test_parse.py"))))))
1499 (home-page "https://github.com/r1chardj0n3s/parse")
1500 (synopsis "Parse strings")
1501 (description
1502 "Parse strings using a specification based on the Python @code{format()}
1503 syntax.")
1504 (license license:x11)))
1505
1506 (define-public python-polib
1507 (package
1508 (name "python-polib")
1509 (version "1.0.8")
1510 (source (origin
1511 (method url-fetch)
1512 (uri (pypi-uri "polib" version))
1513 (sha256
1514 (base32
1515 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1516 (build-system python-build-system)
1517 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1518 (synopsis "Manipulate, create and modify gettext files")
1519 (description "Polib can manipulate any gettext format (po, pot and mo)
1520 files. It can be used to create po files from scratch or to modify
1521 existing ones.")
1522 (license license:expat)))
1523
1524 (define-public python2-polib
1525 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1526 (package
1527 (inherit base)
1528 (arguments `(,@(package-arguments base)
1529 ;; Tests don't work with python2.
1530 #:tests? #f)))))
1531
1532 (define-public python-poyo
1533 (package
1534 (name "python-poyo")
1535 (version "0.5.0")
1536 (source
1537 (origin
1538 (method url-fetch)
1539 (uri (pypi-uri "poyo" version))
1540 (sha256
1541 (base32
1542 "1pflivs6j22frz0v3dqxnvc8yb8fb52g11lqr88z0i8cg2m5csg2"))))
1543 (build-system python-build-system)
1544 (home-page "https://github.com/hackebrot/poyo")
1545 (synopsis "Lightweight YAML Parser for Python")
1546 (description
1547 "This package provides a lightweight YAML Parser for Python. It supports
1548 only a chosen subset of the YAML format that is required to parse cookiecutter
1549 user configuration files. It does not have support for serializing into YAML
1550 and is not compatible with JSON.")
1551 (license license:expat)))
1552
1553 (define-public scons
1554 (package
1555 (name "scons")
1556 (version "3.0.4")
1557 (source (origin
1558 (method git-fetch)
1559 (uri (git-reference
1560 (url "https://github.com/SCons/scons.git")
1561 (commit version)))
1562 (file-name (git-file-name name version))
1563 (sha256
1564 (base32
1565 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
1566 (build-system python-build-system)
1567 (arguments
1568 `(#:use-setuptools? #f ; still relies on distutils
1569 #:tests? #f ; no 'python setup.py test' command
1570 #:phases
1571 (modify-phases %standard-phases
1572 (add-before 'build 'bootstrap
1573 (lambda _
1574 (substitute* "src/engine/SCons/compat/__init__.py"
1575 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
1576 "sys.modules[new] = __import__(old)"))
1577 (substitute* "src/engine/SCons/Platform/__init__.py"
1578 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
1579 "mod = __import__(full_name)"))
1580 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
1581 (chdir "build/scons")
1582 #t)))))
1583 (home-page "https://scons.org/")
1584 (synopsis "Software construction tool written in Python")
1585 (description
1586 "SCons is a software construction tool. Think of SCons as an improved,
1587 cross-platform substitute for the classic Make utility with integrated
1588 functionality similar to autoconf/automake and compiler caches such as ccache.
1589 In short, SCons is an easier, more reliable and faster way to build
1590 software.")
1591 (license license:x11)))
1592
1593 (define-public scons-python2
1594 (package
1595 (inherit (package-with-python2 scons))
1596 (name "scons-python2")))
1597
1598 (define-public python-extras
1599 (package
1600 (name "python-extras")
1601 (version "1.0.0")
1602 (source
1603 (origin
1604 (method url-fetch)
1605 (uri (pypi-uri "extras" version))
1606 (sha256
1607 (base32
1608 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1609 (build-system python-build-system)
1610 (arguments
1611 ;; FIXME: Circular dependency on testtools.
1612 '(#:tests? #f))
1613 (home-page "https://github.com/testing-cabal/extras")
1614 (synopsis "Useful extensions to the Python standard library")
1615 (description
1616 "Extras is a set of extensions to the Python standard library.")
1617 (license license:expat)))
1618
1619 (define-public python2-extras
1620 (package-with-python2 python-extras))
1621
1622 (define-public python-mimeparse
1623 (package
1624 (name "python-mimeparse")
1625 (version "1.6.0")
1626 (source
1627 (origin
1628 (method url-fetch)
1629 (uri (pypi-uri "python-mimeparse" version))
1630 (sha256
1631 (base32
1632 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
1633 (build-system python-build-system)
1634 (arguments
1635 '(#:phases
1636 (modify-phases %standard-phases
1637 (replace 'check
1638 (lambda _
1639 (invoke "./mimeparse_test.py"))))))
1640 (home-page
1641 "https://github.com/dbtsai/python-mimeparse")
1642 (synopsis "Python library for parsing MIME types")
1643 (description
1644 "Mimeparse provides basic functions for parsing MIME type names and
1645 matching them against a list of media-ranges.")
1646 (license license:expat)))
1647
1648 (define-public python2-mimeparse
1649 (package-with-python2 python-mimeparse))
1650
1651 (define-public python-miniboa
1652 (package
1653 (name "python-miniboa")
1654 (version "1.0.7")
1655 (source
1656 (origin
1657 (method url-fetch)
1658 (uri (pypi-uri "miniboa" version))
1659 (sha256
1660 (base32
1661 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
1662 (build-system python-build-system)
1663 (home-page "https://github.com/shmup/miniboa")
1664 (synopsis "Simple, single-threaded Telnet server")
1665 (description
1666 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
1667 server.")
1668 (license license:asl2.0)))
1669
1670 (define-public python2-miniboa
1671 (package-with-python2 python-miniboa))
1672
1673 (define-public python-pafy
1674 (package
1675 (name "python-pafy")
1676 (version "0.5.3.1")
1677 (source
1678 (origin
1679 (method url-fetch)
1680 (uri (pypi-uri "pafy" version))
1681 (sha256
1682 (base32
1683 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1684 (build-system python-build-system)
1685 (arguments
1686 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1687 (propagated-inputs
1688 ;; Youtube-dl is a python package which is imported in the file
1689 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1690 `(("youtube-dl" ,youtube-dl)))
1691 (home-page "https://np1.github.io/pafy/")
1692 (synopsis "Retrieve YouTube content and metadata")
1693 (description
1694 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1695 (license license:lgpl3+)))
1696
1697 (define-public python2-funcsigs
1698 (package
1699 (name "python2-funcsigs")
1700 (version "1.0.2")
1701 (source (origin
1702 (method url-fetch)
1703 (uri (pypi-uri "funcsigs" version))
1704 (sha256
1705 (base32
1706 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1707 (build-system python-build-system)
1708 (arguments
1709 `(#:python ,python-2))
1710 (native-inputs
1711 `(("python2-unittest2" ,python2-unittest2)))
1712 (home-page "http://funcsigs.readthedocs.org")
1713 (synopsis "Python function signatures from PEP362")
1714 (description
1715 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1716 (license license:asl2.0)))
1717
1718 (define-public python2-funcsigs-bootstrap
1719 (package
1720 (inherit python2-funcsigs)
1721 (name "python2-funcsigs-bootstrap")
1722 (native-inputs `())
1723 (arguments
1724 `(#:tests? #f
1725 ,@(package-arguments python2-funcsigs)))))
1726
1727 (define-public python-py
1728 (package
1729 (name "python-py")
1730 (version "1.8.1")
1731 (source
1732 (origin
1733 (method url-fetch)
1734 (uri (pypi-uri "py" version))
1735 (sha256
1736 (base32
1737 "1ajjazg3913n0sp3vjyva9c2qh5anx8ziryng935f89604a0h9sy"))))
1738 (build-system python-build-system)
1739 (arguments
1740 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1741 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1742 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1743 ;; Is this module globally installed?"
1744 '(#:tests? #f))
1745 (native-inputs
1746 `(("python-setuptools-scm" ,python-setuptools-scm)))
1747 (home-page "https://github.com/pytest-dev/py")
1748 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1749 (description
1750 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1751 code introspection, and logging.")
1752 (license license:expat)))
1753
1754 (define-public python2-py
1755 (package-with-python2 python-py))
1756
1757 ;; Recent versions of python-fixtures and python-testrepository need
1758 ;; python-pbr for packaging, which itself needs these two packages for
1759 ;; testing.
1760 ;; To fix this circular dependency, we use a build of python-pbr, based on the
1761 ;; same source, just without any test dependencies and with tests disabled.
1762 ;; python-pbr-minmal is then used to package python-fixtures and
1763 ;; python-testrepository.
1764 ;; Strictly speaking we currently could remove the test-requirements from the
1765 ;; normal python-pbr package (and save this package) since test are disabled
1766 ;; there anyway. But this may change in future.
1767 (define-public python-pbr-minimal
1768 (package
1769 (name "python-pbr-minimal")
1770 (version "3.0.1")
1771 (source
1772 (origin
1773 (method url-fetch)
1774 (uri (pypi-uri "pbr" version))
1775 (sha256
1776 (base32
1777 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
1778 (build-system python-build-system)
1779 (arguments
1780 `(#:tests? #f))
1781 (home-page "https://docs.openstack.org/pbr/latest/")
1782 (synopsis "Minimal build of python-pbr used for bootstrapping")
1783 (description
1784 "Used only for bootstrapping python2-pbr, you should not need this.")
1785 (license license:asl2.0)))
1786
1787 (define-public python2-pbr-minimal
1788 (package-with-python2 python-pbr-minimal))
1789
1790 (define-public python-pbr
1791 (package
1792 (inherit python-pbr-minimal)
1793 (name "python-pbr")
1794 (arguments
1795 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1796 (propagated-inputs
1797 `(("git" ,git))) ;; pbr actually uses the "git" binary.
1798 (native-inputs
1799 `(("python-fixtures" ,python-fixtures-bootstrap)
1800 ;; discover, coverage, hacking, subunit
1801 ("python-mock" ,python-mock)
1802 ("python-six" ,python-six)
1803 ("python-sphinx" ,python-sphinx)
1804 ("python-testrepository" ,python-testrepository-bootstrap)
1805 ("python-testresources" ,python-testresources-bootstrap)
1806 ("python-testscenarios" ,python-testscenarios-bootstrap)
1807 ("python-testtools" ,python-testtools-bootstrap)
1808 ("python-virtualenv" ,python-virtualenv)))
1809 (synopsis "Enhance the default behavior of Python’s setuptools")
1810 (description
1811 "Python Build Reasonableness (PBR) is a library that injects some useful
1812 and sensible default behaviors into your setuptools run. It will set
1813 versions, process requirements files and generate AUTHORS and ChangeLog file
1814 from git information.
1815 ")))
1816
1817 (define-public python2-pbr
1818 (package-with-python2 python-pbr))
1819
1820 (define-public python-pyrsistent
1821 (package
1822 (name "python-pyrsistent")
1823 (version "0.14.11")
1824 (home-page "https://github.com/tobgu/pyrsistent")
1825 (source (origin
1826 (method url-fetch)
1827 (uri (pypi-uri "pyrsistent" version))
1828 (sha256
1829 (base32
1830 "1qkh74bm296mp5g3r11lgsksr6bh4w1bf8pji4nmxdlfj542ga1w"))))
1831 (build-system python-build-system)
1832 (native-inputs
1833 `(("python-hypothesis" ,python-hypothesis)
1834 ("python-pytest" ,python-pytest)
1835 ("python-pytest-runner" ,python-pytest-runner)))
1836 (propagated-inputs
1837 `(("python-six" ,python-six)))
1838 (synopsis "Persistent data structures for Python")
1839 (description
1840 "Pyrsistent is a number of persistent collections (by some referred to as
1841 functional data structures). Persistent in the sense that they are immutable.
1842
1843 All methods on a data structure that would normally mutate it instead return a
1844 new copy of the structure containing the requested updates. The original
1845 structure is left untouched.")
1846 (license license:expat)))
1847
1848 (define-public python2-pyrsistent
1849 (package-with-python2 python-pyrsistent))
1850
1851 (define-public python-exif-read
1852 (package
1853 (name "python-exif-read")
1854 (version "2.1.2")
1855 (source (origin
1856 (method url-fetch)
1857 (uri (pypi-uri "ExifRead" version))
1858 (sha256
1859 (base32
1860 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
1861 (build-system python-build-system)
1862 (arguments `(#:tests? #f)) ; no tests
1863 (home-page "https://github.com/ianare/exif-py")
1864 (synopsis "Python library to extract EXIF data from image files")
1865 (description
1866 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1867 files.")
1868 (license license:bsd-3)))
1869
1870 (define-public python2-exif-read
1871 (package-with-python2 python-exif-read))
1872
1873 (define-public python-pyld
1874 (package
1875 (name "python-pyld")
1876 (version "1.0.5")
1877 (source (origin
1878 (method url-fetch)
1879 (uri (pypi-uri "PyLD" version))
1880 (sha256
1881 (base32
1882 "1ywbdbsrkg533qh8xn9ifjh2mvam6v5msrjyqq73jfpvcp89qvff"))))
1883 (build-system python-build-system)
1884 (home-page "https://github.com/digitalbazaar/pyld")
1885 (synopsis "Python implementation of the JSON-LD specification")
1886 (description
1887 "PyLD is an implementation of the JSON-LD specification.")
1888 (license license:bsd-3)))
1889
1890 (define-public python2-pyld
1891 (package-with-python2 python-pyld))
1892
1893 (define-public python-click
1894 (package
1895 (name "python-click")
1896 (version "7.0")
1897 (source
1898 (origin
1899 (method url-fetch)
1900 (uri (pypi-uri "click" version))
1901 (sha256
1902 (base32
1903 "1mzjixd4vjbjvzb6vylki9w1556a9qmdh35kzmq6cign46av952v"))))
1904 (build-system python-build-system)
1905 (arguments
1906 `(#:phases
1907 (modify-phases %standard-phases
1908 (add-after 'unpack 'fix-paths
1909 (lambda* (#:key inputs #:allow-other-keys)
1910 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
1911 "cross-libc" "libc"))))
1912 (substitute* "click/_unicodefun.py"
1913 (("'locale'")
1914 (string-append "'" glibc "/bin/locale'"))))
1915 #t))
1916 (replace 'check
1917 (lambda _
1918 (invoke "python" "-m" "pytest"))))))
1919 (native-inputs
1920 `(("python-pytest" ,python-pytest)))
1921 (home-page "https://palletsprojects.com/p/click/")
1922 (synopsis "Command line library for Python")
1923 (description
1924 "Click is a Python package for creating command line interfaces in a
1925 composable way with as little code as necessary. Its name stands for
1926 \"Command Line Interface Creation Kit\". It's highly configurable but comes
1927 with sensible defaults out of the box.")
1928 (license license:bsd-3)))
1929
1930 (define-public python2-click
1931 (package-with-python2 python-click))
1932
1933 (define-public python-wheel
1934 (package
1935 (name "python-wheel")
1936 (version "0.33.6")
1937 (source
1938 (origin
1939 (method url-fetch)
1940 (uri (pypi-uri "wheel" version))
1941 (sha256
1942 (base32
1943 "0ii6f34rvpjg3nmw4bc2h7fhdsy38y1h93hghncfs5akfrldmj8h"))))
1944 (build-system python-build-system)
1945 (arguments
1946 ;; FIXME: The test suite runs "python setup.py bdist_wheel", which in turn
1947 ;; fails to find the newly-built bdist_wheel library, even though it is
1948 ;; available on PYTHONPATH. What search path is consulted by setup.py?
1949 '(#:tests? #f))
1950 (home-page "https://bitbucket.org/pypa/wheel/")
1951 (synopsis "Format for built Python packages")
1952 (description
1953 "A wheel is a ZIP-format archive with a specially formatted filename and
1954 the @code{.whl} extension. It is designed to contain all the files for a PEP
1955 376 compatible install in a way that is very close to the on-disk format. Many
1956 packages will be properly installed with only the @code{Unpack} step and the
1957 unpacked archive preserves enough information to @code{Spread} (copy data and
1958 scripts to their final locations) at any later time. Wheel files can be
1959 installed with a newer @code{pip} or with wheel's own command line utility.")
1960 (license license:expat)))
1961
1962 (define-public python2-wheel
1963 (package-with-python2 python-wheel))
1964
1965 (define-public python-vcversioner
1966 (package
1967 (name "python-vcversioner")
1968 (version "2.16.0.0")
1969 (source
1970 (origin
1971 (method url-fetch)
1972 (uri (pypi-uri "vcversioner" version))
1973 (sha256
1974 (base32
1975 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
1976 (build-system python-build-system)
1977 (synopsis "Python library for version number discovery")
1978 (description "Vcversioner is a Python library that inspects tagging
1979 information in a variety of version control systems in order to discover
1980 version numbers.")
1981 (home-page "https://github.com/habnabit/vcversioner")
1982 (license license:isc)))
1983
1984 (define-public python2-vcversioner
1985 (package-with-python2 python-vcversioner))
1986
1987 (define-public python-jdcal
1988 (package
1989 (name "python-jdcal")
1990 (version "1.4")
1991 (source
1992 (origin
1993 (method url-fetch)
1994 (uri (pypi-uri "jdcal" version))
1995 (sha256
1996 (base32
1997 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
1998 (build-system python-build-system)
1999 (arguments
2000 `(#:phases (modify-phases %standard-phases
2001 (replace 'check
2002 (lambda _
2003 (invoke "pytest"))))))
2004 (native-inputs
2005 `(("python-pytest" ,python-pytest)))
2006 (home-page "https://github.com/phn/jdcal")
2007 (synopsis "Functions to convert between Julian dates Gregorian dates")
2008 (description "This Python library provides functions for converting
2009 between Julian dates and Gregorian dates.")
2010 (license license:bsd-2)))
2011
2012 (define-public python2-jdcal
2013 (package-with-python2 python-jdcal))
2014
2015 (define-public python-jsondiff
2016 (package
2017 (name "python-jsondiff")
2018 (version "1.2.0")
2019 (source
2020 (origin
2021 (method url-fetch)
2022 (uri (pypi-uri "jsondiff" version))
2023 (sha256
2024 (base32
2025 "00v3689175aqzdscrxpffm712ylp8jvcpqdg51ca22ni6721p51l"))))
2026 (build-system python-build-system)
2027 (native-inputs
2028 `(("python-nose" ,python-nose)
2029 ("python-nose-random" ,python-nose-random)))
2030 (home-page
2031 "https://github.com/fzumstein/jsondiff")
2032 (synopsis "Compare JSON and JSON-like structures in Python")
2033 (description "@code{jsondiff} is a Python library which lets you
2034 compare, diff, and patch JSON and JSON-like structures in Python.")
2035 (license license:expat)))
2036
2037 (define-public python-jsonschema
2038 (package
2039 (name "python-jsonschema")
2040 (version "3.0.1")
2041 (source (origin
2042 (method url-fetch)
2043 (uri (pypi-uri "jsonschema" version))
2044 (sha256
2045 (base32
2046 "03g20i1xfg4qdlk4475pl4pp7y0h37g1fbgs5qhy678q9xb822hc"))))
2047 (build-system python-build-system)
2048 (arguments
2049 '(#:phases
2050 (modify-phases %standard-phases
2051 (replace 'check
2052 (lambda _
2053 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
2054 (invoke "trial" "jsonschema"))))))
2055 (native-inputs
2056 `(("python-setuptools_scm" ,python-setuptools-scm)
2057 ("python-twisted" ,python-twisted)))
2058 (propagated-inputs
2059 `(("python-attrs" ,python-attrs)
2060 ("python-pyrsistent" ,python-pyrsistent)
2061 ("python-six" ,python-six)))
2062 (home-page "https://github.com/Julian/jsonschema")
2063 (synopsis "Implementation of JSON Schema for Python")
2064 (description
2065 "Jsonschema is an implementation of JSON Schema for Python.")
2066 (license license:expat)
2067 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2068
2069 (define-public python2-jsonschema
2070 (let ((jsonschema (package-with-python2
2071 (strip-python2-variant python-jsonschema))))
2072 (package (inherit jsonschema)
2073 (propagated-inputs
2074 `(("python2-functools32" ,python2-functools32)
2075 ,@(package-propagated-inputs jsonschema))))))
2076
2077 ;; This old version is still required by docker-compose as of 1.24.0.
2078 (define-public python-jsonschema-2.6
2079 (package
2080 (name "python-jsonschema")
2081 (version "2.6.0")
2082 (source (origin
2083 (method url-fetch)
2084 (uri (pypi-uri "jsonschema" version))
2085 (sha256
2086 (base32
2087 "00kf3zmpp9ya4sydffpifn0j0mzm342a2vzh82p6r0vh10cg7xbg"))))
2088 (build-system python-build-system)
2089 (arguments
2090 '(#:phases
2091 (modify-phases %standard-phases
2092 (replace 'check (lambda _ (invoke "nosetests"))))))
2093 (native-inputs
2094 `(("python-nose" ,python-nose)
2095 ("python-vcversioner" ,python-vcversioner)))
2096 (home-page "https://github.com/Julian/jsonschema")
2097 (synopsis "Implementation of JSON Schema for Python")
2098 (description
2099 "Jsonschema is an implementation of JSON Schema for Python.")
2100 (license license:expat)
2101 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2102
2103 (define-public python-schema
2104 (package
2105 (name "python-schema")
2106 (version "0.6.6")
2107 (source
2108 (origin
2109 (method url-fetch)
2110 (uri (pypi-uri "schema" version))
2111 (sha256
2112 (base32
2113 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2114 (build-system python-build-system)
2115 (native-inputs
2116 `(("python-pytest" ,python-pytest)))
2117 (home-page "https://github.com/keleshev/schema")
2118 (synopsis "Simple data validation library")
2119 (description
2120 "@code{python-schema} is a library for validating Python data
2121 structures, such as those obtained from config-files, forms, external
2122 services or command-line parsing, converted from JSON/YAML (or
2123 something else) to Python data-types.")
2124 (license license:psfl)))
2125
2126 (define-public python2-schema
2127 (package-with-python2 python-schema))
2128
2129 (define-public python-schema-0.5
2130 (package (inherit python-schema)
2131 (version "0.5.0")
2132 (source
2133 (origin
2134 (method url-fetch)
2135 (uri (pypi-uri "schema" version))
2136 (sha256
2137 (base32
2138 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2139
2140 (define-public python2-schema-0.5
2141 (package-with-python2 python-schema-0.5))
2142
2143 (define-public python-kitchen
2144 (package
2145 (name "python-kitchen")
2146 (version "1.2.5")
2147 (source
2148 (origin
2149 (method url-fetch)
2150 (uri (pypi-uri "kitchen" version))
2151 (sha256
2152 (base32
2153 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2154 (build-system python-build-system)
2155 (propagated-inputs
2156 `(("python-chardet" ,python-chardet)))
2157 (home-page "https://github.com/fedora-infra/kitchen")
2158 (synopsis "Python API for snippets")
2159 (description "@code{kitchen} module provides a python API for all sorts of
2160 little useful snippets of code that everybody ends up writing for their projects
2161 but never seem big enough to build an independent release. Use kitchen and stop
2162 cutting and pasting that code over and over.")
2163 (license (list license:lgpl2.1+
2164 ;; subprocess.py, test_subprocess.py,
2165 ;; kitchen/pycompat25/defaultdict.py:
2166 license:psfl))))
2167
2168 (define-public python2-kitchen
2169 (package-with-python2 python-kitchen))
2170
2171 (define-public python-unidecode
2172 (package
2173 (name "python-unidecode")
2174 (version "1.1.1")
2175 (source (origin
2176 (method url-fetch)
2177 (uri (pypi-uri "Unidecode" version))
2178 (sha256
2179 (base32
2180 "1s6cp2lv4m0f00hjckjz8p6m7d3n3v16jvg353llf5ia1iqsnsib"))))
2181 (build-system python-build-system)
2182 (home-page "https://pypi.org/project/Unidecode/")
2183 (synopsis "ASCII transliterations of Unicode text")
2184 (description
2185 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2186 useful when integrating with legacy code that doesn't support Unicode, or for
2187 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2188 machine identifiers from human-readable Unicode strings that should still be
2189 somewhat intelligible.")
2190 (license license:gpl2+)))
2191
2192 (define-public python2-unidecode
2193 (package-with-python2 python-unidecode))
2194
2195 (define-public python-pyjwt
2196 (package
2197 (name "python-pyjwt")
2198 (version "1.7.1")
2199 (source
2200 (origin
2201 (method url-fetch)
2202 (uri (pypi-uri "PyJWT" version))
2203 (sha256
2204 (base32
2205 "15hflax5qkw1v6nssk1r0wkj83jgghskcmn875m3wgvpzdvajncd"))
2206 (modules '((guix build utils)))
2207 (snippet
2208 '(begin
2209 (for-each delete-file-recursively
2210 (find-files "." "\\.pyc$"))
2211 #t))))
2212 (build-system python-build-system)
2213 (native-inputs
2214 `(("python-pytest" ,python-pytest)
2215 ("python-pytest-cov" ,python-pytest-cov)
2216 ("python-pytest-runner" ,python-pytest-runner)))
2217 (home-page "https://github.com/progrium/pyjwt")
2218 (synopsis "JSON Web Token implementation in Python")
2219 (description
2220 "PyJWT is a JSON Web Token implementation written in Python.")
2221 (license license:expat)))
2222
2223 (define-public python2-pyjwt
2224 (package-with-python2 python-pyjwt))
2225
2226 (define-public python-pykka
2227 (package
2228 (name "python-pykka")
2229 (version "1.2.1")
2230 (source
2231 (origin
2232 (method url-fetch)
2233 (uri (pypi-uri "Pykka" version))
2234 (sha256
2235 (base32
2236 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2237 (build-system python-build-system)
2238 (native-inputs
2239 `(("python-mock" ,python-mock)
2240 ("python-nose" ,python-nose)
2241 ("python-gevent" ,python-gevent)
2242 ("python-eventlet" ,python-eventlet)))
2243 (home-page "https://www.pykka.org/")
2244 (synopsis "Pykka is a Python implementation of the actor model")
2245 (description
2246 "Pykka is a Python implementation of the actor model.
2247 The actor model introduces some simple rules to control the sharing
2248 of state and cooperation between execution units, which makes it
2249 easier to build concurrent applications.")
2250 (license license:asl2.0)))
2251
2252 (define-public python2-pykka
2253 (package-with-python2 python-pykka))
2254
2255 (define-public python-pymsgbox
2256 (package
2257 (name "python-pymsgbox")
2258 (version "1.0.6")
2259 (source
2260 (origin
2261 (method git-fetch)
2262 (uri (git-reference
2263 ;; LICENSE.txt is not present on pypi
2264 (url "https://github.com/asweigart/PyMsgBox")
2265 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
2266 (file-name (git-file-name name version))
2267 (sha256
2268 (base32
2269 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
2270 (arguments
2271 ;; Circular dependency to run tests:
2272 ;; Tests need pyautogui, which depends on pymsgbox.
2273 '(#:tests? #f))
2274 (build-system python-build-system)
2275 (home-page "https://github.com/asweigart/PyMsgBox")
2276 (synopsis "Python module for JavaScript-like message boxes")
2277 (description
2278 "PyMsgBox is a simple, cross-platform, pure Python module for
2279 JavaScript-like message boxes. Types of dialog boxes include:
2280 @enumerate
2281 @item alert
2282 @item confirm
2283 @item prompt
2284 @item password
2285 @end enumerate
2286 ")
2287 (license license:bsd-3)))
2288
2289 (define-public python-pympler
2290 (package
2291 (name "python-pympler")
2292 (home-page "https://pythonhosted.org/Pympler/")
2293 (version "0.8")
2294 (source (origin
2295 (method url-fetch)
2296 (uri (pypi-uri "Pympler" version))
2297 (sha256
2298 (base32
2299 "08mrpnb6cv2nvfncvr8a9a8bpwhnasa924anapnjvnaw5jcd4k7p"))))
2300 (build-system python-build-system)
2301 (arguments
2302 `(#:phases (modify-phases %standard-phases
2303 (delete 'check)
2304 (add-after 'install 'check
2305 (lambda* (#:key inputs outputs #:allow-other-keys)
2306 (add-installed-pythonpath inputs outputs)
2307 (invoke "python" "setup.py" "test"))))))
2308 (synopsis "Measure, monitor and analyze memory behavior")
2309 (description
2310 "Pympler is a development tool to measure, monitor and analyze
2311 the memory behavior of Python objects in a running Python application.
2312
2313 By pympling a Python application, detailed insight in the size and the
2314 lifetime of Python objects can be obtained. Undesirable or unexpected
2315 runtime behavior like memory bloat and other @samp{pymples} can easily
2316 be identified.
2317
2318 A web profiling frontend exposes process statistics, garbage
2319 visualisation and class tracker statistics.")
2320 (license license:asl2.0)))
2321
2322 (define-public python2-pympler
2323 (package-with-python2 python-pympler))
2324
2325 (define-public python-itsdangerous
2326 (package
2327 (name "python-itsdangerous")
2328 (version "1.1.0")
2329 (source
2330 (origin
2331 (method url-fetch)
2332 (uri (pypi-uri "itsdangerous" version))
2333 (sha256
2334 (base32
2335 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
2336 (build-system python-build-system)
2337 (home-page "https://palletsprojects.com/p/itsdangerous/")
2338 (synopsis "Python library for passing data to/from untrusted environments")
2339 (description
2340 "Itsdangerous provides various helpers to pass trusted data to untrusted
2341 environments and back.")
2342 (license license:bsd-3)))
2343
2344 (define-public python2-itsdangerous
2345 (package-with-python2 python-itsdangerous))
2346
2347 (define-public python-pyyaml
2348 (package
2349 (name "python-pyyaml")
2350 (version "5.3")
2351 (source
2352 (origin
2353 (method url-fetch)
2354 (uri (pypi-uri "PyYAML" version))
2355 (sha256
2356 (base32
2357 "058nd4p8f25wwzy2aiwh18wcrdm6663cqbfdkgjp8y9cp7ampx79"))))
2358 (build-system python-build-system)
2359 (inputs
2360 `(("libyaml" ,libyaml)))
2361 (home-page "https://pyyaml.org")
2362 (synopsis "YAML parser and emitter for Python")
2363 (description
2364 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2365 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2366 API, and sensible error messages. PyYAML supports standard YAML tags and
2367 provides Python-specific tags that allow to represent an arbitrary Python
2368 object.")
2369 (license license:expat)))
2370
2371 (define-public python2-pyyaml
2372 (package-with-python2 python-pyyaml))
2373
2374 (define-public python-vine
2375 (package
2376 (name "python-vine")
2377 (version "1.1.4")
2378 (source
2379 (origin
2380 (method url-fetch)
2381 (uri (pypi-uri "vine" version))
2382 (sha256
2383 (base32
2384 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
2385 (build-system python-build-system)
2386 (native-inputs
2387 `(("python-pytest" ,python-pytest)
2388 ("python-case" ,python-case)))
2389 (home-page "https://github.com/celery/vine")
2390 (synopsis "Promises for Python")
2391 (description
2392 "@code{vine} provides a special implementation of promises in that it can
2393 be used both for \"promise of a value\" and lazy evaluation. The biggest
2394 upside for this is that everything in a promise can also be a promise,
2395 e.g. filters, callbacks and errbacks can all be promises.")
2396 (license license:bsd-3)))
2397
2398 (define-public python-virtualenv
2399 (package
2400 (name "python-virtualenv")
2401 (version "20.0.8")
2402 (source
2403 (origin
2404 (method url-fetch)
2405 (uri (pypi-uri "virtualenv" version))
2406 (sha256
2407 (base32
2408 "096r7g5cv85vxymg9iqbn5z749613snlvd6p3rf1nxnrd386j0qz"))))
2409 (build-system python-build-system)
2410 (native-inputs
2411 `(("python-mock" ,python-mock)
2412 ("python-pytest" ,python-pytest)
2413 ;; NOTE: guix lint remarks that "python-setuptools should probably not
2414 ;; be an input at all". However, removing the input makes the build error:
2415 ;; File "setup.py", line 4, in <module>
2416 ;; raise RuntimeError("setuptools >= 41 required to build")
2417 ("python-setuptools" ,python-setuptools)
2418 ("python-setuptools-scm" ,python-setuptools-scm)))
2419 (propagated-inputs
2420 `(("python-appdirs" ,python-appdirs)
2421 ("python-distlib" ,python-distlib)
2422 ("python-filelock" ,python-filelock)
2423 ("python-six" ,python-six)
2424 ("python-importlib-metadata" ,python-importlib-metadata)))
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-jinja2-time
2499 (package
2500 (name "python-jinja2-time")
2501 (version "0.2.0")
2502 (source
2503 (origin
2504 (method url-fetch)
2505 (uri (pypi-uri "jinja2-time" version))
2506 (sha256
2507 (base32
2508 "0h0dr7cfpjnjj8bgl2vk9063a53649pn37wnlkd8hxjy656slkni"))))
2509 (build-system python-build-system)
2510 (propagated-inputs
2511 `(("python-arrow" ,python-arrow)
2512 ("python-jinja2" ,python-jinja2)))
2513 (home-page
2514 "https://github.com/hackebrot/jinja2-time")
2515 (synopsis "Jinja2 Extension for Dates and Times")
2516 (description
2517 "This package provides an extension for the template engine Jinja2. It
2518 adds a 'now' tag providing a convenient access to the arrow.now() API from
2519 templates. A format string can be provided to control the output.")
2520 (license license:expat)))
2521
2522 (define-public python-pystache
2523 (package
2524 (name "python-pystache")
2525 (version "0.5.4")
2526 (source (origin
2527 (method url-fetch)
2528 (uri (pypi-uri "pystache" version))
2529 (sha256
2530 (base32
2531 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2532 (build-system python-build-system)
2533 (arguments
2534 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2535 (home-page "http://defunkt.io/pystache/")
2536 (synopsis "Python logic-less template engine")
2537 (description
2538 "Pystache is a Python implementation of the framework agnostic,
2539 logic-free templating system Mustache.")
2540 (license license:expat)
2541 (properties `((python2-variant . ,(delay python2-pystache))))))
2542
2543 (define-public python2-pystache
2544 (package (inherit (package-with-python2
2545 (strip-python2-variant python-pystache)))
2546 (arguments
2547 `(#:python ,python-2
2548 #:phases
2549 (modify-phases %standard-phases
2550 (replace 'check
2551 (lambda _
2552 (invoke "python" "test_pystache.py"))))))))
2553
2554 (define-public python-joblib
2555 (package
2556 (name "python-joblib")
2557 (version "0.13.0")
2558 (source (origin
2559 (method url-fetch)
2560 (uri (pypi-uri "joblib" version))
2561 (sha256
2562 (base32
2563 "0612nazad8dxmn3xghfrmjax6456l4xy6hn9cngs7vydi14ds7v5"))))
2564 (build-system python-build-system)
2565 (arguments
2566 `(#:phases
2567 (modify-phases %standard-phases
2568 (replace 'check
2569 (lambda _ (invoke "pytest" "-v" "joblib"))))))
2570 (native-inputs
2571 `(("python-pytest" ,python-pytest)))
2572 (home-page "https://joblib.readthedocs.io/")
2573 (synopsis "Using Python functions as pipeline jobs")
2574 (description
2575 "Joblib is a set of tools to provide lightweight pipelining in Python.
2576 In particular, joblib offers: transparent disk-caching of the output values
2577 and lazy re-evaluation (memoize pattern), easy simple parallel computing
2578 logging and tracing of the execution.")
2579 (license license:bsd-3)))
2580
2581 (define-public python2-joblib
2582 (package-with-python2 python-joblib))
2583
2584 (define-public python-daemon
2585 (package
2586 (name "python-daemon")
2587 (version "2.2.3")
2588 (source
2589 (origin
2590 (method url-fetch)
2591 (uri (pypi-uri "python-daemon" version))
2592 (sha256
2593 (base32
2594 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
2595 (build-system python-build-system)
2596 (arguments
2597 `(#:phases
2598 (modify-phases %standard-phases
2599 (add-before 'check 'disable-tests
2600 (lambda _
2601 ;; FIXME: Determine why test fails
2602 (substitute* "test/test_daemon.py"
2603 (("test_detaches_process_context")
2604 "skip_test_detaches_process_context"))
2605 #t)))))
2606 (propagated-inputs
2607 `(("python-lockfile" ,python-lockfile)))
2608 (native-inputs
2609 `(("python-unittest2" ,python-unittest2)
2610 ("python-testtools" ,python-testtools)
2611 ("python-testscenarios" ,python-testscenarios)
2612 ("python-mock" ,python-mock)
2613 ("python-docutils" ,python-docutils)))
2614 (home-page "https://pagure.io/python-daemon/")
2615 (synopsis "Python library for making a Unix daemon process")
2616 (description "Python-daemon is a library that assists a Python program to
2617 turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
2618
2619 This library provides a @code{DaemonContext} class that manages the following
2620 important tasks for becoming a daemon process:
2621 @enumerate
2622 @item Detach the process into its own process group.
2623 @item Set process environment appropriate for running inside a chroot.
2624 @item Renounce suid and sgid privileges.
2625 @item Close all open file descriptors.
2626 @item Change the working directory, uid, gid, and umask.
2627 @item Set appropriate signal handlers.
2628 @item Open new file descriptors for stdin, stdout, and stderr.
2629 @item Manage a specified PID lock file.
2630 @item Register cleanup functions for at-exit processing.
2631 @end enumerate")
2632 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
2633 (license (list license:asl2.0 license:gpl3+))))
2634
2635 (define-public python-anytree
2636 (package
2637 (name "python-anytree")
2638 (version "2.8.0")
2639 (source (origin
2640 (method url-fetch)
2641 (uri (pypi-uri "anytree" version))
2642 (sha256
2643 (base32
2644 "1aycpc387wqz7h9w2p53qxn43qsh3m6by6ak4kkc66x9aprr63rz"))))
2645 (build-system python-build-system)
2646 (propagated-inputs
2647 `(("python-six" ,python-six)))
2648 (native-inputs
2649 `(;; For tests.
2650 ("graphviz" ,graphviz) ;for 'dot'
2651 ("python-nose" ,python-nose)))
2652 (home-page "https://github.com/c0fec0de/anytree")
2653 (synopsis "Lightweight tree data library")
2654 (description
2655 "@code{anytree} is a simple, lightweight, and extensible tree data
2656 structure for Python.")
2657 (license license:asl2.0)))
2658
2659 (define-public python-docutils
2660 (package
2661 (name "python-docutils")
2662 (version "0.14")
2663 (source
2664 (origin
2665 (method url-fetch)
2666 (uri (pypi-uri "docutils" version))
2667 (sha256
2668 (base32
2669 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
2670 (build-system python-build-system)
2671 (arguments
2672 '(#:tests? #f)) ; no setup.py test command
2673 (home-page "http://docutils.sourceforge.net/")
2674 (synopsis "Python Documentation Utilities")
2675 (description
2676 "Docutils is a modular system for processing documentation into useful
2677 formats, such as HTML, XML, and LaTeX. For input Docutils supports
2678 reStructuredText.")
2679 ;; Most of the source code is public domain, but some source files are
2680 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2681 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2682
2683 (define-public python2-docutils
2684 (package-with-python2 python-docutils))
2685
2686 (define-public python-pygments
2687 (package
2688 (name "python-pygments")
2689 (version "2.5.2")
2690 (source
2691 (origin
2692 (method url-fetch)
2693 (uri (pypi-uri "Pygments" version))
2694 (sha256
2695 (base32
2696 "1zmhnswy0wxfn0xprs9aqsvx2c3kmzfn2wx14q8cv3vpkxdamj4q"))))
2697 (build-system python-build-system)
2698 (arguments
2699 ;; FIXME: Tests require sphinx, which depends on this.
2700 '(#:tests? #f))
2701 (home-page "https://pygments.org/")
2702 (synopsis "Syntax highlighting")
2703 (description
2704 "Pygments is a syntax highlighting package written in Python.")
2705 (license license:bsd-2)))
2706
2707 (define-public python2-pygments
2708 (package-with-python2 python-pygments))
2709
2710 (define-public python-bumpversion
2711 (package
2712 (name "python-bumpversion")
2713 (version "0.5.3")
2714 (source
2715 (origin
2716 (method url-fetch)
2717 (uri (pypi-uri "bumpversion" version))
2718 (sha256
2719 (base32
2720 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
2721 (build-system python-build-system)
2722 (home-page "https://github.com/peritus/bumpversion")
2723 (synopsis "Tool to bump software version")
2724 (description "This tool provides a command-line interface (CLI) to bump a
2725 software version simply.")
2726 (license license:expat)))
2727
2728 (define-public python-deprecated
2729 (package
2730 (name "python-deprecated")
2731 (version "1.2.5")
2732 (source
2733 (origin
2734 (method git-fetch)
2735 (uri (git-reference
2736 (url "https://github.com/tantale/deprecated.git")
2737 (commit (string-append "v" version))))
2738 (file-name (git-file-name name version))
2739 (sha256
2740 (base32
2741 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
2742 (build-system python-build-system)
2743 (arguments
2744 `(#:phases (modify-phases %standard-phases
2745 (replace 'check
2746 (lambda _
2747 (invoke "pytest"))))))
2748 (propagated-inputs
2749 `(("python-wrapt" ,python-wrapt)))
2750 (native-inputs
2751 `(("python-bumpversion" ,python-bumpversion)
2752 ("python-pytest" ,python-pytest)
2753 ("python-pytest-cov" ,python-pytest-cov)
2754 ("python-sphinx" ,python-sphinx)
2755 ("python-tox" ,python-tox)))
2756 (home-page "https://github.com/tantale/deprecated")
2757 (synopsis "Python decorator to deprecate classes, functions or methods")
2758 (description "The @code{deprecated} decorator provides a convenient way to deprecate
2759 to deprecate classes, functions or methods.")
2760 (license license:expat)))
2761
2762 (define-public python-pygithub
2763 (package
2764 (name "python-pygithub")
2765 (version "1.43.8")
2766 (source
2767 ;; We fetch from the Git repo because there are no tests in the PyPI
2768 ;; archive.
2769 (origin
2770 (method git-fetch)
2771 (uri (git-reference
2772 (url "https://github.com/PyGithub/PyGithub.git")
2773 (commit (string-append "v" version))))
2774 (file-name (git-file-name name version))
2775 (sha256
2776 (base32 "1625v558xga5mwhl9jqmibywy5qafmg1vqrirqz6zfq1la1d22mw"))))
2777 (build-system python-build-system)
2778 (arguments
2779 `(#:phases (modify-phases %standard-phases
2780 ;; Some tests rely on the network.
2781 (add-after 'unpack 'disable-failing-tests
2782 (lambda _
2783 (substitute* "tests/Issue142.py"
2784 (("testDecodeJson") "disabled_testDecodeJson"))
2785 #t))
2786 (add-before 'check 'prepare-for-tests
2787 (lambda _
2788 (for-each (lambda (f)
2789 (chmod f #o666))
2790 (find-files "./tests"))
2791 (system* "python" "-m" "lib2to3" "-w" "-n" "tests")
2792 (setenv "PYTHONPATH"
2793 (string-append "./tests:" (getenv "PYTHONPATH")))
2794 #t)))))
2795 (propagated-inputs
2796 `(("python-deprecated" ,python-deprecated)
2797 ("python-pyjwt" ,python-pyjwt)
2798 ("python-requests" ,python-requests)))
2799 (native-inputs `(("python-httpretty" ,python-httpretty)))
2800 (home-page "https://pygithub.readthedocs.io/en/latest/")
2801 (synopsis "Python library for the GitHub API")
2802 (description "This library allows managing GitHub resources such as
2803 repositories, user profiles, and organizations in your Python applications,
2804 using version 3 of the GitHub application programming interface (API).")
2805 (license license:lgpl3+)))
2806
2807 (define-public python-rellu
2808 (package
2809 (name "python-rellu")
2810 (version "0.7")
2811 (source
2812 (origin
2813 (method url-fetch)
2814 (uri (pypi-uri "rellu" version))
2815 (sha256
2816 (base32
2817 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
2818 (build-system python-build-system)
2819 (propagated-inputs
2820 `(("python-invoke" ,python-invoke)
2821 ("python-pygithub" ,python-pygithub)))
2822 (home-page "https://github.com/robotframework/rellu")
2823 (synopsis "Utilities to create PyPI releases")
2824 (description "This collection of utilities contains tooling and templates
2825 to assist in creating releases on GitHub and publishing them on PyPI. It is
2826 designed to be used by Robot Framework and tools and libraries in its
2827 ecosystem, but can naturally be used also by other projects.")
2828 (license license:asl2.0)))
2829
2830 (define-public python-robotframework
2831 (package
2832 (name "python-robotframework")
2833 (version "3.1.2")
2834 ;; There are no tests in the PyPI archive.
2835 (source
2836 (origin
2837 (method git-fetch)
2838 (uri (git-reference
2839 (url "https://github.com/robotframework/robotframework.git")
2840 (commit (string-append "v" version))))
2841 (file-name (git-file-name name version))
2842 (sha256
2843 (base32 "16gnxy0qinh8fhs0qvhff5z2xh49c3cqgm0d7bfjw120df6x7fym"))
2844 (patches (search-patches
2845 "python-robotframework-honor-source-date-epoch.patch"))))
2846 (build-system python-build-system)
2847 (arguments
2848 `(#:phases (modify-phases %standard-phases
2849 (add-before 'build 'build-and-install-doc
2850 (lambda* (#:key outputs #:allow-other-keys)
2851 (let* ((doc-output (assoc-ref outputs "doc"))
2852 (doc (string-append doc-output "/share/"
2853 ,name "-" ,version "/")))
2854 (invoke "invoke" "library-docs" "all")
2855 (mkdir-p doc)
2856 (copy-recursively "doc/libraries"
2857 (string-append doc "/libraries"))
2858 #t)))
2859 (replace 'check
2860 (lambda _
2861 (invoke "python" "utest/run.py"))))))
2862 (native-inputs
2863 `(("python-invoke" ,python-invoke)
2864 ("python-rellu" ,python-rellu)
2865 ("python:tk" ,python "tk"))) ;used when building the HTML doc
2866 (outputs '("out" "doc"))
2867 (home-page "https://robotframework.org")
2868 (synopsis "Generic automation framework")
2869 (description "Robot Framework is a generic automation framework for
2870 acceptance testing, acceptance test driven development (ATDD), and robotic
2871 process automation (RPA).")
2872 (license license:asl2.0)))
2873
2874 (define-public python-robotframework-lint
2875 ;; There is no properly tagged release; the commit below seems to correspond
2876 ;; to the 0.9 stable release available from PyPI. The tests are not
2877 ;; included in the PyPI archive, so we fetch the sources from the upstream
2878 ;; Git repo.
2879 (let ((commit "e851879bab1f63e4e53b34a4dc8a67ed95102830")
2880 (revision "1"))
2881 (package
2882 (name "python-robotframework-lint")
2883 (version (git-version "0.9.0" revision commit))
2884 (source
2885 (origin
2886 (method git-fetch)
2887 (uri (git-reference
2888 (url "https://github.com/boakley/robotframework-lint.git")
2889 (commit commit)))
2890 (file-name (git-file-name name version))
2891 (sha256
2892 (base32
2893 "1p6fknqg5sb9qz5857ji4a877657vgfjm5v3zn45994parx6ml1m"))))
2894 (build-system python-build-system)
2895 (arguments
2896 `(#:phases
2897 (modify-phases %standard-phases
2898 (replace 'check
2899 (lambda _
2900 (invoke "python" "-m" "robot" "-A"
2901 "tests/conf/default.args" "tests"))))))
2902 (propagated-inputs
2903 `(("python-robotframework" ,python-robotframework)))
2904 (home-page "https://github.com/boakley/robotframework-lint/")
2905 (synopsis "Static analysis tool (linter) for Robot Framework")
2906 (description "This package provides the @code{rflint} command-line
2907 utility, a static analysis tool (linter) for Robot Framework source files.")
2908 (license license:asl2.0))))
2909
2910 (define-public python-robotframework-sshlibrary
2911 (package
2912 (name "python-robotframework-sshlibrary")
2913 (version "3.3.0")
2914 ;; There are no tests in the PyPI archive.
2915 (source
2916 (origin
2917 (method git-fetch)
2918 (uri (git-reference
2919 (url "https://github.com/robotframework/SSHLibrary.git")
2920 (commit (string-append "v" version))))
2921 (file-name (git-file-name name version))
2922 (sha256
2923 (base32
2924 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
2925 (build-system python-build-system)
2926 (arguments
2927 `(#:phases
2928 (modify-phases %standard-phases
2929 (add-before 'build 'build-and-install-doc
2930 (lambda* (#:key outputs #:allow-other-keys)
2931 (let* ((doc-output (assoc-ref outputs "doc"))
2932 (doc (string-append doc-output "/share/"
2933 ,name "-" ,version "/")))
2934 (invoke "chmod" "-R" "+w" "docs")
2935 (invoke "invoke" "kw-docs" "project-docs")
2936 (mkdir-p doc)
2937 (for-each delete-file (find-files "docs" "\\.rst"))
2938 (copy-recursively "docs" doc)
2939 #t)))
2940 (replace 'check
2941 (lambda _
2942 ;; Some tests require an SSH server; we remove them.
2943 (delete-file "utest/test_client_api.py")
2944 (delete-file "utest/test_scp.py")
2945 (invoke "python" "utest/run.py"))))))
2946 (propagated-inputs
2947 `(("python-robotframework" ,python-robotframework)
2948 ("python-paramiko" ,python-paramiko)
2949 ("python-scp" ,python-scp)))
2950 (native-inputs
2951 `(("openssh" ,openssh)
2952 ("which" ,which)
2953 ;; To generate the documentation
2954 ("python-docutils" ,python-docutils)
2955 ("python-invoke" ,python-invoke)
2956 ("python-pygments" ,python-pygments)
2957 ("python-rellu" ,python-rellu)))
2958 (outputs '("out" "doc"))
2959 (home-page "https://github.com/robotframework/SSHLibrary")
2960 (synopsis "Robot Framework library for SSH and SFTP")
2961 (description "SSHLibrary is a Robot Framework library providing support
2962 for SSH and SFTP. It has the following main usages:
2963 @itemize @bullet
2964 @item Executing commands on the remote machine, either blocking or non-blocking.
2965 @item Writing and reading in an interactive shell.
2966 @item Transferring files and directories over SFTP.
2967 @item Ensuring that files and directories exist on the remote machine.
2968 @end itemize")
2969 (license license:asl2.0)))
2970
2971 (define-public python-rstr
2972 (package
2973 (name "python-rstr")
2974 (version "2.2.6")
2975 (source
2976 (origin
2977 (method url-fetch)
2978 (uri (pypi-uri "rstr" version))
2979 (sha256
2980 (base32
2981 "197dw8mbq0pjjz1l6h1ksi62vgn7x55d373ch74y06744qiq5sjx"))))
2982 (build-system python-build-system)
2983 (home-page
2984 "http://bitbucket.org/leapfrogdevelopment/rstr/overview")
2985 (synopsis "Generate random strings in Python")
2986 (description "This package provides a python module for generating
2987 random strings of various types. It could be useful for fuzz testing,
2988 generating dummy data, or other applications. It has no dependencies
2989 outside the standard library.")
2990 (license license:bsd-3)))
2991
2992 (define-public python-scp
2993 (package
2994 (name "python-scp")
2995 (version "0.13.2")
2996 (source
2997 (origin
2998 (method url-fetch)
2999 (uri (pypi-uri "scp" version))
3000 (sha256
3001 (base32
3002 "1crlpw9lnn58fs1c1rmh7s7s9y5gkgpgjsqlvg9qa51kq1knx7gg"))))
3003 (build-system python-build-system)
3004 (arguments
3005 '(#:tests? #f)) ;tests require an SSH server
3006 (propagated-inputs
3007 `(("python-paramiko" ,python-paramiko)))
3008 (home-page "https://github.com/jbardin/scp.py")
3009 (synopsis "SCP protocol module for Python and Paramiko")
3010 (description "The scp module extends the Paramiko library to send and
3011 receive files via the SCP1 protocol, as implemented by the OpenSSH
3012 @command{scp} program.")
3013 (license license:gpl2+)))
3014
3015 (define-public python-rst.linker
3016 (package
3017 (name "python-rst.linker")
3018 (version "1.11")
3019 (source
3020 (origin
3021 (method url-fetch)
3022 (uri (pypi-uri "rst.linker" version))
3023 (sha256
3024 (base32 "0pqsfqqx8h0pq21k8l3k62kznrgaj2ala93c64s4d9rpbr4mgkd2"))))
3025 (build-system python-build-system)
3026 (propagated-inputs
3027 `(("python-dateutil" ,python-dateutil)
3028 ("python-six" ,python-six)))
3029 (native-inputs
3030 `(("python-setuptools-scm" ,python-setuptools-scm)))
3031 ;; Test would require path.py, which would introduce a cyclic dependence.
3032 (arguments `(#:tests? #f))
3033 ;; Note: As of version 1.7 the documentation is not worth building.
3034 (home-page "https://github.com/jaraco/rst.linker")
3035 (synopsis "Sphinx plugin to add links and timestamps")
3036 (description "rst.linker allows to automatically replace text by a
3037 reStructuredText external reference or timestamps. It's primary purpose is to
3038 augment the changelog, but it can be used for other documents, too.")
3039 (license license:expat)))
3040
3041 (define-public python2-rst.linker
3042 (package-with-python2 python-rst.linker))
3043
3044 (define-public python-feedgenerator
3045 (package
3046 (name "python-feedgenerator")
3047 (version "1.9")
3048 (source
3049 (origin
3050 (method url-fetch)
3051 (uri (pypi-uri "feedgenerator" version))
3052 (sha256
3053 (base32
3054 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
3055 (modules '((guix build utils)))
3056 (snippet
3057 '(begin
3058 ;; Remove pre-compiled .pyc files from source.
3059 (for-each delete-file-recursively
3060 (find-files "." "__pycache__" #:directories? #t))
3061 (for-each delete-file (find-files "." "\\.pyc$"))
3062 #t))))
3063 (build-system python-build-system)
3064 (propagated-inputs
3065 `(("python-pytz" ,python-pytz)
3066 ("python-six" ,python-six)))
3067 (home-page "https://github.com/getpelican/feedgenerator")
3068 (synopsis
3069 "Standalone version of Django's Atom/RSS feed generator")
3070 (description
3071 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
3072 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3073 (license license:bsd-3)))
3074
3075 (define-public python2-feedgenerator
3076 (package-with-python2 python-feedgenerator))
3077
3078 (define-public python-toml
3079 (package
3080 (name "python-toml")
3081 (version "0.9.4")
3082 (source
3083 (origin
3084 (method url-fetch)
3085 (uri (pypi-uri "toml" version))
3086 (sha256
3087 (base32
3088 "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf"))))
3089 (build-system python-build-system)
3090 (arguments
3091 `(#:tests? #f)) ;no tests suite in release
3092 (home-page "https://github.com/uiri/toml")
3093 (synopsis "Library for TOML")
3094 (description
3095 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
3096 Language (TOML) configuration files.")
3097 (license license:expat)))
3098
3099 (define-public python-jsonrpc-server
3100 (package
3101 (name "python-jsonrpc-server")
3102 (version "0.3.2")
3103 (source
3104 (origin
3105 (method url-fetch)
3106 (uri (pypi-uri "python-jsonrpc-server" version))
3107 (sha256
3108 (base32
3109 "0ddgdp26dfxaz6isjbb12974b3rxavgsqrn2zrmck62cmipg5g05"))))
3110 (build-system python-build-system)
3111 (propagated-inputs
3112 `(("python-future" ,python-future)
3113 ("python-mock" ,python-mock)
3114 ("python-pytest" ,python-pytest)
3115 ("python-ujson" ,python-ujson)))
3116 (home-page
3117 "https://github.com/palantir/python-jsonrpc-server")
3118 (synopsis "JSON RPC 2.0 server library")
3119 (description
3120 "This package provides a JSON RPC 2.0 server library for Python.")
3121 (license license:expat)))
3122
3123 (define-public python-pydocstyle
3124 (package
3125 (name "python-pydocstyle")
3126 (version "3.0.0")
3127 (source
3128 (origin
3129 (method url-fetch)
3130 (uri (pypi-uri "pydocstyle" version))
3131 (sha256
3132 (base32
3133 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
3134 (build-system python-build-system)
3135 (propagated-inputs
3136 `(("python-six" ,python-six)
3137 ("python-snowballstemmer" ,python-snowballstemmer)))
3138 (home-page
3139 "https://github.com/PyCQA/pydocstyle/")
3140 (synopsis "Python docstring style checker")
3141 (description
3142 "This package provides a style checker for the Python Language
3143 Server (PLS).")
3144 (license license:expat)))
3145
3146 (define-public python-language-server
3147 (package
3148 (name "python-language-server")
3149 (version "0.31.7")
3150 (source
3151 (origin
3152 (method url-fetch)
3153 (uri (pypi-uri "python-language-server" version))
3154 (sha256
3155 (base32
3156 "0f8rljff4h2ay9m2n9ang7axai37nzd39zd7m6c90rci5wh8cmxh"))))
3157 (build-system python-build-system)
3158 (propagated-inputs
3159 `(("python-pluggy" ,python-pluggy)
3160 ("python-jsonrpc-server" ,python-jsonrpc-server)
3161 ("python-jedi" ,python-jedi)
3162 ("python-yapf" ,python-yapf)
3163 ("python-pyflakes" ,python-pyflakes)
3164 ("python-pydocstyle" ,python-pydocstyle)
3165 ("python-pycodestyle" ,python-pycodestyle)
3166 ("python-mccabe" ,python-mccabe)
3167 ("python-rope" ,python-rope)
3168 ("python-autopep8" ,python-autopep8)
3169 ("python-flake8" ,python-flake8)
3170 ("python-pylint" ,python-pylint)))
3171 (home-page "https://github.com/palantir/python-language-server")
3172 (synopsis "Python implementation of the Language Server Protocol")
3173 (description
3174 "The Python Language Server (pyls) is an implementation of the Python 3
3175 language specification for the Language Server Protocol (LSP). This tool is
3176 used in text editing environments to provide a complete and integrated
3177 feature-set for programming Python effectively.")
3178 (license license:expat)))
3179
3180 (define-public python-pathspec
3181 (package
3182 (name "python-pathspec")
3183 (version "0.7.0")
3184 (source
3185 (origin
3186 (method url-fetch)
3187 (uri (pypi-uri "pathspec" version))
3188 (sha256
3189 (base32
3190 "15lvs4awlg8xzl0l4gk9y53xx4yqmqvsv44pglv39m70y85afajn"))))
3191 (build-system python-build-system)
3192 (home-page "https://github.com/cpburnz/python-path-specification")
3193 (synopsis "Utility library for gitignore style pattern matching of file paths")
3194 (description
3195 "This package provides a utility library for gitignore style pattern
3196 matching of file paths.")
3197 (license license:mpl2.0)))
3198
3199 (define-public python-black
3200 (package
3201 (name "python-black")
3202 (version "19.10b0")
3203 (source
3204 (origin
3205 (method url-fetch)
3206 (uri (pypi-uri "black" version))
3207 (sha256
3208 (base32
3209 "0f8mr0yzj78q1dx7v6ggbgfir2wv0n5z2shfbbvfdq7910xbgvf2"))))
3210 (build-system python-build-system)
3211 (arguments
3212 `(#:phases
3213 (modify-phases %standard-phases
3214 (add-after 'patch-source-shebangs 'patch-extra-shebangs
3215 (lambda _
3216 (let ((python3 (which "python3")))
3217 (substitute* '("tests/data/fmtonoff.py"
3218 "tests/data/string_prefixes.py"
3219 "tests/data/function.py"
3220 "tests/data/python37.py")
3221 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
3222 (string-append "#!" python3 (if (string? minor-version)
3223 minor-version
3224 "")))))
3225 #t))
3226 (add-after 'unpack 'disable-broken-tests
3227 (lambda _
3228 ;; These tests are supposed to be skipped when the blackd
3229 ;; dependencies are missing, but this doesn't quite work.
3230 (substitute* "tests/test_black.py"
3231 (("( *)class BlackDTestCase.*" match indent)
3232 (string-append indent "@unittest.skip(\"no blackd deps\")\n"
3233 indent "class BlackDTestCase(unittest.TestCase):\n"))
3234 (("web.Application") "False")
3235 (("@unittest_run_loop") ""))
3236
3237 ;; Patching the above file breaks the self test
3238 (substitute* "tests/test_black.py"
3239 (("( *)def test_self" match indent)
3240 (string-append indent "@unittest.skip(\"guix\")\n" match)))
3241 #t)))))
3242 (propagated-inputs
3243 `(("python-click" ,python-click)
3244 ("python-attrs" ,python-attrs)
3245 ("python-appdirs" ,python-appdirs)
3246 ("python-pathspec" ,python-pathspec)
3247 ("python-regex" ,python-regex)
3248 ("python-toml" ,python-toml)
3249 ("python-typed-ast" ,python-typed-ast)))
3250 (native-inputs
3251 `(("python-setuptools-scm" ,python-setuptools-scm)))
3252 (home-page "https://github.com/ambv/black")
3253 (synopsis "The uncompromising code formatter")
3254 (description "Black is the uncompromising Python code formatter.")
3255 (license license:expat)))
3256
3257 (define-public python-blinker
3258 (package
3259 (name "python-blinker")
3260 (version "1.4")
3261 (source
3262 (origin
3263 (method url-fetch)
3264 (uri (pypi-uri "blinker" version))
3265 (sha256
3266 (base32
3267 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
3268 (build-system python-build-system)
3269 (home-page "https://pythonhosted.org/blinker/")
3270 (synopsis "Fast, simple object-to-object and broadcast signaling")
3271 (description
3272 "Blinker provides a fast dispatching system that allows any number of
3273 interested parties to subscribe to events, or \"signals\".")
3274 (license license:expat)))
3275
3276 (define-public python2-blinker
3277 (package-with-python2 python-blinker))
3278
3279 (define-public pelican
3280 (package
3281 (name "pelican")
3282 (version "4.2.0")
3283 (source
3284 (origin
3285 (method url-fetch)
3286 (uri (pypi-uri "pelican" version))
3287 (sha256
3288 (base32
3289 "0mp7hjyhs38ag1hyfcy882g400z0babqi72pnli46dqijfhajzmy"))))
3290 (build-system python-build-system)
3291 (propagated-inputs
3292 `(("python-blinker" ,python-blinker)
3293 ("python-dateutil" ,python-dateutil)
3294 ("python-docutils" ,python-docutils)
3295 ("python-feedgenerator" ,python-feedgenerator)
3296 ("python-jinja2" ,python-jinja2)
3297 ("python-markdown" ,python-markdown)
3298 ("python-pygments" ,python-pygments)
3299 ("python-pytz" ,python-pytz)
3300 ("python-six" ,python-six)
3301 ("python-unidecode" ,python-unidecode)))
3302 (home-page "https://getpelican.com/")
3303 (arguments
3304 `(;; XXX Requires a lot more packages to do unit tests :P
3305 #:tests? #f))
3306 (synopsis "Python-based static site publishing system")
3307 (description
3308 "Pelican is a tool to generate a static blog from reStructuredText,
3309 Markdown input files, and more. Pelican uses Jinja2 for templating
3310 and is very extensible.")
3311 (license license:agpl3+)))
3312
3313 (define-public mallard-ducktype
3314 (package
3315 (name "mallard-ducktype")
3316 (version "1.0.2")
3317 (source
3318 (origin
3319 (method git-fetch)
3320 ;; git-reference because tests are not included in pypi source tarball
3321 ;; https://issues.guix.gnu.org/issue/36755#2
3322 (uri (git-reference
3323 (url "https://github.com/projectmallard/mallard-ducktype.git")
3324 (commit version)))
3325 (file-name (git-file-name name version))
3326 (sha256
3327 (base32
3328 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
3329 (build-system python-build-system)
3330 (arguments
3331 '(#:phases
3332 (modify-phases %standard-phases
3333 (replace 'check
3334 (lambda _
3335 (with-directory-excursion "tests"
3336 (invoke "sh" "runtests")))))))
3337 (home-page "http://projectmallard.org")
3338 (synopsis "Convert Ducktype to Mallard documentation markup")
3339 (description
3340 "Ducktype is a lightweight syntax that can represent all the semantics
3341 of the Mallard XML documentation system. Ducktype files can be converted to
3342 Mallard using the @command{ducktype} tool. The yelp-tools package
3343 provides additional functionality on the produced Mallard documents.")
3344 (license license:expat)))
3345
3346 (define-public python-cython
3347 (package
3348 (name "python-cython")
3349 (version "0.29.13")
3350 (source
3351 (origin
3352 (method url-fetch)
3353 (uri (pypi-uri "Cython" version))
3354 (sha256
3355 (base32
3356 "13k37lrcgagwwnzr5bzririsscb793vndj234d475x1h9ad0d7f2"))))
3357 (build-system python-build-system)
3358 ;; we need the full python package and not just the python-wrapper
3359 ;; because we need libpython3.3m.so
3360 (inputs
3361 `(("python" ,python)))
3362 (arguments
3363 `(#:phases
3364 (modify-phases %standard-phases
3365 (add-before 'check 'set-HOME
3366 ;; some tests require access to "$HOME/.cython"
3367 (lambda _ (setenv "HOME" "/tmp") #t))
3368
3369 ;; FIXME: These tests started failing on armhf after the 0.28 update
3370 ;; (commit c69d11c5930), both with an error such as this:
3371 ;; compiling (cpp) and running dictcomp ...
3372 ;; === C/C++ compiler error output: ===
3373 ;; ‘
3374 ;; dictcomp.cpp:5221: confused by earlier errors, bailing out
3375 ;; See <https://hydra.gnu.org/build/2948724> for logs.
3376 ,@(if (target-arm32?)
3377 `((add-before 'check 'disable-failing-tests
3378 (lambda _
3379 (let ((disabled-tests (open-file "tests/bugs.txt" "a")))
3380 (for-each (lambda (test)
3381 (format disabled-tests "~a\n" test))
3382 '("memslice" "dictcomp"))
3383 (close-port disabled-tests)))))
3384 '())
3385
3386 (replace 'check
3387 (lambda _
3388 ;; Disable compiler optimizations to greatly reduce the running
3389 ;; time of the test suite.
3390 (setenv "CFLAGS" "-O0")
3391
3392 (invoke "python" "runtests.py" "-vv"
3393 "-j" (number->string (parallel-job-count))))))))
3394 (home-page "https://cython.org/")
3395 (synopsis "C extensions for Python")
3396 (description "Cython is an optimising static compiler for both the Python
3397 programming language and the extended Cython programming language. It makes
3398 writing C extensions for Python as easy as Python itself.")
3399 (license license:asl2.0)
3400 (properties `((python2-variant . ,(delay python2-cython))))))
3401
3402 (define-public python2-cython
3403 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
3404 (package
3405 (inherit base)
3406 (name "python2-cython")
3407 (inputs
3408 `(("python-2" ,python-2))) ;this is not automatically changed
3409 (arguments
3410 (substitute-keyword-arguments (package-arguments base)
3411 ((#:phases phases)
3412 `(modify-phases ,phases
3413 (add-before 'check 'adjust-test_embed
3414 (lambda _
3415 (substitute* "runtests.py"
3416 ;; test_embed goes great lengths to find the static libpythonX.Y.a
3417 ;; so it can give the right -L flag to GCC when embedding static
3418 ;; builds of Python. It is unaware that the Python "config"
3419 ;; directory (where the static library lives) was renamed in
3420 ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
3421 ;; which works fine, because that is where the shared library is.
3422 ;;
3423 ;; It also appears to be unaware that the Makefile in Demos/embed
3424 ;; already unconditionally pass the static library location to GCC,
3425 ;; after checking sysconfig.get_config_var('LIBPL).
3426 ;;
3427 ;; The effect is that the linker is unable to resolve libexpat
3428 ;; symbols when building for Python 2, because neither the Python 2
3429 ;; shared library nor Expat is available. To fix it, we can either
3430 ;; add Expat as an input and make it visible to the linker, or just
3431 ;; prevent it from overriding the Python shared library location.
3432 ;; The end result is identical, so we take the easy route.
3433 ((" or libname not in os\\.listdir\\(libdir\\)")
3434 ""))
3435 #t)))))))))
3436
3437 ;; The RPython toolchain currently does not support Python 3.
3438 (define-public python2-rpython
3439 (package
3440 (name "python2-rpython")
3441 (version "0.2.1")
3442 (source
3443 (origin
3444 (method url-fetch)
3445 (uri (pypi-uri "rpython" version))
3446 (sha256
3447 (base32
3448 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
3449 (build-system python-build-system)
3450 (arguments `(#:python ,python-2))
3451 (native-inputs
3452 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3453 (home-page "https://rpython.readthedocs.org")
3454 (synopsis "Framework for implementing interpreters and virtual machines")
3455 (description "RPython is a translation and support framework for
3456 producing implementations of dynamic languages, emphasizing a clean separation
3457 between language specification and implementation aspects.")
3458 (license license:expat)))
3459
3460 ;; NOTE: when upgrading numpy please make sure that python-pandas and
3461 ;; python-scipy still build, as these three packages are often used together.
3462 (define-public python-numpy
3463 (package
3464 (name "python-numpy")
3465 (version "1.17.3")
3466 (source
3467 (origin
3468 (method url-fetch)
3469 (uri (string-append
3470 "https://github.com/numpy/numpy/releases/download/v"
3471 version "/numpy-" version ".tar.gz"))
3472 (sha256
3473 (base32
3474 "1ak9dmjja0q90a7fsxli51ypcwssh8c4pb6f8wkrsnf2xgdk6dy9"))))
3475 (build-system python-build-system)
3476 (inputs
3477 `(("openblas" ,openblas)
3478 ("lapack" ,lapack)))
3479 (native-inputs
3480 `(("python-cython" ,python-cython)
3481 ("python-pytest" ,python-pytest)
3482 ("gfortran" ,gfortran)))
3483 (arguments
3484 `(#:phases
3485 (modify-phases %standard-phases
3486 (add-before 'build 'configure-blas-lapack
3487 (lambda* (#:key inputs #:allow-other-keys)
3488 (call-with-output-file "site.cfg"
3489 (lambda (port)
3490 (format port
3491 "[openblas]
3492 libraries = openblas
3493 library_dirs = ~a/lib
3494 include_dirs = ~a/include
3495
3496 # backslash-n to make emacs happy
3497 \n[lapack]
3498 lapack_libs = lapack
3499 library_dirs = ~a/lib
3500 include_dirs = ~a/include
3501 "
3502 (assoc-ref inputs "openblas")
3503 (assoc-ref inputs "openblas")
3504 (assoc-ref inputs "lapack")
3505 (assoc-ref inputs "lapack"))))
3506 #t))
3507 (add-before 'build 'fix-executable-paths
3508 (lambda* (#:key inputs #:allow-other-keys)
3509 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
3510 ;; instead of /bin/sh.
3511 (substitute* "numpy/distutils/exec_command.py"
3512 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
3513 (string-append match-start (assoc-ref inputs "bash") match-end)))
3514 ;; Use "gcc" executable, not "cc".
3515 (substitute* "numpy/distutils/system_info.py"
3516 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3517 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3518 #t))
3519 ;; Tests can only be run after the library has been installed and not
3520 ;; within the source directory.
3521 (delete 'check)
3522 (add-after 'install 'check
3523 (lambda* (#:key outputs inputs #:allow-other-keys)
3524 ;; Make installed package available for running the tests
3525 (add-installed-pythonpath inputs outputs)
3526 ;; Make sure "f2py" etc is found.
3527 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
3528 ":" (getenv "PATH")))
3529 (with-directory-excursion "/tmp"
3530 (invoke "python" "-c"
3531 "import numpy; numpy.test(verbose=2)")))))))
3532 (home-page "https://numpy.org")
3533 (synopsis "Fundamental package for scientific computing with Python")
3534 (description "NumPy is the fundamental package for scientific computing
3535 with Python. It contains among other things: a powerful N-dimensional array
3536 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3537 and Fortran code, useful linear algebra, Fourier transform, and random number
3538 capabilities.")
3539 (properties `((python2-variant . ,(delay python2-numpy))))
3540 (license license:bsd-3)))
3541
3542 ;; Numpy 1.16.x are the last versions that support Python 2.
3543 (define-public python2-numpy
3544 (let ((numpy (package-with-python2
3545 (strip-python2-variant python-numpy))))
3546 (package/inherit
3547 numpy
3548 (version "1.16.5")
3549 (source (origin
3550 (method url-fetch)
3551 (uri (string-append
3552 "https://github.com/numpy/numpy/releases/download/v"
3553 version "/numpy-" version ".tar.gz"))
3554 (sha256
3555 (base32
3556 "0lg1cycxzi4rvvrd5zxinpdz0ni792fpx6xjd75z1923zcac8qrb")))))))
3557
3558 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
3559 ;; interest only for legacy code going back to NumPy's predecessor
3560 ;; Numeric.
3561 (define-public python2-numpy-1.8
3562 (package (inherit python2-numpy)
3563 (version "1.8.2")
3564 (source
3565 (origin
3566 (method git-fetch)
3567 (uri (git-reference
3568 (url "https://github.com/numpy/numpy")
3569 (commit (string-append "v" version))))
3570 (file-name (git-file-name "numpy" version))
3571 (sha256
3572 (base32
3573 "0ikgi15rsqwbkfsjjxrwh40lqyal2wvyp3923y6w6ch3dcr82sfk"))))
3574 (arguments
3575 (substitute-keyword-arguments (package-arguments python2-numpy)
3576 ((#:phases phases)
3577 `(modify-phases ,phases
3578 (replace 'configure-blas-lapack
3579 (lambda* (#:key inputs #:allow-other-keys)
3580 (call-with-output-file "site.cfg"
3581 (lambda (port)
3582 (format port
3583 "[openblas]
3584 libraries = openblas,lapack
3585 library_dirs = ~a/lib:~a/lib
3586 include_dirs = ~a/include:~a/include
3587 "
3588 (assoc-ref inputs "openblas")
3589 (assoc-ref inputs "lapack")
3590 (assoc-ref inputs "openblas")
3591 (assoc-ref inputs "lapack"))))
3592 #t))))))
3593 (native-inputs
3594 `(("python2-nose" ,python2-nose)))
3595 (description "NumPy is the fundamental package for scientific computing
3596 with Python. It contains among other things: a powerful N-dimensional array
3597 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3598 and Fortran code, useful linear algebra, Fourier transform, and random number
3599 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
3600 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
3601 Numeric.")
3602 (license license:bsd-3)))
3603
3604 (define-public python-munch
3605 (package
3606 (name "python-munch")
3607 (version "2.0.4")
3608 (source
3609 (origin
3610 (method url-fetch)
3611 (uri (pypi-uri "munch" version))
3612 (sha256
3613 (base32
3614 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3615 (build-system python-build-system)
3616 (home-page "https://github.com/Infinidat/munch")
3617 (synopsis "Dot-accessible dictionary")
3618 (description "Munch is a dot-accessible dictionary similar to JavaScript
3619 objects.")
3620 (license license:expat)))
3621
3622 (define-public python2-munch
3623 (package-with-python2 python-munch))
3624
3625 (define-public python-colormath
3626 (package
3627 (name "python-colormath")
3628 (version "3.0.0")
3629 (source
3630 (origin
3631 (method url-fetch)
3632 (uri (pypi-uri "colormath" version))
3633 (sha256
3634 (base32
3635 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
3636 (build-system python-build-system)
3637 (propagated-inputs
3638 `(("python-networkx" ,python-networkx)
3639 ("python-numpy" ,python-numpy)))
3640 (home-page "https://github.com/gtaylor/python-colormath")
3641 (synopsis "Color math and conversion library")
3642 (description
3643 "This is a Python library for color math and conversions.")
3644 (license license:bsd-3)))
3645
3646 (define-public python2-colormath
3647 (package-with-python2 python-colormath))
3648
3649 (define-public python-spectra
3650 (package
3651 (name "python-spectra")
3652 (version "0.0.11")
3653 (source
3654 (origin
3655 (method url-fetch)
3656 (uri (pypi-uri "spectra" version))
3657 (sha256
3658 (base32
3659 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
3660 (build-system python-build-system)
3661 (arguments
3662 `(#:phases
3663 (modify-phases %standard-phases
3664 (replace 'check
3665 (lambda _ (invoke "nosetests" "-v"))))))
3666 (propagated-inputs
3667 `(("python-colormath" ,python-colormath)))
3668 (native-inputs
3669 `(("python-nose" ,python-nose)))
3670 (home-page "https://github.com/jsvine/spectra")
3671 (synopsis "Color scales and color conversion")
3672 (description
3673 "This package provides a Python library intended to make color math,
3674 color scales, and color space conversion easy. It has support for:
3675
3676 @enumerate
3677 @item Color scales
3678 @item Color ranges
3679 @item Color blending
3680 @item Brightening/darkening colors
3681 @item Saturating/desaturating colors
3682 @item Conversion to/from multiple color spaces.
3683 @end enumerate\n")
3684 (license license:expat)))
3685
3686 (define-public python2-spectra
3687 (package-with-python2 python-spectra))
3688
3689 (define-public python-numpy-documentation
3690 (package
3691 (name "python-numpy-documentation")
3692 (version (package-version python-numpy))
3693 (source (package-source python-numpy))
3694 (build-system python-build-system)
3695 (native-inputs
3696 `(("python-matplotlib" ,python-matplotlib)
3697 ("python-numpy" ,python-numpy)
3698 ("pkg-config" ,pkg-config)
3699 ("python-sphinx" ,python-sphinx)
3700 ("python-numpydoc" ,python-numpydoc)
3701 ("texlive" ,(texlive-union (list texlive-fonts-cm-super
3702 texlive-fonts-ec
3703 texlive-generic-ifxetex
3704 texlive-generic-pdftex
3705 texlive-amsfonts
3706 texlive-latex-capt-of
3707 texlive-latex-cmap
3708 texlive-latex-environ
3709 texlive-latex-eqparbox
3710 texlive-latex-etoolbox
3711 texlive-latex-expdlist
3712 texlive-latex-fancyhdr
3713 texlive-latex-fancyvrb
3714 texlive-latex-fncychap
3715 texlive-latex-float
3716 texlive-latex-framed
3717 texlive-latex-geometry
3718 texlive-latex-graphics
3719 texlive-latex-hyperref
3720 texlive-latex-mdwtools
3721 texlive-latex-multirow
3722 texlive-latex-needspace
3723 texlive-latex-oberdiek
3724 texlive-latex-parskip
3725 texlive-latex-preview
3726 texlive-latex-tabulary
3727 texlive-latex-threeparttable
3728 texlive-latex-titlesec
3729 texlive-latex-trimspaces
3730 texlive-latex-ucs
3731 texlive-latex-upquote
3732 texlive-latex-url
3733 texlive-latex-varwidth
3734 texlive-latex-wrapfig)))
3735 ("texinfo" ,texinfo)
3736 ("perl" ,perl)
3737 ("scipy-sphinx-theme"
3738 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3739 (method git-fetch)
3740 (uri (git-reference
3741 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3742 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3743 (sha256
3744 (base32
3745 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3746 ,@(package-native-inputs python-numpy)))
3747 (arguments
3748 `(#:tests? #f ; we're only generating the documentation
3749 #:phases
3750 (modify-phases %standard-phases
3751 (delete 'build)
3752 (replace 'install
3753 (lambda* (#:key inputs outputs #:allow-other-keys)
3754 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3755 (doc (string-append
3756 data "/doc/" ,name "-"
3757 ,(package-version python-numpy)))
3758 (info-reader (string-append data "/info"))
3759 (html (string-append doc "/html"))
3760 (scipy-sphinx-theme "scipy-sphinx-theme")
3761 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3762 (pyver ,(string-append "PYVER=")))
3763
3764 ;; FIXME: this is needed to for texlive-union to generate
3765 ;; fonts, which are not found.
3766 (setenv "HOME" "/tmp")
3767
3768 (with-directory-excursion "doc"
3769 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3770 (mkdir-p html)
3771 (invoke "make" "html" pyver)
3772 (invoke "make" "latex" "PAPER=a4" pyver)
3773 (invoke "make" "-C" "build/latex"
3774 "all-pdf" "PAPER=a4" pyver)
3775 ;; FIXME: Generation of the info file fails.
3776 ;; (invoke "make" "info" pyver)
3777 ;; (mkdir-p info)
3778 ;; (copy-file "build/texinfo/numpy.info"
3779 ;; (string-append info "/numpy.info"))
3780 (for-each (lambda (file)
3781 (copy-file (string-append "build/latex" file)
3782 (string-append doc file)))
3783 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3784 (with-directory-excursion "build/html"
3785 (for-each (lambda (file)
3786 (let* ((dir (dirname file))
3787 (tgt-dir (string-append html "/" dir)))
3788 (unless (equal? "." dir)
3789 (mkdir-p tgt-dir))
3790 (install-file file html)))
3791 (find-files "." ".*")))))
3792 #t)))))
3793 (home-page (package-home-page python-numpy))
3794 (synopsis "Documentation for the python-numpy package")
3795 (description (package-description python-numpy))
3796 (license (package-license python-numpy))))
3797
3798 (define-public python2-numpy-documentation
3799 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3800 (package
3801 (inherit numpy-documentation)
3802 (native-inputs `(("python2-functools32" ,python2-functools32)
3803 ,@(package-native-inputs numpy-documentation))))))
3804
3805 (define-public python-pygit2
3806 (package
3807 (name "python-pygit2")
3808 (version "1.1.0")
3809 (source
3810 (origin
3811 (method url-fetch)
3812 (uri (pypi-uri "pygit2" version))
3813 (sha256
3814 (base32 "1hs0pqqzn1yjxqk86nq7p0lvsklwnlyi5xwyzr7d5nrs19dmsjbg"))))
3815 (build-system python-build-system)
3816 (arguments
3817 '(#:tests? #f)) ; tests don't run correctly in our environment
3818 (propagated-inputs
3819 `(("python-cached-property" ,python-cached-property)
3820 ("python-cffi" ,python-cffi)
3821 ("libgit2" ,libgit2)))
3822 (native-inputs
3823 `(("python-pytest" ,python-pytest)))
3824 (home-page "https://github.com/libgit2/pygit2")
3825 (synopsis "Python bindings for libgit2")
3826 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3827 library, libgit2 implements Git plumbing.")
3828 ;; GPL2.0 only, with linking exception.
3829 (license license:gpl2)))
3830
3831 (define-public python-pyparsing
3832 (package
3833 (name "python-pyparsing")
3834 (version "2.4.6")
3835 (source
3836 (origin
3837 (method url-fetch)
3838 (uri (pypi-uri "pyparsing" version))
3839 (sha256
3840 (base32 "17wn5zlijc9m9zj26gy3f541y7smpj8rfhl51d025c2gm210b0sc"))))
3841 (build-system python-build-system)
3842 (outputs '("out" "doc"))
3843 (arguments
3844 `(#:tests? #f ; no test target
3845 #:phases
3846 (modify-phases %standard-phases
3847 (add-after 'install 'install-doc
3848 (lambda* (#:key outputs #:allow-other-keys)
3849 (let* ((doc (string-append (assoc-ref outputs "doc")
3850 "/share/doc/" ,name "-" ,version))
3851 (html-doc (string-append doc "/html"))
3852 (examples (string-append doc "/examples")))
3853 (mkdir-p html-doc)
3854 (mkdir-p examples)
3855 (for-each
3856 (lambda (dir tgt)
3857 (map (lambda (file)
3858 (install-file file tgt))
3859 (find-files dir ".*")))
3860 (list "docs" "htmldoc" "examples")
3861 (list doc html-doc examples))
3862 #t))))))
3863 (home-page "https://github.com/pyparsing/pyparsing")
3864 (synopsis "Python parsing class library")
3865 (description
3866 "The pyparsing module is an alternative approach to creating and
3867 executing simple grammars, vs. the traditional lex/yacc approach, or the use
3868 of regular expressions. The pyparsing module provides a library of classes
3869 that client code uses to construct the grammar directly in Python code.")
3870 (license license:expat)))
3871
3872 (define-public python2-pyparsing
3873 (package-with-python2 python-pyparsing))
3874
3875 (define-public python-numpydoc
3876 (package
3877 (name "python-numpydoc")
3878 (version "0.8.0")
3879 (source
3880 (origin
3881 (method url-fetch)
3882 (uri (pypi-uri "numpydoc" version))
3883 (sha256
3884 (base32
3885 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
3886 (build-system python-build-system)
3887 (propagated-inputs
3888 `(("python-sphinx" ,python-sphinx)))
3889 (native-inputs
3890 `(("python-nose" ,python-nose)))
3891 (home-page "https://pypi.org/project/numpydoc/")
3892 (synopsis
3893 "Numpy's Sphinx extensions")
3894 (description
3895 "Sphinx extension to support docstrings in Numpy format.")
3896 (license license:bsd-2)))
3897
3898 (define-public python2-numpydoc
3899 (package-with-python2 python-numpydoc))
3900
3901 (define-public python-numexpr
3902 (package
3903 (name "python-numexpr")
3904 (version "2.6.5")
3905 (source
3906 (origin
3907 (method url-fetch)
3908 (uri (pypi-uri "numexpr" version))
3909 (sha256
3910 (base32
3911 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3912 (build-system python-build-system)
3913 (arguments `(#:tests? #f)) ; no tests included
3914 (propagated-inputs
3915 `(("python-numpy" ,python-numpy)))
3916 (home-page "https://github.com/pydata/numexpr")
3917 (synopsis "Fast numerical expression evaluator for NumPy")
3918 (description
3919 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3920 expressions that operate on arrays are accelerated and use less memory than
3921 doing the same calculation in Python. In addition, its multi-threaded
3922 capabilities can make use of all your cores, which may accelerate
3923 computations, most specially if they are not memory-bounded (e.g. those using
3924 transcendental functions).")
3925 (license license:expat)))
3926
3927 (define-public python2-numexpr
3928 (package-with-python2 python-numexpr))
3929
3930 (define-public python-cycler
3931 (package
3932 (name "python-cycler")
3933 (version "0.10.0")
3934 (source (origin
3935 (method url-fetch)
3936 (uri (pypi-uri "cycler" version))
3937 (sha256
3938 (base32
3939 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3940 (build-system python-build-system)
3941 (arguments
3942 ;; XXX: The current version requires 'coveralls' which we don't have.
3943 ;; Enable this for the next release which uses 'python-pytest'.
3944 '(#:tests? #f))
3945 (propagated-inputs
3946 `(("python-six" ,python-six)))
3947 (home-page "http://matplotlib.org/cycler/")
3948 (synopsis "Composable keyword argument iterator")
3949 (description
3950 "When using @code{matplotlib} and plotting more than one line, it is
3951 common to want to be able to want to be able to cycle over one or more artist
3952 styles; but the plotting logic can quickly become involved.
3953 To address this and enable easy cycling over arbitrary @code{kwargs}, the
3954 @code{Cycler} class was developed.")
3955 (license license:bsd-3)))
3956
3957 (define-public python2-cycler
3958 (package-with-python2 python-cycler))
3959
3960 (define-public python-colorspacious
3961 (package
3962 (name "python-colorspacious")
3963 (version "1.1.2")
3964 (source
3965 (origin
3966 (method git-fetch)
3967 (uri (git-reference
3968 (url "https://github.com/njsmith/colorspacious.git")
3969 (commit (string-append "v" version))))
3970 (file-name (git-file-name name version))
3971 (sha256
3972 (base32 "0x7nkphr6g5ql5fvgss8l56rgiyjgh6fm8zzs73i94ci9wzlm63w"))))
3973 (build-system python-build-system)
3974 (propagated-inputs
3975 `(("python-numpy" ,python-numpy)))
3976 (native-inputs
3977 `(("python-nose" ,python-nose)))
3978 (arguments
3979 `(#:phases
3980 (modify-phases %standard-phases
3981 (replace 'check
3982 (lambda _
3983 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
3984 (home-page "https://github.com/njsmith/colorspacious")
3985 (synopsis "Python library for colorspace conversions")
3986 (description "@code{colorspacious} is a Python library that lets you
3987 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3988 (license license:expat)))
3989
3990 (define-public python2-colorspacious
3991 (package-with-python2 python-colorspacious))
3992
3993 (define-public python-matplotlib
3994 (package
3995 (name "python-matplotlib")
3996 (version "3.1.2")
3997 (source
3998 (origin
3999 (method url-fetch)
4000 (uri (pypi-uri "matplotlib" version))
4001 (sha256
4002 (base32
4003 "1nmshfqh7wyg15i16hx1yiylcvzkws29ivn66n3i0wyqwcpjr3lf"))))
4004 (build-system python-build-system)
4005 (propagated-inputs ; the following packages are all needed at run time
4006 `(("python-cycler" ,python-cycler)
4007 ("python-kiwisolver" ,python-kiwisolver)
4008 ("python-pyparsing" ,python-pyparsing)
4009 ("python-pygobject" ,python-pygobject)
4010 ("gobject-introspection" ,gobject-introspection)
4011 ("python-tkinter" ,python "tk")
4012 ("python-dateutil" ,python-dateutil)
4013 ("python-numpy" ,python-numpy)
4014 ("python-pillow" ,python-pillow)
4015 ("python-pytz" ,python-pytz)
4016 ("python-six" ,python-six)
4017 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
4018 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
4019 ;; object. For this reason we need to import both libraries.
4020 ;; https://cairocffi.readthedocs.io/en/stable/cffi_api.html#converting-pycairo-wrappers-to-cairocffi
4021 ("python-pycairo" ,python-pycairo)
4022 ("python-cairocffi" ,python-cairocffi)))
4023 (inputs
4024 `(("libpng" ,libpng)
4025 ("imagemagick" ,imagemagick)
4026 ("freetype" ,freetype)
4027 ("cairo" ,cairo)
4028 ("glib" ,glib)
4029 ;; FIXME: Add backends when available.
4030 ;("python-wxpython" ,python-wxpython)
4031 ("tcl" ,tcl)
4032 ("tk" ,tk)))
4033 (native-inputs
4034 `(("pkg-config" ,pkg-config)
4035 ("python-pytest" ,python-pytest)
4036 ("python-mock" ,python-mock)
4037 ("unzip" ,unzip)
4038 ("jquery-ui"
4039 ,(origin
4040 (method url-fetch)
4041 (uri "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip")
4042 (sha256
4043 (base32
4044 "0kb21xf38diqgxcdi1z3s9ssq36pldvyqxy56hn6pcva6rs3c8zq"))))))
4045 (arguments
4046 `(#:phases
4047 (modify-phases %standard-phases
4048 ;; XXX We disable all image comparison tests because we're using a
4049 ;; newer version of FreeType than matplotlib expects. This leads to
4050 ;; minor differences throughout the tests.
4051 (add-after 'unpack 'fix-and-disable-failing-tests
4052 (lambda _
4053 (substitute* (append (find-files "lib/matplotlib/tests/"
4054 "test_.*\\.py$")
4055 (find-files "lib/mpl_toolkits/tests"
4056 "test_.*\\.py$"))
4057 (("^from matplotlib" match)
4058 (string-append "import pytest\n" match))
4059 (("( *)@image_comparison" match indent)
4060 (string-append indent
4061 "@pytest.mark.skip(reason=\"unknown minor image differences\")\n"
4062 match)))
4063 (substitute* "lib/matplotlib/tests/test_animation.py"
4064 (("/bin/sh") (which "sh")))
4065 (for-each delete-file
4066 ;; test_normal_axes, test_get_tightbbox_polar
4067 '("lib/matplotlib/tests/test_axes.py"
4068 ;; We don't use the webagg backend and this test forces it.
4069 "lib/matplotlib/tests/test_backend_webagg.py"
4070 ;; test_outward_ticks
4071 "lib/matplotlib/tests/test_tightlayout.py"
4072 ;; test_hidden_axes fails with minor extent
4073 ;; differences, possibly due to the use of a
4074 ;; different version of FreeType.
4075 "lib/matplotlib/tests/test_constrainedlayout.py"
4076 ;; Fontconfig returns no fonts.
4077 "lib/matplotlib/tests/test_font_manager.py"))
4078 #t))
4079 (add-before 'install 'install-jquery-ui
4080 (lambda* (#:key outputs inputs #:allow-other-keys)
4081 (let ((dir (string-append (assoc-ref outputs "out")
4082 "/lib/python3.7/site-packages/matplotlib/backends/web_backend/")))
4083 (mkdir-p dir)
4084 (invoke "unzip"
4085 (assoc-ref inputs "jquery-ui")
4086 "-d" dir))
4087 #t))
4088 (replace 'check
4089 (lambda* (#:key outputs inputs #:allow-other-keys)
4090 (add-installed-pythonpath inputs outputs)
4091 (invoke "python" "tests.py" "-v"
4092 "-m" "not network and not webagg")))
4093 (add-before 'build 'configure-environment
4094 (lambda* (#:key outputs inputs #:allow-other-keys)
4095 (let ((cairo (assoc-ref inputs "cairo")))
4096 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
4097 ;; has not effect.
4098 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
4099 (setenv "HOME" (getcwd))
4100 (call-with-output-file "setup.cfg"
4101 (lambda (port)
4102 (format port "[directories]~%
4103 basedirlist = ~a,~a~%
4104 [packages]~%
4105 tests = True~%"
4106 (assoc-ref inputs "tcl")
4107 (assoc-ref inputs "tk")))))
4108 #t)))))
4109 (home-page "https://matplotlib.org/")
4110 (synopsis "2D plotting library for Python")
4111 (description
4112 "Matplotlib is a Python 2D plotting library which produces publication
4113 quality figures in a variety of hardcopy formats and interactive environments
4114 across platforms. Matplotlib can be used in Python scripts, the python and
4115 ipython shell, web application servers, and six graphical user interface
4116 toolkits.")
4117 (license license:psfl)
4118 (properties `((python2-variant . ,(delay python2-matplotlib))))))
4119
4120 (define-public python2-matplotlib
4121 (let ((matplotlib (package-with-python2
4122 (strip-python2-variant python-matplotlib))))
4123 (package (inherit matplotlib)
4124 (version "2.2.4")
4125 (source
4126 (origin
4127 (method url-fetch)
4128 (uri (pypi-uri "matplotlib" version))
4129 (sha256
4130 (base32
4131 "09i1gnrra1590brc1f8d5rh2zvnknmfgzp613ab0462qkrwj15h2"))))
4132 (arguments
4133 (substitute-keyword-arguments (package-arguments matplotlib)
4134 ((#:phases phases)
4135 `(modify-phases ,phases
4136 (replace 'install-jquery-ui
4137 (lambda* (#:key outputs inputs #:allow-other-keys)
4138 (let ((dir (string-append (assoc-ref outputs "out")
4139 "/lib/python2.7/site-packages/"
4140 "matplotlib/backends/web_backend/")))
4141 (mkdir-p dir)
4142 (invoke "unzip"
4143 (assoc-ref inputs "jquery-ui")
4144 "-d" dir))
4145 #t))
4146 (delete 'fix-and-disable-failing-tests)
4147 (delete 'check))))) ; These tests weren't run the the past.
4148 ;; Make sure to use special packages for Python 2 instead
4149 ;; of those automatically rewritten by package-with-python2.
4150 (propagated-inputs
4151 `(("python2-pycairo" ,python2-pycairo)
4152 ("python2-backports-functools-lru-cache"
4153 ,python2-backports-functools-lru-cache)
4154 ("python2-functools32" ,python2-functools32)
4155 ("python2-pygobject-2" ,python2-pygobject-2)
4156 ("python2-subprocess32" ,python2-subprocess32)
4157 ("python2-tkinter" ,python-2 "tk")
4158 ,@(fold alist-delete (package-propagated-inputs matplotlib)
4159 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
4160
4161 (define-public python-matplotlib-documentation
4162 (package
4163 (name "python-matplotlib-documentation")
4164 (version (package-version python-matplotlib))
4165 (source (package-source python-matplotlib))
4166 (build-system python-build-system)
4167 (native-inputs
4168 `(("python-matplotlib" ,python-matplotlib)
4169 ("python-colorspacious" ,python-colorspacious)
4170 ("python-sphinx" ,python-sphinx)
4171 ("python-sphinx-copybutton" ,python-sphinx-copybutton)
4172 ("python-sphinx-gallery" ,python-sphinx-gallery)
4173 ("python-numpydoc" ,python-numpydoc)
4174 ("python-ipython" ,python-ipython)
4175 ("python-ipykernel" ,python-ipykernel)
4176 ("python-mock" ,python-mock)
4177 ("graphviz" ,graphviz)
4178 ("texlive" ,(texlive-union (list texlive-amsfonts
4179 texlive-latex-amsmath
4180 texlive-latex-enumitem
4181 texlive-latex-expdlist
4182 texlive-latex-geometry
4183 texlive-latex-preview
4184 texlive-latex-type1cm
4185 texlive-latex-ucs
4186
4187 texlive-generic-pdftex
4188
4189 texlive-fonts-ec
4190 texlive-fonts-adobe-times
4191 texlive-fonts-txfonts)))
4192 ("texinfo" ,texinfo)
4193 ,@(package-native-inputs python-matplotlib)))
4194 (arguments
4195 `(#:tests? #f ; we're only generating documentation
4196 #:phases
4197 (modify-phases %standard-phases
4198 ;; The tests in python-matplotlib are run after the install phase, so
4199 ;; we need to delete the extra phase here.
4200 (delete 'check)
4201 (replace 'build
4202 (lambda _
4203 (chdir "doc")
4204 (setenv "PYTHONPATH"
4205 (string-append (getenv "PYTHONPATH")
4206 ":" (getcwd) "/../examples/units"))
4207 (substitute* "conf.py"
4208 ;; Don't use git.
4209 (("^SHA = check_output.*")
4210 (string-append "SHA = \"" ,version "\"\n"))
4211 ;; Don't fetch intersphinx files from the Internet
4212 (("^explicit_order_folders" m)
4213 (string-append "intersphinx_mapping = {}\n" m))
4214 (("'sphinx.ext.intersphinx',") "")
4215 ;; Disable URL embedding which requires internet access.
4216 (("'https://docs.scipy.org/doc/numpy'") "None")
4217 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
4218 (invoke "make"
4219 "SPHINXBUILD=sphinx-build"
4220 "SPHINXOPTS=" ; don't abort on warnings
4221 "html" "texinfo")))
4222 (replace 'install
4223 (lambda* (#:key inputs outputs #:allow-other-keys)
4224 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4225 (doc (string-append data "/doc/python-matplotlib-" ,version))
4226 (info (string-append data "/info"))
4227 (html (string-append doc "/html")))
4228 (mkdir-p html)
4229 (mkdir-p info)
4230 (copy-recursively "build/html" html)
4231 (symlink (string-append html "/_images")
4232 (string-append info "/matplotlib-figures"))
4233 (with-directory-excursion "build/texinfo"
4234 (substitute* "matplotlib.texi"
4235 (("@image\\{([^,]*)" all file)
4236 (string-append "@image{matplotlib-figures/" file)))
4237 (symlink (string-append html "/_images")
4238 "./matplotlib-figures")
4239 (invoke "makeinfo" "--no-split"
4240 "-o" "matplotlib.info" "matplotlib.texi"))
4241 (install-file "build/texinfo/matplotlib.info" info))
4242 #t)))))
4243 (home-page (package-home-page python-matplotlib))
4244 (synopsis "Documentation for the python-matplotlib package")
4245 (description (package-description python-matplotlib))
4246 (license (package-license python-matplotlib))))
4247
4248 (define-public python2-matplotlib-documentation
4249 (let ((parent (package-with-python2 python-matplotlib-documentation)))
4250 (package
4251 (inherit parent)
4252 (native-inputs
4253 (alist-delete "python-sphinx-copybutton"
4254 (package-native-inputs parent))))))
4255
4256 (define-public python-matplotlib-venn
4257 (package
4258 (name "python-matplotlib-venn")
4259 (version "0.11.5")
4260 (source
4261 (origin
4262 (method url-fetch)
4263 (uri (pypi-uri "matplotlib-venn" version ".zip"))
4264 (sha256
4265 (base32
4266 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
4267 (build-system python-build-system)
4268 (arguments '(#:tests? #f)) ; tests are not included
4269 (propagated-inputs
4270 `(("python-matplotlib" ,python-matplotlib)
4271 ("python-numpy" ,python-numpy)
4272 ("python-scipy" ,python-scipy)))
4273 (native-inputs
4274 `(("unzip" ,unzip)))
4275 (home-page "https://github.com/konstantint/matplotlib-venn")
4276 (synopsis "Plot area-proportional Venn diagrams")
4277 (description
4278 "This package provides tools for plotting area-proportional two- and
4279 three-way Venn diagrams in @code{matplotlib}.")
4280 (license license:expat)))
4281
4282 (define-public python2-pysnptools
4283 (package
4284 (name "python2-pysnptools")
4285 (version "0.3.13")
4286 (source
4287 (origin
4288 (method url-fetch)
4289 (uri (pypi-uri "pysnptools" version))
4290 (sha256
4291 (base32
4292 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
4293 (build-system python-build-system)
4294 (arguments
4295 `(#:python ,python-2 ; only Python 2.7 is supported
4296 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
4297 (propagated-inputs
4298 `(("python2-numpy" ,python2-numpy)
4299 ("python2-scipy" ,python2-scipy)
4300 ("python2-pandas" ,python2-pandas)))
4301 (native-inputs
4302 `(("python2-cython" ,python2-cython)))
4303 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
4304 (synopsis "Library for reading and manipulating genetic data")
4305 (description
4306 "PySnpTools is a library for reading and manipulating genetic data. It
4307 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4308 those files. It can also efficiently manipulate ranges of integers using set
4309 operators such as union, intersection, and difference.")
4310 (license license:asl2.0)))
4311
4312 (define-public python-socksipy-branch
4313 (package
4314 (name "python-socksipy-branch")
4315 (version "1.01")
4316 (source
4317 (origin
4318 (method url-fetch)
4319 (uri (pypi-uri "SocksiPy-branch" version))
4320 (sha256
4321 (base32
4322 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4323 (build-system python-build-system)
4324 (arguments
4325 `(#:tests? #f)) ; There are no tests
4326 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4327 (synopsis "Python SOCKS module")
4328 (description
4329 "SocksiPy - A Python SOCKS client module. It provides a
4330 socket-like interface that supports connections to any TCP
4331 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4332 The original version was developed by Dan Haim, this is a
4333 branch created by Mario Vilas to address some open issues,
4334 as the original project seems to have been abandoned circa 2007.")
4335 (license license:bsd-3)))
4336
4337 (define-public python2-socksipy-branch
4338 (package-with-python2 python-socksipy-branch))
4339
4340 (define-public python-socksipychain
4341 (package
4342 (name "python-socksipychain")
4343 (version "2.1.0")
4344 (source
4345 (origin
4346 (method git-fetch)
4347 (uri (git-reference
4348 (url "https://github.com/pagekite/PySocksipyChain.git")
4349 (commit (string-append "v" version))))
4350 (file-name (git-file-name name version))
4351 (sha256
4352 (base32
4353 "0idm9a050rd2kbgbz2sk9ib9589kj4xh1xdnggs6xbq2v2y8f6zn"))))
4354 (build-system python-build-system)
4355 (arguments
4356 `(#:tests? #f)) ; Tests try to access the network.
4357 (home-page "http://pagekite.net/wiki/Floss/PySocksipyChain/")
4358 (synopsis "Python SOCKS module with chained proxies support")
4359 (description
4360 "SocksiPyChain is a modified version of the SocksiPy SOCKS module, which
4361 adds support for arbitrary chaining of proxy servers and various modes of
4362 TLS/SSL encryption. It was developed for use in PageKite, and also includes
4363 a simple netcat replacement with chaining support.")
4364 (license license:bsd-3)))
4365
4366 (define-public python-pycodestyle
4367 (package
4368 (name "python-pycodestyle")
4369 (version "2.5.0")
4370 (source
4371 (origin
4372 (method url-fetch)
4373 (uri (pypi-uri "pycodestyle" version))
4374 (sha256
4375 (base32
4376 "0v4prb05n21bm8650v0a01k1nyqjdmkrsm3zycfxh2j5k9n962p4"))))
4377 (build-system python-build-system)
4378 (home-page "https://pycodestyle.readthedocs.io/")
4379 (synopsis "Python style guide checker")
4380 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4381 Python code against some of the style conventions in
4382 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4383 (license license:expat)))
4384
4385 (define-public python2-pycodestyle
4386 (package-with-python2 python-pycodestyle))
4387
4388 (define-public python-multidict
4389 (package
4390 (name "python-multidict")
4391 (version "4.2.0")
4392 (source
4393 (origin
4394 (method url-fetch)
4395 (uri (pypi-uri "multidict" version))
4396 (sha256
4397 (base32
4398 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
4399 (build-system python-build-system)
4400 (native-inputs
4401 `(("python-pytest" ,python-pytest)
4402 ("python-pytest-runner" ,python-pytest-runner)))
4403 (home-page "https://github.com/aio-libs/multidict/")
4404 (synopsis "Multidict implementation")
4405 (description "Multidict is dict-like collection of key-value pairs
4406 where key might be occurred more than once in the container.")
4407 (license license:asl2.0)))
4408
4409 (define-public python-orderedmultidict
4410 (package
4411 (name "python-orderedmultidict")
4412 (version "0.7.11")
4413 (source
4414 (origin
4415 (method url-fetch)
4416 (uri (pypi-uri "orderedmultidict" version))
4417 (sha256
4418 (base32
4419 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4420 (build-system python-build-system)
4421 (arguments
4422 `(#:phases
4423 (modify-phases %standard-phases
4424 (add-after 'unpack 'fix-tests
4425 (lambda _
4426 ;; The package uses nosetest for running the tests.
4427 ;; Adding this initfile allows to run the test suite
4428 ;; without requiring nosetest.
4429 (with-output-to-file "tests/__init__.py" newline)
4430 #t)))))
4431 (propagated-inputs
4432 `(("python-six" ,python-six)))
4433 (native-inputs
4434 `(("python-pycodestyle" ,python-pycodestyle)))
4435 (home-page "https://github.com/gruns/orderedmultidict")
4436 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4437 (description "This package contains a library for ordered multivalue
4438 dictionaries. A multivalue dictionary is a dictionary that can store
4439 multiple values for the same key. An ordered multivalue dictionary is a
4440 multivalue dictionary that retains the order of insertions and deletions.")
4441 (license license:unlicense)))
4442
4443 (define-public python2-orderedmultidict
4444 (package-with-python2 python-orderedmultidict))
4445
4446 (define-public python-autopep8
4447 (package
4448 (name "python-autopep8")
4449 (version "1.3.5")
4450 (source
4451 (origin
4452 (method url-fetch)
4453 (uri (pypi-uri "autopep8" version))
4454 (sha256
4455 (base32
4456 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
4457 (build-system python-build-system)
4458 (propagated-inputs
4459 `(("python-pycodestyle" ,python-pycodestyle)))
4460 (home-page "https://github.com/hhatto/autopep8")
4461 (synopsis "Format Python code according to the PEP 8 style guide")
4462 (description
4463 "@code{autopep8} automatically formats Python code to conform to
4464 the PEP 8 style guide. It uses the pycodestyle utility to determine
4465 what parts of the code needs to be formatted. @code{autopep8} is
4466 capable of fixing most of the formatting issues that can be reported
4467 by pycodestyle.")
4468 (license (license:non-copyleft
4469 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4470
4471 (define-public python2-autopep8
4472 (package-with-python2 python-autopep8))
4473
4474 (define-public python-distlib
4475 (package
4476 (name "python-distlib")
4477 (version "0.3.0")
4478 (source
4479 (origin
4480 (method url-fetch)
4481 (uri (pypi-uri "distlib" version ".zip"))
4482 (sha256
4483 (base32
4484 "08fyi2r246733vharl2yckw20rilci28r91mzrnnvcr638inw5if"))))
4485 (build-system python-build-system)
4486 (arguments
4487 `(#:phases
4488 (modify-phases %standard-phases
4489 (add-before 'build 'no-/bin/sh
4490 (lambda _
4491 (substitute* '("distlib/scripts.py" "tests/test_scripts.py")
4492 (("/bin/sh") (which "sh")))
4493 #t))
4494 (add-before 'check 'prepare-test-env
4495 (lambda _
4496 (setenv "HOME" "/tmp")
4497 ;; NOTE: Any value works, the variable just has to be present.
4498 (setenv "SKIP_ONLINE" "1")
4499 #t)))))
4500 (native-inputs `(("unzip" ,unzip)))
4501 (home-page "https://bitbucket.org/pypa/distlib")
4502 (synopsis "Distribution utilities")
4503 (description "Distlib is a library which implements low-level functions that
4504 relate to packaging and distribution of Python software. It is intended to be
4505 used as the basis for third-party packaging tools.")
4506 (license license:psfl)))
4507
4508 (define-public python-distutils-extra
4509 (package
4510 (name "python-distutils-extra")
4511 (version "2.38")
4512 (source
4513 (origin
4514 (method url-fetch)
4515 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4516 version "/+download/python-distutils-extra-"
4517 version ".tar.gz"))
4518 (sha256
4519 (base32
4520 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4521 (build-system python-build-system)
4522 (home-page "https://launchpad.net/python-distutils-extra/")
4523 (synopsis "Enhancements to Python's distutils")
4524 (description
4525 "The python-distutils-extra module enables you to easily integrate
4526 gettext support, themed icons, and scrollkeeper-based documentation into
4527 Python's distutils.")
4528 (license license:gpl2)))
4529
4530 (define-public python2-distutils-extra
4531 (package-with-python2 python-distutils-extra))
4532
4533 (define-public python2-elib.intl
4534 (package
4535 (name "python2-elib.intl")
4536 (version "0.0.3")
4537 (source
4538 (origin
4539 ;; This project doesn't tag releases or publish tarballs, so we take
4540 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4541 (method git-fetch)
4542 (uri (git-reference
4543 (url "https://github.com/dieterv/elib.intl.git")
4544 (commit "d09997cfef")))
4545 (file-name (string-append name "-" version "-checkout"))
4546 (sha256
4547 (base32
4548 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4549 (build-system python-build-system)
4550 (arguments
4551 ;; incompatible with Python 3 (exception syntax)
4552 `(#:python ,python-2
4553 #:tests? #f))
4554 (home-page "https://github.com/dieterv/elib.intl")
4555 (synopsis "Enhanced internationalization for Python")
4556 (description
4557 "The elib.intl module provides enhanced internationalization (I18N)
4558 services for your Python modules and applications.")
4559 (license license:lgpl3+)))
4560
4561 (define-public python-olefile
4562 (package
4563 (name "python-olefile")
4564 (version "0.46")
4565 (source
4566 (origin
4567 (method url-fetch)
4568 (uri (string-append "https://github.com/decalage2/olefile/releases/"
4569 "download/v" version "/olefile-" version ".tar.gz"))
4570 (file-name (string-append name "-" version ".tar.gz"))
4571 (sha256
4572 (base32
4573 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
4574 (build-system python-build-system)
4575 (home-page "https://www.decalage.info/python/olefileio")
4576 (synopsis "Read and write Microsoft OLE2 files.")
4577 (description
4578 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
4579 Storage or Compound Document, Microsoft Office). It is an improved version of
4580 the OleFileIO module from PIL, the Python Image Library.")
4581 (license license:bsd-3)))
4582
4583 (define-public python2-olefile
4584 (package-with-python2 python-olefile))
4585
4586 (define-public python-pillow
4587 (package
4588 (name "python-pillow")
4589 (version "6.2.1")
4590 (source
4591 (origin
4592 (method url-fetch)
4593 (uri (pypi-uri "Pillow" version))
4594 (sha256
4595 (base32
4596 "1c8wkzc58f5wdh006jvmwdk3wxld1xgagcbdvj7iv17qi0m9fkmz"))))
4597 (build-system python-build-system)
4598 (native-inputs
4599 `(("python-pytest" ,python-pytest)))
4600 (inputs
4601 `(("freetype" ,freetype)
4602 ("lcms" ,lcms)
4603 ("libjpeg" ,libjpeg-turbo)
4604 ("libtiff" ,libtiff)
4605 ("libwebp" ,libwebp)
4606 ("openjpeg" ,openjpeg)
4607 ("zlib" ,zlib)))
4608 (propagated-inputs
4609 `(("python-olefile" ,python-olefile)))
4610 (arguments
4611 `(#:phases
4612 (modify-phases %standard-phases
4613 (add-after 'unpack 'patch-ldconfig
4614 (lambda _
4615 (substitute* "setup.py"
4616 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
4617 (replace 'check
4618 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
4619 (if tests?
4620 (begin
4621 (setenv "HOME" (getcwd))
4622 ;; Make installed package available for running the tests.
4623 (add-installed-pythonpath inputs outputs)
4624 (invoke "python" "selftest.py" "--installed")
4625 (invoke "python" "-m" "pytest" "-vv"))
4626 #t))))))
4627 (home-page "https://python-pillow.org")
4628 (synopsis "Fork of the Python Imaging Library")
4629 (description
4630 "The Python Imaging Library adds image processing capabilities to your
4631 Python interpreter. This library provides extensive file format support, an
4632 efficient internal representation, and fairly powerful image processing
4633 capabilities. The core image library is designed for fast access to data
4634 stored in a few basic pixel formats. It should provide a solid foundation for
4635 a general image processing tool.")
4636 (license (license:x11-style
4637 "http://www.pythonware.com/products/pil/license.htm"
4638 "The PIL Software License"))))
4639
4640 (define-public python2-pillow
4641 (package-with-python2 python-pillow))
4642
4643 (define-public python-pycparser
4644 (package
4645 (name "python-pycparser")
4646 (version "2.19")
4647 (source
4648 (origin
4649 (method url-fetch)
4650 (uri (pypi-uri "pycparser" version))
4651 (sha256
4652 (base32
4653 "1cr5dcj9628lkz1qlwq3fv97c25363qppkmcayqvd05dpy573259"))))
4654 (outputs '("out" "doc"))
4655 (build-system python-build-system)
4656 (native-inputs
4657 `(("pkg-config" ,pkg-config)))
4658 (arguments
4659 `(#:phases
4660 (modify-phases %standard-phases
4661 (replace 'check
4662 (lambda _
4663 (with-directory-excursion "tests"
4664 (invoke "python" "all_tests.py"))
4665 #t))
4666 (add-after 'install 'install-doc
4667 (lambda* (#:key outputs #:allow-other-keys)
4668 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4669 (doc (string-append data "/doc/" ,name "-" ,version))
4670 (examples (string-append doc "/examples")))
4671 (mkdir-p examples)
4672 (for-each (lambda (file)
4673 (copy-file (string-append "." file)
4674 (string-append doc file)))
4675 '("/README.rst" "/CHANGES" "/LICENSE"))
4676 (copy-recursively "examples" examples)
4677 #t))))))
4678 (home-page "https://github.com/eliben/pycparser")
4679 (synopsis "C parser in Python")
4680 (description
4681 "Pycparser is a complete parser of the C language, written in pure Python
4682 using the PLY parsing library. It parses C code into an AST and can serve as
4683 a front-end for C compilers or analysis tools.")
4684 (license license:bsd-3)))
4685
4686 (define-public python2-pycparser
4687 (package-with-python2 python-pycparser))
4688
4689 (define-public python-pywavelets
4690 (package
4691 (name "python-pywavelets")
4692 (version "1.0.1")
4693 (home-page "https://github.com/PyWavelets/pywt")
4694 (source (origin
4695 (method url-fetch)
4696 (uri (pypi-uri "PyWavelets" version))
4697 (sha256
4698 (base32
4699 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
4700 (build-system python-build-system)
4701 (arguments
4702 '(#:modules ((ice-9 ftw)
4703 (srfi srfi-1)
4704 (srfi srfi-26)
4705 (guix build utils)
4706 (guix build python-build-system))
4707 #:phases (modify-phases %standard-phases
4708 (replace 'check
4709 (lambda _
4710 (let ((cwd (getcwd))
4711 (libdir (find (cut string-prefix? "lib." <>)
4712 (scandir "build"))))
4713 (with-directory-excursion (string-append cwd "/build/" libdir)
4714 (invoke "nosetests" "-v" "."))))))))
4715 (native-inputs
4716 `(("python-matplotlib" ,python-matplotlib) ;for tests
4717 ("python-nose" ,python-nose)))
4718 (propagated-inputs
4719 `(("python-numpy" ,python-numpy)))
4720 (synopsis "Wavelet transforms in Python")
4721 (description
4722 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
4723 mathematical basis functions that are localized in both time and frequency.
4724 Wavelet transforms are time-frequency transforms employing wavelets. They are
4725 similar to Fourier transforms, the difference being that Fourier transforms are
4726 localized only in frequency instead of in time and frequency.")
4727 (license license:expat)))
4728
4729 (define-public python2-pywavelets
4730 (package-with-python2 python-pywavelets))
4731
4732 (define-public python-xcffib
4733 (package
4734 (name "python-xcffib")
4735 (version "0.6.0")
4736 (source
4737 (origin
4738 (method url-fetch)
4739 (uri (pypi-uri "xcffib" version))
4740 (sha256
4741 (base32
4742 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
4743 (build-system python-build-system)
4744 (inputs
4745 `(("libxcb" ,libxcb)))
4746 (propagated-inputs
4747 `(("python-cffi" ,python-cffi) ; used at run time
4748 ("python-six" ,python-six)))
4749 (arguments
4750 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4751 #:tests? #f
4752 #:phases
4753 (modify-phases %standard-phases
4754 (add-after 'unpack 'fix-libxcb-path
4755 (lambda* (#:key inputs #:allow-other-keys)
4756 (let ((libxcb (assoc-ref inputs "libxcb")))
4757 (substitute* '("xcffib/__init__.py")
4758 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4759 #t)))
4760 (add-after 'install 'install-doc
4761 (lambda* (#:key outputs #:allow-other-keys)
4762 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4763 "/doc/" ,name "-" ,version)))
4764 (mkdir-p doc)
4765 (copy-file "README.md"
4766 (string-append doc "/README.md"))
4767 #t))))))
4768 (home-page "https://github.com/tych0/xcffib")
4769 (synopsis "XCB Python bindings")
4770 (description
4771 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4772 support for Python 3 and PyPy. It is based on cffi.")
4773 (license license:expat)))
4774
4775 (define-public python2-xcffib
4776 (package-with-python2 python-xcffib))
4777
4778 (define-public python-cairocffi
4779 (package
4780 (name "python-cairocffi")
4781 (version "0.9.0")
4782 (source
4783 (origin
4784 (method url-fetch)
4785 (uri (pypi-uri "cairocffi" version))
4786 (sha256
4787 (base32
4788 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
4789 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
4790 (build-system python-build-system)
4791 (outputs '("out" "doc"))
4792 (inputs
4793 `(("glib" ,glib)
4794 ("gtk+" ,gtk+)
4795 ("gdk-pixbuf" ,gdk-pixbuf)
4796 ("cairo" ,cairo)
4797 ("pango" ,pango)))
4798 (native-inputs
4799 `(("pkg-config" ,pkg-config)
4800 ("python-pytest" ,python-pytest)
4801 ("python-pytest-cov" ,python-pytest-cov)
4802 ("python-pytest-runner" ,python-pytest-runner)
4803 ("python-sphinx" ,python-sphinx)
4804 ("python-docutils" ,python-docutils)))
4805 (propagated-inputs
4806 `(("python-xcffib" ,python-xcffib))) ; used at run time
4807 (arguments
4808 `(#:phases
4809 (modify-phases %standard-phases
4810 (add-after 'unpack 'patch-paths
4811 (lambda* (#:key inputs outputs #:allow-other-keys)
4812 (substitute* (find-files "." "\\.py$")
4813 (("dlopen\\(ffi, 'cairo'")
4814 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
4815 "/lib/libcairo.so.2'"))
4816 (("dlopen\\(ffi, 'gdk-3'")
4817 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
4818 "/lib/libgtk-3.so.0'"))
4819 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
4820 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
4821 "/lib/libgdk_pixbuf-2.0.so.0'"))
4822 (("dlopen\\(ffi, 'glib-2.0'")
4823 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4824 "/lib/libglib-2.0.so.0'"))
4825 (("dlopen\\(ffi, 'gobject-2.0'")
4826 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4827 "/lib/libgobject-2.0.so.0'"))
4828 (("dlopen\\(ffi, 'pangocairo-1.0'")
4829 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4830 "/lib/libpangocairo-1.0.so.0'"))
4831 (("dlopen\\(ffi, 'pango-1.0'")
4832 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4833 "/lib/libpango-1.0.so.0'")))
4834 #t))
4835 (add-after 'install 'install-doc
4836 (lambda* (#:key inputs outputs #:allow-other-keys)
4837 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4838 (doc (string-append data "/doc/" ,name "-" ,version))
4839 (html (string-append doc "/html")))
4840 (setenv "LD_LIBRARY_PATH"
4841 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4842 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4843 (setenv "LANG" "en_US.UTF-8")
4844 (mkdir-p html)
4845 (for-each (lambda (file)
4846 (copy-file (string-append "." file)
4847 (string-append doc file)))
4848 '("/README.rst" "/CHANGES" "/LICENSE"))
4849 (system* "python" "setup.py" "build_sphinx")
4850 (copy-recursively "docs/_build/html" html)
4851 #t))))))
4852 (home-page "https://github.com/Kozea/cairocffi")
4853 (synopsis "Python bindings and object-oriented API for Cairo")
4854 (description
4855 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4856 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4857 graphics library with support for multiple backends including image buffers,
4858 PNG, PostScript, PDF, and SVG file output.")
4859 (license license:bsd-3)))
4860
4861 (define-public python2-cairocffi
4862 (package-with-python2 python-cairocffi))
4863
4864 (define-public python-decorator
4865 (package
4866 (name "python-decorator")
4867 (version "4.3.0")
4868 (source
4869 (origin
4870 (method url-fetch)
4871 (uri (pypi-uri "decorator" version))
4872 (sha256
4873 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
4874 (build-system python-build-system)
4875 (home-page "https://pypi.org/project/decorator/")
4876 (synopsis "Python module to simplify usage of decorators")
4877 (description
4878 "The aim of the decorator module is to simplify the usage of decorators
4879 for the average programmer, and to popularize decorators usage giving examples
4880 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4881 etc. The core of this module is a decorator factory.")
4882 (license license:expat)))
4883
4884 (define-public python2-decorator
4885 (package-with-python2 python-decorator))
4886
4887 (define-public python-drmaa
4888 (package
4889 (name "python-drmaa")
4890 (version "0.7.7")
4891 (source
4892 (origin
4893 (method url-fetch)
4894 (uri (pypi-uri "drmaa" version))
4895 (sha256
4896 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4897 (build-system python-build-system)
4898 ;; The test suite requires libdrmaa which is provided by the cluster
4899 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4900 ;; should be set to the path of the libdrmaa library.
4901 (arguments '(#:tests? #f))
4902 (native-inputs
4903 `(("python-nose" ,python-nose)))
4904 (home-page "https://pypi.org/project/drmaa/")
4905 (synopsis "Python bindings for the DRMAA library")
4906 (description
4907 "A Python package for Distributed Resource Management (DRM) job
4908 submission and control. This package is an implementation of the DRMAA 1.0
4909 Python language binding specification.")
4910 (license license:bsd-3)))
4911
4912 (define-public python2-drmaa
4913 (package-with-python2 python-drmaa))
4914
4915 (define-public python-grako
4916 (package
4917 (name "python-grako")
4918 (version "3.99.9")
4919 (source
4920 (origin
4921 (method url-fetch)
4922 (uri
4923 (pypi-uri "grako" version ".zip"))
4924 (sha256
4925 (base32
4926 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4927 (build-system python-build-system)
4928 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4929 (native-inputs
4930 `(("unzip" ,unzip)
4931 ("python-pytest" ,python-pytest)
4932 ("python-pytest-runner" ,python-pytest-runner)))
4933 (home-page "https://bitbucket.org/neogeny/grako")
4934 (synopsis "EBNF parser generator")
4935 (description
4936 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4937 memoizing PEG/Packrat parser in Python.")
4938 (license license:bsd-3)))
4939
4940 (define-public python2-grako
4941 (package-with-python2 python-grako))
4942
4943 (define-public python-gridmap
4944 (package
4945 (name "python-gridmap")
4946 (version "0.13.0")
4947 (source
4948 (origin
4949 (method git-fetch)
4950 (uri (git-reference
4951 (url "https://github.com/pygridtools/gridmap.git")
4952 (commit (string-append "v" version))))
4953 (file-name (git-file-name name version))
4954 (sha256
4955 (base32 "1478lbwsr1w24cii2x01m2910fvh8r43ghnb78nc972a96hqiknm"))))
4956 (build-system python-build-system)
4957 (arguments
4958 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4959 (propagated-inputs
4960 `(("python-psutil" ,python-psutil)
4961 ("python-drmaa" ,python-drmaa)
4962 ("python-pyzmq" ,python-pyzmq)))
4963 (home-page "https://github.com/pygridtools/gridmap")
4964 (synopsis "Create jobs on a cluster directly from Python")
4965 (description
4966 "Gridmap is a Python package to allow you to easily create jobs on the
4967 cluster directly from Python. You can directly map Python functions onto the
4968 cluster without needing to write any wrapper code yourself.")
4969 (license license:gpl3+)))
4970
4971 (define-public python2-gridmap
4972 (package-with-python2 python-gridmap))
4973
4974 (define-public python-honcho
4975 (package
4976 (name "python-honcho")
4977 (version "1.0.1")
4978 (source
4979 (origin
4980 (method git-fetch)
4981 (uri (git-reference
4982 (url "https://github.com/nickstenning/honcho.git")
4983 (commit (string-append "v" version))))
4984 (file-name (git-file-name name version))
4985 (sha256
4986 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
4987 (build-system python-build-system)
4988 (native-inputs
4989 `(("python-pytest" ,python-pytest)
4990 ("python-mock" ,python-mock)
4991 ("python-tox" ,python-tox)
4992 ("which" ,which))) ;for tests
4993 (propagated-inputs
4994 `(("python-jinja2" ,python-jinja2)))
4995 (arguments
4996 `(#:phases
4997 (modify-phases %standard-phases
4998 (delete 'check)
4999 (add-after 'install 'check
5000 (lambda* (#:key outputs inputs #:allow-other-keys)
5001 ;; fix honcho path in testsuite
5002 (substitute* "tests/conftest.py"
5003 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
5004 "/bin/honcho" "'")))
5005 ;; It's easier to run tests after install.
5006 ;; Make installed package available for running the tests
5007 (add-installed-pythonpath inputs outputs)
5008 (invoke "py.test" "-v"))))))
5009 (home-page "https://github.com/nickstenning/honcho")
5010 (synopsis "Manage Procfile-based applications")
5011 (description
5012 "A Procfile is a file which describes how to run an application
5013 consisting of several processes. honcho starts all listed processes.
5014 The output of all running processes is collected by honcho and
5015 displayed.")
5016 (license license:expat)))
5017
5018 (define-public python2-honcho
5019 (package-with-python2 python-honcho))
5020
5021 (define-public python-pexpect
5022 (package
5023 (name "python-pexpect")
5024 (version "4.6.0")
5025 (source
5026 (origin
5027 (method url-fetch)
5028 (uri (pypi-uri "pexpect" version))
5029 (sha256
5030 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
5031 (build-system python-build-system)
5032 (arguments
5033 `(#:phases
5034 (modify-phases %standard-phases
5035 (add-before 'check 'prepare-tests
5036 (lambda _
5037 (substitute* (find-files "tests")
5038 (("/bin/ls") (which "ls"))
5039 (("/bin/echo") (which "echo"))
5040 (("/bin/which") (which "which"))
5041 ;; Many tests try to use the /bin directory which
5042 ;; is not present in the build environment.
5043 ;; Use one that's non-empty and unlikely to change.
5044 (("/bin'") "/dev'"))
5045 ;; XXX: Socket connection test gets "Connection reset by peer".
5046 ;; Why does it not work? Delete for now.
5047 (delete-file "tests/test_socket.py")
5048 #t))
5049 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
5050 (native-inputs
5051 `(("python-nose" ,python-nose)
5052 ("python-pytest" ,python-pytest)
5053 ("man-db" ,man-db)
5054 ("which" ,which)
5055 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
5056 (propagated-inputs
5057 `(("python-ptyprocess" ,python-ptyprocess)))
5058 (home-page "http://pexpect.readthedocs.org/")
5059 (synopsis "Controlling interactive console applications")
5060 (description
5061 "Pexpect is a pure Python module for spawning child applications;
5062 controlling them; and responding to expected patterns in their output.
5063 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
5064 child application and control it as if a human were typing commands.")
5065 (license license:isc)))
5066
5067 (define-public python2-pexpect
5068 (package-with-python2 python-pexpect))
5069
5070 (define-public python-setuptools-scm
5071 (package
5072 (name "python-setuptools-scm")
5073 (version "3.4.3")
5074 (source (origin
5075 (method url-fetch)
5076 (uri (pypi-uri "setuptools_scm" version))
5077 (sha256
5078 (base32
5079 "083k93wi7mrmp1cn28hcbnr6sivbgls0y7zz2m5qzn1wg04a3f16"))))
5080 (build-system python-build-system)
5081 (home-page "https://github.com/pypa/setuptools_scm/")
5082 (synopsis "Manage Python package versions in SCM metadata")
5083 (description
5084 "Setuptools_scm handles managing your Python package versions in
5085 @dfn{software configuration management} (SCM) metadata instead of declaring
5086 them as the version argument or in a SCM managed file.")
5087 (license license:expat)))
5088
5089 (define-public python2-setuptools-scm
5090 (package-with-python2 python-setuptools-scm))
5091
5092 (define-public python-pathlib2
5093 (package
5094 (name "python-pathlib2")
5095 (version "2.3.3")
5096 (source
5097 (origin
5098 (method url-fetch)
5099 (uri (pypi-uri "pathlib2" version))
5100 (sha256
5101 (base32
5102 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
5103 (build-system python-build-system)
5104 (propagated-inputs
5105 `(("python-scandir" ,python-scandir)
5106 ("python-six" ,python-six)))
5107 (home-page "https://pypi.org/project/pathlib2/")
5108 (synopsis "Object-oriented file system paths")
5109 (description "The goal of pathlib2 is to provide a backport of the
5110 standard @code{pathlib} module which tracks the standard library module, so
5111 all the newest features of the standard @code{pathlib} can be used also on
5112 older Python versions.")
5113 (license license:expat)))
5114
5115 (define-public python2-importlib-resources
5116 (package
5117 (name "python2-importlib-resources")
5118 (version "1.0.2")
5119 (source (origin
5120 (method url-fetch)
5121 (uri (pypi-uri "importlib_resources" version))
5122 (sha256
5123 (base32
5124 "0y3hg12iby1qyaspnbisz4s4vxax7syikk3skznwqizqyv89y9yk"))))
5125 (build-system python-build-system)
5126 (arguments
5127 `(#:python ,python-2
5128 #:phases (modify-phases %standard-phases
5129 ;; The build system tests for python-wheel, but it is
5130 ;; not required for Guix nor the test suite. Just drop
5131 ;; it to make bootstrapping pytest easier.
5132 (add-after 'unpack 'drop-wheel-dependency
5133 (lambda _
5134 (substitute* "setup.cfg"
5135 (("^[[:blank:]]+wheel")
5136 ""))
5137 #t)))))
5138 (propagated-inputs
5139 `(("python-pathlib2" ,python2-pathlib2)
5140 ("python-typing" ,python2-typing)))
5141 (home-page "https://gitlab.com/python-devs/importlib_resources")
5142 (synopsis "Backport of @code{importlib.resources} from Python 3.7")
5143 (description
5144 "This package provides an implementation of @code{importlib.resources}
5145 for older versions of Python.")
5146 (license license:asl2.0)))
5147
5148 ;; For importlib-metadata-bootstrap below.
5149 (define-public python2-importlib-resources-bootstrap
5150 (hidden-package
5151 (package/inherit
5152 python2-importlib-resources
5153 (name "python2-importlib-resources-bootstrap")
5154 (propagated-inputs
5155 `(("python-pathlib2-bootstrap" ,python2-pathlib2-bootstrap)
5156 ("python-typing" ,python2-typing))))))
5157
5158 (define-public python-importlib-metadata
5159 (package
5160 (name "python-importlib-metadata")
5161 (version "1.5.0")
5162 (source
5163 (origin
5164 (method url-fetch)
5165 (uri (pypi-uri "importlib_metadata" version))
5166 (sha256
5167 (base32
5168 "00ikdj4gjhankdljnz7g5ggak4k9lql2926x0x117ir9j2lv7x86"))))
5169 (build-system python-build-system)
5170 (propagated-inputs
5171 `(("python-zipp" ,python-zipp)))
5172 (native-inputs
5173 `(("python-setuptools-scm" ,python-setuptools-scm)
5174 ("python-pyfakefs" ,python-pyfakefs)
5175 ("python-packaging" ,python-packaging)))
5176 (home-page "https://importlib-metadata.readthedocs.io/")
5177 (synopsis "Read metadata from Python packages")
5178 (description
5179 "@code{importlib_metadata} is a library which provides an API for
5180 accessing an installed Python package's metadata, such as its entry points or
5181 its top-level name. This functionality intends to replace most uses of
5182 @code{pkg_resources} entry point API and metadata API. Along with
5183 @code{importlib.resources} in Python 3.7 and newer, this can eliminate the
5184 need to use the older and less efficient @code{pkg_resources} package.")
5185 (properties `((python2-variant . ,(delay python2-importlib-metadata))))
5186 (license license:asl2.0)))
5187
5188 (define-public python2-importlib-metadata
5189 (let ((base (package-with-python2 (strip-python2-variant
5190 python-importlib-metadata))))
5191 (package/inherit
5192 base
5193 (name "python2-importlib-metadata")
5194 (native-inputs
5195 `(("python-setuptools-scm" ,python2-setuptools-scm)
5196 ("python-pyfakefs" ,python2-pyfakefs-bootstrap)
5197 ("python-packaging" ,python2-packaging-bootstrap)))
5198 (propagated-inputs
5199 `(("python-configparser" ,python2-configparser)
5200 ("python-contextlib2" ,python2-contextlib2)
5201 ("python-importlib-resources" ,python2-importlib-resources)
5202 ("python-pathlib2" ,python2-pathlib2)
5203 ,@(package-propagated-inputs base))))))
5204
5205 ;; This package is used by python2-pytest, and thus must not depend on it.
5206 (define-public python2-importlib-metadata-bootstrap
5207 (hidden-package
5208 (package/inherit
5209 python2-importlib-metadata
5210 (name "python2-importlib-metadata-bootstrap")
5211 (arguments
5212 `(#:tests? #f
5213 ,@(package-arguments python2-importlib-metadata)))
5214 (propagated-inputs
5215 `(("python-zipp" ,python2-zipp-bootstrap)
5216 ("python-pathlib2" ,python2-pathlib2-bootstrap)
5217 ("python-configparser" ,python2-configparser)
5218 ("python-contextlib2" ,python2-contextlib2-bootstrap)
5219 ("python-importlib-resources" ,python2-importlib-resources-bootstrap))))))
5220
5221 (define-public python-jaraco-packaging
5222 (package
5223 (name "python-jaraco-packaging")
5224 (version "6.1")
5225 (source
5226 (origin
5227 (method url-fetch)
5228 (uri (pypi-uri "jaraco.packaging" version))
5229 (sha256
5230 (base32
5231 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
5232 (build-system python-build-system)
5233 (propagated-inputs
5234 `(("python-pytest" ,python-pytest)
5235 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
5236 ("python-pytest-flake8" ,python-pytest-flake8)
5237 ("python-rst.linker" ,python-rst.linker)
5238 ("python-setuptools" ,python-setuptools)
5239 ("python-setuptools-scm" ,python-setuptools-scm)
5240 ("python-six" ,python-six)
5241 ("python-sphinx" ,python-sphinx)))
5242 (home-page "https://github.com/jaraco/jaraco.packaging")
5243 (synopsis "Tools to supplement packaging Python releases")
5244 (description
5245 "This package provides various tools to supplement packaging Python
5246 releases.")
5247 (license license:expat)))
5248
5249 (define-public python-pathpy
5250 (package
5251 (name "python-pathpy")
5252 (version "11.5.1")
5253 (source
5254 (origin
5255 (method url-fetch)
5256 (uri (pypi-uri "path.py" version))
5257 (sha256
5258 (base32 "0ir9j1haq2jbi7aip6k2fa9l7q1l03k4hp1awxhjhcwzsnwp3ll8"))))
5259 (outputs '("out" "doc"))
5260 (build-system python-build-system)
5261 (propagated-inputs
5262 `(("python-appdirs" ,python-appdirs)
5263 ("python-importlib-metadata" ,python-importlib-metadata)))
5264 (native-inputs
5265 `(("python-setuptools-scm" ,python-setuptools-scm)
5266 ("python-sphinx" ,python-sphinx)
5267 ("python-rst.linker" ,python-rst.linker)
5268 ("python-pytest" ,python-pytest)
5269 ("python-pytest-runner" ,python-pytest-runner)
5270 ("python-jaraco-packaging" ,python-jaraco-packaging)))
5271 (arguments
5272 `(#:phases
5273 (modify-phases %standard-phases
5274 (add-after 'build 'build-doc
5275 (lambda _
5276 (setenv "LANG" "en_US.UTF-8")
5277 (invoke "python" "setup.py" "build_sphinx")))
5278 (add-after 'install 'install-doc
5279 (lambda* (#:key outputs #:allow-other-keys)
5280 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5281 (doc (string-append data "/doc/" ,name "-" ,version))
5282 (html (string-append doc "/html")))
5283 (mkdir-p html)
5284 (for-each (lambda (file)
5285 (copy-file file (string-append doc "/" file)))
5286 '("README.rst" "CHANGES.rst"))
5287 (copy-recursively "build/sphinx/html" html)
5288 #t)))
5289 (replace 'check
5290 (lambda _
5291 ;; The import time test aborts if an import takes longer than
5292 ;; 100ms. It may very well take a little longer than that.
5293 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
5294 (home-page "https://github.com/jaraco/path.py")
5295 (synopsis "Python module wrapper for built-in os.path")
5296 (description
5297 "@code{path.py} implements path objects as first-class entities, allowing
5298 common operations on files to be invoked on those path objects directly.")
5299 (license license:expat)))
5300
5301 (define-public python2-pathpy
5302 (package-with-python2 python-pathpy))
5303
5304 (define-public python-simplegeneric
5305 (package
5306 (name "python-simplegeneric")
5307 (version "0.8.1")
5308 (source
5309 (origin
5310 (method url-fetch)
5311 (uri (pypi-uri "simplegeneric" version ".zip"))
5312 (sha256
5313 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5314 (build-system python-build-system)
5315 (native-inputs
5316 `(("unzip" ,unzip)))
5317 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5318 (synopsis "Python module for simple generic functions")
5319 (description
5320 "The simplegeneric module lets you define simple single-dispatch generic
5321 functions, akin to Python’s built-in generic functions like @code{len()},
5322 @code{iter()} and so on. However, instead of using specially-named methods,
5323 these generic functions use simple lookup tables, akin to those used by
5324 e.g. @code{pickle.dump()} and other generic functions found in the Python
5325 standard library.")
5326 (license license:zpl2.1)))
5327
5328 (define-public python2-simplegeneric
5329 (package-with-python2 python-simplegeneric))
5330
5331 (define-public python-ipython-genutils
5332 ;; TODO: This package is retired, check if can be removed, see description.
5333 (package
5334 (name "python-ipython-genutils")
5335 (version "0.1.0")
5336 (source
5337 (origin
5338 (method url-fetch)
5339 (uri (pypi-uri "ipython_genutils" version))
5340 (sha256
5341 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5342 (build-system python-build-system)
5343 (arguments `(#:tests? #f)) ; no tests
5344 (home-page "https://ipython.org")
5345 (synopsis "Vestigial utilities from IPython")
5346 (description
5347 "This package provides retired utilities from IPython. No packages
5348 outside IPython/Jupyter should depend on it.
5349
5350 This package shouldn't exist. It contains some common utilities shared by
5351 Jupyter and IPython projects during The Big Split. As soon as possible, those
5352 packages will remove their dependency on this, and this package will go
5353 away.")
5354 (license license:bsd-3)))
5355
5356 (define-public python2-ipython-genutils
5357 (package-with-python2 python-ipython-genutils))
5358
5359 (define-public python-traitlets
5360 (package
5361 (name "python-traitlets")
5362 (version "4.3.3")
5363 (source
5364 (origin
5365 (method url-fetch)
5366 (uri (pypi-uri "traitlets" version))
5367 (sha256
5368 (base32
5369 "1xsrwgivpkxlbr4dfndfsi098s29yqgswgjc1qqn69yxklvfw8yh"))))
5370 (build-system python-build-system)
5371 (arguments
5372 `(#:phases
5373 (modify-phases %standard-phases
5374 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
5375 (propagated-inputs
5376 `(("python-ipython-genutils" ,python-ipython-genutils)
5377 ("python-decorator" ,python-decorator)))
5378 (native-inputs
5379 `(("python-pytest" ,python-pytest)))
5380 (properties `((python2-variant . ,(delay python2-traitlets))))
5381 (home-page "https://ipython.org")
5382 (synopsis "Configuration system for Python applications")
5383 (description
5384 "Traitlets is a framework that lets Python classes have attributes with
5385 type checking, dynamically calculated default values, and ‘on change’
5386 callbacks. The package also includes a mechanism to use traitlets for
5387 configuration, loading values from files or from command line arguments. This
5388 is a distinct layer on top of traitlets, so you can use traitlets in your code
5389 without using the configuration machinery.")
5390 (license license:bsd-3)))
5391
5392 (define-public python2-traitlets
5393 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
5394 (package
5395 (inherit traitlets)
5396 (propagated-inputs
5397 `(("python2-enum34" ,python2-enum34)
5398 ,@(package-propagated-inputs traitlets))))))
5399
5400 (define-public python-jupyter-core
5401 (package
5402 (name "python-jupyter-core")
5403 (version "4.4.0")
5404 (source
5405 (origin
5406 (method url-fetch)
5407 (uri (string-append (pypi-uri "jupyter_core" version)))
5408 (sha256
5409 (base32
5410 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
5411 (build-system python-build-system)
5412 ;; FIXME: not sure how to run the tests
5413 (arguments `(#:tests? #f))
5414 (propagated-inputs
5415 `(("python-traitlets" ,python-traitlets)))
5416 (home-page "http://jupyter.org/")
5417 (synopsis "Jupyter base package")
5418 (description
5419 "Jupyter core is the base package on which Jupyter projects rely.")
5420 (license license:bsd-3)))
5421
5422 (define-public python2-jupyter-core
5423 (package-with-python2 python-jupyter-core))
5424
5425 (define-public python-jupyter-client
5426 (package
5427 (name "python-jupyter-client")
5428 (version "5.2.4")
5429 (source
5430 (origin
5431 (method url-fetch)
5432 (uri (pypi-uri "jupyter_client" version))
5433 (sha256
5434 (base32
5435 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
5436 (build-system python-build-system)
5437 ;; Tests fail because of missing native python kernel which I assume is
5438 ;; provided by the ipython package, which we cannot use because it would
5439 ;; cause a dependency cycle.
5440 (arguments
5441 `(#:tests? #f
5442
5443 #:phases (modify-phases %standard-phases
5444 (add-after 'unpack 'set-tool-file-names
5445 (lambda* (#:key inputs #:allow-other-keys)
5446 (let ((iproute (assoc-ref inputs "iproute")))
5447 (substitute* "jupyter_client/localinterfaces.py"
5448 (("'ip'")
5449 (string-append "'" iproute "/sbin/ip'")))
5450 #t))))))
5451 (inputs
5452 `(("iproute" ,iproute)))
5453 (propagated-inputs
5454 `(("python-pyzmq" ,python-pyzmq)
5455 ("python-traitlets" ,python-traitlets)
5456 ("python-jupyter-core" ,python-jupyter-core)))
5457 (home-page "http://jupyter.org/")
5458 (synopsis "Jupyter protocol implementation and client libraries")
5459 (description
5460 "The @code{jupyter_client} package contains the reference implementation
5461 of the Jupyter protocol. It also provides client and kernel management APIs
5462 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5463 installing @code{kernelspec}s for use with Jupyter frontends.")
5464 (license license:bsd-3)))
5465
5466 (define-public python2-jupyter-client
5467 (package-with-python2 python-jupyter-client))
5468
5469 (define-public python-ipykernel
5470 (package
5471 (name "python-ipykernel")
5472 (version "5.1.3")
5473 (source
5474 (origin
5475 (method url-fetch)
5476 (uri (pypi-uri "ipykernel" version))
5477 (sha256
5478 (base32 "1a08y677lpn80qzvv7z0smgggmr5m5ayf0bs6vds47xpxl9sss5k"))))
5479 (build-system python-build-system)
5480 (arguments
5481 `(#:phases
5482 (modify-phases %standard-phases
5483 (replace 'check
5484 (lambda _
5485 (setenv "HOME" "/tmp")
5486 (invoke "pytest" "-v")
5487 #t))
5488 (add-after 'install 'set-python-file-name
5489 (lambda* (#:key outputs #:allow-other-keys)
5490 ;; Record the absolute file name of the 'python' executable in
5491 ;; 'kernel.json'.
5492 (let ((out (assoc-ref outputs "out")))
5493 (substitute* (string-append out "/share/jupyter"
5494 "/kernels/python3/kernel.json")
5495 (("\"python\"")
5496 (string-append "\"" (which "python") "\"")))
5497 #t))))))
5498 (propagated-inputs
5499 `(("python-ipython" ,python-ipython)
5500 ;; imported at runtime during connect
5501 ("python-jupyter-client" ,python-jupyter-client)))
5502 (native-inputs
5503 `(("python-flaky" ,python-flaky)
5504 ("python-nose" ,python-nose)
5505 ("python-pytest" ,python-pytest)))
5506 (home-page "https://ipython.org")
5507 (synopsis "IPython Kernel for Jupyter")
5508 (description
5509 "This package provides the IPython kernel for Jupyter.")
5510 (license license:bsd-3)))
5511
5512 ;; Version 5.1.1 and above no longer support Python 2.
5513 (define-public python2-ipykernel
5514 (package
5515 (name "python2-ipykernel")
5516 (version "5.1.0")
5517 (source
5518 (origin
5519 (method url-fetch)
5520 (uri (pypi-uri "ipykernel" version))
5521 (sha256
5522 (base32 "0br95qhrd5k65g10djngiy27hs0642301hlf2q142i8djabvzh0g"))))
5523 (build-system python-build-system)
5524 (arguments
5525 `(#:python ,python-2
5526 #:phases
5527 (modify-phases %standard-phases
5528 (replace 'check
5529 (lambda _
5530 (setenv "HOME" "/tmp")
5531 (invoke "pytest" "-v")
5532 #t)))))
5533 (propagated-inputs
5534 `(("python2-ipython" ,python2-ipython)
5535 ;; imported at runtime during connect
5536 ("python2-jupyter-client" ,python2-jupyter-client)))
5537 (native-inputs
5538 `(("python2-pytest" ,python2-pytest)
5539 ("python2-nose" ,python2-nose)))
5540 (home-page "https://ipython.org")
5541 (synopsis "IPython Kernel for Jupyter")
5542 (description
5543 "This package provides the IPython kernel for Jupyter.")
5544 (license license:bsd-3)))
5545
5546 (define-public python-pari-jupyter
5547 (package
5548 (name "python-pari-jupyter")
5549 (version "1.3.2")
5550 (source
5551 (origin
5552 (method url-fetch)
5553 (uri (pypi-uri "pari_jupyter" version))
5554 (sha256
5555 (base32
5556 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
5557 (build-system python-build-system)
5558 (propagated-inputs
5559 `(("python-ipykernel" ,python-ipykernel)))
5560 (inputs
5561 `(("pari-gp" ,pari-gp)
5562 ("readline" ,readline)))
5563 (arguments
5564 `(#:tests? #f)) ; no test suite
5565 (home-page
5566 "https://github.com/jdemeyer/pari_jupyter")
5567 (synopsis "A Jupyter kernel for PARI/GP")
5568 (description "The package provides a PARI/GP kernel for Jupyter.")
5569 (license license:gpl3+)))
5570
5571 (define-public python-backcall
5572 (package
5573 (name "python-backcall")
5574 (version "0.1.0")
5575 (source
5576 (origin
5577 (method url-fetch)
5578 (uri (pypi-uri "backcall" version))
5579 (sha256
5580 (base32
5581 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
5582 (build-system python-build-system)
5583 (home-page "https://github.com/takluyver/backcall/")
5584 (synopsis "Specifications for callback functions passed in to an API")
5585 (description
5586 "If your code lets other people supply callback functions, it's important
5587 to specify the function signature you expect, and check that functions support
5588 that. Adding extra parameters later would break other peoples code unless
5589 you're careful. The @code{backcall} package provides a way of specifying the
5590 callback signature using a prototype function.")
5591 (license license:bsd-3)))
5592
5593 ;; This is the latest release of the LTS version of ipython with support for
5594 ;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
5595 ;; dropped support for Python 2.7.
5596 (define-public python2-ipython
5597 (package
5598 (name "python2-ipython")
5599 (version "5.8.0")
5600 (source
5601 (origin
5602 (method url-fetch)
5603 (uri (pypi-uri "ipython" version ".tar.gz"))
5604 (sha256
5605 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
5606 (build-system python-build-system)
5607 (propagated-inputs
5608 `(("python2-backports-shutil-get-terminal-size"
5609 ,python2-backports-shutil-get-terminal-size)
5610 ("python2-pathlib2" ,python2-pathlib2)
5611 ("python2-pyzmq" ,python2-pyzmq)
5612 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
5613 ("python2-terminado" ,python2-terminado)
5614 ("python2-matplotlib" ,python2-matplotlib)
5615 ("python2-numpy" ,python2-numpy)
5616 ("python2-numpydoc" ,python2-numpydoc)
5617 ("python2-jinja2" ,python2-jinja2)
5618 ("python2-mistune" ,python2-mistune)
5619 ("python2-pexpect" ,python2-pexpect)
5620 ("python2-pickleshare" ,python2-pickleshare)
5621 ("python2-simplegeneric" ,python2-simplegeneric)
5622 ("python2-jsonschema" ,python2-jsonschema)
5623 ("python2-traitlets" ,python2-traitlets)
5624 ("python2-nbformat" ,python2-nbformat)
5625 ("python2-pygments" ,python2-pygments)))
5626 (inputs
5627 `(("readline" ,readline)
5628 ("which" ,which)))
5629 (native-inputs
5630 `(("graphviz" ,graphviz)
5631 ("pkg-config" ,pkg-config)
5632 ("python2-requests" ,python2-requests) ;; for tests
5633 ("python2-testpath" ,python2-testpath)
5634 ("python2-mock" ,python2-mock)
5635 ("python2-nose" ,python2-nose)))
5636 (arguments
5637 `(#:python ,python-2
5638 #:phases
5639 (modify-phases %standard-phases
5640 (add-before 'check 'delete-broken-tests
5641 (lambda* (#:key inputs #:allow-other-keys)
5642 ;; These tests throw errors for unknown reasons.
5643 (delete-file "IPython/core/tests/test_profile.py")
5644 (delete-file "IPython/core/tests/test_interactiveshell.py")
5645 (delete-file "IPython/core/tests/test_magic.py")
5646 #t)))))
5647 (home-page "https://ipython.org")
5648 (synopsis "IPython is a tool for interactive computing in Python")
5649 (description
5650 "IPython provides a rich architecture for interactive computing with:
5651 Powerful interactive shells, a browser-based notebook, support for interactive
5652 data visualization, embeddable interpreters and tools for parallel
5653 computing.")
5654 (license license:bsd-3)))
5655
5656 (define-public python-ipython
5657 (package
5658 (name "python-ipython")
5659 (version "7.9.0")
5660 (source
5661 (origin
5662 (method url-fetch)
5663 (uri (pypi-uri "ipython" version ".tar.gz"))
5664 (sha256
5665 (base32 "103jkw18z7fnwdal1mdbijjxi1fndzn31g887lmj7ddpf2r07lyz"))))
5666 (build-system python-build-system)
5667 (propagated-inputs
5668 `(("python-backcall" ,python-backcall)
5669 ("python-pyzmq" ,python-pyzmq)
5670 ("python-prompt-toolkit" ,python-prompt-toolkit)
5671 ("python-terminado" ,python-terminado)
5672 ("python-matplotlib" ,python-matplotlib)
5673 ("python-numpy" ,python-numpy)
5674 ("python-numpydoc" ,python-numpydoc)
5675 ("python-jedi" ,python-jedi)
5676 ("python-jinja2" ,python-jinja2)
5677 ("python-mistune" ,python-mistune)
5678 ("python-pexpect" ,python-pexpect)
5679 ("python-pickleshare" ,python-pickleshare)
5680 ("python-simplegeneric" ,python-simplegeneric)
5681 ("python-jsonschema" ,python-jsonschema)
5682 ("python-traitlets" ,python-traitlets)
5683 ("python-nbformat" ,python-nbformat)
5684 ("python-pygments" ,python-pygments)))
5685 (inputs
5686 `(("readline" ,readline)
5687 ("which" ,which)))
5688 (native-inputs
5689 `(("graphviz" ,graphviz)
5690 ("pkg-config" ,pkg-config)
5691 ("python-requests" ,python-requests) ;; for tests
5692 ("python-testpath" ,python-testpath)
5693 ("python-nose" ,python-nose)))
5694 (arguments
5695 `(#:phases
5696 (modify-phases %standard-phases
5697 (add-after 'unpack 'make-docs-reproducible
5698 (lambda _
5699 (substitute* "IPython/sphinxext/ipython_directive.py"
5700 ((".*import datetime") "")
5701 ((".*datetime.datetime.now\\(\\)") "")
5702 (("%timeit") "# %timeit"))
5703 #t))
5704 ;; Tests can only be run after the library has been installed and not
5705 ;; within the source directory.
5706 (delete 'check)
5707 (add-after 'install 'check
5708 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5709 (if tests?
5710 (begin
5711 ;; Make installed package available for running the tests
5712 (add-installed-pythonpath inputs outputs)
5713 (setenv "HOME" "/tmp/") ;; required by a test
5714 ;; We only test the core because one of the other tests
5715 ;; tries to import ipykernel.
5716 (invoke "python" "IPython/testing/iptest.py"
5717 "-v" "IPython/core/tests"))
5718 #t)))
5719 (add-before 'check 'fix-tests
5720 (lambda* (#:key inputs #:allow-other-keys)
5721 (substitute* "./IPython/utils/_process_posix.py"
5722 (("/usr/bin/env', 'which") (which "which")))
5723 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5724 (("#!/usr/bin/env python")
5725 (string-append "#!" (which "python"))))
5726 ;; This test introduces a circular dependency on ipykernel
5727 ;; (which depends on ipython).
5728 (delete-file "IPython/core/tests/test_display.py")
5729 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
5730 (delete-file "IPython/core/tests/test_interactiveshell.py")
5731 #t)))))
5732 (home-page "https://ipython.org")
5733 (synopsis "IPython is a tool for interactive computing in Python")
5734 (description
5735 "IPython provides a rich architecture for interactive computing with:
5736 Powerful interactive shells, a browser-based notebook, support for interactive
5737 data visualization, embeddable interpreters and tools for parallel
5738 computing.")
5739 (license license:bsd-3)))
5740
5741 (define-public python-ipython-documentation
5742 (package
5743 (inherit python-ipython)
5744 (name "python-ipython-documentation")
5745 (version (package-version python-ipython))
5746 (arguments
5747 `(#:phases
5748 (modify-phases %standard-phases
5749 (delete 'build)
5750 (delete 'check)
5751 (replace 'install
5752 (lambda* (#:key outputs #:allow-other-keys)
5753 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5754 (doc (string-append data "/doc/" ,name "-" ,version))
5755 (html (string-append doc "/html"))
5756 (man1 (string-append data "/man/man1"))
5757 (info (string-append data "/info"))
5758 (examples (string-append doc "/examples"))
5759 (python-arg (string-append "PYTHON=" (which "python"))))
5760 (setenv "LANG" "en_US.utf8")
5761 (with-directory-excursion "docs"
5762 ;; FIXME: pdf fails to build
5763 ;;(system* "make" "pdf" "PAPER=a4")
5764 (system* "make" python-arg "html")
5765 ;; FIXME: the generated texi file contains ^@^@, which trips
5766 ;; up the parser.
5767 ;; (system* "make" python-arg "info")
5768 )
5769 (copy-recursively "docs/man" man1)
5770 (copy-recursively "examples" examples)
5771 (copy-recursively "docs/build/html" html)
5772 ;; (copy-file "docs/build/latex/ipython.pdf"
5773 ;; (string-append doc "/ipython.pdf"))
5774 (mkdir-p info)
5775 ;; (copy-file "docs/build/texinfo/ipython.info"
5776 ;; (string-append info "/ipython.info"))
5777 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
5778 #t)))))
5779 (inputs
5780 `(("python-ipython" ,python-ipython)
5781 ("python-ipykernel" ,python-ipykernel)))
5782 (native-inputs
5783 `(("python-sphinx" ,python-sphinx)
5784 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
5785 ;; FIXME: It's possible that a smaller union would work just as well.
5786 ("texlive" ,(texlive-union (list texlive-amsfonts
5787 texlive-fonts-ec
5788 texlive-generic-ifxetex
5789 texlive-generic-pdftex
5790 texlive-latex-capt-of
5791 texlive-latex-cmap
5792 texlive-latex-environ
5793 texlive-latex-eqparbox
5794 texlive-latex-etoolbox
5795 texlive-latex-expdlist
5796 texlive-latex-fancyhdr
5797 texlive-latex-fancyvrb
5798 texlive-latex-fncychap
5799 texlive-latex-float
5800 texlive-latex-framed
5801 texlive-latex-geometry
5802 texlive-latex-graphics
5803 texlive-latex-hyperref
5804 texlive-latex-mdwtools
5805 texlive-latex-multirow
5806 texlive-latex-needspace
5807 texlive-latex-oberdiek
5808 texlive-latex-parskip
5809 texlive-latex-preview
5810 texlive-latex-tabulary
5811 texlive-latex-threeparttable
5812 texlive-latex-titlesec
5813 texlive-latex-trimspaces
5814 texlive-latex-ucs
5815 texlive-latex-upquote
5816 texlive-latex-url
5817 texlive-latex-varwidth
5818 texlive-latex-wrapfig)))
5819 ("texinfo" ,texinfo)))))
5820
5821 (define-public python-urwid
5822 (package
5823 (name "python-urwid")
5824 (version "2.0.1")
5825 (source
5826 (origin
5827 (method url-fetch)
5828 (uri (pypi-uri "urwid" version))
5829 (sha256
5830 (base32
5831 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
5832 (build-system python-build-system)
5833 (home-page "http://urwid.org")
5834 (synopsis "Console user interface library for Python")
5835 (description
5836 "Urwid is a curses-based UI/widget library for Python. It includes many
5837 features useful for text console applications.")
5838 (license license:lgpl2.1+)))
5839
5840 (define-public python2-urwid
5841 (package-with-python2 python-urwid))
5842
5843 (define-public python-urwidtrees
5844 (package
5845 (name "python-urwidtrees")
5846 (version "1.0.2")
5847 (source
5848 (origin
5849 (method git-fetch)
5850 ;; package author intends on distributing via github rather than pypi:
5851 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5852 (uri (git-reference
5853 (url "https://github.com/pazz/urwidtrees")
5854 (commit version)))
5855 (file-name (git-file-name name version))
5856 (sha256
5857 (base32
5858 "1n1kpidvkdnsqyb82vlvk78gmly96kh8351lqxn2pzgwwns6fml2"))))
5859 (build-system python-build-system)
5860 (arguments
5861 '(#:use-setuptools? #f
5862 #:tests? #f)) ; no tests
5863 (propagated-inputs `(("python-urwid" ,python-urwid)))
5864 (home-page "https://github.com/pazz/urwidtrees")
5865 (synopsis "Tree widgets for urwid")
5866 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5867 toolkit. Use it to build trees of widgets.")
5868 (license license:gpl3+)))
5869
5870 (define-public python2-urwidtrees
5871 (package-with-python2 python-urwidtrees))
5872
5873 (define-public python-ua-parser
5874 (package
5875 (name "python-ua-parser")
5876 (version "0.8.0")
5877 (source
5878 (origin
5879 (method url-fetch)
5880 (uri (pypi-uri "ua-parser" version))
5881 (sha256
5882 (base32
5883 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
5884 (build-system python-build-system)
5885 (arguments
5886 `(#:tests? #f)) ;no test suite in release
5887 (native-inputs
5888 `(("python-pyyaml" ,python-pyyaml)))
5889 (home-page "https://github.com/ua-parser/uap-python")
5890 (synopsis "User agent parser")
5891 (description
5892 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
5893 (license license:asl2.0)))
5894
5895 (define-public python2-ua-parser
5896 (package-with-python2 python-ua-parser))
5897
5898 (define-public python-user-agents
5899 (package
5900 (name "python-user-agents")
5901 (version "1.1.0")
5902 (source
5903 (origin
5904 (method url-fetch)
5905 (uri (pypi-uri "user-agents" version))
5906 (sha256
5907 (base32
5908 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
5909 (build-system python-build-system)
5910 (arguments
5911 `(#:tests? #f)) ;missing devices.json test file in release
5912 (propagated-inputs
5913 `(("python-ua-parser" ,python-ua-parser)))
5914 (home-page "https://github.com/selwin/python-user-agents")
5915 (synopsis "User Agent strings parsing library")
5916 (description
5917 "A library to identify devices (phones, tablets) and their capabilities by
5918 parsing (browser/HTTP) user agent strings.")
5919 (license license:expat)))
5920
5921 (define-public python2-user-agents
5922 (package-with-python2 python-user-agents))
5923
5924 (define-public python-dbus
5925 (package
5926 (name "python-dbus")
5927 (version "1.2.14")
5928 (source
5929 (origin
5930 (method url-fetch)
5931 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
5932 "dbus-python-" version ".tar.gz"))
5933 (sha256
5934 (base32 "0cdchkgnivlka4lf8q4qfk0yxq483i3r3aqickjf8hfn7nx0c0mi"))))
5935 (build-system gnu-build-system)
5936 (native-inputs
5937 `(("pkg-config" ,pkg-config)))
5938 (inputs
5939 `(("python" ,python-wrapper)
5940 ("dbus-glib" ,dbus-glib)))
5941 (synopsis "Python bindings for D-bus")
5942 (description "python-dbus provides bindings for libdbus, the reference
5943 implementation of D-Bus.")
5944 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
5945 (license license:expat)))
5946
5947 (define-public python2-dbus
5948 (package (inherit python-dbus)
5949 (name "python2-dbus")
5950 (inputs `(("python" ,python-2)
5951 ,@(alist-delete "python"
5952 (package-inputs python-dbus)
5953 equal?)))))
5954
5955 (define-public python-notify2
5956 (package
5957 (name "python-notify2")
5958 (version "0.3.1")
5959 (source
5960 (origin
5961 (method url-fetch)
5962 (uri (pypi-uri "notify2" version))
5963 (sha256
5964 (base32
5965 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
5966 (build-system python-build-system)
5967 (arguments `(#:tests? #f)) ; tests depend on system state
5968 (native-inputs
5969 `(("python-dbus" ,python-dbus)))
5970 (home-page "https://bitbucket.org/takluyver/pynotify2")
5971 (synopsis "Python interface to D-Bus notifications")
5972 (description
5973 "Pynotify2 provides a Python interface for sending D-Bus notifications.
5974 It is a reimplementation of pynotify in pure Python, and an alternative to
5975 the GObject Introspection bindings to libnotify for non-GTK applications.")
5976 (license (list license:bsd-2
5977 license:lgpl2.1+))))
5978
5979 (define-public python2-notify2
5980 (package-with-python2 python-notify2))
5981
5982 ;; beautifulsoup4 has a totally different namespace than 3.x,
5983 ;; and pypi seems to put it under its own name, so I guess we should too
5984 (define-public python-beautifulsoup4
5985 (package
5986 (name "python-beautifulsoup4")
5987 (version "4.7.1")
5988 (source
5989 (origin
5990 (method url-fetch)
5991 (uri (pypi-uri "beautifulsoup4" version))
5992 (sha256
5993 (base32
5994 "0j2kycz2dxgx68xzjm7rxg5xn6v61gq5ifvxyg99slmqkybnal4l"))))
5995 (build-system python-build-system)
5996 (arguments
5997 `(#:phases
5998 (modify-phases %standard-phases
5999 ;; The Python 2 source is the definitive source of beautifulsoup4. We
6000 ;; must use this conversion script when building with Python 3. The
6001 ;; conversion script also runs the tests.
6002 ;; For more information, see the file 'convert-py3k' in the source
6003 ;; distribution.
6004 (replace 'check
6005 (lambda _ (invoke "./convert-py3k"))))))
6006 (propagated-inputs
6007 `(("python-soupsieve" ,python-soupsieve)))
6008 (home-page
6009 "https://www.crummy.com/software/BeautifulSoup/bs4/")
6010 (synopsis
6011 "Python screen-scraping library")
6012 (description
6013 "Beautiful Soup is a Python library designed for rapidly setting up
6014 screen-scraping projects. It offers Pythonic idioms for navigating,
6015 searching, and modifying a parse tree, providing a toolkit for
6016 dissecting a document and extracting what you need. It automatically
6017 converts incoming documents to Unicode and outgoing documents to UTF-8.")
6018 (license license:expat)
6019 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
6020
6021 (define-public python2-beautifulsoup4
6022 (package
6023 (inherit (package-with-python2
6024 (strip-python2-variant python-beautifulsoup4)))
6025 (arguments `(#:python ,python-2))))
6026
6027 (define-public python-soupsieve
6028 (package
6029 (name "python-soupsieve")
6030 (version "1.9.5")
6031 (source
6032 (origin
6033 (method url-fetch)
6034 (uri (pypi-uri "soupsieve" version))
6035 (sha256
6036 (base32
6037 "1nhd0q0ifwva9wn645s6pn74p1rd97asn3qfg75nphx1wkgcbhg2"))))
6038 (build-system python-build-system)
6039 (arguments `(#:tests? #f))
6040 ;;XXX: 2 tests fail currently despite claming they were to be
6041 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
6042 ;;don't want to create a circular dependency.
6043 (home-page "https://github.com/facelessuser/soupsieve")
6044 (synopsis "CSS selector library")
6045 (description
6046 "Soup Sieve is a CSS selector library designed to be used with Beautiful
6047 Soup 4. It aims to provide selecting, matching, and filtering using modern
6048 CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
6049 specifications up through the latest CSS level 4 drafts and beyond (though
6050 some are not yet implemented).")
6051 (properties `((python2-variant . ,(delay python2-soupsieve))))
6052 (license license:expat)))
6053
6054 (define-public python2-soupsieve
6055 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
6056 (package
6057 (inherit base)
6058 (propagated-inputs
6059 `(("python2-backports-functools-lru-cache"
6060 ,python2-backports-functools-lru-cache)
6061 ,@(package-propagated-inputs base))))))
6062
6063 (define-public python-netifaces
6064 (package
6065 (name "python-netifaces")
6066 (version "0.10.7")
6067 (source
6068 (origin
6069 (method url-fetch)
6070 (uri (pypi-uri "netifaces" version))
6071 (sha256
6072 (base32
6073 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
6074 (build-system python-build-system)
6075 (home-page "https://github.com/al45tair/netifaces")
6076 (synopsis
6077 "Python module for portable network interface information")
6078 (description
6079 "Netifaces is a Python module providing information on network
6080 interfaces in an easy and portable manner.")
6081 (license license:expat)))
6082
6083 (define-public python2-netifaces
6084 (package-with-python2 python-netifaces))
6085
6086 (define-public python-networkx
6087 (package
6088 (name "python-networkx")
6089 (version "2.2")
6090 (source
6091 (origin
6092 (method url-fetch)
6093 (uri (pypi-uri "networkx" version ".zip"))
6094 (sha256
6095 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
6096 (build-system python-build-system)
6097 ;; python-decorator is needed at runtime.
6098 (propagated-inputs
6099 `(("python-decorator" ,python-decorator)))
6100 (native-inputs
6101 `(("python-nose" ,python-nose)
6102 ("unzip" ,unzip)))
6103 (home-page "https://networkx.github.io/")
6104 (synopsis "Python module for creating and manipulating graphs and networks")
6105 (description
6106 "NetworkX is a Python package for the creation, manipulation, and study
6107 of the structure, dynamics, and functions of complex networks.")
6108 (license license:bsd-3)))
6109
6110 (define-public python2-networkx
6111 (package-with-python2 python-networkx))
6112
6113 (define-public python-datrie
6114 (package
6115 (name "python-datrie")
6116 (version "0.8")
6117 (source
6118 (origin
6119 (method url-fetch)
6120 (uri (pypi-uri "datrie" version))
6121 (sha256
6122 (base32
6123 "0338r8xgmpy78556jhms0h6qkvyjr10p8bpgdvcpqzm9lrmxmmdx"))))
6124 (build-system python-build-system)
6125 (native-inputs
6126 `(("python-cython" ,python-cython)
6127 ("python-hypothesis" ,python-hypothesis)
6128 ("python-pytest" ,python-pytest)
6129 ("python-pytest-runner" ,python-pytest-runner)))
6130 (home-page "https://github.com/kmike/datrie")
6131 (synopsis "Fast, efficiently stored trie for Python")
6132 (description
6133 "This package provides a fast, efficiently stored trie implementation for
6134 Python.")
6135 (license license:lgpl2.1+)))
6136
6137 (define-public snakemake
6138 (package
6139 (name "snakemake")
6140 (version "5.7.1")
6141 (source
6142 (origin
6143 (method url-fetch)
6144 (uri (pypi-uri "snakemake" version))
6145 (sha256
6146 (base32 "1pnpvvn8n2a78cg360wz3ldmpqrsm2wzi0c0dmvki9fnsw6fxdas"))))
6147 (build-system python-build-system)
6148 (arguments
6149 ;; TODO: Package missing test dependencies.
6150 '(#:tests? #f
6151 #:phases
6152 (modify-phases %standard-phases
6153 ;; For cluster execution Snakemake will call Python. Since there is
6154 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
6155 ;; this by calling the snakemake wrapper instead.
6156 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
6157 (lambda* (#:key outputs #:allow-other-keys)
6158 (substitute* "snakemake/executors.py"
6159 (("\\{sys.executable\\} -m snakemake")
6160 (string-append (assoc-ref outputs "out")
6161 "/bin/snakemake")))
6162 #t)))))
6163 (propagated-inputs
6164 `(("python-appdirs" ,python-appdirs)
6165 ("python-configargparse" ,python-configargparse)
6166 ("python-datrie" ,python-datrie)
6167 ("python-docutils" ,python-docutils)
6168 ("python-gitpython" ,python-gitpython)
6169 ("python-jinja2" ,python-jinja2)
6170 ("python-jsonschema" ,python-jsonschema)
6171 ("python-networkx" ,python-networkx)
6172 ("python-psutil" ,python-psutil)
6173 ("python-pyyaml" ,python-pyyaml)
6174 ("python-ratelimiter" ,python-ratelimiter)
6175 ("python-requests" ,python-requests)
6176 ("python-wrapt" ,python-wrapt)))
6177 (home-page "https://snakemake.readthedocs.io")
6178 (synopsis "Python-based execution environment for make-like workflows")
6179 (description
6180 "Snakemake aims to reduce the complexity of creating workflows by
6181 providing a clean and modern domain specific specification language (DSL) in
6182 Python style, together with a fast and comfortable execution environment.")
6183 (license license:expat)))
6184
6185 (define-public python-pyqrcode
6186 (package
6187 (name "python-pyqrcode")
6188 (version "1.2.1")
6189 (source
6190 (origin
6191 (method url-fetch)
6192 (uri (pypi-uri "PyQRCode" version))
6193 (sha256
6194 (base32
6195 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
6196 (build-system python-build-system)
6197 (home-page
6198 "https://github.com/mnooner256/pyqrcode")
6199 (synopsis "QR code generator")
6200 (description
6201 "Pyqrcode is a QR code generator written purely in Python with
6202 SVG, EPS, PNG and terminal output.")
6203 (license license:bsd-3)))
6204
6205 (define-public python-seaborn
6206 (package
6207 (name "python-seaborn")
6208 (version "0.9.0")
6209 (source
6210 (origin
6211 (method url-fetch)
6212 (uri (pypi-uri "seaborn" version))
6213 (sha256
6214 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))
6215 (patches
6216 (list (origin
6217 (method url-fetch)
6218 ;; This has already been merged, but there is no new
6219 ;; release including this patch. It fixes problems
6220 ;; with axis rotation that would lead to test
6221 ;; failures.
6222 (uri "https://patch-diff.githubusercontent.com/raw/mwaskom/seaborn/pull/1716.diff")
6223 (sha256
6224 (base32
6225 "1lm870z316n9ivsyr86hpk1gxaraw0mrjvq42lqsm0znhjdp9q9w"))
6226 (file-name "seaborn-0.9.0-axis-rotation.patch"))))))
6227 (build-system python-build-system)
6228 (arguments
6229 `(#:phases
6230 (modify-phases %standard-phases
6231 (add-before 'check 'start-xserver
6232 (lambda* (#:key inputs #:allow-other-keys)
6233 (let ((xorg-server (assoc-ref inputs "xorg-server")))
6234 ;; There must be a running X server and make check doesn't
6235 ;; start one. Therefore we must do it.
6236 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
6237 (setenv "DISPLAY" ":1")
6238 #t)))
6239 (add-after 'unpack 'fix-tests
6240 (lambda _
6241 ;; test_cbar_ticks fails probably because of matplotlib's
6242 ;; expectation of using an older version of FreeType.
6243 (delete-file "seaborn/tests/test_matrix.py")
6244 #t))
6245 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
6246 (propagated-inputs
6247 `(("python-pandas" ,python-pandas)
6248 ("python-matplotlib" ,python-matplotlib)
6249 ("python-numpy" ,python-numpy)
6250 ("python-scipy" ,python-scipy)))
6251 (native-inputs
6252 `(("python-pytest" ,python-pytest)
6253 ("xorg-server" ,xorg-server-for-tests)))
6254 (home-page "https://seaborn.pydata.org/")
6255 (synopsis "Statistical data visualization")
6256 (description
6257 "Seaborn is a library for making attractive and informative statistical
6258 graphics in Python. It is built on top of matplotlib and tightly integrated
6259 with the PyData stack, including support for numpy and pandas data structures
6260 and statistical routines from scipy and statsmodels.")
6261 (license license:bsd-3)))
6262
6263 (define-public python2-seaborn
6264 (package-with-python2 python-seaborn))
6265
6266 (define-public python-mpmath
6267 (package
6268 (name "python-mpmath")
6269 (version "0.19")
6270 (source (origin
6271 (method url-fetch)
6272 (uri (string-append "http://mpmath.org/files/mpmath-"
6273 version ".tar.gz"))
6274 (sha256
6275 (base32
6276 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
6277 (build-system python-build-system)
6278 (arguments
6279 '(#:phases
6280 (modify-phases %standard-phases
6281 (replace 'check
6282 (lambda _
6283 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
6284 (home-page "http://mpmath.org")
6285 (synopsis "Arbitrary-precision floating-point arithmetic in python")
6286 (description
6287 "@code{mpmath} can be used as an arbitrary-precision substitute for
6288 Python's float/complex types and math/cmath modules, but also does much
6289 more advanced mathematics.")
6290 (license license:bsd-3)))
6291
6292 (define-public python2-mpmath
6293 (package-with-python2 python-mpmath))
6294
6295 (define-public python-bigfloat
6296 (package
6297 (name "python-bigfloat")
6298 (version "0.3.0")
6299 (source
6300 (origin
6301 (method url-fetch)
6302 (uri (pypi-uri "bigfloat" version))
6303 (sha256
6304 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
6305 (build-system python-build-system)
6306 (inputs
6307 `(("mpfr" ,mpfr)))
6308 (home-page "https://github.com/mdickinson/bigfloat")
6309 (synopsis "Arbitrary precision floating-point arithmetic for Python")
6310 (description
6311 "This package provides a Python interface to the MPFR library for
6312 multiprecision arithmetic.")
6313 (license license:lgpl3+)))
6314
6315 (define-public python2-bigfloat
6316 (package-with-python2 python-bigfloat))
6317
6318 (define-public python-sympy
6319 (package
6320 (name "python-sympy")
6321 (version "1.1.1")
6322 (source
6323 (origin
6324 (method url-fetch)
6325 (uri (string-append
6326 "https://github.com/sympy/sympy/releases/download/sympy-"
6327 version "/sympy-" version ".tar.gz"))
6328 (sha256
6329 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
6330 (build-system python-build-system)
6331 (arguments
6332 `(#:phases
6333 (modify-phases %standard-phases
6334 ;; Run the core tests after installation. By default it would run
6335 ;; *all* tests, which take a very long time to complete and are known
6336 ;; to be flaky.
6337 (delete 'check)
6338 (add-after 'install 'check
6339 (lambda* (#:key outputs #:allow-other-keys)
6340 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
6341 #t)))))
6342 (propagated-inputs
6343 `(("python-mpmath" ,python-mpmath)))
6344 (home-page "https://www.sympy.org/")
6345 (synopsis "Python library for symbolic mathematics")
6346 (description
6347 "SymPy is a Python library for symbolic mathematics. It aims to become a
6348 full-featured computer algebra system (CAS) while keeping the code as simple
6349 as possible in order to be comprehensible and easily extensible.")
6350 (license license:bsd-3)))
6351
6352 (define-public python2-sympy
6353 (package
6354 (inherit (package-with-python2 python-sympy))
6355 (arguments
6356 `(#:phases
6357 (modify-phases %standard-phases
6358 ;; Run the core tests after installation. By default it would run
6359 ;; *all* tests, which take a very long time to complete and are known
6360 ;; to be flaky.
6361 (delete 'check)
6362 (add-after 'install 'check
6363 (lambda* (#:key outputs #:allow-other-keys)
6364 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
6365 #t)))))))
6366
6367 (define-public python-q
6368 (package
6369 (name "python-q")
6370 (version "2.6")
6371 (source
6372 (origin
6373 (method url-fetch)
6374 (uri (pypi-uri "q" version))
6375 (sha256
6376 (base32
6377 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
6378 (build-system python-build-system)
6379 (home-page "https://github.com/zestyping/q")
6380 (synopsis "Quick-and-dirty debugging output for tired programmers")
6381 (description
6382 "q is a Python module for \"print\" style of debugging Python code. It
6383 provides convenient short API for print out of values, tracebacks, and
6384 falling into the Python interpreter.")
6385 (license license:asl2.0)))
6386
6387 (define-public python2-q
6388 (package-with-python2 python-q))
6389
6390 (define-public python2-xlib
6391 (package
6392 (name "python2-xlib")
6393 (version "0.14")
6394 (source (origin
6395 (method url-fetch)
6396 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6397 "/" version "/"
6398 "python-xlib-" version ".tar.gz"))
6399 (sha256
6400 (base32
6401 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6402 (build-system python-build-system)
6403 (arguments
6404 `(#:python ,python-2 ;Python 2 only
6405 #:tests? #f)) ;no tests
6406 (home-page "http://python-xlib.sourceforge.net/")
6407 (synopsis "Python X11 client library")
6408 (description
6409 "The Python X Library is intended to be a fully functional X client
6410 library for Python programs. It is useful to implement low-level X clients.
6411 It is written entirely in Python.")
6412 (license license:gpl2+)))
6413
6414 (define-public python-singledispatch
6415 (package
6416 (name "python-singledispatch")
6417 (version "3.4.0.3")
6418 (source
6419 (origin
6420 (method url-fetch)
6421 (uri (pypi-uri "singledispatch" version))
6422 (sha256
6423 (base32
6424 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6425 (build-system python-build-system)
6426 (native-inputs
6427 `(("python-six" ,python-six))) ; required for conversion, not at run-time
6428 (home-page
6429 "https://docs.python.org/3/library/functools.html#functools.singledispatch")
6430 (synopsis "Backport of singledispatch feature from Python 3.4")
6431 (description
6432 "This library brings functools.singledispatch from Python 3.4 to Python
6433 2.6-3.3.")
6434 (license license:expat)))
6435
6436 (define-public python2-singledispatch
6437 (package-with-python2 python-singledispatch))
6438
6439 ;; the python- version can be removed with python-3.5
6440 (define-public python-backports-abc
6441 (package
6442 (name "python-backports-abc")
6443 (version "0.5")
6444 (source
6445 (origin
6446 (method url-fetch)
6447 (uri (pypi-uri "backports_abc" version))
6448 (sha256
6449 (base32
6450 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6451 (build-system python-build-system)
6452 (home-page "https://github.com/cython/backports_abc")
6453 (synopsis "Backport of additions to the 'collections.abc' module")
6454 (description
6455 "Python-backports-abc provides a backport of additions to the
6456 @code{collections.abc} module in Python-3.5.")
6457 (license license:psfl)))
6458
6459 (define-public python2-backports-abc
6460 (package-with-python2 python-backports-abc))
6461
6462 (define-public python-backports-csv
6463 (package
6464 (name "python-backports-csv")
6465 (version "1.0.5")
6466 (source
6467 (origin
6468 (method url-fetch)
6469 (uri (pypi-uri "backports.csv" version))
6470 (sha256
6471 (base32
6472 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
6473 (build-system python-build-system)
6474 (home-page "https://github.com/ryanhiebert/backports.csv")
6475 (synopsis "Backport of Python 3's csv module for Python 2")
6476 (description
6477 "Provides a backport of Python 3's @code{csv} module for parsing
6478 comma separated values. The API of the @code{csv} module in Python 2
6479 is drastically different from the @code{csv} module in Python 3.
6480 This is due, for the most part, to the difference between str in
6481 Python 2 and Python 3.")
6482 (license license:psfl)))
6483
6484 (define-public python2-backports-csv
6485 (package-with-python2 python-backports-csv))
6486
6487 (define-public python2-backports-shutil-get-terminal-size
6488 (package
6489 (name "python2-backports-shutil-get-terminal-size")
6490 (version "1.0.0")
6491 (source
6492 (origin
6493 (method url-fetch)
6494 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6495 (sha256
6496 (base32
6497 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6498 (build-system python-build-system)
6499 (arguments
6500 `(#:python ,python-2
6501 #:phases
6502 (modify-phases %standard-phases
6503 (replace 'check
6504 (lambda _
6505 (invoke "py.test" "-v"))))))
6506 (native-inputs
6507 `(("python2-pytest" ,python2-pytest)))
6508 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6509 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6510 (description
6511 "This package provides a backport of the @code{get_terminal_size
6512 function} from Python 3.3's @code{shutil}.
6513 Unlike the original version it is written in pure Python rather than C,
6514 so it might be a tiny bit slower.")
6515 (license license:expat)))
6516
6517 (define-public python-waf
6518 (package
6519 (name "python-waf")
6520 (version "2.0.19")
6521 (source (origin
6522 (method url-fetch)
6523 (uri (string-append "https://waf.io/"
6524 "waf-" version ".tar.bz2"))
6525 (sha256
6526 (base32
6527 "19dvqbsvxz7ch03dh1v0znklrwxlz6yzddc3k9smzrrgny4jch6q"))))
6528 (build-system python-build-system)
6529 (arguments
6530 '(#:phases
6531 (modify-phases %standard-phases
6532 (replace 'build
6533 (lambda _
6534 ;; XXX: Find a way to add all extra tools.
6535 (let ((tools '("gccdeps"
6536 "clang_compilation_database")))
6537 (invoke "python" "waf-light" "configure" "build"
6538 (string-append "--tools="
6539 (string-join tools ","))))))
6540 (replace 'check
6541 (lambda _
6542 (invoke "python" "waf" "--version")))
6543 (replace 'install
6544 (lambda* (#:key outputs #:allow-other-keys)
6545 (let ((out (assoc-ref outputs "out")))
6546 (install-file "waf" (string-append out "/bin")))
6547 #t))
6548 ;; waf breaks when it is wrapped.
6549 (delete 'wrap))))
6550 (home-page "https://waf.io/")
6551 (synopsis "Python-based build system")
6552 (description
6553 "Waf is a Python-based framework for configuring, compiling and installing
6554 applications.")
6555 (license license:bsd-3)))
6556
6557 (define-public python2-waf
6558 (package-with-python2 python-waf))
6559
6560 (define-public python-pyzmq
6561 (package
6562 (name "python-pyzmq")
6563 (version "17.1.2")
6564 (source
6565 (origin
6566 (method url-fetch)
6567 (uri (pypi-uri "pyzmq" version))
6568 (sha256
6569 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
6570 (build-system python-build-system)
6571 (arguments
6572 `(#:configure-flags
6573 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6574 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6575 ;; --inplace' for 'python setup.py test' to work.
6576 #:tests? #f))
6577 (inputs
6578 `(("zeromq" ,zeromq)))
6579 (native-inputs
6580 `(("pkg-config" ,pkg-config)
6581 ("python-nose" ,python-nose)))
6582 (home-page "https://github.com/zeromq/pyzmq")
6583 (synopsis "Python bindings for 0MQ")
6584 (description
6585 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
6586 (license license:bsd-4)))
6587
6588 (define-public python2-pyzmq
6589 (package-with-python2 python-pyzmq))
6590
6591 (define-public python-pep8
6592 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
6593 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
6594 ;; some dependents' test suites, and nothing more.
6595 (package
6596 (name "python-pep8")
6597 (version "1.7.0")
6598 (source
6599 (origin
6600 (method url-fetch)
6601 (uri (pypi-uri "pep8" version))
6602 (sha256
6603 (base32
6604 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
6605 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
6606 (build-system python-build-system)
6607 (home-page "https://pep8.readthedocs.org/")
6608 (synopsis "Python style guide checker")
6609 (description
6610 "This tools checks Python code against some of the style conventions in
6611 PEP 8.")
6612 (license license:expat)))
6613
6614 (define-public python2-pep8
6615 (package-with-python2 python-pep8))
6616
6617 (define-public python-pyflakes
6618 (package
6619 (name "python-pyflakes")
6620 (version "2.1.1")
6621 (source
6622 (origin
6623 (method url-fetch)
6624 (uri (pypi-uri "pyflakes" version))
6625 (sha256
6626 (base32
6627 "18pq95a1xj2dgdd0m85gyfsn40jajj4xc3lp8wfv7igqhrc86xnr"))))
6628 (build-system python-build-system)
6629 (home-page
6630 "https://github.com/pyflakes/pyflakes")
6631 (synopsis "Passive checker of Python programs")
6632 (description
6633 "Pyflakes statically checks Python source code for common errors.")
6634 (license license:expat)))
6635
6636 (define-public python2-pyflakes
6637 (package-with-python2 python-pyflakes))
6638
6639 (define-public python-mccabe
6640 (package
6641 (name "python-mccabe")
6642 (version "0.6.1")
6643 (source
6644 (origin
6645 (method url-fetch)
6646 (uri (pypi-uri "mccabe" version))
6647 (sha256
6648 (base32
6649 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
6650 (build-system python-build-system)
6651 (native-inputs
6652 `(("python-pytest" ,python-pytest-bootstrap)
6653 ("python-pytest-runner" ,python-pytest-runner)))
6654 (home-page "https://github.com/flintwork/mccabe")
6655 (synopsis "McCabe checker, plugin for flake8")
6656 (description
6657 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6658 complexity of Python source code.")
6659 (license license:expat)))
6660
6661 (define-public python2-mccabe
6662 (package-with-python2 python-mccabe))
6663
6664 (define-public python-mccabe-0.2.1
6665 (package (inherit python-mccabe)
6666 (version "0.2.1")
6667 (source
6668 (origin
6669 (method url-fetch)
6670 (uri (pypi-uri "mccabe" version))
6671 (sha256
6672 (base32
6673 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
6674
6675 (define-public python2-mccabe-0.2.1
6676 (package-with-python2 python-mccabe-0.2.1))
6677
6678 ;; Flake8 2.4.1 requires an older version of pep8.
6679 ;; This should be removed ASAP.
6680 (define-public python-pep8-1.5.7
6681 (package (inherit python-pep8)
6682 (version "1.5.7")
6683 (source
6684 (origin
6685 (method url-fetch)
6686 (uri (pypi-uri "pep8" version))
6687 (sha256
6688 (base32
6689 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
6690 (arguments
6691 ;; XXX Tests not compatible with Python 3.5.
6692 '(#:tests? #f))))
6693
6694 (define-public python2-pep8-1.5.7
6695 (package-with-python2 python-pep8-1.5.7))
6696
6697 ;; Flake8 2.4.1 requires an older version of pyflakes.
6698 ;; This should be removed ASAP.
6699 (define-public python-pyflakes-0.8.1
6700 (package (inherit python-pyflakes)
6701 (version "0.8.1")
6702 (source
6703 (origin
6704 (method url-fetch)
6705 (uri (pypi-uri "pyflakes" version))
6706 (sha256
6707 (base32
6708 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
6709 (arguments
6710 ;; XXX Tests not compatible with Python 3.5.
6711 '(#:tests? #f))))
6712
6713 (define-public python2-pyflakes-0.8.1
6714 (package-with-python2 python-pyflakes-0.8.1))
6715
6716 (define-public python-flake8
6717 (package
6718 (name "python-flake8")
6719 (version "3.7.9")
6720 (source (origin
6721 (method url-fetch)
6722 (uri (pypi-uri "flake8" version))
6723 (sha256
6724 (base32
6725 "1yscj6avirm6m12bjh4fn2lfgxaamqsjh9pirdqfi0fcgq8ils25"))))
6726 (build-system python-build-system)
6727 (arguments
6728 `(#:phases
6729 (modify-phases %standard-phases
6730 (delete 'check)
6731 (add-after 'install 'check
6732 (lambda* (#:key inputs outputs #:allow-other-keys)
6733 (add-installed-pythonpath inputs outputs)
6734 (invoke "pytest" "-v")
6735 #t)))))
6736 (propagated-inputs
6737 `(("python-pycodestyle" ,python-pycodestyle)
6738 ("python-entrypoints" ,python-entrypoints)
6739 ("python-pyflakes" ,python-pyflakes)
6740 ("python-mccabe" ,python-mccabe)))
6741 (native-inputs
6742 `(("python-mock" ,python-mock)
6743 ("python-pytest" ,python-pytest-bootstrap)))
6744 (home-page "https://gitlab.com/pycqa/flake8")
6745 (synopsis
6746 "The modular source code checker: pep8, pyflakes and co")
6747 (description
6748 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
6749 (properties `((python2-variant . ,(delay python2-flake8))))
6750 (license license:expat)))
6751
6752 (define-public python2-flake8
6753 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
6754 (package (inherit base)
6755 (propagated-inputs
6756 `(("python2-configparser" ,python2-configparser)
6757 ("python2-enum34" ,python2-enum34)
6758 ("python2-functools32" ,python2-functools32)
6759 ("python2-typing" ,python2-typing)
6760 ,@(package-propagated-inputs base))))))
6761
6762 ;; python-hacking requires flake8 <2.6.0.
6763 (define-public python-flake8-2.5
6764 (package
6765 (inherit python-flake8)
6766 (version "2.5.5")
6767 (source (origin
6768 (method url-fetch)
6769 (uri (pypi-uri "flake8" version))
6770 (sha256
6771 (base32
6772 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
6773 (propagated-inputs
6774 `(("python-pep8" ,python-pep8)
6775 ,@(package-propagated-inputs python-flake8)))
6776 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
6777
6778 (define-public python2-flake8-2.5
6779 (package
6780 (inherit python2-flake8)
6781 (version (package-version python-flake8-2.5))
6782 (source (origin
6783 (inherit (package-source python-flake8-2.5))))
6784 (propagated-inputs
6785 `(("python2-pep8" ,python2-pep8)
6786 ,@(package-propagated-inputs python2-flake8)))))
6787
6788 (define-public python-flake8-polyfill
6789 (package
6790 (name "python-flake8-polyfill")
6791 (version "1.0.2")
6792 (source
6793 (origin
6794 (method url-fetch)
6795 (uri (pypi-uri "flake8-polyfill" version))
6796 (sha256
6797 (base32
6798 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
6799 (build-system python-build-system)
6800 (arguments
6801 '(#:phases
6802 (modify-phases %standard-phases
6803 (replace 'check
6804 (lambda _
6805 ;; Be compatible with Pytest 4:
6806 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
6807 (substitute* "setup.cfg"
6808 (("\\[pytest\\]")
6809 "[tool:pytest]"))
6810
6811 (setenv "PYTHONPATH"
6812 (string-append (getcwd) "/build/lib:"
6813 (getenv "PYTHONPATH")))
6814 (invoke "py.test" "-v"))))))
6815 (native-inputs
6816 `(("python-flake8" ,python-flake8)
6817 ("python-mock" ,python-mock)
6818 ("python-pep8" ,python-pep8)
6819 ("python-pycodestyle" ,python-pycodestyle)
6820 ("python-pytest" ,python-pytest)))
6821 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6822 (synopsis "Polyfill package for Flake8 plugins")
6823 (description
6824 "This package that provides some compatibility helpers for Flake8
6825 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6826 (license license:expat)))
6827
6828 (define-public python2-flake8-polyfill
6829 (package-with-python2 python-flake8-polyfill))
6830
6831 (define-public python-mistune
6832 (package
6833 (name "python-mistune")
6834 (version "0.8.4")
6835 (source
6836 (origin
6837 (method url-fetch)
6838 (uri (pypi-uri "mistune" version))
6839 (sha256
6840 (base32
6841 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
6842 (build-system python-build-system)
6843 (native-inputs
6844 `(("python-nose" ,python-nose)
6845 ("python-cython" ,python-cython)))
6846 (home-page "https://github.com/lepture/mistune")
6847 (synopsis "Markdown parser in pure Python")
6848 (description "This package provides a fast markdown parser in pure
6849 Python.")
6850 (license license:bsd-3)))
6851
6852 (define-public python2-mistune
6853 (package-with-python2 python-mistune))
6854
6855 (define-public python-markdown
6856 (package
6857 (name "python-markdown")
6858 (version "3.2.1")
6859 (source
6860 (origin
6861 (method url-fetch)
6862 (uri (pypi-uri "Markdown" version))
6863 (sha256
6864 (base32
6865 "00k91gwhxnm8jdnm2v5xjz9irj6dbi7afywz2hpakqdbxs1ydzlh"))))
6866 (build-system python-build-system)
6867 (native-inputs
6868 `(("python-nose" ,python-nose)
6869 ("python-pyyaml" ,python-pyyaml)))
6870 (home-page "https://python-markdown.github.io/")
6871 (synopsis "Python implementation of Markdown")
6872 (description
6873 "This package provides a Python implementation of John Gruber's
6874 Markdown. The library features international input, various Markdown
6875 extensions, and several HTML output formats. A command line wrapper
6876 markdown_py is also provided to convert Markdown files to HTML.")
6877 (properties `((python2-variant . ,(delay python2-markdown))))
6878 (license license:bsd-3)))
6879
6880 ;; Markdown 3.2 dropped support for Python 2.
6881 (define-public python2-markdown
6882 (let ((base (package-with-python2 (strip-python2-variant python-markdown))))
6883 (package/inherit
6884 base
6885 (version "3.1.1")
6886 (source (origin
6887 (method url-fetch)
6888 (uri (pypi-uri "Markdown" version))
6889 (sha256
6890 (base32
6891 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f")))))))
6892
6893 (define-public python-ptyprocess
6894 (package
6895 (name "python-ptyprocess")
6896 (version "0.5.2")
6897 (source
6898 (origin
6899 (method url-fetch)
6900 (uri (pypi-uri "ptyprocess" version))
6901 (sha256
6902 (base32
6903 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
6904 (build-system python-build-system)
6905 (native-inputs
6906 `(("python-nose" ,python-nose)))
6907 (arguments
6908 `(#:phases
6909 (modify-phases %standard-phases
6910 (replace 'check
6911 (lambda _ (invoke "nosetests"))))))
6912 (home-page "https://github.com/pexpect/ptyprocess")
6913 (synopsis "Run a subprocess in a pseudo terminal")
6914 (description
6915 "This package provides a Python library used to launch a subprocess in a
6916 pseudo terminal (pty), and interact with both the process and its pty.")
6917 (license license:isc)))
6918
6919 (define-public python2-ptyprocess
6920 (package-with-python2 python-ptyprocess))
6921
6922 (define-public python-cram
6923 (package
6924 (name "python-cram")
6925 (version "0.7")
6926 (home-page "https://bitheap.org/cram/")
6927 (source (origin
6928 (method url-fetch)
6929 (uri (list (string-append home-page "cram-"
6930 version ".tar.gz")
6931 (pypi-uri "cram" version)))
6932 (sha256
6933 (base32
6934 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6935 (arguments
6936 '(#:phases
6937 (modify-phases %standard-phases
6938 (add-after 'unpack 'patch-source
6939 (lambda _
6940 (substitute* (find-files "cram" ".*\\.py$")
6941 ;; Replace default shell path.
6942 (("/bin/sh") (which "sh")))
6943 (substitute* (find-files "tests" ".*\\.t$")
6944 (("md5") "md5sum")
6945 (("/bin/bash") (which "bash"))
6946 (("/bin/sh") (which "sh")))
6947 (substitute* "cram/_test.py"
6948 ;; This hack works around a bug triggered by substituting
6949 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6950 ;; "cram -h", which breaks the output at 80 characters. This
6951 ;; causes the line showing the default shell to break into two
6952 ;; lines, but the test expects a single line...
6953 (("env\\['COLUMNS'\\] = '80'")
6954 "env['COLUMNS'] = '160'"))
6955
6956 (substitute* "Makefile"
6957 ;; Recent versions of python-coverage have caused the test
6958 ;; coverage to decrease (as of version 0.7). Allow that.
6959 (("--fail-under=100")
6960 "--fail-under=90"))
6961
6962 #t))
6963 (replace 'check
6964 ;; The test phase uses the built library and executable.
6965 (lambda* (#:key inputs outputs #:allow-other-keys)
6966 (add-installed-pythonpath inputs outputs)
6967 (setenv "PATH" (string-append (getenv "PATH") ":"
6968 (assoc-ref outputs "out") "/bin"))
6969 (invoke "make" "test"))))))
6970 (build-system python-build-system)
6971 (native-inputs
6972 `(("python-coverage" ,python-coverage)
6973 ("which" ,which)))
6974 (synopsis "Simple testing framework for command line applications")
6975 (description
6976 "Cram is a functional testing framework for command line applications.
6977 Cram tests look like snippets of interactive shell sessions. Cram runs each
6978 command and compares the command output in the test with the command’s actual
6979 output.")
6980 (license license:gpl2+)))
6981
6982 (define-public python2-cram
6983 (package-with-python2 python-cram))
6984
6985 (define-public python-straight-plugin
6986 (package
6987 (name "python-straight-plugin")
6988 (version "1.4.1")
6989 (source
6990 (origin
6991 (method url-fetch)
6992 (uri (pypi-uri "straight.plugin" version))
6993 (sha256
6994 (base32
6995 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6996 (build-system python-build-system)
6997 (home-page "https://github.com/ironfroggy/straight.plugin")
6998 (synopsis "Simple namespaced plugin facility")
6999 (description "Straight Plugin provides a type of plugin you can create from
7000 almost any existing Python modules, and an easy way for outside developers to
7001 add functionality and customization to your projects with their own plugins.")
7002 (license license:expat)))
7003
7004 (define-public python2-straight-plugin
7005 (package-with-python2 python-straight-plugin))
7006
7007 (define-public python-fonttools
7008 (package
7009 (name "python-fonttools")
7010 (version "4.2.4")
7011 (source (origin
7012 (method url-fetch)
7013 (uri (pypi-uri "fonttools" version ".zip"))
7014 (sha256
7015 (base32
7016 "0rz2fn707x8ri507bb5k5y3di851dwchn0886f77g5bgiflmnpwm"))))
7017 (build-system python-build-system)
7018 (native-inputs
7019 `(("unzip" ,unzip)
7020 ("python-pytest" ,python-pytest)
7021 ("python-pytest-runner" ,python-pytest-runner)))
7022 (home-page "https://github.com/fonttools/fonttools")
7023 (synopsis "Tools to manipulate font files")
7024 (description
7025 "FontTools/TTX is a library to manipulate font files from Python. It
7026 supports reading and writing of TrueType/OpenType fonts, reading and writing
7027 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
7028 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
7029 from an XML-based format.")
7030 (license license:expat)))
7031
7032 ;; Fonttools 4.x dropped support for Python 2, so stick with 3.x here.
7033 (define-public python2-fonttools
7034 (let ((base (package-with-python2 (strip-python2-variant python-fonttools))))
7035 (package/inherit
7036 base
7037 (version "3.44.0")
7038 (source (origin
7039 (method url-fetch)
7040 (uri (pypi-uri "fonttools" version ".zip"))
7041 (sha256
7042 (base32
7043 "0v6399g755f2hn1ry62i5b6gdinf2fpx2966v3bxh6bjw1accb5p")))))))
7044
7045 (define-public python-ly
7046 (package
7047 (name "python-ly")
7048 (version "0.9.5")
7049 (source
7050 (origin
7051 (method url-fetch)
7052 (uri (pypi-uri name version))
7053 (sha256
7054 (base32
7055 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
7056 (build-system python-build-system)
7057 (arguments
7058 ;; FIXME: Some tests need network access.
7059 '(#:tests? #f))
7060 (synopsis "Tool and library for manipulating LilyPond files")
7061 (description "This package provides a Python library to parse, manipulate
7062 or create documents in LilyPond format. A command line program ly is also
7063 provided that can be used to do various manipulations with LilyPond files.")
7064 (home-page "https://pypi.org/project/python-ly/")
7065 (license license:gpl2+)))
7066
7067 (define-public python-appdirs
7068 (package
7069 (name "python-appdirs")
7070 (version "1.4.3")
7071 (source
7072 (origin
7073 (method url-fetch)
7074 (uri (pypi-uri "appdirs" version))
7075 (sha256
7076 (base32
7077 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
7078 (build-system python-build-system)
7079 (home-page "https://github.com/ActiveState/appdirs")
7080 (synopsis
7081 "Determine platform-specific dirs, e.g. a \"user data dir\"")
7082 (description
7083 "This module provides a portable way of finding out where user data
7084 should be stored on various operating systems.")
7085 (license license:expat)))
7086
7087 (define-public python2-appdirs
7088 (package-with-python2 python-appdirs))
7089
7090 (define-public python-llfuse
7091 (package
7092 (name "python-llfuse")
7093 (version "1.3.5")
7094 (source (origin
7095 (method url-fetch)
7096 (uri (pypi-uri "llfuse" version ".tar.bz2"))
7097 (sha256
7098 (base32
7099 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
7100 (build-system python-build-system)
7101 (inputs
7102 `(("fuse" ,fuse)
7103 ("attr" ,attr)))
7104 (native-inputs
7105 `(("pkg-config" ,pkg-config)))
7106 (synopsis "Python bindings for FUSE")
7107 (description
7108 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
7109 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
7110 (license license:lgpl2.0+)
7111 (properties `((python2-variant . ,(delay python2-llfuse))))))
7112
7113 (define-public python2-llfuse
7114 (package (inherit (package-with-python2
7115 (strip-python2-variant python-llfuse)))
7116 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
7117
7118 ;; For attic-0.16
7119 (define-public python-llfuse-0.41
7120 (package (inherit python-llfuse)
7121 (version "0.41.1")
7122 (source (origin
7123 (method url-fetch)
7124 (uri (string-append
7125 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
7126 "llfuse-" version ".tar.bz2"))
7127 (sha256
7128 (base32
7129 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
7130 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
7131 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
7132 (license (list license:expat license:lgpl2.0+))))
7133
7134 (define-public python-msgpack
7135 (package
7136 (name "python-msgpack")
7137 (version "0.5.6")
7138 (source (origin
7139 (method url-fetch)
7140 (uri (pypi-uri "msgpack" version))
7141 (sha256
7142 (base32
7143 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
7144 (build-system python-build-system)
7145 (arguments
7146 `(#:modules ((guix build utils)
7147 (guix build python-build-system)
7148 (ice-9 ftw)
7149 (srfi srfi-1)
7150 (srfi srfi-26))
7151 #:phases
7152 (modify-phases %standard-phases
7153 (replace 'check
7154 (lambda _
7155 (let ((cwd (getcwd)))
7156 (setenv "PYTHONPATH"
7157 (string-append cwd "/build/"
7158 (find (cut string-prefix? "lib" <>)
7159 (scandir (string-append cwd "/build")))
7160 ":"
7161 (getenv "PYTHONPATH")))
7162 (invoke "pytest" "-v" "test")))))))
7163 (native-inputs
7164 `(("python-pytest" ,python-pytest)))
7165 (synopsis "MessagePack (de)serializer")
7166 (description "MessagePack is a fast, compact binary serialization format,
7167 suitable for similar data to JSON. This package provides CPython bindings for
7168 reading and writing MessagePack data.")
7169 (home-page "https://pypi.org/project/msgpack/")
7170 (license license:asl2.0)))
7171
7172 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
7173 ;; release 0.5. Some packages like borg still call it by the old name for now.
7174 ;; <https://bugs.gnu.org/30662>
7175 (define-public python-msgpack-transitional
7176 (package
7177 (inherit python-msgpack)
7178 (name "python-msgpack-transitional")
7179 (arguments
7180 (substitute-keyword-arguments (package-arguments python-msgpack)
7181 ((#:phases phases)
7182 `(modify-phases ,phases
7183 (add-after 'unpack 'configure-transitional
7184 (lambda _
7185 ;; Keep using the old name.
7186 (substitute* "setup.py"
7187 (("TRANSITIONAL = False")
7188 "TRANSITIONAL = 1"))
7189 #t))))))))
7190
7191 (define-public python2-msgpack
7192 (package-with-python2 python-msgpack))
7193
7194 (define-public python-netaddr
7195 (package
7196 (name "python-netaddr")
7197 (version "0.7.19")
7198 (source
7199 (origin
7200 (method url-fetch)
7201 (uri (pypi-uri "netaddr" version))
7202 (sha256
7203 (base32
7204 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
7205 (build-system python-build-system)
7206 (arguments `(#:tests? #f)) ;; No tests.
7207 (home-page "https://github.com/drkjam/netaddr/")
7208 (synopsis "Pythonic manipulation of network addresses")
7209 (description
7210 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
7211 and MAC network addresses.")
7212 (license license:bsd-3)))
7213
7214 (define-public python2-netaddr
7215 (package-with-python2 python-netaddr))
7216
7217 (define-public python2-pyroute2
7218 (package
7219 (name "python2-pyroute2")
7220 (version "0.5.6")
7221 (source
7222 (origin
7223 (method url-fetch)
7224 (uri (pypi-uri "pyroute2" version))
7225 (sha256
7226 (base32
7227 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
7228 (build-system python-build-system)
7229 (arguments
7230 `(#:python ,python-2)) ;Python 3.x is not supported
7231 (home-page "https://github.com/svinota/pyroute2")
7232 (synopsis "Python netlink library")
7233 (description
7234 "Pyroute2 is a pure Python netlink library with minimal dependencies.
7235 Supported netlink families and protocols include:
7236 @itemize
7237 @item rtnl, network settings - addresses, routes, traffic controls
7238 @item nfnetlink - netfilter API: ipset, nftables, ...
7239 @item ipq - simplest userspace packet filtering, iptables QUEUE target
7240 @item devlink - manage and monitor devlink-enabled hardware
7241 @item generic - generic netlink families
7242 @itemize
7243 @item nl80211 - wireless functions API (basic support)
7244 @item taskstats - extended process statistics
7245 @item acpi_events - ACPI events monitoring
7246 @item thermal_events - thermal events monitoring
7247 @item VFS_DQUOT - disk quota events monitoring
7248 @end itemize
7249 @end itemize")
7250 (license license:gpl2+)))
7251
7252 (define-public python-wrapt
7253 (package
7254 (name "python-wrapt")
7255 (version "1.11.2")
7256 (source
7257 (origin
7258 (method url-fetch)
7259 (uri (pypi-uri "wrapt" version))
7260 (sha256
7261 (base32
7262 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
7263 (build-system python-build-system)
7264 (arguments
7265 ;; Tests are not included in the tarball, they are only available in the
7266 ;; git repository.
7267 `(#:tests? #f))
7268 (home-page "https://github.com/GrahamDumpleton/wrapt")
7269 (synopsis "Module for decorators, wrappers and monkey patching")
7270 (description
7271 "The aim of the wrapt module is to provide a transparent object proxy for
7272 Python, which can be used as the basis for the construction of function
7273 wrappers and decorator functions.")
7274 (license license:bsd-2)))
7275
7276 (define-public python2-wrapt
7277 (package-with-python2 python-wrapt))
7278
7279 (define-public python-xlrd
7280 (package
7281 (name "python-xlrd")
7282 (version "1.2.0")
7283 (source (origin
7284 (method url-fetch)
7285 (uri (pypi-uri "xlrd" version))
7286 (sha256
7287 (base32
7288 "1ci93fda4n67qhdvfl16zasyxrpygzk53hs6m8z0rd4dxrnb6vjl"))))
7289 (build-system python-build-system)
7290 (arguments
7291 `(#:phases
7292 (modify-phases %standard-phases
7293 ;; Some tests depend on writing a temporary file to the user's home
7294 ;; directory.
7295 (add-after 'unpack 'fix-tests
7296 (lambda _
7297 (delete-file "tests/test_open_workbook.py")
7298 #t)))))
7299 (home-page "http://www.python-excel.org/")
7300 (synopsis "Library for extracting data from Excel files")
7301 (description "This package provides a library to extract data from
7302 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
7303 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
7304 Unicode-aware. It is not intended as an end-user tool.")
7305 (license license:bsd-3)))
7306
7307 (define-public python2-xlrd
7308 (package-with-python2 python-xlrd))
7309
7310 (define-public python-prettytable
7311 (package
7312 (name "python-prettytable")
7313 (version "0.7.2")
7314 (source
7315 (origin
7316 (method url-fetch)
7317 (uri (pypi-uri "prettytable" version ".tar.bz2"))
7318 (sha256
7319 (base32
7320 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7321 (build-system python-build-system)
7322 (home-page "https://code.google.com/archive/p/prettytable/")
7323 (synopsis "Display tabular data in an ASCII table format")
7324 (description
7325 "A library designed to represent tabular data in visually appealing ASCII
7326 tables. PrettyTable allows for selection of which columns are to be printed,
7327 independent alignment of columns (left or right justified or centred) and
7328 printing of sub-tables by specifying a row range.")
7329 (license license:bsd-3)))
7330
7331 (define-public python2-prettytable
7332 (package-with-python2 python-prettytable))
7333
7334 (define-public python-tables
7335 (package
7336 (name "python-tables")
7337 (version "3.4.4")
7338 (source
7339 (origin
7340 (method url-fetch)
7341 (uri (pypi-uri "tables" version))
7342 (sha256
7343 (base32
7344 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
7345 (modules '((guix build utils)))
7346 (snippet
7347 '(begin
7348 ;; Remove pre-compiled .pyc files from source.
7349 (for-each delete-file-recursively
7350 (find-files "." "__pycache__" #:directories? #t))
7351 (for-each delete-file (find-files "." "\\.pyc$"))
7352 #t))))
7353 (build-system python-build-system)
7354 (arguments
7355 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7356 ;; or "check", so we must override the build and check phases.
7357 #:phases
7358 (modify-phases %standard-phases
7359 (add-after 'unpack 'use-gcc
7360 (lambda _
7361 (substitute* "setup.py"
7362 (("compiler = new_compiler\\(\\)" line)
7363 (string-append line
7364 "\ncompiler.set_executables(compiler='gcc',"
7365 "compiler_so='gcc',"
7366 "linker_exe='gcc',"
7367 "linker_so='gcc -shared')")))
7368 #t))
7369 (add-after 'unpack 'disable-tuning
7370 (lambda _
7371 (substitute* "setup.py"
7372 (("cpu_flags = .*")
7373 "cpu_flags = ['sse2']\n"))
7374 #t))
7375 (replace 'build
7376 (lambda* (#:key inputs #:allow-other-keys)
7377 (invoke "python" "setup.py" "build"
7378 (string-append "--hdf5="
7379 (assoc-ref inputs "hdf5")))))
7380 (replace 'check
7381 (lambda* (#:key inputs #:allow-other-keys)
7382 (invoke "python" "setup.py" "check"
7383 (string-append "--hdf5="
7384 (assoc-ref inputs "hdf5"))))))))
7385 (propagated-inputs
7386 `(("python-numexpr" ,python-numexpr)
7387 ("python-numpy" ,python-numpy)))
7388 (native-inputs
7389 `(("python-cython" ,python-cython)
7390 ("pkg-config" ,pkg-config)))
7391 (inputs
7392 `(("hdf5" ,hdf5-1.10)
7393 ("bzip2" ,bzip2)
7394 ("zlib" ,zlib)))
7395 (home-page "http://www.pytables.org/")
7396 (synopsis "Hierarchical datasets for Python")
7397 (description "PyTables is a package for managing hierarchical datasets and
7398 designed to efficiently cope with extremely large amounts of data.")
7399 (license license:bsd-3)))
7400
7401 (define-public python2-tables
7402 (package-with-python2 python-tables))
7403
7404 (define-public python-pytest-black
7405 (package
7406 (name "python-pytest-black")
7407 (version "0.3.8")
7408 (source
7409 (origin
7410 (method url-fetch)
7411 (uri (pypi-uri "pytest-black" version))
7412 (sha256
7413 (base32
7414 "04lppqydxm0f3f3x0l8hj7v0j6d8syj34jc37yzqwqcyqsnaga81"))))
7415 (build-system python-build-system)
7416 (propagated-inputs
7417 `(("python-pytest" ,python-pytest)
7418 ("python-black" ,python-black)
7419 ("python-toml" ,python-toml)))
7420 (native-inputs
7421 `(("python-setuptools-scm" ,python-setuptools-scm)))
7422 (home-page "https://github.com/shopkeep/pytest-black")
7423 (synopsis "Pytest plugin to enable format checking with black")
7424 (description
7425 "This package provides a pytest plugin to enable format checking with the
7426 Python code formatter \"black\".")
7427 (license license:expat)))
7428
7429 (define-public python-get-version
7430 (package
7431 (name "python-get-version")
7432 (version "2.1")
7433 (source
7434 (origin
7435 (method url-fetch)
7436 (uri (pypi-uri "get_version" version))
7437 (sha256
7438 (base32
7439 "1g15jyx33vkxavv9hwv275cs4g9bp2i1y942raw3fxamq8kbaml1"))))
7440 (build-system python-build-system)
7441 (propagated-inputs
7442 `(("python-pygments" ,python-pygments)
7443 ("python-pytest" ,python-pytest)
7444 ("python-pytest-black" ,python-pytest-black)
7445 ("python-pytest-cov" ,python-pytest-cov)
7446 ("python-setuptools" ,python-setuptools)
7447 ("python-testpath" ,python-testpath)))
7448 (home-page "https://github.com/flying-sheep/get_version")
7449 (synopsis "Version helper in the spirit of versioneer")
7450 (description
7451 "This package provides a version helper that lets you automatically use
7452 the latest @code{vX.X.X} Git tag as the version in your Python package. It
7453 also supports getting the version from Python source distributions or, once
7454 your package is installed, via @code{pkg_resources} (part of
7455 @code{setuptools}).")
7456 (license license:gpl3+)))
7457
7458 (define-public python-legacy-api-wrap
7459 (package
7460 (name "python-legacy-api-wrap")
7461 (version "1.2")
7462 (source
7463 (origin
7464 (method url-fetch)
7465 (uri (pypi-uri "legacy-api-wrap" version))
7466 (sha256
7467 (base32
7468 "06qhp0g543dy98vpa41hwdalvdbsjfc3ldk474yr9sd75mhl8jh3"))))
7469 (build-system python-build-system)
7470 (propagated-inputs
7471 `(("python-get-version" ,python-get-version)
7472 ("python-pytest" ,python-pytest)
7473 ("python-pytest-black" ,python-pytest-black)
7474 ("python-pytest-cov" ,python-pytest-cov)
7475 ("python-setuptools" ,python-setuptools)))
7476 (home-page "https://github.com/flying-sheep/legacy-api-wrap")
7477 (synopsis "Legacy API wrapper")
7478 (description "This module defines a decorator to wrap legacy APIs. The
7479 primary use case is APIs defined before keyword-only parameters existed.")
7480 (license license:gpl3+)))
7481
7482 (define-public python-pyasn1
7483 (package
7484 (name "python-pyasn1")
7485 (version "0.4.3")
7486 (source
7487 (origin
7488 (method url-fetch)
7489 (uri (pypi-uri "pyasn1" version))
7490 (sha256
7491 (base32
7492 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
7493 (build-system python-build-system)
7494 (home-page "http://pyasn1.sourceforge.net/")
7495 (synopsis "ASN.1 types and codecs")
7496 (description
7497 "This is an implementation of ASN.1 types and codecs in Python. It is
7498 suitable for a wide range of protocols based on the ASN.1 specification.")
7499 (license license:bsd-2)))
7500
7501 (define-public python2-pyasn1
7502 (package-with-python2 python-pyasn1))
7503
7504 (define-public python-pyasn1-modules
7505 (package
7506 (name "python-pyasn1-modules")
7507 (version "0.2.2")
7508 (source
7509 (origin
7510 (method url-fetch)
7511 (uri (pypi-uri "pyasn1-modules" version))
7512 (sha256
7513 (base32
7514 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
7515 (build-system python-build-system)
7516 (propagated-inputs
7517 `(("python-pyasn1" ,python-pyasn1)))
7518 (home-page "https://sourceforge.net/projects/pyasn1/")
7519 (synopsis "ASN.1 codec implementations")
7520 (description
7521 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7522 implementations of ASN.1-based codecs and protocols.")
7523 (license license:bsd-3)))
7524
7525 (define-public python2-pyasn1-modules
7526 (package-with-python2 python-pyasn1-modules))
7527
7528 (define-public python-ipaddress
7529 (package
7530 (name "python-ipaddress")
7531 (version "1.0.22")
7532 (source (origin
7533 (method url-fetch)
7534 (uri (pypi-uri "ipaddress" version))
7535 (sha256
7536 (base32
7537 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
7538 (build-system python-build-system)
7539 (home-page "https://github.com/phihag/ipaddress")
7540 (synopsis "IP address manipulation library")
7541 (description
7542 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7543 in Python. This library is used to create, poke at, and manipulate IPv4 and
7544 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7545 module to older versions of Python.")
7546 (license license:psfl)))
7547
7548 (define-public python2-ipaddress
7549 (package-with-python2 python-ipaddress))
7550
7551 (define-public python2-ipaddr
7552 (package
7553 (name "python2-ipaddr")
7554 (version "2.1.11")
7555 (source
7556 (origin
7557 (method url-fetch)
7558 (uri (pypi-uri "ipaddr" version))
7559 (sha256
7560 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7561 (build-system python-build-system)
7562 (arguments
7563 `(#:python ,python-2 ;version 2 only
7564 #:phases
7565 (modify-phases %standard-phases
7566 (replace 'check
7567 (lambda _ (invoke "python" "ipaddr_test.py"))))))
7568 (home-page "https://github.com/google/ipaddr-py")
7569 (synopsis "IP address manipulation library")
7570 (description
7571 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7572 IPv6 addresses and networks.
7573
7574 For new implementations you may prefer to use the standard module
7575 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
7576 versions of Python.")
7577 (license license:asl2.0)))
7578
7579 (define-public python-idna
7580 (package
7581 (name "python-idna")
7582 (version "2.8")
7583 (source
7584 (origin
7585 (method url-fetch)
7586 (uri (pypi-uri "idna" version))
7587 (sha256
7588 (base32
7589 "01rlkigdxg17sf9yar1jl8n18ls59367wqh59hnawlyg53vb6my3"))))
7590 (build-system python-build-system)
7591 (home-page "https://github.com/kjd/idna")
7592 (synopsis "Internationalized domain names in applications")
7593 (description
7594 "This is a library to support the Internationalised Domain Names in
7595 Applications (IDNA) protocol as specified in RFC 5891. This version of the
7596 protocol is often referred to as “IDNA2008” and can produce different results
7597 from the earlier standard from 2003. The library is also intended to act as a
7598 suitable drop-in replacement for the “encodings.idna” module that comes with
7599 the Python standard library but currently only supports the older 2003
7600 specification.")
7601 (license license:bsd-4)))
7602
7603 (define-public python-idna-2.7
7604 (package (inherit python-idna)
7605 (version "2.7")
7606 (source (origin
7607 (method url-fetch)
7608 (uri (pypi-uri "idna" version))
7609 (sha256
7610 (base32
7611 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
7612
7613
7614 (define-public python2-idna
7615 (package-with-python2 python-idna))
7616
7617 (define-public python-idna-ssl
7618 (package
7619 (name "python-idna-ssl")
7620 (version "1.0.1")
7621 (source
7622 (origin
7623 (method url-fetch)
7624 (uri (pypi-uri "idna-ssl" version))
7625 (sha256
7626 (base32
7627 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
7628 (build-system python-build-system)
7629 (arguments
7630 `(#:tests? #f)) ;circular dependency with python-aiohttp
7631 (home-page "https://github.com/aio-libs/idna-ssl")
7632 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
7633 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
7634 domains support.")
7635 (license license:expat)))
7636
7637 (define-public python-pretend
7638 (package
7639 (name "python-pretend")
7640 (version "1.0.9")
7641 (source
7642 (origin
7643 (method url-fetch)
7644 (uri (pypi-uri "pretend" version))
7645 (sha256
7646 (base32
7647 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
7648 (build-system python-build-system)
7649 (home-page "https://github.com/alex/pretend")
7650 (synopsis "Library for stubbing in Python")
7651 (description
7652 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7653 technique for writing tests. You may hear the term mixed up with mocks,
7654 fakes, or doubles. Basically, a stub is an object that returns pre-canned
7655 responses, rather than doing any computation.")
7656 (license license:bsd-3)))
7657
7658 (define-public python2-pretend
7659 (package-with-python2 python-pretend))
7660
7661 (define-public python-pip
7662 (package
7663 (name "python-pip")
7664 (version "20.0.2")
7665 (source
7666 (origin
7667 (method url-fetch)
7668 (uri (pypi-uri "pip" version))
7669 (sha256
7670 (base32
7671 "0zwnlsjn6mb742cr995zfbk9v56ygxp8w3k49601r9by9kmcic3x"))))
7672 (build-system python-build-system)
7673 (arguments
7674 '(#:tests? #f)) ; there are no tests in the pypi archive.
7675 (home-page "https://pip.pypa.io/")
7676 (synopsis "Package manager for Python software")
7677 (description
7678 "Pip is a package manager for Python software, that finds packages on the
7679 Python Package Index (PyPI).")
7680 (license license:expat)))
7681
7682 (define-public python2-pip
7683 (package-with-python2 python-pip))
7684
7685 (define-public python-tlsh
7686 (package
7687 (name "python-tlsh")
7688 (version "3.4.5")
7689 (home-page "https://github.com/trendmicro/tlsh")
7690 (source
7691 (origin
7692 (method git-fetch)
7693 (uri (git-reference
7694 (url "https://github.com/trendmicro/tlsh.git")
7695 (commit (string-append "v" version))))
7696 (file-name (git-file-name name version))
7697 (sha256
7698 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
7699 (build-system cmake-build-system)
7700 (arguments
7701 '(#:out-of-source? #f
7702 #:phases (modify-phases %standard-phases
7703 (replace
7704 'install
7705 (lambda* (#:key outputs #:allow-other-keys)
7706 ;; Build and install the Python bindings. The underlying
7707 ;; C++ library is apparently not meant to be installed.
7708 (let ((out (assoc-ref outputs "out")))
7709 (with-directory-excursion "py_ext"
7710 (and (system* "python" "setup.py" "build")
7711 (system* "python" "setup.py" "install"
7712 (string-append "--prefix=" out))))))))))
7713 (inputs `(("python" ,python-wrapper))) ;for the bindings
7714 (synopsis "Fuzzy matching library for Python")
7715 (description
7716 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7717 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7718 value which can be used for similarity comparisons. Similar objects have
7719 similar hash values, which allows for the detection of similar objects by
7720 comparing their hash values. The byte stream should have a sufficient amount
7721 of complexity; for example, a byte stream of identical bytes will not generate
7722 a hash value.")
7723 (license license:asl2.0)))
7724
7725 (define-public python2-tlsh
7726 (package
7727 (inherit python-tlsh)
7728 (name "python2-tlsh")
7729 (inputs `(("python" ,python-2)))))
7730
7731 (define-public python-termcolor
7732 (package
7733 (name "python-termcolor")
7734 (version "1.1.0")
7735 (source
7736 (origin
7737 (method url-fetch)
7738 (uri (pypi-uri "termcolor" version))
7739 (sha256
7740 (base32
7741 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7742 (build-system python-build-system)
7743 (arguments
7744 ;; There are no tests.
7745 `(#:tests? #f))
7746 (home-page "https://pypi.org/project/termcolor/")
7747 (synopsis "ANSII Color formatting for terminal output")
7748 (description
7749 "This package provides ANSII Color formatting for output in terminals.")
7750 (license license:expat)))
7751
7752 (define-public python2-termcolor
7753 (package-with-python2 python-termcolor))
7754
7755 (define-public python-libarchive-c
7756 (package
7757 (name "python-libarchive-c")
7758 (version "2.9")
7759 (source (origin
7760 (method url-fetch)
7761 (uri (pypi-uri "libarchive-c" version))
7762 (sha256
7763 (base32
7764 "0q7g6a97110bk0j5x81555kajyxh4sybaabab6v5sgr0xi6386cr"))))
7765 (build-system python-build-system)
7766 (arguments
7767 '(#:phases (modify-phases %standard-phases
7768 (add-before
7769 'build 'reference-libarchive
7770 (lambda* (#:key inputs #:allow-other-keys)
7771 ;; Retain the absolute file name of libarchive.so.
7772 (let ((libarchive (assoc-ref inputs "libarchive")))
7773 (substitute* "libarchive/ffi.py"
7774 (("find_library\\('archive'\\)")
7775 (string-append "'" libarchive
7776 "/lib/libarchive.so'"))))))
7777 (replace 'check
7778 (lambda _ (invoke "pytest" "-vv"))))))
7779 (native-inputs
7780 `(("python-mock" ,python-mock)
7781 ("python-pytest" ,python-pytest)))
7782 (inputs
7783 `(("libarchive" ,libarchive)))
7784 (home-page "https://github.com/Changaco/python-libarchive-c")
7785 (synopsis "Python interface to libarchive")
7786 (description
7787 "This package provides Python bindings to libarchive, a C library to
7788 access possibly compressed archives in many different formats. It uses
7789 Python's @code{ctypes} foreign function interface (FFI).")
7790 (license license:lgpl2.0+)))
7791
7792 (define-public python2-libarchive-c
7793 (package-with-python2 python-libarchive-c))
7794
7795 (define-public python-file
7796 (package
7797 (inherit file)
7798 (name "python-file")
7799 (build-system python-build-system)
7800 (arguments
7801 '(#:tests? #f ;no tests
7802 #:configure-flags '("--single-version-externally-managed" "--root=/")
7803 #:phases (modify-phases %standard-phases
7804 (add-before 'build 'change-directory
7805 (lambda _
7806 (chdir "python")
7807 #t))
7808 (add-before 'build 'set-library-file-name
7809 (lambda* (#:key inputs #:allow-other-keys)
7810 (let ((file (assoc-ref inputs "file")))
7811 (substitute* "magic.py"
7812 (("find_library\\('magic'\\)")
7813 (string-append "'" file "/lib/libmagic.so'")))
7814 #t))))))
7815 (inputs `(("file" ,file)))
7816 (native-inputs (if (%current-target-system)
7817 `(("self" ,this-package))
7818 '()))
7819 (synopsis "Python bindings to the libmagic file type guesser. Note that
7820 this module and the python-magic module both provide a \"magic.py\" file;
7821 these two modules, which are different and were developed separately, both
7822 serve the same purpose: provide Python bindings for libmagic.")))
7823
7824 (define-public python2-file
7825 (package-with-python2 python-file))
7826
7827 (define-public python-debian
7828 (package
7829 (name "python-debian")
7830 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
7831 (version "0.1.36")
7832 (source
7833 (origin
7834 ;; Use git-fetch, as pypi doesn't include test suite.
7835 (method git-fetch)
7836 (uri (git-reference
7837 (url home-page)
7838 (commit version)))
7839 (file-name (git-file-name name version))
7840 (sha256
7841 (base32
7842 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
7843 (build-system python-build-system)
7844 (arguments
7845 `(#:phases (modify-phases %standard-phases
7846 (add-after 'unpack 'remove-debian-specific-tests
7847 ;; python-apt, apt and dpkg are not yet available in guix,
7848 ;; and these tests heavily depend on them.
7849 (lambda _
7850 (delete-file "lib/debian/tests/test_deb822.py")
7851 (delete-file "lib/debian/tests/test_debfile.py")
7852 #t)))))
7853 (propagated-inputs
7854 `(("python-six" ,python-six)
7855 ("python-chardet" ,python-chardet)))
7856 (synopsis "Debian package related modules")
7857 (description
7858 ;; XXX: Use @enumerate instead of @itemize to work around
7859 ;; <http://bugs.gnu.org/21772>.
7860 "This package provides Python modules that abstract many formats of
7861 Debian-related files, such as:
7862
7863 @enumerate
7864 @item Debtags information;
7865 @item @file{debian/changelog} files;
7866 @item packages files, pdiffs;
7867 @item control files of single or multiple RFC822-style paragraphs---e.g.
7868 @file{debian/control}, @file{.changes}, @file{.dsc};
7869 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7870 contained files and meta-information.
7871 @end enumerate\n")
7872
7873 ;; Modules are either GPLv2+ or GPLv3+.
7874 (license license:gpl3+)))
7875
7876 (define-public python-nbformat
7877 (package
7878 (name "python-nbformat")
7879 (version "4.4.0")
7880 (source
7881 (origin
7882 (method url-fetch)
7883 (uri (pypi-uri "nbformat" version))
7884 (sha256
7885 (base32
7886 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
7887 (build-system python-build-system)
7888 (arguments `(#:tests? #f)) ; no test target
7889 (propagated-inputs
7890 `(("python-ipython-genutils" ,python-ipython-genutils)
7891 ("python-jsonschema" ,python-jsonschema)
7892 ("python-jupyter-core" ,python-jupyter-core)
7893 ("python-traitlets" ,python-traitlets)))
7894 (home-page "http://jupyter.org")
7895 (synopsis "Jupyter Notebook format")
7896 (description "This package provides the reference implementation of the
7897 Jupyter Notebook format and Python APIs for working with notebooks.")
7898 (license license:bsd-3)))
7899
7900 (define-public python2-nbformat
7901 (package-with-python2 python-nbformat))
7902
7903 (define-public python-bleach
7904 (package
7905 (name "python-bleach")
7906 (version "3.1.1")
7907 (source
7908 (origin
7909 (method url-fetch)
7910 (uri (pypi-uri "bleach" version))
7911 (sha256
7912 (base32
7913 "0j4xlnw99m1xy0s7wxz9fk5f3c1n8r296fh75jn5p5j61w6qg2xa"))))
7914 (build-system python-build-system)
7915 (propagated-inputs
7916 `(("python-webencodings" ,python-webencodings)
7917 ("python-six" ,python-six)))
7918 (native-inputs
7919 `(("python-pytest" ,python-pytest)
7920 ("python-pytest-runner" ,python-pytest-runner-2)))
7921 (home-page "https://github.com/jsocol/bleach")
7922 (synopsis "Whitelist-based HTML-sanitizing tool")
7923 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7924 (license license:asl2.0)))
7925
7926 (define-public python2-bleach
7927 (package-with-python2 python-bleach))
7928
7929 (define-public python-entrypoints
7930 (package
7931 (name "python-entrypoints")
7932 (version "0.3")
7933 (source
7934 (origin
7935 (method url-fetch)
7936 (uri (pypi-uri "entrypoints" version))
7937 (sha256
7938 (base32
7939 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
7940 (build-system python-build-system)
7941 ;; The package does not come with a setup.py file, so we have to generate
7942 ;; one ourselves.
7943 (arguments
7944 `(#:tests? #f
7945 #:phases
7946 (modify-phases %standard-phases
7947 (add-after 'unpack 'create-setup.py
7948 (lambda _
7949 (call-with-output-file "setup.py"
7950 (lambda (port)
7951 (format port "\
7952 from setuptools import setup
7953 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7954 " ,version))))))))
7955 (home-page "https://github.com/takluyver/entrypoints")
7956 (synopsis "Discover and load entry points from installed Python packages")
7957 (description "Entry points are a way for Python packages to advertise
7958 objects with some common interface. The most common examples are
7959 @code{console_scripts} entry points, which define shell commands by
7960 identifying a Python function to run. The @code{entrypoints} module contains
7961 functions to find and load entry points.")
7962 (license license:expat)))
7963
7964 (define-public python2-entrypoints
7965 (package-with-python2 python-entrypoints))
7966
7967 (define-public python-nbconvert
7968 (package
7969 (name "python-nbconvert")
7970 (version "5.0.0b1")
7971 (source
7972 (origin
7973 (method url-fetch)
7974 (uri (pypi-uri "nbconvert" version))
7975 (sha256
7976 (base32
7977 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7978 (build-system python-build-system)
7979 (arguments
7980 `(;; The "bdist_egg" target is disabled by default, causing the installation
7981 ;; to fail.
7982 #:configure-flags (list "bdist_egg")
7983 ;; FIXME: 5 failures, 40 errors.
7984 #:tests? #f))
7985 ;; #:phases
7986 ;; (modify-phases %standard-phases
7987 ;; (replace 'check
7988 ;; (lambda _
7989 ;; (zero? (system* "py.test" "-v")))))
7990 (native-inputs
7991 `(("python-pytest" ,python-pytest)))
7992 (propagated-inputs
7993 `(("python-bleach" ,python-bleach)
7994 ("python-entrypoints" ,python-entrypoints)
7995 ("python-jinja2" ,python-jinja2)
7996 ("python-jupyter-core" ,python-jupyter-core)
7997 ("python-mistune" ,python-mistune)
7998 ("python-nbformat" ,python-nbformat)
7999 ("python-pygments" ,python-pygments)
8000 ("python-traitlets" ,python-traitlets)))
8001 (home-page "http://jupyter.org")
8002 (synopsis "Converting Jupyter Notebooks")
8003 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
8004 notebooks to various other formats via Jinja templates. It allows you to
8005 convert an @code{.ipynb} notebook file into various static formats including:
8006
8007 @enumerate
8008 @item HTML
8009 @item LaTeX
8010 @item PDF
8011 @item Reveal JS
8012 @item Markdown (md)
8013 @item ReStructured Text (rst)
8014 @item executable script
8015 @end enumerate\n")
8016 (license license:bsd-3)))
8017
8018 (define-public python2-nbconvert
8019 (package-with-python2 python-nbconvert))
8020
8021 (define-public python-notebook
8022 (package
8023 (name "python-notebook")
8024 (version "5.7.4")
8025 (source (origin
8026 (method url-fetch)
8027 (uri (pypi-uri "notebook" version))
8028 (sha256
8029 (base32
8030 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
8031 (build-system python-build-system)
8032 (arguments
8033 `(#:phases
8034 (modify-phases %standard-phases
8035 (replace 'check
8036 (lambda _
8037 ;; These tests require a browser
8038 (delete-file-recursively "notebook/tests/selenium")
8039 ;; Some tests need HOME
8040 (setenv "HOME" "/tmp")
8041 ;; This file contains "warningfilters", which are not supported
8042 ;; by this version of nose.
8043 (delete-file "setup.cfg")
8044 (with-directory-excursion "/tmp"
8045 (invoke "nosetests" "-v"))
8046 #t)))))
8047 (propagated-inputs
8048 `(("python-jupyter-core" ,python-jupyter-core)
8049 ("python-nbformat" ,python-nbformat)
8050 ("python-nbconvert" ,python-nbconvert)
8051 ("python-prometheus-client" ,python-prometheus-client)
8052 ("python-send2trash" ,python-send2trash)
8053 ("python-terminado" ,python-terminado)))
8054 (native-inputs
8055 `(("python-nose" ,python-nose)
8056 ("python-sphinx" ,python-sphinx)
8057 ("python-requests" ,python-requests)))
8058 (home-page "http://jupyter.org/")
8059 (synopsis "Web-based notebook environment for interactive computing")
8060 (description
8061 "The Jupyter HTML notebook is a web-based notebook environment for
8062 interactive computing.")
8063 (properties `((python2-variant . ,(delay python2-notebook))))
8064 (license license:bsd-3)))
8065
8066 (define-public python2-notebook
8067 (let ((base (package-with-python2
8068 (strip-python2-variant python-notebook))))
8069 (package (inherit base)
8070 (native-inputs
8071 `(("python2-mock" ,python2-mock)
8072 ,@(package-native-inputs base)))
8073 (arguments
8074 (substitute-keyword-arguments (package-arguments base)
8075 ((#:phases phases)
8076 `(modify-phases ,phases
8077 (add-before 'check 'disable-test-case
8078 ;; The test requires network access to localhost. Curiously it
8079 ;; fails with Python 2 only. Simply make the test-case return
8080 ;; immediately.
8081 (lambda _
8082 (substitute*
8083 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
8084 (("formats = self.nbconvert_api") "return #")))))))))))
8085
8086 (define-public python-widgetsnbextension
8087 (package
8088 (name "python-widgetsnbextension")
8089 (version "3.4.2")
8090 (source
8091 (origin
8092 (method url-fetch)
8093 (uri (pypi-uri "widgetsnbextension" version))
8094 (sha256
8095 (base32
8096 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
8097 (build-system python-build-system)
8098 (propagated-inputs
8099 `(("python-ipykernel" ,python-ipykernel)
8100 ("python-notebook" ,python-notebook)))
8101 (native-inputs
8102 `(("python-certifi" ,python-certifi)
8103 ("python-nose" ,python-nose)))
8104 (home-page "https://ipython.org")
8105 (synopsis "IPython HTML widgets for Jupyter")
8106 (description "This package provides interactive HTML widgets for Jupyter
8107 notebooks.")
8108 (license license:bsd-3)))
8109
8110 (define-public python2-widgetsnbextension
8111 (package-with-python2 python-widgetsnbextension))
8112
8113 (define-public python-ipywidgets
8114 (package
8115 (name "python-ipywidgets")
8116 (version "5.2.2")
8117 (source
8118 (origin
8119 (method url-fetch)
8120 (uri (pypi-uri "ipywidgets" version))
8121 (sha256
8122 (base32
8123 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
8124 (build-system python-build-system)
8125 (propagated-inputs
8126 `(("python-ipython" ,python-ipython)
8127 ("python-traitlets" ,python-traitlets)
8128 ("python-widgetsnbextension" ,python-widgetsnbextension)))
8129 (native-inputs
8130 `(("python-nose" ,python-nose)
8131 ("python-pytest" ,python-pytest)))
8132 (home-page "https://ipython.org")
8133 (synopsis "IPython HTML widgets for Jupyter")
8134 (description "Ipywidgets are interactive HTML widgets for Jupyter
8135 notebooks and the IPython kernel. Notebooks come alive when interactive
8136 widgets are used. Users gain control of their data and can visualize changes
8137 in the data.")
8138 (license license:bsd-3)))
8139
8140 (define-public python2-ipywidgets
8141 (package-with-python2 python-ipywidgets))
8142
8143 (define-public python-jupyter-console
8144 (package
8145 (name "python-jupyter-console")
8146 (version "6.0.0")
8147 (source
8148 (origin
8149 (method url-fetch)
8150 (uri (pypi-uri "jupyter_console" version))
8151 (sha256
8152 (base32
8153 "1xdjw11cppf1fxvwkw2bk13ckkwas3bdah8baingn9296mvfi31h"))))
8154 (build-system python-build-system)
8155 (propagated-inputs
8156 `(("python-ipykernel" ,python-ipykernel)
8157 ("python-jupyter-client" ,python-jupyter-client)
8158 ("python-prompt-toolkit" ,python-prompt-toolkit)
8159 ("python-pygments" ,python-pygments)))
8160 (native-inputs
8161 `(("python-nose" ,python-nose)))
8162 (home-page "https://jupyter.org")
8163 (synopsis "Jupyter terminal console")
8164 (description "This package provides a terminal-based console frontend for
8165 Jupyter kernels. It also allows for console-based interaction with non-Python
8166 Jupyter kernels such as IJulia and IRKernel.")
8167 (license license:bsd-3)))
8168
8169 (define-public python2-jupyter-console
8170 (package
8171 (name "python2-jupyter-console")
8172 (version "5.2.0")
8173 (source
8174 (origin
8175 (method url-fetch)
8176 (uri (pypi-uri "jupyter_console" version))
8177 (sha256
8178 (base32
8179 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
8180 (build-system python-build-system)
8181 ;; Tests only run in an TTY.
8182 (arguments `(#:tests? #f))
8183 (propagated-inputs
8184 `(("python2-ipykernel" ,python2-ipykernel)
8185 ("python2-jupyter-client" ,python2-jupyter-client)
8186 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
8187 ("python2-pygments" ,python2-pygments)))
8188 (native-inputs
8189 `(("python2-nose" ,python2-nose)))
8190 (home-page "https://jupyter.org")
8191 (synopsis "Jupyter terminal console")
8192 (description "This package provides a terminal-based console frontend for
8193 Jupyter kernels. It also allows for console-based interaction with non-Python
8194 Jupyter kernels such as IJulia and IRKernel.")
8195 (license license:bsd-3)))
8196
8197 ;; The python-ipython and python-jupyter-console require each other. To get
8198 ;; the functionality in both packages working, strip down the
8199 ;; python-jupyter-console package when using it as an input to python-ipython.
8200 (define python-jupyter-console-minimal
8201 (package
8202 (inherit python-jupyter-console)
8203 (name "python-jupyter-console-minimal")
8204 (arguments
8205 (substitute-keyword-arguments
8206 (package-arguments python-jupyter-console)
8207 ((#:phases phases)
8208 `(modify-phases ,phases
8209 (add-after 'install 'delete-bin
8210 (lambda* (#:key outputs #:allow-other-keys)
8211 ;; Delete the bin files, to avoid conflicts in profiles
8212 ;; where python-ipython and python-jupyter-console are
8213 ;; both present.
8214 (delete-file-recursively
8215 (string-append
8216 (assoc-ref outputs "out") "/bin"))))))))
8217 ;; Remove the python-ipython propagated input, to avoid the cycle
8218 (propagated-inputs
8219 (alist-delete
8220 "python-ipython"
8221 (package-propagated-inputs python-jupyter-console)))))
8222
8223 (define-public python-qtconsole
8224 (package
8225 (name "python-qtconsole")
8226 (version "4.4.3")
8227 (source
8228 (origin
8229 (method url-fetch)
8230 (uri (pypi-uri "qtconsole" version))
8231 (sha256
8232 (base32
8233 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
8234 (build-system python-build-system)
8235 (arguments
8236 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
8237 ;; but we only have the LTS version 5.x. This means that there might be
8238 ;; runtime errors, but since this is a dependency of the Jupyter package,
8239 ;; and Jupyter can be used without the qtconsole we can overlook this for
8240 ;; now.
8241 `(#:tests? #f
8242 #:phases
8243 (modify-phases %standard-phases
8244 (add-before 'check 'pre-check
8245 (lambda _
8246 (setenv "QT_QPA_PLATFORM" "offscreen")
8247 #t)))))
8248 (propagated-inputs
8249 `(("python-ipykernel" ,python-ipykernel)
8250 ("python-ipython" ,python-ipython)))
8251 (native-inputs
8252 `(("python-pytest" ,python-pytest)))
8253 (home-page "http://jupyter.org")
8254 (synopsis "Jupyter Qt console")
8255 (description "This package provides a Qt-based console for Jupyter with
8256 support for rich media output.")
8257 (license license:bsd-3)))
8258
8259 (define-public python-jsbeautifier
8260 (package
8261 (name "python-jsbeautifier")
8262 (version "1.10.2")
8263 (home-page "https://github.com/beautify-web/js-beautify")
8264 (source (origin
8265 (method git-fetch)
8266 (uri (git-reference
8267 (url home-page)
8268 (commit (string-append "v" version))))
8269 (file-name (git-file-name name version))
8270 (sha256
8271 (base32
8272 "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg"))))
8273 (build-system python-build-system)
8274 (arguments
8275 `(#:phases (modify-phases %standard-phases
8276 (add-after 'unpack 'chdir
8277 (lambda _
8278 ;; The upstream Git repository contains all the code,
8279 ;; but this package only builds the python code.
8280 (chdir "python")
8281 #t))
8282 (add-after 'unpack 'patch-python-six-requirements
8283 (lambda _
8284 (substitute* "python/setup.py"
8285 (("six>=1.12.0")
8286 "six>=1.11.0"))
8287 #t)))))
8288 (propagated-inputs
8289 `(("python-editorconfig" ,python-editorconfig)
8290 ("python-six" ,python-six)))
8291 (native-inputs
8292 `(("python-pytest" ,python-pytest)))
8293 (synopsis "JavaScript unobfuscator and beautifier")
8294 (description "Beautify, unpack or deobfuscate JavaScript, leveraging
8295 popular online obfuscators.")
8296 (license license:expat)))
8297
8298 (define-public jupyter
8299 (package
8300 (name "jupyter")
8301 (version "1.0.0")
8302 (source
8303 (origin
8304 (method url-fetch)
8305 (uri (pypi-uri "jupyter" version))
8306 (sha256
8307 (base32
8308 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
8309 (build-system python-build-system)
8310 (arguments '(#:tests? #f)) ; there are none.
8311 (propagated-inputs
8312 `(("python-ipykernel" ,python-ipykernel)
8313 ("python-ipywidgets" ,python-ipywidgets)
8314 ("python-jupyter-console" ,python-jupyter-console)
8315 ("python-nbconvert" ,python-nbconvert)
8316 ("python-notebook" ,python-notebook)
8317 ("python-qtconsole" ,python-qtconsole)))
8318 (native-search-paths
8319 (list (search-path-specification
8320 (variable "JUPYTER_PATH")
8321 (files '("share/jupyter")))))
8322 (home-page "https://jupyter.org")
8323 (synopsis "Web application for interactive documents")
8324 (description
8325 "The Jupyter Notebook is a web application that allows you to create and
8326 share documents that contain live code, equations, visualizations and
8327 explanatory text. Uses include: data cleaning and transformation, numerical
8328 simulation, statistical modeling, machine learning and much more.")
8329 (license license:bsd-3)))
8330
8331 (define-public python-chardet
8332 (package
8333 (name "python-chardet")
8334 (version "3.0.4")
8335 (source
8336 (origin
8337 (method url-fetch)
8338 (uri (pypi-uri "chardet" version))
8339 (sha256
8340 (base32
8341 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
8342 (native-inputs
8343 `(("python-hypothesis" ,python-hypothesis)
8344 ("python-pytest" ,python-pytest)
8345 ("python-pytest-runner" ,python-pytest-runner)))
8346 (build-system python-build-system)
8347 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
8348 (arguments `(#:tests? #f))
8349 (home-page "https://github.com/chardet/chardet")
8350 (synopsis "Universal encoding detector for Python 2 and 3")
8351 (description
8352 "This package provides @code{chardet}, a Python module that can
8353 automatically detect a wide range of file encodings.")
8354 (license license:lgpl2.1+)))
8355
8356 (define-public python2-chardet
8357 (package-with-python2 python-chardet))
8358
8359 (define-public python-docopt
8360 (package
8361 (name "python-docopt")
8362 (version "0.6.2")
8363 (source
8364 (origin
8365 (method git-fetch)
8366 ;; The release on PyPI does not include tests.
8367 (uri (git-reference
8368 (url "https://github.com/docopt/docopt")
8369 (commit version)))
8370 (file-name (git-file-name name version))
8371 (sha256
8372 (base32
8373 "0aad9gbswnnhssin2q0m5lmpm0ahyf80ahs2zjigbn5y7fvljnd0"))))
8374 (build-system python-build-system)
8375 (native-inputs
8376 `(("python-pytest" ,python-pytest)))
8377 (arguments
8378 `(#:phases
8379 (modify-phases %standard-phases
8380 (replace 'check
8381 (lambda _ (invoke "py.test"))))))
8382 (home-page "http://docopt.org")
8383 (synopsis "Command-line interface description language for Python")
8384 (description "This library allows the user to define a command-line
8385 interface from a program's help message rather than specifying it
8386 programmatically with command-line parsers like @code{getopt} and
8387 @code{argparse}.")
8388 (license license:expat)))
8389
8390 (define-public python2-docopt
8391 (package-with-python2 python-docopt))
8392
8393 (define-public python-pythondialog
8394 (package
8395 (name "python-pythondialog")
8396 (version "3.4.0")
8397 (source
8398 (origin
8399 (method url-fetch)
8400 (uri (pypi-uri "pythondialog" version))
8401 (sha256
8402 (base32
8403 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
8404 (build-system python-build-system)
8405 (arguments
8406 `(#:phases
8407 (modify-phases %standard-phases
8408 (add-after 'unpack 'patch-path
8409 (lambda* (#:key inputs #:allow-other-keys)
8410 (let* ((dialog (assoc-ref inputs "dialog")))
8411 ;; Since this library really wants to grovel the search path, we
8412 ;; must hardcode dialog's store path into it.
8413 (substitute* "dialog.py"
8414 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
8415 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
8416 #t))))
8417 #:tests? #f)) ; no test suite
8418 (propagated-inputs
8419 `(("dialog" ,dialog)))
8420 (home-page "http://pythondialog.sourceforge.net/")
8421 (synopsis "Python interface to the UNIX dialog utility")
8422 (description "A Python wrapper for the dialog utility. Its purpose is to
8423 provide an easy to use, pythonic and comprehensive Python interface to dialog.
8424 This allows one to make simple text-mode user interfaces on Unix-like systems")
8425 (license license:lgpl2.1)
8426 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8427
8428 (define-public python2-pythondialog
8429 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8430 (package
8431 (inherit base)
8432 (version (package-version python-pythondialog))
8433 (source (origin
8434 (method url-fetch)
8435 (uri (pypi-uri "python2-pythondialog" version))
8436 (sha256
8437 (base32
8438 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
8439
8440 (define-public python-configobj
8441 (package
8442 (name "python-configobj")
8443 (version "5.0.6")
8444 (source (origin
8445 (method url-fetch)
8446 (uri (pypi-uri "configobj" version))
8447 (sha256
8448 (base32
8449 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8450 ;; Patch setup.py so it looks for python-setuptools, which is
8451 ;; required to parse the keyword 'install_requires' in setup.py.
8452 (patches (search-patches "python-configobj-setuptools.patch"))))
8453 (build-system python-build-system)
8454 (propagated-inputs
8455 `(("python-six" ,python-six)))
8456 (synopsis "Config file reading, writing and validation")
8457 (description "ConfigObj is a simple but powerful config file reader and
8458 writer: an ini file round tripper. Its main feature is that it is very easy to
8459 use, with a straightforward programmer’s interface and a simple syntax for
8460 config files.")
8461 (home-page "https://github.com/DiffSK/configobj")
8462 (license license:bsd-3)))
8463
8464 (define-public python2-configobj
8465 (package-with-python2 python-configobj))
8466
8467 (define-public python-configargparse
8468 (package
8469 (name "python-configargparse")
8470 (version "0.14.0")
8471 (source (origin
8472 (method url-fetch)
8473 (uri (pypi-uri "ConfigArgParse" version))
8474 (sha256
8475 (base32
8476 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
8477 (build-system python-build-system)
8478 (native-inputs
8479 `(("python-pyyaml" ,python-pyyaml)))
8480 (arguments
8481 `(#:phases
8482 (modify-phases %standard-phases
8483 (replace 'check
8484 (lambda _
8485 ;; Bypass setuptools-shim because one test relies on "setup.py"
8486 ;; being the first argument passed to the python call.
8487 ;;
8488 ;; NOTE: Many tests do not run because they rely on Python's
8489 ;; built-in test.test_argparse, but we remove the unit tests from
8490 ;; our Python installation.
8491 (invoke "python" "setup.py" "test"))))))
8492 (synopsis "Replacement for argparse")
8493 (description "A drop-in replacement for argparse that allows options to also
8494 be set via config files and/or environment variables.")
8495 (home-page "https://github.com/bw2/ConfigArgParse")
8496 (license license:expat)))
8497
8498 (define-public python2-configargparse
8499 (package-with-python2 python-configargparse))
8500
8501 (define-public python-argparse-manpage
8502 (package
8503 (name "python-argparse-manpage")
8504 (version "1.1")
8505 (source
8506 (origin
8507 (method url-fetch)
8508 (uri (pypi-uri "argparse-manpage" version))
8509 (sha256
8510 (base32
8511 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
8512 (build-system python-build-system)
8513 (home-page "https://github.com/praiskup/argparse-manpage")
8514 (synopsis "Build manual page from Python's ArgumentParser object")
8515 (description
8516 "This package provides tools to build manual pages from Python's
8517 @code{ArgumentParser} object.")
8518 (license license:asl2.0)))
8519
8520 (define-public python-contextlib2
8521 (package
8522 (name "python-contextlib2")
8523 (version "0.5.5")
8524 (source
8525 (origin
8526 (method url-fetch)
8527 (uri (pypi-uri "contextlib2" version))
8528 (sha256
8529 (base32
8530 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8531 (build-system python-build-system)
8532 (home-page "https://contextlib2.readthedocs.org/")
8533 (synopsis "Tools for decorators and context managers")
8534 (description "This module is primarily a backport of the Python
8535 3.2 contextlib to earlier Python versions. Like contextlib, it
8536 provides utilities for common tasks involving decorators and context
8537 managers. It also contains additional features that are not part of
8538 the standard library.")
8539 (properties `((python2-variant . ,(delay python2-contextlib2))))
8540 (license license:psfl)))
8541
8542 (define-public python2-contextlib2
8543 (let ((base (package-with-python2
8544 (strip-python2-variant python-contextlib2))))
8545 (package
8546 (inherit base)
8547 (arguments
8548 (substitute-keyword-arguments (package-arguments base)
8549 ((#:phases phases)
8550 `(modify-phases ,phases
8551 (replace 'check
8552 (lambda _ (invoke "python" "test_contextlib2.py" "-v")))))))
8553 (native-inputs
8554 `(("python2-unittest2" ,python2-unittest2))))))
8555
8556 ;; This package is used by python2-pytest via python2-importlib-metadata,
8557 ;; and thus can not depend on python-unittest2 (which depends on pytest).
8558 (define-public python2-contextlib2-bootstrap
8559 (hidden-package
8560 (package/inherit
8561 python2-contextlib2
8562 (name "python2-contextlib2-bootstrap")
8563 (arguments
8564 `(#:tests? #f
8565 ,@(package-arguments python2-contextlib2)))
8566 (native-inputs '()))))
8567
8568 (define-public python-texttable
8569 (package
8570 (name "python-texttable")
8571 (version "1.6.2")
8572 (source
8573 (origin
8574 (method url-fetch)
8575 (uri (pypi-uri "texttable" version))
8576 (sha256
8577 (base32
8578 "1x5l77akfc20x52jma9573qp8l8r07q103pm4l0pbizvh4vp1wzg"))))
8579 (build-system python-build-system)
8580 (arguments
8581 `(#:phases
8582 (modify-phases %standard-phases
8583 (replace 'check
8584 (lambda _ (invoke "pytest" "tests.py"))))))
8585 (native-inputs
8586 `(("python-pytest" ,python-pytest)))
8587 (home-page "https://github.com/foutaise/texttable/")
8588 (synopsis "Python module for creating simple ASCII tables")
8589 (description "Texttable is a Python module for creating simple ASCII
8590 tables.")
8591 (license license:expat)))
8592
8593 (define-public python2-texttable
8594 (package-with-python2 python-texttable))
8595
8596 (define-public python-atomicwrites
8597 (package
8598 (name "python-atomicwrites")
8599 (version "1.3.0")
8600 (source (origin
8601 (method url-fetch)
8602 (uri (pypi-uri "atomicwrites" version))
8603 (sha256
8604 (base32
8605 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
8606 (build-system python-build-system)
8607 (synopsis "Atomic file writes in Python")
8608 (description "Library for atomic file writes using platform dependent tools
8609 for atomic file system operations.")
8610 (home-page "https://github.com/untitaker/python-atomicwrites")
8611 (license license:expat)))
8612
8613 (define-public python2-atomicwrites
8614 (package-with-python2 python-atomicwrites))
8615
8616 (define-public python-click-threading
8617 (package
8618 (name "python-click-threading")
8619 (version "0.4.4")
8620 (source (origin
8621 (method url-fetch)
8622 (uri (pypi-uri "click-threading" version))
8623 (sha256
8624 (base32
8625 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
8626 (build-system python-build-system)
8627 (propagated-inputs
8628 `(("python-click" ,python-click)))
8629 (synopsis "Utilities for multithreading in Click")
8630 (description "This package provides utilities for multithreading in Click
8631 applications.")
8632 (home-page "https://github.com/click-contrib/click-threading")
8633 (license license:expat)))
8634
8635 (define-public python-click-log
8636 (package
8637 (name "python-click-log")
8638 (version "0.3.2")
8639 (source (origin
8640 (method url-fetch)
8641 (uri (pypi-uri "click-log" version))
8642 (sha256
8643 (base32
8644 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
8645 (build-system python-build-system)
8646 (propagated-inputs
8647 `(("python-click" ,python-click)))
8648 (synopsis "Logging for click applications")
8649 (description "This package provides a Python library for logging Click
8650 applications.")
8651 (home-page "https://github.com/click-contrib/click-log")
8652 (license license:expat)))
8653
8654 (define-public python-apipkg
8655 (package
8656 (name "python-apipkg")
8657 (version "1.4")
8658 (source (origin
8659 (method url-fetch)
8660 (uri (pypi-uri "apipkg" version))
8661 (sha256
8662 (base32
8663 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8664 (build-system python-build-system)
8665 (native-inputs
8666 `(("python-pytest" ,python-pytest)))
8667 (synopsis "Namespace control and lazy-import mechanism")
8668 (description "With apipkg you can control the exported namespace of a Python
8669 package and greatly reduce the number of imports for your users. It is a small
8670 pure Python module that works on virtually all Python versions.")
8671 (home-page "https://github.com/pytest-dev/apipkg")
8672 (license license:expat)))
8673
8674 (define-public python2-apipkg
8675 (package-with-python2 python-apipkg))
8676
8677 (define-public python-execnet
8678 (package
8679 (name "python-execnet")
8680 (version "1.4.1")
8681 (source (origin
8682 (method url-fetch)
8683 (uri (pypi-uri "execnet" version))
8684 (sha256
8685 (base32
8686 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8687 (build-system python-build-system)
8688 (arguments
8689 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8690 ;; The two test failures are caused by the lack of an `ssh` executable.
8691 ;; The test suite can be run with pytest after the 'install' phase.
8692 #:tests? #f))
8693 (native-inputs
8694 `(("python-pytest" ,python-pytest)
8695 ("python-setuptools-scm" ,python-setuptools-scm)))
8696 (propagated-inputs
8697 `(("python-apipkg" ,python-apipkg)))
8698 (synopsis "Rapid multi-Python deployment")
8699 (description "Execnet provides a share-nothing model with
8700 channel-send/receive communication for distributing execution across many
8701 Python interpreters across version, platform and network barriers. It has a
8702 minimal and fast API targeting the following uses:
8703 @enumerate
8704 @item distribute tasks to (many) local or remote CPUs
8705 @item write and deploy hybrid multi-process applications
8706 @item write scripts to administer multiple environments
8707 @end enumerate")
8708 (home-page "https://codespeak.net/execnet/")
8709 (license license:expat)))
8710
8711 (define-public python2-execnet
8712 (package-with-python2 python-execnet))
8713
8714 (define-public python-icalendar
8715 (package
8716 (name "python-icalendar")
8717 (version "4.0.4")
8718 (source (origin
8719 (method url-fetch)
8720 (uri (pypi-uri "icalendar" version))
8721 (sha256
8722 (base32
8723 "16gjvqv0n05jrb9g228pdjgzd3amz2pdhvcgsn1jypszjg5m2w9l"))))
8724 (build-system python-build-system)
8725 (propagated-inputs
8726 `(("python-dateutil" ,python-dateutil)
8727 ("python-pytz" ,python-pytz)))
8728 (synopsis "Python library for parsing iCalendar files")
8729 (description "The icalendar package is a parser/generator of iCalendar
8730 files for use with Python.")
8731 (home-page "https://github.com/collective/icalendar")
8732 (license license:bsd-2)))
8733
8734 (define-public python-args
8735 (package
8736 (name "python-args")
8737 (version "0.1.0")
8738 (source (origin
8739 (method url-fetch)
8740 (uri (pypi-uri "args" version))
8741 (sha256
8742 (base32
8743 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8744 (build-system python-build-system)
8745 (home-page "https://github.com/kennethreitz/args")
8746 (synopsis "Command-line argument parser")
8747 (description
8748 "This library provides a Python module to parse command-line arguments.")
8749 (license license:bsd-3)))
8750
8751 (define-public python2-args
8752 (package-with-python2 python-args))
8753
8754 (define-public python-clint
8755 (package
8756 (name "python-clint")
8757 (version "0.5.1")
8758 (source (origin
8759 (method url-fetch)
8760 (uri (pypi-uri "clint" version))
8761 (sha256
8762 (base32
8763 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8764 (build-system python-build-system)
8765 (arguments
8766 '(#:phases
8767 (modify-phases %standard-phases
8768 (replace 'check
8769 (lambda _ (invoke "py.test" "-v"))))))
8770 (native-inputs
8771 `(("python-pytest" ,python-pytest)))
8772 (propagated-inputs
8773 `(("python-args" ,python-args)))
8774 (home-page "https://github.com/kennethreitz/clint")
8775 (synopsis "Command-line interface tools")
8776 (description
8777 "Clint is a Python module filled with a set of tools for developing
8778 command-line applications, including tools for colored and indented
8779 output, progress bar display, and pipes.")
8780 (license license:isc)))
8781
8782 (define-public python2-clint
8783 (package-with-python2 python-clint))
8784
8785 (define-public python-rply
8786 (package
8787 (name "python-rply")
8788 (version "0.7.5")
8789 (source (origin
8790 (method url-fetch)
8791 (uri (pypi-uri "rply" version))
8792 (sha256
8793 (base32
8794 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
8795 (build-system python-build-system)
8796 (propagated-inputs
8797 `(("python-appdirs" ,python-appdirs)))
8798 (home-page "https://github.com/alex/rply")
8799 (synopsis "Parser generator for Python")
8800 (description
8801 "This package provides a pure Python based parser generator, that also
8802 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8803 with a new public API, and RPython support.")
8804 (license license:bsd-3)))
8805
8806 (define-public python2-rply
8807 (package-with-python2 python-rply))
8808
8809 (define-public python-hy
8810 (package
8811 (name "python-hy")
8812 (version "0.17.0")
8813 (source (origin
8814 (method url-fetch)
8815 (uri (pypi-uri "hy" version))
8816 (sha256
8817 (base32
8818 "1gdbqsirsdxj320wnp7my5awzs1kfs6m4fqmkzbd1zd47qzj0zfi"))))
8819 (build-system python-build-system)
8820 (arguments
8821 '(#:phases
8822 (modify-phases %standard-phases
8823 (add-before 'install 'set-HOME
8824 (lambda _
8825 (setenv "HOME" "/tmp")))
8826 (replace 'check
8827 (lambda _
8828 ;; Tests require write access to HOME.
8829 (setenv "HOME" "/tmp")
8830 (invoke "nosetests"))))))
8831 (native-inputs
8832 `(("python-coverage" ,python-coverage)
8833 ("python-nose" ,python-nose)))
8834 (propagated-inputs
8835 `(("python-astor" ,python-astor)
8836 ("python-clint" ,python-clint)
8837 ("python-rply" ,python-rply)
8838 ("python-fastentrypoints"
8839 ,python-fastentrypoints)
8840 ("python-funcparserlib"
8841 ,python-funcparserlib)))
8842 (home-page "http://hylang.org/")
8843 (synopsis "Lisp frontend to Python")
8844 (description
8845 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8846 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8847 Python at your fingertips, in Lisp form.")
8848 (license license:expat)))
8849
8850 (define-public python2-hy
8851 (package-with-python2 python-hy))
8852
8853 (define-public python2-functools32
8854 (package
8855 (name "python2-functools32")
8856 (version "3.2.3-2")
8857 (source
8858 (origin
8859 (method url-fetch)
8860 (uri (pypi-uri "functools32" version))
8861 (sha256
8862 (base32
8863 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8864 (build-system python-build-system)
8865 (arguments
8866 `(#:python ,python-2
8867 #:tests? #f)) ; no test target
8868 (home-page "https://github.com/MiCHiLU/python-functools32")
8869 (synopsis
8870 "Backport of the functools module from Python 3.2.3")
8871 (description
8872 "This package is a backport of the @code{functools} module from Python
8873 3.2.3 for use with older versions of Python and PyPy.")
8874 (license license:expat)))
8875
8876 (define-public python2-subprocess32
8877 (package
8878 (name "python2-subprocess32")
8879 (version "3.2.7")
8880 (source (origin
8881 (method url-fetch)
8882 (uri (pypi-uri "subprocess32" version))
8883 (sha256
8884 (base32
8885 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
8886 (patches
8887 (search-patches "python2-subprocess32-disable-input-test.patch"))))
8888 (build-system python-build-system)
8889 (arguments
8890 `(#:python ,python-2
8891 ;; The test suite fails with Python > 2.7.13:
8892 ;; import test.support
8893 ;; ImportError: No module named support
8894 #:tests? #f
8895 #:phases
8896 (modify-phases %standard-phases
8897 (add-after 'unpack 'patch-/bin/sh
8898 (lambda _
8899 (substitute* '("subprocess32.py"
8900 "test_subprocess32.py")
8901 (("/bin/sh") (which "sh")))
8902 #t)))))
8903 (home-page "https://github.com/google/python-subprocess32")
8904 (synopsis "Backport of the subprocess module from Python 3.2")
8905 (description
8906 "This is a backport of the @code{subprocess} standard library module
8907 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
8908 new features. On POSIX systems it is guaranteed to be reliable when used
8909 in threaded applications. It includes timeout support from Python 3.3 but
8910 otherwise matches 3.2’s API.")
8911 (license license:psfl)))
8912
8913 (define-public python2-futures
8914 (package
8915 (name "python2-futures")
8916 (version "3.2.0")
8917 (source
8918 (origin
8919 (method url-fetch)
8920 (uri (pypi-uri "futures" version))
8921 (sha256
8922 (base32
8923 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
8924 (build-system python-build-system)
8925 (arguments
8926 `(#:python ,python-2
8927 #:phases
8928 (modify-phases %standard-phases
8929 (replace 'check
8930 (lambda _
8931 (invoke "python" "test_futures.py")
8932 #t)))))
8933 (home-page "https://github.com/agronholm/pythonfutures")
8934 (synopsis
8935 "Backport of the concurrent.futures package from Python 3.2")
8936 (description
8937 "The concurrent.futures module provides a high-level interface for
8938 asynchronously executing callables. This package backports the
8939 concurrent.futures package from Python 3.2")
8940 (license license:bsd-3)))
8941
8942 (define-public python-promise
8943 (package
8944 (name "python-promise")
8945 (version "0.4.2")
8946 (source
8947 (origin
8948 (method url-fetch)
8949 (uri (pypi-uri "promise" version))
8950 (sha256
8951 (base32
8952 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8953 (build-system python-build-system)
8954 ;; Tests wants python-futures, which is a python2 only program, and
8955 ;; can't be found by python-promise at test time.
8956 (arguments `(#:tests? #f))
8957 (home-page "https://github.com/syrusakbary/promise")
8958 (synopsis "Promises/A+ implementation for Python")
8959 (description
8960 "Promises/A+ implementation for Python")
8961 (properties `((python2-variant . ,(delay python2-promise))))
8962 (license license:expat)))
8963
8964 (define-public python2-promise
8965 (let ((promise (package-with-python2
8966 (strip-python2-variant python-promise))))
8967 (package (inherit promise)
8968 (arguments (substitute-keyword-arguments (package-arguments promise)
8969 ((#:tests? _) #t)))
8970 (native-inputs
8971 `(("python2-futures" ,python2-futures)
8972 ("python2-pytest" ,python2-pytest)
8973 ,@(package-native-inputs promise))))))
8974
8975 (define-public python-progressbar33
8976 (package
8977 (name "python-progressbar33")
8978 (version "2.4")
8979 (source
8980 (origin
8981 (method url-fetch)
8982 (uri (pypi-uri "progressbar33" version))
8983 (sha256
8984 (base32
8985 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
8986 (build-system python-build-system)
8987 (home-page "http://github.com/germangh/python-progressbar")
8988 (synopsis "Text progress bar library for Python")
8989 (description
8990 "This package provides a text progress bar library for Python. This
8991 version only differs from the original @code{progressbar} package in that it
8992 uses relative package imports instead of absolute imports, which is necessary
8993 for the module to work under Python 3.3.")
8994 ;; Either or both of these licenses may be selected.
8995 (license (list license:lgpl2.1+ license:bsd-3))))
8996
8997 (define-public python-colorama
8998 (package
8999 (name "python-colorama")
9000 (version "0.4.3")
9001 (source
9002 (origin
9003 (method url-fetch)
9004 (uri (pypi-uri "colorama" version))
9005 (sha256
9006 (base32
9007 "189n8hpijy14jfan4ha9f5n06mnl33cxz7ay92wjqgkr639s0vg9"))))
9008 (build-system python-build-system)
9009 (synopsis "Colored terminal text rendering for Python")
9010 (description "Colorama is a Python library for rendering colored terminal
9011 text.")
9012 (home-page "https://pypi.org/project/colorama/")
9013 (license license:bsd-3)))
9014
9015 (define-public python2-colorama
9016 (package-with-python2 python-colorama))
9017
9018 (define-public python-rsa
9019 (package
9020 (name "python-rsa")
9021 (version "3.4.2")
9022 (source
9023 (origin
9024 (method url-fetch)
9025 (uri (pypi-uri "rsa" version))
9026 (sha256
9027 (base32
9028 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
9029 (build-system python-build-system)
9030 (propagated-inputs
9031 `(("python-pyasn1" ,python-pyasn1)))
9032 (synopsis "Pure-Python RSA implementation")
9033 (description "Python-RSA is a pure-Python RSA implementation. It supports
9034 encryption and decryption, signing and verifying signatures, and key
9035 generation according to PKCS#1 version 1.5. It can be used as a Python
9036 library as well as on the command line.")
9037 (home-page "https://stuvel.eu/rsa")
9038 (license license:asl2.0)))
9039
9040 (define-public python2-rsa
9041 (package-with-python2 python-rsa))
9042
9043 (define-public python-pluggy
9044 (package
9045 (name "python-pluggy")
9046 (version "0.13.1")
9047 (source
9048 (origin
9049 (method url-fetch)
9050 (uri (pypi-uri "pluggy" version))
9051 (sha256
9052 (base32
9053 "1c35qyhvy27q9ih9n899f3h4sdnpgq027dbiilly2qb5cvgarchm"))))
9054 (build-system python-build-system)
9055 (native-inputs
9056 `(("python-setuptools-scm" ,python-setuptools-scm)))
9057 (synopsis "Plugin and hook calling mechanism for Python")
9058 (description "Pluggy is an extraction of the plugin manager as used by
9059 Pytest but stripped of Pytest specific details.")
9060 (home-page "https://pypi.org/project/pluggy/")
9061 (properties `((python2-variant . ,(delay python2-pluggy))))
9062 (license license:expat)))
9063
9064 (define-public python2-pluggy
9065 (let ((base (package-with-python2 (strip-python2-variant
9066 python-pluggy))))
9067 (package/inherit
9068 base
9069 (propagated-inputs
9070 `(("python-importlib-metadata" ,python2-importlib-metadata))))))
9071
9072 ;; This package requires python2-importlib-metadata, but that package
9073 ;; ends up needing python2-pluggy via python2-pytest, so we need this
9074 ;; variant to solve the circular dependency.
9075 (define-public python2-pluggy-bootstrap
9076 (hidden-package
9077 (package/inherit
9078 python2-pluggy
9079 (name "python2-pluggy-bootstrap")
9080 (arguments
9081 `(#:tests? #f
9082 ,@(package-arguments python2-pluggy)))
9083 (propagated-inputs
9084 `(("python-importlib-metadata" ,python2-importlib-metadata-bootstrap))))))
9085
9086 (define-public python-tox
9087 (package
9088 (name "python-tox")
9089 (version "2.8.1")
9090 (source
9091 (origin
9092 (method url-fetch)
9093 (uri (pypi-uri "tox" version))
9094 (sha256
9095 (base32
9096 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
9097 (build-system python-build-system)
9098 (arguments
9099 ;; FIXME: Tests require pytest-timeout, which itself requires
9100 ;; pytest>=2.8.0 for installation.
9101 '(#:tests? #f))
9102 (propagated-inputs
9103 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
9104 ("python-py" ,python-py)
9105 ("python-virtualenv" ,python-virtualenv)))
9106 (native-inputs
9107 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
9108 ("python-pytest" ,python-pytest) ; >= 2.3.5
9109 ("python-setuptools-scm" ,python-setuptools-scm)))
9110 (home-page "https://tox.readthedocs.io")
9111 (synopsis "Virtualenv-based automation of test activities")
9112 (description "Tox is a generic virtualenv management and test command line
9113 tool. It can be used to check that a package installs correctly with
9114 different Python versions and interpreters, or run tests in each type of
9115 supported environment, or act as a frontend to continuous integration
9116 servers.")
9117 (license license:expat)))
9118
9119 (define-public python2-tox
9120 (package-with-python2 python-tox))
9121
9122 (define-public python-jmespath
9123 (package
9124 (name "python-jmespath")
9125 (version "0.9.4")
9126 (source
9127 (origin
9128 (method url-fetch)
9129 (uri (pypi-uri "jmespath" version))
9130 (sha256
9131 (base32
9132 "0k0765x1mybcrzajh3hiqkl8sy9hs0bmn4900frxy0j3ykvaxqmx"))))
9133 (build-system python-build-system)
9134 (native-inputs
9135 `(("python-nose" ,python-nose)))
9136 (synopsis "JSON Matching Expressions")
9137 (description "JMESPath (pronounced “james path”) is a Python library that
9138 allows one to declaratively specify how to extract elements from a JSON
9139 document.")
9140 (home-page "https://github.com/jmespath/jmespath.py")
9141 (license license:expat)))
9142
9143 (define-public python2-jmespath
9144 (package-with-python2 python-jmespath))
9145
9146 (define-public python-botocore
9147 (package
9148 (name "python-botocore")
9149 (version "1.12.149")
9150 (source
9151 (origin
9152 (method url-fetch)
9153 (uri (pypi-uri "botocore" version))
9154 (sha256
9155 (base32
9156 "12597f74khp3ngwr282cb949w0gcqj20rkfc3x275dijavyy5cmf"))))
9157 (build-system python-build-system)
9158 (arguments
9159 ;; FIXME: Many tests are failing.
9160 '(#:tests? #f))
9161 (propagated-inputs
9162 `(("python-dateutil" ,python-dateutil)
9163 ("python-docutils" ,python-docutils)
9164 ("python-jmespath" ,python-jmespath)))
9165 (native-inputs
9166 `(("python-mock" ,python-mock)
9167 ("python-nose" ,python-nose)
9168 ("behave" ,behave)
9169 ("python-tox" ,python-tox)
9170 ("python-urllib3" ,python-urllib3)
9171 ("python-wheel" ,python-wheel)))
9172 (home-page "https://github.com/boto/botocore")
9173 (synopsis "Low-level interface to AWS")
9174 (description "Botocore is a Python library that provides a low-level
9175 interface to the Amazon Web Services (AWS) API.")
9176 (license license:asl2.0)))
9177
9178 (define-public python2-botocore
9179 (package-with-python2 python-botocore))
9180
9181 (define-public python-xdo
9182 (package
9183 (name "python-xdo")
9184 (version "0.3")
9185 (source (origin
9186 (method url-fetch)
9187 (uri (string-append
9188 "http://http.debian.net/debian/pool/main/p/python-xdo/"
9189 "python-xdo_" version ".orig.tar.gz"))
9190 (sha256
9191 (base32
9192 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
9193 (build-system python-build-system)
9194 (arguments
9195 '(#:phases
9196 (modify-phases %standard-phases
9197 (add-before 'install 'patch-libxdo-path
9198 ;; Hardcode the path of dynamically loaded libxdo library.
9199 (lambda* (#:key inputs #:allow-other-keys)
9200 (let ((libxdo (string-append
9201 (assoc-ref inputs "xdotool")
9202 "/lib/libxdo.so")))
9203 (substitute* "xdo/_xdo.py"
9204 (("find_library\\(\"xdo\"\\)")
9205 (simple-format #f "\"~a\"" libxdo)))
9206 #t))))
9207 #:tests? #f)) ; no tests provided
9208 (propagated-inputs
9209 `(("python-six" ,python-six)))
9210 (inputs
9211 `(("xdotool" ,xdotool)
9212 ("libX11" ,libx11)))
9213 (home-page "https://tracker.debian.org/pkg/python-xdo")
9214 (synopsis "Python library for simulating X11 keyboard/mouse input")
9215 (description "Provides bindings to libxdo for manipulating X11 via simulated
9216 input. (Note that this is mostly a legacy library; you may wish to look at
9217 python-xdo for newer bindings.)")
9218 (license license:bsd-3)))
9219
9220 (define-public python2-xdo
9221 (package-with-python2 python-xdo))
9222
9223 (define-public python-mako
9224 (package
9225 (name "python-mako")
9226 (version "1.1.0")
9227 (source
9228 (origin
9229 (method url-fetch)
9230 (uri (pypi-uri "Mako" version))
9231 (sha256
9232 (base32
9233 "0jqa3qfpykyn4fmkn0kh6043sfls7br8i2bsdbccazcvk9cijsd3"))))
9234 (build-system python-build-system)
9235 (arguments
9236 `(#:phases (modify-phases %standard-phases
9237 (replace 'check
9238 (lambda* (#:key tests? #:allow-other-keys)
9239 (if tests?
9240 (invoke "nosetests" "-v")
9241 (format #t "test suite not run~%"))
9242 #t)))))
9243 (propagated-inputs
9244 `(("python-markupsafe" ,python-markupsafe)))
9245 (native-inputs
9246 `(("python-mock" ,python-mock)
9247 ("python-nose" ,python-nose)))
9248 (home-page "https://www.makotemplates.org/")
9249 (synopsis "Templating language for Python")
9250 (description "Mako is a templating language for Python that compiles
9251 templates into Python modules.")
9252 (license license:expat)))
9253
9254 (define-public python2-mako
9255 (package-with-python2 python-mako))
9256
9257 (define-public python-waitress
9258 (package
9259 (name "python-waitress")
9260 (version "1.1.0")
9261 (source
9262 (origin
9263 (method url-fetch)
9264 (uri (pypi-uri "waitress" version))
9265 (patches (search-patches "python-waitress-fix-tests.patch"))
9266 (sha256
9267 (base32
9268 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
9269 (build-system python-build-system)
9270 (home-page "https://github.com/Pylons/waitress")
9271 (synopsis "Waitress WSGI server")
9272 (description "Waitress is meant to be a production-quality pure-Python WSGI
9273 server with very acceptable performance.")
9274 (license license:zpl2.1)))
9275
9276 (define-public python2-waitress
9277 (package-with-python2 python-waitress))
9278
9279 (define-public python-whichcraft
9280 (package
9281 (name "python-whichcraft")
9282 (version "0.6.1")
9283 (source
9284 (origin
9285 (method url-fetch)
9286 (uri (pypi-uri "whichcraft" version))
9287 (sha256
9288 (base32
9289 "11yfkzyplizdgndy34vyd5qlmr1n5mxis3a3svxmx8fnccdvknxc"))))
9290 (build-system python-build-system)
9291 (native-inputs
9292 `(("python-pytest" ,python-pytest)))
9293 (home-page "https://github.com/pydanny/whichcraft")
9294 (synopsis "Cross-platform cross-python shutil.which functionality")
9295 (description
9296 "This package provides a shim of the shutil.which function that's
9297 designed to work across multiple versions of Python.")
9298 (license license:bsd-3)))
9299
9300 (define-public python-cookiecutter
9301 (package
9302 (name "python-cookiecutter")
9303 (version "1.6.0")
9304 (source
9305 (origin
9306 (method url-fetch)
9307 (uri (pypi-uri "cookiecutter" version))
9308 (sha256
9309 (base32
9310 "0glsvaz8igi2wy1hsnhm9fkn6560vdvdixzvkq6dn20z3hpaa5hk"))))
9311 (build-system python-build-system)
9312 (native-inputs
9313 `(("python-freezegun" ,python-freezegun)
9314 ("python-pytest" ,python-pytest)
9315 ("python-pytest-catchlog" ,python-pytest-catchlog)
9316 ("python-pytest-cov" ,python-pytest-cov)
9317 ("python-pytest-mock" ,python-pytest-mock)))
9318 (propagated-inputs
9319 `(("python-binaryornot" ,python-binaryornot)
9320 ("python-click" ,python-click)
9321 ("python-future" ,python-future)
9322 ("python-jinja2" ,python-jinja2)
9323 ("python-jinja2-time" ,python-jinja2-time)
9324 ("python-poyo" ,python-poyo)
9325 ("python-requests" ,python-requests)
9326 ("python-whichcraft" ,python-whichcraft)))
9327 (home-page "https://github.com/audreyr/cookiecutter")
9328 (synopsis
9329 "Command-line utility that creates projects from project templates")
9330 (description
9331 "This package provides a command-line utility that creates projects from
9332 project templates, e.g. creating a Python package project from a Python package
9333 project template.")
9334 (license license:bsd-3)))
9335
9336 (define-public python-pyquery
9337 (package
9338 (name "python-pyquery")
9339 (version "1.2.17")
9340 (source
9341 (origin
9342 (method url-fetch)
9343 (uri (pypi-uri "pyquery" version))
9344 (sha256
9345 (base32
9346 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
9347 (build-system python-build-system)
9348 (native-inputs
9349 `(("python-webob" ,python-webob)
9350 ("python-webtest" ,python-webtest)))
9351 (propagated-inputs
9352 `(("python-lxml" ,python-lxml)
9353 ("python-cssselect" ,python-cssselect)))
9354 (home-page "https://github.com/gawel/pyquery")
9355 (synopsis "Make jQuery-like queries on xml documents")
9356 (description "pyquery allows you to make jQuery queries on xml documents.
9357 The API is as much as possible the similar to jQuery. pyquery uses lxml for
9358 fast xml and html manipulation.")
9359 (license license:bsd-3)))
9360
9361 (define-public python-anyjson
9362 (package
9363 (name "python-anyjson")
9364 (version "0.3.3")
9365 (source
9366 (origin
9367 (method url-fetch)
9368 (uri (pypi-uri "anyjson" version))
9369 (sha256
9370 (base32
9371 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
9372 (build-system python-build-system)
9373 (arguments
9374 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
9375 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
9376 ;; whatever) so this transformation needs to be done before the tests
9377 ;; can be run. Maybe we could add a build step to transform beforehand
9378 ;; but it could be annoying/difficult.
9379 ;; We can enable tests for the Python 2 version, though, and do below.
9380 #:tests? #f))
9381 (home-page "https://bitbucket.org/runeh/anyjson/")
9382 (synopsis
9383 "Wraps best available JSON implementation in a common interface")
9384 (description
9385 "Anyjson loads whichever is the fastest JSON module installed
9386 and provides a uniform API regardless of which JSON implementation is used.")
9387 (license license:bsd-3)
9388 (properties `((python2-variant . ,(delay python2-anyjson))))))
9389
9390 (define-public python2-anyjson
9391 (let ((anyjson (package-with-python2
9392 (strip-python2-variant python-anyjson))))
9393 (package
9394 (inherit anyjson)
9395 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
9396 #:tests? #t
9397 ,@(package-arguments anyjson)))
9398 (native-inputs `(("python2-nose" ,python2-nose))))))
9399
9400 (define-public python-amqp
9401 (package
9402 (name "python-amqp")
9403 (version "2.3.2")
9404 (source
9405 (origin
9406 (method url-fetch)
9407 (uri (pypi-uri "amqp" version))
9408 (sha256
9409 (base32
9410 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
9411 (build-system python-build-system)
9412 (native-inputs
9413 `(("python-case" ,python-case)
9414 ("python-pytest-sugar" ,python-pytest-sugar)
9415 ("python-mock" ,python-mock)))
9416 (propagated-inputs
9417 `(("python-vine" ,python-vine)))
9418 (home-page "https://github.com/celery/py-amqp")
9419 (synopsis
9420 "Low-level AMQP client for Python (fork of amqplib)")
9421 (description
9422 "This is a fork of amqplib which was originally written by Barry Pederson.
9423 It is maintained by the Celery project, and used by kombu as a pure python
9424 alternative when librabbitmq is not available.")
9425 (license license:lgpl2.1+)
9426 (properties `((python2-variant . ,(delay python2-amqp))))))
9427
9428 (define-public python2-amqp
9429 (let ((amqp (package-with-python2
9430 (strip-python2-variant python-amqp))))
9431 (package
9432 (inherit amqp)
9433 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
9434 ;; unmaintained. Weirdly, does not do this on the python 3
9435 ;; version?
9436 #:tests? #f
9437 ,@(package-arguments amqp))))))
9438
9439 (define-public python-txamqp
9440 (package
9441 (name "python-txamqp")
9442 (version "0.8.2")
9443 (source
9444 (origin
9445 (method url-fetch)
9446 (uri (pypi-uri "txAMQP" version))
9447 (sha256
9448 (base32
9449 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
9450 (build-system python-build-system)
9451 (propagated-inputs
9452 `(("python-six" ,python-six)
9453 ("python-twisted" ,python-twisted)))
9454 (home-page "https://github.com/txamqp/txamqp")
9455 (synopsis "Communicate with AMQP peers and brokers using Twisted")
9456 (description
9457 "This package provides a Python library for communicating with AMQP peers
9458 and brokers using the asynchronous networking framework Twisted. It contains
9459 all the necessary code to connect, send and receive messages to/from an
9460 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
9461 also includes support for using Thrift RPC over AMQP in Twisted
9462 applications.")
9463 (license license:asl2.0)))
9464
9465 (define-public python2-txamqp
9466 (package-with-python2 python-txamqp))
9467
9468 (define-public python-kombu
9469 (package
9470 (name "python-kombu")
9471 (version "4.2.2")
9472 (source
9473 (origin
9474 (method url-fetch)
9475 (uri (pypi-uri "kombu" version))
9476 (sha256
9477 (base32
9478 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
9479 (build-system python-build-system)
9480 (native-inputs
9481 `(("python-mock" ,python-mock)
9482 ("python-case" ,python-case)
9483 ("python-pyro4" ,python-pyro4)
9484 ("python-pytest-sugar" ,python-pytest-sugar)
9485 ("python-pytz" ,python-pytz)))
9486 (propagated-inputs
9487 `(("python-anyjson" ,python-anyjson)
9488 ("python-amqp" ,python-amqp)
9489 ("python-redis" ,python-redis)))
9490 (home-page "https://kombu.readthedocs.io")
9491 (synopsis "Message passing library for Python")
9492 (description "The aim of Kombu is to make messaging in Python as easy as
9493 possible by providing an idiomatic high-level interface for the AMQ protocol,
9494 and also provide proven and tested solutions to common messaging problems.
9495 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
9496 message orientation, queuing, routing, reliability and security, for which the
9497 RabbitMQ messaging server is the most popular implementation.")
9498 (license license:bsd-3)
9499 (properties `((python2-variant . ,(delay python2-kombu))))))
9500
9501 (define-public python2-kombu
9502 (let ((kombu (package-with-python2
9503 (strip-python2-variant python-kombu))))
9504 (package
9505 (inherit kombu)
9506 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
9507 ;; It works fine on the python3 variant.
9508 #:tests? #f
9509 ,@(package-arguments kombu)))
9510 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9511 ,@(package-native-inputs kombu))))))
9512
9513 (define-public python-billiard
9514 (package
9515 (name "python-billiard")
9516 (version "3.5.0.5")
9517 (source
9518 (origin
9519 (method url-fetch)
9520 (uri (pypi-uri "billiard" version))
9521 (sha256
9522 (base32
9523 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
9524 (build-system python-build-system)
9525 (native-inputs
9526 `(("python-case" ,python-case)
9527 ("python-pytest" ,python-pytest)))
9528 (home-page "https://github.com/celery/billiard")
9529 (synopsis
9530 "Python multiprocessing fork with improvements and bugfixes")
9531 (description
9532 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9533 multiprocessing package itself is a renamed and updated version of R Oudkerk's
9534 pyprocessing package. This standalone variant is intended to be compatible with
9535 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
9536 (license license:bsd-3)
9537 (properties `((python2-variant . ,(delay python2-billiard))))))
9538
9539 (define-public python2-billiard
9540 (let ((billiard (package-with-python2
9541 (strip-python2-variant python-billiard))))
9542 (package
9543 (inherit billiard)
9544 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9545 ("python2-mock" ,python2-mock)
9546 ,@(package-native-inputs billiard))))))
9547
9548 (define-public python-celery
9549 (package
9550 (name "python-celery")
9551 (version "4.2.1")
9552 (source
9553 (origin
9554 (method url-fetch)
9555 (uri (pypi-uri "celery" version))
9556 (sha256
9557 (base32
9558 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
9559 (build-system python-build-system)
9560 (arguments
9561 '(;; TODO The tests fail with Python 3.7
9562 ;; https://github.com/celery/celery/issues/4849
9563 #:tests? #f
9564 #:phases
9565 (modify-phases %standard-phases
9566 (add-after 'unpack 'patch-requirements
9567 (lambda _
9568 (substitute* "requirements/test.txt"
9569 (("pytest>=3\\.0,<3\\.3")
9570 "pytest>=3.0"))
9571 #t)))))
9572 (native-inputs
9573 `(("python-case" ,python-case)
9574 ("python-pytest" ,python-pytest)))
9575 (propagated-inputs
9576 `(("python-pytz" ,python-pytz)
9577 ("python-billiard" ,python-billiard)
9578 ("python-kombu" ,python-kombu)))
9579 (home-page "https://celeryproject.org")
9580 (synopsis "Distributed Task Queue")
9581 (description "Celery is an asynchronous task queue/job queue based on
9582 distributed message passing. It is focused on real-time operation, but
9583 supports scheduling as well. The execution units, called tasks, are executed
9584 concurrently on a single or more worker servers using multiprocessing,
9585 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9586 synchronously (wait until ready).")
9587 (license license:bsd-3)
9588 (properties `((python2-variant . ,(delay python2-celery))))))
9589
9590 (define-public python2-celery
9591 (let ((celery (package-with-python2
9592 (strip-python2-variant python-celery))))
9593 (package
9594 (inherit celery)
9595 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9596 ("python2-mock" ,python2-mock)
9597 ,@(package-native-inputs celery))))))
9598
9599 (define-public python-translitcodec
9600 (package
9601 (name "python-translitcodec")
9602 (version "0.4.0")
9603 (source
9604 (origin
9605 (method url-fetch)
9606 (uri (pypi-uri "translitcodec" version))
9607 (sha256
9608 (base32
9609 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9610 (build-system python-build-system)
9611 (arguments
9612 `(#:tests? #f)) ; no tests provided
9613 (home-page
9614 "https://github.com/claudep/translitcodec")
9615 (synopsis
9616 "Unicode to 8-bit charset transliteration codec")
9617 (description
9618 "This package contains codecs for transliterating ISO 10646 texts into
9619 best-effort representations using smaller coded character sets (ASCII,
9620 ISO 8859, etc.).")
9621 (license license:expat)))
9622
9623 (define-public python2-translitcodec
9624 (package-with-python2 python-translitcodec))
9625
9626 (define-public python-editor
9627 (package
9628 (name "python-editor")
9629 (version "0.5")
9630 (source
9631 (origin
9632 (method url-fetch)
9633 (uri (pypi-uri "python-editor" version))
9634 (sha256
9635 (base32
9636 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
9637 (build-system python-build-system)
9638 (home-page
9639 "https://github.com/fmoo/python-editor")
9640 (synopsis
9641 "Programmatically open an editor, capture the result")
9642 (description
9643 "python-editor is a library that provides the editor module for
9644 programmatically interfacing with your system's $EDITOR.")
9645 (license license:asl2.0)))
9646
9647 (define-public python2-editor
9648 (package-with-python2 python-editor))
9649
9650 (define-public python-vobject
9651 (package
9652 (name "python-vobject")
9653 (version "0.9.5")
9654 (source (origin
9655 (method url-fetch)
9656 (uri (pypi-uri "vobject" version))
9657 (sha256
9658 (base32
9659 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
9660 (build-system python-build-system)
9661 (arguments
9662 '(;; The test suite relies on some non-portable Windows interfaces.
9663 #:tests? #f))
9664 (propagated-inputs
9665 `(("python-dateutil" ,python-dateutil)
9666 ("python-pyicu" ,python-pyicu)))
9667 (synopsis "Parse and generate vCard and vCalendar files")
9668 (description "Vobject is intended to be a full featured Python package for
9669 parsing and generating vCard and vCalendar files. Currently, iCalendar files
9670 are supported and well tested. vCard 3.0 files are supported, and all data
9671 should be imported, but only a few components are understood in a sophisticated
9672 way.")
9673 (home-page "https://eventable.github.io/vobject/")
9674 (license license:asl2.0)))
9675
9676 (define-public python2-vobject
9677 (package-with-python2 python-vobject))
9678
9679 (define-public python-munkres
9680 (package
9681 (name "python-munkres")
9682 (version "1.0.8")
9683 (source (origin
9684 (method url-fetch)
9685 (uri (pypi-uri "munkres" version))
9686 (sha256
9687 (base32
9688 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
9689 (build-system python-build-system)
9690 (arguments
9691 '(#:tests? #f)) ; no test suite
9692 (home-page "https://software.clapper.org/munkres/")
9693 (synopsis "Implementation of the Munkres algorithm")
9694 (description "The Munkres module provides an implementation of the Munkres
9695 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9696 useful for solving the Assignment Problem.")
9697 (license license:bsd-3)))
9698
9699 (define-public python2-munkres
9700 (package-with-python2 python-munkres))
9701
9702 (define-public python-whoosh
9703 (package
9704 (name "python-whoosh")
9705 (version "2.7.4")
9706 (source
9707 (origin
9708 (method url-fetch)
9709 (uri (pypi-uri "Whoosh" version))
9710 (sha256
9711 (base32
9712 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9713 (build-system python-build-system)
9714 (arguments '(#:tests? #f)) ; Test invocation is no longer supported by Python.
9715 (native-inputs
9716 `(("python-pytest" ,python-pytest)))
9717 (home-page "https://bitbucket.org/mchaput/whoosh")
9718 (synopsis "Full text indexing, search, and spell checking library")
9719 (description
9720 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9721 checking library.")
9722 (license license:bsd-2)))
9723
9724 (define-public python2-whoosh
9725 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9726 (package (inherit whoosh)
9727 (propagated-inputs
9728 `(("python2-backport-ssl-match-hostname"
9729 ,python2-backport-ssl-match-hostname)
9730 ,@(package-propagated-inputs whoosh))))))
9731
9732 (define-public python-pathlib
9733 (package
9734 (name "python-pathlib")
9735 (version "1.0.1")
9736 (source (origin
9737 (method url-fetch)
9738 (uri (pypi-uri "pathlib" version))
9739 (sha256
9740 (base32
9741 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9742 (build-system python-build-system)
9743 ;; The tests depend on the internal "test" module, which does not provide
9744 ;; a stable interface.
9745 (arguments `(#:tests? #f))
9746 (home-page "https://pathlib.readthedocs.org/")
9747 (synopsis "Object-oriented file system paths")
9748 (description "Pathlib offers a set of classes to handle file system paths.
9749 It offers the following advantages over using string objects:
9750
9751 @enumerate
9752 @item No more cumbersome use of os and os.path functions. Everything can
9753 be done easily through operators, attribute accesses, and method calls.
9754 @item Embodies the semantics of different path types. For example,
9755 comparing Windows paths ignores casing.
9756 @item Well-defined semantics, eliminating any inconsistencies or
9757 ambiguities (forward vs. backward slashes, etc.).
9758 @end enumerate
9759
9760 Note: In Python 3.4, pathlib is now part of the standard library. For other
9761 Python versions please consider python-pathlib2 instead, which tracks the
9762 standard library module. This module (python-pathlib) isn't maintained
9763 anymore.")
9764 (license license:expat)))
9765
9766 (define-public python2-pathlib
9767 (package-with-python2 python-pathlib))
9768
9769 (define-public python2-pathlib2
9770 (package
9771 (name "python2-pathlib2")
9772 (version "2.3.5")
9773 (source (origin
9774 (method url-fetch)
9775 (uri (pypi-uri "pathlib2" version))
9776 (sha256
9777 (base32
9778 "0s4qa8c082fdkb17izh4mfgwrjd1n5pya18wvrbwqdvvb5xs9nbc"))))
9779 (build-system python-build-system)
9780 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9781 ;; version is 3.4 which already includes this package as part of the
9782 ;; standard library.
9783 (arguments
9784 `(#:python ,python-2))
9785 (propagated-inputs
9786 `(("python2-scandir" ,python2-scandir)
9787 ("python2-six" ,python2-six)))
9788 (home-page "https://pypi.org/project/pathlib2/")
9789 (synopsis "Object-oriented file system paths - backport of standard
9790 pathlib module")
9791 (description "The goal of pathlib2 is to provide a backport of standard
9792 pathlib module which tracks the standard library module, so all the newest
9793 features of the standard pathlib can be used also on older Python versions.
9794
9795 Pathlib offers a set of classes to handle file system paths. It offers the
9796 following advantages over using string objects:
9797
9798 @enumerate
9799 @item No more cumbersome use of os and os.path functions. Everything can
9800 be done easily through operators, attribute accesses, and method calls.
9801 @item Embodies the semantics of different path types. For example,
9802 comparing Windows paths ignores casing.
9803 @item Well-defined semantics, eliminating any inconsistencies or
9804 ambiguities (forward vs. backward slashes, etc.).
9805 @end enumerate")
9806 (license license:expat)))
9807
9808 (define-public python2-pathlib2-bootstrap
9809 (hidden-package
9810 (package
9811 (inherit python2-pathlib2)
9812 (name "python2-pathlib2-bootstrap")
9813 (propagated-inputs
9814 `(("python2-scandir" ,python2-scandir)
9815 ("python2-six" ,python2-six-bootstrap))))))
9816
9817 (define-public python-jellyfish
9818 (package
9819 (name "python-jellyfish")
9820 (version "0.5.6")
9821 (source (origin
9822 (method url-fetch)
9823 (uri (pypi-uri "jellyfish" version))
9824 (sha256
9825 (base32
9826 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
9827 (build-system python-build-system)
9828 (native-inputs
9829 `(("python-pytest" ,python-pytest)))
9830 (home-page "https://github.com/jamesturk/jellyfish")
9831 (synopsis "Approximate and phonetic matching of strings")
9832 (description "Jellyfish uses a variety of string comparison and phonetic
9833 encoding algorithms to do fuzzy string matching.")
9834 (license license:bsd-2)
9835 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9836
9837 (define-public python2-jellyfish
9838 (let ((jellyfish (package-with-python2
9839 (strip-python2-variant python-jellyfish))))
9840 (package (inherit jellyfish)
9841 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
9842 ,@(package-native-inputs jellyfish))))))
9843
9844 (define-public python2-unicodecsv
9845 (package
9846 (name "python2-unicodecsv")
9847 (version "0.14.1")
9848 (source (origin
9849 (method git-fetch)
9850 ;; The test suite is not included in the PyPi release.
9851 ;; https://github.com/jdunck/python-unicodecsv/issues/19
9852 (uri (git-reference
9853 (url "https://github.com/jdunck/python-unicodecsv")
9854 (commit version)))
9855 (file-name (git-file-name name version))
9856 (sha256
9857 (base32
9858 "15hx2k41a2lpv4hcml9zp4cvlx1171mnb5s4s13xc1pxkq3vgdjy"))))
9859 (build-system python-build-system)
9860 (arguments
9861 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9862 #:python ,python-2))
9863 (native-inputs
9864 `(("python2-unittest2" ,python2-unittest2)))
9865 (home-page "https://github.com/jdunck/python-unicodecsv")
9866 (synopsis "Unicode CSV module for Python 2")
9867 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9868 module, adding support for Unicode strings.")
9869 (license license:bsd-2)))
9870
9871 (define-public python-rarfile
9872 (package
9873 (name "python-rarfile")
9874 (version "2.8")
9875 (source (origin
9876 (method url-fetch)
9877 (uri (pypi-uri "rarfile" version))
9878 (sha256
9879 (base32
9880 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
9881 (build-system python-build-system)
9882 (arguments
9883 '(#:phases
9884 (modify-phases %standard-phases
9885 (replace 'check
9886 ;; Many tests fail, but the installation proceeds.
9887 (lambda _ (invoke "make" "-C" "test" "test"))))))
9888 (native-inputs
9889 `(("which" ,which))) ; required for tests
9890 (propagated-inputs
9891 `(("libarchive" ,libarchive)))
9892 (home-page "https://github.com/markokr/rarfile")
9893 (synopsis "RAR archive reader for Python")
9894 (description "This is Python module for RAR archive reading. The interface
9895 is made as zipfile like as possible.")
9896 (license license:isc)))
9897
9898 (define-public python2-rarfile
9899 (package-with-python2 python-rarfile))
9900
9901 (define-public python-magic
9902 (package
9903 (name "python-magic")
9904 (version "0.4.15")
9905 (source
9906 (origin
9907 (method url-fetch)
9908 (uri (pypi-uri "python-magic" version))
9909 (sha256
9910 (base32
9911 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
9912 (file-name (string-append name "-" version "-checkout"))))
9913 (build-system python-build-system)
9914 (arguments
9915 ;; The tests are unreliable, so don't run them. The tests fail
9916 ;; under Python3 because they were written for Python2 and
9917 ;; contain import statements that do not work in Python3. One of
9918 ;; the tests fails under Python2 because its assertions are
9919 ;; overly stringent; it relies on comparing output strings which
9920 ;; are brittle and can change depending on the version of
9921 ;; libmagic being used and the system on which the test is
9922 ;; running. In my case, under GuixSD 0.10.0, only one test
9923 ;; failed, and it seems to have failed only because the version
9924 ;; of libmagic that is packaged in Guix outputs a slightly
9925 ;; different (but not wrong) string than the one that the test
9926 ;; expected.
9927 '(#:tests? #f
9928 #:phases (modify-phases %standard-phases
9929 ;; Replace a specific method call with a hard-coded
9930 ;; path to the necessary libmagic.so file in the
9931 ;; store. If we don't do this, then the method call
9932 ;; will fail to find the libmagic.so file, which in
9933 ;; turn will cause any application using
9934 ;; python-magic to fail.
9935 (add-before 'build 'hard-code-path-to-libmagic
9936 (lambda* (#:key inputs #:allow-other-keys)
9937 (let ((file (assoc-ref inputs "file")))
9938 (substitute* "magic.py"
9939 (("ctypes.util.find_library\\('magic'\\)")
9940 (string-append "'" file "/lib/libmagic.so'")))
9941 #t)))
9942 (add-before 'install 'disable-egg-compression
9943 (lambda _
9944 (let ((port (open-file "setup.cfg" "a")))
9945 (display "\n[easy_install]\nzip_ok = 0\n"
9946 port)
9947 (close-port port)
9948 #t))))))
9949 (inputs
9950 ;; python-magic needs to be able to find libmagic.so.
9951 `(("file" ,file)))
9952 (home-page
9953 "https://github.com/ahupp/python-magic")
9954 (synopsis
9955 "File type identification using libmagic")
9956 (description
9957 "This module uses ctypes to access the libmagic file type
9958 identification library. It makes use of the local magic database and
9959 supports both textual and MIME-type output. Note that this module and
9960 the python-file module both provide a \"magic.py\" file; these two
9961 modules, which are different and were developed separately, both serve
9962 the same purpose: to provide Python bindings for libmagic.")
9963 (license license:expat)))
9964
9965 (define-public python2-magic
9966 (package-with-python2 python-magic))
9967
9968 (define-public python2-s3cmd
9969 (package
9970 (name "python2-s3cmd")
9971 (version "1.6.1")
9972 (source
9973 (origin
9974 (method url-fetch)
9975 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
9976 "s3cmd-" version ".tar.gz"))
9977 (sha256
9978 (base32
9979 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9980 (build-system python-build-system)
9981 (arguments
9982 ;; s3cmd is written for python2 only and contains no tests.
9983 `(#:python ,python-2
9984 #:tests? #f))
9985 (propagated-inputs
9986 `(("python2-dateutil" ,python2-dateutil)
9987 ;; The python-file package also provides a magic.py module.
9988 ;; This is an unfortunate state of affairs; however, s3cmd
9989 ;; fails to install if it cannot find specifically the
9990 ;; python-magic package. Thus we include it, instead of using
9991 ;; python-file. Ironically, s3cmd sometimes works better
9992 ;; without libmagic bindings at all:
9993 ;; https://github.com/s3tools/s3cmd/issues/198
9994 ("python2-magic" ,python2-magic)))
9995 (home-page "http://s3tools.org/s3cmd")
9996 (synopsis "Command line tool for S3-compatible storage services")
9997 (description
9998 "S3cmd is a command line tool for uploading, retrieving and managing data
9999 in storage services that are compatible with the Amazon Simple Storage
10000 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
10001 GnuPG encryption, and more. It also supports management of Amazon's
10002 CloudFront content delivery network.")
10003 (license license:gpl2+)))
10004
10005 (define-public python-pkgconfig
10006 (package
10007 (name "python-pkgconfig")
10008 (version "1.3.1")
10009 (source
10010 (origin
10011 (method url-fetch)
10012 (uri (pypi-uri "pkgconfig" version))
10013 (sha256
10014 (base32
10015 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
10016 (build-system python-build-system)
10017 (native-inputs
10018 `(("python-nose" ,python-nose)))
10019 (inputs
10020 `(("pkg-config" ,pkg-config)))
10021 (arguments
10022 `(#:phases
10023 (modify-phases %standard-phases
10024 (add-before 'build 'patch
10025 ;; Hard-code the path to pkg-config.
10026 (lambda _
10027 (substitute* "pkgconfig/pkgconfig.py"
10028 (("cmd = 'pkg-config")
10029 (string-append "cmd = '" (which "pkg-config"))))
10030 #t))
10031 (replace 'check
10032 (lambda _
10033 (invoke "nosetests" "test.py"))))))
10034 (home-page "https://github.com/matze/pkgconfig")
10035 (synopsis "Python interface for pkg-config")
10036 (description "This module provides a Python interface to pkg-config. It
10037 can be used to find all pkg-config packages, check if a package exists,
10038 check if a package meets certain version requirements, query CFLAGS and
10039 LDFLAGS and parse the output to build extensions with setup.py.")
10040 (license license:expat)))
10041
10042 (define-public python2-pkgconfig
10043 (package-with-python2 python-pkgconfig))
10044
10045 (define-public python-bz2file
10046 (package
10047 (name "python-bz2file")
10048 (version "0.98")
10049 (source
10050 (origin
10051 (method url-fetch)
10052 (uri (pypi-uri "bz2file" version))
10053 (sha256
10054 (base32
10055 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
10056 (build-system python-build-system)
10057 (arguments
10058 `(#:tests? #f)) ; Tests use deprecated python modules.
10059 (home-page "https://github.com/nvawda/bz2file")
10060 (synopsis "Read and write bzip2-compressed files")
10061 (description
10062 "Bz2file is a Python library for reading and writing bzip2-compressed
10063 files. It contains a drop-in replacement for the I/O interface in the
10064 standard library's @code{bz2} module, including features from the latest
10065 development version of CPython that are not available in older releases.")
10066 (license license:asl2.0)))
10067
10068 (define-public python2-bz2file
10069 (package-with-python2 python-bz2file))
10070
10071 (define-public python-future
10072 (package
10073 (name "python-future")
10074 (version "0.17.1")
10075 (source
10076 (origin
10077 (method url-fetch)
10078 (uri (pypi-uri "future" version))
10079 (sha256
10080 (base32
10081 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
10082 (build-system python-build-system)
10083 ;; Many tests connect to the network or are otherwise flawed.
10084 ;; https://github.com/PythonCharmers/python-future/issues/210
10085 (arguments
10086 `(#:tests? #f))
10087 (home-page "http://python-future.org")
10088 (synopsis "Single-source support for Python 3 and 2")
10089 (description
10090 "@code{python-future} is the missing compatibility layer between Python 2 and
10091 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
10092 to support both Python 2 and Python 3 with minimal overhead.")
10093 (license license:expat)))
10094
10095 (define-public python2-future
10096 (package-with-python2 python-future))
10097
10098 (define-public python-cysignals
10099 (package
10100 (name "python-cysignals")
10101 (version "1.9.0")
10102 (source
10103 (origin
10104 (method url-fetch)
10105 (uri (pypi-uri "cysignals" version))
10106 (sha256
10107 (base32
10108 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
10109 (build-system python-build-system)
10110 (native-inputs
10111 `(("python-cython" ,python-cython)
10112 ("python-sphinx" ,python-sphinx)))
10113 (inputs
10114 `(("pari-gp" ,pari-gp)))
10115 (arguments
10116 `(#:modules ((guix build python-build-system)
10117 ((guix build gnu-build-system) #:prefix gnu:)
10118 (guix build utils))
10119 ;; FIXME: Tests are executed after installation and currently fail
10120 ;; when not installing into standard locations; the author is working
10121 ;; on a fix.
10122 #:tests? #f
10123 #:phases
10124 (modify-phases %standard-phases
10125 (add-before
10126 'build 'configure
10127 (assoc-ref gnu:%standard-phases 'configure)))))
10128 (home-page
10129 "https://github.com/sagemath/cysignals")
10130 (synopsis
10131 "Handling of interrupts and signals for Cython")
10132 (description
10133 "The cysignals package provides mechanisms to handle interrupts (and
10134 other signals and errors) in Cython code, using two related approaches,
10135 for mixed Cython/Python code or external C libraries and pure Cython code,
10136 respectively.")
10137 (license license:lgpl3+)))
10138
10139 (define-public python2-cysignals
10140 (package-with-python2 python-cysignals))
10141
10142 (define-public python2-shedskin
10143 (package
10144 (name "python2-shedskin")
10145 (version "0.9.4")
10146 (source
10147 (origin
10148 (method url-fetch)
10149 (uri (string-append "https://github.com/shedskin/shedskin/"
10150 "releases/download/v" version
10151 "/shedskin-" version ".tgz"))
10152 (sha256
10153 (base32
10154 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
10155 (build-system python-build-system)
10156 (arguments
10157 `(#:python ,python-2
10158 #:phases (modify-phases %standard-phases
10159 (add-after 'unpack 'fix-resulting-include-libs
10160 (lambda* (#:key inputs #:allow-other-keys)
10161 (let ((libgc (assoc-ref inputs "libgc"))
10162 (pcre (assoc-ref inputs "pcre")))
10163 (substitute* "shedskin/makefile.py"
10164 (("variable == 'CCFLAGS':[ ]*")
10165 (string-append "variable == 'CCFLAGS':\n"
10166 " line += ' -I " pcre "/include"
10167 " -I " libgc "/include'"))
10168 (("variable == 'LFLAGS':[ ]*")
10169 (string-append "variable == 'LFLAGS':\n"
10170 " line += ' -L" pcre "/lib"
10171 " -L " libgc "/lib'")))
10172 #t))))))
10173 (inputs `(("pcre" ,pcre)
10174 ("libgc" ,libgc)))
10175 (home-page "https://shedskin.github.io/")
10176 (synopsis "Experimental Python-2 to C++ Compiler")
10177 (description (string-append "This is an experimental compiler for a subset of
10178 Python. It generates C++ code and a Makefile."))
10179 (license (list license:gpl3 license:bsd-3 license:expat))))
10180
10181 (define-public python2-rope
10182 (package
10183 (name "python2-rope")
10184 (version "0.11.0")
10185 (source
10186 (origin
10187 (method url-fetch)
10188 (uri (pypi-uri "rope" version))
10189 (sha256
10190 (base32
10191 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
10192 (arguments
10193 ;; Rope has only partial python3 support, see `python-rope'
10194 `(#:python ,python-2))
10195 (build-system python-build-system)
10196 (native-inputs
10197 `(("python2-unittest2" ,python2-unittest2)))
10198 (home-page "https://github.com/python-rope/rope")
10199 (synopsis "Refactoring library for Python")
10200 (description "Rope is a refactoring library for Python. It facilitates
10201 the renaming, moving and extracting of attributes, functions, modules, fields
10202 and parameters in Python 2 source code. These refactorings can also be applied
10203 to occurrences in strings and comments.")
10204 (license license:gpl2)))
10205
10206 (define-public python-rope
10207 (package
10208 (inherit python2-rope)
10209 (name "python-rope")
10210 (arguments `(#:python ,python-wrapper
10211 ;; XXX: Only partial python3 support, results in some failing
10212 ;; tests: <https://github.com/python-rope/rope/issues/247>.
10213 #:tests? #f))
10214 (properties `((python2-variant . ,(delay python2-rope))))))
10215
10216 (define-public python-py3status
10217 (package
10218 (name "python-py3status")
10219 (version "3.21")
10220 (source
10221 (origin
10222 (method url-fetch)
10223 (uri (pypi-uri "py3status" version))
10224 (sha256
10225 (base32 "16z8zq83hxy48g6hh4xczbdz50qvxv9k1aahr4fqq7jis60cc262"))))
10226 (build-system python-build-system)
10227 (inputs
10228 `(("file" ,file)))
10229 (arguments
10230 '(#:phases
10231 (modify-phases %standard-phases
10232 ;; 'file' is used for detection of configuration file encoding
10233 ;; let's make link the dependency to particular input
10234 (add-before 'build 'patch-file-path
10235 (lambda* (#:key inputs #:allow-other-keys)
10236 (let ((file-path (assoc-ref inputs "file")))
10237 (substitute* "py3status/parse_config.py"
10238 (("\\[\"file\", \"-b\"")
10239 (string-append "['" file-path "/bin/file', '-b'")))
10240 #t))))
10241 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
10242 (home-page "https://github.com/ultrabug/py3status")
10243 (synopsis "Extensible i3status wrapper written in Python")
10244 (description "py3status is an i3status wrapper which extends i3status
10245 functionality in a modular way, allowing you to extend your panel with your
10246 own code, responding to click events and updating clock every second.")
10247 (license license:bsd-3)))
10248
10249 (define-public python-tblib
10250 (package
10251 (name "python-tblib")
10252 (version "1.3.2")
10253 (source (origin
10254 (method url-fetch)
10255 (uri (pypi-uri "tblib" version))
10256 (sha256 (base32
10257 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
10258 (build-system python-build-system)
10259 (arguments
10260 `(#:phases
10261 (modify-phases %standard-phases
10262 (add-before 'check 'adjust-tests
10263 (lambda _
10264 (when (which "python3")
10265 ;; Adjust the example output to match that of Python 3.7:
10266 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
10267 (substitute* "README.rst"
10268 (("Exception\\('fail',") "Exception('fail'"))
10269 #t)))
10270 (replace 'check
10271 (lambda _
10272 ;; Upstream runs tests after installation and the package itself
10273 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
10274 ;; found.
10275 (setenv "PYTHONPATH"
10276 (string-append (getcwd) "/build/lib:"
10277 (getenv "PYTHONPATH")))
10278 (invoke "py.test" "-vv" "tests" "README.rst"))))))
10279 (native-inputs
10280 `(("python-pytest" ,python-pytest)
10281 ("python-six" ,python-six)))
10282 (home-page "https://github.com/ionelmc/python-tblib")
10283 (synopsis "Traceback serialization library")
10284 (description
10285 "Traceback serialization allows you to:
10286
10287 @enumerate
10288 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
10289 different processes. This allows better error handling when running code over
10290 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
10291
10292 @item Parse traceback strings and raise with the parsed tracebacks.
10293 @end enumerate\n")
10294 (license license:bsd-3)))
10295
10296 (define-public python2-tblib
10297 (package-with-python2 python-tblib))
10298
10299 (define-public python-greenlet
10300 (package
10301 (name "python-greenlet")
10302 (version "0.4.15")
10303 (source (origin
10304 (method url-fetch)
10305 (uri (pypi-uri "greenlet" version))
10306 (sha256
10307 (base32
10308 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
10309 (build-system python-build-system)
10310 (home-page "https://greenlet.readthedocs.io/")
10311 (synopsis "Lightweight in-process concurrent programming")
10312 (description
10313 "Greenlet package is a spin-off of Stackless, a version of CPython
10314 that supports micro-threads called \"tasklets\". Tasklets run
10315 pseudo-concurrently (typically in a single or a few OS-level threads) and
10316 are synchronized with data exchanges on \"channels\".")
10317 (license (list license:psfl license:expat))))
10318
10319 (define-public python2-greenlet
10320 (package-with-python2 python-greenlet))
10321
10322 (define-public python-objgraph
10323 (package
10324 (name "python-objgraph")
10325 (version "3.4.1")
10326 (source
10327 (origin
10328 (method url-fetch)
10329 (uri (pypi-uri "objgraph" version))
10330 (sha256
10331 (base32
10332 "19qmqsh984zq1rzzjy4vqnmviaqnymcyl8h7z99pnicbgwnm2adz"))))
10333 (build-system python-build-system)
10334 (propagated-inputs
10335 `(("python-graphviz" ,python-graphviz)))
10336 (native-inputs
10337 `(("python-mock" ,python-mock)
10338 ("graphviz" ,graphviz)))
10339 (home-page "https://mg.pov.lt/objgraph/")
10340 (synopsis "Draw Python object reference graphs with graphviz")
10341 (description
10342 "This package provides tools to draw Python object reference graphs with
10343 graphviz.")
10344 (license license:expat)))
10345
10346 (define-public python2-objgraph
10347 (package-with-python2 python-objgraph))
10348
10349 (define-public python-gevent
10350 (package
10351 (name "python-gevent")
10352 (version "1.3.7")
10353 (source (origin
10354 (method url-fetch)
10355 (uri (pypi-uri "gevent" version))
10356 (sha256
10357 (base32
10358 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
10359 (modules '((guix build utils)))
10360 (snippet
10361 '(begin
10362 ;; unbunding libev and c-ares
10363 (delete-file-recursively "deps")
10364 #t))))
10365 (build-system python-build-system)
10366 (arguments
10367 `(#:modules ((ice-9 ftw)
10368 (ice-9 match)
10369 (srfi srfi-26)
10370 (guix build utils)
10371 (guix build python-build-system))
10372 #:phases (modify-phases %standard-phases
10373 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
10374 (lambda _
10375 (substitute* "src/gevent/subprocess.py"
10376 (("/bin/sh") (which "sh")))
10377 (for-each (lambda (file)
10378 (substitute* file
10379 (("/bin/sh") (which "sh"))
10380 (("/bin/true") (which "true"))))
10381 (find-files "src/greentest" "\\.py$"))
10382 #t))
10383 (add-before 'build 'do-not-use-bundled-sources
10384 (lambda* (#:key inputs #:allow-other-keys)
10385 (setenv "CONFIG_SHELL" (which "bash"))
10386 (setenv "LIBEV_EMBED" "false")
10387 (setenv "CARES_EMBED" "false")
10388 (setenv "EMBED" "false")
10389
10390 ;; Prevent building bundled libev.
10391 (substitute* "setup.py"
10392 (("run_make=_BUILDING")
10393 "run_make=False"))
10394
10395 (let ((greenlet (string-append
10396 (assoc-ref inputs "python-greenlet")
10397 "/include")))
10398 (match (scandir greenlet
10399 (lambda (item)
10400 (string-prefix? "python" item)))
10401 ((python)
10402 (setenv "C_INCLUDE_PATH"
10403 (string-append greenlet "/" python)))))
10404 #t))
10405 (add-before 'check 'skip-timer-test
10406 (lambda _
10407 ;; XXX: Skip 'TestTimerResolution', which appears to be
10408 ;; unreliable.
10409 (substitute* "src/greentest/test__core_timer.py"
10410 (("not greentest.RUNNING_ON_CI") "False"))
10411 #t))
10412 (replace 'check
10413 (lambda _
10414 ;; Make sure the build directory is on PYTHONPATH.
10415 (setenv "PYTHONPATH"
10416 (string-append
10417 (getenv "PYTHONPATH") ":"
10418 (getcwd) "/build/"
10419 (car (scandir "build" (cut string-prefix? "lib." <>)))))
10420 (with-directory-excursion "src/greentest"
10421 ;; XXX: Many tests require network access. Instead we only
10422 ;; run known-good tests. Unfortunately we cannot use
10423 ;; recursion here since this directory also contains
10424 ;; Python-version-specific subfolders.
10425 (apply invoke "python" "testrunner.py" "--config"
10426 "known_failures.py"
10427 (scandir "." (cut regexp-exec
10428 (make-regexp "test_+(subprocess|core)")
10429 <>)))))))))
10430 (propagated-inputs
10431 `(("python-greenlet" ,python-greenlet)
10432 ("python-objgraph" ,python-objgraph)))
10433 (native-inputs
10434 `(("python-six" ,python-six)))
10435 (inputs
10436 `(("c-ares" ,c-ares)
10437 ("libev" ,libev)))
10438 (home-page "http://www.gevent.org/")
10439 (synopsis "Coroutine-based network library")
10440 (description
10441 "gevent is a coroutine-based Python networking library that uses greenlet
10442 to provide a high-level synchronous API on top of the libev event loop.")
10443 (license license:expat)
10444 (properties `((python2-variant . ,(delay python2-gevent))))))
10445
10446 (define-public python2-gevent
10447 (let ((base (package-with-python2
10448 (strip-python2-variant python-gevent))))
10449 (package
10450 (inherit base)
10451 (native-inputs `(,@(package-native-inputs python-gevent)
10452 ("python-mock" ,python2-mock))))))
10453
10454 (define-public python-fastimport
10455 (package
10456 (name "python-fastimport")
10457 (version "0.9.6")
10458 (source
10459 (origin
10460 (method url-fetch)
10461 (uri (pypi-uri "fastimport" version))
10462 (sha256
10463 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
10464 (build-system python-build-system)
10465 (home-page "https://github.com/jelmer/python-fastimport")
10466 (synopsis "VCS fastimport parser and generator in Python")
10467 (description "This package provides a parser for and generator of the Git
10468 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
10469 format.")
10470 (license license:gpl2+)))
10471
10472 (define-public python2-fastimport
10473 (package-with-python2 python-fastimport))
10474
10475 (define-public python-twisted
10476 (package
10477 (name "python-twisted")
10478 (version "19.7.0")
10479 (source (origin
10480 (method url-fetch)
10481 (uri (pypi-uri "Twisted" version ".tar.bz2"))
10482 (sha256
10483 (base32
10484 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
10485 (build-system python-build-system)
10486 (arguments
10487 '(#:tests? #f)) ; FIXME: some tests fail
10488 (propagated-inputs
10489 `(("python-zope-interface" ,python-zope-interface)
10490 ("python-pyhamcrest" ,python-pyhamcrest)
10491 ("python-incremental" ,python-incremental)
10492 ("python-hyperlink" ,python-hyperlink)
10493 ("python-constantly" ,python-constantly)
10494 ("python-automat" ,python-automat)))
10495 (home-page "https://twistedmatrix.com/")
10496 (synopsis "Asynchronous networking framework written in Python")
10497 (description
10498 "Twisted is an extensible framework for Python programming, with special
10499 focus on event-based network programming and multiprotocol integration.")
10500 (license license:expat)))
10501
10502 (define-public python2-twisted
10503 (package-with-python2 python-twisted))
10504
10505 (define-public python-pika
10506 (package
10507 (name "python-pika")
10508 (version "0.12.0")
10509 (source
10510 (origin
10511 (method url-fetch)
10512 (uri (pypi-uri "pika" version))
10513 (sha256
10514 (base32
10515 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
10516 (build-system python-build-system)
10517 (native-inputs
10518 `(("python-pyev" ,python-pyev)
10519 ("python-tornado" ,python-tornado)
10520 ("python-twisted" ,python-twisted)))
10521 (home-page "https://pika.readthedocs.org")
10522 (synopsis "Pure Python AMQP Client Library")
10523 (description
10524 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
10525 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
10526 network support library.")
10527 (license license:bsd-3)))
10528
10529 (define-public python2-pika
10530 (package-with-python2 python-pika))
10531
10532 (define-public python-ply
10533 (package
10534 (name "python-ply")
10535 (version "3.10")
10536 (source
10537 (origin
10538 (method url-fetch)
10539 (uri (pypi-uri "ply" version))
10540 (sha256
10541 (base32
10542 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
10543 (build-system python-build-system)
10544 (home-page "http://www.dabeaz.com/ply/")
10545 (synopsis "Python Lex & Yacc")
10546 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
10547 It uses LR parsing and does extensive error checking.")
10548 (license license:bsd-3)))
10549
10550 (define-public python2-ply
10551 (package-with-python2 python-ply))
10552
10553 (define-public python-tabulate
10554 (package
10555 (name "python-tabulate")
10556 (version "0.7.7")
10557 (source (origin
10558 (method url-fetch)
10559 (uri (pypi-uri "tabulate" version))
10560 (sha256
10561 (base32
10562 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
10563 (build-system python-build-system)
10564 (arguments
10565 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
10566 ;; and the latest release is not tagged in the upstream repository.
10567 '(#:tests? #f))
10568 (home-page "https://bitbucket.org/astanin/python-tabulate")
10569 (synopsis "Pretty-print tabular data")
10570 (description
10571 "Tabulate is a library and command-line utility to pretty-print tabular
10572 data in Python.")
10573 (license license:expat)))
10574
10575 (define-public python2-tabulate
10576 (package-with-python2 python-tabulate))
10577
10578 (define-public python-kazoo
10579 (package
10580 (name "python-kazoo")
10581 (version "2.4.0")
10582 (source
10583 (origin
10584 (method url-fetch)
10585 (uri (pypi-uri "kazoo" version))
10586 (sha256
10587 (base32
10588 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
10589 (build-system python-build-system)
10590 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
10591 (propagated-inputs
10592 `(("python-six" ,python-six)))
10593 (home-page "https://kazoo.readthedocs.org")
10594 (synopsis "High-level Zookeeper client library")
10595 (description
10596 "Kazoo is a Python client library for the Apache Zookeeper distributed
10597 application service. It is designed to be easy to use and to avoid common
10598 programming errors.")
10599 (license license:asl2.0)))
10600
10601 (define-public python2-kazoo
10602 (package-with-python2 python-kazoo))
10603
10604 (define-public python-pykafka
10605 (package
10606 (name "python-pykafka")
10607 (version "2.4.0")
10608 (source (origin
10609 (method url-fetch)
10610 (uri (pypi-uri "pykafka" version))
10611 (sha256
10612 (base32
10613 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10614 (build-system python-build-system)
10615 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
10616 (propagated-inputs
10617 `(("python-gevent" ,python-gevent)
10618 ("python-kazoo" ,python-kazoo)
10619 ("python-tabulate" ,python-tabulate)))
10620 (inputs
10621 `(("librdkafka" ,librdkafka)))
10622 (home-page "https://pykafka.readthedocs.io/")
10623 (synopsis "Apache Kafka client for Python")
10624 (description
10625 "PyKafka is a client for the Apache Kafka distributed messaging system.
10626 It includes Python implementations of Kafka producers and consumers, which
10627 are optionally backed by a C extension built on librdkafka.")
10628 (license license:asl2.0)))
10629
10630 (define-public python2-pykafka
10631 (package-with-python2 python-pykafka))
10632
10633 (define-public python-wcwidth
10634 (package
10635 (name "python-wcwidth")
10636 (version "0.1.8")
10637 (source (origin
10638 (method url-fetch)
10639 (uri (pypi-uri "wcwidth" version))
10640 (sha256
10641 (base32
10642 "1a1pzds3xzfylm5mnc5f6c1p8kiig0daqjc9gygd9rc3cj53x2zj"))))
10643 (build-system python-build-system)
10644 (home-page "https://github.com/jquast/wcwidth")
10645 (synopsis "Measure number of terminal column cells of wide-character codes")
10646 (description "Wcwidth measures the number of terminal column cells of
10647 wide-character codes. It is useful for those implementing a terminal emulator,
10648 or programs that carefully produce output to be interpreted by one. It is a
10649 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
10650 specified in POSIX.1-2001 and POSIX.1-2008.")
10651 (license license:expat)))
10652
10653 (define-public python2-wcwidth
10654 (package-with-python2 python-wcwidth))
10655
10656 (define-public python2-jsonrpclib
10657 (package
10658 (name "python2-jsonrpclib")
10659 (version "0.1.7")
10660 (source (origin
10661 (method url-fetch)
10662 (uri (pypi-uri "jsonrpclib" version))
10663 (sha256
10664 (base32
10665 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10666 (build-system python-build-system)
10667 (arguments
10668 `(#:tests? #f
10669 #:python ,python-2))
10670 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10671 (synopsis "Implementation of JSON-RPC specification for Python")
10672 (description
10673 "This library is an implementation of the JSON-RPC specification.
10674 It supports both the original 1.0 specification, as well as the
10675 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10676 etc.")
10677 (license license:asl2.0)))
10678
10679 (define-public python-chai
10680 (package
10681 (name "python-chai")
10682 (version "1.1.2")
10683 (source (origin
10684 (method url-fetch)
10685 (uri (pypi-uri "chai" version))
10686 (sha256
10687 (base32
10688 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
10689 (build-system python-build-system)
10690 (home-page "https://github.com/agoragames/chai")
10691 (synopsis "Mocking framework for Python")
10692 (description
10693 "Chai provides an api for mocking, stubbing and spying your python
10694 objects, patterned after the Mocha library for Ruby.")
10695 (license license:bsd-3)))
10696
10697 (define-public python2-chai
10698 (package-with-python2 python-chai))
10699
10700 (define-public python-inflection
10701 (package
10702 (name "python-inflection")
10703 (version "0.3.1")
10704 (source
10705 (origin (method url-fetch)
10706 (uri (pypi-uri "inflection" version))
10707 (sha256
10708 (base32
10709 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10710 (build-system python-build-system)
10711 (native-inputs
10712 `(("python-pytest" ,python-pytest)))
10713 (home-page "https://github.com/jpvanhal/inflection")
10714 (synopsis "Python string transformation library")
10715 (description
10716 "Inflection is a string transformation library. It singularizes
10717 and pluralizes English words, and transforms strings from CamelCase to
10718 underscored string.")
10719 (license license:expat)))
10720
10721 (define-public python2-inflection
10722 (package-with-python2 python-inflection))
10723
10724 (define-public python-pylev
10725 (package
10726 (name "python-pylev")
10727 (version "1.3.0")
10728 (source (origin
10729 (method url-fetch)
10730 (uri (pypi-uri "pylev" version))
10731 (sha256
10732 (base32
10733 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
10734 (build-system python-build-system)
10735 (home-page "https://github.com/toastdriven/pylev")
10736 (synopsis "Levenshtein distance implementation in Python")
10737 (description "Pure Python Levenshtein implementation, based off the
10738 Wikipedia code samples at
10739 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
10740 (license license:bsd-3)))
10741
10742 (define-public python2-pylev
10743 (package-with-python2 python-pylev))
10744
10745 (define-public python-cleo
10746 (package
10747 (name "python-cleo")
10748 (version "0.7.6")
10749 (source (origin
10750 (method url-fetch)
10751 (uri (pypi-uri "cleo" version))
10752 (sha256
10753 (base32
10754 "02dlc0rn43zgvw0s5v4j80bca9n1jfpwy3r78gn9qjgk0qj39kwr"))))
10755 (build-system python-build-system)
10756 (native-inputs
10757 `( ;; For testing
10758 ("python-mock" ,python-mock)
10759 ("python-pytest-mock" ,python-pytest-mock)
10760 ("python-pytest" ,python-pytest)))
10761 (propagated-inputs
10762 `(("python-backpack" ,python-backpack)
10763 ("python-clikit" ,python-clikit)
10764 ("python-pastel" ,python-pastel)
10765 ("python-pylev" ,python-pylev)))
10766 (home-page "https://github.com/sdispater/cleo")
10767 (synopsis "Command-line arguments library for Python")
10768 (description
10769 "Cleo allows you to create command-line commands with signature in
10770 docstring and colored output.")
10771 (license license:expat)))
10772
10773 (define-public python2-cleo
10774 (package-with-python2 python-cleo))
10775
10776 (define-public python-tomlkit
10777 (package
10778 (name "python-tomlkit")
10779 (version "0.5.8")
10780 (source
10781 (origin
10782 (method url-fetch)
10783 (uri (pypi-uri "tomlkit" version))
10784 (sha256
10785 (base32
10786 "0sf2a4q61kf344hjbw8kb6za1hlccl89j9lzqw0l2zpddp0hrh9j"))))
10787 (build-system python-build-system)
10788 (native-inputs
10789 `(("python-pytest" ,python-pytest)))
10790 (home-page
10791 "https://github.com/sdispater/tomlkit")
10792 (synopsis "Style preserving TOML library")
10793 (description
10794 "TOML Kit is a 0.5.0-compliant TOML library. It includes a parser that
10795 preserves all comments, indentations, whitespace and internal element ordering,
10796 and makes them accessible and editable via an intuitive API. It can also
10797 create new TOML documents from scratch using the provided helpers. Part of the
10798 implementation as been adapted, improved and fixed from Molten.")
10799 (license license:expat)))
10800
10801 (define-public python-shellingham
10802 (package
10803 (name "python-shellingham")
10804 (version "1.3.1")
10805 (source
10806 (origin
10807 (method url-fetch)
10808 (uri (pypi-uri "shellingham" version))
10809 (sha256
10810 (base32
10811 "1q7kws7w4x2hji3g7y0ni9ddk4sd676ylrb3db54gbpys6xj6nwq"))))
10812 (build-system python-build-system)
10813 (home-page
10814 "https://github.com/sarugaku/shellingham")
10815 (synopsis "Tool to detect surrounding shell")
10816 (description
10817 "Shellingham detects what shell the current Python executable is
10818 running in.")
10819 (license license:isc)))
10820
10821 (define-public python-memcached
10822 (package
10823 (name "python-memcached")
10824 (version "1.59")
10825 (source
10826 (origin
10827 (method url-fetch)
10828 (uri (pypi-uri "python-memcached" version))
10829 (sha256
10830 (base32
10831 "0kvyapavbirk2x3n1jx4yb9nyigrj1s3x15nm3qhpvhkpqvqdqm2"))))
10832 (build-system python-build-system)
10833 (propagated-inputs `(("python-six" ,python-six)))
10834 (home-page
10835 "https://github.com/linsomniac/python-memcached")
10836 (synopsis "Pure python memcached client")
10837 (description
10838 "This software is a pure Python interface to the memcached memory cache
10839 daemon. It is the client side software which allows storing values in one or
10840 more, possibly remote, memcached servers.")
10841 (license license:psfl)))
10842
10843 (define-public python-clikit
10844 (package
10845 (name "python-clikit")
10846 (version "0.4.1")
10847 (source
10848 (origin
10849 (method url-fetch)
10850 (uri (pypi-uri "clikit" version))
10851 (sha256
10852 (base32
10853 "10gab65pq0jdf589n33sj2513pxal2lisl4xwf1ijysdjxmpdr4a"))))
10854 (build-system python-build-system)
10855 (propagated-inputs
10856 `(("python-pastel" ,python-pastel)
10857 ("python-pylev" ,python-pylev)))
10858 (home-page "https://github.com/sdispater/clikit")
10859 (synopsis "Group of utilities to build command line interfaces")
10860 (description
10861 "CliKit is a group of utilities to build testable command line
10862 interfaces.")
10863 (license license:expat)))
10864
10865 (define-public python-msgpack-python
10866 (package
10867 (name "python-msgpack-python")
10868 (version "0.5.6")
10869 (source
10870 (origin
10871 (method url-fetch)
10872 (uri (pypi-uri "msgpack-python" version))
10873 (sha256
10874 (base32
10875 "16wh8qgybmfh4pjp8vfv78mdlkxfmcasg78lzlnm6nslsfkci31p"))))
10876 (build-system python-build-system)
10877 (home-page "http://msgpack.org/")
10878 (synopsis "Package to deserialize messages in MessagePack binary format")
10879 (description
10880 "MessagePack is an efficient binary serialization format. It lets you
10881 exchange data among multiple languages like JSON. But it's faster and
10882 smaller. Small integers are encoded into a single byte, and typical short
10883 strings require only one extra byte in addition to the strings themselves.")
10884 (license license:asl2.0)))
10885
10886 (define-public python-cachy
10887 (package
10888 (name "python-cachy")
10889 (version "0.2.0")
10890 (source
10891 (origin
10892 (method url-fetch)
10893 (uri (pypi-uri "cachy" version))
10894 (sha256
10895 (base32
10896 "0v6mjyhgx6j7ya20bk69cr3gdzdkdf6psay0h090rscclgji65dp"))))
10897 (build-system python-build-system)
10898 (native-inputs
10899 `(("python-fakeredis" ,python-fakeredis)
10900 ("python-flexmock" ,python-flexmock)
10901 ("python-pytest" ,python-pytest)))
10902 (propagated-inputs
10903 `(("python-memcached" ,python-memcached)
10904 ("python-msgpack-python" ,python-msgpack-python)
10905 ("python-redis" ,python-redis)))
10906 (home-page "https://github.com/sdispater/cachy")
10907 (synopsis "Simple yet effective caching library")
10908 (description
10909 "Cachy provides a simple yet effective caching library. A simple but
10910 powerful API: thread-safety; decorator syntax; support for memcached, redis,
10911 database, file, dict stores. Cachy supports python versions 2.7+ and 3.2+.")
10912 (license license:expat)))
10913
10914 (define-public poetry
10915 (package
10916 (name "poetry")
10917 (version "0.12.17")
10918 ;; Poetry can only be built from source with poetry.
10919 (source
10920 (origin
10921 (method url-fetch)
10922 (uri (pypi-uri "poetry" version))
10923 (sha256
10924 (base32
10925 "0gxwcd65qjmzqzppf53x51sic1rbcd9py6cdzx3aprppipimslvf"))))
10926 (build-system python-build-system)
10927 (arguments
10928 `(#:tests? #f ;; Pypi does not have tests.
10929 #:phases
10930 (modify-phases %standard-phases
10931 (replace 'build
10932 (lambda _
10933 ;; Bug in poetry https://github.com/sdispater/poetry/issues/866.
10934 (invoke "sed" "-i" "-e" "s/from distutils.core/from setuptools/"
10935 "setup.py")
10936 #t)))))
10937 (propagated-inputs
10938 `(("python-cachecontrol" ,python-cachecontrol)
10939 ("python-cachy" ,python-cachy)
10940 ("python-cleo" ,python-cleo)
10941 ("python-glob2" ,python-glob2)
10942 ("python-html5lib" ,python-html5lib)
10943 ("python-jsonschema" ,python-jsonschema)
10944 ("python-msgpack" ,python-msgpack)
10945 ("python-pkginfo" ,python-pkginfo)
10946 ("python-pyparsing" ,python-pyparsing)
10947 ("python-pyrsistent" ,python-pyrsistent)
10948 ("python-requests" ,python-requests)
10949 ("python-requests-toolbelt" ,python-requests-toolbelt)
10950 ("python-shellingham" ,python-shellingham)
10951 ("python-tomlkit" ,python-tomlkit)
10952 ("python-virtualenv" ,python-virtualenv)))
10953 (home-page "https://poetry.eustace.io/")
10954 (synopsis "Python dependency management and packaging made easy")
10955 (description "Poetry is a tool for dependency management and packaging
10956 in Python. It allows you to declare the libraries your project depends on and
10957 it will manage (install/update) them for you.")
10958 (license license:expat)))
10959
10960 (define-public python-lazy-object-proxy
10961 (package
10962 (name "python-lazy-object-proxy")
10963 (version "1.4.3")
10964 (source (origin
10965 (method url-fetch)
10966 (uri (pypi-uri "lazy-object-proxy" version))
10967 (sha256
10968 (base32
10969 "1w1aaay424ciz8fz3fkzxb0pxzfxn184f2whpyn4fx72bn50x47k"))))
10970 (native-inputs
10971 `(("python-setuptools-scm" ,python-setuptools-scm)))
10972 (build-system python-build-system)
10973 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10974 (synopsis "Lazy object proxy for python")
10975 (description
10976 "Lazy object proxy is an object that wraps a callable but defers the call
10977 until the object is actually required, and caches the result of said call.")
10978 (license license:bsd-2)))
10979
10980 (define-public python2-lazy-object-proxy
10981 (package-with-python2 python-lazy-object-proxy))
10982
10983 (define-public python-dnspython
10984 (package
10985 (name "python-dnspython")
10986 (version "1.15.0")
10987 (source (origin
10988 (method url-fetch)
10989 (uri (string-append "http://www.dnspython.org/kits/"
10990 version "/dnspython-" version ".tar.gz"))
10991 (sha256
10992 (base32
10993 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
10994 (build-system python-build-system)
10995 (arguments '(#:tests? #f)) ; XXX: requires internet access
10996 (home-page "http://www.dnspython.org")
10997 (synopsis "DNS toolkit for Python")
10998 (description
10999 "dnspython is a DNS toolkit for Python. It supports almost all record
11000 types. It can be used for queries, zone transfers, and dynamic updates.
11001 It supports TSIG authenticated messages and EDNS0.")
11002 (license license:expat)))
11003
11004 (define-public python2-dnspython
11005 (package-with-python2 python-dnspython))
11006
11007 (define-public python-email-validator
11008 (package
11009 (name "python-email-validator")
11010 (version "1.0.2")
11011 (source
11012 (origin (method url-fetch)
11013 (uri (pypi-uri "email_validator" version))
11014 (sha256
11015 (base32
11016 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
11017 (build-system python-build-system)
11018 (arguments
11019 '(#:phases
11020 (modify-phases %standard-phases
11021 (add-before 'build 'use-dnspython
11022 (lambda _
11023 (substitute* "setup.py"
11024 (("dnspython3") "dnspython"))
11025 #t)))))
11026 (propagated-inputs
11027 `(("python-dnspython" ,python-dnspython)
11028 ("python-idna" ,python-idna)))
11029 (home-page "https://github.com/JoshData/python-email-validator")
11030 (synopsis "Email address validation library for Python")
11031 (description
11032 "This library validates email address syntax and deliverability.")
11033 (license license:cc0)))
11034
11035 (define-public python2-email-validator
11036 (package-with-python2 python-email-validator))
11037
11038 (define-public python-ukpostcodeparser
11039 (package
11040 (name "python-ukpostcodeparser")
11041 (version "1.0.3")
11042 (source (origin
11043 (method url-fetch)
11044 (uri (pypi-uri "UkPostcodeParser" version))
11045 (sha256
11046 (base32
11047 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
11048 (build-system python-build-system)
11049 (home-page "https://github.com/hamstah/ukpostcodeparser")
11050 (synopsis "UK Postcode parser for Python")
11051 (description
11052 "This library provides the @code{parse_uk_postcode} function for
11053 parsing UK postcodes.")
11054 (license license:expat)))
11055
11056 (define-public python2-ukpostcodeparser
11057 (package-with-python2 python-ukpostcodeparser))
11058
11059 (define-public python-faker
11060 (package
11061 (name "python-faker")
11062 (version "0.7.9")
11063 (source (origin
11064 (method url-fetch)
11065 (uri (pypi-uri "Faker" version))
11066 (sha256
11067 (base32
11068 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
11069 (patches
11070 (search-patches "python-faker-fix-build-32bit.patch"))
11071 (modules '((guix build utils)))
11072 (snippet
11073 '(begin
11074 (for-each delete-file (find-files "." "\\.pyc$"))
11075 #t))))
11076 (build-system python-build-system)
11077 (arguments
11078 '(#:phases
11079 (modify-phases %standard-phases
11080 (replace 'check
11081 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
11082 (native-inputs
11083 `(;; For testing
11084 ("python-email-validator" ,python-email-validator)
11085 ("python-mock" ,python-mock)
11086 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
11087 (propagated-inputs
11088 `(("python-dateutil" ,python-dateutil)
11089 ("python-six" ,python-six)))
11090 (home-page "https://github.com/joke2k/faker")
11091 (synopsis "Python package that generates fake data")
11092 (description
11093 "Faker is a Python package that generates fake data such as names,
11094 addresses, and phone numbers.")
11095 (license license:expat)
11096 (properties `((python2-variant . ,(delay python2-faker))))))
11097
11098 (define-public python2-faker
11099 (let ((base (package-with-python2 (strip-python2-variant
11100 python-faker))))
11101 (package
11102 (inherit base)
11103 (propagated-inputs
11104 `(("python2-ipaddress" ,python2-ipaddress)
11105 ,@(package-propagated-inputs base))))))
11106
11107 (define-public python-pyaml
11108 (package
11109 (name "python-pyaml")
11110 (version "18.11.0")
11111 (source (origin
11112 (method url-fetch)
11113 (uri (pypi-uri "pyaml" version))
11114 (sha256
11115 (base32
11116 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
11117 (build-system python-build-system)
11118 (native-inputs
11119 `(("python-unidecode" ,python-unidecode)))
11120 (propagated-inputs
11121 `(("python-pyyaml" ,python-pyyaml)))
11122 (home-page "https://github.com/mk-fg/pretty-yaml")
11123 (synopsis "YAML pretty-print library for Python")
11124 (description
11125 "pyaml is a PyYAML based python module to produce pretty and readable
11126 YAML-serialized data.")
11127 (license license:wtfpl2)))
11128
11129 (define-public python2-pyaml
11130 (package-with-python2 python-pyaml))
11131
11132 (define-public python-backpack
11133 (package
11134 (name "python-backpack")
11135 (version "0.1")
11136 (source
11137 (origin
11138 (method url-fetch)
11139 (uri (pypi-uri "backpack" version))
11140 (sha256
11141 (base32
11142 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
11143 (build-system python-build-system)
11144 (native-inputs
11145 `(("python-pytest" ,python-pytest)
11146 ("python-nose" ,python-nose)))
11147 (propagated-inputs
11148 `(("python-simplejson" ,python-simplejson)))
11149 (home-page "https://github.com/sdispater/backpack")
11150 (synopsis "Utilities for working with Python collections")
11151 (description "Backpack provides some useful utilities for working with
11152 collections of data.")
11153 (license license:expat)))
11154
11155 (define-public python2-backpack
11156 (package-with-python2 python-backpack))
11157
11158 (define-public python-prompt-toolkit
11159 (package
11160 (name "python-prompt-toolkit")
11161 (version "2.0.7")
11162 (source
11163 (origin
11164 (method url-fetch)
11165 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
11166 (sha256
11167 (base32
11168 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
11169 (build-system python-build-system)
11170 (arguments
11171 `(#:phases
11172 (modify-phases %standard-phases
11173 (delete 'check)
11174 (add-after 'install 'post-install-check
11175 (lambda* (#:key inputs outputs #:allow-other-keys)
11176 ;; HOME is needed for the test
11177 ;; "test_pathcompleter_can_expanduser".
11178 (setenv "HOME" "/tmp")
11179 (add-installed-pythonpath inputs outputs)
11180 (invoke "py.test"))))))
11181 (propagated-inputs
11182 `(("python-wcwidth" ,python-wcwidth)
11183 ("python-six" ,python-six)
11184 ("python-pygments" ,python-pygments)))
11185 (native-inputs
11186 `(("python-pytest" ,python-pytest)))
11187 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
11188 (synopsis "Library for building command line interfaces in Python")
11189 (description
11190 "Prompt-Toolkit is a library for building interactive command line
11191 interfaces in Python. It's like GNU Readline but it also features syntax
11192 highlighting while typing, out-of-the-box multi-line input editing, advanced
11193 code completion, incremental search, support for Chinese double-width
11194 characters, mouse support, and auto suggestions.")
11195 (license license:bsd-3)))
11196
11197 (define-public python2-prompt-toolkit
11198 (package-with-python2 python-prompt-toolkit))
11199
11200 (define-public python-prompt-toolkit-1
11201 (package (inherit python-prompt-toolkit)
11202 (version "1.0.15")
11203 (source
11204 (origin
11205 (method url-fetch)
11206 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
11207 (sha256
11208 (base32
11209 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
11210
11211 (define-public python2-prompt-toolkit-1
11212 (package-with-python2 python-prompt-toolkit-1))
11213
11214 (define-public python-jedi
11215 (package
11216 (name "python-jedi")
11217 (version "0.15.1")
11218 (source
11219 (origin
11220 (method url-fetch)
11221 (uri (pypi-uri "jedi" version))
11222 (sha256
11223 (base32
11224 "0bp4pxhsynaarbvzblsn5x32lzp29svy3sxfy8i6m5iwz9s9r1ds"))))
11225 (build-system python-build-system)
11226 (arguments
11227 `(#:phases
11228 (modify-phases %standard-phases
11229 (add-after 'unpack 'disable-file-completion-test
11230 ;; A single parameterized test currently fail (see:
11231 ;; https://github.com/davidhalter/jedi/issues/1395). Remove it.
11232 (lambda _
11233 (substitute* "test/test_api/test_completion.py"
11234 ((".*'example.py', 'rb\"' \\+ join\\('\\.\\.'.*") ""))
11235 #t))
11236 (replace 'check
11237 (lambda _
11238 (setenv "HOME" "/tmp")
11239 (invoke "python" "-m" "pytest"))))))
11240 (native-inputs
11241 `(("python-pytest" ,python-pytest)
11242 ("python-docopt" ,python-docopt)))
11243 (propagated-inputs
11244 `(("python-parso" ,python-parso)))
11245 (home-page "https://github.com/davidhalter/jedi")
11246 (synopsis "Autocompletion and static analysis library for Python")
11247 (description
11248 "Jedi is a static analysis tool for Python that can be used in Integrated
11249 Development Environments (@dfn{IDE}s) and text editors. It understands Python
11250 on a deeper level than many other static analysis frameworks for Python.
11251
11252 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
11253 well.")
11254 (license license:expat)))
11255
11256 (define-public python2-jedi
11257 (package-with-python2 python-jedi))
11258
11259 (define-public ptpython
11260 (package
11261 (name "ptpython")
11262 (version "0.34")
11263 (source (origin
11264 (method url-fetch)
11265 (uri (pypi-uri "ptpython" version))
11266 (sha256
11267 (base32
11268 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
11269 (build-system python-build-system)
11270 (arguments
11271 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
11272 (propagated-inputs
11273 `(("python-docopt" ,python-docopt)
11274 ("python-jedi" ,python-jedi)
11275 ("python-prompt-toolkit" ,python-prompt-toolkit)
11276 ("python-pygments" ,python-pygments)))
11277 (home-page "https://github.com/jonathanslenders/ptpython")
11278 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
11279 (description
11280 "ptpython is a Python read-eval-print loop with IDE-like features.
11281 It supports syntax highlighting, multiline editing, autocompletion, mouse,
11282 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
11283 etc.")
11284 (license license:bsd-3)
11285 (properties `((python2-variant . ,(delay ptpython-2))))))
11286
11287 (define-public ptpython-2
11288 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
11289 (package
11290 (inherit base)
11291 (name "ptpython2"))))
11292
11293 (define-public python-stem
11294 (package
11295 (name "python-stem")
11296 (version "1.7.1")
11297 (source
11298 (origin
11299 (method url-fetch)
11300 (uri (pypi-uri "stem" version))
11301 (sha256
11302 (base32
11303 "18lc95pmc7i089nlsb06dsxyjl5wbhxfqgdxbjcia35ndh8z7sn9"))))
11304 (build-system python-build-system)
11305 (arguments
11306 `(#:phases
11307 (modify-phases %standard-phases
11308 (replace 'check
11309 (lambda _
11310 (invoke "./run_tests.py" "--unit")
11311 #t)))))
11312 (native-inputs
11313 `(("python-mock" ,python-mock)
11314 ("python-pycodestyle" ,python-pycodestyle)
11315 ("python-pyflakes" ,python-pyflakes)))
11316 (home-page "https://stem.torproject.org/")
11317 (synopsis
11318 "Python controller library that allows applications to interact with Tor")
11319 (description
11320 "Stem is a Python controller library for Tor. With it you can use Tor's
11321 control protocol to script against the Tor process and read descriptor data
11322 relays publish about themselves.")
11323 (license license:lgpl3)))
11324
11325 (define-public python2-stem
11326 (package-with-python2 python-stem))
11327
11328 (define-public python-pyserial
11329 (package
11330 (name "python-pyserial")
11331 (version "3.4")
11332 (source
11333 (origin
11334 (method url-fetch)
11335 (uri (pypi-uri "pyserial" version))
11336 (sha256
11337 (base32
11338 "09y68bczw324a4jb9a1cfwrbjhq179vnfkkkrybbksp0vqgl0bbf"))))
11339 (build-system python-build-system)
11340 (arguments
11341 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
11342 ;; #:phases
11343 ;; (modify-phases %standard-phases
11344 ;; (replace 'check
11345 ;; (lambda _
11346 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
11347 (home-page
11348 "https://github.com/pyserial/pyserial")
11349 (synopsis "Python Serial Port Bindings")
11350 (description "@code{pyserial} provide serial port bindings for Python. It
11351 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
11352 and/or Xon/Xoff. The port is accessed in RAW mode.")
11353 (license license:bsd-3)))
11354
11355 (define-public python2-pyserial
11356 (package-with-python2 python-pyserial))
11357
11358 (define-public python-kivy
11359 (package
11360 (name "python-kivy")
11361 (version "1.10.1")
11362 (source
11363 (origin
11364 (method url-fetch)
11365 (uri (pypi-uri "Kivy" version))
11366 (file-name (string-append name "-" version ".tar.gz"))
11367 (sha256
11368 (base32
11369 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
11370 (build-system python-build-system)
11371 (arguments
11372 `(#:tests? #f ; Tests require many optional packages
11373 #:phases
11374 (modify-phases %standard-phases
11375 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
11376 (lambda* (#:key inputs #:allow-other-keys)
11377 (setenv "KIVY_SDL2_PATH"
11378 (string-append (assoc-ref inputs "sdl-union")
11379 "/include/SDL2"))
11380 #t)))))
11381 (native-inputs
11382 `(("git" ,git)
11383 ("pkg-config" ,pkg-config)
11384 ("python-cython" ,python-cython)))
11385 (inputs
11386 `(("gstreamer" ,gstreamer)
11387 ("mesa" ,mesa)
11388 ("sdl-union"
11389 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
11390 (home-page "http://kivy.org")
11391 (synopsis
11392 "Multitouch application framework")
11393 (description
11394 "A software library for rapid development of
11395 hardware-accelerated multitouch applications.")
11396 (license license:expat)))
11397
11398 (define-public python2-kivy
11399 (package-with-python2 python-kivy))
11400
11401 (define-public python-kivy-next
11402 (deprecated-package "python-kivy-next" python-kivy))
11403
11404 (define-public python2-kivy-next
11405 (deprecated-package "python2-kivy-next" python2-kivy))
11406
11407 (define-public python-binaryornot
11408 (package
11409 (name "python-binaryornot")
11410 (version "0.4.4")
11411 (source (origin
11412 (method url-fetch)
11413 (uri (pypi-uri "binaryornot" version))
11414 (sha256
11415 (base32
11416 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
11417 (build-system python-build-system)
11418 (arguments
11419 `(#:phases
11420 (modify-phases %standard-phases
11421 (add-after 'unpack 'patch-tests
11422 (lambda _
11423 ;; TypeError: binary() got an unexpected keyword argument
11424 ;; 'average_size'.
11425 (substitute* "tests/test_check.py"
11426 (("average_size=512") ""))
11427 #t)))))
11428 (propagated-inputs
11429 `(("python-chardet" ,python-chardet)
11430 ("python-hypothesis" ,python-hypothesis)))
11431 (home-page "https://github.com/audreyr/binaryornot")
11432 (synopsis "Package to check if a file is binary or text")
11433 (description "Ultra-lightweight pure Python package to check if a file is
11434 binary or text.")
11435 (license license:bsd-3)
11436 (properties `((python2-variant . ,(delay python2-binaryornot))))))
11437
11438 (define-public python2-binaryornot
11439 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
11440 (package (inherit base)
11441 (propagated-inputs
11442 `(("python2-enum34" ,python2-enum34)
11443 ,@(package-propagated-inputs base))))))
11444
11445 (define-public python-binwalk
11446 (package
11447 (name "python-binwalk")
11448 (version "2.2.0")
11449 (source
11450 (origin
11451 (method git-fetch)
11452 (uri (git-reference
11453 (url "https://github.com/ReFirmLabs/binwalk")
11454 (commit (string-append "v" version))))
11455 (file-name (git-file-name name version))
11456 (sha256
11457 (base32
11458 "1bxgj569fzwv6jhcbl864nmlsi9x1k1r20aywjxc8b9b1zgqrlvc"))))
11459 (build-system python-build-system)
11460 (arguments
11461 `(#:phases
11462 (modify-phases %standard-phases
11463 (add-before 'check 'set-pythonpath
11464 (lambda _
11465 (setenv "PYTHONPATH"
11466 (string-append
11467 (getcwd) "/src/"
11468 ":" (getenv "PYTHONPATH")))
11469 (setenv "HOME" "")
11470 #t)))))
11471 (native-inputs
11472 `(("python-coverage" ,python-coverage)
11473 ("python-nose" ,python-nose)))
11474 (home-page "https://github.com/ReFirmLabs/binwalk")
11475 (synopsis "Firmware analysis tool")
11476 (description "Binwalk is a tool for analyzing, reverse engineering, and
11477 extracting firmware images")
11478 (license license:expat)))
11479
11480 (define-public python-nltk
11481 (package
11482 (name "python-nltk")
11483 (version "3.2.1")
11484 (source (origin
11485 (method url-fetch)
11486 (uri (pypi-uri "nltk" version))
11487 (sha256
11488 (base32
11489 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
11490 (build-system python-build-system)
11491 (arguments
11492 '(;; The tests require some extra resources to be downloaded.
11493 ;; TODO Try packaging these resources.
11494 #:tests? #f))
11495 (home-page "http://nltk.org/")
11496 (synopsis "Natural Language Toolkit")
11497 (description "It provides interfaces to over 50 corpora and lexical
11498 resources such as WordNet, along with a suite of text processing libraries
11499 for classification, tokenization, stemming, tagging, parsing, and semantic
11500 reasoning, wrappers for natural language processing libraries.")
11501 (license license:asl2.0)))
11502
11503 (define-public python2-nltk
11504 (package-with-python2 python-nltk))
11505
11506 (define-public python-pymongo
11507 (package
11508 (name "python-pymongo")
11509 (version "3.7.2")
11510 (source (origin
11511 (method url-fetch)
11512 (uri (pypi-uri "pymongo" version))
11513 (sha256
11514 (base32
11515 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
11516 (build-system python-build-system)
11517 (propagated-inputs
11518 `(("python-certifi" ,python-certifi)))
11519 (home-page "https://github.com/mongodb/mongo-python-driver")
11520 (synopsis "Python driver for MongoDB")
11521 (description "Python driver for MongoDB.")
11522 (license license:asl2.0)))
11523
11524 (define-public python2-pymongo
11525 (package-with-python2 python-pymongo))
11526
11527 (define-public python-consul
11528 (package
11529 (name "python-consul")
11530 (version "0.6.1")
11531 (source
11532 (origin
11533 (method url-fetch)
11534 (uri (pypi-uri "python-consul" version))
11535 (sha256
11536 (base32
11537 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
11538 (build-system python-build-system)
11539 (arguments
11540 '(#:tests? #f)) ; The tests are not distributed
11541 (propagated-inputs
11542 `(("python-requests" ,python-requests)
11543 ("python-six" ,python-six)))
11544 (home-page "https://github.com/cablehead/python-consul")
11545 (synopsis "Python client for Consul")
11546 (description
11547 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
11548 discovery, monitoring and configuration.")
11549 (license license:expat)))
11550
11551 (define-public python2-consul
11552 (package-with-python2 python-consul))
11553
11554 (define-public python-schematics
11555 (package
11556 (name "python-schematics")
11557 (version "1.1.1")
11558 (source
11559 (origin
11560 (method git-fetch)
11561 (uri (git-reference
11562 (url "https://github.com/schematics/schematics.git")
11563 (commit (string-append "v" version))))
11564 (file-name (git-file-name name version))
11565 (sha256
11566 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
11567 (build-system python-build-system)
11568 (propagated-inputs
11569 `(("python-six" ,python-six)))
11570 (arguments
11571 ;; The tests require a bunch of not very nice packages with fixed
11572 ;; version requirements (e.g. python-coveralls).
11573 `(#:tests? #f))
11574 (home-page "https://github.com/schematics/schematics")
11575 (synopsis "Python Data Structures for Humans")
11576 (description "Python Data Structures for Humans.")
11577 (license license:bsd-3)))
11578
11579 (define-public python2-schematics
11580 (package-with-python2 python-schematics))
11581
11582 (define-public python-odfpy
11583 (package
11584 (name "python-odfpy")
11585 (version "1.3.3")
11586 (source (origin
11587 (method url-fetch)
11588 (uri (pypi-uri "odfpy" version))
11589 (sha256
11590 (base32
11591 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
11592 (arguments
11593 `(#:modules ((srfi srfi-1)
11594 (guix build python-build-system)
11595 (guix build utils))
11596 #:phases
11597 (modify-phases %standard-phases
11598 (replace 'check
11599 ;; The test runner invokes python2 and python3 for test*.py.
11600 ;; To avoid having both in inputs, we replicate it here.
11601 (lambda _
11602 (for-each (lambda (test-file) (invoke "python" test-file))
11603 (find-files "tests" "^test.*\\.py$"))
11604 #t)))))
11605 (build-system python-build-system)
11606 (home-page "https://github.com/eea/odfpy")
11607 (synopsis "Python API and tools to manipulate OpenDocument files")
11608 (description "Collection of libraries and utility programs written in
11609 Python to manipulate OpenDocument 1.2 files.")
11610 (license
11611 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
11612 ;; number of files with other licenses.
11613 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
11614
11615 (define-public python2-odfpy
11616 (package-with-python2 python-odfpy))
11617
11618 (define-public python-natsort
11619 (package
11620 (name "python-natsort")
11621 (version "5.4.1")
11622 (source (origin
11623 (method url-fetch)
11624 (uri (pypi-uri "natsort" version))
11625 (sha256
11626 (base32
11627 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
11628 (build-system python-build-system)
11629 (arguments
11630 `(#:modules ((guix build utils)
11631 (guix build python-build-system)
11632 (srfi srfi-1)
11633 (srfi srfi-26)
11634 (ice-9 ftw))
11635 #:phases
11636 (modify-phases %standard-phases
11637 (add-before 'check 'set-cachedir
11638 ;; Tests require write access to $HOME by default
11639 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
11640 (replace 'check
11641 (lambda _
11642 (let ((cwd (getcwd)))
11643 (setenv "PYTHONPATH"
11644 (string-append
11645 cwd "/build/"
11646 (find (cut string-prefix? "lib" <>)
11647 (scandir (string-append cwd "/build")))
11648 ":"
11649 (getenv "PYTHONPATH")))
11650 (invoke "pytest" "-v")))))))
11651 (native-inputs
11652 `(("python-hypothesis" ,python-hypothesis)
11653 ("python-pytest-cov" ,python-pytest-cov)
11654 ("python-pytest-mock" ,python-pytest-mock)
11655 ("python-pytest" ,python-pytest)))
11656 (propagated-inputs ; TODO: Add python-fastnumbers.
11657 `(("python-pyicu" ,python-pyicu)))
11658 (home-page "https://github.com/SethMMorton/natsort")
11659 (synopsis "Natural sorting for python and shell")
11660 (description
11661 "Natsort lets you apply natural sorting on lists instead of
11662 lexicographical. If you use the built-in @code{sorted} method in python
11663 on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
11664 @code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
11665 @code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
11666 identifies numbers and sorts them separately from strings. It can also sort
11667 version numbers, real numbers, mixed types and more, and comes with a shell
11668 command @command{natsort} that exposes this functionality in the command line.")
11669 (license license:expat)
11670 (properties `((python2-variant . ,(delay python2-natsort))))))
11671
11672 (define-public python2-natsort
11673 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
11674 (package (inherit base)
11675 (native-inputs
11676 `(("python2-pathlib" ,python2-pathlib)
11677 ,@(package-native-inputs base))))))
11678
11679 (define-public python-glances
11680 (package
11681 (name "python-glances")
11682 (version "3.1.2")
11683 (source
11684 (origin
11685 (method url-fetch)
11686 (uri (pypi-uri "Glances" version))
11687 (sha256
11688 (base32 "15384pbvw9wj4sb8zgvd9v1812vrypbyjg0acicjf1hdb3p30fkk"))
11689 (modules '((guix build utils)))
11690 (snippet
11691 '(begin
11692 ;; Glances phones PyPI for weekly update checks by default.
11693 ;; Disable these. The user can re-enable them if desired.
11694 (substitute* "glances/outdated.py"
11695 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
11696 (string-append indentation
11697 "self.args.disable_check_update = True\n"
11698 line)))
11699 #t))))
11700 (build-system python-build-system)
11701 (propagated-inputs
11702 `(("python-future" ,python-future)
11703 ("python-psutil" ,python-psutil)))
11704 (home-page "https://github.com/nicolargo/glances")
11705 (synopsis "Cross-platform curses-based monitoring tool")
11706 (description
11707 "Glances is a curses-based monitoring tool for a wide variety of platforms.
11708 Glances uses the PsUtil library to get information from your system. It
11709 monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
11710 (license license:lgpl3+)))
11711
11712 (define-public python2-glances
11713 (package-with-python2 python-glances))
11714
11715 (define-public python-graphql-core
11716 (package
11717 (name "python-graphql-core")
11718 (version "0.5.3")
11719 (source
11720 (origin
11721 (method url-fetch)
11722 (uri (pypi-uri "graphql-core" version))
11723 (sha256
11724 (base32
11725 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
11726 (build-system python-build-system)
11727 (arguments
11728 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
11729 #:phases
11730 (modify-phases %standard-phases
11731 (add-after 'unpack 'patch-hardcoded-version
11732 (lambda _ (substitute*
11733 "setup.py"
11734 (("'gevent==1.1rc1'") "'gevent'"))
11735 #t)))))
11736 (native-inputs
11737 `(("python-gevent" ,python-gevent)
11738 ("python-mock" ,python-mock)
11739 ("python-pytest-mock" ,python-pytest-mock)))
11740 (propagated-inputs
11741 `(("python-promise" ,python-promise)
11742 ("python-six" ,python-six)))
11743 (home-page "https://github.com/graphql-python/graphql-core")
11744 (synopsis "GraphQL implementation for Python")
11745 (description
11746 "GraphQL implementation for Python. GraphQL is a data query language and
11747 runtime designed and used to request and deliver data to mobile and web apps.
11748 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
11749 to Python.")
11750 (license license:expat)))
11751
11752 (define-public python2-graphql-core
11753 (package-with-python2 python-graphql-core))
11754
11755 (define-public python-graphql-relay
11756 (package
11757 (name "python-graphql-relay")
11758 (version "0.4.5")
11759 (source
11760 (origin
11761 (method url-fetch)
11762 (uri (pypi-uri "graphql-relay" version))
11763 (sha256
11764 (base32
11765 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
11766 (build-system python-build-system)
11767 (arguments
11768 '(#:tests? #f)) ; The tests are not distributed
11769 (propagated-inputs
11770 `(("python-graphql-core" ,python-graphql-core)
11771 ("python-promise" ,python-promise)
11772 ("python-six" ,python-six)))
11773 (home-page "https://github.com/graphql-python/graphql-relay-py")
11774 (synopsis "Relay implementation for Python")
11775 (description
11776 "This is a library to allow the easy creation of Relay-compliant servers
11777 using the GraphQL Python reference implementation of a GraphQL server. It
11778 should be noted that the code is a exact port of the original
11779 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
11780 from Facebook.")
11781 (license license:expat)))
11782
11783 (define-public python2-graphql-relay
11784 (package-with-python2 python-graphql-relay))
11785
11786 (define-public python-graphene
11787 (package
11788 (name "python-graphene")
11789 (version "0.10.2")
11790 (source
11791 (origin
11792 (method url-fetch)
11793 (uri (pypi-uri "graphene" version))
11794 (sha256
11795 (base32
11796 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11797 (build-system python-build-system)
11798 (propagated-inputs
11799 `(("python-graphql-core" ,python-graphql-core)
11800 ("python-graphql-relay" ,python-graphql-relay)
11801 ("python-iso8601" ,python-iso8601)
11802 ("python-promise" ,python-promise)
11803 ("python-six" ,python-six)))
11804 (arguments
11805 `(#:tests? #f)) ; no tests/ in the PyPI tarball
11806 (home-page "https://graphene-python.org/")
11807 (synopsis "GraphQL Framework for Python")
11808 (description
11809 "Graphene is a Python library for building GraphQL schemas/types.
11810 A GraphQL schema describes your data model, and provides a GraphQL server
11811 with an associated set of resolve methods that know how to fetch data.")
11812 (properties `((python2-variant . ,(delay python2-graphene))))
11813 (license license:expat)))
11814
11815 (define-public python2-graphene
11816 (let ((base (package-with-python2
11817 (strip-python2-variant python-graphene))))
11818 (package (inherit base)
11819 (native-inputs
11820 `(("python2-sqlalchemy" ,python2-sqlalchemy)
11821 ,@(package-native-inputs base))))))
11822
11823 (define-public python-nautilus
11824 (package
11825 (name "python-nautilus")
11826 (version "0.4.9")
11827 (source
11828 (origin
11829 (method url-fetch)
11830 (uri (pypi-uri "nautilus" version))
11831 (sha256
11832 (base32
11833 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11834 (build-system python-build-system)
11835 (arguments `(#:tests? #f)) ; fails to import test modules
11836 (propagated-inputs
11837 `(("python-bcrypt" ,python-bcrypt)
11838 ("python-click" ,python-click)
11839 ("python-consul" ,python-consul)
11840 ("python-graphene" ,python-graphene)
11841 ("python-jinja2" ,python-jinja2)
11842 ("python-peewee" ,python-peewee)
11843 ("python-pika" ,python-pika)
11844 ("python-tornado" ,python-tornado)
11845 ("python-wtforms" ,python-wtforms)))
11846 (native-inputs
11847 `(("python-nose2" ,python-nose2)))
11848 (home-page "https://github.com/AlecAivazis/nautilus")
11849 (synopsis "Library for creating microservice applications")
11850 (description
11851 "Nautilus is a framework for flux based microservices that looks to
11852 provide extendible implementations of common aspects of a cloud so that you can
11853 focus on building massively scalable web applications.")
11854 (license license:expat)))
11855
11856 (define-public python-snowballstemmer
11857 (package
11858 (name "python-snowballstemmer")
11859 (version "1.2.1")
11860 (source (origin
11861 (method url-fetch)
11862 (uri (pypi-uri "snowballstemmer" version))
11863 (sha256
11864 (base32
11865 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
11866 (build-system python-build-system)
11867 (arguments
11868 `(;; No tests exist
11869 #:tests? #f))
11870 (home-page "https://github.com/shibukawa/snowball_py")
11871 (synopsis "Snowball stemming library collection for Python")
11872 (description "This package provides 16 word stemmer algorithms generated
11873 from Snowball algorithms. It includes the 15 original ones plus the Poerter
11874 English stemmer.")
11875 (license license:bsd-3)))
11876
11877 (define-public python2-snowballstemmer
11878 (package-with-python2 python-snowballstemmer))
11879
11880 (define-public python-setproctitle
11881 (package
11882 (name "python-setproctitle")
11883 (version "1.1.10")
11884 (source
11885 (origin
11886 (method url-fetch)
11887 (uri (pypi-uri "setproctitle" version))
11888 (sha256
11889 (base32
11890 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11891 (build-system python-build-system)
11892 (arguments
11893 '(#:phases
11894 (modify-phases %standard-phases
11895 (add-before 'check 'patch-Makefile
11896 ;; Stricly this is only required for the python2 variant.
11897 ;; But adding a phase in an inherited package seems to be
11898 ;; cumbersum. So we patch even for python3.
11899 (lambda _
11900 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11901 (when nose
11902 (substitute* "Makefile"
11903 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11904 (string-append nose "/bin/nosetests "))))
11905 #t)))
11906 (replace 'check
11907 (lambda _
11908 (setenv "PYTHON" (or (which "python3") (which "python")))
11909 (setenv "PYCONFIG" (or (which "python3-config")
11910 (which "python-config")))
11911 (setenv "CC" "gcc")
11912 ;; No need to extend PYTHONPATH to find the built package, since
11913 ;; the Makefile will build anyway
11914 (invoke "make" "check"))))))
11915 (native-inputs
11916 `(("procps" ,procps))) ; required for tests
11917 (home-page
11918 "https://github.com/dvarrazzo/py-setproctitle")
11919 (synopsis
11920 "Setproctitle implementation for Python to customize the process title")
11921 (description "The library allows a process to change its title (as displayed
11922 by system tools such as ps and top).
11923
11924 Changing the title is mostly useful in multi-process systems, for
11925 example when a master process is forked: changing the children's title
11926 allows to identify the task each process is busy with. The technique
11927 is used by PostgreSQL and the OpenSSH Server for example.")
11928 (license license:bsd-3)
11929 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11930
11931 (define-public python2-setproctitle
11932 (let ((base (package-with-python2
11933 (strip-python2-variant python-setproctitle))))
11934 (package
11935 (inherit base)
11936 (native-inputs `(("python2-nose" ,python2-nose)
11937 ,@(package-native-inputs base))))))
11938
11939 (define-public python-validictory
11940 (package
11941 (name "python-validictory")
11942 (version "1.0.1")
11943 (source
11944 (origin
11945 (method url-fetch)
11946 (uri (pypi-uri "validictory" version))
11947 (sha256
11948 (base32
11949 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11950 (build-system python-build-system)
11951 (arguments
11952 '(#:phases
11953 (modify-phases %standard-phases
11954 (add-after 'unpack 'bootstrap
11955 ;; Move the tests out of the package directory to avoid
11956 ;; packaging them.
11957 (lambda* _
11958 (rename-file "validictory/tests" "tests")
11959 (delete-file "tests/__init__.py")))
11960 (replace 'check
11961 (lambda _
11962 ;; Extend PYTHONPATH so the built package will be found.
11963 (setenv "PYTHONPATH"
11964 (string-append (getcwd) "/build/lib:"
11965 (getenv "PYTHONPATH")))
11966 (invoke "py.test" "-vv" ))))))
11967 (native-inputs
11968 `(("python-pytest" ,python-pytest)))
11969 (home-page
11970 "https://github.com/jamesturk/validictory")
11971 (synopsis "General purpose Python data validator")
11972 (description "It allows validation of arbitrary Python data structures.
11973
11974 The schema format is based on the JSON Schema
11975 proposal (http://json-schema.org), so combined with json the library is also
11976 useful as a validator for JSON data.")
11977 (license license:expat)))
11978
11979 (define-public python2-validictory
11980 (package-with-python2 python-validictory))
11981
11982 (define-public python-pyelftools
11983 (package
11984 (name "python-pyelftools")
11985 (version "0.25")
11986 (source
11987 (origin
11988 (method url-fetch)
11989 (uri (pypi-uri "pyelftools" version))
11990 (sha256
11991 (base32
11992 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
11993 (build-system python-build-system)
11994 (arguments
11995 `(#:phases
11996 (modify-phases %standard-phases
11997 (add-before 'check 'set-pythonpath
11998 (lambda _
11999 (setenv "PYTHONPATH"
12000 (string-append
12001 (getcwd) "/test/"
12002 ":" (getenv "PYTHONPATH")))
12003 #t)))))
12004 (home-page
12005 "https://github.com/eliben/pyelftools")
12006 (synopsis
12007 "Analyze binary and library file information")
12008 (description "This Python library provides interfaces for parsing and
12009 analyzing two binary and library file formats; the Executable and Linking
12010 Format (ELF), and debugging information in the Debugging With Attributed
12011 Record Format (DWARF).")
12012 (license license:public-domain)))
12013
12014 (define-public python-pyev
12015 (package
12016 (name "python-pyev")
12017 (version "0.9.0")
12018 (source
12019 (origin
12020 (method url-fetch)
12021 (uri (pypi-uri "pyev" version))
12022 (sha256
12023 (base32
12024 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
12025 (build-system python-build-system)
12026 (arguments
12027 `(#:tests? #f ; no test suite
12028 #:phases
12029 (modify-phases %standard-phases
12030 (add-after 'unpack 'patch
12031 (lambda* (#:key inputs #:allow-other-keys)
12032 (let ((libev (string-append (assoc-ref inputs "libev")
12033 "/lib/libev.so.4")))
12034 (substitute* "setup.py"
12035 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
12036 (string-append "libev_dll_name = \"" libev "\"")))))))))
12037 (inputs
12038 `(("libev" ,libev)))
12039 (home-page "http://pythonhosted.org/pyev/")
12040 (synopsis "Python libev interface")
12041 (description "Pyev provides a Python interface to libev.")
12042 (license license:gpl3)))
12043
12044 (define-public python2-pyev
12045 (package-with-python2 python-pyev))
12046
12047 (define-public python-imagesize
12048 (package
12049 (name "python-imagesize")
12050 (version "1.1.0")
12051 (source
12052 (origin
12053 (method url-fetch)
12054 (uri (pypi-uri "imagesize" version))
12055 (sha256
12056 (base32
12057 "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk"))))
12058 (build-system python-build-system)
12059 (home-page "https://github.com/shibukawa/imagesize_py")
12060 (synopsis "Gets image size of files in various formats in Python")
12061 (description
12062 "This package allows determination of image size from
12063 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
12064 (license license:expat)))
12065
12066 (define-public python2-imagesize
12067 (package-with-python2 python-imagesize))
12068
12069 (define-public python-termstyle
12070 (package
12071 (name "python-termstyle")
12072 (version "0.1.11")
12073 (source
12074 (origin
12075 (method url-fetch)
12076 (uri (pypi-uri "termstyle" version))
12077 (sha256
12078 (base32
12079 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
12080 (build-system python-build-system)
12081 (arguments
12082 '(#:phases
12083 (modify-phases %standard-phases
12084 (replace 'check
12085 (lambda _
12086 (invoke "python" "test3.py"))))))
12087 (home-page "https://github.com/gfxmonk/termstyle")
12088 (synopsis "Console text coloring for Python")
12089 (description "This package provides console text coloring for Python.")
12090 (license license:bsd-3)))
12091
12092 (define-public python-argcomplete
12093 (package
12094 (name "python-argcomplete")
12095 (version "1.10.3")
12096 (source
12097 (origin
12098 (method url-fetch)
12099 (uri (pypi-uri "argcomplete" version))
12100 (sha256
12101 (base32
12102 "02jkc44drb0yjz6x28lvg6rj607n8r2irdpdvyylm8xnycn54zx3"))))
12103 (build-system python-build-system)
12104 (arguments
12105 `(#:phases
12106 (modify-phases %standard-phases
12107 (add-after 'unpack 'embed-tool-references
12108 (lambda _
12109 (substitute* "argcomplete/bash_completion.d/python-argcomplete.sh"
12110 ((" grep")
12111 (string-append " " (which "grep")))
12112 ((" egrep")
12113 (string-append " " (which "egrep")))
12114 (("elif which")
12115 (string-append "elif " (which "which")))
12116 (("\\$\\(which")
12117 (string-append "$(" (which "which"))))
12118 #t)))))
12119 (inputs
12120 `(("grep" ,grep)
12121 ("which" ,which)))
12122 (native-inputs
12123 `(("python-coverage" ,python-coverage)
12124 ("python-flake8" ,python-flake8)
12125 ("python-pexpect" ,python-pexpect)
12126 ("python-wheel" ,python-wheel)
12127 ("tcsh" ,tcsh)
12128 ("fish" ,fish)
12129 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
12130 (home-page "https://github.com/kislyuk/argcomplete")
12131 (synopsis "Shell tab completion for Python argparse")
12132 (description "argcomplete provides extensible command line tab completion
12133 of arguments and options for Python scripts using @code{argparse}. It's
12134 particularly useful for programs with many options or sub-parsers that can
12135 dynamically suggest completions; for example, when browsing resources over the
12136 network.")
12137 (license license:asl2.0)))
12138
12139 (define-public python2-argcomplete
12140 (package-with-python2 python-argcomplete))
12141
12142 (define-public python-xopen
12143 (package
12144 (name "python-xopen")
12145 (version "0.5.0")
12146 (source
12147 (origin
12148 (method url-fetch)
12149 (uri (pypi-uri "xopen" version))
12150 (sha256
12151 (base32
12152 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
12153 (build-system python-build-system)
12154 (propagated-inputs
12155 `(("python-setuptools-scm" ,python-setuptools-scm)))
12156 (home-page "https://github.com/marcelm/xopen/")
12157 (synopsis "Open compressed files transparently")
12158 (description "This module provides an @code{xopen} function that works like
12159 Python's built-in @code{open} function, but can also deal with compressed files.
12160 Supported compression formats are gzip, bzip2 and, xz, and are automatically
12161 recognized by their file extensions. The focus is on being as efficient as
12162 possible on all supported Python versions.")
12163 (license license:expat)))
12164
12165 (define-public python2-xopen
12166 (let ((base (package-with-python2
12167 (strip-python2-variant python-xopen))))
12168 (package
12169 (inherit base)
12170 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
12171 ,@(package-propagated-inputs base))))))
12172
12173 (define-public python-cheetah
12174 (package
12175 (name "python-cheetah")
12176 (version "3.1.0")
12177 (source
12178 (origin
12179 (method url-fetch)
12180 (uri (pypi-uri "Cheetah3" version))
12181 (sha256
12182 (base32
12183 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
12184 (build-system python-build-system)
12185 (arguments
12186 `(#:modules ((guix build utils)
12187 (guix build python-build-system)
12188 (ice-9 ftw)
12189 (srfi srfi-1)
12190 (srfi srfi-26))
12191 #:phases (modify-phases %standard-phases
12192 (add-after 'unpack 'use-absolute-python
12193 (lambda _
12194 (substitute* "Cheetah/CheetahWrapper.py"
12195 (("#!/usr/bin/env python")
12196 (string-append "#!" (which "python"))))
12197 #t))
12198 (replace 'check
12199 (lambda _
12200 (let ((cwd (getcwd)))
12201 (setenv "PYTHONPATH"
12202 (string-append
12203 cwd "/build/"
12204 (find (cut string-prefix? "lib" <>)
12205 (scandir (string-append cwd "/build")))
12206 ":" (getenv "PYTHONPATH")))
12207 (setenv "PATH"
12208 (string-append (getenv "PATH")
12209 ":" cwd "/bin"))
12210 (setenv "TMPDIR" "/tmp")
12211
12212 (substitute* "Cheetah/Tests/Test.py"
12213 (("unittest.TextTestRunner\\(\\)")
12214 "unittest.TextTestRunner(verbosity=2)"))
12215
12216 (invoke "python" "Cheetah/Tests/Test.py")))))))
12217 (propagated-inputs
12218 `(("python-markdown" ,python-markdown))) ;optional
12219 (home-page "http://cheetahtemplate.org/")
12220 (synopsis "Template engine")
12221 (description "Cheetah is a text-based template engine and Python code
12222 generator.
12223
12224 Cheetah can be used as a standalone templating utility or referenced as
12225 a library from other Python applications. It has many potential uses,
12226 but web developers looking for a viable alternative to ASP, JSP, PHP and
12227 PSP are expected to be its principle user group.
12228
12229 Features:
12230 @enumerate
12231 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
12232 text-based format.
12233 @item Cleanly separates content, graphic design, and program code.
12234 @item Blends the power and flexibility of Python with a simple template language
12235 that non-programmers can understand.
12236 @item Gives template writers full access to any Python data structure, module,
12237 function, object, or method in their templates.
12238 @item Makes code reuse easy by providing an object-orientated interface to
12239 templates that is accessible from Python code or other Cheetah templates.
12240 One template can subclass another and selectively reimplement sections of it.
12241 @item Provides a simple, yet powerful, caching mechanism that can dramatically
12242 improve the performance of a dynamic website.
12243 @item Compiles templates into optimized, yet readable, Python code.
12244 @end enumerate")
12245 (license (license:x11-style "file://LICENSE"))))
12246
12247 (define-public python2-cheetah
12248 (package-with-python2 python-cheetah))
12249
12250 (define-public python-dulwich
12251 (package
12252 (name "python-dulwich")
12253 (version "0.18.6")
12254 (source
12255 (origin
12256 (method url-fetch)
12257 (uri (list (string-append "https://www.dulwich.io/releases/"
12258 "dulwich-" version ".tar.gz")
12259 (pypi-uri "dulwich" version)))
12260 (sha256
12261 (base32
12262 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
12263 (build-system python-build-system)
12264 (arguments
12265 `(#:phases
12266 (modify-phases %standard-phases
12267 (add-before 'check 'fix-tests
12268 (lambda* (#:key inputs #:allow-other-keys)
12269 ;; The tests use Popen with a custom environment which doesn't
12270 ;; include PATH.
12271 (substitute* "dulwich/tests/compat/utils.py"
12272 (("'git'") (string-append "'"
12273 (which "git")
12274 "'")))
12275 (substitute* '("dulwich/tests/test_repository.py"
12276 "dulwich/tests/test_hooks.py")
12277 (("#!/bin/sh") (string-append "#!" (which "sh"))))
12278 (setenv "TEST_RUNNER" "unittest")
12279 (setenv "PYTHONHASHSEED" "random")
12280 #t)))))
12281 (propagated-inputs
12282 `(("python-fastimport" ,python-fastimport)))
12283 (native-inputs
12284 `(("python-mock" ,python-mock)
12285 ("python-geventhttpclient" ,python-geventhttpclient)
12286 ("git" ,git)))
12287 (home-page "https://www.dulwich.io/")
12288 (synopsis "Git implementation in Python")
12289 (description "Dulwich is an implementation of the Git file formats and
12290 protocols written in pure Python.")
12291 ;; Can be used with either license.
12292 (license (list license:asl2.0 license:gpl2+))))
12293
12294 (define-public python2-dulwich
12295 (package-with-python2 python-dulwich))
12296
12297 (define-public python-pbkdf2
12298 (package
12299 (name "python-pbkdf2")
12300 (version "1.3")
12301 (source
12302 (origin
12303 (method url-fetch)
12304 (uri (pypi-uri "pbkdf2" version))
12305 (sha256
12306 (base32
12307 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
12308 (build-system python-build-system)
12309 (arguments
12310 '(#:phases
12311 (modify-phases %standard-phases
12312 (replace 'check
12313 (lambda _
12314 (setenv "PYTHONPATH"
12315 (string-append (getcwd) "/build/lib:"
12316 (getenv "PYTHONPATH")))
12317 (invoke "python" "test/test_pbkdf2.py"))))))
12318 (propagated-inputs
12319 `(("python-pycrypto" ,python-pycrypto))) ; optional
12320 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
12321 (synopsis "Password-based key derivation")
12322 (description "This module implements the password-based key derivation
12323 function, PBKDF2, specified in RSA PKCS#5 v2.0.
12324
12325 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
12326 is part of the RSA Public Key Cryptography Standards series. The provided
12327 implementation takes a password or a passphrase and a salt value (and
12328 optionally a iteration count, a digest module, and a MAC module) and provides
12329 a file-like object from which an arbitrarly-sized key can be read.")
12330 (license license:expat)))
12331
12332 (define-public python2-pbkdf2
12333 (package-with-python2 python-pbkdf2))
12334
12335 (define-public python-qrcode
12336 (package
12337 (name "python-qrcode")
12338 (version "6.1")
12339 (source
12340 (origin
12341 (method url-fetch)
12342 (uri (pypi-uri "qrcode" version))
12343 (sha256
12344 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
12345 (build-system python-build-system)
12346 (arguments
12347 ;; FIXME: Tests require packaging 'pymaging'.
12348 '(#:tests? #f))
12349 (propagated-inputs
12350 `(("python-lxml" ,python-lxml) ; for SVG output
12351 ("python-pillow" ,python-pillow) ; for PNG output
12352 ("python-six" ,python-six)))
12353 (home-page "https://github.com/lincolnloop/python-qrcode")
12354 (synopsis "QR Code image generator")
12355 (description "This package provides a pure Python QR Code generator
12356 module. It uses the Python Imaging Library (PIL) to allow for the generation
12357 of QR Codes.
12358
12359 In addition this package provides a command line tool to generate QR codes and
12360 either write these QR codes to a file or do the output as ascii art at the
12361 console.")
12362 (license license:bsd-3)))
12363
12364 (define-public python2-qrcode
12365 (package-with-python2 python-qrcode))
12366
12367 (define-public python-rst2ansi
12368 (package
12369 (name "python-rst2ansi")
12370 (version "0.1.5")
12371 (source
12372 (origin
12373 (method url-fetch)
12374 (uri (pypi-uri "rst2ansi" version))
12375 (sha256
12376 (base32
12377 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
12378 (build-system python-build-system)
12379 (propagated-inputs
12380 `(("python-docutils" ,python-docutils)))
12381 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
12382 (synopsis "Convert RST to ANSI-decorated console output")
12383 (description
12384 "Python module dedicated to rendering RST (reStructuredText) documents
12385 to ansi-escaped strings suitable for display in a terminal.")
12386 (license license:expat)))
12387
12388 (define-public python-ansi2html
12389 (package
12390 (name "python-ansi2html")
12391 (version "1.2.0")
12392 (source
12393 (origin
12394 (method url-fetch)
12395 (uri (pypi-uri "ansi2html" version))
12396 (sha256
12397 (base32
12398 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
12399 (build-system python-build-system)
12400 (native-inputs
12401 `(("python-mock" ,python-mock)
12402 ("python-nose" ,python-nose)))
12403 (propagated-inputs
12404 `(("python-six" ,python-six)))
12405 (home-page "https://github.com/ralphbean/ansi2html")
12406 (synopsis "Convert ANSI-decorated console output to HTML")
12407 (description
12408 "@command{ansi2html} is a Python library and command line utility for
12409 convering text with ANSI color codes to HTML or LaTeX.")
12410 (license license:gpl3+)))
12411
12412 (define-public python2-ansi2html
12413 (package-with-python2 python-ansi2html))
12414
12415 (define-public python-ddt
12416 (package
12417 (name "python-ddt")
12418 (version "1.1.3")
12419 (source
12420 (origin
12421 (method url-fetch)
12422 (uri (pypi-uri "ddt" version))
12423 (sha256
12424 (base32
12425 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
12426 (build-system python-build-system)
12427 (native-inputs
12428 `(("python-mock" ,python-mock)
12429 ("python-nose" ,python-nose)))
12430 (propagated-inputs
12431 `(("python-six" ,python-six)
12432 ("python-pyyaml" ,python-pyyaml)))
12433 (home-page "https://github.com/txels/ddt")
12434 (synopsis "Data-Driven Tests")
12435 (description
12436 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
12437 running it with different test data, and make it appear as multiple test
12438 cases.")
12439 (license license:expat)))
12440
12441 (define-public python2-ddt
12442 (package-with-python2 python-ddt))
12443
12444 (define-public python-pycountry
12445 (package
12446 (name "python-pycountry")
12447 (version "18.5.26")
12448 (source
12449 (origin
12450 (method url-fetch)
12451 (uri (pypi-uri "pycountry" version))
12452 (sha256
12453 (base32
12454 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
12455 (build-system python-build-system)
12456 (home-page "https://bitbucket.org/flyingcircus/pycountry")
12457 (synopsis "ISO databases for languages, countries, currencies, etc.")
12458 (description
12459 "@code{pycountry} provides the ISO databases for the standards:
12460 @enumerate
12461 @item 639-3 (Languages)
12462 @item 3166 (Countries)
12463 @item 3166-3 (Deleted Countries)
12464 @item 3166-2 (Subdivisions of countries)
12465 @item 4217 (Currencies)
12466 @item 15924 (Scripts)
12467 @end enumerate
12468 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
12469 through a Python API.")
12470 (license license:lgpl2.1+)))
12471
12472 (define-public python2-pycountry
12473 (package-with-python2 python-pycountry))
12474
12475 (define-public python-pycosat
12476 (package
12477 (name "python-pycosat")
12478 (version "0.6.1")
12479 (source
12480 (origin
12481 (method url-fetch)
12482 (uri (pypi-uri "pycosat" version))
12483 (sha256
12484 (base32
12485 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
12486 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
12487 (build-system python-build-system)
12488 (home-page "https://github.com/ContinuumIO/pycosat")
12489 (synopsis "Bindings to picosat (a SAT solver)")
12490 (description
12491 "This package provides efficient Python bindings to @code{picosat} on
12492 the C level. When importing pycosat, the @code{picosat} solver becomes part
12493 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
12494 Problem} (SAT) solver.")
12495 (license license:expat)))
12496
12497 (define-public python2-pycosat
12498 (package-with-python2 python-pycosat))
12499
12500 (define-public python2-ruamel.ordereddict
12501 (package
12502 (name "python2-ruamel.ordereddict")
12503 (version "0.4.9")
12504 (source
12505 (origin
12506 (method url-fetch)
12507 (uri (pypi-uri "ruamel.ordereddict" version))
12508 (sha256
12509 (base32
12510 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
12511 (build-system python-build-system)
12512 (arguments
12513 `(#:python ,python-2
12514 #:phases
12515 (modify-phases %standard-phases
12516 (delete 'check)
12517 (add-after 'install 'check
12518 (lambda* (#:key inputs outputs #:allow-other-keys)
12519 (add-installed-pythonpath inputs outputs)
12520 (invoke "python" "test/testordereddict.py"))))))
12521 (home-page "https://bitbucket.org/ruamel/ordereddict")
12522 (synopsis "Version of dict that keeps keys in insertion order")
12523 (description
12524 "This is an implementation of an ordered dictionary with @dfn{Key
12525 Insertion Order} (KIO: updates of values do not affect the position of the
12526 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
12527 removed and put at the back). The standard library module @code{OrderedDict},
12528 implemented later, implements a subset of @code{ordereddict} functionality.
12529 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
12530 Order} (KSO, no sorting function can be specified, but a transform can be
12531 specified to apply on the key before comparison (e.g. @code{string.lower})).")
12532 (license license:expat)))
12533
12534 (define-public python-pypeg2
12535 (package
12536 (name "python-pypeg2")
12537 (version "2.15.2")
12538 (source
12539 (origin
12540 (method url-fetch)
12541 (uri (pypi-uri "pyPEG2" version))
12542 (sha256
12543 (base32
12544 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
12545 (build-system python-build-system)
12546 (propagated-inputs `(("python-lxml" ,python-lxml)))
12547 (arguments
12548 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
12549 '(#:tests? #f))
12550 (home-page "https://fdik.org/pyPEG/")
12551 (synopsis "Parsering Expression Grammars in Python")
12552 (description "PyPEG is an intrinsic parser interpreter framework for
12553 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
12554 parse many formal languages.")
12555 (license license:gpl2)))
12556
12557 (define-public python-incremental
12558 (package
12559 (name "python-incremental")
12560 (version "17.5.0")
12561 (source
12562 (origin
12563 (method url-fetch)
12564 (uri (pypi-uri "incremental" version))
12565 (sha256
12566 (base32
12567 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
12568 (build-system python-build-system)
12569 (home-page "https://github.com/hawkowl/incremental")
12570 (synopsis "Library for versioning Python projects")
12571 (description "Incremental is a small library that versions your Python
12572 projects.")
12573 (license license:expat)))
12574
12575 (define-public python2-incremental
12576 (package-with-python2 python-incremental))
12577
12578 (define-public python-invoke
12579 (package
12580 (name "python-invoke")
12581 (home-page "https://www.pyinvoke.org/")
12582 (version "1.3.0")
12583 (source (origin
12584 (method url-fetch)
12585 (uri (pypi-uri "invoke" version))
12586 (sha256
12587 (base32
12588 "1nn7gad0rvy492acpyhkrp01zsk86acf34qhsvq4xmm6x39788n5"))))
12589 (build-system python-build-system)
12590 (arguments
12591 ;; XXX: Requires many dependencies that are not yet in Guix.
12592 `(#:tests? #f))
12593 (synopsis "Pythonic task execution")
12594 (description
12595 "Invoke is a Python task execution tool and library, drawing inspiration
12596 from various sources to arrive at a powerful and clean feature set. It is
12597 evolved from the Fabric project, but focuses on local and abstract concerns
12598 instead of servers and network commands.")
12599 (license license:bsd-3)))
12600
12601 (define-public python2-invoke
12602 (package-with-python2 python-invoke))
12603
12604 (define-public python-automat
12605 (package
12606 (name "python-automat")
12607 (version "0.7.0")
12608 (source (origin
12609 (method url-fetch)
12610 (uri (pypi-uri "Automat" version))
12611 (sha256
12612 (base32
12613 "03ivg70n3b1cbcd2zvjhk8y4kmqxcvhmili39lmgx09dza1qpmyb"))))
12614 (build-system python-build-system)
12615 ;; We disable the tests because they require python-twisted, while
12616 ;; python-twisted depends on python-automat. Twisted is optional, but the
12617 ;; tests fail if it is not available. Also see
12618 ;; <https://github.com/glyph/automat/issues/71>.
12619 (arguments '(#:tests? #f))
12620 (native-inputs
12621 `(("python-m2r" ,python-m2r)
12622 ("python-setuptools-scm" ,python-setuptools-scm)
12623 ("python-graphviz" ,python-graphviz)))
12624 (propagated-inputs
12625 `(("python-six" ,python-six)
12626 ("python-attrs" ,python-attrs)))
12627 (home-page "https://github.com/glyph/Automat")
12628 (synopsis "Self-service finite-state machines")
12629 (description "Automat is a library for concise, idiomatic Python
12630 expression of finite-state automata (particularly deterministic finite-state
12631 transducers).")
12632 (license license:expat)))
12633
12634 (define-public python2-automat
12635 (package-with-python2 python-automat))
12636
12637 (define-public python-m2r
12638 (package
12639 (name "python-m2r")
12640 (version "0.2.1")
12641 (source (origin
12642 (method url-fetch)
12643 (uri (pypi-uri "m2r" version))
12644 (sha256
12645 (base32
12646 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
12647 (build-system python-build-system)
12648 (propagated-inputs
12649 `(("python-docutils" ,python-docutils)
12650 ("python-mistune" ,python-mistune)))
12651 (native-inputs
12652 `(("python-pygments" ,python-pygments)
12653 ("python-mock" ,python-mock)))
12654 (home-page "https://github.com/miyakogi/m2r")
12655 (synopsis "Markdown to reStructuredText converter")
12656 (description "M2R converts a markdown file including reST markups to valid
12657 reST format.")
12658 (license license:expat)))
12659
12660 (define-public python2-m2r
12661 (package-with-python2 python-m2r))
12662
12663 (define-public python-constantly
12664 (package
12665 (name "python-constantly")
12666 (version "15.1.0")
12667 (source (origin
12668 (method url-fetch)
12669 (uri (pypi-uri "constantly" version))
12670 (sha256
12671 (base32
12672 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
12673 (build-system python-build-system)
12674 (home-page "https://github.com/twisted/constantly")
12675 (synopsis "Symbolic constants in Python")
12676 (description "Constantly is a Python library that provides symbolic
12677 constant support. It includes collections and constants with text, numeric,
12678 and bit flag values.")
12679 (license license:expat)))
12680
12681 (define-public python2-constantly
12682 (package-with-python2 python-constantly))
12683
12684 (define-public python-attrs
12685 (package
12686 (name "python-attrs")
12687 (version "19.3.0")
12688 (source (origin
12689 (method url-fetch)
12690 (uri (pypi-uri "attrs" version))
12691 (sha256
12692 (base32
12693 "0wky4h28n7xnr6xv69p9z6kv8bzn50d10c3drmd9ds8gawbcxdzp"))))
12694 (build-system python-build-system)
12695 (arguments
12696 `(#:modules ((guix build utils)
12697 (guix build python-build-system)
12698 (ice-9 ftw)
12699 (srfi srfi-1)
12700 (srfi srfi-26))
12701 #:phases (modify-phases %standard-phases
12702 (replace 'check
12703 (lambda _
12704 (let ((cwd (getcwd)))
12705 (setenv "PYTHONPATH"
12706 (string-append
12707 cwd "/build/"
12708 (find (cut string-prefix? "lib" <>)
12709 (scandir (string-append cwd "/build")))
12710 ":"
12711 (getenv "PYTHONPATH")))
12712 (invoke "python" "-m" "pytest")))))))
12713 (native-inputs
12714 `(("python-coverage" ,python-coverage)
12715 ("python-hypothesis" ,python-hypothesis)
12716 ("python-pympler" ,python-pympler)
12717 ("python-pytest" ,python-pytest)
12718 ("python-six" ,python-six)
12719 ("python-sphinx" ,python-sphinx)
12720 ("python-zope-interface" ,python-zope-interface)))
12721 (home-page "https://github.com/python-attrs/attrs/")
12722 (synopsis "Attributes without boilerplate")
12723 (description "@code{attrs} is a Python package with class decorators that
12724 ease the chores of implementing the most common attribute-related object
12725 protocols.")
12726 (license license:expat)))
12727
12728 (define-public python2-attrs
12729 (package-with-python2 python-attrs))
12730
12731 (define-public python-attrs-bootstrap
12732 (package
12733 (inherit python-attrs)
12734 (name "python-attrs-bootstrap")
12735 (native-inputs `())
12736 (arguments `(#:tests? #f))))
12737
12738 (define-public python2-attrs-bootstrap
12739 (package-with-python2 python-attrs-bootstrap))
12740
12741 (define-public python2-cliapp
12742 (package
12743 (name "python2-cliapp")
12744 (version "1.20180812.1")
12745 (source
12746 (origin
12747 (method url-fetch)
12748 (uri (string-append
12749 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
12750 version ".tar.gz"))
12751 (sha256
12752 (base32
12753 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
12754 (build-system python-build-system)
12755 (arguments
12756 `(#:python ,python-2
12757 #:phases
12758 (modify-phases %standard-phases
12759 ;; check phase needs to be run before the build phase. If not,
12760 ;; coverage-test-runner looks for tests for the built source files,
12761 ;; and fails.
12762 (delete 'check)
12763 (add-before 'build 'check
12764 (lambda _
12765 ;; Disable python3 tests
12766 (substitute* "check"
12767 (("python3") "# python3"))
12768 (invoke "./check"))))))
12769 (native-inputs
12770 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12771 ("python2-pep8" ,python2-pep8)))
12772 (propagated-inputs
12773 `(("python2-pyaml" ,python2-pyaml)))
12774 (home-page "https://liw.fi/cliapp/")
12775 (synopsis "Python framework for command line programs")
12776 (description "@code{python2-cliapp} is a python framework for
12777 command line programs. It contains the typical stuff such programs
12778 need to do, such as parsing the command line for options, and
12779 iterating over input files.")
12780 (license license:gpl2+)))
12781
12782 (define-public python2-ttystatus
12783 (package
12784 (name "python2-ttystatus")
12785 (version "0.36")
12786 (source
12787 (origin
12788 (method url-fetch)
12789 (uri (string-append
12790 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
12791 version ".tar.gz"))
12792 (sha256
12793 (base32
12794 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
12795 (build-system python-build-system)
12796 (native-inputs
12797 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12798 ("python2-pep8" ,python2-pep8)))
12799 (arguments
12800 `(#:python ,python-2
12801 #:phases
12802 (modify-phases %standard-phases
12803 ;; check phase needs to be run before the build phase. If not,
12804 ;; coverage-test-runner looks for tests for the built source files,
12805 ;; and fails.
12806 (delete 'check)
12807 (add-before 'build 'check
12808 (lambda _ (invoke "make" "check"))))))
12809 (home-page "https://liw.fi/ttystatus/")
12810 (synopsis "Python library for showing progress reporting and
12811 status updates on terminals")
12812 (description "@code{python2-ttystatus} is a python library for
12813 showing progress reporting and status updates on terminals, for
12814 command line programs. Output is automatically adapted to the width
12815 of the terminal: truncated if it does not fit, and resized if the
12816 terminal size changes.")
12817 (license license:gpl3+)))
12818
12819 (define-public python2-tracing
12820 (package
12821 (name "python2-tracing")
12822 (version "0.10")
12823 (source
12824 (origin
12825 (method url-fetch)
12826 (uri (string-append
12827 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
12828 version ".tar.gz"))
12829 (sha256
12830 (base32
12831 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
12832 (build-system python-build-system)
12833 (arguments
12834 `(#:python ,python-2))
12835 (home-page "https://liw.fi/tracing/")
12836 (synopsis "Python debug logging helper")
12837 (description "@code{python2-tracing} is a python library for
12838 logging debug messages. It provides a way to turn debugging messages
12839 on and off, based on the filename they occur in. It is much faster
12840 than using @code{logging.Filter} to accomplish the same thing, which
12841 matters when code is run in production mode. The actual logging still
12842 happens using the @code{logging} library.")
12843 (license license:gpl3+)))
12844
12845 (define-public python2-larch
12846 (package
12847 (name "python2-larch")
12848 (version "1.20151025")
12849 (source
12850 (origin
12851 (method url-fetch)
12852 (uri (string-append
12853 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
12854 version ".tar.gz"))
12855 (patches (search-patches
12856 "python2-larch-coverage-4.0a6-compatibility.patch"))
12857 (sha256
12858 (base32
12859 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
12860 (build-system python-build-system)
12861 (arguments
12862 `(#:python ,python-2
12863 #:phases
12864 (modify-phases %standard-phases
12865 ;; check phase needs to be run before the build phase. If not,
12866 ;; coverage-test-runner looks for tests for the built source files,
12867 ;; and fails.
12868 (delete 'check)
12869 (add-before 'build 'check
12870 (lambda _ (invoke "make" "check"))))))
12871 (native-inputs
12872 `(("cmdtest" ,cmdtest)
12873 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
12874 (propagated-inputs
12875 `(("python2-tracing" ,python2-tracing)))
12876 (home-page "https://liw.fi/larch/")
12877 (synopsis "Python copy-on-write B-tree library")
12878 (description "@code{python2-larch} is an implementation of
12879 particular kind of B-tree, based on research by Ohad Rodeh. See
12880 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
12881 on the data structure.
12882
12883 The distinctive feature of this B-tree is that a node is never
12884 (conceptually) modified. Instead, all updates are done by
12885 copy-on-write. This makes it easy to clone a tree, and modify only the
12886 clone, while other processes access the original tree.")
12887 (license license:gpl3+)))
12888
12889 (define-public python-astroid
12890 (package
12891 (name "python-astroid")
12892 (version "2.3.3")
12893 (source
12894 (origin
12895 (method url-fetch)
12896 (uri (pypi-uri "astroid" version))
12897 (sha256
12898 (base32 "0fnibsl2cb5mvzbfm7sycj85smx48f8w8m7ks1sqlmpr9ps0gski"))))
12899 (build-system python-build-system)
12900 (propagated-inputs
12901 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
12902 ("python-six" ,python-six)
12903 ("python-typed-ast" ,python-typed-ast)
12904 ("python-wrapt" ,python-wrapt)))
12905 (native-inputs
12906 `(("python-dateutil" ,python-dateutil)
12907 ("python-nose" ,python-nose)
12908 ("python-pytest" ,python-pytest)
12909 ("python-pytest-runner" ,python-pytest-runner)))
12910 (arguments
12911 `(#:phases
12912 (modify-phases %standard-phases
12913 (add-after 'unpack 'remove-spurious-test
12914 (lambda _
12915 ;; This can be removed after upgrading from python-3.7
12916 ;; https://github.com/PyCQA/astroid/issues/593
12917 ;; https://bugs.python.org/issue34056
12918 (delete-file "astroid/tests/unittest_modutils.py")
12919 #t))
12920 (replace 'check
12921 (lambda _
12922 (invoke "pytest" "astroid"))))))
12923 (home-page "https://github.com/PyCQA/astroid")
12924 (synopsis "Common base representation of python source code for pylint and
12925 other projects")
12926 (description "@code{python-astroid} provides a common base representation
12927 of python source code for projects such as pychecker, pyreverse, pylint, etc.
12928
12929 It provides a compatible representation which comes from the _ast module. It
12930 rebuilds the tree generated by the builtin _ast module by recursively walking
12931 down the AST and building an extended ast. The new node classes have
12932 additional methods and attributes for different usages. They include some
12933 support for static inference and local name scopes. Furthermore, astroid
12934 builds partial trees by inspecting living objects.")
12935 (license license:lgpl2.1+)
12936 (properties `((python2-variant . ,(delay python2-astroid))))))
12937
12938 (define-public python2-astroid
12939 (let ((base (package-with-python2
12940 (strip-python2-variant python-astroid))))
12941 (package (inherit base)
12942 ;; Version 2.x removes python2 support.
12943 (version "1.6.5")
12944 (source
12945 (origin
12946 (method url-fetch)
12947 (uri (pypi-uri "astroid" version))
12948 (sha256
12949 (base32
12950 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
12951 (arguments
12952 (substitute-keyword-arguments (package-arguments base)
12953 ((#:phases phases)
12954 `(modify-phases ,phases
12955 (add-after 'unpack 'remove-spurious-test
12956 (lambda _
12957 ;; https://github.com/PyCQA/astroid/issues/276
12958 (delete-file "astroid/tests/unittest_brain.py")
12959 #t))
12960 (replace 'check
12961 (lambda _
12962 (invoke"python" "-m" "unittest" "discover"
12963 "-p" "unittest*.py")))))))
12964 (native-inputs `())
12965 (propagated-inputs
12966 `(("python2-backports-functools-lru-cache"
12967 ,python2-backports-functools-lru-cache)
12968 ("python2-enum34" ,python2-enum34)
12969 ("python2-singledispatch" ,python2-singledispatch)
12970 ,@(alist-delete "python-typed-ast"
12971 (package-propagated-inputs base)))))))
12972
12973 (define-public python-isort
12974 (package
12975 (name "python-isort")
12976 (version "4.3.4")
12977 (source
12978 (origin
12979 (method git-fetch)
12980 (uri (git-reference
12981 ;; Tests pass only from the Github sources
12982 (url "https://github.com/timothycrosley/isort")
12983 (commit version)))
12984 (file-name (git-file-name name version))
12985 (sha256
12986 (base32
12987 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
12988 (build-system python-build-system)
12989 (native-inputs
12990 `(("python-mock" ,python-mock)
12991 ("python-pytest" ,python-pytest)))
12992 (home-page "https://github.com/timothycrosley/isort")
12993 (synopsis "Python utility/library to sort python imports")
12994 (description "@code{python-isort} is a python utility/library to sort
12995 imports alphabetically, and automatically separated into sections. It
12996 provides a command line utility, a python library and plugins for various
12997 editors.")
12998 (license license:expat)
12999 (properties `((python2-variant . ,(delay python2-isort))))))
13000
13001 (define-public python2-isort
13002 (let ((base (package-with-python2
13003 (strip-python2-variant python-isort))))
13004 (package (inherit base)
13005 (native-inputs
13006 `(("python2-futures" ,python2-futures)
13007 ,@(package-native-inputs base))))))
13008
13009 (define-public python2-backports-functools-lru-cache
13010 (package
13011 (name "python2-backports-functools-lru-cache")
13012 (version "1.5")
13013 (source
13014 (origin
13015 (method url-fetch)
13016 ;; only the pypi tarballs contain the necessary metadata
13017 (uri (pypi-uri "backports.functools_lru_cache" version))
13018 (sha256
13019 (base32
13020 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
13021 (build-system python-build-system)
13022 (native-inputs
13023 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
13024 (arguments
13025 `(#:python ,python-2))
13026 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
13027 (synopsis "Backport of functools.lru_cache from Python 3.3")
13028 (description "@code{python2-backports-functools-lru-cache} is a backport
13029 of @code{functools.lru_cache} from python 3.3.")
13030 (license license:expat)))
13031
13032 (define-public python-configparser
13033 (package
13034 (name "python-configparser")
13035 (version "4.0.2")
13036 (source
13037 (origin
13038 (method url-fetch)
13039 (uri (pypi-uri "configparser" version))
13040 (sha256
13041 (base32
13042 "1priacxym85yjcf68hh38w55nqswaxp71ryjyfdk222kg9l85ln7"))))
13043 (native-inputs
13044 `(("python-setuptools_scm" ,python-setuptools-scm)))
13045 (build-system python-build-system)
13046 (home-page "https://github.com/jaraco/configparser/")
13047 (synopsis "Backport of configparser from python 3.5")
13048 (description "@code{python-configparser} is a backport of
13049 @code{configparser} from Python 3.5 so that it can be used directly
13050 in other versions.")
13051 (license license:expat)))
13052
13053 (define-public python2-configparser
13054 (package-with-python2 python-configparser))
13055
13056 (define-public python-mando
13057 (package
13058 (name "python-mando")
13059 (version "0.6.4")
13060 (source (origin
13061 (method url-fetch)
13062 (uri (pypi-uri "mando" version))
13063 (sha256
13064 (base32
13065 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
13066 (build-system python-build-system)
13067 (propagated-inputs
13068 `(("python-rst2ansi" ,python-rst2ansi)
13069 ("python-six" ,python-six)))
13070 (native-inputs
13071 `(("python-pytest" ,python-pytest)))
13072 (home-page "https://mando.readthedocs.org/")
13073 (synopsis
13074 "Wrapper around argparse, allowing creation of complete CLI applications")
13075 (description
13076 "This package is a wrapper around argparse, allowing you to write complete CLI
13077 applications in seconds while maintaining all the flexibility.")
13078 (license license:expat)))
13079
13080 (define-public python2-mando
13081 (package-with-python2 python-mando))
13082
13083 (define-public python2-argparse
13084 (package
13085 (name "python2-argparse")
13086 (version "1.4.0")
13087 (source
13088 (origin
13089 (method url-fetch)
13090 (uri (pypi-uri "argparse" version))
13091 (sha256
13092 (base32
13093 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
13094 (build-system python-build-system)
13095 (arguments
13096 `(#:python ,python-2))
13097 (home-page "https://github.com/ThomasWaldmann/argparse/")
13098 (synopsis "Python command-line parsing library")
13099 (description
13100 "This package is mostly for people who want to have @code{argparse} on
13101 older Pythons because it was not part of the standard library back then.")
13102 (license license:psfl)))
13103
13104 (define-public python-fudge
13105 (package
13106 (name "python-fudge")
13107 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
13108 ;; package, which is currently the only use of this package.
13109 (version "0.9.6")
13110 (source
13111 (origin
13112 (method url-fetch)
13113 (uri (pypi-uri "fudge" version))
13114 (sha256
13115 (base32
13116 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
13117 (build-system python-build-system)
13118 (arguments
13119 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
13120 (home-page "https://github.com/fudge-py/fudge")
13121 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
13122 (description
13123 "Fudge is a Python module for using fake objects (mocks and stubs) to
13124 test real ones.
13125
13126 In readable Python code, you declare the methods available on your fake object
13127 and how they should be called. Then you inject that into your application and
13128 start testing. This declarative approach means you don’t have to record and
13129 playback actions and you don’t have to inspect your fakes after running code.
13130 If the fake object was used incorrectly then you’ll see an informative
13131 exception message with a traceback that points to the culprit.")
13132 (license license:expat)))
13133
13134 (define-public python2-fudge
13135 (package-with-python2 python-fudge))
13136
13137 (define-public python-mwclient
13138 (package
13139 (name "python-mwclient")
13140 (version "0.10.0")
13141 (source
13142 (origin
13143 (method git-fetch)
13144 ;; The PyPI version wouldn't contain tests.
13145 (uri (git-reference
13146 (url "https://github.com/mwclient/mwclient")
13147 (commit (string-append "v" version))))
13148 (file-name (git-file-name name version))
13149 (sha256
13150 (base32
13151 "1c3q6lwmb05yqywc4ya98ca7hsl15niili8rccl4n1yqp77c103v"))))
13152 (build-system python-build-system)
13153 (propagated-inputs
13154 `(("python-requests-oauthlib" ,python-requests-oauthlib)
13155 ("python-six" ,python-six)))
13156 (native-inputs
13157 `(("python-mock" ,python-mock)
13158 ("python-pytest" ,python-pytest)
13159 ("python-pytest-cov" ,python-pytest-cov)
13160 ("python-pytest-runner" ,python-pytest-runner)
13161 ("python-responses" ,python-responses)))
13162 (home-page "https://github.com/btongminh/mwclient")
13163 (synopsis "MediaWiki API client")
13164 (description "This package provides a MediaWiki API client.")
13165 (license license:expat)))
13166
13167 (define-public python2-mwclient
13168 (package-with-python2 python-mwclient))
13169
13170 (define-public python-utils
13171 (package
13172 (name "python-utils")
13173 (version "2.1.0")
13174 (source (origin
13175 (method url-fetch)
13176 (uri (pypi-uri "python-utils" version))
13177 (sha256
13178 (base32
13179 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
13180 (build-system python-build-system)
13181 (native-inputs
13182 `(("pytest-runner" ,python-pytest-runner)
13183 ("pytest" ,python-pytest)
13184 ("six" ,python-six)))
13185 (home-page "https://github.com/WoLpH/python-utils")
13186 (synopsis "Convenient utilities not included with the standard Python install")
13187 (description
13188 "Python Utils is a collection of small Python functions and classes which
13189 make common patterns shorter and easier.")
13190 (license license:bsd-2)))
13191
13192 (define-public python2-utils
13193 (package-with-python2 python-utils))
13194
13195 (define-public python-diff-match-patch
13196 (package
13197 (name "python-diff-match-patch")
13198 (version "20121119")
13199 (source
13200 (origin
13201 (method url-fetch)
13202 (uri (pypi-uri "diff-match-patch" version))
13203 (sha256
13204 (base32
13205 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
13206 (build-system python-build-system)
13207 (home-page "https://code.google.com/p/google-diff-match-patch")
13208 (synopsis "Synchronize plain text")
13209 (description "Diff Match and Patch libraries offer robust algorithms to
13210 perform the operations required for synchronizing plain text.")
13211 (license license:asl2.0)))
13212
13213 (define-public python2-diff-match-patch
13214 (package-with-python2 python-diff-match-patch))
13215
13216 (define-public python-dirsync
13217 (package
13218 (name "python-dirsync")
13219 (version "2.2.3")
13220 (source
13221 (origin
13222 (method url-fetch)
13223 (uri (pypi-uri "dirsync" version))
13224 (sha256
13225 (base32
13226 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
13227 (build-system python-build-system)
13228 (propagated-inputs
13229 `(("six" ,python-six)))
13230 (home-page "https://bitbucket.org/tkhyn/dirsync")
13231 (synopsis "Advanced directory tree synchronisation tool")
13232 (description "Advanced directory tree synchronisation tool.")
13233 (license license:expat)))
13234
13235 (define-public python2-dirsync
13236 (package-with-python2 python-dirsync))
13237
13238 (define-public python-levenshtein
13239 (package
13240 (name "python-levenshtein")
13241 (version "0.12.0")
13242 (source
13243 (origin
13244 (method url-fetch)
13245 (uri (pypi-uri "python-Levenshtein" version))
13246 (sha256
13247 (base32
13248 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
13249 (build-system python-build-system)
13250 (home-page "https://github.com/ztane/python-Levenshtein")
13251 (synopsis "Fast computation of Levenshtein distance and string similarity")
13252 (description
13253 "The Levenshtein Python C extension module contains functions for fast computation of
13254 @enumerate
13255 @item Levenshtein (edit) distance, and edit operations
13256 @item string similarity
13257 @item approximate median strings, and generally string averaging
13258 @item string sequence and set similarity
13259 @end enumerate
13260 It supports both normal and Unicode strings.")
13261 (license license:gpl2+)))
13262
13263 (define-public python2-levenshtein
13264 (package-with-python2 python-levenshtein))
13265
13266 (define-public python-scandir
13267 (package
13268 (name "python-scandir")
13269 (version "1.10.0")
13270 (source
13271 (origin
13272 (method url-fetch)
13273 (uri (pypi-uri "scandir" version))
13274 (sha256
13275 (base32 "1bkqwmf056pkchf05ywbnf659wqlp6lljcdb0y88wr9f0vv32ijd"))))
13276 (build-system python-build-system)
13277 (arguments
13278 `(#:phases (modify-phases %standard-phases
13279 (replace 'check
13280 (lambda _
13281 (invoke "python" "test/run_tests.py"))))))
13282 (home-page "https://github.com/benhoyt/scandir")
13283 (synopsis "Directory iteration function")
13284 (description
13285 "Directory iteration function like os.listdir(), except that instead of
13286 returning a list of bare filenames, it yields DirEntry objects that include
13287 file type and stat information along with the name. Using scandir() increases
13288 the speed of os.walk() by 2-20 times (depending on the platform and file
13289 system) by avoiding unnecessary calls to os.stat() in most cases.
13290
13291 This package is part of the Python standard library since version 3.5.")
13292 (license license:bsd-3)))
13293
13294 (define-public python2-scandir
13295 (package-with-python2 python-scandir))
13296
13297 (define-public python2-stemming
13298 (package
13299 (name "python2-stemming")
13300 (version "1.0.1")
13301 (source
13302 (origin
13303 (method url-fetch)
13304 (uri (pypi-uri "stemming" version))
13305 (sha256
13306 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
13307 (build-system python-build-system)
13308 (arguments
13309 `(#:python ,python-2))
13310 (home-page "https://bitbucket.org/mchaput/stemming/overview")
13311 (synopsis "Python implementations of various stemming algorithms")
13312 (description
13313 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
13314 stemming algorithms for English. These implementations are straightforward and
13315 efficient, unlike some Python versions of the same algorithms available on the
13316 Web. This package is an extraction of the stemming code included in the Whoosh
13317 search engine.")
13318 (license license:public-domain)))
13319
13320 (define-public python-factory-boy
13321 (package
13322 (name "python-factory-boy")
13323 (version "2.8.1")
13324 (source
13325 (origin
13326 (method url-fetch)
13327 (uri (pypi-uri "factory_boy" version))
13328 (sha256
13329 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
13330 (build-system python-build-system)
13331 (arguments
13332 ;; Tests are not included in the tarball.
13333 `(#:tests? #f))
13334 (propagated-inputs
13335 `(("faker" ,python-faker)))
13336 (home-page "https://github.com/benhoyt/scandir")
13337 (synopsis "Versatile test fixtures replacement")
13338 (description
13339 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
13340
13341 As a fixtures replacement tool, it aims to replace static, hard to maintain
13342 fixtures with easy-to-use factories for complex object.
13343
13344 Instead of building an exhaustive test setup with every possible combination
13345 of corner cases, factory_boy allows you to use objects customized for the
13346 current test, while only declaring the test-specific fields")
13347 (license license:expat)))
13348
13349 (define-public python2-factory-boy
13350 (package-with-python2 python-factory-boy))
13351
13352 (define-public python-translate-toolkit
13353 (package
13354 (name "python-translate-toolkit")
13355 (version "2.1.0")
13356 (source
13357 (origin
13358 (method url-fetch)
13359 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
13360 (sha256
13361 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
13362 (build-system python-build-system)
13363 (native-inputs
13364 `(("python-pytest" ,python-pytest)
13365 ("python-sphinx" ,python-sphinx)))
13366 (propagated-inputs
13367 `(("python-babel" ,python-babel)
13368 ("python-beautifulsoup4" ,python-beautifulsoup4)
13369 ("python-chardet" ,python-chardet)
13370 ("python-diff-match-patch" ,python-diff-match-patch)
13371 ("python-levenshtein" ,python-levenshtein)
13372 ("python-lxml" ,python-lxml)
13373 ("python-six" ,python-six)
13374 ("python-vobject" ,python-vobject)
13375 ("python-pyyaml" ,python-pyyaml)))
13376 (arguments
13377 ;; TODO: tests are not run, because they end with
13378 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
13379 ;; 'parse_funcs'
13380 ;; during test setup.
13381 `(#:tests? #f))
13382 (home-page "https://toolkit.translatehouse.org")
13383 (synopsis "Tools and API for translation and localization engineering")
13384 (description
13385 "Tools and API for translation and localization engineering. It contains
13386 several utilities, as well as an API for building localization tools.")
13387 (license license:gpl2+)))
13388
13389 (define-public python2-translate-toolkit
13390 (package-with-python2 python-translate-toolkit))
13391
13392 (define-public python-packaging
13393 (package
13394 (name "python-packaging")
13395 (version "20.0")
13396 (source
13397 (origin
13398 (method url-fetch)
13399 (uri (pypi-uri "packaging" version))
13400 ;; XXX: The URL in the patch file is wrong, it should be
13401 ;; <https://github.com/pypa/packaging/pull/256>.
13402 (patches (search-patches "python-packaging-test-arch.patch"))
13403 (sha256
13404 (base32
13405 "1y2ip3a4ykkpgnwgn85j6hkspcl0cg3mzms97f40mk57vwqq67gy"))))
13406 (build-system python-build-system)
13407 (arguments
13408 `(#:phases (modify-phases %standard-phases
13409 (replace 'check
13410 (lambda* (#:key tests? #:allow-other-keys)
13411 (if tests?
13412 (invoke "py.test" "-vv")
13413 (format #t "test suite not run~%"))
13414 #t)))))
13415 (native-inputs
13416 `(("python-pretend" ,python-pretend)
13417 ("python-pytest" ,python-pytest)))
13418 (propagated-inputs
13419 `(("python-pyparsing" ,python-pyparsing)
13420 ("python-six" ,python-six)))
13421 (home-page "https://github.com/pypa/packaging")
13422 (synopsis "Core utilities for Python packages")
13423 (description "Packaging is a Python module for dealing with Python packages.
13424 It offers an interface for working with package versions, names, and dependency
13425 information.")
13426 ;; From 'LICENSE': This software is made available under the terms of
13427 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
13428 ;; Contributions to this software is made under the terms of *both* these
13429 ;; licenses.
13430 (license (list license:asl2.0 license:bsd-2))))
13431
13432 (define-public python2-packaging
13433 (package-with-python2 python-packaging))
13434
13435 ;; Variants with minimal dependencies, for bootstrapping Pytest.
13436 (define-public python-packaging-bootstrap
13437 (hidden-package
13438 (package/inherit
13439 python-packaging
13440 (name "python-packaging-bootstrap")
13441 (native-inputs '())
13442 (propagated-inputs
13443 `(("python-pyparsing" ,python-pyparsing)))
13444 (arguments '(#:tests? #f)))))
13445
13446 (define-public python2-packaging-bootstrap
13447 (hidden-package
13448 (package/inherit
13449 python2-packaging
13450 (name "python2-packaging-bootstrap")
13451 (native-inputs '())
13452 (propagated-inputs
13453 `(("python-pyparsing" ,python2-pyparsing)))
13454 (arguments
13455 `(#:tests? #f
13456 ,@(package-arguments python2-packaging))))))
13457
13458 (define-public python-relatorio
13459 (package
13460 (name "python-relatorio")
13461 (version "0.8.0")
13462 (source
13463 (origin
13464 (method url-fetch)
13465 (uri (pypi-uri "relatorio" version))
13466 (sha256
13467 (base32
13468 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
13469 (build-system python-build-system)
13470 (propagated-inputs
13471 `(("python-lxml" ,python-lxml)
13472 ("python-genshi" ,python-genshi)))
13473 (native-inputs
13474 `(("python-magic" ,python-magic)))
13475 (home-page "https://relatorio.tryton.org/")
13476 (synopsis "Templating library able to output ODT and PDF files")
13477 (description "Relatorio is a templating library which provides a way to
13478 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
13479 for more filetypes can be easily added by creating plugins for them.")
13480 (license license:gpl3+)))
13481
13482 (define-public python2-relatorio
13483 (package-with-python2 python-relatorio))
13484
13485 (define-public python-radon
13486 (package
13487 (name "python-radon")
13488 (version "4.1.0")
13489 (source
13490 (origin
13491 (method url-fetch)
13492 (uri (pypi-uri "radon" version))
13493 (sha256
13494 (base32
13495 "0vfxxzbnz5lxfvp0yxp35g6c8qqnnbhi4dm7shkm1d3d4192q22n"))))
13496 (build-system python-build-system)
13497 (arguments
13498 `(#:phases (modify-phases %standard-phases
13499 (replace 'check
13500 (lambda _
13501 (invoke "python" "radon/tests/run.py"))))))
13502 (propagated-inputs
13503 `(("python-colorama" ,python-colorama)
13504 ("python-flake8-polyfill" ,python-flake8-polyfill)
13505 ("python-mando" ,python-mando)))
13506 (native-inputs
13507 `(("python-pytest" ,python-pytest)
13508 ("python-pytest-mock" ,python-pytest-mock)))
13509 (home-page "https://radon.readthedocs.org/")
13510 (synopsis "Code Metrics in Python")
13511 (description "Radon is a Python tool which computes various code metrics.
13512 Supported metrics are:
13513 @itemize @bullet
13514 @item raw metrics: SLOC, comment lines, blank lines, &c.
13515 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
13516 @item Halstead metrics (all of them)
13517 @item the Maintainability Index (a Visual Studio metric)
13518 @end itemize")
13519 (license license:expat)))
13520
13521 (define-public python2-radon
13522 (package-with-python2 python-radon))
13523
13524 (define-public python-sure
13525 (package
13526 (name "python-sure")
13527 (version "1.4.11")
13528 (source
13529 (origin
13530 (method url-fetch)
13531 (uri (pypi-uri "sure" version))
13532 (sha256
13533 (base32
13534 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
13535 (build-system python-build-system)
13536 (propagated-inputs
13537 `(("python-mock" ,python-mock)
13538 ("python-six" ,python-six)))
13539 (native-inputs
13540 `(("python-nose" ,python-nose)))
13541 (home-page "https://github.com/gabrielfalcao/sure")
13542 (synopsis "Automated testing library in python for python")
13543 (description
13544 "Sure is a python library that leverages a DSL for writing assertions.
13545 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
13546 (license license:gpl3+)))
13547
13548 (define-public python2-sure
13549 (package-with-python2 python-sure))
13550
13551 (define-public python2-couleur
13552 ;; This package does not seem to support python3 at all, hence,
13553 ;; only the python2 variant definition is provided.
13554 (package
13555 (name "python2-couleur")
13556 (version "0.6.2")
13557 (source
13558 (origin
13559 (method url-fetch)
13560 (uri (pypi-uri "couleur" version))
13561 (sha256
13562 (base32
13563 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
13564 (build-system python-build-system)
13565 (arguments
13566 `(#:python ,python-2))
13567 (home-page "https://github.com/gabrielfalcao/couleur")
13568 (synopsis
13569 "ANSI terminal tool for python, colored shell and other handy fancy features")
13570 (description
13571 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
13572 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
13573 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
13574 ;; https://github.com/gabrielfalcao/couleur/issues/11
13575 (license license:lgpl3+)))
13576
13577 (define-public python-misaka
13578 (package
13579 (name "python-misaka")
13580 (version "2.1.1")
13581 (source
13582 (origin
13583 (method url-fetch)
13584 (uri (pypi-uri "misaka" version))
13585 (sha256
13586 (base32
13587 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
13588 (build-system python-build-system)
13589 (arguments
13590 `(;; Line 37 of setup.py calls self.run_command('develop')
13591 ;; in the 'check' phase. This command seems to be trying
13592 ;; to write to
13593 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
13594 ;; for which it does not have the permission to write.
13595 #:tests? #f))
13596 (propagated-inputs
13597 `(("python-cffi" ,python-cffi)))
13598 (home-page "https://github.com/FSX/misaka")
13599 (synopsis "Python binding for Hoedown")
13600 (description
13601 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
13602 library written in C. It features a fast HTML renderer and functionality to make custom
13603 renderers (e.g. man pages or LaTeX).")
13604 (license license:expat)))
13605
13606 (define-public python2-misaka
13607 (package-with-python2 python-misaka))
13608
13609 (define-public python2-steadymark
13610 ;; This is forced into being a python2 only variant
13611 ;; due to its dependence on couleur that has no support
13612 ;; for python3
13613 (package
13614 (name "python2-steadymark")
13615 (version "0.7.3")
13616 (source
13617 (origin
13618 (method url-fetch)
13619 (uri (pypi-uri "steadymark" version))
13620 (sha256
13621 (base32
13622 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
13623 (build-system python-build-system)
13624 (native-inputs
13625 `(("python-couleur" ,python2-couleur)
13626 ("python-sure" ,python2-sure)
13627 ("python-misaka" ,python2-misaka)))
13628 (arguments
13629 `(#:python ,python-2
13630 #:phases
13631 (modify-phases %standard-phases
13632 (add-before 'build 'patch-setup-py
13633 (lambda _
13634 ;; Update requirements from dependency==version
13635 ;; to dependency>=version
13636 (substitute* "setup.py"
13637 (("==") ">="))
13638 #t)))))
13639 (home-page "https://github.com/gabrielfalcao/steadymark")
13640 (synopsis "Markdown-based test runner for python")
13641 (description
13642 "@code{Steadymark} allows documentation to be written in github-flavoured
13643 markdown. The documentation may contain snippets of code surrounded by python
13644 code blocks and @code{Steadymark} will find these snippets and run them, making
13645 sure that there are no old malfunctional examples in the documentation examples.")
13646 (license license:expat)))
13647
13648 (define-public python-jsonpointer
13649 (package
13650 (name "python-jsonpointer")
13651 (version "1.10")
13652 (source
13653 (origin
13654 (method url-fetch)
13655 (uri (pypi-uri "jsonpointer" version))
13656 (sha256
13657 (base32
13658 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
13659 (build-system python-build-system)
13660 (home-page "https://github.com/stefankoegl/python-json-pointer")
13661 (synopsis "Identify specific nodes in a JSON document")
13662 (description "@code{jsonpointer} allows you to access specific nodes
13663 by path in a JSON document (see RFC 6901).")
13664 (license license:bsd-3)))
13665
13666 (define-public python2-jsonpointer
13667 (package-with-python2 python-jsonpointer))
13668
13669 (define-public python-jsonpatch
13670 (package
13671 (name "python-jsonpatch")
13672 (version "1.16")
13673 (source
13674 (origin
13675 (method git-fetch)
13676 ;; pypi version lacks tests.js
13677 (uri (git-reference
13678 (url "https://github.com/stefankoegl/python-json-patch")
13679 (commit (string-append "v" version))))
13680 (file-name (git-file-name name version))
13681 (sha256
13682 (base32
13683 "0k9pff06lxama3nhsc7cdxbp83422bdy8ifs52i6xkas8hpyzfzr"))))
13684 (build-system python-build-system)
13685 (native-inputs
13686 `(("python-jsonpointer" ,python-jsonpointer)))
13687 (home-page "https://github.com/stefankoegl/python-json-patch")
13688 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
13689 (description "@code{jsonpatch} is a library and program that allows
13690 applying JSON Patches according to RFC 6902.")
13691 (license license:bsd-3)))
13692
13693 (define-public python2-jsonpatch
13694 (package-with-python2 python-jsonpatch))
13695
13696 (define-public python-jsonpatch-0.4
13697 (package (inherit python-jsonpatch)
13698 (name "python-jsonpatch")
13699 (version "0.4")
13700 (source
13701 (origin
13702 (method git-fetch)
13703 (uri (git-reference
13704 (url "https://github.com/stefankoegl/python-json-patch")
13705 (commit (string-append "v" version))))
13706 (file-name (git-file-name name version))
13707 (sha256
13708 (base32
13709 "1fq02y57kinyknxjcav0slcb0k9mwdffqw2hnlhdkpj7palh2mwk"))))))
13710
13711 (define-public python2-jsonpatch-0.4
13712 (package-with-python2 python-jsonpatch-0.4))
13713
13714 (define-public python-rfc3986
13715 (package
13716 (name "python-rfc3986")
13717 (version "1.1.0")
13718 (source (origin
13719 (method url-fetch)
13720 (uri (pypi-uri "rfc3986" version))
13721 (sha256
13722 (base32
13723 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
13724 (build-system python-build-system)
13725 (arguments
13726 `(#:modules ((guix build utils)
13727 (guix build python-build-system)
13728 (ice-9 ftw)
13729 (srfi srfi-1)
13730 (srfi srfi-26))
13731 #:phases
13732 (modify-phases %standard-phases
13733 (replace 'check
13734 (lambda _
13735 (let ((cwd (getcwd)))
13736 (setenv "PYTHONPATH"
13737 (string-append cwd "/build/"
13738 (find (cut string-prefix? "lib" <>)
13739 (scandir (string-append cwd "/build")))
13740 ":"
13741 (getenv "PYTHONPATH")))
13742 (invoke "pytest" "-v")))))))
13743 (native-inputs
13744 `(("python-pytest" ,python-pytest)))
13745 (home-page "https://rfc3986.readthedocs.io/")
13746 (synopsis "Parse and validate URI references")
13747 (description
13748 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
13749 validation and authority parsing. This module also supports RFC@tie{}6874
13750 which adds support for zone identifiers to IPv6 addresses.")
13751 (license license:asl2.0)))
13752
13753 (define-public python2-rfc3986
13754 (package-with-python2 python-rfc3986))
13755
13756 (define-public python-rfc3987
13757 (package
13758 (name "python-rfc3987")
13759 (version "1.3.7")
13760 (source
13761 (origin
13762 (method url-fetch)
13763 (uri (pypi-uri "rfc3987" version))
13764 (sha256
13765 (base32
13766 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
13767 (build-system python-build-system)
13768 (home-page "https://pypi.org/project/rfc3987/")
13769 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
13770 (description "@code{rfc3987} provides routines for parsing and
13771 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
13772 (license license:gpl3+)))
13773
13774 (define-public python2-rfc3987
13775 (package-with-python2 python-rfc3987))
13776
13777 (define-public python-validate-email
13778 (package
13779 (name "python-validate-email")
13780 (version "1.3")
13781 (source
13782 (origin
13783 (method url-fetch)
13784 (uri (pypi-uri "validate_email" version))
13785 (sha256
13786 (base32
13787 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
13788 (build-system python-build-system)
13789 (home-page "https://github.com/syrusakbary/validate_email")
13790 (synopsis "Verifies if an email address is valid and really exists")
13791 (description "@code{validate_email} can be used to verify if an email
13792 address is valid and really exists.")
13793 (license license:lgpl3+)))
13794
13795 (define-public python2-validate-email
13796 (package-with-python2 python-validate-email))
13797
13798 (define-public python-flex
13799 (package
13800 (name "python-flex")
13801 (version "6.10.0")
13802 (source
13803 (origin
13804 (method url-fetch)
13805 (uri (pypi-uri "flex" version))
13806 (sha256
13807 (base32
13808 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
13809 (build-system python-build-system)
13810 (propagated-inputs
13811 `(("python-click" ,python-click)
13812 ("python-iso8601" ,python-iso8601)
13813 ("python-jsonpointer" ,python-jsonpointer)
13814 ("python-pyyaml" ,python-pyyaml)
13815 ("python-requests" ,python-requests)
13816 ("python-rfc3987" ,python-rfc3987)
13817 ("python-six" ,python-six)
13818 ("python-validate-email" ,python-validate-email)))
13819 (home-page "https://github.com/pipermerriam/flex")
13820 (synopsis "Validates Swagger schemata")
13821 (description "@code{flex} can be used to validate Swagger schemata.")
13822 (license license:bsd-3)))
13823
13824 (define-public python2-flex
13825 (package-with-python2 python-flex))
13826
13827 (define-public python-marshmallow
13828 (package
13829 (name "python-marshmallow")
13830 (version "3.0.0b14")
13831 (source
13832 (origin
13833 (method url-fetch)
13834 (uri (pypi-uri "marshmallow" version))
13835 (sha256
13836 (base32
13837 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
13838 (build-system python-build-system)
13839 (propagated-inputs
13840 `(("python-dateutil" ,python-dateutil)
13841 ("python-simplejson" ,python-simplejson)))
13842 (native-inputs
13843 `(("python-pytest" ,python-pytest)
13844 ("python-pytz" ,python-pytz)))
13845 (home-page "https://github.com/marshmallow-code/marshmallow")
13846 (synopsis "Convert complex datatypes to and from native
13847 Python datatypes.")
13848 (description "@code{marshmallow} provides a library for converting
13849 complex datatypes to and from native Python datatypes.")
13850 (license license:expat)))
13851
13852 (define-public python2-marshmallow
13853 (package-with-python2 python-marshmallow))
13854
13855 (define-public python-apispec
13856 (package
13857 (name "python-apispec")
13858 (version "0.25.3")
13859 (source
13860 (origin
13861 (method url-fetch)
13862 (uri (pypi-uri "apispec" version))
13863 (sha256
13864 (base32
13865 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
13866 (build-system python-build-system)
13867 (propagated-inputs
13868 `(("python-pyyaml" ,python-pyyaml)))
13869 (native-inputs
13870 `(("python-pytest" ,python-pytest)
13871 ("python-flask" ,python-flask)
13872 ("python-marshmallow" ,python-marshmallow)
13873 ("python-tornado" ,python-tornado)
13874 ("python-bottle" ,python-bottle)
13875 ("python-mock" ,python-mock)))
13876 (home-page "https://github.com/marshmallow-code/apispec")
13877 (synopsis "Swagger 2.0 API specification generator")
13878 (description "@code{python-apispec} is a pluggable API specification
13879 generator. Currently supports the OpenAPI specification (f.k.a.
13880 Swagger 2.0).")
13881 (license license:expat)))
13882
13883 (define-public python2-apispec
13884 (package-with-python2 python-apispec))
13885
13886 (define-public python-flasgger
13887 (package
13888 (name "python-flasgger")
13889 (version "0.6.3")
13890 (source
13891 (origin
13892 (method git-fetch)
13893 (uri (git-reference
13894 (url "https://github.com/rochacbruno/flasgger.git")
13895 (commit version)))
13896 (file-name (git-file-name name version))
13897 (sha256
13898 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
13899 (build-system python-build-system)
13900 (arguments
13901 `(#:phases
13902 (modify-phases %standard-phases
13903 (replace 'check
13904 (lambda* (#:key inputs outputs #:allow-other-keys)
13905 (substitute* "Makefile"
13906 (("flake8 flasgger --ignore=F403")
13907 "flake8 flasgger --ignore=E731,F403"))
13908 (setenv "PYTHONPATH" (string-append (getcwd)
13909 ":"
13910 (getenv "PYTHONPATH")))
13911 (invoke "py.test"))))))
13912 (propagated-inputs
13913 `(("python-flask" ,python-flask)
13914 ("python-pyyaml" ,python-pyyaml)
13915 ("python-jsonschema" ,python-jsonschema)
13916 ("python-mistune" ,python-mistune)
13917 ("python-six" ,python-six)))
13918 (native-inputs
13919 `(("python-decorator" ,python-decorator)
13920 ("python-flake8" ,python-flake8)
13921 ("python-flask-restful" ,python-flask-restful)
13922 ("python-flex" ,python-flex)
13923 ("python-pytest" ,python-pytest)
13924 ("python-pytest-cov" ,python-pytest-cov)
13925 ("python-marshmallow" ,python-marshmallow)
13926 ("python-apispec" ,python-apispec)))
13927 (home-page "https://github.com/rochacbruno/flasgger/")
13928 (synopsis "Extract Swagger specs from your Flask project")
13929 (description "@code{python-flasgger} allows extracting Swagger specs
13930 from your Flask project. It is a fork of Flask-Swagger.")
13931 (license license:expat)))
13932
13933 (define-public python2-flasgger
13934 (package-with-python2 python-flasgger))
13935
13936 (define-public python-swagger-spec-validator
13937 (package
13938 (name "python-swagger-spec-validator")
13939 (version "2.4.3")
13940 (source
13941 (origin
13942 (method url-fetch)
13943 (uri (pypi-uri "swagger-spec-validator" version))
13944 (sha256
13945 (base32
13946 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
13947 (build-system python-build-system)
13948 (propagated-inputs
13949 `(("python-jsonschema" ,python-jsonschema)
13950 ("python-pyyaml" ,python-pyyaml)
13951 ("python-six" ,python-six)))
13952 (home-page
13953 "https://github.com/Yelp/swagger_spec_validator")
13954 (synopsis "Validation of Swagger specifications")
13955 (description "@code{swagger_spec_validator} provides a library for
13956 validating Swagger API specifications.")
13957 (license license:asl2.0)))
13958
13959 (define-public python2-swagger-spec-validator
13960 (package-with-python2 python-swagger-spec-validator))
13961
13962 (define-public python-apache-libcloud
13963 (package
13964 (name "python-apache-libcloud")
13965 (version "2.4.0")
13966 (source
13967 (origin
13968 (method url-fetch)
13969 (uri (pypi-uri "apache-libcloud" version))
13970 (sha256
13971 (base32
13972 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
13973 (build-system python-build-system)
13974 (arguments
13975 `(#:phases
13976 (modify-phases %standard-phases
13977 (add-after 'unpack 'patch-ssh
13978 (lambda* (#:key inputs #:allow-other-keys)
13979 (substitute* "libcloud/compute/ssh.py"
13980 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
13981 "/bin/ssh" "'")))
13982 #t))
13983 (add-after 'unpack 'patch-tests
13984 (lambda _
13985 (substitute* "./libcloud/test/test_file_fixtures.py"
13986 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
13987 (("def _ascii") "def _raw_data(self, method, url, body, headers):
13988 return (httplib.OK,
13989 \"1234abcd\",
13990 {\"test\": \"value\"},
13991 httplib.responses[httplib.OK])
13992 def _ascii"))
13993 (substitute* "libcloud/test/compute/test_ssh_client.py"
13994 (("class ShellOutSSHClientTests")
13995 "@unittest.skip(\"Guix container doesn't have ssh service\")
13996 class ShellOutSSHClientTests")
13997 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
13998 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
13999 (("'.xF0', '.x90', '.x8D', '.x88'")
14000 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
14001 #t))
14002 (add-before 'check 'copy-secret
14003 (lambda _
14004 (copy-file "libcloud/test/secrets.py-dist"
14005 "libcloud/test/secrets.py")
14006 #t)))))
14007 (inputs
14008 `(("openssh" ,openssh)))
14009 (propagated-inputs
14010 `(("python-paramiko" ,python-paramiko)
14011 ("python-requests" ,python-requests)))
14012 (native-inputs
14013 `(("python-lockfile" ,python-lockfile)
14014 ("python-mock" ,python-mock)
14015 ("python-pytest" ,python-pytest)
14016 ("python-pytest-runner" ,python-pytest-runner)
14017 ("python-requests-mock" ,python-requests-mock)))
14018 (home-page "https://libcloud.apache.org/")
14019 (synopsis "Unified Cloud API")
14020 (description "@code{libcloud} is a Python library for interacting with
14021 many of the popular cloud service providers using a unified API.")
14022 (license license:asl2.0)))
14023
14024 (define-public python2-apache-libcloud
14025 (package-with-python2 python-apache-libcloud))
14026
14027 (define-public python-smmap
14028 (package
14029 (name "python-smmap")
14030 (version "3.0.1")
14031 (source
14032 (origin
14033 (method url-fetch)
14034 (uri (pypi-uri "smmap" version))
14035 (sha256
14036 (base32 "0ijlnv60y8f41py1wnn5n1a1i81cxd9dfpdhr0k3cgkrcbz8850p"))))
14037 (build-system python-build-system)
14038 (native-inputs
14039 `(("python-nosexcover" ,python-nosexcover)))
14040 (home-page "https://github.com/Byron/smmap")
14041 (synopsis "Python sliding window memory map manager")
14042 (description "@code{smmap} is a pure Python implementation of a sliding
14043 window memory map manager.")
14044 (license license:bsd-3)))
14045
14046 (define-public python-smmap2
14047 (deprecated-package "python-smmap2" python-smmap))
14048
14049 (define-public python2-smmap
14050 (package-with-python2 python-smmap))
14051
14052 (define-public python2-smmap2
14053 (deprecated-package "python2-smmap2" python2-smmap))
14054
14055 (define-public python-regex
14056 (package
14057 (name "python-regex")
14058 (version "2019.04.14")
14059 (source (origin
14060 (method url-fetch)
14061 (uri (pypi-uri "regex" version))
14062 (sha256
14063 (base32
14064 "1a6hhfs6l6snr1z654ay6wzbmwdkmv282fzfkd5hk2d1n73y8v6m"))))
14065 ;; TODO: Fix and enable regex_test.py tests that complain about the
14066 ;; test.support module not existing.
14067 (build-system python-build-system)
14068 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
14069 (synopsis "Alternative regular expression module")
14070 (description "This regular expression implementation is backwards-
14071 compatible with the standard @code{re} module, but offers additional
14072 functionality like full case-folding for case-insensitive matches in Unicode.")
14073 (license license:psfl)))
14074
14075 (define-public python2-regex
14076 (package-with-python2 python-regex))
14077
14078 (define-public python2-pyopengl
14079 (package
14080 (name "python2-pyopengl")
14081 (version "3.1.0")
14082 (source
14083 (origin
14084 (method url-fetch)
14085 (uri (pypi-uri "PyOpenGL" version))
14086 (sha256
14087 (base32
14088 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
14089 (arguments
14090 `(#:python ,python-2))
14091 (build-system python-build-system)
14092 (home-page "http://pyopengl.sourceforge.net")
14093 (synopsis "Standard OpenGL bindings for Python")
14094 (description
14095 "PyOpenGL is the most common cross platform Python binding to OpenGL and
14096 related APIs. The binding is created using the standard @code{ctypes}
14097 library.")
14098 (license license:bsd-3)))
14099
14100 (define-public python2-pyopengl-accelerate
14101 (package
14102 (inherit python2-pyopengl)
14103 (name "python2-pyopengl-accelerate")
14104 (version "3.1.0")
14105 (source
14106 (origin
14107 (method url-fetch)
14108 (uri (pypi-uri "PyOpenGL-accelerate" version))
14109 (sha256
14110 (base32
14111 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
14112 (synopsis "Acceleration code for PyOpenGL")
14113 (description
14114 "This is the Cython-coded accelerator module for PyOpenGL.")))
14115
14116 (define-public python-rencode
14117 (package
14118 (name "python-rencode")
14119 (version "1.0.5")
14120 (source
14121 (origin
14122 (method url-fetch)
14123 (uri (pypi-uri "rencode" version))
14124 (sha256
14125 (base32
14126 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
14127 (build-system python-build-system)
14128 (arguments
14129 `(#:phases
14130 (modify-phases %standard-phases
14131 (add-before 'check 'delete-bogus-test
14132 ;; This test requires /home/aresch/Downloads, which is not provided by
14133 ;; the build environment.
14134 (lambda _
14135 (delete-file "rencode/t.py")
14136 #t)))))
14137 (native-inputs `(("pkg-config" ,pkg-config)
14138 ("python-cython" ,python-cython)))
14139 (home-page "https://github.com/aresch/rencode")
14140 (synopsis "Serialization of heterogeneous data structures")
14141 (description
14142 "The @code{rencode} module is a data structure serialization library,
14143 similar to @code{bencode} from the BitTorrent project. For complex,
14144 heterogeneous data structures with many small elements, r-encoding stake up
14145 significantly less space than b-encodings. This version of rencode is a
14146 complete rewrite in Cython to attempt to increase the performance over the
14147 pure Python module.")
14148 (license license:bsd-3)))
14149
14150 (define-public python2-rencode
14151 (package-with-python2 python-rencode))
14152
14153 (define-public python-xenon
14154 (package
14155 (name "python-xenon")
14156 (version "0.7.0")
14157 (source
14158 (origin
14159 (method url-fetch)
14160 (uri (pypi-uri "xenon" version))
14161 (sha256
14162 (base32
14163 "0nv207ql2wmh9q62503np056c4vf1c1hlsi5cvv5p5kx574k6r2y"))))
14164 (build-system python-build-system)
14165 (native-inputs
14166 `(("python-pyyaml" ,python-pyyaml)
14167 ("python-radon" ,python-radon)
14168 ("python-requests" ,python-requests)
14169 ("python-flake8" ,python-flake8)
14170 ("python-tox" ,python-tox)))
14171 (arguments
14172 `(#:tests? #f ;test suite not shipped with the PyPI archive
14173 #:phases
14174 (modify-phases %standard-phases
14175 (add-before 'build 'patch-test-requirements
14176 (lambda _
14177 ;; Remove httpretty dependency for tests.
14178 (substitute* "setup.py"
14179 (("httpretty") ""))
14180 #t)))))
14181 (home-page "https://xenon.readthedocs.org/")
14182 (synopsis "Monitor code metrics for Python on your CI server")
14183 (description
14184 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
14185 Ideally, @code{xenon} is run every time code is committed. Through command
14186 line options, various thresholds can be set for the complexity of code. It
14187 will fail (i.e. it will exit with a non-zero exit code) when any of these
14188 requirements is not met.")
14189 (license license:expat)))
14190
14191 (define-public python2-xenon
14192 (package-with-python2 python-xenon))
14193
14194 (define-public python-pysocks
14195 (package
14196 (name "python-pysocks")
14197 (version "1.7.0")
14198 (source
14199 (origin
14200 (method url-fetch)
14201 (uri (pypi-uri "PySocks" version))
14202 (sha256
14203 (base32
14204 "0z4p31bpqm893cf87qqgb30k7nwd8kqfjwwjm5cvxb6zbyj1w0yr"))))
14205 (build-system python-build-system)
14206 (arguments `(#:tests? #f))
14207 (home-page "https://github.com/Anorov/PySocks")
14208 (synopsis "SOCKS client module")
14209 (description "@code{pysocks} is an updated and semi-actively maintained
14210 version of @code{SocksiPy} with bug fixes and extra features.")
14211 (license license:bsd-3)))
14212
14213 (define-public python2-pysocks
14214 (package-with-python2 python-pysocks))
14215
14216 (define-public python-pydiff
14217 (package
14218 (name "python-pydiff")
14219 (version "0.2")
14220 (source
14221 (origin
14222 (method url-fetch)
14223 (uri (pypi-uri "pydiff" version))
14224 (sha256
14225 (base32
14226 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
14227 (build-system python-build-system)
14228 (home-page "https://github.com/myint/pydiff")
14229 (synopsis "Library to diff two Python files at the bytecode level")
14230 (description
14231 "@code{pydiff} makes it easy to look for actual code changes while
14232 ignoring formatting changes.")
14233 (license license:expat)))
14234
14235 (define-public python2-pydiff
14236 (package-with-python2 python-pydiff))
14237
14238 (define-public python-tqdm
14239 (package
14240 (name "python-tqdm")
14241 (version "4.19.6")
14242 (source
14243 (origin
14244 (method url-fetch)
14245 (uri (pypi-uri "tqdm" version))
14246 (sha256
14247 (base32
14248 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
14249 (build-system python-build-system)
14250 (native-inputs
14251 `(("python-flake8" ,python-flake8)
14252 ("python-nose" ,python-nose)
14253 ("python-coverage" ,python-coverage)))
14254 (home-page "https://github.com/tqdm/tqdm")
14255 (synopsis "Fast, extensible progress meter")
14256 (description
14257 "Make loops show a progress bar on the console by just wrapping any
14258 iterable with @code{|tqdm(iterable)|}. Offers many options to define
14259 design and layout.")
14260 (license (list license:mpl2.0 license:expat))
14261 (properties `((python2-variant . ,(delay python2-tqdm))))))
14262
14263 (define-public python2-tqdm
14264 (let ((tqdm (package-with-python2
14265 (strip-python2-variant python-tqdm))))
14266 (package (inherit tqdm)
14267 (native-inputs `(("python2-functools32" ,python2-functools32)
14268 ,@(package-native-inputs tqdm))))))
14269
14270 (define-public python-pkginfo
14271 (package
14272 (name "python-pkginfo")
14273 (version "1.4.2")
14274 (source
14275 (origin
14276 (method url-fetch)
14277 (uri (pypi-uri "pkginfo" version))
14278 (sha256
14279 (base32
14280 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
14281 (build-system python-build-system)
14282 (arguments
14283 ;; The tests are broken upstream.
14284 '(#:tests? #f))
14285 (home-page
14286 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
14287 (synopsis
14288 "Query metadatdata from sdists, bdists, and installed packages")
14289 (description
14290 "API to query the distutils metadata written in @file{PKG-INFO} inside a
14291 source distriubtion (an sdist) or a binary distribution (e.g., created by
14292 running bdist_egg). It can also query the EGG-INFO directory of an installed
14293 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
14294 created by running @code{python setup.py develop}).")
14295 (license license:expat)))
14296
14297 (define-public python2-pkginfo
14298 (package-with-python2 python-pkginfo))
14299
14300 (define-public python-twine
14301 (package
14302 (name "python-twine")
14303 (version "1.9.1")
14304 (source
14305 (origin
14306 (method url-fetch)
14307 (uri (pypi-uri "twine" version))
14308 (sha256
14309 (base32
14310 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
14311 (build-system python-build-system)
14312 (propagated-inputs
14313 `(("python-tqdm" ,python-tqdm)
14314 ("python-pkginfo" ,python-pkginfo)
14315 ("python-requests" ,python-requests)
14316 ("python-requests-toolbelt" ,python-requests-toolbelt)))
14317 (home-page "https://github.com/pypa/twine")
14318 (synopsis "Collection of utilities for interacting with PyPI")
14319 (description
14320 "@code{twine} currently supports registering projects and uploading
14321 distributions. It authenticates the user over HTTPS, allows them to pre-sign
14322 their files and supports any packaging format (including wheels).")
14323 (license license:asl2.0)))
14324
14325 (define-public python2-twine
14326 (package-with-python2 python-twine))
14327
14328 (define-public python-linecache2
14329 (package
14330 (name "python-linecache2")
14331 (version "1.0.0")
14332 (source
14333 (origin
14334 (method url-fetch)
14335 (uri (pypi-uri "linecache2" version))
14336 (sha256
14337 (base32
14338 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
14339 (build-system python-build-system)
14340 (arguments
14341 `(;; The tests depend on unittest2, and our version is a bit too old.
14342 #:tests? #f))
14343 (native-inputs
14344 `(("python-pbr" ,python-pbr-minimal)))
14345 (home-page
14346 "https://github.com/testing-cabal/linecache2")
14347 (synopsis "Backports of the linecache module")
14348 (description
14349 "The linecache module allows one to get any line from any file, while
14350 attempting to optimize internally, using a cache, the common case where many
14351 lines are read from a single file.")
14352 (license license:psfl)))
14353
14354 (define-public python2-linecache2
14355 (package-with-python2 python-linecache2))
14356
14357 (define-public python-traceback2
14358 (package
14359 (name "python-traceback2")
14360 (version "1.4.0")
14361 (source
14362 (origin
14363 (method url-fetch)
14364 (uri (pypi-uri "traceback2" version))
14365 (sha256
14366 (base32
14367 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
14368 (build-system python-build-system)
14369 (arguments
14370 `(;; python-traceback2 and python-unittest2 depend on one another.
14371 #:tests? #f))
14372 (native-inputs
14373 `(("python-pbr" ,python-pbr-minimal)))
14374 (propagated-inputs
14375 `(("python-linecache2" ,python-linecache2)))
14376 (home-page
14377 "https://github.com/testing-cabal/traceback2")
14378 (synopsis "Backports of the traceback module")
14379 (description
14380 "This module provides a standard interface to extract, format and print
14381 stack traces of Python programs. It exactly mimics the behavior of the Python
14382 interpreter when it prints a stack trace.")
14383 (license license:psfl)))
14384
14385 (define-public python2-traceback2
14386 (package-with-python2 python-traceback2))
14387
14388 (define-public python-ratelimiter
14389 (package
14390 (name "python-ratelimiter")
14391 (version "1.2.0")
14392 (source
14393 (origin
14394 (method url-fetch)
14395 (uri (pypi-uri "ratelimiter" version))
14396 (sha256
14397 (base32
14398 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
14399 (build-system python-build-system)
14400 (arguments
14401 '(#:tests? #f)) ; There are no tests in the pypi archive.
14402 (home-page "https://github.com/RazerM/ratelimiter")
14403 (synopsis "Simple rate limiting object")
14404 (description
14405 "The @code{ratelimiter} module ensures that an operation will not be
14406 executed more than a given number of times during a given period.")
14407 (license license:asl2.0)))
14408
14409 (define-public python2-ratelimiter
14410 (package-with-python2 python-ratelimiter))
14411
14412 (define-public python-dukpy
14413 (package
14414 (name "python-dukpy")
14415 (version "0.3")
14416 (source
14417 (origin
14418 (method git-fetch)
14419 (uri (git-reference
14420 (url "https://github.com/kovidgoyal/dukpy.git")
14421 (commit (string-append "v" version))))
14422 (file-name (git-file-name name version))
14423 (sha256
14424 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
14425 (build-system python-build-system)
14426 (home-page "https://github.com/kovidgoyal/dukpy")
14427 (synopsis "Run JavaScript in python")
14428 (description
14429 "dukpy is a JavaScript runtime environment for Python using the duktape
14430 embeddable JavaScript engine.")
14431 ;; Dukpy is licensed under MIT like the embedded duktape library,
14432 ;; with 'errors.c' as GPL3.
14433 (license (list license:expat license:gpl3))))
14434
14435 (define-public python2-dukpy
14436 (package-with-python2 python-dukpy))
14437
14438 (define-public python-jsonrpclib-pelix
14439 (package
14440 (name "python-jsonrpclib-pelix")
14441 (version "0.3.2")
14442 (source
14443 (origin
14444 (method url-fetch)
14445 (uri (pypi-uri "jsonrpclib-pelix" version))
14446 (sha256
14447 (base32
14448 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
14449 (build-system python-build-system)
14450 (arguments
14451 `(#:tests? #f)) ; no tests in PyPI tarball
14452 (home-page "https://github.com/tcalmant/jsonrpclib/")
14453 (synopsis "JSON-RPC 2.0 client library for Python")
14454 (description
14455 "This library implements the JSON-RPC v2.0
14456 specification (backwards-compatible) as a client library for Python. This
14457 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
14458 services.")
14459 (license license:asl2.0)))
14460
14461 (define-public python2-jsonrpclib-pelix
14462 (package-with-python2 python-jsonrpclib-pelix))
14463
14464 (define-public python-setuptools-scm-git-archive
14465 (package
14466 (name "python-setuptools-scm-git-archive")
14467 (version "1.0")
14468 (source
14469 (origin
14470 (method url-fetch)
14471 (uri (pypi-uri "setuptools_scm_git_archive" version))
14472 (sha256
14473 (base32
14474 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
14475 (build-system python-build-system)
14476 (native-inputs
14477 `(("python-pytest" ,python-pytest)))
14478 (propagated-inputs
14479 `(("python-setuptools-scm" ,python-setuptools-scm)))
14480 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
14481 (synopsis "Setuptools_scm plugin for git archives")
14482 (description
14483 "The setuptools_scm_git_archive package is a plugin to
14484 setuptools_scm, which supports obtaining versions from git archives that
14485 belong to tagged versions.")
14486 (license license:expat)))
14487
14488 (define-public python2-setuptools-scm-git-archive
14489 (package-with-python2 python-setuptools-scm-git-archive))
14490
14491 (define-public python-setuptools-git
14492 (package
14493 (name "python-setuptools-git")
14494 (version "1.2")
14495 (source
14496 (origin
14497 (method url-fetch)
14498 (uri (pypi-uri "setuptools-git" version))
14499 (sha256
14500 (base32
14501 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
14502 (build-system python-build-system)
14503 (arguments
14504 `(#:phases
14505 (modify-phases %standard-phases
14506 ;; This is needed for tests.
14507 (add-after 'unpack 'configure-git
14508 (lambda _
14509 (setenv "HOME" "/tmp")
14510 (invoke "git" "config" "--global" "user.email" "guix")
14511 (invoke "git" "config" "--global" "user.name" "guix")
14512 #t)))))
14513 (native-inputs
14514 `(("git" ,git-minimal)))
14515 (home-page "https://github.com/msabramo/setuptools-git")
14516 (synopsis "Setuptools revision control system plugin for Git")
14517 (description
14518 "This package provides a plugin for Setuptools for revision control with
14519 Git.")
14520 (license license:bsd-3)))
14521
14522 (define-public python-pyclipper
14523 (package
14524 (name "python-pyclipper")
14525 (version "1.1.0.post3")
14526 (source
14527 (origin
14528 (method url-fetch)
14529 (uri (pypi-uri "pyclipper" version ".zip"))
14530 (sha256
14531 (base32 "164yksvqwqvwzh8f8lq92asg87hd8rvcy2xb5vm4y4ccvd5xgb7i"))
14532 (modules '((guix build utils)))
14533 (snippet
14534 '(begin
14535 ;; This file is generated by Cython.
14536 (delete-file "pyclipper/pyclipper.cpp") #t))))
14537 (build-system python-build-system)
14538 (arguments
14539 `(#:phases
14540 (modify-phases %standard-phases
14541 (add-before 'build 'cythonize-sources
14542 (lambda _
14543 (with-directory-excursion "pyclipper"
14544 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
14545 (propagated-inputs
14546 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
14547 (native-inputs
14548 `(("python-cython" ,python-cython)
14549 ("python-pytest" ,python-pytest)
14550 ("python-pytest-runner" ,python-pytest-runner)
14551 ("python-unittest2" ,python-unittest2)
14552 ("unzip" ,unzip)))
14553 (home-page "https://github.com/greginvm/pyclipper")
14554 (synopsis "Wrapper for Angus Johnson's Clipper library")
14555 (description
14556 "Pyclipper is a Cython wrapper for the C++ translation of the
14557 Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
14558 (license license:expat)))
14559
14560 (define-public python2-pyclipper
14561 (package-with-python2 python-pyclipper))
14562
14563 (define-public python2-booleanoperations
14564 (package
14565 (name "python2-booleanoperations")
14566 (version "0.7.1")
14567 (source
14568 (origin
14569 (method url-fetch)
14570 (uri (pypi-uri "booleanOperations" version ".zip"))
14571 (sha256
14572 (base32
14573 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
14574 (build-system python-build-system)
14575 (arguments
14576 `(#:python ,python-2))
14577 (native-inputs
14578 `(("unzip" ,unzip)
14579 ("python2-pytest" ,python2-pytest)
14580 ("python2-pytest-runner" ,python2-pytest-runner)))
14581 (propagated-inputs
14582 `(("python-fonttools" ,python2-fonttools)
14583 ("python-pyclipper" ,python2-pyclipper)
14584 ("python-ufolib" ,python2-ufolib)))
14585 (home-page "https://github.com/typemytype/booleanOperations")
14586 (synopsis "Boolean operations on paths")
14587 (description
14588 "BooleanOperations provides a Python library that enables
14589 boolean operations on paths.")
14590 (license license:expat)))
14591
14592 (define-public python-tempdir
14593 (package
14594 (name "python-tempdir")
14595 (version "0.7.1")
14596 (source
14597 (origin
14598 (method url-fetch)
14599 (uri (pypi-uri "tempdir" version))
14600 (sha256
14601 (base32
14602 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
14603 (build-system python-build-system)
14604 (home-page "https://pypi.org/project/tempdir/")
14605 (arguments
14606 ;; the package has no tests
14607 '(#:tests? #f))
14608 (synopsis "Python library for managing temporary directories")
14609 (description
14610 "This library manages temporary directories that are automatically
14611 deleted with all their contents when they are no longer needed. It is
14612 particularly convenient for use in tests.")
14613 (license license:expat)))
14614
14615 (define-public python2-tempdir
14616 (package-with-python2 python-tempdir))
14617
14618 (define-public python-activepapers
14619 (package
14620 (name "python-activepapers")
14621 (version "0.2.2")
14622 (source
14623 (origin
14624 (method url-fetch)
14625 (uri (pypi-uri "ActivePapers.Py" version))
14626 (sha256
14627 (base32
14628 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
14629 (build-system python-build-system)
14630 (arguments
14631 `(#:modules ((ice-9 ftw)
14632 (srfi srfi-1)
14633 (guix build utils)
14634 (guix build python-build-system))
14635
14636 #:phases
14637 (modify-phases %standard-phases
14638 (add-after 'unpack 'delete-python2-code
14639 (lambda _
14640 (for-each delete-file
14641 '("lib/activepapers/builtins2.py"
14642 "lib/activepapers/standardlib2.py"
14643 "lib/activepapers/utility2.py"))))
14644 (replace 'check
14645 (lambda _
14646 ;; Deactivate the test cases that download files
14647 (setenv "NO_NETWORK_ACCESS" "1")
14648 ;; For some strange reason, some tests fail if nosetests runs all
14649 ;; test modules in a single execution. They pass if each test
14650 ;; module is run individually.
14651 (for-each (lambda (filename)
14652 (invoke "nosetests"
14653 (string-append "tests/" filename)))
14654 (scandir "tests"
14655 (lambda (filename)
14656 (string-suffix? ".py" filename)))))))))
14657 (native-inputs
14658 `(("python-tempdir" ,python-tempdir)
14659 ("python-nose" ,python-nose)))
14660 (propagated-inputs
14661 `(("python-h5py" ,python-h5py)))
14662 (home-page "https://www.activepapers.org/")
14663 (synopsis "Executable papers for scientific computing")
14664 (description
14665 "ActivePapers is a tool for working with executable papers, which
14666 combine data, code, and documentation in single-file packages,
14667 suitable for publication as supplementary material or on repositories
14668 such as figshare or Zenodo.")
14669 (properties `((python2-variant . ,(delay python2-activepapers))))
14670 (license license:bsd-3)))
14671
14672 (define-public python2-activepapers
14673 (let ((base (package-with-python2
14674 (strip-python2-variant python-activepapers))))
14675 (package
14676 (inherit base)
14677 (arguments
14678 (substitute-keyword-arguments (package-arguments base)
14679 ((#:phases phases)
14680 `(modify-phases ,phases
14681 (delete 'delete-python2-code)
14682 (add-after 'unpack 'delete-python3-code
14683 (lambda _
14684 (for-each delete-file
14685 '("lib/activepapers/builtins3.py"
14686 "lib/activepapers/standardlib3.py"
14687 "lib/activepapers/utility3.py")))))))))))
14688
14689 (define-public python-semver
14690 (package
14691 (name "python-semver")
14692 (version "2.9.0")
14693 (source
14694 (origin
14695 (method url-fetch)
14696 (uri (pypi-uri "semver" version))
14697 (sha256
14698 (base32
14699 "183kg1rhzz3hqizvphkd8hlbf1zxfx8737zhfkmqzxi71jmdw7pd"))))
14700 (build-system python-build-system)
14701 (native-inputs
14702 `(("python-appdirs" ,python-appdirs)
14703 ("python-distlib" ,python-distlib)
14704 ("python-importlib-metadata" ,python-importlib-metadata)
14705 ("python-filelock" ,python-filelock)
14706 ("python-six" ,python-six)
14707 ("python-tox" ,python-tox)
14708 ("python-virtualenv" ,python-virtualenv)))
14709 (home-page "https://github.com/k-bx/python-semver")
14710 (synopsis "Python helper for Semantic Versioning")
14711 (description "This package provides a Python library for
14712 @url{Semantic Versioning, http://semver.org/}.")
14713 (license license:bsd-3)))
14714
14715 (define-public python2-semver
14716 (package-with-python2 python-semver))
14717
14718 (define-public python-pyro4
14719 (package
14720 (name "python-pyro4")
14721 (version "4.77")
14722 (source
14723 (origin
14724 (method url-fetch)
14725 (uri (pypi-uri "Pyro4" version))
14726 (sha256
14727 (base32 "0gsjg869y4gpy265s1gj1f2qy6jn5iz8r2bwwnq78r1r5yi15zib"))))
14728 (build-system python-build-system)
14729 (arguments
14730 '(#:tests? #f)) ;FIXME: Some tests require network access.
14731 (native-inputs
14732 `(("python-cloudpickle" ,python-cloudpickle)
14733 ("python-dill" ,python-dill)
14734 ("python-msgpack" ,python-msgpack)))
14735 (propagated-inputs
14736 `(("python-serpent" ,python-serpent)))
14737 (home-page "https://pyro4.readthedocs.io")
14738 (synopsis "Distributed object middleware for Python")
14739 (description
14740 "Pyro enables you to build applications in which objects can talk to each
14741 other over the network. You can just use normal Python method calls to call
14742 objects on other machines, also known as remote procedure calls (RPC).")
14743 (license license:expat)))
14744
14745 (define-public python2-pyro
14746 (package
14747 (name "python2-pyro")
14748 (version "3.16")
14749 (source
14750 (origin
14751 (method url-fetch)
14752 (uri (pypi-uri "Pyro" version))
14753 (file-name (string-append "Pyro-" version ".tar.gz"))
14754 (sha256
14755 (base32
14756 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
14757 (build-system python-build-system)
14758 (arguments
14759 ;; Pyro is not compatible with Python 3
14760 `(#:python ,python-2
14761 ;; Pyro has no test cases for automatic execution
14762 #:tests? #f))
14763 (home-page "http://pythonhosted.org/Pyro/")
14764 (synopsis "Distributed object manager for Python")
14765 (description "Pyro is a Distributed Object Technology system
14766 written in Python that is designed to be easy to use. It resembles
14767 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
14768 which is a system and language independent Distributed Object Technology
14769 and has much more to offer than Pyro or RMI. Pyro 3.x is no
14770 longer maintained. New projects should use Pyro4 instead, which
14771 is the new Pyro version that is actively developed.")
14772 (license license:expat)))
14773
14774 (define-public python2-scientific
14775 (package
14776 (name "python2-scientific")
14777 (version "2.9.4")
14778 (source
14779 (origin
14780 (method git-fetch)
14781 (uri (git-reference
14782 (url "https://github.com/khinsen/ScientificPython")
14783 (commit (string-append "rel" version))))
14784 (file-name (git-file-name name version))
14785 (sha256
14786 (base32
14787 "16l48aj9fps9r7jyk8gpxppwrv0fqvlc13sayxskz28r5s6sjwbl"))))
14788 (build-system python-build-system)
14789 (inputs
14790 `(("netcdf" ,netcdf)))
14791 (propagated-inputs
14792 `(("python-numpy" ,python2-numpy-1.8)
14793 ("python-pyro" ,python2-pyro)))
14794 (arguments
14795 ;; ScientificPython is not compatible with Python 3
14796 `(#:python ,python-2
14797 #:tests? #f ; No test suite
14798 #:phases
14799 (modify-phases %standard-phases
14800 (replace 'build
14801 (lambda* (#:key inputs #:allow-other-keys)
14802 (invoke "python" "setup.py" "build"
14803 (string-append "--netcdf_prefix="
14804 (assoc-ref inputs "netcdf"))))))))
14805 (home-page "http://dirac.cnrs-orleans.fr/ScientificPython")
14806 (synopsis "Python modules for scientific computing")
14807 (description "ScientificPython is a collection of Python modules that are
14808 useful for scientific computing. Most modules are rather general (Geometry,
14809 physical units, automatic derivatives, ...) whereas others are more
14810 domain-specific (e.g. netCDF and PDB support). The library is currently
14811 not actively maintained and works only with Python 2 and NumPy < 1.9.")
14812 (license license:cecill-c)))
14813
14814 (define-public python2-mmtk
14815 (package
14816 (name "python2-mmtk")
14817 (version "2.7.12")
14818 (source
14819 (origin
14820 (method git-fetch)
14821 (uri (git-reference
14822 (url "https://github.com/khinsen/MMTK")
14823 (commit (string-append "rel" version))))
14824 (file-name (git-file-name name version))
14825 (sha256
14826 (base32
14827 "1fqwh3ba9jd42nigvn5shndgwb1zy7kh9520ncvqci7n8ffjr6p1"))))
14828 (build-system python-build-system)
14829 (native-inputs
14830 `(("netcdf" ,netcdf)))
14831 (propagated-inputs
14832 `(("python-scientific" ,python2-scientific)
14833 ("python-tkinter" ,python-2 "tk")))
14834 (arguments
14835 `(#:python ,python-2
14836 #:tests? #f
14837 #:phases
14838 (modify-phases %standard-phases
14839 (add-before 'build 'includes-from-scientific
14840 (lambda* (#:key inputs #:allow-other-keys)
14841 (mkdir-p "Include/Scientific")
14842 (copy-recursively
14843 (string-append
14844 (assoc-ref inputs "python-scientific")
14845 "/include/python2.7/Scientific")
14846 "Include/Scientific"))))))
14847 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
14848 (synopsis "Python library for molecular simulation")
14849 (description "MMTK is a library for molecular simulations with an emphasis
14850 on biomolecules. It provides widely used methods such as Molecular Dynamics
14851 and normal mode analysis, but also basic routines for implementing new methods
14852 for simulation and analysis. The library is currently not actively maintained
14853 and works only with Python 2 and NumPy < 1.9.")
14854 (license license:cecill-c)))
14855
14856 (define-public python-phonenumbers
14857 (package
14858 (name "python-phonenumbers")
14859 (version "8.9.1")
14860 (source
14861 (origin
14862 (method url-fetch)
14863 (uri (pypi-uri "phonenumbers" version))
14864 (sha256
14865 (base32
14866 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
14867 (build-system python-build-system)
14868 (home-page
14869 "https://github.com/daviddrysdale/python-phonenumbers")
14870 (synopsis
14871 "Python library for dealing with international phone numbers")
14872 (description
14873 "This package provides a Python port of Google's libphonenumber library.")
14874 (license license:asl2.0)))
14875
14876 (define-public python2-phonenumbers
14877 (package-with-python2 python-phonenumbers))
14878
14879 (define-public python-send2trash
14880 (package
14881 (name "python-send2trash")
14882 (version "1.5.0")
14883 (source
14884 (origin (method git-fetch)
14885 ;; Source tarball on PyPI doesn't include tests.
14886 (uri (git-reference
14887 (url "https://github.com/hsoft/send2trash.git")
14888 (commit version)))
14889 (file-name (git-file-name name version))
14890 (sha256
14891 (base32
14892 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
14893 (build-system python-build-system)
14894 (arguments
14895 '(#:phases
14896 (modify-phases %standard-phases
14897 (add-before 'check 'pre-check
14898 (lambda _
14899 (mkdir-p "/tmp/foo")
14900 (setenv "HOME" "/tmp/foo")
14901 #t)))))
14902 (home-page "https://github.com/hsoft/send2trash")
14903 (synopsis "Send files to the user's @file{~/Trash} directory")
14904 (description "This package provides a Python library to send files to the
14905 user's @file{~/Trash} directory.")
14906 (properties `((python2-variant . ,(delay python2-send2trash))))
14907 (license license:bsd-3)))
14908
14909 (define-public python2-send2trash
14910 (package
14911 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
14912 (arguments
14913 (substitute-keyword-arguments (package-arguments python-send2trash)
14914 ((#:phases phases)
14915 `(modify-phases ,phases
14916 (add-before 'check 'setenv
14917 (lambda _
14918 (setenv "PYTHONPATH"
14919 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
14920 #t))))))))
14921
14922 (define-public python-yapf
14923 (package
14924 (name "python-yapf")
14925 (version "0.29.0")
14926 (source
14927 (origin
14928 (method url-fetch)
14929 (uri (pypi-uri "yapf" version))
14930 (sha256
14931 (base32
14932 "1pj3xzblmbssshi889b6n9hwqbjpabw6j0fimlng2sshd3226bki"))))
14933 (build-system python-build-system)
14934 (home-page "https://github.com/google/yapf")
14935 (synopsis "Formatter for Python code")
14936 (description "YAPF is a formatter for Python code. It's based off of
14937 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
14938 takes the code and reformats it to the best formatting that conforms to the
14939 style guide, even if the original code didn't violate the style guide.")
14940 (license license:asl2.0)))
14941
14942 (define-public python2-yapf
14943 (package-with-python2 python-yapf))
14944
14945 (define-public python-gyp
14946 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
14947 (revision "0"))
14948 (package
14949 (name "python-gyp")
14950 ;; Google does not release versions,
14951 ;; based on second most recent commit date.
14952 (version (git-version "0.0.0" revision commit))
14953 (source
14954 (origin
14955 ;; Google does not release tarballs,
14956 ;; git checkout is needed.
14957 (method git-fetch)
14958 (uri (git-reference
14959 (url "https://chromium.googlesource.com/external/gyp")
14960 (commit commit)))
14961 (file-name (git-file-name name version))
14962 (sha256
14963 (base32
14964 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
14965 (build-system python-build-system)
14966 (home-page "https://gyp.gsrc.io/")
14967 (synopsis "GYP is a Meta-Build system")
14968 (description
14969 "GYP builds build systems for large, cross platform applications.
14970 It can be used to generate XCode projects, Visual Studio projects, Ninja build
14971 files, and Makefiles.")
14972 (license license:bsd-3))))
14973
14974 (define-public python2-gyp
14975 (package-with-python2 python-gyp))
14976
14977 (define-public python-whatever
14978 (package
14979 (name "python-whatever")
14980 (version "0.6")
14981 (source
14982 (origin
14983 (method git-fetch)
14984 (uri (git-reference
14985 (url "https://github.com/Suor/whatever")
14986 (commit version)))
14987 (file-name (git-file-name name version))
14988 (sha256
14989 (base32 "1q7ajgqjfivxqsqgnhp4lc4p6jxyh4zprcsdbpd6dw54inaf0av5"))))
14990 (build-system python-build-system)
14991 (arguments
14992 `(#:phases
14993 (modify-phases %standard-phases
14994 (replace 'check
14995 (lambda _
14996 (invoke "py.test"))))))
14997 (native-inputs
14998 `(("python-pytest" ,python-pytest)))
14999 (home-page "http://github.com/Suor/whatever")
15000 (synopsis "Make anonymous functions by partial application of operators")
15001 (description "@code{whatever} provides an easy way to make anonymous
15002 functions by partial application of operators.")
15003 (license license:bsd-3)))
15004
15005 (define-public python2-whatever
15006 (package-with-python2 python-whatever))
15007
15008 (define-public python-funcy
15009 (package
15010 (name "python-funcy")
15011 (version "1.11")
15012 (source
15013 (origin
15014 (method git-fetch)
15015 (uri (git-reference
15016 (url "https://github.com/Suor/funcy.git")
15017 (commit version)))
15018 (sha256
15019 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
15020 (file-name (git-file-name name version))))
15021 (build-system python-build-system)
15022 (arguments
15023 `(#:phases
15024 (modify-phases %standard-phases
15025 (replace 'check
15026 (lambda _
15027 (invoke "py.test"))))))
15028 (native-inputs
15029 `(("python-pytest" ,python-pytest)
15030 ("python-whatever" ,python-whatever)))
15031 (home-page "http://github.com/Suor/funcy")
15032 (synopsis "Functional tools")
15033 (description "@code{funcy} is a library that provides functional tools.
15034 Examples are:
15035 @enumerate
15036 @item merge - Merges collections of the same type
15037 @item walk - Type-preserving map
15038 @item select - Selects a part of a collection
15039 @item take - Takes the first n items of a collection
15040 @item first - Takes the first item of a collection
15041 @item remove - Predicated-removes items of a collection
15042 @item concat - Concatenates two collections
15043 @item flatten - Flattens a collection with subcollections
15044 @item distinct - Returns only distinct items
15045 @item split - Predicated-splits a collection
15046 @item split_at - Splits a collection at a given item
15047 @item group_by - Groups items by group
15048 @item pairwise - Pairs off adjacent items
15049 @item partial - Partially-applies a function
15050 @item curry - Curries a function
15051 @item compose - Composes functions
15052 @item complement - Complements a predicate
15053 @item all_fn - \"all\" with predicate
15054 @end enumerate")
15055 (license license:bsd-3)))
15056
15057 (define-public python2-funcy
15058 (package-with-python2 python-funcy))
15059
15060 (define-public python-isoweek
15061 (package
15062 (name "python-isoweek")
15063 (version "1.3.3")
15064 (source
15065 (origin
15066 (method url-fetch)
15067 (uri (pypi-uri "isoweek" version))
15068 (sha256
15069 (base32
15070 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
15071 (build-system python-build-system)
15072 (home-page "https://github.com/gisle/isoweek")
15073 (synopsis "Objects representing a week")
15074 (description "The @code{isoweek} module provide the class Week that
15075 implements the week definition of ISO 8601. This standard also defines
15076 a notation for identifying weeks; yyyyWww (where the W is a literal).
15077 Week instances stringify to this form.")
15078 (license license:bsd-3)))
15079
15080 (define-public python2-isoweek
15081 (package-with-python2 python-isoweek))
15082
15083 (define-public python-tokenize-rt
15084 (package
15085 (name "python-tokenize-rt")
15086 (version "2.0.1")
15087 (source
15088 (origin
15089 (method url-fetch)
15090 (uri (pypi-uri "tokenize-rt" version))
15091 (sha256
15092 (base32
15093 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
15094 (build-system python-build-system)
15095 (home-page "https://github.com/asottile/tokenize-rt")
15096 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
15097 (description
15098 "This Python library is a wrapper around @code{tokenize} from the Python
15099 standard library. It provides two additional tokens @code{ESCAPED_NL} and
15100 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
15101 and @code{tokens_to_src} to roundtrip.")
15102 (license license:expat)))
15103
15104 (define-public python-future-fstrings
15105 (package
15106 (name "python-future-fstrings")
15107 (version "0.4.1")
15108 (source
15109 (origin
15110 (method url-fetch)
15111 (uri (pypi-uri "future_fstrings" version))
15112 (sha256
15113 (base32
15114 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
15115 (build-system python-build-system)
15116 (propagated-inputs
15117 `(("python-tokenize-rt" ,python-tokenize-rt)))
15118 (home-page "https://github.com/asottile/future-fstrings")
15119 (synopsis "Backport of fstrings to Python < 3.6")
15120 (description
15121 "This package provides a UTF-8 compatible encoding
15122 @code{future_fstrings}, which performs source manipulation. It decodes the
15123 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
15124 @code{f} strings.")
15125 (license license:expat)))
15126
15127 (define-public python-typed-ast
15128 (package
15129 (name "python-typed-ast")
15130 (version "1.4.0")
15131 (source
15132 (origin
15133 (method git-fetch)
15134 (uri (git-reference
15135 (url "https://github.com/python/typed_ast.git")
15136 (commit version)))
15137 (sha256
15138 (base32 "0l0hz809f7i356kmqkvfsaswiidb98j9hs9rrjnfawzqcbffzgyb"))
15139 (file-name (git-file-name name version))))
15140 (build-system python-build-system)
15141 (arguments
15142 `(#:modules ((guix build utils)
15143 (guix build python-build-system)
15144 (ice-9 ftw)
15145 (srfi srfi-1)
15146 (srfi srfi-26))
15147 #:phases
15148 (modify-phases %standard-phases
15149 (replace 'check
15150 (lambda _
15151 (let ((cwd (getcwd)))
15152 (setenv "PYTHONPATH"
15153 (string-append cwd "/build/"
15154 (find (cut string-prefix? "lib" <>)
15155 (scandir (string-append cwd "/build")))
15156 ":"
15157 (getenv "PYTHONPATH"))))
15158 (invoke "pytest")
15159 #t)))))
15160 (native-inputs `(("python-pytest" ,python-pytest)))
15161 (home-page "https://github.com/python/typed_ast")
15162 (synopsis "Fork of Python @code{ast} modules with type comment support")
15163 (description "This package provides a parser similar to the standard
15164 @code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
15165 include PEP 484 type comments and are independent of the version of Python
15166 under which they are run. The @code{typed_ast} parsers produce the standard
15167 Python AST (plus type comments), and are both fast and correct, as they are
15168 based on the CPython 2.7 and 3.7 parsers.")
15169 ;; See the file "LICENSE" for the details.
15170 (license (list license:psfl
15171 license:asl2.0
15172 license:expat)))) ;ast27/Parser/spark.py
15173
15174 (define-public python-typing
15175 (package
15176 (name "python-typing")
15177 (version "3.7.4.1")
15178 (source
15179 (origin
15180 (method url-fetch)
15181 (uri (pypi-uri "typing" version))
15182 (sha256
15183 (base32
15184 "08xs7s5pyq99hbrzw23inczmidz90krvpv9q5p1qrvh6yzrydpwi"))))
15185 (build-system python-build-system)
15186 (home-page "https://docs.python.org/3/library/typing.html")
15187 (synopsis "Type hints for Python")
15188 (description "This is a backport of the standard library @code{typing}
15189 module to Python versions older than 3.5. Typing defines a standard notation
15190 for Python function and variable type annotations. The notation can be used
15191 for documenting code in a concise, standard format, and it has been designed
15192 to also be used by static and runtime type checkers, static analyzers, IDEs
15193 and other tools.")
15194 (license license:psfl)))
15195
15196 (define-public python2-typing
15197 (package-with-python2 python-typing))
15198
15199 (define-public python-typing-extensions
15200 (package
15201 (name "python-typing-extensions")
15202 (version "3.7.2")
15203 (source
15204 (origin
15205 (method url-fetch)
15206 (uri (pypi-uri "typing_extensions" version))
15207 (sha256
15208 (base32
15209 "0wfsv71pvkyf2na938l579jh0v3kzl6g744ijgnahcwd4d9x0b7v"))))
15210 (build-system python-build-system)
15211 (home-page
15212 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
15213 (synopsis "Experimental type hints for Python")
15214 (description
15215 "The typing_extensions module contains additional @code{typing} hints not
15216 yet present in the of the @code{typing} standard library.
15217 Included are implementations of:
15218 @enumerate
15219 @item ClassVar
15220 @item ContextManager
15221 @item Counter
15222 @item DefaultDict
15223 @item Deque
15224 @item NewType
15225 @item NoReturn
15226 @item overload
15227 @item Protocol
15228 @item runtime
15229 @item Text
15230 @item Type
15231 @item TYPE_CHECKING
15232 @item AsyncGenerator
15233 @end enumerate\n")
15234 (license license:psfl)))
15235
15236 (define-public bpython
15237 (package
15238 (name "bpython")
15239 (version "0.18")
15240 (source
15241 (origin
15242 (method url-fetch)
15243 (uri (pypi-uri "bpython" version))
15244 (sha256
15245 (base32 "1hl6frgvr2lqaxqczl8amg9xih32b3gzv429vs0qrjb8wpdj1k2n"))))
15246 (build-system python-build-system)
15247 (arguments
15248 `(#:phases
15249 (modify-phases %standard-phases
15250 (add-after 'unpack 'remove-failing-test
15251 (lambda _
15252 ;; Remove failing test. FIXME: make it pass
15253 (delete-file "bpython/test/test_args.py")
15254 #t))
15255 (add-after 'wrap 'add-aliases
15256 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
15257 (lambda* (#:key outputs #:allow-other-keys)
15258 (let ((out (assoc-ref outputs "out")))
15259 (for-each
15260 (lambda (old new)
15261 (symlink old (string-append out "/bin/" new)))
15262 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
15263 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
15264 #t)))))
15265 (propagated-inputs
15266 `(("python-pygments" ,python-pygments)
15267 ("python-requests" ,python-requests)
15268 ("python-babel" ,python-babel) ; optional, for internationalization
15269 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
15270 ("python-greenlet" ,python-greenlet)
15271 ("python-urwid" ,python-urwid) ; for bpython-urwid only
15272 ("python-six" ,python-six)))
15273 (native-inputs
15274 `(("python-sphinx" ,python-sphinx)
15275 ("python-mock" ,python-mock)))
15276 (home-page "https://bpython-interpreter.org/")
15277 (synopsis "Fancy interface to the Python interpreter")
15278 (description "Bpython is a fancy interface to the Python
15279 interpreter. bpython's main features are
15280
15281 @enumerate
15282 @item in-line syntax highlighting,
15283 @item readline-like autocomplete with suggestions displayed as you type,
15284 @item expected parameter list for any Python function,
15285 @item \"rewind\" function to pop the last line of code from memory and
15286 re-evaluate,
15287 @item send the code you've entered off to a pastebin,
15288 @item save the code you've entered to a file, and
15289 @item auto-indentation.
15290 @end enumerate")
15291 (license license:expat)))
15292
15293 (define-public bpython2
15294 (let ((base (package-with-python2
15295 (strip-python2-variant bpython))))
15296 (package (inherit base)
15297 (name "bpython2")
15298 (arguments
15299 `(#:python ,python-2
15300 #:phases
15301 (modify-phases %standard-phases
15302 (add-after 'unpack 'remove-failing-test
15303 (lambda _
15304 ;; Remove failing test. FIXME: make it pass
15305 (delete-file "bpython/test/test_args.py")
15306 ;; Disable failing test-cases (renaming inhibits they are
15307 ;; discovered)
15308 (substitute* "bpython/test/test_curtsies_repl.py"
15309 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
15310 (string-append a "xxx_off_" b))
15311 (("^(\\s*def )(test_complex\\W)" _ a b)
15312 (string-append a "xxx_off_" b)))
15313 #t))
15314 (add-before 'build 'rename-scripts
15315 ;; rename the scripts to bypthon2, bpdb2, etc.
15316 (lambda _
15317 (substitute* "setup.py"
15318 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
15319 (string-append name "2" rest "\n"))
15320 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
15321 (string-append name "2" (or sub "") rest "\n")))
15322 #t))))))))
15323
15324 (define-public python-pyinotify
15325 (package
15326 (name "python-pyinotify")
15327 (version "0.9.6")
15328 (source (origin
15329 (method url-fetch)
15330 (uri (pypi-uri "pyinotify" version))
15331 (sha256
15332 (base32
15333 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
15334 (build-system python-build-system)
15335 (arguments `(#:tests? #f)) ;no tests
15336 (home-page "https://github.com/seb-m/pyinotify")
15337 (synopsis "Python library for monitoring inotify events")
15338 (description
15339 "@code{pyinotify} provides a Python interface for monitoring
15340 file system events on Linux.")
15341 (license license:expat)))
15342
15343 (define-public python2-pyinotify
15344 (package-with-python2 python-pyinotify))
15345
15346 ;; Ada parser uses this version.
15347 (define-public python2-quex-0.67.3
15348 (package
15349 (name "python2-quex")
15350 (version "0.67.3")
15351 (source
15352 (origin
15353 (method url-fetch)
15354 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
15355 (version-major+minor version)
15356 "/quex-" version ".zip"))
15357 (sha256
15358 (base32
15359 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
15360 (build-system python-build-system)
15361 (native-inputs
15362 `(("unzip" ,unzip)))
15363 (arguments
15364 `(#:python ,python-2
15365 #:tests? #f
15366 #:phases
15367 (modify-phases %standard-phases
15368 (delete 'configure)
15369 (delete 'build)
15370 (replace 'install
15371 (lambda* (#:key outputs #:allow-other-keys)
15372 (let* ((out (assoc-ref outputs "out"))
15373 (share/quex (string-append out "/share/quex"))
15374 (bin (string-append out "/bin")))
15375 (copy-recursively "." share/quex)
15376 (mkdir-p bin)
15377 (symlink (string-append share/quex "/quex-exe.py")
15378 (string-append bin "/quex"))
15379 #t))))))
15380 (native-search-paths
15381 (list (search-path-specification
15382 (variable "QUEX_PATH")
15383 (files '("share/quex")))))
15384 (home-page "http://quex.sourceforge.net/")
15385 (synopsis "Lexical analyzer generator in Python")
15386 (description "@code{quex} is a lexical analyzer generator in Python.")
15387 (license license:lgpl2.1+))) ; Non-military
15388
15389 (define-public python2-quex
15390 (package (inherit python2-quex-0.67.3)
15391 (name "python2-quex")
15392 (version "0.68.1")
15393 (source
15394 (origin
15395 (method url-fetch)
15396 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
15397 (sha256
15398 (base32
15399 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
15400 (file-name (string-append name "-" version ".tar.gz"))))))
15401
15402 (define-public python-more-itertools
15403 (package
15404 (name "python-more-itertools")
15405 (version "8.2.0")
15406 (source
15407 (origin
15408 (method url-fetch)
15409 (uri (pypi-uri "more-itertools" version))
15410 (sha256
15411 (base32
15412 "01x5nwm1zxmnd06cllbdd095xxc2nd25ing1a726m2kd30rbkpdi"))))
15413 (build-system python-build-system)
15414 (home-page "https://github.com/erikrose/more-itertools")
15415 (synopsis "More routines for operating on iterables, beyond itertools")
15416 (description "Python's built-in @code{itertools} module implements a
15417 number of iterator building blocks inspired by constructs from APL, Haskell,
15418 and SML. @code{more-itertools} includes additional building blocks for
15419 working with iterables.")
15420 (properties `((python2-variant . ,(delay python2-more-itertools))))
15421 (license license:expat)))
15422
15423 ;; The 5.x series are the last versions supporting Python 2.7.
15424 (define-public python2-more-itertools
15425 (package
15426 (inherit python-more-itertools)
15427 (name "python2-more-itertools")
15428 (version "5.0.0")
15429 (source (origin
15430 (method url-fetch)
15431 (uri (pypi-uri "more-itertools" version))
15432 (sha256
15433 (base32
15434 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
15435 (arguments
15436 `(#:python ,python-2))
15437 (propagated-inputs
15438 `(("python2-six" ,python2-six-bootstrap)))))
15439
15440 (define-public python-latexcodec
15441 (package
15442 (name "python-latexcodec")
15443 (version "1.0.7")
15444 (source
15445 (origin
15446 (method url-fetch)
15447 (uri (pypi-uri "latexcodec" version))
15448 (sha256
15449 (base32 "0wnp3yqcgx0rpy8dz51vh75lbp2qif67da19zi7m3ca98n887hgb"))))
15450 (build-system python-build-system)
15451 (inputs
15452 `(("python-six" ,python-six)))
15453 (home-page "https://readthedocs.org/projects/latexcodec/")
15454 (synopsis "Work with LaTeX code in Python")
15455 (description "Lexer and codec to work with LaTeX code in Python.")
15456 (license license:expat)))
15457
15458 (define-public python-pybtex
15459 (package
15460 (name "python-pybtex")
15461 (version "0.22.2")
15462 (source
15463 (origin
15464 (method url-fetch)
15465 (uri (pypi-uri "pybtex" version))
15466 (sha256
15467 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
15468 (build-system python-build-system)
15469 (native-inputs
15470 `(("python-nose" ,python-nose)))
15471 (inputs
15472 `(("python-latexcodec" ,python-latexcodec)
15473 ("python-pyyaml" ,python-pyyaml)
15474 ("python-six" ,python-six)))
15475 (arguments
15476 `(#:test-target "nosetests"))
15477 (home-page "https://pybtex.org/")
15478 (synopsis "BibTeX-compatible bibliography processor")
15479 (description "Pybtex is a BibTeX-compatible bibliography processor written
15480 in Python. You can simply type pybtex instead of bibtex.")
15481 (license license:expat)))
15482
15483 (define-public python-onetimepass
15484 (package
15485 (name "python-onetimepass")
15486 (version "1.0.1")
15487 (source
15488 (origin
15489 (method url-fetch)
15490 (uri (pypi-uri "onetimepass" version))
15491 (sha256
15492 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
15493 (build-system python-build-system)
15494 (propagated-inputs `(("python-six" ,python-six)))
15495 (home-page "https://github.com/tadeck/onetimepass/")
15496 (synopsis "One-time password library")
15497 (description "Python one-time password library for HMAC-based (HOTP) and
15498 time-based (TOTP) passwords.")
15499 (license license:expat)))
15500
15501 (define-public python-parso
15502 (package
15503 (name "python-parso")
15504 (version "0.5.2")
15505 (source
15506 (origin
15507 (method url-fetch)
15508 (uri (pypi-uri "parso" version))
15509 (sha256
15510 (base32
15511 "1qgvrkpma7vylrk047mxxvqd66nwqk978n3ig2w8iz9m3bgjbksm"))))
15512 (native-inputs
15513 `(("python-pytest" ,python-pytest)))
15514 (build-system python-build-system)
15515 (arguments
15516 `(#:phases (modify-phases %standard-phases
15517 (replace 'check
15518 (lambda _ (invoke "pytest" "-vv"))))))
15519 (home-page "https://github.com/davidhalter/parso")
15520 (synopsis "Python Parser")
15521 (description "Parso is a Python parser that supports error recovery and
15522 round-trip parsing for different Python versions (in multiple Python versions).
15523 Parso is also able to list multiple syntax errors in your Python file.")
15524 (license license:expat)))
15525
15526 (define-public python2-parso
15527 (package-with-python2 python-parso))
15528
15529 (define-public python-async-generator
15530 (package
15531 (name "python-async-generator")
15532 (version "1.10")
15533 (source
15534 (origin
15535 (method url-fetch)
15536 (uri (pypi-uri "async_generator" version))
15537 (sha256
15538 (base32
15539 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
15540 (build-system python-build-system)
15541 (native-inputs
15542 `(("python-pytest" ,python-pytest)))
15543 (home-page "https://github.com/python-trio/async_generator")
15544 (synopsis "Async generators and context managers for Python 3.5+")
15545 (description "@code{async_generator} back-ports Python 3.6's native async
15546 generators and Python 3.7's context managers into Python 3.5.")
15547 ;; Dual licensed.
15548 (license (list license:expat license:asl2.0))))
15549
15550 (define-public python-async-timeout
15551 (package
15552 (name "python-async-timeout")
15553 (version "3.0.1")
15554 (source
15555 (origin
15556 (method url-fetch)
15557 (uri (pypi-uri "async-timeout" version))
15558 (sha256
15559 (base32
15560 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
15561 (build-system python-build-system)
15562 (home-page "https://github.com/aio-libs/async_timeout/")
15563 (synopsis "Timeout context manager for asyncio programs")
15564 (description "@code{async-timeout} provides a timeout timeout context
15565 manager compatible with @code{asyncio}.")
15566 (license license:asl2.0)))
15567
15568 (define-public python-glob2
15569 (package
15570 (name "python-glob2")
15571 (version "0.7")
15572 (source
15573 (origin
15574 (method git-fetch)
15575 (uri (git-reference
15576 (url "https://github.com/miracle2k/python-glob2.git")
15577 (commit (string-append "v" version))))
15578 (file-name (git-file-name name version))
15579 (sha256
15580 (base32 "160nh2ay9lw2hi0rixpzb2k87r6ql56k0j2cm87lqz8xc8zbw919"))))
15581 (build-system python-build-system)
15582 (home-page "https://github.com/miracle2k/python-glob2/")
15583 (synopsis "Extended Version of the python buildin glob module")
15584 (description "This is an extended version of the Python
15585 @url{http://docs.python.org/library/glob.html, built-in glob module} which
15586 adds:
15587
15588 @itemize
15589 @item The ability to capture the text matched by glob patterns, and return
15590 those matches alongside the file names.
15591 @item A recursive @code{**} globbing syntax, akin for example to the
15592 @code{globstar} option of Bash.
15593 @item The ability to replace the file system functions used, in order to glob
15594 on virtual file systems.
15595 @item Compatible with Python 2 and Python 3 (tested with 3.3).
15596 @end itemize
15597
15598 Glob2 currently based on the glob code from Python 3.3.1.")
15599 (license license:bsd-2)))
15600
15601 (define-public python2-glob2
15602 (package-with-python2 python-glob2))
15603
15604 (define-public python-gipc
15605 (package
15606 (name "python-gipc")
15607 (version "0.6.0")
15608 (source
15609 (origin
15610 (method url-fetch)
15611 (uri (pypi-uri "gipc" version ".zip"))
15612 (sha256
15613 (base32
15614 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
15615 (build-system python-build-system)
15616 (native-inputs
15617 `(("unzip" ,unzip)))
15618 (propagated-inputs
15619 `(("python-gevent" ,python-gevent)))
15620 (home-page "https://gehrcke.de/gipc/")
15621 (synopsis "Child process management in the context of gevent")
15622 (description "Usage of Python's multiprocessing package in a
15623 gevent-powered application may raise problems. With @code{gipc},
15624 process-based child processes can safely be created anywhere within a
15625 gevent-powered application.")
15626 (license license:expat)))
15627
15628 (define-public python2-gipc
15629 (package-with-python2 python-gipc))
15630
15631 (define-public python-fusepy
15632 (package
15633 (name "python-fusepy")
15634 (version "2.0.4")
15635 (source
15636 (origin
15637 (method url-fetch)
15638 (uri (pypi-uri "fusepy" version))
15639 (sha256
15640 (base32
15641 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
15642 (build-system python-build-system)
15643 (arguments
15644 `(#:phases
15645 (modify-phases %standard-phases
15646 (add-before 'build 'set-library-file-name
15647 (lambda* (#:key inputs #:allow-other-keys)
15648 (let ((fuse (assoc-ref inputs "fuse")))
15649 (substitute* "fuse.py"
15650 (("find_library\\('fuse'\\)")
15651 (string-append "'" fuse "/lib/libfuse.so'")))
15652 #t))))))
15653 (propagated-inputs
15654 `(("fuse" ,fuse)))
15655 (home-page "https://github.com/fusepy/fusepy")
15656 (synopsis "Simple ctypes bindings for FUSE")
15657 (description "Python module that provides a simple interface to FUSE and
15658 MacFUSE. The binding is created using the standard @code{ctypes} library.")
15659 (license license:isc)))
15660
15661 (define-public python2-fusepy
15662 (package-with-python2 python-fusepy))
15663
15664 (define-public python2-gdrivefs
15665 (package
15666 (name "python2-gdrivefs")
15667 (version "0.14.9")
15668 (source
15669 (origin
15670 (method url-fetch)
15671 (uri (pypi-uri "gdrivefs" version))
15672 (sha256
15673 (base32
15674 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
15675 (build-system python-build-system)
15676 (arguments
15677 `(#:python ,python-2
15678 #:phases
15679 (modify-phases %standard-phases
15680 (add-before 'build 'patch-setup-py
15681 (lambda _
15682 ;; Update requirements from dependency==version
15683 ;; to dependency>=version
15684 (substitute* "gdrivefs/resources/requirements.txt"
15685 (("==") ">="))
15686 #t)))))
15687 (native-inputs
15688 `(("python2-gipc" ,python2-gipc)
15689 ("python2-gevent" ,python2-gevent)
15690 ("python2-greenlet" ,python2-greenlet)
15691 ("python2-httplib2" ,python2-httplib2)
15692 ("python2-uritemplate" ,python2-uritemplate)
15693 ("python2-oauth2client" ,python2-oauth2client)
15694 ("python2-six" ,python2-six)))
15695 (propagated-inputs
15696 `(("python2-dateutil" ,python2-dateutil)
15697 ("python2-fusepy" ,python2-fusepy)
15698 ("python2-google-api-client" ,python2-google-api-client)))
15699 (home-page "https://github.com/dsoprea/GDriveFS")
15700 (synopsis "Mount Google Drive as a local file system")
15701 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
15702 under Python 2.7.")
15703 (license license:gpl2)))
15704
15705 (define-public pybind11
15706 (package
15707 (name "pybind11")
15708 (version "2.4.3")
15709 (source (origin
15710 (method git-fetch)
15711 (uri (git-reference
15712 (url "https://github.com/pybind/pybind11.git")
15713 (commit (string-append "v" version))))
15714 (sha256
15715 (base32
15716 "0k89w4bsfbpzw963ykg1cyszi3h3nk393qd31m6y46pcfxkqh4rd"))
15717 (file-name (git-file-name name version))))
15718 (build-system cmake-build-system)
15719 (native-inputs
15720 `(("python" ,python-wrapper)
15721
15722 ;; The following dependencies are used for tests.
15723 ("python-pytest" ,python-pytest)
15724 ("catch" ,catch-framework2-1)
15725 ("eigen" ,eigen)))
15726 (arguments
15727 `(#:configure-flags
15728 (list (string-append "-DCATCH_INCLUDE_DIR="
15729 (assoc-ref %build-inputs "catch")
15730 "/include/catch"))
15731
15732 #:phases (modify-phases %standard-phases
15733 (add-after 'install 'install-python
15734 (lambda* (#:key outputs #:allow-other-keys)
15735 (let ((out (assoc-ref outputs "out")))
15736 (with-directory-excursion "../source"
15737 (setenv "PYBIND11_USE_CMAKE" "yes")
15738 (invoke "python" "setup.py" "install"
15739 "--single-version-externally-managed"
15740 "--root=/"
15741 (string-append "--prefix=" out)))))))
15742
15743 #:test-target "check"))
15744 (home-page "https://github.com/pybind/pybind11/")
15745 (synopsis "Seamless operability between C++11 and Python")
15746 (description
15747 "@code{pybind11} is a lightweight header-only library that exposes C++
15748 types in Python and vice versa, mainly to create Python bindings of existing
15749 C++ code. Its goals and syntax are similar to the @code{Boost.Python}
15750 library: to minimize boilerplate code in traditional extension modules by
15751 inferring type information using compile-time introspection.")
15752 (license license:bsd-3)))
15753
15754 (define-public python-fasteners
15755 (package
15756 (name "python-fasteners")
15757 (version "0.14.1")
15758 (source
15759 (origin
15760 (method url-fetch)
15761 (uri (pypi-uri "fasteners" version))
15762 (sha256
15763 (base32
15764 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
15765 (build-system python-build-system)
15766 (propagated-inputs
15767 `(("python-monotonic" ,python-monotonic)
15768 ("python-six" ,python-six)
15769 ("python-testtools" ,python-testtools)))
15770 (home-page "https://github.com/harlowja/fasteners")
15771 (synopsis "Python package that provides useful locks")
15772 (description
15773 "This package provides a Python program that provides following locks:
15774
15775 @itemize
15776 @item Locking decorator
15777 @item Reader-writer locks
15778 @item Inter-process locks
15779 @item Generic helpers
15780 @end itemize\n")
15781 (properties `((python2-variant . ,(delay python2-fasteners))))
15782 (license license:asl2.0)))
15783
15784 (define-public python2-fasteners
15785 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
15786 (package
15787 (inherit base)
15788 (propagated-inputs
15789 `(("python2-futures" ,python2-futures)
15790 ,@(package-propagated-inputs base))))))
15791
15792 (define-public python-requests-file
15793 (package
15794 (name "python-requests-file")
15795 (version "1.4.3")
15796 (source
15797 (origin
15798 (method url-fetch)
15799 (uri (pypi-uri "requests-file" version))
15800 (sha256
15801 (base32
15802 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
15803 (build-system python-build-system)
15804 (propagated-inputs
15805 `(("python-requests" ,python-requests)
15806 ("python-six" ,python-six)))
15807 (home-page
15808 "https://github.com/dashea/requests-file")
15809 (synopsis "File transport adapter for Requests")
15810 (description
15811 "Requests-File is a transport adapter for use with the Requests Python
15812 library to allow local file system access via @code{file://} URLs.")
15813 (license license:asl2.0)))
15814
15815 (define-public python2-requests-file
15816 (package-with-python2 python-requests-file))
15817
15818 (define-public python-tldextract
15819 (package
15820 (name "python-tldextract")
15821 (version "2.2.0")
15822 (source
15823 (origin
15824 (method url-fetch)
15825 (uri (pypi-uri "tldextract" version))
15826 (sha256
15827 (base32
15828 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
15829 (build-system python-build-system)
15830 (native-inputs
15831 `(("python-pytest" ,python-pytest)
15832 ("python-responses" ,python-responses)))
15833 (propagated-inputs
15834 `(("python-idna" ,python-idna)
15835 ("python-requests" ,python-requests)
15836 ("python-requests-file" ,python-requests-file)))
15837 (home-page
15838 "https://github.com/john-kurkowski/tldextract")
15839 (synopsis
15840 "Separate the TLD from the registered domain and subdomains of a URL")
15841 (description
15842 "TLDExtract accurately separates the TLD from the registered domain and
15843 subdomains of a URL, using the Public Suffix List. By default, this includes
15844 the public ICANN TLDs and their exceptions. It can optionally support the
15845 Public Suffix List's private domains as well.")
15846 (license license:bsd-3)))
15847
15848 (define-public python2-tldextract
15849 (package-with-python2 python-tldextract))
15850
15851 (define-public python-pynamecheap
15852 (package
15853 (name "python-pynamecheap")
15854 (version "0.0.3")
15855 (source
15856 (origin
15857 (method url-fetch)
15858 (uri (pypi-uri "PyNamecheap" version))
15859 (sha256
15860 (base32
15861 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
15862 (build-system python-build-system)
15863 (propagated-inputs
15864 `(("python-requests" ,python-requests)))
15865 (home-page
15866 "https://github.com/Bemmu/PyNamecheap")
15867 (synopsis
15868 "Namecheap API client in Python")
15869 (description
15870 "PyNamecheap is a Namecheap API client in Python.")
15871 (license license:expat)))
15872
15873 (define-public python2-pynamecheap
15874 (package-with-python2 python-pynamecheap))
15875
15876 (define-public python-dns-lexicon
15877 (package
15878 (name "python-dns-lexicon")
15879 (version "2.4.0")
15880 (source
15881 (origin
15882 (method url-fetch)
15883 (uri (pypi-uri "dns-lexicon" version))
15884 (sha256
15885 (base32
15886 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
15887 (build-system python-build-system)
15888 (arguments
15889 `(#:tests? #f)) ;requires internet access
15890 (propagated-inputs
15891 `(("python-future" ,python-future)
15892 ("python-pynamecheap" ,python-pynamecheap)
15893 ("python-requests" ,python-requests)
15894 ("python-tldextract" ,python-tldextract)
15895 ("python-urllib3" ,python-urllib3)))
15896 (home-page "https://github.com/AnalogJ/lexicon")
15897 (synopsis
15898 "Manipulate DNS records on various DNS providers")
15899 (description
15900 "Lexicon provides a way to manipulate DNS records on multiple DNS
15901 providers in a standardized way. It has a CLI but it can also be used as a
15902 Python library. It was designed to be used in automation, specifically with
15903 Let's Encrypt.")
15904 (license license:expat)))
15905
15906 (define-public python2-dns-lexicon
15907 (package-with-python2 python-dns-lexicon))
15908
15909 (define-public python-commandlines
15910 (package
15911 (name "python-commandlines")
15912 (version "0.4.1")
15913 (source
15914 (origin
15915 (method url-fetch)
15916 (uri (pypi-uri "commandlines" version))
15917 (sha256
15918 (base32
15919 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
15920 (build-system python-build-system)
15921 (home-page "https://github.com/chrissimpkins/commandlines")
15922 (synopsis "Command line argument to object parsing library")
15923 (description
15924 "@code{Commandlines} is a Python library for command line application
15925 development that supports command line argument parsing, command string
15926 validation testing and application logic.")
15927 (license license:expat)))
15928
15929 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
15930 ;; python-numba. They have a very unflexible relationship.
15931 (define-public python-numba
15932 (package
15933 (name "python-numba")
15934 (version "0.46.0")
15935 (source
15936 (origin
15937 (method url-fetch)
15938 (uri (pypi-uri "numba" version))
15939 (sha256
15940 (base32
15941 "1vnfzcq6fcnkmdms6114d49awvvj5181fl7z1wlha27qc2paxjy2"))))
15942 (build-system python-build-system)
15943 (arguments
15944 `(#:modules ((guix build utils)
15945 (guix build python-build-system)
15946 (ice-9 ftw)
15947 (srfi srfi-1)
15948 (srfi srfi-26))
15949 #:phases
15950 (modify-phases %standard-phases
15951 (add-after 'unpack 'disable-proprietary-features
15952 (lambda _
15953 (setenv "NUMBA_DISABLE_HSA" "1")
15954 (setenv "NUMBA_DISABLE_CUDA" "1")
15955 #t))
15956 (add-after 'unpack 'remove-failing-tests
15957 (lambda _
15958 ;; FIXME: These tests fail for unknown reasons:
15959 ;; test_non_writable_pycache, test_non_creatable_pycache, and
15960 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
15961 (substitute* "numba/tests/test_dispatcher.py"
15962 (("def test(_non_writable_pycache)" _ m)
15963 (string-append "def guix_skip" m))
15964 (("def test(_non_creatable_pycache)" _ m)
15965 (string-append "def guix_skip" m))
15966 (("def test(_frozen)" _ m)
15967 (string-append "def guix_skip" m)))
15968
15969 ;; These tests fail because we don't run the tests from the build
15970 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
15971 ;; They are in numba.tests.test_pycc.TestDistutilsSupport.
15972 (substitute* "numba/tests/test_pycc.py"
15973 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
15974 (string-append "def guix_skip" m)))
15975
15976 ;; These tests fail because our version of Python does not have
15977 ;; a recognizable front-end for the Numba distribution to use
15978 ;; to check against.
15979 (substitute* "numba/tests/test_entrypoints.py"
15980 (("def test(_init_entrypoint)" _ m)
15981 (string-append "def guix_skip" m)))
15982 (substitute* "numba/tests/test_jitclasses.py"
15983 (("def test(_jitclass_longlabel_not_truncated)" _ m)
15984 (string-append "def guix_skip" m)))
15985 #t))
15986 (replace 'check
15987 (lambda _
15988 (let ((cwd (getcwd)))
15989 (setenv "PYTHONPATH"
15990 (string-append cwd "/build/"
15991 (find (cut string-prefix? "lib" <>)
15992 (scandir (string-append cwd "/build")))
15993 ":"
15994 (getenv "PYTHONPATH")))
15995 ;; Something is wrong with the PYTHONPATH when running the
15996 ;; tests from the build directory, as it complains about not being
15997 ;; able to import certain modules.
15998 (with-directory-excursion "/tmp"
15999 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
16000 #t)))))
16001 (propagated-inputs
16002 `(("python-llvmlite" ,python-llvmlite)
16003 ("python-numpy" ,python-numpy)
16004 ("python-singledispatch" ,python-singledispatch)))
16005 ;; Needed for tests.
16006 (inputs
16007 `(("python-jinja2" ,python-jinja2)
16008 ("python-pygments" ,python-pygments)))
16009 (home-page "https://numba.pydata.org")
16010 (synopsis "Compile Python code using LLVM")
16011 (description "Numba gives you the power to speed up your applications with
16012 high performance functions written directly in Python. With a few
16013 annotations, array-oriented and math-heavy Python code can be just-in-time
16014 compiled to native machine instructions, similar in performance to C, C++ and
16015 Fortran, without having to switch languages or Python interpreters.
16016
16017 Numba works by generating optimized machine code using the LLVM compiler
16018 infrastructure at import time, runtime, or statically (using the included pycc
16019 tool).")
16020 (license license:bsd-3)))
16021
16022 (define-public python-numcodecs
16023 (package
16024 (name "python-numcodecs")
16025 (version "0.6.4")
16026 (source
16027 (origin
16028 (method url-fetch)
16029 (uri (pypi-uri "numcodecs" version))
16030 (sha256
16031 (base32
16032 "0kbfr8pl3x9glsypbq8hzim003f16ml1b1cvgrh4w1sdvgal6j7g"))))
16033 (build-system python-build-system)
16034 (propagated-inputs
16035 `(("python-numpy" ,python-numpy)
16036 ("python-msgpack" ,python-msgpack)))
16037 (native-inputs
16038 `(("python-pytest" ,python-pytest)
16039 ("python-setuptools-scm" ,python-setuptools-scm)))
16040 (home-page "https://github.com/zarr-developers/numcodecs")
16041 (synopsis "Buffer compression and transformation codecs")
16042 (description
16043 "This Python package provides buffer compression and transformation
16044 codecs for use in data storage and communication applications.")
16045 (license license:expat)))
16046
16047 (define-public python-asciitree
16048 (package
16049 (name "python-asciitree")
16050 (version "0.3.3")
16051 (source
16052 (origin
16053 (method url-fetch)
16054 (uri (pypi-uri "asciitree" version))
16055 (sha256
16056 (base32
16057 "0vhgri2m2xlnibhz4xwn4hpbc7xacisxjqrk6k5kyppq96vbk92a"))))
16058 (build-system python-build-system)
16059 (home-page "https://github.com/mbr/asciitree")
16060 (synopsis "Draws ASCII trees")
16061 (description "This package draws tree structures using characters.")
16062 (license license:expat)))
16063
16064 (define-public python-zarr
16065 (package
16066 (name "python-zarr")
16067 (version "2.4.0")
16068 (source
16069 (origin
16070 (method url-fetch)
16071 (uri (pypi-uri "zarr" version))
16072 (sha256
16073 (base32
16074 "026n3sjzjv2gmwx6y72b8ij0hk42bc8zdbvfj5gdqzd4i6wj3ajk"))))
16075 (build-system python-build-system)
16076 (arguments
16077 `(#:phases
16078 (modify-phases %standard-phases
16079 (add-after 'unpack 'disable-service-tests
16080 (lambda _
16081 (setenv "ZARR_TEST_ABS" "0")
16082 (setenv "ZARR_TEST_MONGO" "0")
16083 (setenv "ZARR_TEST_REDIS" "0")
16084 #t))
16085 (replace 'check
16086 (lambda _
16087 (invoke "pytest" "-vv" "-k" "not lmdb")
16088 #t)))))
16089 (propagated-inputs
16090 `(("python-asciitree" ,python-asciitree)
16091 ("python-fasteners" ,python-fasteners)
16092 ("python-numcodecs" ,python-numcodecs)
16093 ("python-numpy" ,python-numpy)))
16094 (native-inputs
16095 `(("python-pytest" ,python-pytest)
16096 ("python-setuptools-scm" ,python-setuptools-scm)))
16097 (home-page "https://github.com/zarr-developers/zarr-python")
16098 (synopsis "Chunked, compressed, N-dimensional arrays for Python")
16099 (description
16100 "This package provides an implementation of chunked, compressed,
16101 N-dimensional arrays for Python.")
16102 (license license:expat)))
16103
16104 (define-public python-anndata
16105 (package
16106 (name "python-anndata")
16107 (version "0.7.1")
16108 (source
16109 (origin
16110 (method url-fetch)
16111 (uri (pypi-uri "anndata" version))
16112 (sha256
16113 (base32
16114 "0rnfbpr55j1a1bi2kd4mz444741hrn74kz90h5rnjr59jmpfnh09"))))
16115 (build-system python-build-system)
16116 (arguments
16117 `(#:phases
16118 (modify-phases %standard-phases
16119 (add-after 'unpack 'delete-inconvenient-tests
16120 (lambda _
16121 ;; This test depends on python-scikit-learn.
16122 (delete-file "anndata/tests/test_inplace_subset.py")
16123 #t))
16124 (delete 'check)
16125 (add-after 'install 'check
16126 (lambda* (#:key inputs outputs #:allow-other-keys)
16127 (add-installed-pythonpath inputs outputs)
16128 (invoke "pytest" "-vv"))))))
16129 (propagated-inputs
16130 `(("python-h5py" ,python-h5py)
16131 ("python-importlib-metadata" ,python-importlib-metadata)
16132 ("python-natsort" ,python-natsort)
16133 ("python-numcodecs" ,python-numcodecs)
16134 ("python-packaging" ,python-packaging)
16135 ("python-pandas" ,python-pandas)
16136 ("python-scipy" ,python-scipy)
16137 ("python-zarr" ,python-zarr)))
16138 (native-inputs
16139 `(("python-joblib" ,python-joblib)
16140 ("python-pytest" ,python-pytest)
16141 ("python-setuptools-scm" ,python-setuptools-scm)))
16142 (home-page "https://github.com/theislab/anndata")
16143 (synopsis "Annotated data for data analysis pipelines")
16144 (description "Anndata is a package for simple (functional) high-level APIs
16145 for data analysis pipelines. In this context, it provides an efficient,
16146 scalable way of keeping track of data together with learned annotations and
16147 reduces the code overhead typically encountered when using a mostly
16148 object-oriented library such as @code{scikit-learn}.")
16149 (license license:bsd-3)))
16150
16151 (define-public python-dill
16152 (package
16153 (name "python-dill")
16154 (version "0.3.1.1")
16155 (source
16156 (origin
16157 (method url-fetch)
16158 (uri (pypi-uri "dill" version))
16159 (sha256
16160 (base32 "1704g8z70d210ksgbccs2v545v9w0wc6lx15m296alb7jf0yzn22"))))
16161 (build-system python-build-system)
16162 (arguments
16163 `(#:phases
16164 (modify-phases %standard-phases
16165 (replace 'check
16166 (lambda _
16167 (with-directory-excursion "/tmp"
16168 (invoke "nosetests" "-v"))
16169 #t)))))
16170 (native-inputs
16171 `(("python-nose" ,python-nose)))
16172 (home-page "https://pypi.org/project/dill/")
16173 (synopsis "Serialize all of Python")
16174 (description "Dill extends Python's @code{pickle} module for serializing
16175 and de-serializing Python objects to the majority of the built-in Python
16176 types. Dill provides the user the same interface as the @code{pickle} module,
16177 and also includes some additional features. In addition to pickling Python
16178 objects, @code{dill} provides the ability to save the state of an interpreter
16179 session in a single command. Hence, it would be feasible to save a
16180 interpreter session, close the interpreter, ship the pickled file to another
16181 computer, open a new interpreter, unpickle the session and thus continue from
16182 the saved state of the original interpreter session.")
16183 (license license:bsd-3)))
16184
16185 (define-public python-multiprocess
16186 (package
16187 (name "python-multiprocess")
16188 (version "0.70.9")
16189 (source
16190 (origin
16191 (method url-fetch)
16192 (uri (pypi-uri "multiprocess" version))
16193 (sha256
16194 (base32
16195 "1r882nvd44xqwbrclwqx5rhs80l6809rcvpc7pkpgnij06cvvmcz"))))
16196 (build-system python-build-system)
16197 (arguments
16198 `(#:phases
16199 (modify-phases %standard-phases
16200 (add-after 'unpack 'disable-broken-tests
16201 (lambda _
16202 ;; This test is broken as there is no keyboard interrupt.
16203 (substitute* "py3.7/multiprocess/tests/__init__.py"
16204 (("^(.*)def test_wait_result"
16205 line indent)
16206 (string-append indent
16207 "@unittest.skip(\"Disabled by Guix\")\n"
16208 line)))
16209 #t))
16210 ;; Tests must be run after installation.
16211 (delete 'check)
16212 (add-after 'install 'check
16213 (lambda* (#:key inputs outputs #:allow-other-keys)
16214 (add-installed-pythonpath inputs outputs)
16215 (invoke "python" "-m" "multiprocess.tests")
16216 #t)))))
16217 (propagated-inputs
16218 `(("python-dill" ,python-dill)))
16219 (home-page "https://pypi.org/project/multiprocess/")
16220 (synopsis "Multiprocessing and multithreading in Python")
16221 (description
16222 "This package is a fork of the multiprocessing Python package, a package
16223 which supports the spawning of processes using the API of the standard
16224 library's @code{threading} module.")
16225 (license license:bsd-3)))
16226
16227 (define-public python-toolz
16228 (package
16229 (name "python-toolz")
16230 (version "0.9.0")
16231 (source
16232 (origin
16233 (method url-fetch)
16234 (uri (pypi-uri "toolz" version))
16235 (sha256
16236 (base32
16237 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
16238 (build-system python-build-system)
16239 ;; FIXME: tests cannot be computed: "Can't perform this operation for
16240 ;; unregistered loader type"
16241 (arguments '(#:tests? #f))
16242 (home-page "https://github.com/pytoolz/toolz/")
16243 (synopsis "List processing tools and functional utilities")
16244 (description
16245 "This package provides a set of utility functions for iterators,
16246 functions, and dictionaries.")
16247 (license license:bsd-3)))
16248
16249 (define-public python2-toolz
16250 (package-with-python2 python-toolz))
16251
16252 (define-public python-cytoolz
16253 (package
16254 (name "python-cytoolz")
16255 (version "0.9.0.1")
16256 (source
16257 (origin
16258 (method url-fetch)
16259 (uri (pypi-uri "cytoolz" version))
16260 (sha256
16261 (base32
16262 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
16263 (build-system python-build-system)
16264 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
16265 ;; 'exceptions'"
16266 (arguments '(#:tests? #f))
16267 (propagated-inputs
16268 `(("python-toolz" ,python-toolz)))
16269 (native-inputs
16270 `(("python-cython" ,python-cython)))
16271 (home-page "https://github.com/pytoolz/cytoolz")
16272 (synopsis "High performance functional utilities")
16273 (description
16274 "The cytoolz package implements the same API as provided by toolz. The
16275 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
16276 that is accessible to other projects developed in Cython.")
16277 (license license:bsd-3)))
16278
16279 (define-public python-sortedcontainers
16280 (package
16281 (name "python-sortedcontainers")
16282 (version "2.1.0")
16283 (source
16284 (origin
16285 (method url-fetch)
16286 (uri (pypi-uri "sortedcontainers" version))
16287 (sha256
16288 (base32
16289 "0fm0w5id2yhqld95hg2m636vjgkz377rvgdfqaxc25vbylr9lklp"))))
16290 (build-system python-build-system)
16291 (arguments
16292 ;; FIXME: Tests require many extra dependencies, and would introduce
16293 ;; a circular dependency on hypothesis, which uses this package.
16294 '(#:tests? #f))
16295 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
16296 (synopsis "Sorted List, Sorted Dict, Sorted Set")
16297 (description
16298 "This package provides a sorted collections library, written in
16299 pure-Python.")
16300 (license license:asl2.0)))
16301
16302 (define-public python2-sortedcontainers
16303 (package-with-python2 python-sortedcontainers))
16304
16305 (define-public python-cloudpickle
16306 (package
16307 (name "python-cloudpickle")
16308 (version "0.6.1")
16309 (source
16310 (origin
16311 (method url-fetch)
16312 (uri (pypi-uri "cloudpickle" version))
16313 (sha256
16314 (base32
16315 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
16316 (build-system python-build-system)
16317 ;; FIXME: there are 5 errors in 122 tests:
16318 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
16319 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
16320 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
16321 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
16322 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
16323 ;; TypeError: cannot serialize '_io.BufferedRandom' object
16324 (arguments '(#:tests? #f))
16325 (native-inputs
16326 `(("python-pytest" ,python-pytest)
16327 ("python-mock" ,python-mock)
16328 ("python-tornado" ,python-tornado)))
16329 (home-page "https://github.com/cloudpipe/cloudpickle")
16330 (synopsis "Extended pickling support for Python objects")
16331 (description
16332 "Cloudpickle makes it possible to serialize Python constructs not
16333 supported by the default pickle module from the Python standard library. It
16334 is especially useful for cluster computing where Python expressions are
16335 shipped over the network to execute on remote hosts, possibly close to the
16336 data.")
16337 (license license:bsd-3)))
16338
16339 (define-public python2-cloudpickle
16340 (package-with-python2 python-cloudpickle))
16341
16342 (define-public python-locket
16343 (package
16344 (name "python-locket")
16345 (version "0.2.0")
16346 (source
16347 (origin
16348 (method url-fetch)
16349 (uri (pypi-uri "locket" version))
16350 (sha256
16351 (base32
16352 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
16353 (build-system python-build-system)
16354 (home-page "https://github.com/mwilliamson/locket.py")
16355 (synopsis "File-based locks for Python")
16356 (description
16357 "Locket implements a lock that can be used by multiple processes provided
16358 they use the same path.")
16359 (license license:bsd-2)))
16360
16361 (define-public python2-locket
16362 (package-with-python2 python-locket))
16363
16364 (define-public python-blosc
16365 (package
16366 (name "python-blosc")
16367 (version "1.5.1")
16368 (source
16369 (origin
16370 (method url-fetch)
16371 (uri (pypi-uri "blosc" version))
16372 (sha256
16373 (base32
16374 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
16375 (build-system python-build-system)
16376 ;; FIXME: all tests pass, but then this error is printed:
16377 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
16378 (arguments '(#:tests? #f))
16379 (propagated-inputs
16380 `(("python-numpy" ,python-numpy)))
16381 (home-page "https://github.com/blosc/python-blosc")
16382 (synopsis "Python wrapper for the Blosc data compressor library")
16383 (description "Blosc is a high performance compressor optimized for binary
16384 data. It has been designed to transmit data to the processor cache faster
16385 than the traditional, non-compressed, direct memory fetch approach via a
16386 @code{memcpy()} system call.
16387
16388 Blosc works well for compressing numerical arrays that contains data with
16389 relatively low entropy, like sparse data, time series, grids with
16390 regular-spaced values, etc.
16391
16392 This Python package wraps the Blosc library.")
16393 (license license:bsd-3)))
16394
16395 (define-public python2-blosc
16396 (package-with-python2 python-blosc))
16397
16398 (define-public python-partd
16399 (package
16400 (name "python-partd")
16401 (version "0.3.9")
16402 (source
16403 (origin
16404 (method url-fetch)
16405 (uri (pypi-uri "partd" version))
16406 (sha256
16407 (base32
16408 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
16409 (build-system python-build-system)
16410 (propagated-inputs
16411 `(("python-blosc" ,python-blosc)
16412 ("python-locket" ,python-locket)
16413 ("python-numpy" ,python-numpy)
16414 ("python-pandas" ,python-pandas)
16415 ("python-pyzmq" ,python-pyzmq)
16416 ("python-toolz" ,python-toolz)))
16417 (home-page "https://github.com/dask/partd/")
16418 (synopsis "Appendable key-value storage")
16419 (description "Partd stores key-value pairs. Values are raw bytes. We
16420 append on old values. Partd excels at shuffling operations.")
16421 (license license:bsd-3)))
16422
16423 (define-public python2-partd
16424 (package-with-python2 python-partd))
16425
16426 (define-public python-fsspec
16427 (package
16428 (name "python-fsspec")
16429 (version "0.6.1")
16430 (source
16431 (origin
16432 (method url-fetch)
16433 (uri (pypi-uri "fsspec" version))
16434 (sha256
16435 (base32
16436 "1g9ba8v04s1nrh7pvzfm2md7ivl2mrz3hcq3y9d1a44gd62h17zj"))))
16437 (build-system python-build-system)
16438 (arguments '(#:tests? #f)) ; there are none
16439 (home-page "https://github.com/intake/filesystem_spec")
16440 (synopsis "File-system specification")
16441 (description "The purpose of this package is to produce a template or
16442 specification for a file-system interface, that specific implementations
16443 should follow, so that applications making use of them can rely on a common
16444 behavior and not have to worry about the specific internal implementation
16445 decisions with any given backend.")
16446 (license license:bsd-3)))
16447
16448 (define-public python-dask
16449 (package
16450 (name "python-dask")
16451 (version "2.9.0")
16452 (source
16453 (origin
16454 (method url-fetch)
16455 (uri (pypi-uri "dask" version))
16456 (sha256
16457 (base32 "1w1hqr8vyx6ygwflj2737dcy0mmgvrc0s602gnny8pzlcbs9m76b"))))
16458 (build-system python-build-system)
16459 (arguments
16460 `(#:phases
16461 (modify-phases %standard-phases
16462 (add-after 'unpack 'disable-broken-tests
16463 (lambda _
16464 ;; This test is marked as xfail when pytest-xdist is used.
16465 (substitute* "dask/tests/test_threaded.py"
16466 (("def test_interrupt\\(\\)" m)
16467 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
16468 m)))
16469 ;; This one fails with a type error:
16470 ;; TypeError: Already tz-aware, use tz_convert to convert.
16471 (substitute* "dask/dataframe/tests/test_shuffle.py"
16472 (("def test_set_index_timestamp\\(\\)" m)
16473 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
16474 m)))
16475 #t))
16476 (replace 'check
16477 (lambda _ (invoke "pytest" "-vv"))))))
16478 (propagated-inputs
16479 `(("python-cloudpickle" ,python-cloudpickle)
16480 ("python-fsspec" ,python-fsspec)
16481 ("python-numpy" ,python-numpy)
16482 ("python-packaging" ,python-packaging)
16483 ("python-pandas" ,python-pandas)
16484 ("python-partd" ,python-partd)
16485 ("python-toolz" ,python-toolz)
16486 ("python-pyyaml" ,python-pyyaml)))
16487 (native-inputs
16488 `(("python-pytest" ,python-pytest)
16489 ("python-pytest-runner" ,python-pytest-runner)))
16490 (home-page "https://github.com/dask/dask/")
16491 (synopsis "Parallel computing with task scheduling")
16492 (description
16493 "Dask is a flexible parallel computing library for analytics. It
16494 consists of two components: dynamic task scheduling optimized for computation,
16495 and large data collections like parallel arrays, dataframes, and lists that
16496 extend common interfaces like NumPy, Pandas, or Python iterators to
16497 larger-than-memory or distributed environments. These parallel collections
16498 run on top of the dynamic task schedulers. ")
16499 (license license:bsd-3)))
16500
16501 (define-public python-ilinkedlist
16502 (package
16503 (name "python-ilinkedlist")
16504 (version "0.4.0")
16505 (source
16506 (origin
16507 (method url-fetch)
16508 (uri (pypi-uri "ilinkedlist" version))
16509 (sha256
16510 (base32
16511 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
16512 (build-system python-build-system)
16513 (native-inputs `(("python-pytest" ,python-pytest)))
16514 (inputs `(("python" ,python)))
16515 (home-page "https://github.com/luther9/ilinkedlist-py")
16516 (synopsis "Immutable linked list library")
16517 (description
16518 "This is a implementation of immutable linked lists for Python. It
16519 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
16520 Since a linked list is treated as immutable, it is hashable, and its length
16521 can be retrieved in constant time. Some of the terminology is inspired by
16522 LISP. It is possible to create an improper list by creating a @code{Pair}
16523 with a non-list @code{cdr}.")
16524 (license license:gpl3+)))
16525
16526 (define-public python-readlike
16527 (package
16528 (name "python-readlike")
16529 (version "0.1.3")
16530 (source
16531 (origin
16532 (method url-fetch)
16533 (uri (pypi-uri "readlike" version))
16534 (sha256
16535 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
16536 (build-system python-build-system)
16537 (home-page "https://github.com/jangler/readlike")
16538 (synopsis "GNU Readline-like line editing module")
16539 (description
16540 "This Python module provides line editing functions similar to the default
16541 Emacs-style ones of GNU Readline. Unlike the Python standard library's
16542 @code{readline} package, this one allows access to those capabilties in settings
16543 outside of a standard command-line interface. It is especially well-suited to
16544 interfacing with Urwid, due to a shared syntax for describing key inputs.
16545
16546 Currently, all stateless Readline commands are implemented. Yanking and history
16547 are not supported.")
16548 (license license:expat)))
16549
16550 (define-public python2-readlike
16551 (package-with-python2 python-readlike))
16552
16553 (define-public python-reparser
16554 (package
16555 (name "python-reparser")
16556 (version "1.4.3")
16557 (source
16558 (origin
16559 (method url-fetch)
16560 (uri (pypi-uri "ReParser" version))
16561 (sha256
16562 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
16563 (build-system python-build-system)
16564 (home-page "https://github.com/xmikos/reparser")
16565 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
16566 (description
16567 "This Python library provides a simple lexer/parser for inline markup based
16568 on regular expressions.")
16569 (license license:expat)))
16570
16571 (define-public python2-reparser
16572 (let ((reparser (package-with-python2
16573 (strip-python2-variant python-reparser))))
16574 (package (inherit reparser)
16575 (propagated-inputs
16576 `(("python2-enum34" ,python2-enum34)
16577 ,@(package-propagated-inputs reparser))))))
16578
16579 (define-public python-precis-i18n
16580 (package
16581 (name "python-precis-i18n")
16582 (version "1.0.0")
16583 (source
16584 (origin
16585 (method url-fetch)
16586 (uri (pypi-uri "precis_i18n" version))
16587 (sha256
16588 (base32
16589 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
16590 (build-system python-build-system)
16591 (home-page "https://github.com/byllyfish/precis_i18n")
16592 (synopsis "Implementation of the PRECIS framework")
16593 (description
16594 "This module implements the PRECIS Framework as described in RFC 8264,
16595 RFC 8265 and RFC 8266.")
16596 (license license:expat)))
16597
16598 (define-public python-absl-py
16599 (package
16600 (name "python-absl-py")
16601 (version "0.6.1")
16602 (source
16603 (origin
16604 (method url-fetch)
16605 (uri (pypi-uri "absl-py" version))
16606 (sha256
16607 (base32
16608 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
16609 (build-system python-build-system)
16610 (propagated-inputs
16611 `(("python-six" ,python-six)))
16612 (home-page "https://github.com/abseil/abseil-py")
16613 (synopsis "Abseil Python common libraries")
16614 (description
16615 "This package provides the Abseil Python Common Libraries, a collection
16616 of Python libraries for building Python applications.")
16617 (license license:asl2.0)))
16618
16619 (define-public python-astor
16620 (package
16621 (name "python-astor")
16622 (version "0.7.1")
16623 (source
16624 (origin
16625 (method url-fetch)
16626 (uri (pypi-uri "astor" version))
16627 (sha256
16628 (base32
16629 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
16630 (build-system python-build-system)
16631 ;; FIXME: There are two errors and two test failures.
16632 (arguments `(#:tests? #f))
16633 (home-page "https://github.com/berkerpeksag/astor")
16634 (synopsis "Read and write Python ASTs")
16635 (description "Astor is designed to allow easy manipulation of Python
16636 source via the Abstract Syntax Tree.")
16637 (license license:bsd-3)))
16638
16639 (define-public python2-astor
16640 (package-with-python2 python-astor))
16641
16642 (define-public python-grpcio
16643 (package
16644 (name "python-grpcio")
16645 (version "1.17.1")
16646 (source
16647 (origin
16648 (method url-fetch)
16649 (uri (pypi-uri "grpcio" version))
16650 (sha256
16651 (base32
16652 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
16653 (build-system python-build-system)
16654 (propagated-inputs
16655 `(("python-six" ,python-six)))
16656 (home-page "https://grpc.io")
16657 (synopsis "HTTP/2-based RPC framework")
16658 (description "This package provides a Python library for communicating
16659 with the HTTP/2-based RPC framework gRPC.")
16660 (license license:asl2.0)))
16661
16662 (define-public python-astunparse
16663 (package
16664 (name "python-astunparse")
16665 (version "1.6.2")
16666 (source
16667 (origin
16668 (method url-fetch)
16669 (uri (pypi-uri "astunparse" version))
16670 (sha256
16671 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
16672 (build-system python-build-system)
16673 (arguments '(#:tests? #f)) ; there are none
16674 (propagated-inputs
16675 `(("python-six" ,python-six)
16676 ("python-wheel" ,python-wheel)))
16677 (home-page "https://github.com/simonpercivall/astunparse")
16678 (synopsis "AST unparser for Python")
16679 (description "This package provides an AST unparser for Python. It is a
16680 factored out version of @code{unparse} found in the Python source
16681 distribution.")
16682 (license license:bsd-3)))
16683
16684 (define-public python-gast
16685 (package
16686 (name "python-gast")
16687 (version "0.2.2")
16688 (source
16689 (origin
16690 (method url-fetch)
16691 (uri (pypi-uri "gast" version))
16692 (sha256
16693 (base32 "1w5dzdb3gpcfmd2s0b93d8gff40a1s41rv31458z14inb3s9v4zy"))))
16694 (build-system python-build-system)
16695 (propagated-inputs
16696 `(("python-astunparse" ,python-astunparse)))
16697 (home-page "https://pypi.org/project/gast/")
16698 (synopsis "Generic Python AST that abstracts the underlying Python version")
16699 (description
16700 "GAST provides a compatibility layer between the AST of various Python
16701 versions, as produced by @code{ast.parse} from the standard @code{ast}
16702 module.")
16703 (license license:bsd-3)))
16704
16705 (define-public python-wikidata
16706 (package
16707 (name "python-wikidata")
16708 (version "0.6.1")
16709 (source
16710 (origin
16711 (method url-fetch)
16712 (uri (pypi-uri "Wikidata" version))
16713 (sha256
16714 (base32
16715 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
16716 (build-system python-build-system)
16717 (propagated-inputs
16718 `(("python-babel" ,python-babel)))
16719 (home-page "https://github.com/dahlia/wikidata")
16720 (synopsis "Wikidata client library")
16721 (description
16722 "This package provides a Python interface to
16723 @url{https://www.wikidata.org/, Wikidata}.")
16724 (properties '((upstream-name . "Wikidata")))
16725 (license license:gpl3+)))
16726
16727 (define-public python-doctest-ignore-unicode
16728 (package
16729 (name "python-doctest-ignore-unicode")
16730 (version "0.1.2")
16731 (source
16732 (origin
16733 (method url-fetch)
16734 (uri (pypi-uri "doctest-ignore-unicode" version))
16735 (sha256
16736 (base32
16737 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
16738 (build-system python-build-system)
16739 (native-inputs
16740 `(("python-nose" ,python-nose)))
16741 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
16742 (synopsis "Ignore Unicode literal prefixes in doctests")
16743 (description
16744 "This package adds support for a flag to ignore Unicode literal prefixes
16745 in doctests.")
16746 (license license:asl2.0)))
16747
16748 (define-public python-attr
16749 (package
16750 (name "python-attr")
16751 (version "0.3.1")
16752 (source
16753 (origin
16754 (method url-fetch)
16755 (uri (pypi-uri "attr" version))
16756 (sha256
16757 (base32
16758 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
16759 (build-system python-build-system)
16760 (home-page "https://github.com/denis-ryzhkov/attr")
16761 (synopsis "Decorator for attributes of target function or class")
16762 (description "Simple decorator to set attributes of target function or
16763 class in a @acronym{DRY, Don't Repeat Yourself} way.")
16764 (license license:expat)))
16765
16766 (define-public python-construct
16767 (package
16768 (name "python-construct")
16769 (version "2.10.56")
16770 (source
16771 (origin
16772 (method url-fetch)
16773 (uri (pypi-uri "construct" version))
16774 (sha256
16775 (base32
16776 "0q86jjzsvy835h3c8pjj4619vbp7ihfg8njmyw86ym4qrpni7flp"))))
16777 (build-system python-build-system)
16778 (arguments
16779 `(#:tests? #f)) ; No tests exist.
16780 (propagated-inputs
16781 `(("python-extras" ,python-extras)
16782 ("python-arrow" ,python-arrow)
16783 ("python-numpy" ,python-numpy)
16784 ("python-ruamel.yaml" ,python-ruamel.yaml)))
16785 (home-page "https://construct.readthedocs.io")
16786 (synopsis "Declarative and symmetrical parser and builder for binary data")
16787 (description
16788 "This package provides both simple, atomic constructs (such as
16789 integers of various sizes), as well as composite ones which allow you
16790 form hierarchical and sequential structures of increasing complexity.
16791 It features bit and byte granularity, easy debugging and testing, an
16792 easy-to-extend subclass system, and lots of primitive constructs to
16793 make your work easier.")
16794 (license license:expat)))
16795
16796 (define-public python-humanize
16797 (package
16798 (name "python-humanize")
16799 (version "0.5.1")
16800 (source
16801 (origin
16802 (method url-fetch)
16803 (uri (pypi-uri "humanize" version))
16804 (sha256
16805 (base32
16806 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
16807 (arguments
16808 '(#:tests? #f)) ; tests not in pypi archive
16809 (build-system python-build-system)
16810 (home-page "https://github.com/jmoiron/humanize")
16811 (synopsis "Print numerical information in a human-readable form")
16812 (description "This package provides a Python module that displays numbers
16813 and dates in \"human readable\" forms. For example, it would display
16814 \"12345591313\" as \"12.3 billion\".")
16815 (license license:expat)))
16816
16817 (define-public python-txaio
16818 (package
16819 (name "python-txaio")
16820 (version "18.8.1")
16821 (source
16822 (origin
16823 (method url-fetch)
16824 (uri (pypi-uri "txaio" version))
16825 (sha256
16826 (base32
16827 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
16828 (build-system python-build-system)
16829 (propagated-inputs
16830 `(("python-twisted" ,python-twisted)
16831 ("python-six" ,python-six)))
16832 (home-page "https://github.com/crossbario/txaio")
16833 (synopsis "Compatibility layer between Python asyncio and Twisted")
16834 (description "Txaio provides a compatibility layer between the Python
16835 @code{asyncio} module and @code{Twisted}.")
16836 (license license:expat)))
16837
16838 (define-public python-toolshed
16839 (package
16840 (name "python-toolshed")
16841 (version "0.4.6")
16842 (source
16843 (origin
16844 (method url-fetch)
16845 (uri (pypi-uri "toolshed" version))
16846 (sha256
16847 (base32
16848 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
16849 (build-system python-build-system)
16850 (native-inputs
16851 `(("python-nose" ,python-nose)))
16852 (home-page "https://github.com/brentp/toolshed/")
16853 (synopsis "Collection of modules and functions for working with data")
16854 (description "This is a collection of well-tested, simple modules and
16855 functions that aim to reduce boilerplate when working with data.")
16856 (license license:bsd-2)))
16857
16858 (define-public python-annoy
16859 (package
16860 (name "python-annoy")
16861 (version "1.15.1")
16862 (source
16863 (origin
16864 (method url-fetch)
16865 (uri (pypi-uri "annoy" version))
16866 (sha256
16867 (base32
16868 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
16869 (build-system python-build-system)
16870 (native-inputs
16871 `(("python-nose" ,python-nose)))
16872 (home-page "https://github.com/spotify/annoy/")
16873 (synopsis "Approximate nearest neighbors library")
16874 (description
16875 "Annoy is a C++ library with Python bindings to search for points in
16876 space that are close to a given query point. It also creates large read-only
16877 file-based data structures that are @code{mmap}ped into memory so that many
16878 processes may share the same data.")
16879 (license license:asl2.0)))
16880
16881 (define-public python-pylzma
16882 (package
16883 (name "python-pylzma")
16884 (version "0.5.0")
16885 (source
16886 (origin
16887 (method url-fetch)
16888 (uri (pypi-uri "pylzma" version))
16889 (sha256
16890 (base32
16891 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
16892 (build-system python-build-system)
16893 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
16894 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
16895 (description "This package provides Python bindings for the LZMA library
16896 by Igor Pavlov.")
16897 (license license:lgpl2.1+)))
16898
16899 (define-public python2-pylzma
16900 (package-with-python2 python-pylzma))
16901
16902 (define-public python2-zeroconf
16903 (package
16904 (name "python2-zeroconf")
16905
16906 ;; This is the last version that supports Python 2.x.
16907 (version "0.19.1")
16908 (source
16909 (origin
16910 (method url-fetch)
16911 (uri (pypi-uri "zeroconf" version))
16912 (sha256
16913 (base32
16914 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
16915 (build-system python-build-system)
16916 (arguments
16917 `(#:python ,python-2
16918 #:phases
16919 (modify-phases %standard-phases
16920 (add-after 'unpack 'patch-requires
16921 (lambda* (#:key inputs #:allow-other-keys)
16922 (substitute* "setup.py"
16923 (("enum-compat")
16924 "enum34"))
16925 #t)))))
16926 (native-inputs
16927 `(("python2-six" ,python2-six)
16928 ("python2-enum32" ,python2-enum34)
16929 ("python2-netifaces" ,python2-netifaces)
16930 ("python2-typing" ,python2-typing)))
16931 (home-page "https://github.com/jstasiak/python-zeroconf")
16932 (synopsis "Pure Python mDNS service discovery")
16933 (description
16934 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
16935 compatible).")
16936 (license license:lgpl2.1+)))
16937
16938 (define-public python-bsddb3
16939 (package
16940 (name "python-bsddb3")
16941 (version "6.2.6")
16942 (source
16943 (origin
16944 (method url-fetch)
16945 (uri (pypi-uri "bsddb3" version))
16946 (sha256
16947 (base32
16948 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
16949 (build-system python-build-system)
16950 (inputs
16951 `(("bdb" ,bdb)))
16952 (arguments
16953 '(#:phases
16954 (modify-phases %standard-phases
16955 (add-after 'unpack 'configure-locations
16956 (lambda* (#:key inputs #:allow-other-keys)
16957 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
16958 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
16959 #t))
16960 (replace 'check
16961 (lambda _
16962 (invoke "python3" "test3.py" "-v"))))))
16963 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
16964 (synopsis "Python bindings for Oracle Berkeley DB")
16965 (description
16966 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
16967 C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
16968 Transaction objects, and each of these is exposed as a Python type in the
16969 bsddb3.db module. The database objects can use various access methods: btree,
16970 hash, recno, and queue. Complete support of Berkeley DB distributed
16971 transactions. Complete support for Berkeley DB Replication Manager.
16972 Complete support for Berkeley DB Base Replication. Support for RPC.")
16973 (license license:bsd-3)))
16974
16975 (define-public python-dbfread
16976 (package
16977 (name "python-dbfread")
16978 (version "2.0.7")
16979 (source (origin
16980 (method url-fetch)
16981 (uri (pypi-uri "dbfread" version))
16982 (sha256
16983 (base32
16984 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
16985 (build-system python-build-system)
16986 (native-inputs
16987 `(("python-pytest" ,python-pytest)))
16988 (home-page "https://dbfread.readthedocs.io")
16989 (synopsis "Read DBF Files with Python")
16990 (description
16991 "This library reads DBF files and returns the data as native Python data
16992 types for further processing. It is primarily intended for batch jobs and
16993 one-off scripts.")
16994 (license license:expat)))
16995
16996 (define-public python-cached-property
16997 (package
16998 (name "python-cached-property")
16999 (version "1.5.1")
17000 (source
17001 (origin
17002 (method url-fetch)
17003 (uri (pypi-uri "cached-property" version))
17004 (sha256
17005 (base32
17006 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
17007 (build-system python-build-system)
17008 (arguments
17009 `(#:phases
17010 (modify-phases %standard-phases
17011 ;; https://github.com/pydanny/cached-property/issues/131
17012 ;; recent versions of freezegun break one test
17013 (add-after 'unpack 'disable-broken-test
17014 (lambda _
17015 (substitute* "tests/test_cached_property.py"
17016 (("def test_threads_ttl_expiry\\(self\\)" m)
17017 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
17018 " " m)))
17019 #t)))))
17020 (native-inputs
17021 `(("python-freezegun" ,python-freezegun)))
17022 (home-page
17023 "https://github.com/pydanny/cached-property")
17024 (synopsis
17025 "Decorator for caching properties in classes")
17026 (description
17027 "This package provides a decorator which makes caching
17028 time-or-computationally-expensive properties quick and easy and works in Python
17029 2 or 3.")
17030 (license license:bsd-3)))
17031
17032 (define-public python-folium
17033 (package
17034 (name "python-folium")
17035 (version "0.10.1")
17036 (source
17037 (origin
17038 (method url-fetch)
17039 (uri (pypi-uri "folium" version))
17040 (sha256
17041 (base32
17042 "0gcc267wxwxr57ry86pqpbiyfvl0g48hfvgy0f2mz9s58g87kgzd"))))
17043 (build-system python-build-system)
17044 (propagated-inputs
17045 `(("python-branca" ,python-branca)
17046 ("python-jinja2" ,python-jinja2)
17047 ("python-numpy" ,python-numpy)
17048 ("python-requests" ,python-requests)))
17049 (native-inputs
17050 `(("python-pytest" ,python-pytest)))
17051 (home-page "https://github.com/python-visualization/folium")
17052 (synopsis "Make beautiful maps with Leaflet.js & Python")
17053 (description "@code{folium} makes it easy to visualize data that’s been
17054 manipulated in Python on an interactive leaflet map. It enables both the
17055 binding of data to a map for @code{choropleth} visualizations as well as
17056 passing rich vector/raster/HTML visualizations as markers on the map.
17057
17058 The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
17059 Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
17060 supports Image, Video, GeoJSON and TopoJSON overlays.")
17061 (license license:expat)))
17062
17063 (define-public jube
17064 (package
17065 ;; This is a command-line tool, so no "python-" prefix.
17066 (name "jube")
17067 (version "2.2.2")
17068 (source (origin
17069 (method url-fetch)
17070 (uri (string-append
17071 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
17072 version))
17073 (sha256
17074 (base32
17075 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
17076 (file-name (string-append "jube-" version ".tar.gz"))))
17077 (build-system python-build-system)
17078 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
17079 (synopsis "Benchmarking environment")
17080 (description
17081 "JUBE helps perform and analyze benchmarks in a systematic way. For each
17082 benchmarked application, benchmark data is stored in a format that allows JUBE
17083 to deduct the desired information. This data can be parsed by automatic pre-
17084 and post-processing scripts that draw information and store it more densely
17085 for manual interpretation.")
17086 (license license:gpl3+)))
17087
17088 (define-public python-pyroutelib3
17089 (package
17090 (name "python-pyroutelib3")
17091 (version "1.3.post1")
17092 (source
17093 (origin
17094 (method url-fetch)
17095 (uri (pypi-uri "pyroutelib3" version))
17096 (sha256
17097 (base32
17098 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
17099 (build-system python-build-system)
17100 (propagated-inputs
17101 `(("python-dateutil" ,python-dateutil)))
17102 (home-page "https://github.com/MKuranowski/pyroutelib3")
17103 (synopsis "Library for simple routing on OSM data")
17104 (description "Library for simple routing on OSM data")
17105 (license license:gpl3+)))
17106
17107 (define-public python-bibtexparser
17108 (package
17109 (name "python-bibtexparser")
17110 (version "1.1.0")
17111 (source
17112 (origin
17113 (method url-fetch)
17114 (uri (pypi-uri "bibtexparser" version))
17115 (sha256
17116 (base32
17117 "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
17118 (build-system python-build-system)
17119 (propagated-inputs
17120 `(("python-pyparsing" ,python-pyparsing)))
17121 (native-inputs
17122 `(("python-future" ,python-future)))
17123 (home-page "https://github.com/sciunto-org/python-bibtexparser")
17124 (synopsis "Python library to parse BibTeX files")
17125 (description "BibtexParser is a Python library to parse BibTeX files.")
17126 (license (list license:bsd-3 license:lgpl3))))
17127
17128 (define-public python-distro
17129 (package
17130 (name "python-distro")
17131 (version "1.4.0")
17132 (source
17133 (origin
17134 (method url-fetch)
17135 (uri (pypi-uri "distro" version))
17136 (sha256
17137 (base32
17138 "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n"))))
17139 (build-system python-build-system)
17140 (native-inputs
17141 `(("python-pytest" ,python-pytest)))
17142 (home-page "https://github.com/nir0s/distro")
17143 (synopsis
17144 "OS platform information API")
17145 (description
17146 "@code{distro} provides information about the OS distribution it runs on,
17147 such as a reliable machine-readable ID, or version information.
17148
17149 It is the recommended replacement for Python's original
17150 `platform.linux_distribution` function (which will be removed in Python 3.8).
17151 @code{distro} also provides a command-line interface to output the platform
17152 information in various formats.")
17153 (license license:asl2.0)))
17154
17155 (define-public python-cairosvg
17156 (package
17157 (name "python-cairosvg")
17158 (version "2.4.2")
17159 (source
17160 (origin
17161 (method url-fetch)
17162 (uri (pypi-uri "CairoSVG" version))
17163 (sha256
17164 (base32 "1bb7irxbaxxb9ahm3z5wsx1q96mm5gzskc7b6q07h9ikcnb8yrjf"))))
17165 (build-system python-build-system)
17166 (arguments
17167 `(#:phases
17168 (modify-phases %standard-phases
17169 (replace 'check
17170 (lambda _ (invoke "pytest"))))))
17171 (propagated-inputs
17172 `(("python-cairocffi" ,python-cairocffi)
17173 ("python-cssselect2" ,python-cssselect2)
17174 ("python-defusedxml" ,python-defusedxml)
17175 ("python-pillow" ,python-pillow)
17176 ("python-tinycss2" ,python-tinycss2)))
17177 (native-inputs
17178 `(("python-pytest-flake8" ,python-pytest-flake8)
17179 ("python-pytest-isort" ,python-pytest-isort)
17180 ("python-pytest-runner" ,python-pytest-runner)))
17181 (home-page "https://cairosvg.org/")
17182 (synopsis "SVG to PDF/PS/PNG converter based on Cairo")
17183 (description "CairoSVG is a SVG converter based on Cairo. It can export
17184 SVG files to PDF, PostScript and PNG files. The main part of CairoSVG is a
17185 SVG parser, trying to follow the SVG 1.1 recommendation from the W3C. Once
17186 parsed, the result is drawn to a Cairo surface that can be exported to
17187 qvarious formats: PDF, PostScript, PNG and even SVG.")
17188 (license license:lgpl3+)))
17189
17190 (define-public python-pyphen
17191 (package
17192 (name "python-pyphen")
17193 (version "0.9.5")
17194 (source
17195 (origin
17196 (method url-fetch)
17197 (uri (pypi-uri "Pyphen" version))
17198 (sha256
17199 (base32 "08c9y69ry9d6m4zalhnalg86lsp9v2j5n1ziw5vxfmiihx83lqrv"))))
17200 (build-system python-build-system)
17201 ;; TODO: Use the Guix system hyphenation packages hyphen-* rather than the
17202 ;; embedded set provided by upstream - like Debian does.
17203 (home-page "https://github.com/Kozea/Pyphen")
17204 (synopsis "Pure Python module to hyphenate text")
17205 (description "Pyphen is a pure Python module to hyphenate text using
17206 existing Hunspell hyphenation dictionaries.")
17207 (license (list license:gpl2 license:lgpl2.1 license:mpl1.1))))
17208
17209 (define-public python-intelhex
17210 (package
17211 (name "python-intelhex")
17212 (version "2.2.1")
17213 (source
17214 (origin
17215 (method url-fetch)
17216 (uri (pypi-uri "intelhex" version))
17217 (sha256
17218 (base32
17219 "0ckqjbxd8gwcg98gfzpn4vq1qxzfvq3rdbrr1hikj1nmw08qb780"))))
17220 (build-system python-build-system)
17221 (arguments '(#:tests? #f)) ;issue with version
17222 (home-page "https://pypi.org/project/IntelHex/")
17223 (synopsis "Python library for Intel HEX files manipulations")
17224 (description "The Intel HEX file format is widely used in microprocessors
17225 and microcontrollers area (embedded systems etc.) as the de facto standard for
17226 representation of code to be programmed into microelectronic devices. This
17227 package provides an intelhex Python library to read, write, create from
17228 scratch and manipulate data from Intel HEX file format. It also includes
17229 several convenience Python scripts, including \"classic\" hex2bin and bin2hex
17230 converters and more, those based on the library itself.")
17231 (license license:bsd-3)))
17232
17233 (define-public python-pykwalify
17234 (package
17235 (name "python-pykwalify")
17236 (version "1.7.0")
17237 (source
17238 (origin
17239 (method url-fetch)
17240 (uri (pypi-uri "pykwalify" version))
17241 (sha256
17242 (base32
17243 "1cnfzkg1b01f825ikpw2fhjclf9c8akxjfrbd1vc22x1lg2kk2vy"))))
17244 (build-system python-build-system)
17245 (arguments '(#:tests? #f)) ;missing dependencies
17246 (propagated-inputs
17247 `(("python-dateutil" ,python-dateutil)
17248 ("python-docopt" ,python-docopt)
17249 ("python-pyyaml" ,python-pyyaml)))
17250 (home-page "https://github.com/grokzen/pykwalify")
17251 (synopsis
17252 "Python lib/cli for JSON/YAML schema validation")
17253 (description
17254 "This package provides a parser, schema validator, and data binding tool
17255 for YAML and JSON.")
17256 (license license:expat)))
17257
17258 (define-public python-dbusmock
17259 (package
17260 (name "python-dbusmock")
17261 (version "0.18.3")
17262 (source
17263 (origin
17264 (method url-fetch)
17265 (uri (pypi-uri "python-dbusmock" version))
17266 (sha256
17267 (base32
17268 "0hp2kyac88nh9iv6l8hlmv7s1sa1s5f1a3wc2pmlmmxnd211fjlr"))))
17269 (build-system python-build-system)
17270 (arguments
17271 '(#:phases
17272 (modify-phases %standard-phases
17273 (add-after 'unpack 'patch-shell-path
17274 (lambda _
17275 (substitute* "tests/test_code.py"
17276 (("/bin/bash") (which "bash")))
17277 #t)))))
17278 (native-inputs
17279 `(;; For tests.
17280 ("dbus" ,dbus) ; for dbus-daemon
17281 ("python-nose" ,python-nose)
17282 ("which" ,which)))
17283 (propagated-inputs
17284 `(("python-dbus" ,python-dbus)
17285 ("python-pygobject" ,python-pygobject)))
17286 (home-page "https://github.com/martinpitt/python-dbusmock")
17287 (synopsis "Python library for mock D-Bus objects")
17288 (description "python-dbusmock allows for the easy creation of mock objects on
17289 D-Bus. This is useful for writing tests for software which talks to D-Bus
17290 services such as upower, systemd, logind, gnome-session or others, and it is
17291 hard (or impossible without root privileges) to set the state of the real
17292 services to what you expect in your tests.")
17293 (license license:lgpl3+)))
17294
17295 (define-public python-ujson
17296 (package
17297 (name "python-ujson")
17298 (version "1.35")
17299 (source
17300 (origin
17301 (method url-fetch)
17302 (uri (pypi-uri "ujson" version))
17303 (sha256
17304 (base32
17305 "11jz5wi7mbgqcsz52iqhpyykiaasila4lq8cmc2d54bfa3jp6q7n"))))
17306 (build-system python-build-system)
17307 (home-page "http://www.esn.me")
17308 (synopsis
17309 "Ultra fast JSON encoder and decoder for Python")
17310 (description
17311 "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with
17312 bindings for Python 2.5+ and 3.")
17313 (license license:bsd-3)))
17314
17315 (define-public python2-ujson
17316 (package-with-python2 python-ujson))
17317
17318 (define-public python-iocapture
17319 ;; The latest release is more than a year older than this commit.
17320 (let ((commit "fdc021c431d0840303908dfc3ca8769db383595c")
17321 (revision "1"))
17322 (package
17323 (name "python-iocapture")
17324 (version "0.1.2")
17325 (source
17326 (origin
17327 (method git-fetch)
17328 (uri (git-reference
17329 (url "https://github.com/oinume/iocapture.git")
17330 (commit commit)))
17331 (file-name (git-file-name name version))
17332 (sha256
17333 (base32
17334 "1mkbhqibxvgwg0p7slr8dfraa3g2s6bsayladhax2jccwj4kcndz"))))
17335 (build-system python-build-system)
17336 (arguments
17337 `(#:phases
17338 (modify-phases %standard-phases
17339 (delete 'check)
17340 (add-after 'install 'check
17341 (lambda* (#:key inputs outputs #:allow-other-keys)
17342 (add-installed-pythonpath inputs outputs)
17343 (invoke "py.test" "-v" "tests")
17344 #t)))))
17345 (propagated-inputs
17346 `(("python-flexmock" ,python-flexmock)
17347 ("python-pytest" ,python-pytest)
17348 ("python-pytest-cov" ,python-pytest-cov)
17349 ("python-six" ,python-six)))
17350 (home-page "https://github.com/oinume/iocapture")
17351 (synopsis "Python capturing tool for stdout and stderr")
17352 (description
17353 "This package helps you to capture the standard out (stdout) and the
17354 standard error channel (stderr) in your program.")
17355 (license license:expat))))
17356
17357 (define-public python-argh
17358 ;; There are 21 commits since the latest release containing important
17359 ;; improvements.
17360 (let ((commit "dcd3253f2994400a6a58a700c118c53765bc50a4")
17361 (revision "1"))
17362 (package
17363 (name "python-argh")
17364 (version (git-version "0.26.2" revision commit))
17365 (source
17366 (origin
17367 (method git-fetch)
17368 (uri (git-reference
17369 (url "https://github.com/neithere/argh.git")
17370 (commit commit)))
17371 (file-name (git-file-name name version))
17372 (sha256
17373 (base32
17374 "1p5h3dnpbsjmqrvil96s71asc6i3gpinmbrabqmwnrsxprz7r3ns"))))
17375 (build-system python-build-system)
17376 (propagated-inputs
17377 `(("python-iocapture" ,python-iocapture)
17378 ("python-mock" ,python-mock)
17379 ("python-pytest" ,python-pytest)
17380 ("python-pytest-cov" ,python-pytest-cov)
17381 ("python-pytest-xdist" ,python-pytest-xdist)
17382 ("python-tox" ,python-tox)))
17383 (home-page "https://github.com/neithere/argh/")
17384 (synopsis "Argparse wrapper with natural syntax")
17385 (description
17386 "python-argh is a small library that provides several layers of
17387 abstraction on top of @code{python-argparse}. The layers can be mixed. It is
17388 always possible to declare a command with the highest possible (and least
17389 flexible) layer and then tune the behaviour with any of the lower layers
17390 including the native API of @code{python-argparse}.")
17391 (license license:lgpl3+))))
17392
17393 (define-public python-ppft
17394 (package
17395 (name "python-ppft")
17396 (version "1.6.6.1")
17397 (source
17398 (origin
17399 (method url-fetch)
17400 (uri (pypi-uri "ppft" version))
17401 (sha256
17402 (base32
17403 "1z1invkhszc5d2mvgr221v7cszzifcc77mz0pv3wjp6x5q2768cy"))))
17404 (build-system python-build-system)
17405 (arguments '(#:tests? #f)) ; there are none
17406 (propagated-inputs
17407 `(("python-six" ,python-six)))
17408 (home-page "https://pypi.org/project/ppft/")
17409 (synopsis "Fork of Parallel Python")
17410 (description
17411 "This package is a fork of Parallel Python. The Parallel Python
17412 module (@code{pp}) provides an easy and efficient way to create
17413 parallel-enabled applications for @dfn{symmetric multiprocessing} (SMP)
17414 computers and clusters. It features cross-platform portability and dynamic
17415 load balancing.")
17416 (license license:bsd-3)))
17417
17418 (define-public python-pox
17419 (package
17420 (name "python-pox")
17421 (version "0.2.7")
17422 (source
17423 (origin
17424 (method url-fetch)
17425 (uri (pypi-uri "pox" version))
17426 (sha256
17427 (base32
17428 "0y17ckc2p6i6709s279sjdj4q459mpcc38ymg9zv9y6vl6jf3bq6"))))
17429 (build-system python-build-system)
17430 (arguments
17431 `(#:phases
17432 (modify-phases %standard-phases
17433 (replace 'check
17434 (lambda _
17435 (mkdir-p "/tmp/guix")
17436 (setenv "SHELL" "bash")
17437 (setenv "USERNAME" "guix")
17438 (setenv "HOME" "/tmp/guix") ; must end on USERNAME...
17439 (invoke "py.test" "-vv")
17440 #t)))))
17441 (native-inputs
17442 `(("python-pytest" ,python-pytest)
17443 ("which" ,which)))
17444 (home-page "https://pypi.org/project/pox/")
17445 (synopsis "Python utilities for filesystem exploration and automated builds")
17446 (description
17447 "Pox provides a collection of utilities for navigating and manipulating
17448 filesystems. This module is designed to facilitate some of the low level
17449 operating system interactions that are useful when exploring a filesystem on a
17450 remote host. Pox provides Python equivalents of several shell commands such
17451 as @command{which} and @command{find}. These commands allow automated
17452 discovery of what has been installed on an operating system, and where the
17453 essential tools are located.")
17454 (license license:bsd-3)))
17455
17456 (define-public python-pathos
17457 (package
17458 (name "python-pathos")
17459 (version "0.2.5")
17460 (source
17461 (origin
17462 (method url-fetch)
17463 (uri (pypi-uri "pathos" version))
17464 (sha256
17465 (base32
17466 "0in8hxdz7k081ijn6q94gr39ycy7363sx4zysmbwyvd7snqjrbi1"))))
17467 (build-system python-build-system)
17468 (arguments
17469 '(#:phases
17470 (modify-phases %standard-phases
17471 (replace 'check
17472 (lambda _
17473 (setenv "PYTHONPATH"
17474 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
17475 (invoke "python" "./tests/__main__.py"))))))
17476 (propagated-inputs
17477 `(("python-dill" ,python-dill)
17478 ("python-multiprocess" ,python-multiprocess)
17479 ("python-pox" ,python-pox)
17480 ("python-ppft" ,python-ppft)))
17481 (native-inputs
17482 `(("python-pytest" ,python-pytest)))
17483 (home-page "https://pypi.org/project/pathos/")
17484 (synopsis
17485 "Parallel graph management and execution in heterogeneous computing")
17486 (description
17487 "Python-pathos is a framework for heterogenous computing. It provides a
17488 consistent high-level interface for configuring and launching parallel
17489 computations across heterogenous resources. Python-pathos provides configurable
17490 launchers for parallel and distributed computing, where each launcher contains
17491 the syntactic logic to configure and launch jobs in an execution environment.")
17492 (license license:bsd-3)))
17493
17494 (define-public python-flit
17495 (package
17496 (name "python-flit")
17497 (version "2.1.0")
17498 (source
17499 (origin
17500 (method url-fetch)
17501 (uri (pypi-uri "flit" version))
17502 (sha256
17503 (base32
17504 "0h5vvmqinqzn97mr3ix7zx53af9ad4fimjjwqpx88yp8qhz4r5bc"))))
17505 (build-system python-build-system)
17506 (arguments
17507 `(#:tests? #f)) ; XXX: Check requires network access.
17508 (home-page "https://flit.readthedocs.io/")
17509 (synopsis
17510 "Simple packaging tool for simple packages")
17511 (description
17512 "Flit is a simple way to put Python packages and modules on PyPI. Flit
17513 packages a single importable module or package at a time, using the import
17514 name as the name on PyPI. All subpackages and data files within a package
17515 are included automatically.")
17516 (license license:bsd-3)))
17517
17518 (define-public python-pathtools
17519 (package
17520 (name "python-pathtools")
17521 (version "0.1.2")
17522 (source
17523 (origin
17524 (method url-fetch)
17525 (uri (pypi-uri "pathtools" version))
17526 (sha256
17527 (base32
17528 "1h7iam33vwxk8bvslfj4qlsdprdnwf8bvzhqh3jq5frr391cadbw"))))
17529 (build-system python-build-system)
17530 (home-page
17531 "https://github.com/gorakhargosh/pathtools")
17532 (synopsis "Path utilities for Python")
17533 (description "Pattern matching and various utilities for file systems
17534 paths.")
17535 (license license:expat)))
17536
17537 (define-public python-fastentrypoints
17538 (package
17539 (name "python-fastentrypoints")
17540 (version "0.12")
17541 (source
17542 (origin
17543 (method url-fetch)
17544 (uri (pypi-uri "fastentrypoints" version))
17545 (sha256
17546 (base32
17547 "02s1j8i2dzbpbwgq2a3fiqwm3cnmhii2qzc0k42l0rdxd4a4ya7z"))))
17548 (build-system python-build-system)
17549 (home-page
17550 "https://github.com/ninjaaron/fast-entry_points")
17551 (synopsis
17552 "Makes entry_points specified in setup.py load more quickly")
17553 (description
17554 "Using entry_points in your setup.py makes scripts that start really
17555 slowly because it imports pkg_resources. This package allows such setup
17556 scripts to load entry points more quickly.")
17557 (license license:bsd-3)))
17558
17559 (define-public python-funcparserlib
17560 (package
17561 (name "python-funcparserlib")
17562 (version "0.3.6")
17563 (source
17564 (origin
17565 (method url-fetch)
17566 (uri (pypi-uri "funcparserlib" version))
17567 (sha256
17568 (base32
17569 "07f9cgjr3h4j2m67fhwapn8fja87vazl58zsj4yppf9y3an2x6dp"))))
17570 (native-inputs
17571 `(("python-tox" ,python-tox)))
17572 (arguments
17573 `(#:phases
17574 (modify-phases %standard-phases
17575 (replace 'check
17576 (lambda _
17577 (invoke "tox"))))))
17578 (build-system python-build-system)
17579 (home-page
17580 "https://github.com/vlasovskikh/funcparserlib")
17581 (synopsis
17582 "Recursive descent parsing library based on functional combinators")
17583 (description
17584 "This package is a recursive descent parsing library for Python based on
17585 functional combinators. Parser combinators are just higher-order functions
17586 that take parsers as their arguments and return them as result values.")
17587 (license license:expat)))
17588
17589 (define-public python-speg
17590 (package
17591 (name "python-speg")
17592 (version "0.3")
17593 (source
17594 (origin
17595 (method url-fetch)
17596 (uri (pypi-uri "speg" version ".zip"))
17597 (sha256
17598 (base32 "0w9y4jf4787dzhy6rvhwi0mpl0r8qkqmqmyv2hpwdpv8w53yzjqh"))))
17599 (arguments
17600 `(#:tests? #f)) ;FIXME: tests fail, not sure why
17601 (native-inputs
17602 `(("unzip" ,unzip)))
17603 (build-system python-build-system)
17604 (home-page "https://github.com/avakar/speg")
17605 (synopsis "PEG-based parser interpreter with memoization")
17606 (description "This package is a PEG-based parser and interpreter with
17607 memoization.")
17608 (license license:expat)))
17609
17610 (define-public python-cson
17611 (package
17612 (name "python-cson")
17613 (version "0.8")
17614 (source
17615 (origin
17616 (method url-fetch)
17617 (uri (pypi-uri "cson" version))
17618 (sha256
17619 (base32 "00cyvigg4npbph39ghkg77xbxisa6plf75vii24igxfizik0337f"))))
17620 (build-system python-build-system)
17621 (propagated-inputs
17622 `(("python-speg" ,python-speg)))
17623 (home-page "https://github.com/avakar/pycson")
17624 (synopsis "Parser for Coffeescript Object Notation (CSON)")
17625 (description "This package is a parser for Coffeescript Object
17626 Notation (CSON).")
17627 (license license:expat)))
17628
17629 (define-public python-asynctest
17630 (package
17631 (name "python-asynctest")
17632 (version "0.13.0")
17633 (source
17634 (origin
17635 (method url-fetch)
17636 (uri (pypi-uri "asynctest" version))
17637 (sha256
17638 (base32
17639 "1b3zsy7p84gag6q8ai2ylyrhx213qdk2h2zb6im3xn0m5n264y62"))))
17640 (build-system python-build-system)
17641 (arguments
17642 '(#:phases
17643 (modify-phases %standard-phases
17644 (replace 'check
17645 (lambda _
17646 (invoke "python" "-X" "dev" "-m" "unittest" "-v" "test")))
17647 (add-after 'unpack 'disable-tests
17648 (lambda* _
17649 (substitute* "test/test_selector.py"
17650 ;; XXX: This test fails for unknown reason inside the build
17651 ;; environment.
17652 (("def test_events_watched_outside_test_are_ignored")
17653 "@unittest.skip('disabled by guix')
17654 def test_events_watched_outside_test_are_ignored")))))))
17655 (home-page "https://github.com/Martiusweb/asynctest")
17656 (synopsis "Extension of unittest for testing asyncio libraries")
17657 (description
17658 "The package asynctest is built on top of the standard unittest module
17659 and cuts down boilerplate code when testing libraries for asyncio.")
17660 (license license:asl2.0)))
17661
17662 (define-public python-aionotify
17663 (package
17664 (name "python-aionotify")
17665 (version "0.2.0")
17666 (source
17667 (origin
17668 ;; Source tarball on PyPi lacks tests
17669 (method git-fetch)
17670 (uri (git-reference
17671 (url "https://github.com/rbarrois/aionotify")
17672 (commit (string-append "v" version))))
17673 (file-name (git-file-name name version))
17674 (sha256
17675 (base32 "1sk9i8czxgsbrswsf1nlb4c82vgnlzi8zrvrxdip92w2z8hqh43y"))))
17676 (build-system python-build-system)
17677 (native-inputs `(("python-asynctest" ,python-asynctest)))
17678 (home-page "https://github.com/rbarrois/aionotify")
17679 (synopsis "Asyncio-powered inotify library")
17680 (description
17681 "@code{aionotify} is a simple, asyncio-based inotify library.")
17682 (license license:bsd-3)))
17683
17684 (define-public python-forbiddenfruit
17685 (package
17686 (name "python-forbiddenfruit")
17687 (version "0.1.3")
17688 (source
17689 (origin
17690 ;; Source tarball on PyPi lacks Makefile that builds and runs tests
17691 (method git-fetch)
17692 (uri (git-reference
17693 (url "https://github.com/clarete/forbiddenfruit")
17694 (commit version)))
17695 (file-name (git-file-name name version))
17696 (sha256
17697 (base32 "1fp2xvdqpi910j9r3q68x38phpxbm700gjdi2m2j5gs91xdnyyh2"))))
17698 (build-system python-build-system)
17699 (arguments
17700 '(#:phases
17701 (modify-phases %standard-phases
17702 (replace 'check
17703 (lambda _
17704 (invoke "make" "SKIP_DEPS=1"))))))
17705 (native-inputs
17706 `(("python-nose" ,python-nose)
17707 ("python-coverage" ,python-coverage)))
17708 (home-page "https://github.com/clarete/forbiddenfruit")
17709 (synopsis "Patch python built-in objects")
17710 (description "This project allows Python code to extend built-in types.")
17711 (license (list license:gpl3+ license:expat))))
17712
17713 (define-public python-shouldbe
17714 (package
17715 (name "python-shouldbe")
17716 (version "0.1.2")
17717 (source
17718 (origin
17719 (method url-fetch)
17720 (uri (pypi-uri "shouldbe" version))
17721 (sha256
17722 (base32
17723 "16zbvjxf71dl4yfbgcr6idyim3mdrfvix1dv8b95p0s9z07372pj"))))
17724 (build-system python-build-system)
17725 (propagated-inputs
17726 `(("python-forbiddenfruit" ,python-forbiddenfruit)))
17727 (native-inputs
17728 `(("python-nose" ,python-nose)))
17729 (home-page "https://github.com/directxman12/should_be")
17730 (synopsis "Python Assertion Helpers inspired by Shouldly")
17731 (description
17732 "Python Assertion Helpers inspired by Shouldly.")
17733 (license license:isc)))
17734
17735 (define-public python-k5test
17736 (package
17737 (name "python-k5test")
17738 (version "0.9.2")
17739 (source
17740 (origin
17741 (method url-fetch)
17742 (uri (pypi-uri "k5test" version))
17743 (sha256
17744 (base32
17745 "1lqp3jgfngyhaxjgj3n230hn90wsylwilh120yjf62h7b1s02mh8"))))
17746 (build-system python-build-system)
17747 (propagated-inputs
17748 `(("python-six" ,python-six)
17749 ;; `which`, `kadmin.local` binaries called inside library
17750 ("which" ,which)
17751 ("mit-krb5" ,mit-krb5)))
17752 (native-inputs `(("mit-krb5" ,mit-krb5)))
17753 (arguments
17754 '(#:phases
17755 (modify-phases %standard-phases
17756 (add-after 'unpack 'patch-paths
17757 (lambda* _
17758 (substitute* "k5test/realm.py"
17759 (("'kadmin_local'") "'kadmin.local'")))))))
17760 (home-page "https://github.com/pythongssapi/k5test")
17761 (synopsis "Library for setting up self-contained Kerberos 5 environments")
17762 (description
17763 "@code{k5test} is a library for setting up self-contained Kerberos 5
17764 environments, and running Python unit tests inside those environments. It is
17765 based on the file of the same name found alongside the MIT Kerberos 5 unit
17766 tests.")
17767 (license license:isc)))
17768
17769 (define-public python-gssapi
17770 (package
17771 (name "python-gssapi")
17772 (version "1.6.1")
17773 (source
17774 (origin
17775 (method url-fetch)
17776 (uri (pypi-uri "gssapi" version))
17777 (sha256
17778 (base32
17779 "1gymg4asvwrz7y13qpwp2s5g8qwq179d72gkj09q6bfcgs82l5wr"))))
17780 (build-system python-build-system)
17781 (propagated-inputs
17782 `(("python-decorator" ,python-decorator)
17783 ("python-six" ,python-six)))
17784 (inputs
17785 `(("mit-krb5" ,mit-krb5)))
17786 ;; for tests
17787 (native-inputs
17788 `(("python-shouldbe" ,python-shouldbe)
17789 ("python-parameterized" ,python-parameterized)
17790 ("python-k5test" ,python-k5test)
17791 ("python-nose" ,python-nose)))
17792 (home-page "https://github.com/pythongssapi/python-gssapi")
17793 (synopsis "Python GSSAPI Wrapper")
17794 (description
17795 "Python-GSSAPI provides both low-level and high level wrappers around the
17796 GSSAPI C libraries. While it focuses on the Kerberos mechanism, it should
17797 also be useable with other GSSAPI mechanisms.")
17798 (license license:isc)))
17799
17800 (define-public python-check-manifest
17801 (package
17802 (name "python-check-manifest")
17803 (version "0.37")
17804 (source
17805 (origin
17806 (method url-fetch)
17807 (uri (pypi-uri "check-manifest" version))
17808 (sha256
17809 (base32
17810 "0lk45ifdv2cpkl6ayfyix7jwmnxa1rha7xvb0ih5999k115wzqs4"))))
17811 (build-system python-build-system)
17812 (native-inputs
17813 `(("python-mock" ,python-mock)
17814 ("git" ,git)))
17815 (home-page "https://github.com/mgedmin/check-manifest")
17816 (synopsis "Check MANIFEST.in in a Python source package for completeness")
17817 (description "Python package can include a MANIFEST.in file to help with
17818 sending package files to the Python Package Index. This package checks that
17819 file to ensure it completely and accurately describes your project.")
17820 (license license:expat)))
17821
17822 (define-public python-android-stringslib
17823 (package
17824 (name "python-android-stringslib")
17825 (version "0.1.2")
17826 (source
17827 (origin
17828 (method git-fetch)
17829 (uri (git-reference
17830 (url "https://framagit.org/tyreunom/python-android-strings-lib")
17831 (commit (string-append "v" version))))
17832 (file-name (git-file-name name version))
17833 (sha256
17834 (base32
17835 "0gij55qzzq1h83kfpvhai1vf78kkhyvxa6l17m2nl24454lhfin4"))))
17836 (build-system python-build-system)
17837 (arguments
17838 `(#:tests? #f))
17839 (home-page "https://framagit.org/tyreunom/python-android-strings-lib")
17840 (synopsis "Android strings.xml support")
17841 (description "Android Strings Lib provides support for android's strings.xml
17842 files. These files are used to translate strings in android apps.")
17843 (license license:expat)))
17844
17845 (define-public python-watchdog
17846 (package
17847 (name "python-watchdog")
17848 (version "0.9.0")
17849 (source
17850 (origin
17851 (method url-fetch)
17852 (uri (pypi-uri "watchdog" version))
17853 (sha256
17854 (base32
17855 "07cnvvlpif7a6cg4rav39zq8fxa5pfqawchr46433pij0y6napwn"))))
17856 (build-system python-build-system)
17857 (arguments
17858 `(#:phases
17859 (modify-phases %standard-phases
17860 (add-before 'check 'remove-failing
17861 (lambda _
17862 (delete-file "tests/test_inotify_buffer.py")
17863 (delete-file "tests/test_snapshot_diff.py")
17864 #t)))))
17865 (propagated-inputs
17866 `(("python-argh" ,python-argh)
17867 ("python-pathtools" ,python-pathtools)
17868 ("python-pyyaml" ,python-pyyaml)))
17869 (native-inputs
17870 `(("python-pytest-cov" ,python-pytest-cov)
17871 ("python-pytest-timeout" ,python-pytest-timeout)))
17872 (home-page "https://github.com/gorakhargosh/watchdog")
17873 (synopsis "Filesystem events monitoring")
17874 (description "This package provides a way to monitor filesystem events
17875 such as a file modification and trigger an action. This is similar to inotify,
17876 but portable.")
17877 (license license:asl2.0)))
17878
17879 (define-public python-wget
17880 (package
17881 (name "python-wget")
17882 (version "3.2")
17883 (source
17884 (origin
17885 (method url-fetch)
17886 (uri (pypi-uri "wget" version ".zip"))
17887 (sha256
17888 (base32
17889 "0qb0y7ipby42m4m7h0ipazpdyc3bn9xi46lvifcwwl5albn31rim"))))
17890 (build-system python-build-system)
17891 (native-inputs `(("unzip" ,unzip)))
17892 (home-page "https://bitbucket.org/techtonik/python-wget/")
17893 (synopsis "Pure Python download utility")
17894 (description "The python-wget library provides an API to download files
17895 with features similar to the @command{wget} utility.")
17896 (license license:unlicense)))
17897
17898 (define-public offlate
17899 (package
17900 (name "offlate")
17901 (version "0.5")
17902 (source
17903 (origin
17904 (method git-fetch)
17905 (uri (git-reference
17906 (url "https://framagit.org/tyreunom/offlate")
17907 (commit version)))
17908 (file-name (git-file-name name version))
17909 (sha256
17910 (base32
17911 "13pqnbl05wcyldfvl75fp89vjgwsvxyc69vhnb17kkha2rc2k1h7"))))
17912 (build-system python-build-system)
17913 (arguments
17914 ;; No tests
17915 `(#:tests? #f))
17916 (propagated-inputs
17917 `(("python-android-stringslib" ,python-android-stringslib)
17918 ("python-dateutil" ,python-dateutil)
17919 ("python-gitlab" ,python-gitlab)
17920 ("python-lxml" ,python-lxml)
17921 ("python-polib" ,python-polib)
17922 ("python-pyenchant" ,python-pyenchant)
17923 ("python-pygit2" ,python-pygit2)
17924 ("python-pygithub" ,python-pygithub)
17925 ("python-pyqt" ,python-pyqt)
17926 ("python-requests" ,python-requests)
17927 ("python-ruamel.yaml" ,python-ruamel.yaml)
17928 ("python-translation-finder" ,python-translation-finder)
17929 ("python-watchdog" ,python-watchdog)))
17930 (native-inputs
17931 `(("qttools" ,qttools)))
17932 (home-page "https://framagit.org/tyreunom/offlate")
17933 (synopsis "Offline translation interface for online translation tools")
17934 (description "Offlate offers a unified interface for different translation
17935 file formats, as well as many different online translation platforms. You can
17936 use it to get work from online platforms, specialized such as the Translation
17937 Project, or not such a gitlab instance when your upstream doesn't use any
17938 dedicated platform. The tool proposes a unified interface for any format and
17939 an upload option to send your work back to the platform.")
17940 (license license:gpl3+)))
17941
17942 (define-public python-pypng
17943 (package
17944 (name "python-pypng")
17945 (version "0.0.20")
17946 (source
17947 (origin
17948 (method url-fetch)
17949 (uri (pypi-uri "pypng" version))
17950 (sha256
17951 (base32 "02qpa22ls41vwsrzw9r9qhj1nhq05p03hb5473pay6y980s86chh"))))
17952 (build-system python-build-system)
17953 (home-page "https://github.com/drj11/pypng")
17954 (synopsis "Pure Python PNG image encoder/decoder")
17955 (description
17956 "The PyPNG module implements support for PNG images. It reads and writes
17957 PNG files with all allowable bit depths (1/2/4/8/16/24/32/48/64 bits per
17958 pixel) and colour combinations: greyscale (1/2/4/8/16 bit); RGB, RGBA,
17959 LA (greyscale with alpha) with 8/16 bits per channel; colour mapped
17960 images (1/2/4/8 bit). Adam7 interlacing is supported for reading and writing.
17961 A number of optional chunks can be specified (when writing) and
17962 understood (when reading): tRNS, bKGD, gAMA.
17963
17964 PyPNG is not a high level toolkit for image processing (like PIL) and does not
17965 aim at being a replacement or competitor. Its strength lies in fine-grained
17966 extensive support of PNG features. It can also read and write Netpbm PAM
17967 files, with a focus on its use as an intermediate format for implementing
17968 custom PNG processing.")
17969 (license license:expat)))
17970
17971 (define-public python-fuzzywuzzy
17972 (package
17973 (name "python-fuzzywuzzy")
17974 (version "0.18.0")
17975 (source
17976 (origin
17977 (method url-fetch)
17978 (uri (pypi-uri "fuzzywuzzy" version))
17979 (sha256
17980 (base32
17981 "1s00zn75y2dkxgnbw8kl8dw4p1mc77cv78fwfa4yb0274s96w0a5"))))
17982 (build-system python-build-system)
17983 (native-inputs
17984 `(("python-hypothesis" ,python-hypothesis)
17985 ("python-pycodestyle" ,python-pycodestyle)
17986 ("python-pytest" ,python-pytest)))
17987 (propagated-inputs
17988 `(("python-levenshtein" ,python-levenshtein)))
17989 (home-page "https://github.com/seatgeek/fuzzywuzzy")
17990 (synopsis "Fuzzy string matching in Python")
17991 (description "Approximate string matching using
17992 @emph{Levenshtein Distance} to calculate the differences between
17993 sequences.")
17994 (license license:gpl2)))
17995
17996 (define-public python2-fuzzywuzzy
17997 (package-with-python2 python-fuzzywuzzy))